mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 16:21:06 +00:00
Add powf bench tests
Add powf() bench test with input which covers these cases: - positive base to positive exponent - exponent 0 - negative base to even exponent - exponent 1 - exponent -1 - squared - squareroot - 1 to negative exponent - -1 to negative exponent - base 0 - -1 to even exponent - small base - small exponent * benchtests/Makefile (bench-math): Add powf. * benchtests/powf-inputs: New file.
This commit is contained in:
parent
d8cee557e2
commit
4cedcaea8d
@ -1,3 +1,8 @@
|
||||
2017-06-20 Paul A. Clarke <pc@us.ibm.com>
|
||||
|
||||
* benchtests/Makefile (bench-math): Add powf.
|
||||
* benchtests/powf-inputs: New file.
|
||||
|
||||
2017-06-20 Zack Weinberg <zackw@panix.com>
|
||||
|
||||
* bits/string.h, string/bits/string.h
|
||||
|
@ -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 thread_create
|
||||
|
||||
|
331
benchtests/powf-inputs
Normal file
331
benchtests/powf-inputs
Normal file
@ -0,0 +1,331 @@
|
||||
## args: float:float
|
||||
## ret: float
|
||||
## includes: math.h
|
||||
# positive base to positive exponent
|
||||
0x1p-126, 0x0p+0
|
||||
0x1p-126, 0x1.d1745ep+0
|
||||
0x1p-126, 0x1.d1745ep+1
|
||||
0x1p-126, 0x1.5d1746p+2
|
||||
0x1p-126, 0x1.d1745ep+2
|
||||
0x1p-126, 0x1.22e8bap+3
|
||||
0x1p-126, 0x1.5d1746p+3
|
||||
0x1p-126, 0x1.9745dp+3
|
||||
0x1p-126, 0x1.d1745ep+3
|
||||
0x1p-126, 0x1.05d174p+4
|
||||
0x1p-126, 0x1.22e8bap+4
|
||||
0x1p-126, 0x1.4p+4
|
||||
0x1.d1745ep+2, 0x0p+0
|
||||
0x1.d1745ep+2, 0x1.d1745ep+0
|
||||
0x1.d1745ep+2, 0x1.d1745ep+1
|
||||
0x1.d1745ep+2, 0x1.5d1746p+2
|
||||
0x1.d1745ep+2, 0x1.d1745ep+2
|
||||
0x1.d1745ep+2, 0x1.22e8bap+3
|
||||
0x1.d1745ep+2, 0x1.5d1746p+3
|
||||
0x1.d1745ep+2, 0x1.9745dp+3
|
||||
0x1.d1745ep+2, 0x1.d1745ep+3
|
||||
0x1.d1745ep+2, 0x1.05d174p+4
|
||||
0x1.d1745ep+2, 0x1.22e8bap+4
|
||||
0x1.d1745ep+2, 0x1.4p+4
|
||||
0x1.d1745ep+3, 0x0p+0
|
||||
0x1.d1745ep+3, 0x1.d1745ep+0
|
||||
0x1.d1745ep+3, 0x1.d1745ep+1
|
||||
0x1.d1745ep+3, 0x1.5d1746p+2
|
||||
0x1.d1745ep+3, 0x1.d1745ep+2
|
||||
0x1.d1745ep+3, 0x1.22e8bap+3
|
||||
0x1.d1745ep+3, 0x1.5d1746p+3
|
||||
0x1.d1745ep+3, 0x1.9745dp+3
|
||||
0x1.d1745ep+3, 0x1.d1745ep+3
|
||||
0x1.d1745ep+3, 0x1.05d174p+4
|
||||
0x1.d1745ep+3, 0x1.22e8bap+4
|
||||
0x1.d1745ep+3, 0x1.4p+4
|
||||
0x1.5d1746p+4, 0x0p+0
|
||||
0x1.5d1746p+4, 0x1.d1745ep+0
|
||||
0x1.5d1746p+4, 0x1.d1745ep+1
|
||||
0x1.5d1746p+4, 0x1.5d1746p+2
|
||||
0x1.5d1746p+4, 0x1.d1745ep+2
|
||||
0x1.5d1746p+4, 0x1.22e8bap+3
|
||||
0x1.5d1746p+4, 0x1.5d1746p+3
|
||||
0x1.5d1746p+4, 0x1.9745dp+3
|
||||
0x1.5d1746p+4, 0x1.d1745ep+3
|
||||
0x1.5d1746p+4, 0x1.05d174p+4
|
||||
0x1.5d1746p+4, 0x1.22e8bap+4
|
||||
0x1.5d1746p+4, 0x1.4p+4
|
||||
0x1.d1745ep+4, 0x0p+0
|
||||
0x1.d1745ep+4, 0x1.d1745ep+0
|
||||
0x1.d1745ep+4, 0x1.d1745ep+1
|
||||
0x1.d1745ep+4, 0x1.5d1746p+2
|
||||
0x1.d1745ep+4, 0x1.d1745ep+2
|
||||
0x1.d1745ep+4, 0x1.22e8bap+3
|
||||
0x1.d1745ep+4, 0x1.5d1746p+3
|
||||
0x1.d1745ep+4, 0x1.9745dp+3
|
||||
0x1.d1745ep+4, 0x1.d1745ep+3
|
||||
0x1.d1745ep+4, 0x1.05d174p+4
|
||||
0x1.d1745ep+4, 0x1.22e8bap+4
|
||||
0x1.d1745ep+4, 0x1.4p+4
|
||||
0x1.22e8bap+5, 0x0p+0
|
||||
0x1.22e8bap+5, 0x1.d1745ep+0
|
||||
0x1.22e8bap+5, 0x1.d1745ep+1
|
||||
0x1.22e8bap+5, 0x1.5d1746p+2
|
||||
0x1.22e8bap+5, 0x1.d1745ep+2
|
||||
0x1.22e8bap+5, 0x1.22e8bap+3
|
||||
0x1.22e8bap+5, 0x1.5d1746p+3
|
||||
0x1.22e8bap+5, 0x1.9745dp+3
|
||||
0x1.22e8bap+5, 0x1.d1745ep+3
|
||||
0x1.22e8bap+5, 0x1.05d174p+4
|
||||
0x1.22e8bap+5, 0x1.22e8bap+4
|
||||
0x1.22e8bap+5, 0x1.4p+4
|
||||
0x1.5d1746p+5, 0x0p+0
|
||||
0x1.5d1746p+5, 0x1.d1745ep+0
|
||||
0x1.5d1746p+5, 0x1.d1745ep+1
|
||||
0x1.5d1746p+5, 0x1.5d1746p+2
|
||||
0x1.5d1746p+5, 0x1.d1745ep+2
|
||||
0x1.5d1746p+5, 0x1.22e8bap+3
|
||||
0x1.5d1746p+5, 0x1.5d1746p+3
|
||||
0x1.5d1746p+5, 0x1.9745dp+3
|
||||
0x1.5d1746p+5, 0x1.d1745ep+3
|
||||
0x1.5d1746p+5, 0x1.05d174p+4
|
||||
0x1.5d1746p+5, 0x1.22e8bap+4
|
||||
0x1.5d1746p+5, 0x1.4p+4
|
||||
0x1.9745dp+5, 0x0p+0
|
||||
0x1.9745dp+5, 0x1.d1745ep+0
|
||||
0x1.9745dp+5, 0x1.d1745ep+1
|
||||
0x1.9745dp+5, 0x1.5d1746p+2
|
||||
0x1.9745dp+5, 0x1.d1745ep+2
|
||||
0x1.9745dp+5, 0x1.22e8bap+3
|
||||
0x1.9745dp+5, 0x1.5d1746p+3
|
||||
0x1.9745dp+5, 0x1.9745dp+3
|
||||
0x1.9745dp+5, 0x1.d1745ep+3
|
||||
0x1.9745dp+5, 0x1.05d174p+4
|
||||
0x1.9745dp+5, 0x1.22e8bap+4
|
||||
0x1.9745dp+5, 0x1.4p+4
|
||||
0x1.d1745ep+5, 0x0p+0
|
||||
0x1.d1745ep+5, 0x1.d1745ep+0
|
||||
0x1.d1745ep+5, 0x1.d1745ep+1
|
||||
0x1.d1745ep+5, 0x1.5d1746p+2
|
||||
0x1.d1745ep+5, 0x1.d1745ep+2
|
||||
0x1.d1745ep+5, 0x1.22e8bap+3
|
||||
0x1.d1745ep+5, 0x1.5d1746p+3
|
||||
0x1.d1745ep+5, 0x1.9745dp+3
|
||||
0x1.d1745ep+5, 0x1.d1745ep+3
|
||||
0x1.d1745ep+5, 0x1.05d174p+4
|
||||
0x1.d1745ep+5, 0x1.22e8bap+4
|
||||
0x1.d1745ep+5, 0x1.4p+4
|
||||
0x1.05d174p+6, 0x0p+0
|
||||
0x1.05d174p+6, 0x1.d1745ep+0
|
||||
0x1.05d174p+6, 0x1.d1745ep+1
|
||||
0x1.05d174p+6, 0x1.5d1746p+2
|
||||
0x1.05d174p+6, 0x1.d1745ep+2
|
||||
0x1.05d174p+6, 0x1.22e8bap+3
|
||||
0x1.05d174p+6, 0x1.5d1746p+3
|
||||
0x1.05d174p+6, 0x1.9745dp+3
|
||||
0x1.05d174p+6, 0x1.d1745ep+3
|
||||
0x1.05d174p+6, 0x1.05d174p+4
|
||||
0x1.05d174p+6, 0x1.22e8bap+4
|
||||
0x1.05d174p+6, 0x1.4p+4
|
||||
0x1.22e8bap+6, 0x0p+0
|
||||
0x1.22e8bap+6, 0x1.d1745ep+0
|
||||
0x1.22e8bap+6, 0x1.d1745ep+1
|
||||
0x1.22e8bap+6, 0x1.5d1746p+2
|
||||
0x1.22e8bap+6, 0x1.d1745ep+2
|
||||
0x1.22e8bap+6, 0x1.22e8bap+3
|
||||
0x1.22e8bap+6, 0x1.5d1746p+3
|
||||
0x1.22e8bap+6, 0x1.9745dp+3
|
||||
0x1.22e8bap+6, 0x1.d1745ep+3
|
||||
0x1.22e8bap+6, 0x1.05d174p+4
|
||||
0x1.22e8bap+6, 0x1.22e8bap+4
|
||||
0x1.22e8bap+6, 0x1.4p+4
|
||||
0x1.4p+6, 0x0p+0
|
||||
0x1.4p+6, 0x1.d1745ep+0
|
||||
0x1.4p+6, 0x1.d1745ep+1
|
||||
0x1.4p+6, 0x1.5d1746p+2
|
||||
0x1.4p+6, 0x1.d1745ep+2
|
||||
0x1.4p+6, 0x1.22e8bap+3
|
||||
0x1.4p+6, 0x1.5d1746p+3
|
||||
0x1.4p+6, 0x1.9745dp+3
|
||||
0x1.4p+6, 0x1.d1745ep+3
|
||||
0x1.4p+6, 0x1.05d174p+4
|
||||
0x1.4p+6, 0x1.22e8bap+4
|
||||
0x1.4p+6, 0x1.4p+4
|
||||
# name: exponent 0
|
||||
-0x1.fffffep+127, 0x0p+0
|
||||
-0x1.333332p+127, 0x0p+0
|
||||
-0x1.999998p+125, 0x0p+0
|
||||
0x1.999998p+125, 0x0p+0
|
||||
0x1.333332p+127, 0x0p+0
|
||||
0x1.fffffep+127, 0x0p+0
|
||||
# negative base to even exponent
|
||||
-0x1.4p+2, -0x1.8p+3
|
||||
-0x1.4p+2, -0x1p+3
|
||||
-0x1.4p+2, -0x1p+2
|
||||
-0x1.4p+2, 0x0p+0
|
||||
-0x1.4p+2, 0x1p+2
|
||||
-0x1.4p+2, 0x1p+3
|
||||
-0x1.4p+2, 0x1.8p+3
|
||||
-0x1.1p+2, -0x1.8p+3
|
||||
-0x1.1p+2, -0x1p+3
|
||||
-0x1.1p+2, -0x1p+2
|
||||
-0x1.1p+2, 0x0p+0
|
||||
-0x1.1p+2, 0x1p+2
|
||||
-0x1.1p+2, 0x1p+3
|
||||
-0x1.1p+2, 0x1.8p+3
|
||||
-0x1.bffffep+1, -0x1.8p+3
|
||||
-0x1.bffffep+1, -0x1p+3
|
||||
-0x1.bffffep+1, -0x1p+2
|
||||
-0x1.bffffep+1, 0x0p+0
|
||||
-0x1.bffffep+1, 0x1p+2
|
||||
-0x1.bffffep+1, 0x1p+3
|
||||
-0x1.bffffep+1, 0x1.8p+3
|
||||
-0x1.6p+1, -0x1.8p+3
|
||||
-0x1.6p+1, -0x1p+3
|
||||
-0x1.6p+1, -0x1p+2
|
||||
-0x1.6p+1, 0x0p+0
|
||||
-0x1.6p+1, 0x1p+2
|
||||
-0x1.6p+1, 0x1p+3
|
||||
-0x1.6p+1, 0x1.8p+3
|
||||
-0x1p+1, -0x1.8p+3
|
||||
-0x1p+1, -0x1p+3
|
||||
-0x1p+1, -0x1p+2
|
||||
-0x1p+1, 0x0p+0
|
||||
-0x1p+1, 0x1p+2
|
||||
-0x1p+1, 0x1p+3
|
||||
-0x1p+1, 0x1.8p+3
|
||||
-0x1.4p+0, -0x1.8p+3
|
||||
-0x1.4p+0, -0x1p+3
|
||||
-0x1.4p+0, -0x1p+2
|
||||
-0x1.4p+0, 0x0p+0
|
||||
-0x1.4p+0, 0x1p+2
|
||||
-0x1.4p+0, 0x1p+3
|
||||
-0x1.4p+0, 0x1.8p+3
|
||||
-0x1p-1, -0x1.8p+3
|
||||
-0x1p-1, -0x1p+3
|
||||
-0x1p-1, -0x1p+2
|
||||
-0x1p-1, 0x0p+0
|
||||
-0x1p-1, 0x1p+2
|
||||
-0x1p-1, 0x1p+3
|
||||
-0x1p-1, 0x1.8p+3
|
||||
# exponent 1
|
||||
-0x1.fffffep+127, 0x1p+0
|
||||
-0x1.333332p+127, 0x1p+0
|
||||
-0x1.999998p+125, 0x1p+0
|
||||
0x1.999998p+125, 0x1p+0
|
||||
0x1.333332p+127, 0x1p+0
|
||||
0x1.fffffep+127, 0x1p+0
|
||||
# exponent -1
|
||||
-0x1.fffffep+127, -0x1p+0
|
||||
-0x1.333332p+127, -0x1p+0
|
||||
-0x1.999998p+125, -0x1p+0
|
||||
0x1.999998p+125, -0x1p+0
|
||||
0x1.333332p+127, -0x1p+0
|
||||
0x1.fffffep+127, -0x1p+0
|
||||
# squared
|
||||
-0x1.fffffep+63, 0x1p+1
|
||||
-0x1.333332p+63, 0x1p+1
|
||||
-0x1.999998p+61, 0x1p+1
|
||||
0x1.999998p+61, 0x1p+1
|
||||
0x1.333332p+63, 0x1p+1
|
||||
0x1.fffffep+63, 0x1p+1
|
||||
# squareroot
|
||||
0x0p+0, 0x1p-1
|
||||
0x1.999998p+125, 0x1p-1
|
||||
0x1.999998p+126, 0x1p-1
|
||||
0x1.333332p+127, 0x1p-1
|
||||
0x1.999998p+127, 0x1p-1
|
||||
0x1.fffffep+127, 0x1p-1
|
||||
# 1 to negative exponent
|
||||
0x1p+0, -0x1.fffffep+127
|
||||
0x1p+0, -0x1.999998p+127
|
||||
0x1p+0, -0x1.333332p+127
|
||||
0x1p+0, -0x1.999998p+126
|
||||
0x1p+0, -0x1.999998p+125
|
||||
# -1 to negative exponent
|
||||
-0x1p+0, -0x1.fffffep+127
|
||||
-0x1p+0, -0x1.999998p+127
|
||||
-0x1p+0, -0x1.333332p+127
|
||||
-0x1p+0, -0x1.999998p+126
|
||||
-0x1p+0, -0x1.999998p+125
|
||||
# base 0
|
||||
0x0p+0, 0x0p+0
|
||||
0x0p+0, 0x1.fffffep+126
|
||||
0x0p+0, 0x1.fffffep+127
|
||||
# -1 to even exponent
|
||||
-0x1p+0, -0x1.8p+3
|
||||
-0x1p+0, -0x1p+3
|
||||
-0x1p+0, -0x1p+2
|
||||
-0x1p+0, 0x0p+0
|
||||
-0x1p+0, 0x1p+2
|
||||
-0x1p+0, 0x1p+3
|
||||
-0x1p+0, 0x1.8p+3
|
||||
# small base
|
||||
0x1.fffffp-1, -0x1.d22a5p+22
|
||||
0x1.fffffp-1, -0x1.17b2fcp+22
|
||||
0x1.fffffp-1, -0x1.74eea4p+20
|
||||
0x1.fffffp-1, 0x1.74eebp+20
|
||||
0x1.fffffp-1, 0x1.17b2fcp+22
|
||||
0x1.fffffp-1, 0x1.d22a5p+22
|
||||
0x1.fffff8p-1, -0x1.d22a5p+22
|
||||
0x1.fffff8p-1, -0x1.17b2fcp+22
|
||||
0x1.fffff8p-1, -0x1.74eea4p+20
|
||||
0x1.fffff8p-1, 0x1.74eebp+20
|
||||
0x1.fffff8p-1, 0x1.17b2fcp+22
|
||||
0x1.fffff8p-1, 0x1.d22a5p+22
|
||||
0x1p+0, -0x1.d22a5p+22
|
||||
0x1p+0, -0x1.17b2fcp+22
|
||||
0x1p+0, -0x1.74eea4p+20
|
||||
0x1p+0, 0x1.74eebp+20
|
||||
0x1p+0, 0x1.17b2fcp+22
|
||||
0x1p+0, 0x1.d22a5p+22
|
||||
0x1.000004p+0, -0x1.d22a5p+22
|
||||
0x1.000004p+0, -0x1.17b2fcp+22
|
||||
0x1.000004p+0, -0x1.74eea4p+20
|
||||
0x1.000004p+0, 0x1.74eebp+20
|
||||
0x1.000004p+0, 0x1.17b2fcp+22
|
||||
0x1.000004p+0, 0x1.d22a5p+22
|
||||
0x1.000008p+0, -0x1.d22a5p+22
|
||||
0x1.000008p+0, -0x1.17b2fcp+22
|
||||
0x1.000008p+0, -0x1.74eea4p+20
|
||||
0x1.000008p+0, 0x1.74eebp+20
|
||||
0x1.000008p+0, 0x1.17b2fcp+22
|
||||
0x1.000008p+0, 0x1.d22a5p+22
|
||||
0x1.00001p+0, -0x1.d22a5p+22
|
||||
0x1.00001p+0, -0x1.17b2fcp+22
|
||||
0x1.00001p+0, -0x1.74eea4p+20
|
||||
0x1.00001p+0, 0x1.74eebp+20
|
||||
0x1.00001p+0, 0x1.17b2fcp+22
|
||||
0x1.00001p+0, 0x1.d22a5p+22
|
||||
# small exponent
|
||||
0x1p-126, -0x1p-32
|
||||
0x1p-126, -0x1.333334p-33
|
||||
0x1p-126, -0x1.99999cp-35
|
||||
0x1p-126, 0x1.9999ap-35
|
||||
0x1p-126, 0x1.333334p-33
|
||||
0x1p-126, 0x1p-32
|
||||
0x1.999998p+29, -0x1p-32
|
||||
0x1.999998p+29, -0x1.333334p-33
|
||||
0x1.999998p+29, -0x1.99999cp-35
|
||||
0x1.999998p+29, 0x1.9999ap-35
|
||||
0x1.999998p+29, 0x1.333334p-33
|
||||
0x1.999998p+29, 0x1p-32
|
||||
0x1.999998p+30, -0x1p-32
|
||||
0x1.999998p+30, -0x1.333334p-33
|
||||
0x1.999998p+30, -0x1.99999cp-35
|
||||
0x1.999998p+30, 0x1.9999ap-35
|
||||
0x1.999998p+30, 0x1.333334p-33
|
||||
0x1.999998p+30, 0x1p-32
|
||||
0x1.333332p+31, -0x1p-32
|
||||
0x1.333332p+31, -0x1.333334p-33
|
||||
0x1.333332p+31, -0x1.99999cp-35
|
||||
0x1.333332p+31, 0x1.9999ap-35
|
||||
0x1.333332p+31, 0x1.333334p-33
|
||||
0x1.333332p+31, 0x1p-32
|
||||
0x1.999998p+31, -0x1p-32
|
||||
0x1.999998p+31, -0x1.333334p-33
|
||||
0x1.999998p+31, -0x1.99999cp-35
|
||||
0x1.999998p+31, 0x1.9999ap-35
|
||||
0x1.999998p+31, 0x1.333334p-33
|
||||
0x1.999998p+31, 0x1p-32
|
||||
0x1.fffffep+31, -0x1p-32
|
||||
0x1.fffffep+31, -0x1.333334p-33
|
||||
0x1.fffffep+31, -0x1.99999cp-35
|
||||
0x1.fffffep+31, 0x1.9999ap-35
|
||||
0x1.fffffep+31, 0x1.333334p-33
|
||||
0x1.fffffep+31, 0x1p-32
|
Loading…
Reference in New Issue
Block a user