aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-08-27 16:04:19 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-08-27 16:04:19 +0000
commit7efb4737dd729326e5339facbd785cee43fb53b3 (patch)
tree773cdbf4f4e654c69d480d5b8300775292e8ada3 /stdlib/tst-strtod-round.c
parentFix strtod rounding (bug 3479). (diff)
downloadglibc-7efb4737dd729326e5339facbd785cee43fb53b3.tar.gz
glibc-7efb4737dd729326e5339facbd785cee43fb53b3.tar.bz2
glibc-7efb4737dd729326e5339facbd785cee43fb53b3.zip
Fix sign of zero on strtod underflow (bug 14519).
Diffstat (limited to 'stdlib/tst-strtod-round.c')
-rw-r--r--stdlib/tst-strtod-round.c104
1 files changed, 104 insertions, 0 deletions
diff --git a/stdlib/tst-strtod-round.c b/stdlib/tst-strtod-round.c
index 74385000c8..07881e33e1 100644
--- a/stdlib/tst-strtod-round.c
+++ b/stdlib/tst-strtod-round.c
@@ -6255,6 +6255,110 @@ static const struct test tests[] = {
-0xcp-16448L,
-0xcp-16448L,
-0xcp-16448L),
+ TEST ("-0x0.7p-149",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x3.8p-152,
+ -0x3.8p-152,
+ -0x3.8p-152,
+ -0x3.8p-152,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ true,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L),
+ TEST ("-0x0.7p-1074",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L),
+ TEST ("-0x0.7p-16445",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x8p-16448L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x3.8p-16448L,
+ -0x3.8p-16448L,
+ -0x3.8p-16448L,
+ -0x3.8p-16448L),
+ TEST ("-0x0.7p-16494",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x8p-16448L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x4p-16496L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L),
};
static int