From 9e97f239eae1f2b1d2e694d844c0f6fd7c4dd271 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Thu, 7 Jan 2021 15:26:26 +0000 Subject: Remove dbl-64/wordsize-64 (part 2) Remove the wordsize-64 implementations by merging them into the main dbl-64 directory. The second patch just moves all wordsize-64 files and removes a few wordsize-64 uses in comments and Implies files. Reviewed-by: Adhemerval Zanella --- sysdeps/ieee754/dbl-64/e_acosh.c | 50 +++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'sysdeps/ieee754/dbl-64/e_acosh.c') diff --git a/sysdeps/ieee754/dbl-64/e_acosh.c b/sysdeps/ieee754/dbl-64/e_acosh.c index 75df0ab..a241366 100644 --- a/sysdeps/ieee754/dbl-64/e_acosh.c +++ b/sysdeps/ieee754/dbl-64/e_acosh.c @@ -1,4 +1,4 @@ -/* @(#)e_acosh.c 5.1 93/09/24 */ +/* Optimized for 64-bit by Ulrich Drepper , 2012 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -29,42 +29,40 @@ #include static const double - one = 1.0, - ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ +one = 1.0, +ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ double __ieee754_acosh (double x) { - double t; - int32_t hx; - uint32_t lx; - EXTRACT_WORDS (hx, lx, x); - if (hx < 0x3ff00000) /* x < 1 */ - { - return (x - x) / (x - x); - } - else if (hx >= 0x41b00000) /* x > 2**28 */ + int64_t hx; + EXTRACT_WORDS64 (hx, x); + + if (hx > INT64_C (0x4000000000000000)) { - if (hx >= 0x7ff00000) /* x is inf of NaN */ + if (__glibc_unlikely (hx >= INT64_C (0x41b0000000000000))) { - return x + x; + /* x > 2**28 */ + if (hx >= INT64_C (0x7ff0000000000000)) + /* x is inf of NaN */ + return x + x; + else + return __ieee754_log (x) + ln2;/* acosh(huge)=log(2x) */ } - else - return __ieee754_log (x) + ln2; /* acosh(huge)=log(2x) */ - } - else if (((hx - 0x3ff00000) | lx) == 0) - { - return 0.0; /* acosh(1) = 0 */ - } - else if (hx > 0x40000000) /* 2**28 > x > 2 */ - { - t = x * x; + + /* 2**28 > x > 2 */ + double t = x * x; return __ieee754_log (2.0 * x - one / (x + sqrt (t - one))); } - else /* 1 INT64_C (0x3ff0000000000000))) { - t = x - one; + /* 1