xref: /aosp_15_r20/external/arm-optimized-routines/pl/math/asinh_data.c (revision 412f47f9e737e10ed5cc46ec6a8d7fa2264f8a14)
1*412f47f9SXin Li /*
2*412f47f9SXin Li  * Double-precision polynomial coefficients for scalar asinh(x)
3*412f47f9SXin Li  *
4*412f47f9SXin Li  * Copyright (c) 2022-2023, Arm Limited.
5*412f47f9SXin Li  * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
6*412f47f9SXin Li  */
7*412f47f9SXin Li 
8*412f47f9SXin Li #include "math_config.h"
9*412f47f9SXin Li 
10*412f47f9SXin Li /* asinh(x) is odd, and the first term of the Taylor expansion is x, so we can
11*412f47f9SXin Li    approximate the function by x + x^3 * P(x^2), where P(z) has the form:
12*412f47f9SXin Li    C0 + C1 * z + C2 * z^2 + C3 * z^3 + ...
13*412f47f9SXin Li    Note P is evaluated on even powers of x only. See tools/asinh.sollya for the
14*412f47f9SXin Li    algorithm used to generate these coefficients.  */
15*412f47f9SXin Li const struct asinh_data __asinh_data
16*412f47f9SXin Li   = {.poly
17*412f47f9SXin Li      = {-0x1.55555555554a7p-3, 0x1.3333333326c7p-4, -0x1.6db6db68332e6p-5,
18*412f47f9SXin Li 	0x1.f1c71b26fb40dp-6, -0x1.6e8b8b654a621p-6, 0x1.1c4daa9e67871p-6,
19*412f47f9SXin Li 	-0x1.c9871d10885afp-7, 0x1.7a16e8d9d2ecfp-7, -0x1.3ddca533e9f54p-7,
20*412f47f9SXin Li 	0x1.0becef748dafcp-7, -0x1.b90c7099dd397p-8, 0x1.541f2bb1ffe51p-8,
21*412f47f9SXin Li 	-0x1.d217026a669ecp-9, 0x1.0b5c7977aaf7p-9, -0x1.e0f37daef9127p-11,
22*412f47f9SXin Li 	0x1.388b5fe542a6p-12, -0x1.021a48685e287p-14, 0x1.93d4ba83d34dap-18}};
23