Add powf bench tests

Message ID c798fa20-43d1-ef63-adce-85d91627233f@us.ibm.com
State Superseded
Delegated to: Joseph Myers
Headers

Commit Message

Paul A. Clarke June 9, 2017, 9:53 p.m. UTC
  2017-06-09  Paul A. Clarke  <pc@us.ibm.com>

	* benchtests/Makefile (bench-math): Add powf.
	* benchtests/powf-inputs: Copy from benchtests/pow-inputs.
---
 benchtests/Makefile                    | 2 +-
 benchtests/{pow-inputs => powf-inputs} | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
 copy benchtests/{pow-inputs => powf-inputs} (99%)
  

Comments

Joseph Myers June 9, 2017, 10:30 p.m. UTC | #1
On Fri, 9 Jun 2017, Paul Clarke wrote:

> diff --git a/benchtests/pow-inputs b/benchtests/powf-inputs
> similarity index 99%
> copy from benchtests/pow-inputs
> copy to benchtests/powf-inputs

A large proportion of the pow inputs are sufficiently large or small that 
they would round to 0 or infinity as float values, or the result would 
round to 0, infinity or 1 as a float value.  I don't think such special 
cases should be considered typical and so I don't think copying the pow 
inputs is a good way of producing a set of benchmark inputs to powf.
  

Patch

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 7f5fda5..f49e9a0 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -23,7 +23,7 @@  subdir := benchtests
 include ../Makeconfig
 bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \
 	      modf pow rint sin sincos sinh sqrt tan tanh fmin fmax fminf \
-	      fmaxf
+	      fmaxf powf
 
 bench-pthread := pthread_once
 
diff --git a/benchtests/pow-inputs b/benchtests/powf-inputs
similarity index 99%
copy from benchtests/pow-inputs
copy to benchtests/powf-inputs
index 78f8ac7..cb8620d 100644
--- a/benchtests/pow-inputs
+++ b/benchtests/powf-inputs
@@ -1,5 +1,5 @@ 
-## args: double:double
-## ret: double
+## args: float:float
+## ret: float
 ## includes: math.h
 42.0, 42.0
 -0x1.086f771a2b37bp696, 0x1.592b453fe869fp-81