From 4f4d465008ad50a08460a1a391ee97327b98d202 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 27 Mar 2003 05:32:28 +0000 Subject: 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. --- tools/regression/lib/libc/gen/test-fpclassify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') 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__ -- cgit v1.1