]> sourceware.org Git - glibc.git/commitdiff
benchtests: Add ilogb* tests
authorRaphael Moreira Zinsly <rzinsly@linux.ibm.com>
Thu, 3 Dec 2020 13:41:02 +0000 (10:41 -0300)
committerRaphael Moreira Zinsly <rzinsly@linux.ibm.com>
Tue, 16 Mar 2021 15:19:09 +0000 (12:19 -0300)
Add a benchtest to ilogb, ilogbf and ilogbf128 based on the logb* benchtests.

benchtests/Makefile
benchtests/ilogb-inputs [new file with mode: 0644]
benchtests/ilogbf-inputs [new file with mode: 0644]
benchtests/ilogbf128-inputs [new file with mode: 0644]

index 12bd25a57c1fc4f5c774d31a8aab0110643ebf44..0c99547074952ffbc2475a8c0c01030953a3a6f7 100644 (file)
@@ -25,10 +25,10 @@ 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 powf trunc truncf roundeven roundevenf expf exp2f logf \
              log2f sincosf sinf cosf isnan isinf isfinite hypot logb logbf \
-             exp10f
+             exp10f ilogb ilogbf
 
 ifneq (,$(filter yes,$(float128-fcts) $(float128-alias-fcts)))
-bench-math += expf128 powf128 sinf128
+bench-math += expf128 powf128 sinf128 ilogbf128
 endif
 
 bench-pthread := pthread_once thread_create pthread-locks
diff --git a/benchtests/ilogb-inputs b/benchtests/ilogb-inputs
new file mode 100644 (file)
index 0000000..4b3b38b
--- /dev/null
@@ -0,0 +1,11 @@
+## args: double
+## ret: int
+## includes: math.h
+
+## name: subnormal
+0x0.0000000000001p-1022
+0x0.fffffffffffffp-1022
+
+## name: normal
+1.0
+1024.0
diff --git a/benchtests/ilogbf-inputs b/benchtests/ilogbf-inputs
new file mode 100644 (file)
index 0000000..ea391d3
--- /dev/null
@@ -0,0 +1,11 @@
+## args: float
+## ret: int
+## includes: math.h
+
+## name: subnormal
+0x1p-149
+0x1.fffff8p-128
+
+## name: normal
+1.0
+1024.0
diff --git a/benchtests/ilogbf128-inputs b/benchtests/ilogbf128-inputs
new file mode 100644 (file)
index 0000000..bfbfc93
--- /dev/null
@@ -0,0 +1,11 @@
+## args: _Float128
+## ret: int
+## includes: math.h
+
+## name: subnormal
+6.47517511943802511092443895822764655e-4966f128
+0x1.fffffffffffffff8p-16383f128
+
+## name: normal
+1.0
+-0x8.2faf442f390a9211f5af128673fp+0L
This page took 0.043338 seconds and 5 git commands to generate.