From bbb78d030efd87ec37f7599d0f014de598eceae7 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 5 Mar 2012 20:19:14 +0100 Subject: Fix loss of precision in cosh and sinh for IBM long double --- sysdeps/ieee754/ldbl-128ibm/e_sinhl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sysdeps/ieee754/ldbl-128ibm/e_sinhl.c') diff --git a/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c b/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c index b8e86b1a6b..4b53d90c93 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c @@ -16,10 +16,10 @@ * 1. Replace x by |x| (sinh(-x) = -sinh(x)). * 2. * E + E/(E+1) - * 0 <= x <= 22 : sinh(x) := --------------, E=expm1(x) + * 0 <= x <= 40 : sinh(x) := --------------, E=expm1(x) * 2 * - * 22 <= x <= lnovft : sinh(x) := exp(x)/2 + * 40 <= x <= lnovft : sinh(x) := exp(x)/2 * lnovft <= x <= ln2ovft: sinh(x) := exp(x/2)/2 * exp(x/2) * ln2ovft < x : sinh(x) := x*shuge (overflow) * @@ -48,8 +48,8 @@ __ieee754_sinhl(long double x) h = 0.5; if (jx<0) h = -h; - /* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */ - if (ix < 0x4036000000000000LL) { /* |x|<22 */ + /* |x| in [0,40], return sign(x)*0.5*(E+E/(E+1))) */ + if (ix < 0x4044000000000000LL) { /* |x|<40 */ if (ix<0x3e20000000000000LL) /* |x|<2**-29 */ if(shuge+x>one) return x;/* sinhl(tiny) = tiny with inexact */ t = __expm1l(fabsl(x)); @@ -57,7 +57,7 @@ __ieee754_sinhl(long double x) return h*(t+t/(t+one)); } - /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */ + /* |x| in [40, log(maxdouble)] return 0.5*exp(|x|) */ if (ix < 0x40862e42fefa39efLL) return h*__ieee754_expl(fabsl(x)); /* |x| in [log(maxdouble), overflowthresold] */ -- cgit 1.4.1