diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-04-17 19:00:41 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-04-17 19:00:41 +0000 |
commit | 33e885db540cbe0d0363f61c40429ea749e47831 (patch) | |
tree | 53c9573c4af84ca6c8a1ed721775c02b3582d674 /sysdeps/ieee754 | |
parent | e20dd97d360e0bcc934ade0221b588b1fcd53d89 (diff) | |
download | glibc-33e885db540cbe0d0363f61c40429ea749e47831.tar.gz glibc-33e885db540cbe0d0363f61c40429ea749e47831.tar.xz glibc-33e885db540cbe0d0363f61c40429ea749e47831.zip |
Update.
2001-04-17 Jakub Jelinek <jakub@redhat.com> * sysdeps/ieee754/ldbl-128/e_logl.c (__ieee754_logl): Make sure desired exceptions are raised for exceptional values. * math/libm-test.inc (acosh_test, atan_test, atan2_test, cacos_test, cacosh_test, casin_test, casinh_test, catan_test, catanh_test, clog_test, log_test, log1p_test, tan_test): Increase precision of expected values to satisfy ldbl-128. * sysdeps/alpha/fpu/libm-test-ulps: Adjust accordingly. * sysdeps/arm/libm-test-ulps: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/ia64/fpu/libm-test-ulps: Likewise. * sysdeps/m68k/fpu/libm-test-ulps: Likewise. * sysdeps/mips/fpu/libm-test-ulps: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. * sysdeps/s390/fpu/libm-test-ulps: Likewise. * sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise. * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Likewise. * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/e_logl.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_logl.c b/sysdeps/ieee754/ldbl-128/e_logl.c index 3bfe3c2d54..23c8ec5a27 100644 --- a/sysdeps/ieee754/ldbl-128/e_logl.c +++ b/sysdeps/ieee754/ldbl-128/e_logl.c @@ -106,6 +106,7 @@ static const long double logtbl[92] = { -2.7902661731604211834685052867305795169688E-4L, -1.2335696813916860754951146082826952093496E-4L, -3.0677461025892873184042490943581654591817E-5L, +#define ZERO logtbl[38] 0.0000000000000000000000000000000000000000E0L, -3.0359557945051052537099938863236321874198E-5L, -1.2081346403474584914595395755316412213151E-4L, @@ -167,7 +168,6 @@ static const long double ln2a = 6.93145751953125e-1L, ln2b = 1.4286068203094172321214581765680755001344E-6L; - long double __ieee754_logl(long double x) { @@ -184,22 +184,17 @@ __ieee754_logl(long double x) /* log(0) = -infinity. */ if ((k | u.parts32.w1 | u.parts32.w2 | u.parts32.w3) == 0) { - u.parts32.w0 = 0xffff0000; - return u.value; + return -0.5L / ZERO; } /* log ( x < 0 ) = NaN */ if (m & 0x80000000) { - u.parts32.w0 = 0x7fffffff; - u.parts32.w1 = 0xffffffff; - u.parts32.w2 = 0xffffffff; - u.parts32.w3 = 0xffffffff; - return u.value; + return (x - x) / ZERO; } /* log (infinity or NaN) */ if (k >= 0x7fff0000) { - return u.value; + return x + x; } /* Extract exponent and reduce domain to 0.703125 <= u < 1.40625 */ |