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

2  * Double-precision vector erf(x) function.
4 * Copyright (c) 2023-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
24 .third = V2 (0x1.5555555555556p-2), /* used to compute 2/3 and 1/6 too. */
25 .two_over_fifteen = 0x1.1111111111111p-3,
26 .tenth = V2 (-0x1.999999999999ap-4),
27 .two_over_five = V2 (-0x1.999999999999ap-2),
28 .two_over_nine = V2 (-0x1.c71c71c71c71cp-3),
29 .two_over_fortyfive = 0x1.6c16c16c16c17p-5,
30 .max = V2 (5.9921875), /* 6 - 1/128. */
34 .tiny_bound = V2 (0x1p-226),
35 .scale_minus_one = V2 (0x1.06eba8214db69p-3), /* 2/sqrt(pi) - 1.0. */
58 /* Double-precision implementation of vector erf(x).
61 Let d = x - r, and scale = 2 / sqrt(pi) * exp(-r^2). For x near r,
65 - r d
66 + 1/3 (2 r^2 - 1) d^2
67 - 1/6 (r (2 r^2 - 3)) d^3
68 + 1/30 (4 r^4 - 12 r^2 + 3) d^4
69 - 1/90 (4 r^4 - 20 r^2 + 15) d^5
72 Maximum measure error: 2.29 ULP
73 V_NAME_D1 (erf)(-0x1.00003c924e5d1p-8) got -0x1.20dd59132ebadp-8
74 want -0x1.20dd59132ebafp-8. */
82 uint64x2_t a_le_max = vcaleq_f64 (x, dat->max); in V_NAME_D1()
83 uint64x2_t a_gt_max = vcagtq_f64 (x, dat->max); in V_NAME_D1()
87 uint64x2_t cmp1 = vcgtq_f64 (a, dat->huge_bound); in V_NAME_D1()
88 uint64x2_t cmp2 = vcltq_f64 (a, dat->tiny_bound); in V_NAME_D1()
91 values and retain a copy of a to allow special case handler to fix special in V_NAME_D1()
102 float64x2_t shift = dat->shift; in V_NAME_D1()
110 i = vbslq_u64 (a_le_max, i, dat->max_idx); in V_NAME_D1()
121 = vld1q_f64 (&dat->two_over_fifteen); in V_NAME_D1()
126 = vfmsq_f64 (dat->third, r2, vaddq_f64 (dat->third, dat->third)); in V_NAME_D1()
127 float64x2_t p3 = vmulq_f64 (r, vfmaq_f64 (v_f64 (-0.5), r2, dat->third)); in V_NAME_D1()
128 float64x2_t p4 = vfmaq_laneq_f64 (dat->two_over_five, r2, in V_NAME_D1()
130 p4 = vfmsq_f64 (dat->tenth, r2, p4); in V_NAME_D1()
131 float64x2_t p5 = vfmaq_laneq_f64 (dat->two_over_nine, r2, in V_NAME_D1()
133 p5 = vmulq_f64 (r, vfmaq_f64 (vmulq_f64 (v_f64 (0.5), dat->third), r2, p5)); in V_NAME_D1()
154 return vbslq_f64 (cmp2, vfmaq_f64 (x, dat->scale_minus_one, x), y); in V_NAME_D1()
160 TEST_SIG (V, D, 1, erf, -6.0, 6.0)