From 6f9bacf36b20b1a87fa4ec24c9d67c47985fbc8b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 18 Nov 2024 17:57:31 -0300 Subject: math: Use atan2f from CORE-MATH The CORE-MATH implementation is correctly rounded (for any rounding mode) and shows slight better performance to the generic atan2f. 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 68.1175 69.2014 -1.59% x86_64v2 66.9884 66.0081 1.46% x86_64v3 57.7034 61.6407 -6.82% i686 189.8690 152.7560 19.55% aarch64 (Neoverse) 32.6151 24.5382 24.76% power10 21.7282 17.1896 20.89% reciprocal-throughput master patched improvement x86_64 34.5202 31.6155 8.41% x86_64v2 32.6379 30.3372 7.05% x86_64v3 34.3677 23.6455 31.20% i686 157.7290 75.8308 51.92% aarch64 (Neoverse) 27.7788 16.2671 41.44% power10 15.5715 8.1588 47.60% Signed-off-by: Alexei Sibidanov Signed-off-by: Paul Zimmermann Signed-off-by: Adhemerval Zanella Reviewed-by: DJ Delorie --- sysdeps/arc/fpu/libm-test-ulps | 8 -------- sysdeps/arc/nofpu/libm-test-ulps | 2 -- 2 files changed, 10 deletions(-) (limited to 'sysdeps/arc') diff --git a/sysdeps/arc/fpu/libm-test-ulps b/sysdeps/arc/fpu/libm-test-ulps index 37b0efae66..5b89ee2696 100644 --- a/sysdeps/arc/fpu/libm-test-ulps +++ b/sysdeps/arc/fpu/libm-test-ulps @@ -54,19 +54,15 @@ double: 1 Function: "atan2": double: 7 -float: 2 Function: "atan2_downward": double: 5 -float: 2 Function: "atan2_towardzero": double: 5 -float: 2 Function: "atan2_upward": double: 8 -float: 2 Function: "atan_downward": double: 1 @@ -173,19 +169,15 @@ float: 3 Function: "carg": double: 7 -float: 2 Function: "carg_downward": double: 5 -float: 2 Function: "carg_towardzero": double: 5 -float: 2 Function: "carg_upward": double: 8 -float: 2 Function: Real part of "casin": double: 3 diff --git a/sysdeps/arc/nofpu/libm-test-ulps b/sysdeps/arc/nofpu/libm-test-ulps index 8d283f0627..ac43ab8dcc 100644 --- a/sysdeps/arc/nofpu/libm-test-ulps +++ b/sysdeps/arc/nofpu/libm-test-ulps @@ -17,7 +17,6 @@ Function: "atan": double: 1 Function: "atan2": -float: 2 Function: "atanh": double: 2 @@ -43,7 +42,6 @@ double: 1 float: 2 Function: "carg": -float: 1 Function: Real part of "casin": double: 1 -- cgit v1.2.3