[05/12] benchtests: Add atanhf function to bench-math

Message ID 20211029171941.4161172-6-skpgkp2@gmail.com
State Dropped
Headers
Series benchtests: Add float version of math functions to bench-math |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Sunil Pandey Oct. 29, 2021, 5:19 p.m. UTC
  Add atanhf function to bench-math and copy atanhf-inputs to benchtests.
Motivation for this patch is to prepare for upcoming libmvec new
functions.  Float and double version of libmvec functions stays
together.

atanhf-inputs file generated from atanh-inputs file using following
scaling formula:

f = d * (FLT_MAX/DBL_MAX)

Where d is input(double) and f is output(float).  If scaled float value
is duplicate in new input file, nextafterf() function used to find next
float value, ensuring no duplicates.
---
 benchtests/Makefile      |   1 +
 benchtests/atanhf-inputs | 203 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 204 insertions(+)
 create mode 100644 benchtests/atanhf-inputs
  

Comments

Paul Zimmermann Nov. 4, 2021, 8:14 a.m. UTC | #1
Dear Sunil,

> atanhf-inputs file generated from atanh-inputs file using following
> scaling formula:
> 
> f = d * (FLT_MAX/DBL_MAX)

this seems wrong.

Paul
  

Patch

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 1768fd859b..bb3edd3e3b 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -35,6 +35,7 @@  bench-math := \
   atan2 \
   atanf \
   atanh \
+  atanhf \
   cbrt \
   cos \
   cosf \
diff --git a/benchtests/atanhf-inputs b/benchtests/atanhf-inputs
new file mode 100644
index 0000000000..d651daae7d
--- /dev/null
+++ b/benchtests/atanhf-inputs
@@ -0,0 +1,203 @@ 
+## args: float
+## ret: float
+## includes: math.h
+0x1.5a273p-1
+-0x1.b57eb4p-21
+-0x1.c0b186p-17
+-0x1.bd6e16p-1
+-0x1.4cfdd4p-10
+0x1.aadb58p-1
+0x1.827ab4p-1
+0x1.6d4e56p-14
+0x1.667d84p-1
+0x1.67223p-1
+-0x1.35ec26p-19
+0x1.9cf328p-21
+-0x1.a60896p-1
+0x1.ad5068p-1
+-0x1.8a4422p-1
+0x1.aba154p-14
+-0x1.249862p-1
+-0x1.aa2c42p-26
+-0x1.43d972p-1
+0x1.12d69p-25
+-0x1.eec6a4p-1
+-0x1.987b44p-21
+0x1.96a646p-11
+0x1.b961f4p-3
+-0x1.51d594p-1
+-0x1.72a778p-8
+-0x1.21fcd2p-1
+-0x1.094ea2p-1
+-0x1.79ea72p-9
+0x1.c63fc4p-5
+0x1.b1c0b8p-3
+-0x1.9957f2p-19
+-0x1.ecc604p-21
+0x1.7e0bc4p-1
+0x1.4e7cd6p-22
+-0x1.6b2774p-27
+0x1.db9e08p-1
+0x1.293836p-1
+0x1.f59e84p-1
+0x1.094c26p-22
+-0x1.922cb4p-3
+0x1.8a9b48p-1
+0x1.59e184p-1
+-0x1.77eb62p-1
+0x1.63e246p-1
+-0x1.8adb68p-1
+-0x1.c34f82p-1
+0x1.83f2e6p-25
+-0x1.6b8d34p-1
+-0x1.f50ce2p-23
+0x1.ceb5a4p-19
+-0x1.3d0616p-11
+-0x1.5ff058p-1
+0x1.263f96p-25
+0x1.5d5fap-9
+-0x1.5070a4p-7
+-0x1.299708p-5
+-0x1.64f624p-3
+0x1.2bc994p-3
+-0x1.e27d94p-1
+0x1.8092d6p-21
+-0x1.9c3138p-25
+-0x1.b3e44p-11
+-0x1.fc9e46p-16
+0x1.7d4f16p-1
+0x1.d220d2p-25
+-0x1.f327d6p-9
+0x1.0fbf54p-16
+-0x1.9d4c18p-18
+-0x1.6ab736p-5
+0x1.ecff82p-1
+-0x1.102122p-1
+-0x1.44a7fp-18
+0x1.369d18p-1
+0x1.2c1ec4p-1
+0x1.b2a4a2p-1
+0x1.1aa844p-18
+-0x1.2083e2p-1
+-0x1.158976p-1
+0x1.e3c782p-1
+-0x1.e08b04p-1
+0x1.290f16p-8
+0x1.7edf22p-1
+-0x1.521242p-2
+-0x1.0307d4p-18
+-0x1.ccb366p-1
+-0x1.95aa46p-1
+0x1.83b6d2p-13
+0x1.497778p-21
+0x1.265e68p-1
+0x1.857de2p-1
+-0x1.6e69d6p-24
+0x1.d4f01p-1
+0x1.9ab284p-15
+-0x1.17d9bp-1
+0x1.75a322p-1
+0x1.53a5d4p-1
+-0x1.618cp-1
+0x1.e99bd2p-1
+-0x1.89c342p-21
+-0x1.82b124p-21
+0x1.6b0486p-1
+-0x1.425982p-1
+-0x1.ecfff8p-2
+-0x1.90eac4p-1
+-0x1.ba38b6p-6
+0x1.1ebbb6p-22
+0x1.6c2ee2p-1
+-0x1.0c2d82p-1
+-0x1.6d7264p-1
+-0x1.43fe9p-4
+0x1.46eb62p-10
+0x1.e4e264p-4
+-0x1.96ef54p-1
+0x1.47dca6p-1
+0x1.08ea66p-4
+0x1.ef8f34p-6
+0x1.5b2b84p-10
+-0x1.2762d2p-1
+0x1.508d56p-1
+-0x1.2f6166p-24
+0x1.0260d4p-11
+-0x1.0988f6p-1
+-0x1.d35698p-14
+0x1.ffaf02p-1
+0x1.0afa02p-1
+0x1.c7cbb6p-6
+-0x1.23eb62p-1
+-0x1.b87e62p-1
+0x1.1646f4p-18
+0x1.4cd3ap-1
+-0x1.5c7a86p-14
+-0x1.9457a4p-1
+0x1.a154f6p-1
+0x1.ba8ad2p-6
+0x1.af9176p-1
+-0x1.430564p-8
+0x1.a2a2d2p-1
+0x1.df4c74p-1
+-0x1.d049e6p-23
+-0x1.325e34p-1
+0x1.3da496p-27
+-0x1.88d502p-8
+0x1.f41c06p-1
+-0x1.2e7716p-16
+-0x1.ab8a56p-1
+-0x1.b5e792p-1
+-0x1.c958c2p-12
+-0x1.0a0b96p-1
+0x1.b05f46p-1
+0x1.a21664p-8
+0x1.3049c6p-27
+0x1.e5ea44p-1
+-0x1.884176p-5
+0x1.45aa62p-13
+-0x1.634bc8p-1
+0x1.b68126p-9
+-0x1.97abfp-15
+0x1.f687e6p-5
+-0x1.1040e2p-25
+-0x1.6ba8e8p-10
+0x1.16e38p-1
+0x1.df2ad2p-26
+-0x1.8e1172p-1
+-0x1.b2264p-19
+-0x1.fa5552p-13
+-0x1.e8ad88p-1
+0x1.c91492p-26
+-0x1.4ec448p-1
+0x1.5f1862p-1
+-0x1.dce0e6p-1
+0x1.fa68d2p-1
+-0x1.919486p-1
+0x1.d303d6p-1
+-0x1.afff56p-23
+0x1.28b7d4p-16
+0x1.9ca494p-1
+-0x1.542a06p-1
+-0x1.f7e794p-7
+0x1.bb029p-15
+0x1.bba002p-1
+0x1.1ada36p-1
+-0x1.896d96p-21
+-0x1.3a3014p-1
+0x1.256444p-14
+-0x1.4ef374p-4
+0x1.04dac8p-1
+0x1.d46464p-1
+0x1.9c4674p-9
+-0x1.da6bd2p-1
+-0x1.eb2076p-1
+0x1.4aeba2p-11
+0x1.af791p-6
+0x1.04ad6p-1
+0x1.eafe16p-1
+0x1.1c65e6p-1
+-0x1.4eb612p-1
+-0x1.693d86p-10
+0x1.254d74p-2
+-0x1.ff34f2p-3