aboutsummaryrefslogtreecommitdiff
path: root/manual/math.texi
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-06-17 13:47:09 +0000
committerJoseph Myers <josmyers@redhat.com>2024-06-17 13:47:09 +0000
commitbb014f50c4a0c8d8db1ba5af55c104e430b5533d (patch)
treea1ca91748bb999691442701c3b786ebc3372114f /manual/math.texi
parentca38eff28015f376c020b4dfad5351e45be8d090 (diff)
downloadglibc-bb014f50c4a0c8d8db1ba5af55c104e430b5533d.zip
glibc-bb014f50c4a0c8d8db1ba5af55c104e430b5533d.tar.gz
glibc-bb014f50c4a0c8d8db1ba5af55c104e430b5533d.tar.bz2
Implement C23 logp1
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the logp1 functions (aliases for log1p functions - the name is intended to be more consistent with the new log2p1 and log10p1, where clearly it would have been very confusing to name those functions log21p and log101p). As aliases rather than new functions, the content of this patch is somewhat different from those actually adding new functions. Tests are shared with log1p, so this patch *does* mechanically update all affected libm-test-ulps files to expect the same errors for both functions. The vector versions of log1p on aarch64 and x86_64 are *not* updated to have logp1 aliases (and thus there are no corresponding header, tests, abilist or ulps changes for vector functions either). It would be reasonable for such vector aliases and corresponding changes to other files to be made separately. For now, the log1p tests instead avoid testing logp1 in the vector case (a Makefile change is needed to avoid problems with grep, used in generating the .c files for vector function tests, matching more than one ALL_RM_TEST line in a file testing multiple functions with the same inputs, when it assumes that the .inc file only has a single such line). Tested for x86_64 and x86, and with build-many-glibcs.py.
Diffstat (limited to 'manual/math.texi')
-rw-r--r--manual/math.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/manual/math.texi b/manual/math.texi
index c99501c..56f2295 100644
--- a/manual/math.texi
+++ b/manual/math.texi
@@ -745,13 +745,25 @@ to subtraction of two numbers that are nearly equal.
@deftypefunx {long double} log1pl (long double @var{x})
@deftypefunx _FloatN log1pfN (_Float@var{N} @var{x})
@deftypefunx _FloatNx log1pfNx (_Float@var{N}x @var{x})
+@deftypefunx double logp1 (double @var{x})
+@deftypefunx float logp1f (float @var{x})
+@deftypefunx {long double} logp1l (long double @var{x})
+@deftypefunx _FloatN logp1fN (_Float@var{N} @var{x})
+@deftypefunx _FloatNx logp1fNx (_Float@var{N}x @var{x})
@standards{ISO, math.h}
@standardsx{log1pfN, TS 18661-3:2015, math.h}
@standardsx{log1pfNx, TS 18661-3:2015, math.h}
+@standardsx{logp1, TS 18661-4:2015, math.h}
+@standardsx{logp1f, TS 18661-4:2015, math.h}
+@standardsx{logp1l, TS 18661-4:2015, math.h}
+@standardsx{logp1fN, TS 18661-4:2015, math.h}
+@standardsx{logp1fNx, TS 18661-4:2015, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return a value equivalent to @w{@code{log (1 + @var{x})}}.
They are computed in a way that is accurate even if @var{x} is
near zero.
+
+The @code{logp1} names for these functions are from TS 18661-4:2015.
@end deftypefun
@deftypefun double log2p1 (double @var{x})