diff options
author | Szabolcs Nagy <nsz@port70.net> | 2017-10-22 14:19:20 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-04-17 23:42:38 -0400 |
commit | db505b794c697631f65e6b91ff106496debb86ac (patch) | |
tree | 2a1b54ce3017522a6f7b0d4e76e3cedfa1629889 /src/math/logf_data.c | |
parent | 169fc008d8daf5265847c593b1c78f3513d9172b (diff) | |
download | musl-db505b794c697631f65e6b91ff106496debb86ac.tar.gz musl-db505b794c697631f65e6b91ff106496debb86ac.tar.bz2 musl-db505b794c697631f65e6b91ff106496debb86ac.tar.xz musl-db505b794c697631f65e6b91ff106496debb86ac.zip |
math: new logf
from https://github.com/ARM-software/optimized-routines,
commit 04884bd04eac4b251da4026900010ea7d8850edc,
with minor changes to better fit into musl.
code size change: +289 bytes.
benchmark on x86_64 before, after, speedup:
-Os:
logf rthruput: 8.40 ns/call 6.14 ns/call 1.37x
logf latency: 31.79 ns/call 24.33 ns/call 1.31x
-O3:
logf rthruput: 8.43 ns/call 5.58 ns/call 1.51x
logf latency: 32.04 ns/call 20.88 ns/call 1.53x
Diffstat (limited to 'src/math/logf_data.c')
-rw-r--r-- | src/math/logf_data.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/math/logf_data.c b/src/math/logf_data.c new file mode 100644 index 00000000..857221f7 --- /dev/null +++ b/src/math/logf_data.c @@ -0,0 +1,33 @@ +/* + * Data definition for logf. + * + * Copyright (c) 2017-2018, Arm Limited. + * SPDX-License-Identifier: MIT + */ + +#include "logf_data.h" + +const struct logf_data __logf_data = { + .tab = { + { 0x1.661ec79f8f3bep+0, -0x1.57bf7808caadep-2 }, + { 0x1.571ed4aaf883dp+0, -0x1.2bef0a7c06ddbp-2 }, + { 0x1.49539f0f010bp+0, -0x1.01eae7f513a67p-2 }, + { 0x1.3c995b0b80385p+0, -0x1.b31d8a68224e9p-3 }, + { 0x1.30d190c8864a5p+0, -0x1.6574f0ac07758p-3 }, + { 0x1.25e227b0b8eap+0, -0x1.1aa2bc79c81p-3 }, + { 0x1.1bb4a4a1a343fp+0, -0x1.a4e76ce8c0e5ep-4 }, + { 0x1.12358f08ae5bap+0, -0x1.1973c5a611cccp-4 }, + { 0x1.0953f419900a7p+0, -0x1.252f438e10c1ep-5 }, + { 0x1p+0, 0x0p+0 }, + { 0x1.e608cfd9a47acp-1, 0x1.aa5aa5df25984p-5 }, + { 0x1.ca4b31f026aap-1, 0x1.c5e53aa362eb4p-4 }, + { 0x1.b2036576afce6p-1, 0x1.526e57720db08p-3 }, + { 0x1.9c2d163a1aa2dp-1, 0x1.bc2860d22477p-3 }, + { 0x1.886e6037841edp-1, 0x1.1058bc8a07ee1p-2 }, + { 0x1.767dcf5534862p-1, 0x1.4043057b6ee09p-2 }, + }, + .ln2 = 0x1.62e42fefa39efp-1, + .poly = { + -0x1.00ea348b88334p-2, 0x1.5575b0be00b6ap-2, -0x1.ffffef20a4123p-2, + } +}; |