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.
This commit is contained in:
parent
0f0dfee4d5
commit
0c66f5adc3
@ -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__
|
||||
|
Loading…
Reference in New Issue
Block a user