diff options
author | Pierre Blanchard <pierre.blanchard@arm.com> | 2020-10-29 15:50:19 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2020-10-29 16:36:28 +0000 |
commit | 1a79237df2fc1020ccce8528ed54977681302752 (patch) | |
tree | ecc2bbb51711e7cd12e36658e9f3c47d401b8139 /math/erff_data.c | |
parent | 0f4ae0c5b561de25acb10130fd5e473ec038f89d (diff) | |
download | arm-optimized-routines-1a79237df2fc1020ccce8528ed54977681302752.tar.gz |
math: add scalar erff.
In round-to-nearest mode the maximum error is 1.09 ULP.
Compared to glibc-2.28 erff: throughput is about 2.2x better,
latency is about 1.5x better on some AArch64 cores (on random
input in [-4,4]).
There are further optimization and quality improvement opportunities.
Diffstat (limited to 'math/erff_data.c')
-rw-r--r-- | math/erff_data.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/math/erff_data.c b/math/erff_data.c new file mode 100644 index 0000000..fa6b1ef --- /dev/null +++ b/math/erff_data.c @@ -0,0 +1,22 @@ +/* + * Data for approximation of erff. + * + * Copyright (c) 2019-2020, Arm Limited. + * SPDX-License-Identifier: MIT + */ + +#include "math_config.h" + +/* Minimax approximation of erff. */ +const struct erff_data __erff_data = { +.erff_poly_A = { +0x1.06eba6p-03f, -0x1.8126e0p-02f, 0x1.ce1a46p-04f, +-0x1.b68bd2p-06f, 0x1.473f48p-08f, -0x1.3a1a82p-11f +}, +.erff_poly_B = { +0x1.079d0cp-3f, 0x1.450aa0p-1f, 0x1.b55cb0p-4f, +-0x1.8d6300p-6f, 0x1.fd1336p-9f, -0x1.91d2ccp-12f, +0x1.222900p-16f +} +}; + |