diff options
Diffstat (limited to 'sysdeps/libm-ieee754/s_cbrt.c')
-rw-r--r-- | sysdeps/libm-ieee754/s_cbrt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/libm-ieee754/s_cbrt.c b/sysdeps/libm-ieee754/s_cbrt.c index a5033ff468..753049d375 100644 --- a/sysdeps/libm-ieee754/s_cbrt.c +++ b/sysdeps/libm-ieee754/s_cbrt.c @@ -46,8 +46,10 @@ __cbrt (double x) xm = __frexp (fabs (x), &xe); /* If X is not finite or is null return it (with raising exceptions - if necessary. */ - if (xe == 0) + if necessary. + Note: *Our* version of `frexp' sets XE to zero if the argument is + Inf or NaN. This is not portable but faster. */ + if (xe == 0 && fpclassify (x) <= FP_ZERO) return x + x; u = (0.354895765043919860 |