diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-10-14 22:33:08 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-10-14 22:33:08 +0000 |
commit | 1f5649f86b7de5aec990e03f2700df36a01c2752 (patch) | |
tree | c6126aff7f80434c64f21dd6033215864afd57cd /sysdeps/ieee754/ldbl-96/s_cbrtl.c | |
parent | 459a31635e9fe474c05e995312fde318d7c4a5b0 (diff) | |
download | glibc-1f5649f86b7de5aec990e03f2700df36a01c2752.tar.gz glibc-1f5649f86b7de5aec990e03f2700df36a01c2752.tar.xz glibc-1f5649f86b7de5aec990e03f2700df36a01c2752.zip |
Update.
2001-10-14 Ulrich Drepper <drepper@redhat.com> * locale/programs/ld-collate.c (handle_ellipsis): Use %lX not %lx to generate hexadecimal identifier. Patch by Jungshik Shin <jungshik.shin@yale.edu>. 2001-10-09 Stephen L Moshier <moshier@mediaone.net> * sysdeps/ieee754/ldbl-96/s_cbrtl.c (__cbrtl): Fix algorithm. 2001-10-14 Ulrich Drepper <drepper@redhat.com> * sysdeps/ieee754/ldbl-128/e_powl.c: New file. * sysdeps/ieee754/ldbl-128/s_cbrtl.c: New file. Contributed by Stephen L Moshier <moshier@mediaone.net>. * sysdeps/ieee754/ldbl-128/e_j0l.c: Constify float variables. * sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise. * sysdeps/ieee754/ldbl-128/e_lgammal_r.c: Likewise * sysdeps/ieee754/ldbl-128/s_erfl.c: Likewise * sysdeps/ieee754/ldbl-128/s_expm1l.c: Likewise * sysdeps/ieee754/ldbl-128/s_log1pl.c: Likewise * timezone/africa: Update from tzdata2001d. * timezone/asia: Likewise. * timezone/australasia: Likewise. * timezone/backward: Likewise. * timezone/europe: Likewise. * timezone/leapseconds: Likewise. * timezone/northamerica: Likewise. * timezone/southamerica: Likewise. * timezone/zone.tab: Likewise. 2001-10-09 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/s390/s390-32/sys/ucontext.h: Correct __psw_t typedef. * sysdeps/s390/s390-64/sys/ucontext.h: Likewise.
Diffstat (limited to 'sysdeps/ieee754/ldbl-96/s_cbrtl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-96/s_cbrtl.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/sysdeps/ieee754/ldbl-96/s_cbrtl.c b/sysdeps/ieee754/ldbl-96/s_cbrtl.c index eef722f696..0f8227a04b 100644 --- a/sysdeps/ieee754/ldbl-96/s_cbrtl.c +++ b/sysdeps/ieee754/ldbl-96/s_cbrtl.c @@ -37,11 +37,12 @@ static const double factor[5] = SQR_CBRT2 }; +static const long double third = 0.3333333333333333333333333L; long double __cbrtl (long double x) { - long double xm, ym, u, t2; + long double xm, u; int xe; /* Reduce X. XM now is an range 1.0 to 0.5. */ @@ -54,25 +55,17 @@ __cbrtl (long double x) if (xe == 0 && fpclassify (x) <= FP_ZERO) return x + x; - u = (0.338058687610520237 - + (1.67595307700780102 - + (-2.82414939754975962 - + (4.09559907378707839 + - (-4.11151425200350531 - + (2.65298938441952296 + - (-0.988553671195413709 - + 0.161617097923756032 * xm) - * xm) - * xm) - * xm) - * xm) - * xm) - *xm); + u = (((-1.34661104733595206551E-1 * xm + + 5.46646013663955245034E-1) * xm + - 9.54382247715094465250E-1) * xm + + 1.13999833547172932737E0) * xm + + 4.02389795645447521269E-1; - t2 = u * u * u; + u *= factor[2 + xe % 3]; + u = __ldexpl (x > 0.0 ? u : -u, xe / 3); - ym = u * (t2 + 2.0 * xm) / (2.0 * t2 + xm) * factor[2 + xe % 3]; - - return __ldexpl (x > 0.0 ? ym : -ym, xe / 3); + u -= (u - (x / (u * u))) * third; + u -= (u - (x / (u * u))) * third; + return u; } weak_alias (__cbrtl, cbrtl) |