Lines Matching +full:ulp +full:- +full:allow

2  * Double-precision vector 10^x function.
4 * Copyright (c) 2023-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
15 #define SpecialBound 306.0 /* floor (log10 (2^1023)) - 1. */
28 rel error: 0x1.5ddf8f28p-54
29 abs error: 0x1.5ed266c8p-54 in [ -log10(2)/256, log10(2)/256 ]
30 maxerr: 1.14432 +0.5 ulp. */
34 .log2_10_hi = V2 (0x1.34413509f79ffp-9), /* log2(10)/N. */
35 .log2_10_lo = V2 (-0x1.9dc1da994fd21p-66),
44 #define IndexMask v_u64 (N - 1)
48 # define TinyBound v_u64 (0x2000000000000000) /* asuint64 (0x1p-511). */
50 # define Thres v_u64 (0x2070000000000000) /* BigBound - TinyBound. */
65 # define SpecialBias2 v_u64 (0x3010000000000000) /* 0x1p-254. */
76 uint64x2_t cmp = vcagtq_f64 (n, d->scale_thresh); in special_case()
85 Maximum measured error is 1.64 ulp.
93 /* If any lanes are special, mask them with 1 and retain a copy of x to allow in V_NAME_D1()
102 cmp = vcageq_f64 (x, d->special_bound); in V_NAME_D1()
106 float64x2_t z = vfmaq_f64 (d->shift, x, d->log10_2); in V_NAME_D1()
108 float64x2_t n = vsubq_f64 (z, d->shift); in V_NAME_D1()
110 /* r = x - n*log10(2)/N. */ in V_NAME_D1()
112 r = vfmsq_f64 (r, d->log2_10_hi, n); in V_NAME_D1()
113 r = vfmsq_f64 (r, d->log2_10_lo, n); in V_NAME_D1()
115 uint64x2_t e = vshlq_n_u64 (u, 52 - V_EXP_TABLE_BITS); in V_NAME_D1()
118 /* y = exp10(r) - 1 ~= C0 r + C1 r^2 + C2 r^3 + C3 r^4. */ in V_NAME_D1()
120 float64x2_t p = vfmaq_f64 (d->poly[0], r, d->poly[1]); in V_NAME_D1()
121 float64x2_t y = vfmaq_f64 (d->poly[2], r, d->poly[3]); in V_NAME_D1()
140 TEST_SIG (S, D, 1, exp10, -9.9, 9.9)
141 TEST_SIG (V, D, 1, exp10, -9.9, 9.9)