glibc/sysdeps
Adhemerval Zanella 9583836785 math: Use coshf from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode),
although it should worse performance than current one.  The current
implementation performance comes mainly from the internal usage of
the optimize expf implementation, and shows a maximum ULPs of 2 for
FE_TONEAREST and 3 for other rounding modes.

The code was adapted to glibc style and to use the definition of
math_config.h (to handle errno, overflow, and underflow).

Benchtest on x64_64 (Ryzen 9 5900X, gcc 14.2.1), aarch64 (Neoverse-N1,
gcc 13.3.1), and powerpc (POWER10, gcc 13.2.1):

Latency                      master        patched   improvement
x86_64                      40.6995        49.0737       -20.58%
x86_64v2                    40.5841        44.3604        -9.30%
x86_64v3                    39.3879        39.7502        -0.92%
i686                       112.3380       129.8570       -15.59%
aarch64 (Neoverse)          18.6914        17.0946         8.54%
power10                     11.1343        9.3245         16.25%

reciprocal-throughput        master        patched   improvement
x86_64                      18.6471        24.1077       -29.28%
x86_64v2                    17.7501        20.2946       -14.34%
x86_64v3                    17.8262        17.1877         3.58%
i686                        64.1454        86.5645       -34.95%
aarch64 (Neoverse)          9.77226        12.2314       -25.16%
power10                      4.0200        5.3316        -32.63%

Signed-off-by: Alexei Sibidanov <sibid@uvic.ca>
Signed-off-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18 17:24:43 -03:00
..
aarch64 math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
alpha math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
arc math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
arm math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
csky math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
generic malloc: Optimize small memory clearing for calloc 2024-12-04 04:28:15 +08:00
gnu sysdeps: Re-flow and sort multiline gnu/Makefile definitions 2024-08-07 11:02:03 -03:00
hppa math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
htl htl: move pthread_sigmask into libc. 2024-12-14 23:13:14 +01:00
hurd hurd: Move internal functions to internal header 2024-03-23 22:43:07 +01:00
i386 math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
ieee754 math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
loongarch math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
m68k math: Use atanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
mach htl: move pthread_sigmask into libc. 2024-12-14 23:13:14 +01:00
microblaze math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
mips math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
nptl linux: Add support for getrandom vDSO 2024-11-12 14:42:12 -03:00
or1k math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
posix Silence most -Wzero-as-null-pointer-constant diagnostics 2024-11-25 16:45:59 -03:00
powerpc math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
pthread Use empty initializer to silence GCC 4.9 or older 2024-12-16 04:06:30 +08:00
riscv math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
s390 math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
sh math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
sparc math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00
unix Update syscall lists for Linux 6.12 2024-12-18 15:12:36 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 sys/platform/x86.h: Do not depend on _Bool definition in C++ mode 2024-12-18 02:32:27 +08:00
x86_64 math: Use coshf from CORE-MATH 2024-12-18 17:24:43 -03:00