@zigc/lib 0.16.0-dev.3091 → 0.16.0-dev.3128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/c/math.zig +121 -30
- package/compiler/build_runner.zig +1 -0
- package/compiler/test_runner.zig +191 -59
- package/compiler_rt/cos.zig +141 -52
- package/compiler_rt/long_double.zig +37 -0
- package/compiler_rt/rem_pio2l.zig +173 -0
- package/compiler_rt/sin.zig +140 -55
- package/compiler_rt/sincos.zig +279 -72
- package/compiler_rt/tan.zig +118 -47
- package/compiler_rt/trig.zig +256 -6
- package/fuzzer.zig +855 -307
- package/package.json +1 -1
- package/std/Build/Fuzz.zig +6 -19
- package/std/Build/Step/Run.zig +530 -68
- package/std/Build/abi.zig +39 -7
- package/std/Build.zig +3 -0
- package/std/compress/flate/Compress.zig +3 -3
- package/std/debug/Info.zig +4 -0
- package/std/heap/ArenaAllocator.zig +145 -154
- package/std/mem/Allocator.zig +4 -5
- package/std/mem.zig +48 -0
- package/std/priority_dequeue.zig +13 -12
- package/std/priority_queue.zig +5 -4
- package/std/zig/Client.zig +8 -3
- package/std/zig/Server.zig +26 -0
- package/libc/mingw/complex/cabs.c +0 -48
- package/libc/mingw/complex/cabsf.c +0 -48
- package/libc/mingw/complex/cacos.c +0 -50
- package/libc/mingw/complex/cacosf.c +0 -50
- package/libc/mingw/complex/carg.c +0 -48
- package/libc/mingw/complex/cargf.c +0 -48
- package/libc/mingw/complex/casin.c +0 -50
- package/libc/mingw/complex/casinf.c +0 -50
- package/libc/mingw/complex/catan.c +0 -50
- package/libc/mingw/complex/catanf.c +0 -50
- package/libc/mingw/complex/ccos.c +0 -50
- package/libc/mingw/complex/ccosf.c +0 -50
- package/libc/mingw/complex/cexp.c +0 -48
- package/libc/mingw/complex/cexpf.c +0 -48
- package/libc/mingw/complex/cimag.c +0 -48
- package/libc/mingw/complex/cimagf.c +0 -48
- package/libc/mingw/complex/clog.c +0 -48
- package/libc/mingw/complex/clog10.c +0 -49
- package/libc/mingw/complex/clog10f.c +0 -49
- package/libc/mingw/complex/clogf.c +0 -48
- package/libc/mingw/complex/conj.c +0 -48
- package/libc/mingw/complex/conjf.c +0 -48
- package/libc/mingw/complex/cpow.c +0 -48
- package/libc/mingw/complex/cpowf.c +0 -48
- package/libc/mingw/complex/cproj.c +0 -48
- package/libc/mingw/complex/cprojf.c +0 -48
- package/libc/mingw/complex/creal.c +0 -48
- package/libc/mingw/complex/crealf.c +0 -48
- package/libc/mingw/complex/csin.c +0 -50
- package/libc/mingw/complex/csinf.c +0 -50
- package/libc/mingw/complex/csqrt.c +0 -48
- package/libc/mingw/complex/csqrtf.c +0 -48
- package/libc/mingw/complex/ctan.c +0 -50
- package/libc/mingw/complex/ctanf.c +0 -50
- package/libc/mingw/math/arm/s_rint.c +0 -86
- package/libc/mingw/math/arm/s_rintf.c +0 -51
- package/libc/mingw/math/arm/sincos.S +0 -30
- package/libc/mingw/math/arm-common/sincosl.c +0 -13
- package/libc/mingw/math/arm64/rint.c +0 -12
- package/libc/mingw/math/arm64/rintf.c +0 -12
- package/libc/mingw/math/arm64/sincos.S +0 -32
- package/libc/mingw/math/bsd_private_base.h +0 -148
- package/libc/mingw/math/frexpf.c +0 -13
- package/libc/mingw/math/frexpl.c +0 -71
- package/libc/mingw/math/x86/acosf.c +0 -29
- package/libc/mingw/math/x86/atanf.c +0 -23
- package/libc/mingw/math/x86/atanl.c +0 -18
- package/libc/mingw/math/x86/cos.def.h +0 -65
- package/libc/mingw/math/x86/cosl.c +0 -46
- package/libc/mingw/math/x86/cosl_internal.S +0 -55
- package/libc/mingw/math/x86/ldexp.c +0 -23
- package/libc/mingw/math/x86/scalbn.S +0 -41
- package/libc/mingw/math/x86/scalbnf.S +0 -40
- package/libc/mingw/math/x86/sin.def.h +0 -65
- package/libc/mingw/math/x86/sinl.c +0 -46
- package/libc/mingw/math/x86/sinl_internal.S +0 -58
- package/libc/mingw/math/x86/tanl.S +0 -62
- package/libc/mingw/misc/btowc.c +0 -28
- package/libc/mingw/misc/wcstof.c +0 -66
- package/libc/mingw/misc/wcstoimax.c +0 -132
- package/libc/mingw/misc/wcstoumax.c +0 -126
- package/libc/mingw/misc/wctob.c +0 -29
- package/libc/mingw/misc/winbs_uint64.c +0 -6
- package/libc/mingw/misc/winbs_ulong.c +0 -6
- package/libc/mingw/misc/winbs_ushort.c +0 -6
- package/libc/mingw/stdio/_Exit.c +0 -10
- package/libc/mingw/stdio/_findfirst64i32.c +0 -21
- package/libc/mingw/stdio/_findnext64i32.c +0 -21
- package/libc/mingw/stdio/_fstat64i32.c +0 -37
- package/libc/mingw/stdio/_stat64i32.c +0 -37
- package/libc/mingw/stdio/_wfindfirst64i32.c +0 -21
- package/libc/mingw/stdio/_wfindnext64i32.c +0 -21
- package/libc/mingw/stdio/_wstat64i32.c +0 -37
- package/libc/musl/src/legacy/valloc.c +0 -8
- package/libc/musl/src/math/__cosl.c +0 -96
- package/libc/musl/src/math/__sinl.c +0 -78
- package/libc/musl/src/math/__tanl.c +0 -143
- package/libc/musl/src/math/aarch64/lrint.c +0 -10
- package/libc/musl/src/math/aarch64/lrintf.c +0 -10
- package/libc/musl/src/math/aarch64/rintf.c +0 -7
- package/libc/musl/src/math/cosl.c +0 -39
- package/libc/musl/src/math/exp_data.c +0 -182
- package/libc/musl/src/math/exp_data.h +0 -26
- package/libc/musl/src/math/finite.c +0 -7
- package/libc/musl/src/math/finitef.c +0 -7
- package/libc/musl/src/math/frexp.c +0 -23
- package/libc/musl/src/math/frexpf.c +0 -23
- package/libc/musl/src/math/frexpl.c +0 -29
- package/libc/musl/src/math/i386/lrint.c +0 -8
- package/libc/musl/src/math/i386/lrintf.c +0 -8
- package/libc/musl/src/math/i386/rintf.c +0 -7
- package/libc/musl/src/math/lrint.c +0 -72
- package/libc/musl/src/math/lrintf.c +0 -8
- package/libc/musl/src/math/pow_data.c +0 -180
- package/libc/musl/src/math/pow_data.h +0 -22
- package/libc/musl/src/math/powerpc64/lrint.c +0 -16
- package/libc/musl/src/math/powerpc64/lrintf.c +0 -16
- package/libc/musl/src/math/rintf.c +0 -30
- package/libc/musl/src/math/s390x/rintf.c +0 -15
- package/libc/musl/src/math/sincosl.c +0 -60
- package/libc/musl/src/math/sinl.c +0 -41
- package/libc/musl/src/math/tanl.c +0 -29
- package/libc/musl/src/math/x32/lrint.s +0 -5
- package/libc/musl/src/math/x32/lrintf.s +0 -5
- package/libc/musl/src/math/x86_64/lrint.c +0 -8
- package/libc/musl/src/math/x86_64/lrintf.c +0 -8
- package/libc/wasi/libc-bottom-half/sources/reallocarray.c +0 -14
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Data for the log part of pow.
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2018, Arm Limited.
|
|
5
|
-
* SPDX-License-Identifier: MIT
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#include "pow_data.h"
|
|
9
|
-
|
|
10
|
-
#define N (1 << POW_LOG_TABLE_BITS)
|
|
11
|
-
|
|
12
|
-
const struct pow_log_data __pow_log_data = {
|
|
13
|
-
.ln2hi = 0x1.62e42fefa3800p-1,
|
|
14
|
-
.ln2lo = 0x1.ef35793c76730p-45,
|
|
15
|
-
.poly = {
|
|
16
|
-
// relative error: 0x1.11922ap-70
|
|
17
|
-
// in -0x1.6bp-8 0x1.6bp-8
|
|
18
|
-
// Coefficients are scaled to match the scaling during evaluation.
|
|
19
|
-
-0x1p-1,
|
|
20
|
-
0x1.555555555556p-2 * -2,
|
|
21
|
-
-0x1.0000000000006p-2 * -2,
|
|
22
|
-
0x1.999999959554ep-3 * 4,
|
|
23
|
-
-0x1.555555529a47ap-3 * 4,
|
|
24
|
-
0x1.2495b9b4845e9p-3 * -8,
|
|
25
|
-
-0x1.0002b8b263fc3p-3 * -8,
|
|
26
|
-
},
|
|
27
|
-
/* Algorithm:
|
|
28
|
-
|
|
29
|
-
x = 2^k z
|
|
30
|
-
log(x) = k ln2 + log(c) + log(z/c)
|
|
31
|
-
log(z/c) = poly(z/c - 1)
|
|
32
|
-
|
|
33
|
-
where z is in [0x1.69555p-1; 0x1.69555p0] which is split into N subintervals
|
|
34
|
-
and z falls into the ith one, then table entries are computed as
|
|
35
|
-
|
|
36
|
-
tab[i].invc = 1/c
|
|
37
|
-
tab[i].logc = round(0x1p43*log(c))/0x1p43
|
|
38
|
-
tab[i].logctail = (double)(log(c) - logc)
|
|
39
|
-
|
|
40
|
-
where c is chosen near the center of the subinterval such that 1/c has only a
|
|
41
|
-
few precision bits so z/c - 1 is exactly representible as double:
|
|
42
|
-
|
|
43
|
-
1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2
|
|
44
|
-
|
|
45
|
-
Note: |z/c - 1| < 1/N for the chosen c, |log(c) - logc - logctail| < 0x1p-97,
|
|
46
|
-
the last few bits of logc are rounded away so k*ln2hi + logc has no rounding
|
|
47
|
-
error and the interval for z is selected such that near x == 1, where log(x)
|
|
48
|
-
is tiny, large cancellation error is avoided in logc + poly(z/c - 1). */
|
|
49
|
-
.tab = {
|
|
50
|
-
#define A(a, b, c) {a, 0, b, c},
|
|
51
|
-
A(0x1.6a00000000000p+0, -0x1.62c82f2b9c800p-2, 0x1.ab42428375680p-48)
|
|
52
|
-
A(0x1.6800000000000p+0, -0x1.5d1bdbf580800p-2, -0x1.ca508d8e0f720p-46)
|
|
53
|
-
A(0x1.6600000000000p+0, -0x1.5767717455800p-2, -0x1.362a4d5b6506dp-45)
|
|
54
|
-
A(0x1.6400000000000p+0, -0x1.51aad872df800p-2, -0x1.684e49eb067d5p-49)
|
|
55
|
-
A(0x1.6200000000000p+0, -0x1.4be5f95777800p-2, -0x1.41b6993293ee0p-47)
|
|
56
|
-
A(0x1.6000000000000p+0, -0x1.4618bc21c6000p-2, 0x1.3d82f484c84ccp-46)
|
|
57
|
-
A(0x1.5e00000000000p+0, -0x1.404308686a800p-2, 0x1.c42f3ed820b3ap-50)
|
|
58
|
-
A(0x1.5c00000000000p+0, -0x1.3a64c55694800p-2, 0x1.0b1c686519460p-45)
|
|
59
|
-
A(0x1.5a00000000000p+0, -0x1.347dd9a988000p-2, 0x1.5594dd4c58092p-45)
|
|
60
|
-
A(0x1.5800000000000p+0, -0x1.2e8e2bae12000p-2, 0x1.67b1e99b72bd8p-45)
|
|
61
|
-
A(0x1.5600000000000p+0, -0x1.2895a13de8800p-2, 0x1.5ca14b6cfb03fp-46)
|
|
62
|
-
A(0x1.5600000000000p+0, -0x1.2895a13de8800p-2, 0x1.5ca14b6cfb03fp-46)
|
|
63
|
-
A(0x1.5400000000000p+0, -0x1.22941fbcf7800p-2, -0x1.65a242853da76p-46)
|
|
64
|
-
A(0x1.5200000000000p+0, -0x1.1c898c1699800p-2, -0x1.fafbc68e75404p-46)
|
|
65
|
-
A(0x1.5000000000000p+0, -0x1.1675cababa800p-2, 0x1.f1fc63382a8f0p-46)
|
|
66
|
-
A(0x1.4e00000000000p+0, -0x1.1058bf9ae4800p-2, -0x1.6a8c4fd055a66p-45)
|
|
67
|
-
A(0x1.4c00000000000p+0, -0x1.0a324e2739000p-2, -0x1.c6bee7ef4030ep-47)
|
|
68
|
-
A(0x1.4a00000000000p+0, -0x1.0402594b4d000p-2, -0x1.036b89ef42d7fp-48)
|
|
69
|
-
A(0x1.4a00000000000p+0, -0x1.0402594b4d000p-2, -0x1.036b89ef42d7fp-48)
|
|
70
|
-
A(0x1.4800000000000p+0, -0x1.fb9186d5e4000p-3, 0x1.d572aab993c87p-47)
|
|
71
|
-
A(0x1.4600000000000p+0, -0x1.ef0adcbdc6000p-3, 0x1.b26b79c86af24p-45)
|
|
72
|
-
A(0x1.4400000000000p+0, -0x1.e27076e2af000p-3, -0x1.72f4f543fff10p-46)
|
|
73
|
-
A(0x1.4200000000000p+0, -0x1.d5c216b4fc000p-3, 0x1.1ba91bbca681bp-45)
|
|
74
|
-
A(0x1.4000000000000p+0, -0x1.c8ff7c79aa000p-3, 0x1.7794f689f8434p-45)
|
|
75
|
-
A(0x1.4000000000000p+0, -0x1.c8ff7c79aa000p-3, 0x1.7794f689f8434p-45)
|
|
76
|
-
A(0x1.3e00000000000p+0, -0x1.bc286742d9000p-3, 0x1.94eb0318bb78fp-46)
|
|
77
|
-
A(0x1.3c00000000000p+0, -0x1.af3c94e80c000p-3, 0x1.a4e633fcd9066p-52)
|
|
78
|
-
A(0x1.3a00000000000p+0, -0x1.a23bc1fe2b000p-3, -0x1.58c64dc46c1eap-45)
|
|
79
|
-
A(0x1.3a00000000000p+0, -0x1.a23bc1fe2b000p-3, -0x1.58c64dc46c1eap-45)
|
|
80
|
-
A(0x1.3800000000000p+0, -0x1.9525a9cf45000p-3, -0x1.ad1d904c1d4e3p-45)
|
|
81
|
-
A(0x1.3600000000000p+0, -0x1.87fa06520d000p-3, 0x1.bbdbf7fdbfa09p-45)
|
|
82
|
-
A(0x1.3400000000000p+0, -0x1.7ab890210e000p-3, 0x1.bdb9072534a58p-45)
|
|
83
|
-
A(0x1.3400000000000p+0, -0x1.7ab890210e000p-3, 0x1.bdb9072534a58p-45)
|
|
84
|
-
A(0x1.3200000000000p+0, -0x1.6d60fe719d000p-3, -0x1.0e46aa3b2e266p-46)
|
|
85
|
-
A(0x1.3000000000000p+0, -0x1.5ff3070a79000p-3, -0x1.e9e439f105039p-46)
|
|
86
|
-
A(0x1.3000000000000p+0, -0x1.5ff3070a79000p-3, -0x1.e9e439f105039p-46)
|
|
87
|
-
A(0x1.2e00000000000p+0, -0x1.526e5e3a1b000p-3, -0x1.0de8b90075b8fp-45)
|
|
88
|
-
A(0x1.2c00000000000p+0, -0x1.44d2b6ccb8000p-3, 0x1.70cc16135783cp-46)
|
|
89
|
-
A(0x1.2c00000000000p+0, -0x1.44d2b6ccb8000p-3, 0x1.70cc16135783cp-46)
|
|
90
|
-
A(0x1.2a00000000000p+0, -0x1.371fc201e9000p-3, 0x1.178864d27543ap-48)
|
|
91
|
-
A(0x1.2800000000000p+0, -0x1.29552f81ff000p-3, -0x1.48d301771c408p-45)
|
|
92
|
-
A(0x1.2600000000000p+0, -0x1.1b72ad52f6000p-3, -0x1.e80a41811a396p-45)
|
|
93
|
-
A(0x1.2600000000000p+0, -0x1.1b72ad52f6000p-3, -0x1.e80a41811a396p-45)
|
|
94
|
-
A(0x1.2400000000000p+0, -0x1.0d77e7cd09000p-3, 0x1.a699688e85bf4p-47)
|
|
95
|
-
A(0x1.2400000000000p+0, -0x1.0d77e7cd09000p-3, 0x1.a699688e85bf4p-47)
|
|
96
|
-
A(0x1.2200000000000p+0, -0x1.fec9131dbe000p-4, -0x1.575545ca333f2p-45)
|
|
97
|
-
A(0x1.2000000000000p+0, -0x1.e27076e2b0000p-4, 0x1.a342c2af0003cp-45)
|
|
98
|
-
A(0x1.2000000000000p+0, -0x1.e27076e2b0000p-4, 0x1.a342c2af0003cp-45)
|
|
99
|
-
A(0x1.1e00000000000p+0, -0x1.c5e548f5bc000p-4, -0x1.d0c57585fbe06p-46)
|
|
100
|
-
A(0x1.1c00000000000p+0, -0x1.a926d3a4ae000p-4, 0x1.53935e85baac8p-45)
|
|
101
|
-
A(0x1.1c00000000000p+0, -0x1.a926d3a4ae000p-4, 0x1.53935e85baac8p-45)
|
|
102
|
-
A(0x1.1a00000000000p+0, -0x1.8c345d631a000p-4, 0x1.37c294d2f5668p-46)
|
|
103
|
-
A(0x1.1a00000000000p+0, -0x1.8c345d631a000p-4, 0x1.37c294d2f5668p-46)
|
|
104
|
-
A(0x1.1800000000000p+0, -0x1.6f0d28ae56000p-4, -0x1.69737c93373dap-45)
|
|
105
|
-
A(0x1.1600000000000p+0, -0x1.51b073f062000p-4, 0x1.f025b61c65e57p-46)
|
|
106
|
-
A(0x1.1600000000000p+0, -0x1.51b073f062000p-4, 0x1.f025b61c65e57p-46)
|
|
107
|
-
A(0x1.1400000000000p+0, -0x1.341d7961be000p-4, 0x1.c5edaccf913dfp-45)
|
|
108
|
-
A(0x1.1400000000000p+0, -0x1.341d7961be000p-4, 0x1.c5edaccf913dfp-45)
|
|
109
|
-
A(0x1.1200000000000p+0, -0x1.16536eea38000p-4, 0x1.47c5e768fa309p-46)
|
|
110
|
-
A(0x1.1000000000000p+0, -0x1.f0a30c0118000p-5, 0x1.d599e83368e91p-45)
|
|
111
|
-
A(0x1.1000000000000p+0, -0x1.f0a30c0118000p-5, 0x1.d599e83368e91p-45)
|
|
112
|
-
A(0x1.0e00000000000p+0, -0x1.b42dd71198000p-5, 0x1.c827ae5d6704cp-46)
|
|
113
|
-
A(0x1.0e00000000000p+0, -0x1.b42dd71198000p-5, 0x1.c827ae5d6704cp-46)
|
|
114
|
-
A(0x1.0c00000000000p+0, -0x1.77458f632c000p-5, -0x1.cfc4634f2a1eep-45)
|
|
115
|
-
A(0x1.0c00000000000p+0, -0x1.77458f632c000p-5, -0x1.cfc4634f2a1eep-45)
|
|
116
|
-
A(0x1.0a00000000000p+0, -0x1.39e87b9fec000p-5, 0x1.502b7f526feaap-48)
|
|
117
|
-
A(0x1.0a00000000000p+0, -0x1.39e87b9fec000p-5, 0x1.502b7f526feaap-48)
|
|
118
|
-
A(0x1.0800000000000p+0, -0x1.f829b0e780000p-6, -0x1.980267c7e09e4p-45)
|
|
119
|
-
A(0x1.0800000000000p+0, -0x1.f829b0e780000p-6, -0x1.980267c7e09e4p-45)
|
|
120
|
-
A(0x1.0600000000000p+0, -0x1.7b91b07d58000p-6, -0x1.88d5493faa639p-45)
|
|
121
|
-
A(0x1.0400000000000p+0, -0x1.fc0a8b0fc0000p-7, -0x1.f1e7cf6d3a69cp-50)
|
|
122
|
-
A(0x1.0400000000000p+0, -0x1.fc0a8b0fc0000p-7, -0x1.f1e7cf6d3a69cp-50)
|
|
123
|
-
A(0x1.0200000000000p+0, -0x1.fe02a6b100000p-8, -0x1.9e23f0dda40e4p-46)
|
|
124
|
-
A(0x1.0200000000000p+0, -0x1.fe02a6b100000p-8, -0x1.9e23f0dda40e4p-46)
|
|
125
|
-
A(0x1.0000000000000p+0, 0x0.0000000000000p+0, 0x0.0000000000000p+0)
|
|
126
|
-
A(0x1.0000000000000p+0, 0x0.0000000000000p+0, 0x0.0000000000000p+0)
|
|
127
|
-
A(0x1.fc00000000000p-1, 0x1.0101575890000p-7, -0x1.0c76b999d2be8p-46)
|
|
128
|
-
A(0x1.f800000000000p-1, 0x1.0205658938000p-6, -0x1.3dc5b06e2f7d2p-45)
|
|
129
|
-
A(0x1.f400000000000p-1, 0x1.8492528c90000p-6, -0x1.aa0ba325a0c34p-45)
|
|
130
|
-
A(0x1.f000000000000p-1, 0x1.0415d89e74000p-5, 0x1.111c05cf1d753p-47)
|
|
131
|
-
A(0x1.ec00000000000p-1, 0x1.466aed42e0000p-5, -0x1.c167375bdfd28p-45)
|
|
132
|
-
A(0x1.e800000000000p-1, 0x1.894aa149fc000p-5, -0x1.97995d05a267dp-46)
|
|
133
|
-
A(0x1.e400000000000p-1, 0x1.ccb73cdddc000p-5, -0x1.a68f247d82807p-46)
|
|
134
|
-
A(0x1.e200000000000p-1, 0x1.eea31c006c000p-5, -0x1.e113e4fc93b7bp-47)
|
|
135
|
-
A(0x1.de00000000000p-1, 0x1.1973bd1466000p-4, -0x1.5325d560d9e9bp-45)
|
|
136
|
-
A(0x1.da00000000000p-1, 0x1.3bdf5a7d1e000p-4, 0x1.cc85ea5db4ed7p-45)
|
|
137
|
-
A(0x1.d600000000000p-1, 0x1.5e95a4d97a000p-4, -0x1.c69063c5d1d1ep-45)
|
|
138
|
-
A(0x1.d400000000000p-1, 0x1.700d30aeac000p-4, 0x1.c1e8da99ded32p-49)
|
|
139
|
-
A(0x1.d000000000000p-1, 0x1.9335e5d594000p-4, 0x1.3115c3abd47dap-45)
|
|
140
|
-
A(0x1.cc00000000000p-1, 0x1.b6ac88dad6000p-4, -0x1.390802bf768e5p-46)
|
|
141
|
-
A(0x1.ca00000000000p-1, 0x1.c885801bc4000p-4, 0x1.646d1c65aacd3p-45)
|
|
142
|
-
A(0x1.c600000000000p-1, 0x1.ec739830a2000p-4, -0x1.dc068afe645e0p-45)
|
|
143
|
-
A(0x1.c400000000000p-1, 0x1.fe89139dbe000p-4, -0x1.534d64fa10afdp-45)
|
|
144
|
-
A(0x1.c000000000000p-1, 0x1.1178e8227e000p-3, 0x1.1ef78ce2d07f2p-45)
|
|
145
|
-
A(0x1.be00000000000p-1, 0x1.1aa2b7e23f000p-3, 0x1.ca78e44389934p-45)
|
|
146
|
-
A(0x1.ba00000000000p-1, 0x1.2d1610c868000p-3, 0x1.39d6ccb81b4a1p-47)
|
|
147
|
-
A(0x1.b800000000000p-1, 0x1.365fcb0159000p-3, 0x1.62fa8234b7289p-51)
|
|
148
|
-
A(0x1.b400000000000p-1, 0x1.4913d8333b000p-3, 0x1.5837954fdb678p-45)
|
|
149
|
-
A(0x1.b200000000000p-1, 0x1.527e5e4a1b000p-3, 0x1.633e8e5697dc7p-45)
|
|
150
|
-
A(0x1.ae00000000000p-1, 0x1.6574ebe8c1000p-3, 0x1.9cf8b2c3c2e78p-46)
|
|
151
|
-
A(0x1.ac00000000000p-1, 0x1.6f0128b757000p-3, -0x1.5118de59c21e1p-45)
|
|
152
|
-
A(0x1.aa00000000000p-1, 0x1.7898d85445000p-3, -0x1.c661070914305p-46)
|
|
153
|
-
A(0x1.a600000000000p-1, 0x1.8beafeb390000p-3, -0x1.73d54aae92cd1p-47)
|
|
154
|
-
A(0x1.a400000000000p-1, 0x1.95a5adcf70000p-3, 0x1.7f22858a0ff6fp-47)
|
|
155
|
-
A(0x1.a000000000000p-1, 0x1.a93ed3c8ae000p-3, -0x1.8724350562169p-45)
|
|
156
|
-
A(0x1.9e00000000000p-1, 0x1.b31d8575bd000p-3, -0x1.c358d4eace1aap-47)
|
|
157
|
-
A(0x1.9c00000000000p-1, 0x1.bd087383be000p-3, -0x1.d4bc4595412b6p-45)
|
|
158
|
-
A(0x1.9a00000000000p-1, 0x1.c6ffbc6f01000p-3, -0x1.1ec72c5962bd2p-48)
|
|
159
|
-
A(0x1.9600000000000p-1, 0x1.db13db0d49000p-3, -0x1.aff2af715b035p-45)
|
|
160
|
-
A(0x1.9400000000000p-1, 0x1.e530effe71000p-3, 0x1.212276041f430p-51)
|
|
161
|
-
A(0x1.9200000000000p-1, 0x1.ef5ade4dd0000p-3, -0x1.a211565bb8e11p-51)
|
|
162
|
-
A(0x1.9000000000000p-1, 0x1.f991c6cb3b000p-3, 0x1.bcbecca0cdf30p-46)
|
|
163
|
-
A(0x1.8c00000000000p-1, 0x1.07138604d5800p-2, 0x1.89cdb16ed4e91p-48)
|
|
164
|
-
A(0x1.8a00000000000p-1, 0x1.0c42d67616000p-2, 0x1.7188b163ceae9p-45)
|
|
165
|
-
A(0x1.8800000000000p-1, 0x1.1178e8227e800p-2, -0x1.c210e63a5f01cp-45)
|
|
166
|
-
A(0x1.8600000000000p-1, 0x1.16b5ccbacf800p-2, 0x1.b9acdf7a51681p-45)
|
|
167
|
-
A(0x1.8400000000000p-1, 0x1.1bf99635a6800p-2, 0x1.ca6ed5147bdb7p-45)
|
|
168
|
-
A(0x1.8200000000000p-1, 0x1.214456d0eb800p-2, 0x1.a87deba46baeap-47)
|
|
169
|
-
A(0x1.7e00000000000p-1, 0x1.2bef07cdc9000p-2, 0x1.a9cfa4a5004f4p-45)
|
|
170
|
-
A(0x1.7c00000000000p-1, 0x1.314f1e1d36000p-2, -0x1.8e27ad3213cb8p-45)
|
|
171
|
-
A(0x1.7a00000000000p-1, 0x1.36b6776be1000p-2, 0x1.16ecdb0f177c8p-46)
|
|
172
|
-
A(0x1.7800000000000p-1, 0x1.3c25277333000p-2, 0x1.83b54b606bd5cp-46)
|
|
173
|
-
A(0x1.7600000000000p-1, 0x1.419b423d5e800p-2, 0x1.8e436ec90e09dp-47)
|
|
174
|
-
A(0x1.7400000000000p-1, 0x1.4718dc271c800p-2, -0x1.f27ce0967d675p-45)
|
|
175
|
-
A(0x1.7200000000000p-1, 0x1.4c9e09e173000p-2, -0x1.e20891b0ad8a4p-45)
|
|
176
|
-
A(0x1.7000000000000p-1, 0x1.522ae0738a000p-2, 0x1.ebe708164c759p-45)
|
|
177
|
-
A(0x1.6e00000000000p-1, 0x1.57bf753c8d000p-2, 0x1.fadedee5d40efp-46)
|
|
178
|
-
A(0x1.6c00000000000p-1, 0x1.5d5bddf596000p-2, -0x1.a0b2a08a465dcp-47)
|
|
179
|
-
},
|
|
180
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2018, Arm Limited.
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
#ifndef _POW_DATA_H
|
|
6
|
-
#define _POW_DATA_H
|
|
7
|
-
|
|
8
|
-
#include <features.h>
|
|
9
|
-
|
|
10
|
-
#define POW_LOG_TABLE_BITS 7
|
|
11
|
-
#define POW_LOG_POLY_ORDER 8
|
|
12
|
-
extern hidden const struct pow_log_data {
|
|
13
|
-
double ln2hi;
|
|
14
|
-
double ln2lo;
|
|
15
|
-
double poly[POW_LOG_POLY_ORDER - 1]; /* First coefficient is 1. */
|
|
16
|
-
/* Note: the pad field is unused, but allows slightly faster indexing. */
|
|
17
|
-
struct {
|
|
18
|
-
double invc, pad, logc, logctail;
|
|
19
|
-
} tab[1 << POW_LOG_TABLE_BITS];
|
|
20
|
-
} __pow_log_data;
|
|
21
|
-
|
|
22
|
-
#endif
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#include <float.h>
|
|
2
|
-
#include <math.h>
|
|
3
|
-
#include <stdint.h>
|
|
4
|
-
|
|
5
|
-
#if FLT_EVAL_METHOD==0
|
|
6
|
-
#define EPS FLT_EPSILON
|
|
7
|
-
#elif FLT_EVAL_METHOD==1
|
|
8
|
-
#define EPS DBL_EPSILON
|
|
9
|
-
#elif FLT_EVAL_METHOD==2
|
|
10
|
-
#define EPS LDBL_EPSILON
|
|
11
|
-
#endif
|
|
12
|
-
static const float_t toint = 1/EPS;
|
|
13
|
-
|
|
14
|
-
float rintf(float x)
|
|
15
|
-
{
|
|
16
|
-
union {float f; uint32_t i;} u = {x};
|
|
17
|
-
int e = u.i>>23 & 0xff;
|
|
18
|
-
int s = u.i>>31;
|
|
19
|
-
float_t y;
|
|
20
|
-
|
|
21
|
-
if (e >= 0x7f+23)
|
|
22
|
-
return x;
|
|
23
|
-
if (s)
|
|
24
|
-
y = x - toint + toint;
|
|
25
|
-
else
|
|
26
|
-
y = x + toint - toint;
|
|
27
|
-
if (y == 0)
|
|
28
|
-
return s ? -0.0f : 0.0f;
|
|
29
|
-
return y;
|
|
30
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#define _GNU_SOURCE
|
|
2
|
-
#include "libm.h"
|
|
3
|
-
|
|
4
|
-
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
|
5
|
-
void sincosl(long double x, long double *sin, long double *cos)
|
|
6
|
-
{
|
|
7
|
-
double sind, cosd;
|
|
8
|
-
sincos(x, &sind, &cosd);
|
|
9
|
-
*sin = sind;
|
|
10
|
-
*cos = cosd;
|
|
11
|
-
}
|
|
12
|
-
#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
|
|
13
|
-
void sincosl(long double x, long double *sin, long double *cos)
|
|
14
|
-
{
|
|
15
|
-
union ldshape u = {x};
|
|
16
|
-
unsigned n;
|
|
17
|
-
long double y[2], s, c;
|
|
18
|
-
|
|
19
|
-
u.i.se &= 0x7fff;
|
|
20
|
-
if (u.i.se == 0x7fff) {
|
|
21
|
-
*sin = *cos = x - x;
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (u.f < M_PI_4) {
|
|
25
|
-
if (u.i.se < 0x3fff - LDBL_MANT_DIG) {
|
|
26
|
-
/* raise underflow if subnormal */
|
|
27
|
-
if (u.i.se == 0) FORCE_EVAL(x*0x1p-120f);
|
|
28
|
-
*sin = x;
|
|
29
|
-
/* raise inexact if x!=0 */
|
|
30
|
-
*cos = 1.0 + x;
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
*sin = __sinl(x, 0, 0);
|
|
34
|
-
*cos = __cosl(x, 0);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
n = __rem_pio2l(x, y);
|
|
38
|
-
s = __sinl(y[0], y[1], 1);
|
|
39
|
-
c = __cosl(y[0], y[1]);
|
|
40
|
-
switch (n & 3) {
|
|
41
|
-
case 0:
|
|
42
|
-
*sin = s;
|
|
43
|
-
*cos = c;
|
|
44
|
-
break;
|
|
45
|
-
case 1:
|
|
46
|
-
*sin = c;
|
|
47
|
-
*cos = -s;
|
|
48
|
-
break;
|
|
49
|
-
case 2:
|
|
50
|
-
*sin = -s;
|
|
51
|
-
*cos = -c;
|
|
52
|
-
break;
|
|
53
|
-
case 3:
|
|
54
|
-
default:
|
|
55
|
-
*sin = -c;
|
|
56
|
-
*cos = s;
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
#endif
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#include "libm.h"
|
|
2
|
-
|
|
3
|
-
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
|
4
|
-
long double sinl(long double x)
|
|
5
|
-
{
|
|
6
|
-
return sin(x);
|
|
7
|
-
}
|
|
8
|
-
#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
|
|
9
|
-
long double sinl(long double x)
|
|
10
|
-
{
|
|
11
|
-
union ldshape u = {x};
|
|
12
|
-
unsigned n;
|
|
13
|
-
long double y[2], hi, lo;
|
|
14
|
-
|
|
15
|
-
u.i.se &= 0x7fff;
|
|
16
|
-
if (u.i.se == 0x7fff)
|
|
17
|
-
return x - x;
|
|
18
|
-
if (u.f < M_PI_4) {
|
|
19
|
-
if (u.i.se < 0x3fff - LDBL_MANT_DIG/2) {
|
|
20
|
-
/* raise inexact if x!=0 and underflow if subnormal */
|
|
21
|
-
FORCE_EVAL(u.i.se == 0 ? x*0x1p-120f : x+0x1p120f);
|
|
22
|
-
return x;
|
|
23
|
-
}
|
|
24
|
-
return __sinl(x, 0.0, 0);
|
|
25
|
-
}
|
|
26
|
-
n = __rem_pio2l(x, y);
|
|
27
|
-
hi = y[0];
|
|
28
|
-
lo = y[1];
|
|
29
|
-
switch (n & 3) {
|
|
30
|
-
case 0:
|
|
31
|
-
return __sinl(hi, lo, 1);
|
|
32
|
-
case 1:
|
|
33
|
-
return __cosl(hi, lo);
|
|
34
|
-
case 2:
|
|
35
|
-
return -__sinl(hi, lo, 1);
|
|
36
|
-
case 3:
|
|
37
|
-
default:
|
|
38
|
-
return -__cosl(hi, lo);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
#endif
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#include "libm.h"
|
|
2
|
-
|
|
3
|
-
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
|
4
|
-
long double tanl(long double x)
|
|
5
|
-
{
|
|
6
|
-
return tan(x);
|
|
7
|
-
}
|
|
8
|
-
#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
|
|
9
|
-
long double tanl(long double x)
|
|
10
|
-
{
|
|
11
|
-
union ldshape u = {x};
|
|
12
|
-
long double y[2];
|
|
13
|
-
unsigned n;
|
|
14
|
-
|
|
15
|
-
u.i.se &= 0x7fff;
|
|
16
|
-
if (u.i.se == 0x7fff)
|
|
17
|
-
return x - x;
|
|
18
|
-
if (u.f < M_PI_4) {
|
|
19
|
-
if (u.i.se < 0x3fff - LDBL_MANT_DIG/2) {
|
|
20
|
-
/* raise inexact if x!=0 and underflow if subnormal */
|
|
21
|
-
FORCE_EVAL(u.i.se == 0 ? x*0x1p-120f : x+0x1p120f);
|
|
22
|
-
return x;
|
|
23
|
-
}
|
|
24
|
-
return __tanl(x, 0, 0);
|
|
25
|
-
}
|
|
26
|
-
n = __rem_pio2l(x, y);
|
|
27
|
-
return __tanl(y[0], y[1], n&1);
|
|
28
|
-
}
|
|
29
|
-
#endif
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#include <stdlib.h>
|
|
2
|
-
#include <errno.h>
|
|
3
|
-
|
|
4
|
-
void *__reallocarray(void *ptr, size_t nmemb, size_t size) {
|
|
5
|
-
size_t bytes;
|
|
6
|
-
if (__builtin_umull_overflow(nmemb, size, &bytes)) {
|
|
7
|
-
errno = ENOMEM;
|
|
8
|
-
return NULL;
|
|
9
|
-
}
|
|
10
|
-
return realloc(ptr, bytes);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
void *reallocarray(void *ptr, size_t nmemb, size_t size)
|
|
14
|
-
__attribute__((__weak__, __alias__("__reallocarray")));
|