diff options
| author | Joseph Myers <josmyers@redhat.com> | 2024-05-20 13:41:39 +0000 |
|---|---|---|
| committer | Joseph Myers <josmyers@redhat.com> | 2024-05-20 13:41:39 +0000 |
| commit | 79c52daf4740b00bef43e4f5a4281b3480459b38 (patch) | |
| tree | cc15e0f7402870b20dbebf8d539df033806d48b0 /math/auto-libm-test-in | |
| parent | cf0ca8d52e1653d4aa4311a4649af8dc541ce6b4 (diff) | |
| download | glibc-79c52daf4740b00bef43e4f5a4281b3480459b38.tar.xz glibc-79c52daf4740b00bef43e4f5a4281b3480459b38.zip | |
Implement C23 log2p1
C23 adds various <math.h> function families originally defined in TS
18661-4. Add the log2p1 functions (log2(1+x): like log1p, but for
base-2 logarithms).
This illustrates the intended structure of implementations of all
these function families: define them initially with a type-generic
template implementation. If someone wishes to add type-specific
implementations, it is likely such implementations can be both faster
and more accurate than the type-generic one and can then override it
for types for which they are implemented (adding benchmarks would be
desirable in such cases to demonstrate that a new implementation is
indeed faster).
The test inputs are copied from those for log1p. Note that these
changes make gen-auto-libm-tests depend on MPFR 4.2 (or later).
The bulk of the changes are fairly generic for any such new function.
(sysdeps/powerpc/nofpu/Makefile only needs changing for those
type-generic templates that use fabs.)
Tested for x86_64 and x86, and with build-many-glibcs.py.
Diffstat (limited to 'math/auto-libm-test-in')
| -rw-r--r-- | math/auto-libm-test-in | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index 05d7ae5002..8982338b3a 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -6664,6 +6664,57 @@ log2 min log2 min_subnorm log2 max +log2p1 0 +log2p1 -0 +log2p1 e-1 +log2p1 -0.25 +log2p1 -0.875 +log2p1 0x1p-5 +log2p1 0x1p-10 +log2p1 0x1p-15 +log2p1 0x1p-20 +log2p1 0x1p-25 +log2p1 0x1p-30 +log2p1 0x1p-35 +log2p1 0x1p-40 +log2p1 0x1p-45 +log2p1 0x1p-50 +log2p1 0x1p-55 +log2p1 0x1p-60 +log2p1 0x1p-100 +log2p1 0x1p-600 +log2p1 0x1p-10000 +log2p1 min +log2p1 min_subnorm +log2p1 -min +log2p1 -min_subnorm +log2p1 0x1p10 +log2p1 0x1p20 +log2p1 0x1p30 +log2p1 0x1p50 +log2p1 0x1p60 +log2p1 0x1p100 +log2p1 0x1p1000 +log2p1 0x6.a0cf42befce9ed4085ef59254b48p-4 +log2p1 max + +log2p1 0x7.2a4368p-4 +log2p1 0x6.d3a118p-4 +log2p1 0x5.03f228p+0 +log2p1 0x7.264963888ac9p-4 +log2p1 0x8.786bdp-4 +log2p1 0x7.89dc17790eeb4p-4 +log2p1 0x9.81ccf8887c24a7bp-4 +log2p1 0xa.5028608bd65f38dp-4 +log2p1 0x5.bf78873e20a2d468p-4 +log2p1 0x7.aa5198p-4 +log2p1 0x2.564fap+0 +log2p1 0x7.fc242a2235222ef8p-4 +log2p1 -0x4.f37d3c9ce0b14bdd86eb157df5d4p-4 +log2p1 0x7.2eca50c4d93196362b4f37f6e8dcp-4 +log2p1 -0x6.3fef3067427e43dfcde9e48f74bcp-4 +log2p1 0x6.af53d00fd2845d4772260ef5adc4p-4 + mul 0 0 mul 0 -0 mul -0 0 |
