Lines Matching +full:ulp +full:- +full:0
2 * Double-precision acosh(x) function.
4 * Copyright (c) 2022-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
13 #define Ln2 (0x1.62e42fefa39efp-1)
14 #define MinusZero (0x8000000000000000)
15 #define SquareLim (0x5fe0000000000000) /* asuint64(0x1.0p511). */
16 #define Two (0x4000000000000000) /* asuint64(2.0). */
20 acosh(x) = ln(x + sqrt(x * x - 1)).
22 x >= 2^511: We cannot square x without overflow. For huge x, sqrt(x*x - 1)
24 ln(2). The greatest observed error in this region is 0.98 ULP:
25 acosh(0x1.1b9bf42923d1dp+853) got 0x1.28066a11a7c7fp+9
26 want 0x1.28066a11a7c8p+9.
29 observed error in this region is 1.33 ULP:
30 acosh(0x1.1e45d14bfcfa2p+1) got 0x1.71a06f50c34b5p+0
31 want 0x1.71a06f50c34b6p+0.
33 0 <= x <= 2: Calculate the result using log1p. For x < 1, acosh(x) is
34 undefined. For 1 <= x <= 2, the largest observed error is 2.69 ULP:
35 acosh(0x1.073528248093p+0) got 0x1.e4d9bd20684f3p-3
36 want 0x1.e4d9bd20684f6p-3. */
49 return log (x + sqrt (x * x - 1)); in acosh()
51 double xm1 = x - 1; in acosh()
57 TEST_INTERVAL (acosh, 0, 1, 10000)
59 TEST_INTERVAL (acosh, 2, 0x1p511, 100000)
60 TEST_INTERVAL (acosh, 0x1p511, inf, 100000)
61 TEST_INTERVAL (acosh, -0, -inf, 10000)