[svn-r23415] Description:

Avoid using fpclassify() for detecting zero/non-zero values.

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/debug
This commit is contained in:
Quincey Koziol
2013-03-21 13:19:53 -05:00
parent 0596de6267
commit 535456397c

View File

@@ -106,9 +106,9 @@ static hbool_t not_comparable;
per = -1; \
not_comparable = FALSE; \
both_zero = FALSE; \
if(FP_ZERO == fpclassify(A) && FP_ZERO == fpclassify(B)) \
if(0 == (A) && 0 == (B)) \
both_zero = TRUE; \
if(FP_ZERO != fpclassify(A)) \
if(0 != (A)) \
per = (double)ABS((double)(B - A) / (double)A); \
else \
not_comparable = TRUE; \