[prev in list] [next in list] [prev in thread] [next in thread] 

List:       glibc-cvs
Subject:    [glibc] Add benchtests for roundeven and roundevenf.
From:       Joseph Myers via Glibc-cvs <glibc-cvs () sourceware ! org>
Date:       2020-03-27 23:24:24
Message-ID: 20200327232424.1D95B385E00B () sourceware ! org
[Download RAW message or body]

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=642d5abaf11b033a1bfc88fd66f736f61a3fd17b

commit 642d5abaf11b033a1bfc88fd66f736f61a3fd17b
Author: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
Date:   Fri Mar 27 23:24:02 2020 +0000

    Add benchtests for roundeven and roundevenf.
    
    This patch adds benchtests for the roundeven and roundevenf functions.
    The inputs are copied from trunc-inputs.

Diff:
---
 benchtests/Makefile          |  6 ++++--
 benchtests/roundeven-inputs  | 22 ++++++++++++++++++++++
 benchtests/roundevenf-inputs | 21 +++++++++++++++++++++
 3 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 71b9565fed..335d643ecb 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -23,8 +23,8 @@ 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 powf trunc truncf expf exp2f logf log2f sincosf sinf \
-	      cosf isnan isinf isfinite hypot logb logbf
+	      fmaxf powf trunc truncf roundeven roundevenf expf exp2f logf \
+	      log2f sincosf sinf cosf isnan isinf isfinite hypot logb logbf
 
 bench-pthread := pthread_once thread_create
 
@@ -88,6 +88,8 @@ CFLAGS-bench-fmax.c += -fno-builtin
 CFLAGS-bench-fmaxf.c += -fno-builtin
 CFLAGS-bench-trunc.c += -fno-builtin
 CFLAGS-bench-truncf.c += -fno-builtin
+CFLAGS-bench-roundeven.c += -fno-builtin
+CFLAGS-bench-roundevenf.c += -fno-builtin
 CFLAGS-bench-isnan.c += -fsignaling-nans
 CFLAGS-bench-isinf.c += -fsignaling-nans
 CFLAGS-bench-isfinite.c += -fsignaling-nans
diff --git a/benchtests/roundeven-inputs b/benchtests/roundeven-inputs
new file mode 100644
index 0000000000..49ff407a6a
--- /dev/null
+++ b/benchtests/roundeven-inputs
@@ -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/roundevenf-inputs b/benchtests/roundevenf-inputs
new file mode 100644
index 0000000000..c37c5dacba
--- /dev/null
+++ b/benchtests/roundevenf-inputs
@@ -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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic