diff options
author | Joseph Myers <josmyers@redhat.com> | 2024-06-17 13:48:13 +0000 |
---|---|---|
committer | Joseph Myers <josmyers@redhat.com> | 2024-06-17 13:48:13 +0000 |
commit | 55eb99e9a9d840ba452b128be14d6529c2dde039 (patch) | |
tree | 6810f148fb04ca7217c67aa3f2e10b72d86a8d2d /manual | |
parent | bb014f50c4a0c8d8db1ba5af55c104e430b5533d (diff) | |
download | glibc-55eb99e9a9d840ba452b128be14d6529c2dde039.zip glibc-55eb99e9a9d840ba452b128be14d6529c2dde039.tar.gz glibc-55eb99e9a9d840ba452b128be14d6529c2dde039.tar.bz2 |
Implement C23 log10p1
C23 adds various <math.h> function families originally defined in TS
18661-4. Add the log10p1 functions (log10(1+x): like log1p, but for
base-10 logarithms).
This is directly analogous to the log2p1 implementation (except that
whereas log2p1 has a smaller underflow range than log1p, log10p1 has a
larger underflow range). The test inputs are copied from those for
log1p and log2p1, plus a few more inputs in that wider underflow
range.
Tested for x86_64 and x86, and with build-many-glibcs.py.
Diffstat (limited to 'manual')
-rw-r--r-- | manual/math.texi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/manual/math.texi b/manual/math.texi index 56f2295..18b7173 100644 --- a/manual/math.texi +++ b/manual/math.texi @@ -780,6 +780,20 @@ near zero. The @code{log2p1} functions are from TS 18661-4:2015. @end deftypefun +@deftypefun double log10p1 (double @var{x}) +@deftypefunx float log10p1f (float @var{x}) +@deftypefunx {long double} log10p1l (long double @var{x}) +@deftypefunx _FloatN log10p1fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx log10p1fNx (_Float@var{N}x @var{x}) +@standards{TS 18661-4:2015, math.h} +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} +These functions return a value equivalent to @w{@code{log10 (1 + @var{x})}}. +They are computed in a way that is accurate even if @var{x} is +near zero. + +The @code{log10p1} functions are from TS 18661-4:2015. +@end deftypefun + @cindex complex exponentiation functions @cindex complex logarithm functions |