Lines Matching +full:down +full:- +full:scaling

2  * Single-precision vector log(x + 1) function.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
18 } data = {.poly = {/* Do not store first term of polynomial, which is -0.5, as
19 this can be fmov-ed directly instead of including it in
20 the main load-and-mla polynomial schedule. */
21 0x1.5555aap-2f, -0x1.000038p-2f, 0x1.99675cp-3f,
22 -0x1.54ef78p-3f, 0x1.28a1f4p-3f, -0x1.0da91p-3f,
23 0x1.abcb6p-4f, -0x1.6f0d5ep-5f},
24 .ln2 = 0x1.62e43p-1f,
25 .exp_bias = 0x1p-23f,
37 /* Vector log1pf approximation using polynomial on reduced interval. Worst-case
39 _ZGVsMxv_log1pf(0x1.fffffep-2) got 0x1.9f324p-2
40 want 0x1.9f323ep-2. */
44 /* x < -1, Inf/Nan. */ in SV_NAME_F1()
46 special = svorn_z (pg, special, svcmpge (pg, x, -1)); in SV_NAME_F1()
49 is in [-0.25, 0.5]): in SV_NAME_F1()
58 /* Choose k to scale x to the range [-1/4, 1/2]. */ in SV_NAME_F1()
60 = svand_x (pg, svsub_x (pg, svreinterpret_s32 (m), d->three_quarters), in SV_NAME_F1()
68 fp32 number, and scale m down accordingly. */ in SV_NAME_F1()
69 svfloat32_t s = svreinterpret_f32 (svsubr_x (pg, k, d->four)); in SV_NAME_F1()
70 m_scale = svadd_x (pg, m_scale, svmla_x (pg, sv_f32 (-1), s, 0.25)); in SV_NAME_F1()
75 svfloat32_t p = sv_estrin_7_f32_x (pg, m_scale, ms2, ms4, d->poly); in SV_NAME_F1()
76 p = svmad_x (pg, m_scale, p, -0.5); in SV_NAME_F1()
79 /* The scale factor to be applied back at the end - by multiplying float(k) in SV_NAME_F1()
80 by 2^-23 we get the unbiased exponent of k. */ in SV_NAME_F1()
81 svfloat32_t scale_back = svmul_x (pg, svcvt_f32_x (pg, k), d->exp_bias); in SV_NAME_F1()
83 /* Apply the scaling back. */ in SV_NAME_F1()
84 svfloat32_t y = svmla_x (pg, p, scale_back, d->ln2); in SV_NAME_F1()
92 PL_SIG (SV, F, 1, log1p, -0.9, 10.0)
94 PL_TEST_SYM_INTERVAL (SV_NAME_F1 (log1p), 0, 0x1p-23, 5000)
95 PL_TEST_SYM_INTERVAL (SV_NAME_F1 (log1p), 0x1p-23, 1, 5000)
97 PL_TEST_INTERVAL (SV_NAME_F1 (log1p), -1, -inf, 10)