summaryrefslogtreecommitdiffstats
path: root/newlib/libm/math/sf_erf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/math/sf_erf.c')
-rw-r--r--newlib/libm/math/sf_erf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libm/math/sf_erf.c b/newlib/libm/math/sf_erf.c
index 1a9fa8d01..0329c60fa 100644
--- a/newlib/libm/math/sf_erf.c
+++ b/newlib/libm/math/sf_erf.c
@@ -109,7 +109,7 @@ sb7 = -2.2440952301e+01; /* 0xc1b38712 */
float R,S,P,Q,s,y,z,r;
GET_FLOAT_WORD(hx,x);
ix = hx&0x7fffffff;
- if(ix>=0x7f800000) { /* erf(nan)=nan */
+ if(!FLT_UWORD_IS_FINITE(ix)) { /* erf(nan)=nan */
i = ((__uint32_t)hx>>31)<<1;
return (float)(1-i)+one/x; /* erf(+-inf)=+-1 */
}
@@ -166,7 +166,7 @@ sb7 = -2.2440952301e+01; /* 0xc1b38712 */
float R,S,P,Q,s,y,z,r;
GET_FLOAT_WORD(hx,x);
ix = hx&0x7fffffff;
- if(ix>=0x7f800000) { /* erfc(nan)=nan */
+ if(!FLT_UWORD_IS_FINITE(ix)) { /* erfc(nan)=nan */
/* erfc(+-inf)=0,2 */
return (float)(((__uint32_t)hx>>31)<<1)+one/x;
}