diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-11-19 23:43:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-11-19 23:43:24 +0000 |
commit | 24f24fa2c86a2aac7322b540eda0a951d7e9311d (patch) | |
tree | 3f50b62129406733b94df91f05e726c8900bfd2d /sysdeps/libm-ieee754 | |
parent | 6de37310f705b2cdf8dcdb91e4ee6211cf3b2304 (diff) |
Correct result for NAN, Inf, 0.0.
Diffstat (limited to 'sysdeps/libm-ieee754')
-rw-r--r-- | sysdeps/libm-ieee754/s_cbrt.c | 2 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/s_cbrtf.c | 2 | ||||
-rw-r--r-- | sysdeps/libm-ieee754/s_cbrtl.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/libm-ieee754/s_cbrt.c b/sysdeps/libm-ieee754/s_cbrt.c index a5033ff468..ddefdf14b6 100644 --- a/sysdeps/libm-ieee754/s_cbrt.c +++ b/sysdeps/libm-ieee754/s_cbrt.c @@ -47,7 +47,7 @@ __cbrt (double x) /* If X is not finite or is null return it (with raising exceptions if necessary. */ - if (xe == 0) + if (xe == 0 && (x == 0.0 || isnan (x) || isinf (x))) return x + x; u = (0.354895765043919860 diff --git a/sysdeps/libm-ieee754/s_cbrtf.c b/sysdeps/libm-ieee754/s_cbrtf.c index f9f687c011..b8e20044f8 100644 --- a/sysdeps/libm-ieee754/s_cbrtf.c +++ b/sysdeps/libm-ieee754/s_cbrtf.c @@ -47,7 +47,7 @@ __cbrtf (float x) /* If X is not finite or is null return it (with raising exceptions if necessary. */ - if (xe == 0) + if (xe == 0 && (x == 0.0 || isnanf (x) || isinff (x))) return x + x; u = (0.492659620528969547 + (0.697570460207922770 diff --git a/sysdeps/libm-ieee754/s_cbrtl.c b/sysdeps/libm-ieee754/s_cbrtl.c index b3a53a39e1..4d718769c1 100644 --- a/sysdeps/libm-ieee754/s_cbrtl.c +++ b/sysdeps/libm-ieee754/s_cbrtl.c @@ -49,7 +49,7 @@ __cbrtl (long double x) /* If X is not finite or is null return it (with raising exceptions if necessary. */ - if (xe == 0) + if (xe == 0 && (x == 0.0 || isnanl (x) || isinfl (x))) return x + x; u = (0.338058687610520237 |