From: Adhemerval Zanella Date: Thu, 12 Mar 2026 14:21:05 +0000 (-0300) Subject: math: Use cosh from CORE-MATH X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=291fc87155d91c9faeac66e28f81ef2f50873d61;p=thirdparty%2Fglibc.git math: Use cosh from CORE-MATH The current implementation precision shows the following accuracy, on three ranges ([-DBL_MAX,-10], [-10,10], [10,DBL_MAX]) with 10e9 uniform randomly generated numbers for each range (first column is the accuracy in ULP, with '0' being correctly rounded, second is the number of samples with the corresponding precision): * Range [-DBL_MAX, -10] * FE_TONEAREST 0: 10000000000 100.00% * FE_UPWARD 0: 10000000000 100.00% * FE_DOWNWARD 0: 10000000000 100.00% * FE_TOWARDZERO 0: 10000000000 100.00% * Range [-10, -10] * FE_TONEAREST 0: 3291614060 76.64% 1: 1003353235 23.36% * FE_UPWARD 0: 2295272497 53.44% 1: 1999675198 46.56% 2: 19600 0.00% * FE_DOWNWARD 0: 2294966533 53.43% 1: 1999981461 46.57% 2: 19301 0.00% * FE_TOWARDZERO 0: 2306015780 53.69% 1: 1988942093 46.31% 2: 9422 0.00% * Range [10, DBL_MAX] * FE_TONEAREST 0: 10000000000 100.00% * FE_UPWARD 0: 10000000000 100.00% * FE_DOWNWARD 0: 10000000000 100.00% * FE_TOWARDZERO 0: 10000000000 100.00% The CORE-MATH implementation is correctly rounded for any rounding mode. The code was adapted to glibc style and to use the definition of math_config.h (to handle errno, overflow, and underflow). Performance-wise, it shows: latency master patched improvement x86_64 52.1066 126.4120 -142.60% x86_64v2 49.5781 119.8520 -141.74% x86_64v3 45.0811 50.5758 -12.19% aarch64 19.9977 21.7814 -8.92% armhf-vpfv4 20.5969 27.0479 -31.32% powerpc64le 12.6405 13.6768 -8.20% reciprocal-throughput master patched improvement x86_64 18.4833 102.9120 -456.78% x86_64v2 17.5409 99.5179 -467.35% x86_64v3 18.9187 25.3662 -34.08% aarch64 10.9045 18.8217 -72.60% armhf-vpfv4 15.7430 24.0822 -52.97% powerpc64le 5.4275 8.1269 -49.73% * x86_64: gcc version 15.2.1 20260112, Ryzen 9 5900X, --disable-multi-arch * aarch64: gcc version 15.2.1 20251105, Neoverse-N1 * armv7a-vpfv4: gcc version 15.2.1 20251105, Neoverse-N1 * powerpc64le: gcc version 15.2.1 20260128, POWER10 Checked on x86_64-linux-gnu, aarch64-linux-gnu, and powerpc64le-linux-gnu. Reviewed-by: DJ Delorie --- diff --git a/NEWS b/NEWS index 46590a996c..b922eb493f 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,8 @@ Version 2.44 Major new features: - [Add new features here] +* Additional optimized and correctly rounded mathematical functions have + been imported from the CORE-MATH project, in particular cosh. Deprecated and removed features, and other changes affecting compatibility: diff --git a/SHARED-FILES b/SHARED-FILES index 0c74a508f2..df8bb18c81 100644 --- a/SHARED-FILES +++ b/SHARED-FILES @@ -248,6 +248,8 @@ core-math: sysdeps/ieee754/dbl-64/e_acosh.c # src/binary64/atanh/atanh.c, revision 532e37dc sysdeps/ieee754/dbl-64/e_atanh.c + # src/binary64/cosh/cosh.c, revision 5d0c89d5 + sysdeps/ieee754/dbl-64/e_cosh.c # src/binary64/tgamma/tgamma.c, revision 0f185e23 sysdeps/ieee754/dbl-64/e_gamma_r.c # src/binary64/lgamma/lgamma.c, revision 0413bb7e diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index a36ce9a081..61e05d570d 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -5213,6 +5213,20 @@ cosh 0x1.633c457f1e66bp+9 cosh 0x2.c5d376167f4052f4p+12 # the next value generates larger error bounds on x86_64 (binary128) cosh -0x2.c5d376eefcd4bbeb000452d84662p+12 +# CORE-MATH extra tests +cosh 0x1.41fe58c623761p+2 +cosh 0x1.424ed1d05dfa7p+2 +cosh 0x1.41a83b901d5bdp+2 +cosh 0x1.40d5c37ff8185p+2 +cosh -0x1.419a5f3fa359p+2 +cosh 0x1.426a50e51bd1ep+2 +cosh -0x1.64c53499192bfp+2 +cosh 0x1.41fe58c623761p+2 +cosh 0x1.424ed1d05dfa7p+2 +cosh 0x1.41a83b901d5bdp+2 +cosh 0x1.40d5c37ff8185p+2 +cosh 0x1.426a50e51bd1ep+2 +cosh -0x1.41311766f07f6p+2 cpow 1 0 0 0 ignore-zero-inf-sign cpow 2 0 10 0 ignore-zero-inf-sign diff --git a/math/auto-libm-test-out-cosh b/math/auto-libm-test-out-cosh index 90825bf767..dc97c6f7a6 100644 --- a/math/auto-libm-test-out-cosh +++ b/math/auto-libm-test-out-cosh @@ -3725,3 +3725,900 @@ cosh -0x2.c5d376eefcd4bbeb000452d84662p+12 = cosh tonearest ibm128 -0x2.c5d376eefcd4bbeb000452d847p+12 : plus_infty : inexact-ok overflow errno-erange = cosh towardzero ibm128 -0x2.c5d376eefcd4bbeb000452d847p+12 : 0xf.ffffffffffffbffffffffffffcp+1020 : xfail:ibm128-libgcc inexact-ok overflow errno-erange-ok = cosh upward ibm128 -0x2.c5d376eefcd4bbeb000452d847p+12 : plus_infty : xfail:ibm128-libgcc inexact-ok overflow errno-erange +cosh 0x1.41fe58c623761p+2 += cosh downward binary32 0x5.07f968p+0 : 0x4.c8ec6p+4 : inexact-ok += cosh tonearest binary32 0x5.07f968p+0 : 0x4.c8ec6p+4 : inexact-ok += cosh towardzero binary32 0x5.07f968p+0 : 0x4.c8ec6p+4 : inexact-ok += cosh upward binary32 0x5.07f968p+0 : 0x4.c8ec68p+4 : inexact-ok += cosh downward binary64 0x5.07f968p+0 : 0x4.c8ec639696b94p+4 : inexact-ok += cosh tonearest binary64 0x5.07f968p+0 : 0x4.c8ec639696b98p+4 : inexact-ok += cosh towardzero binary64 0x5.07f968p+0 : 0x4.c8ec639696b94p+4 : inexact-ok += cosh upward binary64 0x5.07f968p+0 : 0x4.c8ec639696b98p+4 : inexact-ok += cosh downward intel96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh tonearest intel96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh towardzero intel96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh upward intel96 0x5.07f968p+0 : 0x4.c8ec639696b97348p+4 : inexact-ok += cosh downward m68k96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh tonearest m68k96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh towardzero m68k96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh upward m68k96 0x5.07f968p+0 : 0x4.c8ec639696b97348p+4 : inexact-ok += cosh downward binary128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba533cp+4 : inexact-ok += cosh tonearest binary128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba534p+4 : inexact-ok += cosh towardzero binary128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba533cp+4 : inexact-ok += cosh upward binary128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba534p+4 : inexact-ok += cosh downward ibm128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba52p+4 : inexact-ok += cosh tonearest ibm128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba54p+4 : inexact-ok += cosh towardzero ibm128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba52p+4 : inexact-ok += cosh upward ibm128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba54p+4 : inexact-ok += cosh downward binary32 0x5.07f96p+0 : 0x4.c8ec38p+4 : inexact-ok += cosh tonearest binary32 0x5.07f96p+0 : 0x4.c8ec4p+4 : inexact-ok += cosh towardzero binary32 0x5.07f96p+0 : 0x4.c8ec38p+4 : inexact-ok += cosh upward binary32 0x5.07f96p+0 : 0x4.c8ec4p+4 : inexact-ok += cosh downward binary64 0x5.07f96p+0 : 0x4.c8ec3d500a3a4p+4 : inexact-ok += cosh tonearest binary64 0x5.07f96p+0 : 0x4.c8ec3d500a3a4p+4 : inexact-ok += cosh towardzero binary64 0x5.07f96p+0 : 0x4.c8ec3d500a3a4p+4 : inexact-ok += cosh upward binary64 0x5.07f96p+0 : 0x4.c8ec3d500a3a8p+4 : inexact-ok += cosh downward intel96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e7p+4 : inexact-ok += cosh tonearest intel96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e78p+4 : inexact-ok += cosh towardzero intel96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e7p+4 : inexact-ok += cosh upward intel96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e78p+4 : inexact-ok += cosh downward m68k96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e7p+4 : inexact-ok += cosh tonearest m68k96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e78p+4 : inexact-ok += cosh towardzero m68k96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e7p+4 : inexact-ok += cosh upward m68k96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e78p+4 : inexact-ok += cosh downward binary128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126be8p+4 : inexact-ok += cosh tonearest binary128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126becp+4 : inexact-ok += cosh towardzero binary128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126be8p+4 : inexact-ok += cosh upward binary128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126becp+4 : inexact-ok += cosh downward ibm128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126ap+4 : inexact-ok += cosh tonearest ibm128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126cp+4 : inexact-ok += cosh towardzero ibm128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126ap+4 : inexact-ok += cosh upward ibm128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126cp+4 : inexact-ok += cosh downward binary64 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh tonearest binary64 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh towardzero binary64 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh upward binary64 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9118p+4 : inexact-ok += cosh downward intel96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh tonearest intel96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh towardzero intel96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh upward intel96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114008p+4 : inexact-ok += cosh downward m68k96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh tonearest m68k96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh towardzero m68k96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh upward m68k96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114008p+4 : inexact-ok += cosh downward binary128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971e5cp+4 : inexact-ok += cosh tonearest binary128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971e6p+4 : inexact-ok += cosh towardzero binary128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971e5cp+4 : inexact-ok += cosh upward binary128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971e6p+4 : inexact-ok += cosh downward ibm128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971ep+4 : inexact-ok += cosh tonearest ibm128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971ep+4 : inexact-ok += cosh towardzero ibm128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971ep+4 : inexact-ok += cosh upward ibm128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1972p+4 : inexact-ok +cosh 0x1.424ed1d05dfa7p+2 += cosh downward binary32 0x5.093b48p+0 : 0x4.cef428p+4 : inexact-ok += cosh tonearest binary32 0x5.093b48p+0 : 0x4.cef428p+4 : inexact-ok += cosh towardzero binary32 0x5.093b48p+0 : 0x4.cef428p+4 : inexact-ok += cosh upward binary32 0x5.093b48p+0 : 0x4.cef43p+4 : inexact-ok += cosh downward binary64 0x5.093b48p+0 : 0x4.cef42bf9b1e84p+4 : inexact-ok += cosh tonearest binary64 0x5.093b48p+0 : 0x4.cef42bf9b1e84p+4 : inexact-ok += cosh towardzero binary64 0x5.093b48p+0 : 0x4.cef42bf9b1e84p+4 : inexact-ok += cosh upward binary64 0x5.093b48p+0 : 0x4.cef42bf9b1e88p+4 : inexact-ok += cosh downward intel96 0x5.093b48p+0 : 0x4.cef42bf9b1e857c8p+4 : inexact-ok += cosh tonearest intel96 0x5.093b48p+0 : 0x4.cef42bf9b1e857dp+4 : inexact-ok += cosh towardzero intel96 0x5.093b48p+0 : 0x4.cef42bf9b1e857c8p+4 : inexact-ok += cosh upward intel96 0x5.093b48p+0 : 0x4.cef42bf9b1e857dp+4 : inexact-ok += cosh downward m68k96 0x5.093b48p+0 : 0x4.cef42bf9b1e857c8p+4 : inexact-ok += cosh tonearest m68k96 0x5.093b48p+0 : 0x4.cef42bf9b1e857dp+4 : inexact-ok += cosh towardzero m68k96 0x5.093b48p+0 : 0x4.cef42bf9b1e857c8p+4 : inexact-ok += cosh upward m68k96 0x5.093b48p+0 : 0x4.cef42bf9b1e857dp+4 : inexact-ok += cosh downward binary128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b563p+4 : inexact-ok += cosh tonearest binary128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b5634p+4 : inexact-ok += cosh towardzero binary128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b563p+4 : inexact-ok += cosh upward binary128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b5634p+4 : inexact-ok += cosh downward ibm128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b56p+4 : inexact-ok += cosh tonearest ibm128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b56p+4 : inexact-ok += cosh towardzero ibm128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b56p+4 : inexact-ok += cosh upward ibm128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b58p+4 : inexact-ok += cosh downward binary32 0x5.093b4p+0 : 0x4.cef4p+4 : inexact-ok += cosh tonearest binary32 0x5.093b4p+0 : 0x4.cef408p+4 : inexact-ok += cosh towardzero binary32 0x5.093b4p+0 : 0x4.cef4p+4 : inexact-ok += cosh upward binary32 0x5.093b4p+0 : 0x4.cef408p+4 : inexact-ok += cosh downward binary64 0x5.093b4p+0 : 0x4.cef40582e61a4p+4 : inexact-ok += cosh tonearest binary64 0x5.093b4p+0 : 0x4.cef40582e61a8p+4 : inexact-ok += cosh towardzero binary64 0x5.093b4p+0 : 0x4.cef40582e61a4p+4 : inexact-ok += cosh upward binary64 0x5.093b4p+0 : 0x4.cef40582e61a8p+4 : inexact-ok += cosh downward intel96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh tonearest intel96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh towardzero intel96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh upward intel96 0x5.093b4p+0 : 0x4.cef40582e61a7d2p+4 : inexact-ok += cosh downward m68k96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh tonearest m68k96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh towardzero m68k96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh upward m68k96 0x5.093b4p+0 : 0x4.cef40582e61a7d2p+4 : inexact-ok += cosh downward binary128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd3f8p+4 : inexact-ok += cosh tonearest binary128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd3fcp+4 : inexact-ok += cosh towardzero binary128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd3f8p+4 : inexact-ok += cosh upward binary128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd3fcp+4 : inexact-ok += cosh downward ibm128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd2p+4 : inexact-ok += cosh tonearest ibm128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd4p+4 : inexact-ok += cosh towardzero ibm128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd2p+4 : inexact-ok += cosh upward ibm128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd4p+4 : inexact-ok += cosh downward binary64 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh tonearest binary64 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh towardzero binary64 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh upward binary64 0x5.093b474177e9cp+0 : 0x4.cef428659e24cp+4 : inexact-ok += cosh downward intel96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh tonearest intel96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh towardzero intel96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh upward intel96 0x5.093b474177e9cp+0 : 0x4.cef428659e248008p+4 : inexact-ok += cosh downward m68k96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh tonearest m68k96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh towardzero m68k96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh upward m68k96 0x5.093b474177e9cp+0 : 0x4.cef428659e248008p+4 : inexact-ok += cosh downward binary128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267523ep+4 : inexact-ok += cosh tonearest binary128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267523e4p+4 : inexact-ok += cosh towardzero binary128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267523ep+4 : inexact-ok += cosh upward binary128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267523e4p+4 : inexact-ok += cosh downward ibm128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267522p+4 : inexact-ok += cosh tonearest ibm128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267524p+4 : inexact-ok += cosh towardzero ibm128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267522p+4 : inexact-ok += cosh upward ibm128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267524p+4 : inexact-ok +cosh 0x1.41a83b901d5bdp+2 += cosh downward binary32 0x5.06a0fp+0 : 0x4.c28098p+4 : inexact-ok += cosh tonearest binary32 0x5.06a0fp+0 : 0x4.c280ap+4 : inexact-ok += cosh towardzero binary32 0x5.06a0fp+0 : 0x4.c28098p+4 : inexact-ok += cosh upward binary32 0x5.06a0fp+0 : 0x4.c280ap+4 : inexact-ok += cosh downward binary64 0x5.06a0fp+0 : 0x4.c2809ebb13c34p+4 : inexact-ok += cosh tonearest binary64 0x5.06a0fp+0 : 0x4.c2809ebb13c38p+4 : inexact-ok += cosh towardzero binary64 0x5.06a0fp+0 : 0x4.c2809ebb13c34p+4 : inexact-ok += cosh upward binary64 0x5.06a0fp+0 : 0x4.c2809ebb13c38p+4 : inexact-ok += cosh downward intel96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh tonearest intel96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh towardzero intel96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh upward intel96 0x5.06a0fp+0 : 0x4.c2809ebb13c362e8p+4 : inexact-ok += cosh downward m68k96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh tonearest m68k96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh towardzero m68k96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh upward m68k96 0x5.06a0fp+0 : 0x4.c2809ebb13c362e8p+4 : inexact-ok += cosh downward binary128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bd4cp+4 : inexact-ok += cosh tonearest binary128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bd5p+4 : inexact-ok += cosh towardzero binary128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bd4cp+4 : inexact-ok += cosh upward binary128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bd5p+4 : inexact-ok += cosh downward ibm128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bcp+4 : inexact-ok += cosh tonearest ibm128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bep+4 : inexact-ok += cosh towardzero ibm128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bcp+4 : inexact-ok += cosh upward ibm128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bep+4 : inexact-ok += cosh downward binary32 0x5.06a0e8p+0 : 0x4.c28078p+4 : inexact-ok += cosh tonearest binary32 0x5.06a0e8p+0 : 0x4.c28078p+4 : inexact-ok += cosh towardzero binary32 0x5.06a0e8p+0 : 0x4.c28078p+4 : inexact-ok += cosh upward binary32 0x5.06a0e8p+0 : 0x4.c2808p+4 : inexact-ok += cosh downward binary64 0x5.06a0e8p+0 : 0x4.c28078a7e68bp+4 : inexact-ok += cosh tonearest binary64 0x5.06a0e8p+0 : 0x4.c28078a7e68bp+4 : inexact-ok += cosh towardzero binary64 0x5.06a0e8p+0 : 0x4.c28078a7e68bp+4 : inexact-ok += cosh upward binary64 0x5.06a0e8p+0 : 0x4.c28078a7e68b4p+4 : inexact-ok += cosh downward intel96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh tonearest intel96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh towardzero intel96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh upward intel96 0x5.06a0e8p+0 : 0x4.c28078a7e68b193p+4 : inexact-ok += cosh downward m68k96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh tonearest m68k96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh towardzero m68k96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh upward m68k96 0x5.06a0e8p+0 : 0x4.c28078a7e68b193p+4 : inexact-ok += cosh downward binary128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996119ap+4 : inexact-ok += cosh tonearest binary128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996119ap+4 : inexact-ok += cosh towardzero binary128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996119ap+4 : inexact-ok += cosh upward binary128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996119a4p+4 : inexact-ok += cosh downward ibm128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996118p+4 : inexact-ok += cosh tonearest ibm128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a865799611ap+4 : inexact-ok += cosh towardzero ibm128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996118p+4 : inexact-ok += cosh upward ibm128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a865799611ap+4 : inexact-ok += cosh downward binary64 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh tonearest binary64 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh towardzero binary64 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh upward binary64 0x5.06a0ee40756f4p+0 : 0x4.c280966910af4p+4 : inexact-ok += cosh downward intel96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh tonearest intel96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh towardzero intel96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh upward intel96 0x5.06a0ee40756f4p+0 : 0x4.c280966910af0008p+4 : inexact-ok += cosh downward m68k96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh tonearest m68k96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh towardzero m68k96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh upward m68k96 0x5.06a0ee40756f4p+0 : 0x4.c280966910af0008p+4 : inexact-ok += cosh downward binary128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfbacp+4 : inexact-ok += cosh tonearest binary128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfbbp+4 : inexact-ok += cosh towardzero binary128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfbacp+4 : inexact-ok += cosh upward binary128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfbbp+4 : inexact-ok += cosh downward ibm128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfap+4 : inexact-ok += cosh tonearest ibm128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfcp+4 : inexact-ok += cosh towardzero ibm128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfap+4 : inexact-ok += cosh upward ibm128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfcp+4 : inexact-ok +cosh 0x1.40d5c37ff8185p+2 += cosh downward binary32 0x5.03571p+0 : 0x4.b2f37p+4 : inexact-ok += cosh tonearest binary32 0x5.03571p+0 : 0x4.b2f378p+4 : inexact-ok += cosh towardzero binary32 0x5.03571p+0 : 0x4.b2f37p+4 : inexact-ok += cosh upward binary32 0x5.03571p+0 : 0x4.b2f378p+4 : inexact-ok += cosh downward binary64 0x5.03571p+0 : 0x4.b2f3753486e64p+4 : inexact-ok += cosh tonearest binary64 0x5.03571p+0 : 0x4.b2f3753486e64p+4 : inexact-ok += cosh towardzero binary64 0x5.03571p+0 : 0x4.b2f3753486e64p+4 : inexact-ok += cosh upward binary64 0x5.03571p+0 : 0x4.b2f3753486e68p+4 : inexact-ok += cosh downward intel96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh tonearest intel96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh towardzero intel96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh upward intel96 0x5.03571p+0 : 0x4.b2f3753486e6432p+4 : inexact-ok += cosh downward m68k96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh tonearest m68k96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh towardzero m68k96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh upward m68k96 0x5.03571p+0 : 0x4.b2f3753486e6432p+4 : inexact-ok += cosh downward binary128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef6829925p+4 : inexact-ok += cosh tonearest binary128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef6829925p+4 : inexact-ok += cosh towardzero binary128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef6829925p+4 : inexact-ok += cosh upward binary128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef68299254p+4 : inexact-ok += cosh downward ibm128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef682992p+4 : inexact-ok += cosh tonearest ibm128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef682992p+4 : inexact-ok += cosh towardzero ibm128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef682992p+4 : inexact-ok += cosh upward ibm128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef682994p+4 : inexact-ok += cosh downward binary32 0x5.035708p+0 : 0x4.b2f348p+4 : inexact-ok += cosh tonearest binary32 0x5.035708p+0 : 0x4.b2f35p+4 : inexact-ok += cosh towardzero binary32 0x5.035708p+0 : 0x4.b2f348p+4 : inexact-ok += cosh upward binary32 0x5.035708p+0 : 0x4.b2f35p+4 : inexact-ok += cosh downward binary64 0x5.035708p+0 : 0x4.b2f34f9dc5c04p+4 : inexact-ok += cosh tonearest binary64 0x5.035708p+0 : 0x4.b2f34f9dc5c04p+4 : inexact-ok += cosh towardzero binary64 0x5.035708p+0 : 0x4.b2f34f9dc5c04p+4 : inexact-ok += cosh upward binary64 0x5.035708p+0 : 0x4.b2f34f9dc5c08p+4 : inexact-ok += cosh downward intel96 0x5.035708p+0 : 0x4.b2f34f9dc5c05218p+4 : inexact-ok += cosh tonearest intel96 0x5.035708p+0 : 0x4.b2f34f9dc5c0522p+4 : inexact-ok += cosh towardzero intel96 0x5.035708p+0 : 0x4.b2f34f9dc5c05218p+4 : inexact-ok += cosh upward intel96 0x5.035708p+0 : 0x4.b2f34f9dc5c0522p+4 : inexact-ok += cosh downward m68k96 0x5.035708p+0 : 0x4.b2f34f9dc5c05218p+4 : inexact-ok += cosh tonearest m68k96 0x5.035708p+0 : 0x4.b2f34f9dc5c0522p+4 : inexact-ok += cosh towardzero m68k96 0x5.035708p+0 : 0x4.b2f34f9dc5c05218p+4 : inexact-ok += cosh upward m68k96 0x5.035708p+0 : 0x4.b2f34f9dc5c0522p+4 : inexact-ok += cosh downward binary128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb501fcp+4 : inexact-ok += cosh tonearest binary128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb502p+4 : inexact-ok += cosh towardzero binary128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb501fcp+4 : inexact-ok += cosh upward binary128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb502p+4 : inexact-ok += cosh downward ibm128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb5p+4 : inexact-ok += cosh tonearest ibm128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb502p+4 : inexact-ok += cosh towardzero ibm128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb5p+4 : inexact-ok += cosh upward ibm128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb502p+4 : inexact-ok += cosh downward binary64 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh tonearest binary64 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh towardzero binary64 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh upward binary64 0x5.03570dffe0614p+0 : 0x4.b2f36bce41eecp+4 : inexact-ok += cosh downward intel96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh tonearest intel96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh towardzero intel96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh upward intel96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8008p+4 : inexact-ok += cosh downward m68k96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh tonearest m68k96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh towardzero m68k96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh upward m68k96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8008p+4 : inexact-ok += cosh downward binary128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288b4p+4 : inexact-ok += cosh tonearest binary128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288b4p+4 : inexact-ok += cosh towardzero binary128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288b4p+4 : inexact-ok += cosh upward binary128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288b8p+4 : inexact-ok += cosh downward ibm128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288p+4 : inexact-ok += cosh tonearest ibm128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288p+4 : inexact-ok += cosh towardzero ibm128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288p+4 : inexact-ok += cosh upward ibm128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba28ap+4 : inexact-ok +cosh -0x1.419a5f3fa359p+2 += cosh downward binary32 -0x5.066978p+0 : 0x4.c178b8p+4 : inexact-ok += cosh tonearest binary32 -0x5.066978p+0 : 0x4.c178cp+4 : inexact-ok += cosh towardzero binary32 -0x5.066978p+0 : 0x4.c178b8p+4 : inexact-ok += cosh upward binary32 -0x5.066978p+0 : 0x4.c178cp+4 : inexact-ok += cosh downward binary64 -0x5.066978p+0 : 0x4.c178bc58bf018p+4 : inexact-ok += cosh tonearest binary64 -0x5.066978p+0 : 0x4.c178bc58bf018p+4 : inexact-ok += cosh towardzero binary64 -0x5.066978p+0 : 0x4.c178bc58bf018p+4 : inexact-ok += cosh upward binary64 -0x5.066978p+0 : 0x4.c178bc58bf01cp+4 : inexact-ok += cosh downward intel96 -0x5.066978p+0 : 0x4.c178bc58bf018fd8p+4 : inexact-ok += cosh tonearest intel96 -0x5.066978p+0 : 0x4.c178bc58bf018fd8p+4 : inexact-ok += cosh towardzero intel96 -0x5.066978p+0 : 0x4.c178bc58bf018fd8p+4 : inexact-ok += cosh upward intel96 -0x5.066978p+0 : 0x4.c178bc58bf018fep+4 : inexact-ok += cosh downward m68k96 -0x5.066978p+0 : 0x4.c178bc58bf018fd8p+4 : inexact-ok += cosh tonearest m68k96 -0x5.066978p+0 : 0x4.c178bc58bf018fd8p+4 : inexact-ok += cosh towardzero m68k96 -0x5.066978p+0 : 0x4.c178bc58bf018fd8p+4 : inexact-ok += cosh upward m68k96 -0x5.066978p+0 : 0x4.c178bc58bf018fep+4 : inexact-ok += cosh downward binary128 -0x5.066978p+0 : 0x4.c178bc58bf018fd9b85ed488b598p+4 : inexact-ok += cosh tonearest binary128 -0x5.066978p+0 : 0x4.c178bc58bf018fd9b85ed488b59cp+4 : inexact-ok += cosh towardzero binary128 -0x5.066978p+0 : 0x4.c178bc58bf018fd9b85ed488b598p+4 : inexact-ok += cosh upward binary128 -0x5.066978p+0 : 0x4.c178bc58bf018fd9b85ed488b59cp+4 : inexact-ok += cosh downward ibm128 -0x5.066978p+0 : 0x4.c178bc58bf018fd9b85ed488b4p+4 : inexact-ok += cosh tonearest ibm128 -0x5.066978p+0 : 0x4.c178bc58bf018fd9b85ed488b6p+4 : inexact-ok += cosh towardzero ibm128 -0x5.066978p+0 : 0x4.c178bc58bf018fd9b85ed488b4p+4 : inexact-ok += cosh upward ibm128 -0x5.066978p+0 : 0x4.c178bc58bf018fd9b85ed488b6p+4 : inexact-ok += cosh downward binary32 -0x5.06698p+0 : 0x4.c178ep+4 : inexact-ok += cosh tonearest binary32 -0x5.06698p+0 : 0x4.c178ep+4 : inexact-ok += cosh towardzero binary32 -0x5.06698p+0 : 0x4.c178ep+4 : inexact-ok += cosh upward binary32 -0x5.06698p+0 : 0x4.c178e8p+4 : inexact-ok += cosh downward binary64 -0x5.06698p+0 : 0x4.c178e263ae288p+4 : inexact-ok += cosh tonearest binary64 -0x5.06698p+0 : 0x4.c178e263ae28cp+4 : inexact-ok += cosh towardzero binary64 -0x5.06698p+0 : 0x4.c178e263ae288p+4 : inexact-ok += cosh upward binary64 -0x5.06698p+0 : 0x4.c178e263ae28cp+4 : inexact-ok += cosh downward intel96 -0x5.06698p+0 : 0x4.c178e263ae28a328p+4 : inexact-ok += cosh tonearest intel96 -0x5.06698p+0 : 0x4.c178e263ae28a33p+4 : inexact-ok += cosh towardzero intel96 -0x5.06698p+0 : 0x4.c178e263ae28a328p+4 : inexact-ok += cosh upward intel96 -0x5.06698p+0 : 0x4.c178e263ae28a33p+4 : inexact-ok += cosh downward m68k96 -0x5.06698p+0 : 0x4.c178e263ae28a328p+4 : inexact-ok += cosh tonearest m68k96 -0x5.06698p+0 : 0x4.c178e263ae28a33p+4 : inexact-ok += cosh towardzero m68k96 -0x5.06698p+0 : 0x4.c178e263ae28a328p+4 : inexact-ok += cosh upward m68k96 -0x5.06698p+0 : 0x4.c178e263ae28a33p+4 : inexact-ok += cosh downward binary128 -0x5.06698p+0 : 0x4.c178e263ae28a32e370063ef6ab4p+4 : inexact-ok += cosh tonearest binary128 -0x5.06698p+0 : 0x4.c178e263ae28a32e370063ef6ab8p+4 : inexact-ok += cosh towardzero binary128 -0x5.06698p+0 : 0x4.c178e263ae28a32e370063ef6ab4p+4 : inexact-ok += cosh upward binary128 -0x5.06698p+0 : 0x4.c178e263ae28a32e370063ef6ab8p+4 : inexact-ok += cosh downward ibm128 -0x5.06698p+0 : 0x4.c178e263ae28a32e370063ef6ap+4 : inexact-ok += cosh tonearest ibm128 -0x5.06698p+0 : 0x4.c178e263ae28a32e370063ef6ap+4 : inexact-ok += cosh towardzero ibm128 -0x5.06698p+0 : 0x4.c178e263ae28a32e370063ef6ap+4 : inexact-ok += cosh upward ibm128 -0x5.06698p+0 : 0x4.c178e263ae28a32e370063ef6cp+4 : inexact-ok += cosh downward binary64 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh tonearest binary64 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh towardzero binary64 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh upward binary64 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f7p+4 : inexact-ok += cosh downward intel96 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh tonearest intel96 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh towardzero intel96 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh upward intel96 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c008p+4 : inexact-ok += cosh downward m68k96 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh tonearest m68k96 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh towardzero m68k96 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6cp+4 : inexact-ok += cosh upward m68k96 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c008p+4 : inexact-ok += cosh downward binary128 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c00025bace002618p+4 : inexact-ok += cosh tonearest binary128 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c00025bace002618p+4 : inexact-ok += cosh towardzero binary128 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c00025bace002618p+4 : inexact-ok += cosh upward binary128 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c00025bace00261cp+4 : inexact-ok += cosh downward ibm128 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c00025bace0026p+4 : inexact-ok += cosh tonearest ibm128 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c00025bace0026p+4 : inexact-ok += cosh towardzero ibm128 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c00025bace0026p+4 : inexact-ok += cosh upward ibm128 -0x5.06697cfe8d64p+0 : 0x4.c178d418b1f6c00025bace0028p+4 : inexact-ok +cosh 0x1.426a50e51bd1ep+2 += cosh downward binary32 0x5.09a948p+0 : 0x4.d10578p+4 : inexact-ok += cosh tonearest binary32 0x5.09a948p+0 : 0x4.d1058p+4 : inexact-ok += cosh towardzero binary32 0x5.09a948p+0 : 0x4.d10578p+4 : inexact-ok += cosh upward binary32 0x5.09a948p+0 : 0x4.d1058p+4 : inexact-ok += cosh downward binary64 0x5.09a948p+0 : 0x4.d1057f2772a24p+4 : inexact-ok += cosh tonearest binary64 0x5.09a948p+0 : 0x4.d1057f2772a28p+4 : inexact-ok += cosh towardzero binary64 0x5.09a948p+0 : 0x4.d1057f2772a24p+4 : inexact-ok += cosh upward binary64 0x5.09a948p+0 : 0x4.d1057f2772a28p+4 : inexact-ok += cosh downward intel96 0x5.09a948p+0 : 0x4.d1057f2772a269ep+4 : inexact-ok += cosh tonearest intel96 0x5.09a948p+0 : 0x4.d1057f2772a269e8p+4 : inexact-ok += cosh towardzero intel96 0x5.09a948p+0 : 0x4.d1057f2772a269ep+4 : inexact-ok += cosh upward intel96 0x5.09a948p+0 : 0x4.d1057f2772a269e8p+4 : inexact-ok += cosh downward m68k96 0x5.09a948p+0 : 0x4.d1057f2772a269ep+4 : inexact-ok += cosh tonearest m68k96 0x5.09a948p+0 : 0x4.d1057f2772a269e8p+4 : inexact-ok += cosh towardzero m68k96 0x5.09a948p+0 : 0x4.d1057f2772a269ep+4 : inexact-ok += cosh upward m68k96 0x5.09a948p+0 : 0x4.d1057f2772a269e8p+4 : inexact-ok += cosh downward binary128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2ecp+4 : inexact-ok += cosh tonearest binary128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2fp+4 : inexact-ok += cosh towardzero binary128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2ecp+4 : inexact-ok += cosh upward binary128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2fp+4 : inexact-ok += cosh downward ibm128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2p+4 : inexact-ok += cosh tonearest ibm128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2p+4 : inexact-ok += cosh towardzero ibm128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2p+4 : inexact-ok += cosh upward ibm128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f4p+4 : inexact-ok += cosh downward binary32 0x5.09a94p+0 : 0x4.d10558p+4 : inexact-ok += cosh tonearest binary32 0x5.09a94p+0 : 0x4.d10558p+4 : inexact-ok += cosh towardzero binary32 0x5.09a94p+0 : 0x4.d10558p+4 : inexact-ok += cosh upward binary32 0x5.09a94p+0 : 0x4.d1056p+4 : inexact-ok += cosh downward binary64 0x5.09a94p+0 : 0x4.d10558a01bdfcp+4 : inexact-ok += cosh tonearest binary64 0x5.09a94p+0 : 0x4.d10558a01bep+4 : inexact-ok += cosh towardzero binary64 0x5.09a94p+0 : 0x4.d10558a01bdfcp+4 : inexact-ok += cosh upward binary64 0x5.09a94p+0 : 0x4.d10558a01bep+4 : inexact-ok += cosh downward intel96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh tonearest intel96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh towardzero intel96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh upward intel96 0x5.09a94p+0 : 0x4.d10558a01bdff468p+4 : inexact-ok += cosh downward m68k96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh tonearest m68k96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh towardzero m68k96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh upward m68k96 0x5.09a94p+0 : 0x4.d10558a01bdff468p+4 : inexact-ok += cosh downward binary128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713f6cp+4 : inexact-ok += cosh tonearest binary128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713f7p+4 : inexact-ok += cosh towardzero binary128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713f6cp+4 : inexact-ok += cosh upward binary128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713f7p+4 : inexact-ok += cosh downward ibm128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713ep+4 : inexact-ok += cosh tonearest ibm128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f714p+4 : inexact-ok += cosh towardzero ibm128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713ep+4 : inexact-ok += cosh upward ibm128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f714p+4 : inexact-ok += cosh downward binary64 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh tonearest binary64 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh towardzero binary64 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh upward binary64 0x5.09a943946f478p+0 : 0x4.d10569ddbbf64p+4 : inexact-ok += cosh downward intel96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh tonearest intel96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh towardzero intel96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh upward intel96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60008p+4 : inexact-ok += cosh downward m68k96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh tonearest m68k96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh towardzero m68k96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh upward m68k96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60008p+4 : inexact-ok += cosh downward binary128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da480974cp+4 : inexact-ok += cosh tonearest binary128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da480975p+4 : inexact-ok += cosh towardzero binary128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da480974cp+4 : inexact-ok += cosh upward binary128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da480975p+4 : inexact-ok += cosh downward ibm128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da48096p+4 : inexact-ok += cosh tonearest ibm128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da48098p+4 : inexact-ok += cosh towardzero ibm128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da48096p+4 : inexact-ok += cosh upward ibm128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da48098p+4 : inexact-ok +cosh -0x1.64c53499192bfp+2 += cosh downward binary32 -0x5.9314dp+0 : 0x8.3d0c7p+4 : inexact-ok += cosh tonearest binary32 -0x5.9314dp+0 : 0x8.3d0c7p+4 : inexact-ok += cosh towardzero binary32 -0x5.9314dp+0 : 0x8.3d0c7p+4 : inexact-ok += cosh upward binary32 -0x5.9314dp+0 : 0x8.3d0c8p+4 : inexact-ok += cosh downward binary64 -0x5.9314dp+0 : 0x8.3d0c751e5408p+4 : inexact-ok += cosh tonearest binary64 -0x5.9314dp+0 : 0x8.3d0c751e54088p+4 : inexact-ok += cosh towardzero binary64 -0x5.9314dp+0 : 0x8.3d0c751e5408p+4 : inexact-ok += cosh upward binary64 -0x5.9314dp+0 : 0x8.3d0c751e54088p+4 : inexact-ok += cosh downward intel96 -0x5.9314dp+0 : 0x8.3d0c751e540878cp+4 : inexact-ok += cosh tonearest intel96 -0x5.9314dp+0 : 0x8.3d0c751e540878dp+4 : inexact-ok += cosh towardzero intel96 -0x5.9314dp+0 : 0x8.3d0c751e540878cp+4 : inexact-ok += cosh upward intel96 -0x5.9314dp+0 : 0x8.3d0c751e540878dp+4 : inexact-ok += cosh downward m68k96 -0x5.9314dp+0 : 0x8.3d0c751e540878cp+4 : inexact-ok += cosh tonearest m68k96 -0x5.9314dp+0 : 0x8.3d0c751e540878dp+4 : inexact-ok += cosh towardzero m68k96 -0x5.9314dp+0 : 0x8.3d0c751e540878cp+4 : inexact-ok += cosh upward m68k96 -0x5.9314dp+0 : 0x8.3d0c751e540878dp+4 : inexact-ok += cosh downward binary128 -0x5.9314dp+0 : 0x8.3d0c751e540878c9d15a8fe9641p+4 : inexact-ok += cosh tonearest binary128 -0x5.9314dp+0 : 0x8.3d0c751e540878c9d15a8fe96418p+4 : inexact-ok += cosh towardzero binary128 -0x5.9314dp+0 : 0x8.3d0c751e540878c9d15a8fe9641p+4 : inexact-ok += cosh upward binary128 -0x5.9314dp+0 : 0x8.3d0c751e540878c9d15a8fe96418p+4 : inexact-ok += cosh downward ibm128 -0x5.9314dp+0 : 0x8.3d0c751e540878c9d15a8fe964p+4 : inexact-ok += cosh tonearest ibm128 -0x5.9314dp+0 : 0x8.3d0c751e540878c9d15a8fe964p+4 : inexact-ok += cosh towardzero ibm128 -0x5.9314dp+0 : 0x8.3d0c751e540878c9d15a8fe964p+4 : inexact-ok += cosh upward ibm128 -0x5.9314dp+0 : 0x8.3d0c751e540878c9d15a8fe968p+4 : inexact-ok += cosh downward binary32 -0x5.9314d8p+0 : 0x8.3d0cbp+4 : inexact-ok += cosh tonearest binary32 -0x5.9314d8p+0 : 0x8.3d0cbp+4 : inexact-ok += cosh towardzero binary32 -0x5.9314d8p+0 : 0x8.3d0cbp+4 : inexact-ok += cosh upward binary32 -0x5.9314d8p+0 : 0x8.3d0ccp+4 : inexact-ok += cosh downward binary64 -0x5.9314d8p+0 : 0x8.3d0cb7063c6dp+4 : inexact-ok += cosh tonearest binary64 -0x5.9314d8p+0 : 0x8.3d0cb7063c6dp+4 : inexact-ok += cosh towardzero binary64 -0x5.9314d8p+0 : 0x8.3d0cb7063c6dp+4 : inexact-ok += cosh upward binary64 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d8p+4 : inexact-ok += cosh downward intel96 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fp+4 : inexact-ok += cosh tonearest intel96 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d19p+4 : inexact-ok += cosh towardzero intel96 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fp+4 : inexact-ok += cosh upward intel96 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d19p+4 : inexact-ok += cosh downward m68k96 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fp+4 : inexact-ok += cosh tonearest m68k96 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d19p+4 : inexact-ok += cosh towardzero m68k96 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fp+4 : inexact-ok += cosh upward m68k96 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d19p+4 : inexact-ok += cosh downward binary128 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fa473295485a98p+4 : inexact-ok += cosh tonearest binary128 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fa473295485a98p+4 : inexact-ok += cosh towardzero binary128 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fa473295485a98p+4 : inexact-ok += cosh upward binary128 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fa473295485aap+4 : inexact-ok += cosh downward ibm128 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fa4732954858p+4 : inexact-ok += cosh tonearest ibm128 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fa473295485cp+4 : inexact-ok += cosh towardzero ibm128 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fa4732954858p+4 : inexact-ok += cosh upward ibm128 -0x5.9314d8p+0 : 0x8.3d0cb7063c6d18fa473295485cp+4 : inexact-ok += cosh downward binary64 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh tonearest binary64 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh towardzero binary64 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh upward binary64 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e8p+4 : inexact-ok += cosh downward intel96 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh tonearest intel96 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh towardzero intel96 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh upward intel96 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e001p+4 : inexact-ok += cosh downward m68k96 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh tonearest m68k96 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh towardzero m68k96 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3ep+4 : inexact-ok += cosh upward m68k96 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e001p+4 : inexact-ok += cosh downward binary128 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e00004b1dc4056c18p+4 : inexact-ok += cosh tonearest binary128 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e00004b1dc4056c2p+4 : inexact-ok += cosh towardzero binary128 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e00004b1dc4056c18p+4 : inexact-ok += cosh upward binary128 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e00004b1dc4056c2p+4 : inexact-ok += cosh downward ibm128 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e00004b1dc4056cp+4 : inexact-ok += cosh tonearest ibm128 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e00004b1dc4056cp+4 : inexact-ok += cosh towardzero ibm128 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e00004b1dc4056cp+4 : inexact-ok += cosh upward ibm128 -0x5.9314d26464afcp+0 : 0x8.3d0c88d35e3e00004b1dc4057p+4 : inexact-ok +cosh 0x1.41fe58c623761p+2 += cosh downward binary32 0x5.07f968p+0 : 0x4.c8ec6p+4 : inexact-ok += cosh tonearest binary32 0x5.07f968p+0 : 0x4.c8ec6p+4 : inexact-ok += cosh towardzero binary32 0x5.07f968p+0 : 0x4.c8ec6p+4 : inexact-ok += cosh upward binary32 0x5.07f968p+0 : 0x4.c8ec68p+4 : inexact-ok += cosh downward binary64 0x5.07f968p+0 : 0x4.c8ec639696b94p+4 : inexact-ok += cosh tonearest binary64 0x5.07f968p+0 : 0x4.c8ec639696b98p+4 : inexact-ok += cosh towardzero binary64 0x5.07f968p+0 : 0x4.c8ec639696b94p+4 : inexact-ok += cosh upward binary64 0x5.07f968p+0 : 0x4.c8ec639696b98p+4 : inexact-ok += cosh downward intel96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh tonearest intel96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh towardzero intel96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh upward intel96 0x5.07f968p+0 : 0x4.c8ec639696b97348p+4 : inexact-ok += cosh downward m68k96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh tonearest m68k96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh towardzero m68k96 0x5.07f968p+0 : 0x4.c8ec639696b9734p+4 : inexact-ok += cosh upward m68k96 0x5.07f968p+0 : 0x4.c8ec639696b97348p+4 : inexact-ok += cosh downward binary128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba533cp+4 : inexact-ok += cosh tonearest binary128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba534p+4 : inexact-ok += cosh towardzero binary128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba533cp+4 : inexact-ok += cosh upward binary128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba534p+4 : inexact-ok += cosh downward ibm128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba52p+4 : inexact-ok += cosh tonearest ibm128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba54p+4 : inexact-ok += cosh towardzero ibm128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba52p+4 : inexact-ok += cosh upward ibm128 0x5.07f968p+0 : 0x4.c8ec639696b9734351e5a3ba54p+4 : inexact-ok += cosh downward binary32 0x5.07f96p+0 : 0x4.c8ec38p+4 : inexact-ok += cosh tonearest binary32 0x5.07f96p+0 : 0x4.c8ec4p+4 : inexact-ok += cosh towardzero binary32 0x5.07f96p+0 : 0x4.c8ec38p+4 : inexact-ok += cosh upward binary32 0x5.07f96p+0 : 0x4.c8ec4p+4 : inexact-ok += cosh downward binary64 0x5.07f96p+0 : 0x4.c8ec3d500a3a4p+4 : inexact-ok += cosh tonearest binary64 0x5.07f96p+0 : 0x4.c8ec3d500a3a4p+4 : inexact-ok += cosh towardzero binary64 0x5.07f96p+0 : 0x4.c8ec3d500a3a4p+4 : inexact-ok += cosh upward binary64 0x5.07f96p+0 : 0x4.c8ec3d500a3a8p+4 : inexact-ok += cosh downward intel96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e7p+4 : inexact-ok += cosh tonearest intel96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e78p+4 : inexact-ok += cosh towardzero intel96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e7p+4 : inexact-ok += cosh upward intel96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e78p+4 : inexact-ok += cosh downward m68k96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e7p+4 : inexact-ok += cosh tonearest m68k96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e78p+4 : inexact-ok += cosh towardzero m68k96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e7p+4 : inexact-ok += cosh upward m68k96 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e78p+4 : inexact-ok += cosh downward binary128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126be8p+4 : inexact-ok += cosh tonearest binary128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126becp+4 : inexact-ok += cosh towardzero binary128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126be8p+4 : inexact-ok += cosh upward binary128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126becp+4 : inexact-ok += cosh downward ibm128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126ap+4 : inexact-ok += cosh tonearest ibm128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126cp+4 : inexact-ok += cosh towardzero ibm128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126ap+4 : inexact-ok += cosh upward ibm128 0x5.07f96p+0 : 0x4.c8ec3d500a3a5e75d427b3126cp+4 : inexact-ok += cosh downward binary64 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh tonearest binary64 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh towardzero binary64 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh upward binary64 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9118p+4 : inexact-ok += cosh downward intel96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh tonearest intel96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh towardzero intel96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh upward intel96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114008p+4 : inexact-ok += cosh downward m68k96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh tonearest m68k96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh towardzero m68k96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114p+4 : inexact-ok += cosh upward m68k96 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff9114008p+4 : inexact-ok += cosh downward binary128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971e5cp+4 : inexact-ok += cosh tonearest binary128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971e6p+4 : inexact-ok += cosh towardzero binary128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971e5cp+4 : inexact-ok += cosh upward binary128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971e6p+4 : inexact-ok += cosh downward ibm128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971ep+4 : inexact-ok += cosh tonearest ibm128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971ep+4 : inexact-ok += cosh towardzero ibm128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1971ep+4 : inexact-ok += cosh upward ibm128 0x5.07f963188dd84p+0 : 0x4.c8ec4c1ff91140001f93e1972p+4 : inexact-ok +cosh 0x1.424ed1d05dfa7p+2 += cosh downward binary32 0x5.093b48p+0 : 0x4.cef428p+4 : inexact-ok += cosh tonearest binary32 0x5.093b48p+0 : 0x4.cef428p+4 : inexact-ok += cosh towardzero binary32 0x5.093b48p+0 : 0x4.cef428p+4 : inexact-ok += cosh upward binary32 0x5.093b48p+0 : 0x4.cef43p+4 : inexact-ok += cosh downward binary64 0x5.093b48p+0 : 0x4.cef42bf9b1e84p+4 : inexact-ok += cosh tonearest binary64 0x5.093b48p+0 : 0x4.cef42bf9b1e84p+4 : inexact-ok += cosh towardzero binary64 0x5.093b48p+0 : 0x4.cef42bf9b1e84p+4 : inexact-ok += cosh upward binary64 0x5.093b48p+0 : 0x4.cef42bf9b1e88p+4 : inexact-ok += cosh downward intel96 0x5.093b48p+0 : 0x4.cef42bf9b1e857c8p+4 : inexact-ok += cosh tonearest intel96 0x5.093b48p+0 : 0x4.cef42bf9b1e857dp+4 : inexact-ok += cosh towardzero intel96 0x5.093b48p+0 : 0x4.cef42bf9b1e857c8p+4 : inexact-ok += cosh upward intel96 0x5.093b48p+0 : 0x4.cef42bf9b1e857dp+4 : inexact-ok += cosh downward m68k96 0x5.093b48p+0 : 0x4.cef42bf9b1e857c8p+4 : inexact-ok += cosh tonearest m68k96 0x5.093b48p+0 : 0x4.cef42bf9b1e857dp+4 : inexact-ok += cosh towardzero m68k96 0x5.093b48p+0 : 0x4.cef42bf9b1e857c8p+4 : inexact-ok += cosh upward m68k96 0x5.093b48p+0 : 0x4.cef42bf9b1e857dp+4 : inexact-ok += cosh downward binary128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b563p+4 : inexact-ok += cosh tonearest binary128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b5634p+4 : inexact-ok += cosh towardzero binary128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b563p+4 : inexact-ok += cosh upward binary128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b5634p+4 : inexact-ok += cosh downward ibm128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b56p+4 : inexact-ok += cosh tonearest ibm128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b56p+4 : inexact-ok += cosh towardzero ibm128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b56p+4 : inexact-ok += cosh upward ibm128 0x5.093b48p+0 : 0x4.cef42bf9b1e857cddb3ba37b58p+4 : inexact-ok += cosh downward binary32 0x5.093b4p+0 : 0x4.cef4p+4 : inexact-ok += cosh tonearest binary32 0x5.093b4p+0 : 0x4.cef408p+4 : inexact-ok += cosh towardzero binary32 0x5.093b4p+0 : 0x4.cef4p+4 : inexact-ok += cosh upward binary32 0x5.093b4p+0 : 0x4.cef408p+4 : inexact-ok += cosh downward binary64 0x5.093b4p+0 : 0x4.cef40582e61a4p+4 : inexact-ok += cosh tonearest binary64 0x5.093b4p+0 : 0x4.cef40582e61a8p+4 : inexact-ok += cosh towardzero binary64 0x5.093b4p+0 : 0x4.cef40582e61a4p+4 : inexact-ok += cosh upward binary64 0x5.093b4p+0 : 0x4.cef40582e61a8p+4 : inexact-ok += cosh downward intel96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh tonearest intel96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh towardzero intel96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh upward intel96 0x5.093b4p+0 : 0x4.cef40582e61a7d2p+4 : inexact-ok += cosh downward m68k96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh tonearest m68k96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh towardzero m68k96 0x5.093b4p+0 : 0x4.cef40582e61a7d18p+4 : inexact-ok += cosh upward m68k96 0x5.093b4p+0 : 0x4.cef40582e61a7d2p+4 : inexact-ok += cosh downward binary128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd3f8p+4 : inexact-ok += cosh tonearest binary128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd3fcp+4 : inexact-ok += cosh towardzero binary128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd3f8p+4 : inexact-ok += cosh upward binary128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd3fcp+4 : inexact-ok += cosh downward ibm128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd2p+4 : inexact-ok += cosh tonearest ibm128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd4p+4 : inexact-ok += cosh towardzero ibm128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd2p+4 : inexact-ok += cosh upward ibm128 0x5.093b4p+0 : 0x4.cef40582e61a7d185037ecafd4p+4 : inexact-ok += cosh downward binary64 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh tonearest binary64 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh towardzero binary64 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh upward binary64 0x5.093b474177e9cp+0 : 0x4.cef428659e24cp+4 : inexact-ok += cosh downward intel96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh tonearest intel96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh towardzero intel96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh upward intel96 0x5.093b474177e9cp+0 : 0x4.cef428659e248008p+4 : inexact-ok += cosh downward m68k96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh tonearest m68k96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh towardzero m68k96 0x5.093b474177e9cp+0 : 0x4.cef428659e248p+4 : inexact-ok += cosh upward m68k96 0x5.093b474177e9cp+0 : 0x4.cef428659e248008p+4 : inexact-ok += cosh downward binary128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267523ep+4 : inexact-ok += cosh tonearest binary128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267523e4p+4 : inexact-ok += cosh towardzero binary128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267523ep+4 : inexact-ok += cosh upward binary128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267523e4p+4 : inexact-ok += cosh downward ibm128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267522p+4 : inexact-ok += cosh tonearest ibm128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267524p+4 : inexact-ok += cosh towardzero ibm128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267522p+4 : inexact-ok += cosh upward ibm128 0x5.093b474177e9cp+0 : 0x4.cef428659e2480012c38267524p+4 : inexact-ok +cosh 0x1.41a83b901d5bdp+2 += cosh downward binary32 0x5.06a0fp+0 : 0x4.c28098p+4 : inexact-ok += cosh tonearest binary32 0x5.06a0fp+0 : 0x4.c280ap+4 : inexact-ok += cosh towardzero binary32 0x5.06a0fp+0 : 0x4.c28098p+4 : inexact-ok += cosh upward binary32 0x5.06a0fp+0 : 0x4.c280ap+4 : inexact-ok += cosh downward binary64 0x5.06a0fp+0 : 0x4.c2809ebb13c34p+4 : inexact-ok += cosh tonearest binary64 0x5.06a0fp+0 : 0x4.c2809ebb13c38p+4 : inexact-ok += cosh towardzero binary64 0x5.06a0fp+0 : 0x4.c2809ebb13c34p+4 : inexact-ok += cosh upward binary64 0x5.06a0fp+0 : 0x4.c2809ebb13c38p+4 : inexact-ok += cosh downward intel96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh tonearest intel96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh towardzero intel96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh upward intel96 0x5.06a0fp+0 : 0x4.c2809ebb13c362e8p+4 : inexact-ok += cosh downward m68k96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh tonearest m68k96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh towardzero m68k96 0x5.06a0fp+0 : 0x4.c2809ebb13c362ep+4 : inexact-ok += cosh upward m68k96 0x5.06a0fp+0 : 0x4.c2809ebb13c362e8p+4 : inexact-ok += cosh downward binary128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bd4cp+4 : inexact-ok += cosh tonearest binary128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bd5p+4 : inexact-ok += cosh towardzero binary128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bd4cp+4 : inexact-ok += cosh upward binary128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bd5p+4 : inexact-ok += cosh downward ibm128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bcp+4 : inexact-ok += cosh tonearest ibm128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bep+4 : inexact-ok += cosh towardzero ibm128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bcp+4 : inexact-ok += cosh upward ibm128 0x5.06a0fp+0 : 0x4.c2809ebb13c362e0e60f23b1bep+4 : inexact-ok += cosh downward binary32 0x5.06a0e8p+0 : 0x4.c28078p+4 : inexact-ok += cosh tonearest binary32 0x5.06a0e8p+0 : 0x4.c28078p+4 : inexact-ok += cosh towardzero binary32 0x5.06a0e8p+0 : 0x4.c28078p+4 : inexact-ok += cosh upward binary32 0x5.06a0e8p+0 : 0x4.c2808p+4 : inexact-ok += cosh downward binary64 0x5.06a0e8p+0 : 0x4.c28078a7e68bp+4 : inexact-ok += cosh tonearest binary64 0x5.06a0e8p+0 : 0x4.c28078a7e68bp+4 : inexact-ok += cosh towardzero binary64 0x5.06a0e8p+0 : 0x4.c28078a7e68bp+4 : inexact-ok += cosh upward binary64 0x5.06a0e8p+0 : 0x4.c28078a7e68b4p+4 : inexact-ok += cosh downward intel96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh tonearest intel96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh towardzero intel96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh upward intel96 0x5.06a0e8p+0 : 0x4.c28078a7e68b193p+4 : inexact-ok += cosh downward m68k96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh tonearest m68k96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh towardzero m68k96 0x5.06a0e8p+0 : 0x4.c28078a7e68b1928p+4 : inexact-ok += cosh upward m68k96 0x5.06a0e8p+0 : 0x4.c28078a7e68b193p+4 : inexact-ok += cosh downward binary128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996119ap+4 : inexact-ok += cosh tonearest binary128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996119ap+4 : inexact-ok += cosh towardzero binary128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996119ap+4 : inexact-ok += cosh upward binary128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996119a4p+4 : inexact-ok += cosh downward ibm128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996118p+4 : inexact-ok += cosh tonearest ibm128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a865799611ap+4 : inexact-ok += cosh towardzero ibm128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a8657996118p+4 : inexact-ok += cosh upward ibm128 0x5.06a0e8p+0 : 0x4.c28078a7e68b192a865799611ap+4 : inexact-ok += cosh downward binary64 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh tonearest binary64 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh towardzero binary64 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh upward binary64 0x5.06a0ee40756f4p+0 : 0x4.c280966910af4p+4 : inexact-ok += cosh downward intel96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh tonearest intel96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh towardzero intel96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh upward intel96 0x5.06a0ee40756f4p+0 : 0x4.c280966910af0008p+4 : inexact-ok += cosh downward m68k96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh tonearest m68k96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh towardzero m68k96 0x5.06a0ee40756f4p+0 : 0x4.c280966910afp+4 : inexact-ok += cosh upward m68k96 0x5.06a0ee40756f4p+0 : 0x4.c280966910af0008p+4 : inexact-ok += cosh downward binary128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfbacp+4 : inexact-ok += cosh tonearest binary128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfbbp+4 : inexact-ok += cosh towardzero binary128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfbacp+4 : inexact-ok += cosh upward binary128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfbbp+4 : inexact-ok += cosh downward ibm128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfap+4 : inexact-ok += cosh tonearest ibm128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfcp+4 : inexact-ok += cosh towardzero ibm128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfap+4 : inexact-ok += cosh upward ibm128 0x5.06a0ee40756f4p+0 : 0x4.c280966910af000028c5b44dfcp+4 : inexact-ok +cosh 0x1.40d5c37ff8185p+2 += cosh downward binary32 0x5.03571p+0 : 0x4.b2f37p+4 : inexact-ok += cosh tonearest binary32 0x5.03571p+0 : 0x4.b2f378p+4 : inexact-ok += cosh towardzero binary32 0x5.03571p+0 : 0x4.b2f37p+4 : inexact-ok += cosh upward binary32 0x5.03571p+0 : 0x4.b2f378p+4 : inexact-ok += cosh downward binary64 0x5.03571p+0 : 0x4.b2f3753486e64p+4 : inexact-ok += cosh tonearest binary64 0x5.03571p+0 : 0x4.b2f3753486e64p+4 : inexact-ok += cosh towardzero binary64 0x5.03571p+0 : 0x4.b2f3753486e64p+4 : inexact-ok += cosh upward binary64 0x5.03571p+0 : 0x4.b2f3753486e68p+4 : inexact-ok += cosh downward intel96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh tonearest intel96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh towardzero intel96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh upward intel96 0x5.03571p+0 : 0x4.b2f3753486e6432p+4 : inexact-ok += cosh downward m68k96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh tonearest m68k96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh towardzero m68k96 0x5.03571p+0 : 0x4.b2f3753486e64318p+4 : inexact-ok += cosh upward m68k96 0x5.03571p+0 : 0x4.b2f3753486e6432p+4 : inexact-ok += cosh downward binary128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef6829925p+4 : inexact-ok += cosh tonearest binary128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef6829925p+4 : inexact-ok += cosh towardzero binary128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef6829925p+4 : inexact-ok += cosh upward binary128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef68299254p+4 : inexact-ok += cosh downward ibm128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef682992p+4 : inexact-ok += cosh tonearest ibm128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef682992p+4 : inexact-ok += cosh towardzero ibm128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef682992p+4 : inexact-ok += cosh upward ibm128 0x5.03571p+0 : 0x4.b2f3753486e6431841ef682994p+4 : inexact-ok += cosh downward binary32 0x5.035708p+0 : 0x4.b2f348p+4 : inexact-ok += cosh tonearest binary32 0x5.035708p+0 : 0x4.b2f35p+4 : inexact-ok += cosh towardzero binary32 0x5.035708p+0 : 0x4.b2f348p+4 : inexact-ok += cosh upward binary32 0x5.035708p+0 : 0x4.b2f35p+4 : inexact-ok += cosh downward binary64 0x5.035708p+0 : 0x4.b2f34f9dc5c04p+4 : inexact-ok += cosh tonearest binary64 0x5.035708p+0 : 0x4.b2f34f9dc5c04p+4 : inexact-ok += cosh towardzero binary64 0x5.035708p+0 : 0x4.b2f34f9dc5c04p+4 : inexact-ok += cosh upward binary64 0x5.035708p+0 : 0x4.b2f34f9dc5c08p+4 : inexact-ok += cosh downward intel96 0x5.035708p+0 : 0x4.b2f34f9dc5c05218p+4 : inexact-ok += cosh tonearest intel96 0x5.035708p+0 : 0x4.b2f34f9dc5c0522p+4 : inexact-ok += cosh towardzero intel96 0x5.035708p+0 : 0x4.b2f34f9dc5c05218p+4 : inexact-ok += cosh upward intel96 0x5.035708p+0 : 0x4.b2f34f9dc5c0522p+4 : inexact-ok += cosh downward m68k96 0x5.035708p+0 : 0x4.b2f34f9dc5c05218p+4 : inexact-ok += cosh tonearest m68k96 0x5.035708p+0 : 0x4.b2f34f9dc5c0522p+4 : inexact-ok += cosh towardzero m68k96 0x5.035708p+0 : 0x4.b2f34f9dc5c05218p+4 : inexact-ok += cosh upward m68k96 0x5.035708p+0 : 0x4.b2f34f9dc5c0522p+4 : inexact-ok += cosh downward binary128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb501fcp+4 : inexact-ok += cosh tonearest binary128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb502p+4 : inexact-ok += cosh towardzero binary128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb501fcp+4 : inexact-ok += cosh upward binary128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb502p+4 : inexact-ok += cosh downward ibm128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb5p+4 : inexact-ok += cosh tonearest ibm128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb502p+4 : inexact-ok += cosh towardzero ibm128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb5p+4 : inexact-ok += cosh upward ibm128 0x5.035708p+0 : 0x4.b2f34f9dc5c0521d84b3bbb502p+4 : inexact-ok += cosh downward binary64 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh tonearest binary64 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh towardzero binary64 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh upward binary64 0x5.03570dffe0614p+0 : 0x4.b2f36bce41eecp+4 : inexact-ok += cosh downward intel96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh tonearest intel96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh towardzero intel96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh upward intel96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8008p+4 : inexact-ok += cosh downward m68k96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh tonearest m68k96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh towardzero m68k96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8p+4 : inexact-ok += cosh upward m68k96 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee8008p+4 : inexact-ok += cosh downward binary128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288b4p+4 : inexact-ok += cosh tonearest binary128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288b4p+4 : inexact-ok += cosh towardzero binary128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288b4p+4 : inexact-ok += cosh upward binary128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288b8p+4 : inexact-ok += cosh downward ibm128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288p+4 : inexact-ok += cosh tonearest ibm128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288p+4 : inexact-ok += cosh towardzero ibm128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba288p+4 : inexact-ok += cosh upward ibm128 0x5.03570dffe0614p+0 : 0x4.b2f36bce41ee800040f77ba28ap+4 : inexact-ok +cosh 0x1.426a50e51bd1ep+2 += cosh downward binary32 0x5.09a948p+0 : 0x4.d10578p+4 : inexact-ok += cosh tonearest binary32 0x5.09a948p+0 : 0x4.d1058p+4 : inexact-ok += cosh towardzero binary32 0x5.09a948p+0 : 0x4.d10578p+4 : inexact-ok += cosh upward binary32 0x5.09a948p+0 : 0x4.d1058p+4 : inexact-ok += cosh downward binary64 0x5.09a948p+0 : 0x4.d1057f2772a24p+4 : inexact-ok += cosh tonearest binary64 0x5.09a948p+0 : 0x4.d1057f2772a28p+4 : inexact-ok += cosh towardzero binary64 0x5.09a948p+0 : 0x4.d1057f2772a24p+4 : inexact-ok += cosh upward binary64 0x5.09a948p+0 : 0x4.d1057f2772a28p+4 : inexact-ok += cosh downward intel96 0x5.09a948p+0 : 0x4.d1057f2772a269ep+4 : inexact-ok += cosh tonearest intel96 0x5.09a948p+0 : 0x4.d1057f2772a269e8p+4 : inexact-ok += cosh towardzero intel96 0x5.09a948p+0 : 0x4.d1057f2772a269ep+4 : inexact-ok += cosh upward intel96 0x5.09a948p+0 : 0x4.d1057f2772a269e8p+4 : inexact-ok += cosh downward m68k96 0x5.09a948p+0 : 0x4.d1057f2772a269ep+4 : inexact-ok += cosh tonearest m68k96 0x5.09a948p+0 : 0x4.d1057f2772a269e8p+4 : inexact-ok += cosh towardzero m68k96 0x5.09a948p+0 : 0x4.d1057f2772a269ep+4 : inexact-ok += cosh upward m68k96 0x5.09a948p+0 : 0x4.d1057f2772a269e8p+4 : inexact-ok += cosh downward binary128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2ecp+4 : inexact-ok += cosh tonearest binary128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2fp+4 : inexact-ok += cosh towardzero binary128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2ecp+4 : inexact-ok += cosh upward binary128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2fp+4 : inexact-ok += cosh downward ibm128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2p+4 : inexact-ok += cosh tonearest ibm128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2p+4 : inexact-ok += cosh towardzero ibm128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f2p+4 : inexact-ok += cosh upward ibm128 0x5.09a948p+0 : 0x4.d1057f2772a269e5e93d5f15f4p+4 : inexact-ok += cosh downward binary32 0x5.09a94p+0 : 0x4.d10558p+4 : inexact-ok += cosh tonearest binary32 0x5.09a94p+0 : 0x4.d10558p+4 : inexact-ok += cosh towardzero binary32 0x5.09a94p+0 : 0x4.d10558p+4 : inexact-ok += cosh upward binary32 0x5.09a94p+0 : 0x4.d1056p+4 : inexact-ok += cosh downward binary64 0x5.09a94p+0 : 0x4.d10558a01bdfcp+4 : inexact-ok += cosh tonearest binary64 0x5.09a94p+0 : 0x4.d10558a01bep+4 : inexact-ok += cosh towardzero binary64 0x5.09a94p+0 : 0x4.d10558a01bdfcp+4 : inexact-ok += cosh upward binary64 0x5.09a94p+0 : 0x4.d10558a01bep+4 : inexact-ok += cosh downward intel96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh tonearest intel96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh towardzero intel96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh upward intel96 0x5.09a94p+0 : 0x4.d10558a01bdff468p+4 : inexact-ok += cosh downward m68k96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh tonearest m68k96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh towardzero m68k96 0x5.09a94p+0 : 0x4.d10558a01bdff46p+4 : inexact-ok += cosh upward m68k96 0x5.09a94p+0 : 0x4.d10558a01bdff468p+4 : inexact-ok += cosh downward binary128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713f6cp+4 : inexact-ok += cosh tonearest binary128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713f7p+4 : inexact-ok += cosh towardzero binary128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713f6cp+4 : inexact-ok += cosh upward binary128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713f7p+4 : inexact-ok += cosh downward ibm128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713ep+4 : inexact-ok += cosh tonearest ibm128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f714p+4 : inexact-ok += cosh towardzero ibm128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f713ep+4 : inexact-ok += cosh upward ibm128 0x5.09a94p+0 : 0x4.d10558a01bdff462740c7f714p+4 : inexact-ok += cosh downward binary64 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh tonearest binary64 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh towardzero binary64 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh upward binary64 0x5.09a943946f478p+0 : 0x4.d10569ddbbf64p+4 : inexact-ok += cosh downward intel96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh tonearest intel96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh towardzero intel96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh upward intel96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60008p+4 : inexact-ok += cosh downward m68k96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh tonearest m68k96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh towardzero m68k96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf6p+4 : inexact-ok += cosh upward m68k96 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60008p+4 : inexact-ok += cosh downward binary128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da480974cp+4 : inexact-ok += cosh tonearest binary128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da480975p+4 : inexact-ok += cosh towardzero binary128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da480974cp+4 : inexact-ok += cosh upward binary128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da480975p+4 : inexact-ok += cosh downward ibm128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da48096p+4 : inexact-ok += cosh tonearest ibm128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da48098p+4 : inexact-ok += cosh towardzero ibm128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da48096p+4 : inexact-ok += cosh upward ibm128 0x5.09a943946f478p+0 : 0x4.d10569ddbbf60000094da48098p+4 : inexact-ok +cosh -0x1.41311766f07f6p+2 += cosh downward binary32 -0x5.04c458p+0 : 0x4.b9ac9p+4 : inexact-ok += cosh tonearest binary32 -0x5.04c458p+0 : 0x4.b9ac9p+4 : inexact-ok += cosh towardzero binary32 -0x5.04c458p+0 : 0x4.b9ac9p+4 : inexact-ok += cosh upward binary32 -0x5.04c458p+0 : 0x4.b9ac98p+4 : inexact-ok += cosh downward binary64 -0x5.04c458p+0 : 0x4.b9ac90a84443cp+4 : inexact-ok += cosh tonearest binary64 -0x5.04c458p+0 : 0x4.b9ac90a84443cp+4 : inexact-ok += cosh towardzero binary64 -0x5.04c458p+0 : 0x4.b9ac90a84443cp+4 : inexact-ok += cosh upward binary64 -0x5.04c458p+0 : 0x4.b9ac90a84444p+4 : inexact-ok += cosh downward intel96 -0x5.04c458p+0 : 0x4.b9ac90a84443c66p+4 : inexact-ok += cosh tonearest intel96 -0x5.04c458p+0 : 0x4.b9ac90a84443c66p+4 : inexact-ok += cosh towardzero intel96 -0x5.04c458p+0 : 0x4.b9ac90a84443c66p+4 : inexact-ok += cosh upward intel96 -0x5.04c458p+0 : 0x4.b9ac90a84443c668p+4 : inexact-ok += cosh downward m68k96 -0x5.04c458p+0 : 0x4.b9ac90a84443c66p+4 : inexact-ok += cosh tonearest m68k96 -0x5.04c458p+0 : 0x4.b9ac90a84443c66p+4 : inexact-ok += cosh towardzero m68k96 -0x5.04c458p+0 : 0x4.b9ac90a84443c66p+4 : inexact-ok += cosh upward m68k96 -0x5.04c458p+0 : 0x4.b9ac90a84443c668p+4 : inexact-ok += cosh downward binary128 -0x5.04c458p+0 : 0x4.b9ac90a84443c66064cd523852acp+4 : inexact-ok += cosh tonearest binary128 -0x5.04c458p+0 : 0x4.b9ac90a84443c66064cd523852bp+4 : inexact-ok += cosh towardzero binary128 -0x5.04c458p+0 : 0x4.b9ac90a84443c66064cd523852acp+4 : inexact-ok += cosh upward binary128 -0x5.04c458p+0 : 0x4.b9ac90a84443c66064cd523852bp+4 : inexact-ok += cosh downward ibm128 -0x5.04c458p+0 : 0x4.b9ac90a84443c66064cd523852p+4 : inexact-ok += cosh tonearest ibm128 -0x5.04c458p+0 : 0x4.b9ac90a84443c66064cd523852p+4 : inexact-ok += cosh towardzero ibm128 -0x5.04c458p+0 : 0x4.b9ac90a84443c66064cd523852p+4 : inexact-ok += cosh upward ibm128 -0x5.04c458p+0 : 0x4.b9ac90a84443c66064cd523854p+4 : inexact-ok += cosh downward binary32 -0x5.04c46p+0 : 0x4.b9acbp+4 : inexact-ok += cosh tonearest binary32 -0x5.04c46p+0 : 0x4.b9acb8p+4 : inexact-ok += cosh towardzero binary32 -0x5.04c46p+0 : 0x4.b9acbp+4 : inexact-ok += cosh upward binary32 -0x5.04c46p+0 : 0x4.b9acb8p+4 : inexact-ok += cosh downward binary64 -0x5.04c46p+0 : 0x4.b9acb674d0a9p+4 : inexact-ok += cosh tonearest binary64 -0x5.04c46p+0 : 0x4.b9acb674d0a9p+4 : inexact-ok += cosh towardzero binary64 -0x5.04c46p+0 : 0x4.b9acb674d0a9p+4 : inexact-ok += cosh upward binary64 -0x5.04c46p+0 : 0x4.b9acb674d0a94p+4 : inexact-ok += cosh downward intel96 -0x5.04c46p+0 : 0x4.b9acb674d0a9008p+4 : inexact-ok += cosh tonearest intel96 -0x5.04c46p+0 : 0x4.b9acb674d0a9008p+4 : inexact-ok += cosh towardzero intel96 -0x5.04c46p+0 : 0x4.b9acb674d0a9008p+4 : inexact-ok += cosh upward intel96 -0x5.04c46p+0 : 0x4.b9acb674d0a90088p+4 : inexact-ok += cosh downward m68k96 -0x5.04c46p+0 : 0x4.b9acb674d0a9008p+4 : inexact-ok += cosh tonearest m68k96 -0x5.04c46p+0 : 0x4.b9acb674d0a9008p+4 : inexact-ok += cosh towardzero m68k96 -0x5.04c46p+0 : 0x4.b9acb674d0a9008p+4 : inexact-ok += cosh upward m68k96 -0x5.04c46p+0 : 0x4.b9acb674d0a90088p+4 : inexact-ok += cosh downward binary128 -0x5.04c46p+0 : 0x4.b9acb674d0a90083aebc0322ff4cp+4 : inexact-ok += cosh tonearest binary128 -0x5.04c46p+0 : 0x4.b9acb674d0a90083aebc0322ff4cp+4 : inexact-ok += cosh towardzero binary128 -0x5.04c46p+0 : 0x4.b9acb674d0a90083aebc0322ff4cp+4 : inexact-ok += cosh upward binary128 -0x5.04c46p+0 : 0x4.b9acb674d0a90083aebc0322ff5p+4 : inexact-ok += cosh downward ibm128 -0x5.04c46p+0 : 0x4.b9acb674d0a90083aebc0322fep+4 : inexact-ok += cosh tonearest ibm128 -0x5.04c46p+0 : 0x4.b9acb674d0a90083aebc0323p+4 : inexact-ok += cosh towardzero ibm128 -0x5.04c46p+0 : 0x4.b9acb674d0a90083aebc0322fep+4 : inexact-ok += cosh upward ibm128 -0x5.04c46p+0 : 0x4.b9acb674d0a90083aebc0323p+4 : inexact-ok += cosh downward binary64 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh tonearest binary64 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh towardzero binary64 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh upward binary64 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b984p+4 : inexact-ok += cosh downward intel96 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh tonearest intel96 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh towardzero intel96 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh upward intel96 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b980008p+4 : inexact-ok += cosh downward m68k96 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh tonearest m68k96 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh towardzero m68k96 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b98p+4 : inexact-ok += cosh upward m68k96 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b980008p+4 : inexact-ok += cosh downward binary128 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b9800000056edb592f8p+4 : inexact-ok += cosh tonearest binary128 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b9800000056edb592fcp+4 : inexact-ok += cosh towardzero binary128 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b9800000056edb592f8p+4 : inexact-ok += cosh upward binary128 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b9800000056edb592fcp+4 : inexact-ok += cosh downward ibm128 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b9800000056edb592p+4 : inexact-ok += cosh tonearest ibm128 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b9800000056edb592p+4 : inexact-ok += cosh towardzero ibm128 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b9800000056edb592p+4 : inexact-ok += cosh upward ibm128 -0x5.04c45d9bc1fd8p+0 : 0x4.b9acab280b9800000056edb594p+4 : inexact-ok diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile index e53bb0c5cd..d96a326baa 100644 --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -8,6 +8,7 @@ long-double-fcts = yes ifeq ($(subdir),math) # The CORE-MATH implementation assumes FLT_EVAL_METHOD == 0 to provide # correctly rounded results. +CFLAGS-e_cosh.c += -fexcess-precision=standard CFLAGS-e_lgamma_r.c += -fexcess-precision=standard CFLAGS-e_gamma_r.c += -fexcess-precision=standard CFLAGS-s_erf.c += -fexcess-precision=standard diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index 73ebc71611..fc924644f6 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -24,6 +24,11 @@ float: 1 Function: "cbrt_upward": float: 1 +# sysdeps/ieee754/dbl-64/e_cosh.c shows 1ulp error even with +# -fexcess-precision=standard. +Function: "cosh": +double: 1 + # sysdeps/i386/fpu/s_asinh.S is not correctly rounded Function: "asinh": double: 1 diff --git a/sysdeps/ieee754/dbl-64/e_cosh.c b/sysdeps/ieee754/dbl-64/e_cosh.c index 1c92081676..4454076434 100644 --- a/sysdeps/ieee754/dbl-64/e_cosh.c +++ b/sysdeps/ieee754/dbl-64/e_cosh.c @@ -1,85 +1,474 @@ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* __ieee754_cosh(x) - * Method : - * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2 - * 1. Replace x by |x| (cosh(x) = cosh(-x)). - * 2. - * [ exp(x) - 1 ]^2 - * 0 <= x <= ln2/2 : cosh(x) := 1 + ------------------- - * 2*exp(x) - * - * exp(x) + 1/exp(x) - * ln2/2 <= x <= 22 : cosh(x) := ------------------- - * 2 - * 22 <= x <= lnovft : cosh(x) := exp(x)/2 - * lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2) - * ln2ovft < x : cosh(x) := huge*huge (overflow) - * - * Special cases: - * cosh(x) is |x| if x is +INF, -INF, or NaN. - * only cosh(0)=1 is exact for finite x. - */ +/* Correctly rounded hyperbolic cosine for binary64 values. + +Copyright (c) 2023-2026 Alexei Sibidanov. + +The original version of this file was copied from the CORE-MATH +project (file src/binary64/cosh/cosh.c, revision 5d0c89d5). + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ #include -#include -#include #include +#include +#include "math_config.h" -static const double one = 1.0, half=0.5, huge = 1.0e300; +static __attribute__ ((noinline)) double as_cosh_database (double, double); + +static inline double +polydd_cosh (double xh, double xl, int n, const double c[][2], double *l) +{ + int i = n - 1; + double ch, cl, e; + ch = fasttwosum (c[i][0], *l, &cl); + cl += c[i][1]; + while (--i >= 0) + { + ch = muldd2 (xh, xl, ch, cl, &cl); + ch = fasttwosum (c[i][0], ch, &e); + cl = (cl + c[i][1]) + e; + } + *l = cl; + return ch; +} + +static double __attribute__ ((cold, noinline)) +as_exp_accurate (double x, double t, double th, double tl, double *l) +{ + static const double ch[][2] = + { + { 0x1p+0, 0x1.6c16bd194535dp-94 }, + { 0x1p-1, -0x1.8259d904fd34fp-93 }, + { 0x1.5555555555555p-3, 0x1.53e93e9f26e62p-57 } + }; + const double l2h = 0x1.62e42ffp-13, l2l = 0x1.718432a1b0e26p-47, + l2ll = 0x1.9ff0342542fc3p-102; + double dx = x - l2h * t, dxl = l2l * t, dxll = l2ll * t + fma (l2l, t, -dxl); + double dxh = dx + dxl; + dxl = ((dx - dxh) + dxl) + dxll; + double fl = dxh + * (0x1.5555555555555p-5 + + dxh * (0x1.11111113e93e9p-7 + dxh * 0x1.6c16c169400a7p-10)); + double fh = polydd (dxh, dxl, 3, ch, &fl); + fh = muldd2 (dxh, dxl, fh, fl, &fl); + fh = muldd2 (th, tl, fh, fl, &fl); + double zh = th + fh, zl = (th - zh) + fh; + double uh = zh + tl, ul = ((zh - uh) + tl) + zl; + double vh = uh + fl, vl = ((uh - vh) + fl) + ul; + *l = vl; + return vh; +} + +static double __attribute__ ((noinline)) +as_cosh_zero (double x) +{ + static const double ch[][2] = + { + { 0x1p-1, -0x1.c7e8db669f624p-111 }, // degree 2 + { 0x1.5555555555555p-5, 0x1.5555555556135p-59 }, // degree 4 + { 0x1.6c16c16c16c17p-10, -0x1.f49f4a6e838f2p-65 }, // degree 6 + { 0x1.a01a01a01a01ap-16, 0x1.a4ffbe15316aap-76 } // degree 8 + }; + static const double cl[] = + { + 0x1.27e4fb7789f5cp-22, // degree 10 + 0x1.1eed8eff9089cp-29, // degree 12 + 0x1.939749ce13dadp-37, // degree 14 + 0x1.ae9891efb6691p-45 // degree 16 + }; + double x2 = x * x, x2l = fma (x, x, -x2); + double y2 = x2 * (cl[0] + x2 * (cl[1] + x2 * (cl[2] + x2 * cl[3]))); + double y1 = polydd (x2, x2l, 4, ch, &y2); + y1 = muldd2 (y1, y2, x2, x2l, &y2); + double y0 = fasttwosum (1.0, y1, &y1); + y1 = fasttwosum (y1, y2, &y2); + uint64_t t = asuint64 (y1); + if (__glibc_unlikely (!(t & MANTISSA_MASK))) + { + uint64_t w = asuint64 (y2); + if ((w ^ t) >> 63) + t--; + else + t++; + y1 = asdouble (t); + } + if (__glibc_unlikely ((t & MANTISSA_MASK) == MANTISSA_MASK)) + return as_cosh_database (x, y0 + y1); + return y0 + y1; +} + +static __attribute__ ((noinline)) double +as_cosh_database (double x, double f) +{ + static const double db[][3] = + { + { 0x1.9a5e3cbe1985ep-4, 0x1.01492f72f984bp+0, -0x1p-107 }, + { 0x1.52a11832e847dp-3, 0x1.0381e68cac923p+0, 0x1p-104 }, + { 0x1.bf0305e2c6c37p-3, 0x1.061f4c39e16f2p+0, 0x1p-107 }, + { 0x1.17326ffc09f68p-2, 0x1.099318a43ac8p+0, 0x1p-104 }, + { 0x1.3d27bf16d8bdbp-2, 0x1.0c6091056e06ap+0, -0x1p-107 }, + { 0x1.03923f2b47c07p-1, 0x1.219c1989e3373p+0, -0x1p-54 }, + { 0x1.a6031cd5f93bap-1, 0x1.5bff041b260fep+0, -0x1p-107 }, + { 0x1.104b648f113a1p+0, 0x1.9efdca62b700ap+0, -0x1p-109 }, + { 0x1.1585720f35cd9p+0, 0x1.a5bf3acfde4b2p+0, 0x1p-105 }, + { 0x1.e9cc7ed2e1a7ep+0, 0x1.bb0ff220d8eb5p+1, -0x1p-53 }, + { 0x1.43180ea854696p+1, 0x1.91f1122b6b63ap+2, 0x1p-102 }, + { 0x1.725811dcf6782p+2, 0x1.45ea160ddc71fp+7, -0x1p-100 }, + { 0x1.5afd56f7d565bp+3, 0x1.8ff8e0ccea7cp+14, 0x1p-90 }, + { 0x1.759a2ad4c4d56p+3, 0x1.cb62eec26bd78p+15, -0x1p-92 }, + { 0x1.7fce95ea5c653p+3, 0x1.3bf8009648dcp+16, 0x1p-88 }, + { 0x1.743d5609348acp+4, 0x1.7a87a8bb7fa28p+32, -0x1p-22 }, + { 0x1.e07e71bfcf06fp+5, 0x1.91ec4412c344fp+85, 0x1p-24 }, + { 0x1.6474c604cc0d7p+6, 0x1.7a8f65ad009bdp+127, -0x1p+20 }, + { 0x1.54cd1fea7663ap+7, 0x1.c90810d354618p+244, 0x1p+135 }, + { 0x1.2da9e5e6af0bp+8, 0x1.27d6fe867d6f6p+434, 0x1p+329 }, + { 0x1.d6479eba7c971p+8, 0x1.62a88613629b6p+677, -0x1p+568 }, + }; + int a = 0, b = sizeof (db) / sizeof (db[0]) - 1, m = (a + b) / 2; + double ax = fabs (x); + while (a <= b) + { + if (db[m][0] < ax) + a = m + 1; + else if (db[m][0] == ax) + { + f = db[m][1] + db[m][2]; + break; + } + else + b = m - 1; + m = (a + b) / 2; + } + return f; +} double __ieee754_cosh (double x) { - double t,w; - int32_t ix; - - /* High word of |x|. */ - GET_HIGH_WORD(ix,x); - ix &= 0x7fffffff; - - /* |x| in [0,22] */ - if (ix < 0x40360000) { - /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */ - if(ix<0x3fd62e43) { - if (ix<0x3c800000) /* cosh(tiny) = 1 */ - return one; - t = __expm1(fabs(x)); - w = one+t; - return one+(t*t)/(w+w); - } - - /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */ - t = __ieee754_exp(fabs(x)); - return half*t+half/t; - } + /* + The function cosh(x) is approximated by a minimax polynomial + cosh(x)~1+x^2*P(x^2) for |x|<0.125. For other arguments the + identity cosh(x)=(exp(|x|)+exp(-|x|))/2 is used. For |x|<5 both + exponents are calculated with slightly higher precision than + double. For 5<|x|<36.736801 the exp(-|x|) is rather small and is + calculated with double precision but exp(|x|) is calculated with + higher than double precision. For 36.736801<|x|<710.47586 + exp(-|x|) becomes too small and only exp(|x|) is calculated. + */ + static const double t0[][2] = + { + { 0x0p+0, 0x1p+0 }, + { -0x1.19083535b085ep-56, 0x1.02c9a3e778061p+0 }, + { 0x1.d73e2a475b466p-55, 0x1.059b0d3158574p+0 }, + { 0x1.186be4bb285p-57, 0x1.0874518759bc8p+0 }, + { 0x1.8a62e4adc610ap-54, 0x1.0b5586cf9890fp+0 }, + { 0x1.03a1727c57b52p-59, 0x1.0e3ec32d3d1a2p+0 }, + { -0x1.6c51039449b3ap-54, 0x1.11301d0125b51p+0 }, + { -0x1.32fbf9af1369ep-54, 0x1.1429aaea92dep+0 }, + { -0x1.19041b9d78a76p-55, 0x1.172b83c7d517bp+0 }, + { 0x1.e5b4c7b4968e4p-55, 0x1.1a35beb6fcb75p+0 }, + { 0x1.e016e00a2643cp-54, 0x1.1d4873168b9aap+0 }, + { 0x1.dc775814a8494p-55, 0x1.2063b88628cd6p+0 }, + { 0x1.9b07eb6c70572p-54, 0x1.2387a6e756238p+0 }, + { 0x1.2bd339940e9dap-55, 0x1.26b4565e27cddp+0 }, + { 0x1.612e8afad1256p-55, 0x1.29e9df51fdee1p+0 }, + { 0x1.0024754db41d4p-54, 0x1.2d285a6e4030bp+0 }, + { 0x1.6f46ad23182e4p-55, 0x1.306fe0a31b715p+0 }, + { 0x1.32721843659a6p-54, 0x1.33c08b26416ffp+0 }, + { -0x1.63aeabf42eae2p-54, 0x1.371a7373aa9cbp+0 }, + { -0x1.5e436d661f5e2p-56, 0x1.3a7db34e59ff7p+0 }, + { 0x1.ada0911f09ebcp-55, 0x1.3dea64c123422p+0 }, + { -0x1.ef3691c309278p-58, 0x1.4160a21f72e2ap+0 }, + { 0x1.89b7a04ef80dp-59, 0x1.44e086061892dp+0 }, + { 0x1.3c1a3b69062fp-56, 0x1.486a2b5c13cdp+0 }, + { 0x1.d4397afec42e2p-56, 0x1.4bfdad5362a27p+0 }, + { -0x1.4b309d25957e4p-54, 0x1.4f9b2769d2ca7p+0 }, + { -0x1.07abe1db13cacp-55, 0x1.5342b569d4f82p+0 }, + { 0x1.9bb2c011d93acp-54, 0x1.56f4736b527dap+0 }, + { 0x1.6324c054647acp-54, 0x1.5ab07dd485429p+0 }, + { 0x1.ba6f93080e65ep-54, 0x1.5e76f15ad2148p+0 }, + { -0x1.383c17e40b496p-54, 0x1.6247eb03a5585p+0 }, + { -0x1.bb60987591c34p-54, 0x1.6623882552225p+0 }, + { -0x1.bdd3413b26456p-54, 0x1.6a09e667f3bcdp+0 }, + { -0x1.bbe3a683c88aap-57, 0x1.6dfb23c651a2fp+0 }, + { -0x1.16e4786887a9ap-55, 0x1.71f75e8ec5f74p+0 }, + { -0x1.0245957316dd4p-54, 0x1.75feb564267c9p+0 }, + { -0x1.41577ee04993p-55, 0x1.7a11473eb0187p+0 }, + { 0x1.05d02ba15797ep-56, 0x1.7e2f336cf4e62p+0 }, + { -0x1.d4c1dd41532d8p-54, 0x1.82589994cce13p+0 }, + { -0x1.fc6f89bd4f6bap-54, 0x1.868d99b4492edp+0 }, + { 0x1.6e9f156864b26p-54, 0x1.8ace5422aa0dbp+0 }, + { 0x1.5cc13a2e3976cp-55, 0x1.8f1ae99157736p+0 }, + { -0x1.75fc781b57ebcp-57, 0x1.93737b0cdc5e5p+0 }, + { -0x1.d185b7c1b85dp-54, 0x1.97d829fde4e5p+0 }, + { 0x1.c7c46b071f2bep-56, 0x1.9c49182a3f09p+0 }, + { -0x1.359495d1cd532p-54, 0x1.a0c667b5de565p+0 }, + { -0x1.d2f6edb8d41e2p-54, 0x1.a5503b23e255dp+0 }, + { 0x1.0fac90ef7fd32p-54, 0x1.a9e6b5579fdbfp+0 }, + { 0x1.7a1cd345dcc82p-54, 0x1.ae89f995ad3adp+0 }, + { -0x1.2805e3084d708p-57, 0x1.b33a2b84f15fbp+0 }, + { -0x1.5584f7e54ac3ap-56, 0x1.b7f76f2fb5e47p+0 }, + { 0x1.23dd07a2d9e84p-55, 0x1.bcc1e904bc1d2p+0 }, + { 0x1.11065895048dep-55, 0x1.c199bdd85529cp+0 }, + { 0x1.2884dff483cacp-54, 0x1.c67f12e57d14bp+0 }, + { 0x1.503cbd1e949dcp-56, 0x1.cb720dcef9069p+0 }, + { -0x1.cbc3743797a9cp-54, 0x1.d072d4a07897cp+0 }, + { 0x1.2ed02d75b3706p-55, 0x1.d5818dcfba487p+0 }, + { 0x1.c2300696db532p-54, 0x1.da9e603db3285p+0 }, + { -0x1.1a5cd4f184b5cp-54, 0x1.dfc97337b9b5fp+0 }, + { 0x1.39e8980a9cc9p-55, 0x1.e502ee78b3ff6p+0 }, + { -0x1.e9c23179c2894p-54, 0x1.ea4afa2a490dap+0 }, + { 0x1.dc7f486a4b6bp-54, 0x1.efa1bee615a27p+0 }, + { 0x1.9d3e12dd8a18ap-54, 0x1.f50765b6e454p+0 }, + { 0x1.74853f3a5931ep-55, 0x1.fa7c1819e90d8p+0 } + }; + static const double t1[][2] = + { + { 0x0p+0, 0x1p+0 }, + { 0x1.ae8e38c59c72ap-54, 0x1.000b175effdc7p+0 }, + { -0x1.7b5d0d58ea8f4p-58, 0x1.00162f3904052p+0 }, + { 0x1.4115cb6b16a8ep-54, 0x1.0021478e11ce6p+0 }, + { -0x1.d7c96f201bb2ep-55, 0x1.002c605e2e8cfp+0 }, + { 0x1.84711d4c35eap-54, 0x1.003779a95f959p+0 }, + { -0x1.0484245243778p-55, 0x1.0042936faa3d8p+0 }, + { -0x1.4b237da2025fap-54, 0x1.004dadb113dap+0 }, + { -0x1.5e00e62d6b30ep-56, 0x1.0058c86da1c0ap+0 }, + { 0x1.a1d6cedbb948p-54, 0x1.0063e3a559473p+0 }, + { -0x1.4acf197a00142p-54, 0x1.006eff583fc3dp+0 }, + { -0x1.eaf2ea42391a6p-57, 0x1.007a1b865a8cap+0 }, + { 0x1.da93f90835f76p-56, 0x1.0085382faef83p+0 }, + { -0x1.6a79084ab093cp-55, 0x1.00905554425d4p+0 }, + { 0x1.86364f8fbe8f8p-54, 0x1.009b72f41a12bp+0 }, + { -0x1.82e8e14e3110ep-55, 0x1.00a6910f3b6fdp+0 }, + { -0x1.4f6b2a7609f72p-55, 0x1.00b1afa5abcbfp+0 }, + { -0x1.e1a258ea8f71ap-56, 0x1.00bcceb7707ecp+0 }, + { 0x1.4362ca5bc26f2p-56, 0x1.00c7ee448ee02p+0 }, + { 0x1.095a56c919d02p-54, 0x1.00d30e4d0c483p+0 }, + { -0x1.406ac4e81a646p-57, 0x1.00de2ed0ee0f5p+0 }, + { 0x1.b5a6902767e08p-54, 0x1.00e94fd0398ep+0 }, + { -0x1.91b206085932p-54, 0x1.00f4714af41d3p+0 }, + { 0x1.427068ab22306p-55, 0x1.00ff93412315cp+0 }, + { 0x1.c1d0660524e08p-54, 0x1.010ab5b2cbd11p+0 }, + { -0x1.e7bdfb3204be8p-54, 0x1.0115d89ff3a8bp+0 }, + { 0x1.843aa8b9cbbc6p-55, 0x1.0120fc089ff63p+0 }, + { -0x1.34104ee7edae8p-56, 0x1.012c1fecd613bp+0 }, + { -0x1.2b6aeb6176892p-56, 0x1.0137444c9b5b5p+0 }, + { 0x1.a8cd33b8a1bb2p-56, 0x1.01426927f5278p+0 }, + { 0x1.2edc08e5da99ap-56, 0x1.014d8e7ee8d2fp+0 }, + { 0x1.57ba2dc7e0c72p-55, 0x1.0158b4517bb88p+0 }, + { 0x1.b61299ab8cdb8p-54, 0x1.0163da9fb3335p+0 }, + { -0x1.90565902c5f44p-54, 0x1.016f0169949edp+0 }, + { 0x1.70fc41c5c2d54p-55, 0x1.017a28af25567p+0 }, + { 0x1.4b9a6e145d76cp-54, 0x1.018550706ab62p+0 }, + { -0x1.008eff5142bfap-56, 0x1.019078ad6a19fp+0 }, + { -0x1.77669f033c7dep-54, 0x1.019ba16628de2p+0 }, + { -0x1.09bb78eeead0ap-54, 0x1.01a6ca9aac5f3p+0 }, + { 0x1.371231477ece6p-54, 0x1.01b1f44af9f9ep+0 }, + { 0x1.5e7626621eb5ap-56, 0x1.01bd1e77170b4p+0 }, + { -0x1.bc72b100828a4p-54, 0x1.01c8491f08f08p+0 }, + { -0x1.ce39cbbab8bbep-57, 0x1.01d37442d507p+0 }, + { 0x1.16996709da2e2p-55, 0x1.01de9fe280ac8p+0 }, + { -0x1.c11f5239bf536p-55, 0x1.01e9cbfe113efp+0 }, + { 0x1.e1d4eb5edc6b4p-55, 0x1.01f4f8958c1c6p+0 }, + { -0x1.afb99946ee3fp-54, 0x1.020025a8f6a35p+0 }, + { -0x1.8f06d8a148a32p-54, 0x1.020b533856324p+0 }, + { -0x1.2bf310fc54eb6p-55, 0x1.02168143b0281p+0 }, + { -0x1.c95a035eb4176p-54, 0x1.0221afcb09e3ep+0 }, + { -0x1.491793e46834cp-54, 0x1.022cdece68c4fp+0 }, + { -0x1.3e8d0d9c4909p-56, 0x1.02380e4dd22adp+0 }, + { -0x1.314aa16278aa4p-54, 0x1.02433e494b755p+0 }, + { 0x1.48daf888e965p-55, 0x1.024e6ec0da046p+0 }, + { 0x1.56dc8046821f4p-55, 0x1.02599fb483385p+0 }, + { 0x1.45b42356b9d46p-54, 0x1.0264d1244c719p+0 }, + { -0x1.082ef51b61d7ep-56, 0x1.027003103b10ep+0 }, + { 0x1.2106ed0920a34p-56, 0x1.027b357854772p+0 }, + { -0x1.fd4cf26ea5d0ep-54, 0x1.0286685c9e059p+0 }, + { -0x1.09f8775e78084p-54, 0x1.02919bbd1d1d8p+0 }, + { 0x1.64cbba902ca28p-58, 0x1.029ccf99d720ap+0 }, + { 0x1.4383ef231d206p-54, 0x1.02a803f2d170dp+0 }, + { 0x1.4a47a505b3a46p-54, 0x1.02b338c811703p+0 }, + { 0x1.e47120223468p-54, 0x1.02be6e199c811p+0 }, + }; - /* |x| in [22, log(maxdouble)] return half*exp(|x|) */ - if (ix < 0x40862e42) return half*__ieee754_exp(fabs(x)); - - /* |x| in [log(maxdouble), overflowthresold] */ - int64_t fix; - EXTRACT_WORDS64(fix, x); - fix &= UINT64_C(0x7fffffffffffffff); - if (fix <= UINT64_C(0x408633ce8fb9f87d)) { - w = __ieee754_exp(half*fabs(x)); - t = half*w; - return t*w; + const double s = 0x1.71547652b82fep+12; + double ax = fabs (x), v0 = fma (ax, s, 0x1.8000002p+26); + uint64_t jt = asuint64 (v0); + uint64_t v = asuint64 (v0); + uint64_t tt = ~((1 << 26) - 1l); + v &= tt; + double t = asdouble (v) - 0x1.8p26; + uint64_t aix = asuint64 (ax); + if (__glibc_unlikely (aix < UINT64_C(0x3fc0000000000000))) + { // |x| < 0.125 + if (__glibc_unlikely (aix + < UINT64_C(0x3e50000000000000))) // |x| < 0x1p-26 + return fma (ax, 0x1p-55, 1); + /* q(x) = 1 + c0*x^2 + c1*x^4 + c2*x^6 + c3*x^8 + c4*x^10 is a degree-10 + polynomial approximating cosh(x) on [2^-26, 0.125] such that: + |q(x) - cosh(x)| < 2^-67.518 * x^2. + This polynomial was generated with the following Sollya command: + d = [2^-26,0.125]; + q=1+x^2*fpminimax((cosh(x)-1)/x^2, [|0,2,4,6,8|], [|53...|], d, + absolute); + */ + static const double c[] = + { + 0x1p-1, 0x1.5555555555554p-5, 0x1.6c16c16c1d0cp-10, + 0x1.a01a0075066b4p-16, 0x1.27faff8dcc1c8p-22 + }; + double x2 = x * x, x4 = x2 * x2, + p + = x2 + * ((c[0] + x2 * c[1]) + x4 * ((c[2] + x2 * c[3]) + x4 * c[4])); + // fails with e = x2*(0x1.c8p-52), x=0x1.0f0a7d6ea89ep-14 (rndu, no FMA) + double e = x2 * 0x1.84p-51, lb = 1 + (p - e), ub = 1 + (p + e); + if (lb == ub) + return lb; + return as_cosh_zero (x); + } + + // treat large values apart to avoid a spurious invalid exception + if (__glibc_unlikely (aix > UINT64_C(0x408633ce8fb9f87d))) + { + // |x| > 0x1.633ce8fb9f87dp+9 + if (aix > UINT64_C(0x7ff0000000000000)) + return x + x; // nan + if (aix == UINT64_C(0x7ff0000000000000)) + return fabs (x); // inf + return __math_oflow (0); + } + + // now 0.125 <= |x| <= 0x1.633ce8fb9f87dp+9 + /* exhaustive tests: + 0.25 <= x < 2: done + 2 <= x < 4: nancy (gr10) + 4 <= x < 8: nancy + 8 <= x < 16: explor + */ + int64_t il = ((uint64_t) jt << 14) >> 40, jl = -il; + int64_t i1 = il & 0x3f, i0 = (il >> 6) & 0x3f, ie = il >> 12; + int64_t j1 = jl & 0x3f, j0 = (jl >> 6) & 0x3f, je = jl >> 12; + double sp = asdouble ((uint64_t) (1022 + ie) << 52), + sm = asdouble ((uint64_t) (1022 + je) << 52); + double t0h = t0[i0][1], t0l = t0[i0][0]; + double t1h = t1[i1][1], t1l = t1[i1][0]; + double th = t0h * t1h, tl = t0h * t1l + t1h * t0l + fma (t0h, t1h, -th); + const double l2h = 0x1.62e42ffp-13, l2l = 0x1.718432a1b0e26p-47; + double dx = (ax - l2h * t) + l2l * t, dx2 = dx * dx, mx = -dx; + static const double ch[] + = { 0x1p+0, 0x1p-1, 0x1.5555555aaaaaep-3, 0x1.55555551c98cp-5 }; + double pp = dx * ((ch[0] + dx * ch[1]) + dx2 * (ch[2] + dx * ch[3])); + double rh, rl; + if (__glibc_unlikely (aix > UINT64_C(0x4014000000000000))) + { // |x| > 5 + if (__glibc_unlikely (aix > UINT64_C(0x40425e4f7b2737fa))) + { // |x| >~ 36.736801 + sp = asdouble ((1021 + ie) << 52); + rh = th; + rl = tl + th * pp; + double e = 0x1.1b578c96db19bp-63 * th, lb = rh + (rl - e), + ub = rh + (rl + e); + if (lb == ub) + return (lb * sp) * 2; + + th = as_exp_accurate (ax, t, th, tl, &tl); + th = fasttwosum (th, tl, &tl); + uint64_t uh = asuint64 (th), ul = asuint64 (tl); + int64_t eh = (uh >> MANTISSA_WIDTH) & 0x7ff, + el = (ul >> MANTISSA_WIDTH) & 0x7ff, + ml = (ul + 8) & MANTISSA_MASK; + th += tl; + th *= 2; + th *= sp; + /* if the exponent difference between eh and el is larger than 103, + or if the last bits from ml are <= 8 in absolute value, + call the accurate path */ + if (ml <= 16 || eh - el > 103) + return as_cosh_database (x, th); + return th; } + double q0h = t0[j0][1], q1h = t1[j1][1], qh = q0h * q1h; + th *= sp; + tl *= sp; + qh *= sm; + double pm = mx * ((ch[0] + mx * ch[1]) + dx2 * (ch[2] + mx * ch[3])); + double em = qh + qh * pm; + rh = th; + rl = (tl + em) + th * pp; - /* x is INF or NaN */ - if(ix>=0x7ff00000) return x*x; + double e = 0x1.202p-63 * rh, lb = rh + (rl - e), ub = rh + (rl + e); + // fails with e = 0x1.afbp-64*rh and x=0x1.4173941572a71p+2 (rndz) + if (lb == ub) + return lb; + + th = as_exp_accurate (ax, t, th, tl, &tl); + if (__glibc_unlikely (aix > UINT64_C(0x403f666666666666))) + { + // |x| > 0x1.f666666666666p+4 + rh = th + qh; + rl = ((th - rh) + qh) + tl; + } + else + { + qh = q0h * q1h; + double q0l = t0[j0][0], q1l = t1[j1][0]; + double ql = q0h * q1l + q1h * q0l + fma (q0h, q1h, -qh); + qh *= sm; + ql *= sm; + qh = as_exp_accurate (-ax, -t, qh, ql, &ql); + rh = th + qh; + rl = (((th - rh) + qh) + ql) + tl; + } + } + else + { // |x| <= 5 + double q0h = t0[j0][1], q0l = t0[j0][0]; + double q1h = t1[j1][1], q1l = t1[j1][0]; + double qh = q0h * q1h, ql = q0h * q1l + q1h * q0l + fma (q0h, q1h, -qh); + th *= sp; + tl *= sp; + qh *= sm; + ql *= sm; + double pm = mx * ((ch[0] + mx * ch[1]) + dx2 * (ch[2] + mx * ch[3])); + double fph = th, fpl = tl + th * pp; + double fmh = qh, fml = ql + qh * pm; - /* |x| > overflowthresold, cosh(x) overflow */ - return math_narrow_eval (huge * huge); + rh = fph + fmh; + rl = ((fph - rh) + fmh) + fml + fpl; + double e = 0x1.c0ap-62 * rh, lb = rh + (rl - e), ub = rh + (rl + e); + // fails with e = 0x1.855p-64*rh and x=0x1.dbf464fbc8795p+0 (rndz, no + // fma) + if (lb == ub) + return lb; + th = as_exp_accurate (ax, t, th, tl, &tl); + qh = as_exp_accurate (-ax, -t, qh, ql, &ql); + rh = th + qh; + rl = ((th - rh) + qh) + ql + tl; + } + rh = fasttwosum (rh, rl, &rl); + uint64_t uh = asuint64 (rh), ul = asuint64 (rl); + int64_t eh = (uh >> MANTISSA_WIDTH) & 0x7ff, + el = (ul >> MANTISSA_WIDTH) & 0x7ff, + ml = (ul + 8) & MANTISSA_MASK; + rh += rl; + if (__glibc_unlikely (ml <= 16 || eh - el > 103)) + return as_cosh_database (x, rh); + return rh; } libm_alias_finite (__ieee754_cosh, __cosh) diff --git a/sysdeps/ieee754/dbl-64/libm-test-ulps b/sysdeps/ieee754/dbl-64/libm-test-ulps index 9cf877eac5..3330db5a3e 100644 --- a/sysdeps/ieee754/dbl-64/libm-test-ulps +++ b/sysdeps/ieee754/dbl-64/libm-test-ulps @@ -35,6 +35,18 @@ double: 0 Function: "atanh_upward": double: 0 +Function: "cosh": +double: 0 + +Function: "cosh_downward": +double: 0 + +Function: "cosh_towardzero": +double: 0 + +Function: "cosh_upward": +double: 0 + Function: "erf": double: 0