summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2003-03-27 05:32:28 +0000
committerdas <das@FreeBSD.org>2003-03-27 05:32:28 +0000
commit4f4d465008ad50a08460a1a391ee97327b98d202 (patch)
tree4e7a1c8ec879832d1e7437323b1b6004b14785c2 /tools
parentfe6633a01da93493d97320189db9f677ffd850ab (diff)
downloadFreeBSD-src-4f4d465008ad50a08460a1a391ee97327b98d202.zip
FreeBSD-src-4f4d465008ad50a08460a1a391ee97327b98d202.tar.gz
Write negative zero as '-0.0'. Otherwise, it is parsed as an integer
before being cast to a floating point type, and the sign is lost.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/lib/libc/gen/test-fpclassify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/regression/lib/libc/gen/test-fpclassify.c b/tools/regression/lib/libc/gen/test-fpclassify.c
index cf20c84..8431fe8 100644
--- a/tools/regression/lib/libc/gen/test-fpclassify.c
+++ b/tools/regression/lib/libc/gen/test-fpclassify.c
@@ -35,7 +35,7 @@ main(void)
{
assert(fpclassify((float)0) == FP_ZERO);
- assert(fpclassify((float)-0) == FP_ZERO);
+ assert(fpclassify((float)-0.0) == FP_ZERO);
assert(fpclassify((float)1) == FP_NORMAL);
assert(fpclassify((float)1000) == FP_NORMAL);
#ifndef __alpha__
@@ -59,7 +59,7 @@ main(void)
assert(fpclassify((double)NAN) == FP_NAN);
assert(fpclassify((long double)0) == FP_ZERO);
- assert(fpclassify((long double)-0) == FP_ZERO);
+ assert(fpclassify((long double)-0.0) == FP_ZERO);
assert(fpclassify((long double)1) == FP_NORMAL);
assert(fpclassify((long double)1000) == FP_NORMAL);
#ifndef __alpha__
OpenPOWER on IntegriCloud