Lines Matching +full:ulp +full:- +full:allow
2 * Double-precision vector erf(x) function.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
22 .third = V2 (0x1.5555555555556p-2), /* used to compute 2/3 and 1/6 too. */
23 .two_over_fifteen = V2 (0x1.1111111111111p-3),
24 .tenth = V2 (-0x1.999999999999ap-4),
25 .two_over_five = V2 (-0x1.999999999999ap-2),
26 .two_over_nine = V2 (-0x1.c71c71c71c71cp-3),
27 .two_over_fortyfive = V2 (0x1.6c16c16c16c17p-5),
28 .max = V2 (5.9921875), /* 6 - 1/128. */
32 .tiny_bound = V2 (0x1p-226),
33 .scale_minus_one = V2 (0x1.06eba8214db69p-3), /* 2/sqrt(pi) - 1.0. */
56 /* Double-precision implementation of vector erf(x).
59 Let d = x - r, and scale = 2 / sqrt(pi) * exp(-r^2). For x near r,
63 - r d
64 + 1/3 (2 r^2 - 1) d^2
65 - 1/6 (r (2 r^2 - 3)) d^3
66 + 1/30 (4 r^4 - 12 r^2 + 3) d^4
67 - 1/90 (4 r^4 - 20 r^2 + 15) d^5
70 Maximum measure error: 2.29 ULP
71 V_NAME_D1 (erf)(-0x1.00003c924e5d1p-8) got -0x1.20dd59132ebadp-8
72 want -0x1.20dd59132ebafp-8. */
80 uint64x2_t a_le_max = vcleq_f64 (a, dat->max); in V_NAME_D1()
81 uint64x2_t a_gt_max = vcgtq_f64 (a, dat->max); in V_NAME_D1()
85 uint64x2_t cmp1 = vcgtq_f64 (a, dat->huge_bound); in V_NAME_D1()
86 uint64x2_t cmp2 = vcltq_f64 (a, dat->tiny_bound); in V_NAME_D1()
89 values and retain a copy of a to allow special case handler to fix special in V_NAME_D1()
100 float64x2_t shift = dat->shift; in V_NAME_D1()
121 = vfmsq_f64 (dat->third, r2, vaddq_f64 (dat->third, dat->third)); in V_NAME_D1()
122 float64x2_t p3 = vmulq_f64 (r, vfmaq_f64 (v_f64 (-0.5), r2, dat->third)); in V_NAME_D1()
123 float64x2_t p4 = vfmaq_f64 (dat->two_over_five, r2, dat->two_over_fifteen); in V_NAME_D1()
124 p4 = vfmsq_f64 (dat->tenth, r2, p4); in V_NAME_D1()
125 float64x2_t p5 = vfmaq_f64 (dat->two_over_nine, r2, dat->two_over_fortyfive); in V_NAME_D1()
126 p5 = vmulq_f64 (r, vfmaq_f64 (vmulq_f64 (v_f64 (0.5), dat->third), r2, p5)); in V_NAME_D1()
147 return vbslq_f64 (cmp2, vfmaq_f64 (x, dat->scale_minus_one, x), y); in V_NAME_D1()
153 PL_SIG (V, D, 1, erf, -6.0, 6.0)