]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
benchtests: Add more benchtests for rounding functions.
authorJunxian Zhu <zhujunxian@oss.cipunited.com>
Mon, 22 Jan 2024 02:16:19 +0000 (10:16 +0800)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 23 Feb 2024 11:50:00 +0000 (08:50 -0300)
This patch adds more benchtests for rounding functions.
The double inputs are copied from trunc-inputs, the float inputs are copied from truncf-inputs. and the rintf is copied from rint-inputs.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
12 files changed:
benchtests/Makefile
benchtests/ceil-inputs [new file with mode: 0644]
benchtests/ceilf-inputs [new file with mode: 0644]
benchtests/floor-inputs [new file with mode: 0644]
benchtests/floorf-inputs [new file with mode: 0644]
benchtests/llrint-inputs [new file with mode: 0644]
benchtests/llrintf-inputs [new file with mode: 0644]
benchtests/lrint-inputs [new file with mode: 0644]
benchtests/lrintf-inputs [new file with mode: 0644]
benchtests/nearbyint-inputs [new file with mode: 0644]
benchtests/nearbyintf-inputs [new file with mode: 0644]
benchtests/rintf-inputs [new file with mode: 0644]

index 4fb9bae0232bfa186a39e63e3f9ed40e0791d7c8..05b8751c55e7eb862efef9d99421fbbf2f4febb2 100644 (file)
@@ -32,6 +32,8 @@ bench-math := \
   atan2 \
   atanh \
   cbrt \
+  ceil \
+  ceilf \
   cos \
   cosf \
   cosh \
@@ -44,6 +46,8 @@ bench-math := \
   exp2f \
   expf \
   expm1 \
+  floor \
+  floorf \
   fmax \
   fmaxf \
   fmin \
@@ -60,6 +64,8 @@ bench-math := \
   j0 \
   j1 \
   lgamma \
+  llrint \
+  llrintf \
   log \
   log10 \
   log1p \
@@ -68,10 +74,15 @@ bench-math := \
   logb \
   logbf \
   logf \
+  lrint \
+  lrintf \
   modf \
+  nearbyint \
+  nearbyintf \
   pow \
   powf \
   rint \
+  rintf \
   roundeven \
   roundevenf \
   sin \
diff --git a/benchtests/ceil-inputs b/benchtests/ceil-inputs
new file mode 100644 (file)
index 0000000..49ff407
--- /dev/null
@@ -0,0 +1,22 @@
+## args: double
+## ret: double
+## includes: math.h
+0.0
+-0.0
+0.001
+-0.001
+0.5
+-0.5
+0.999
+-0.999
+1.0
+-1.0
+1.001
+-1.001
+123.5
+-123.5
+12345.1
+-1000000.1
+1e15
+-1e30
+1e200
diff --git a/benchtests/ceilf-inputs b/benchtests/ceilf-inputs
new file mode 100644 (file)
index 0000000..c37c5da
--- /dev/null
@@ -0,0 +1,21 @@
+## args: float
+## ret: float
+## includes: math.h
+0.0f
+-0.0f
+0.001f
+-0.001f
+0.5f
+-0.5f
+0.999f
+-0.999f
+1.0f
+-1.0f
+1.001f
+-1.001f
+123.5f
+-123.5f
+12345.1f
+-1000000.5f
+1e15f
+-1e30f
diff --git a/benchtests/floor-inputs b/benchtests/floor-inputs
new file mode 100644 (file)
index 0000000..49ff407
--- /dev/null
@@ -0,0 +1,22 @@
+## args: double
+## ret: double
+## includes: math.h
+0.0
+-0.0
+0.001
+-0.001
+0.5
+-0.5
+0.999
+-0.999
+1.0
+-1.0
+1.001
+-1.001
+123.5
+-123.5
+12345.1
+-1000000.1
+1e15
+-1e30
+1e200
diff --git a/benchtests/floorf-inputs b/benchtests/floorf-inputs
new file mode 100644 (file)
index 0000000..c37c5da
--- /dev/null
@@ -0,0 +1,21 @@
+## args: float
+## ret: float
+## includes: math.h
+0.0f
+-0.0f
+0.001f
+-0.001f
+0.5f
+-0.5f
+0.999f
+-0.999f
+1.0f
+-1.0f
+1.001f
+-1.001f
+123.5f
+-123.5f
+12345.1f
+-1000000.5f
+1e15f
+-1e30f
diff --git a/benchtests/llrint-inputs b/benchtests/llrint-inputs
new file mode 100644 (file)
index 0000000..49ff407
--- /dev/null
@@ -0,0 +1,22 @@
+## args: double
+## ret: double
+## includes: math.h
+0.0
+-0.0
+0.001
+-0.001
+0.5
+-0.5
+0.999
+-0.999
+1.0
+-1.0
+1.001
+-1.001
+123.5
+-123.5
+12345.1
+-1000000.1
+1e15
+-1e30
+1e200
diff --git a/benchtests/llrintf-inputs b/benchtests/llrintf-inputs
new file mode 100644 (file)
index 0000000..c37c5da
--- /dev/null
@@ -0,0 +1,21 @@
+## args: float
+## ret: float
+## includes: math.h
+0.0f
+-0.0f
+0.001f
+-0.001f
+0.5f
+-0.5f
+0.999f
+-0.999f
+1.0f
+-1.0f
+1.001f
+-1.001f
+123.5f
+-123.5f
+12345.1f
+-1000000.5f
+1e15f
+-1e30f
diff --git a/benchtests/lrint-inputs b/benchtests/lrint-inputs
new file mode 100644 (file)
index 0000000..49ff407
--- /dev/null
@@ -0,0 +1,22 @@
+## args: double
+## ret: double
+## includes: math.h
+0.0
+-0.0
+0.001
+-0.001
+0.5
+-0.5
+0.999
+-0.999
+1.0
+-1.0
+1.001
+-1.001
+123.5
+-123.5
+12345.1
+-1000000.1
+1e15
+-1e30
+1e200
diff --git a/benchtests/lrintf-inputs b/benchtests/lrintf-inputs
new file mode 100644 (file)
index 0000000..c37c5da
--- /dev/null
@@ -0,0 +1,21 @@
+## args: float
+## ret: float
+## includes: math.h
+0.0f
+-0.0f
+0.001f
+-0.001f
+0.5f
+-0.5f
+0.999f
+-0.999f
+1.0f
+-1.0f
+1.001f
+-1.001f
+123.5f
+-123.5f
+12345.1f
+-1000000.5f
+1e15f
+-1e30f
diff --git a/benchtests/nearbyint-inputs b/benchtests/nearbyint-inputs
new file mode 100644 (file)
index 0000000..49ff407
--- /dev/null
@@ -0,0 +1,22 @@
+## args: double
+## ret: double
+## includes: math.h
+0.0
+-0.0
+0.001
+-0.001
+0.5
+-0.5
+0.999
+-0.999
+1.0
+-1.0
+1.001
+-1.001
+123.5
+-123.5
+12345.1
+-1000000.1
+1e15
+-1e30
+1e200
diff --git a/benchtests/nearbyintf-inputs b/benchtests/nearbyintf-inputs
new file mode 100644 (file)
index 0000000..c37c5da
--- /dev/null
@@ -0,0 +1,21 @@
+## args: float
+## ret: float
+## includes: math.h
+0.0f
+-0.0f
+0.001f
+-0.001f
+0.5f
+-0.5f
+0.999f
+-0.999f
+1.0f
+-1.0f
+1.001f
+-1.001f
+123.5f
+-123.5f
+12345.1f
+-1000000.5f
+1e15f
+-1e30f
diff --git a/benchtests/rintf-inputs b/benchtests/rintf-inputs
new file mode 100644 (file)
index 0000000..f7c6f06
--- /dev/null
@@ -0,0 +1,7 @@
+## args: float
+## ret: float
+## includes: math.h
+78.5
+-78.5
+4503599627370497.0
+-4503599627370497.0