unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
To: libc-alpha@sourceware.org
Cc: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
Subject: [PATCH] Add benchtests for roundeven and roundevenf.
Date: Fri,  6 Mar 2020 01:23:57 +0800	[thread overview]
Message-ID: <20200305172357.3124428-1-ibmibmibm.tw@gmail.com> (raw)

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

        * benchtests/Makefile (bench-math): Add roundeven and roundevenff.
        * benchtests/roundeven-inputs: New file.
        * benchtests/roundevenf-inputs: Likewise.
---
 benchtests/Makefile          |  6 ++++--
 benchtests/roundeven-inputs  | 22 ++++++++++++++++++++++
 benchtests/roundevenf-inputs | 21 +++++++++++++++++++++
 3 files changed, 47 insertions(+), 2 deletions(-)
 create mode 100644 benchtests/roundeven-inputs
 create mode 100644 benchtests/roundevenf-inputs

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
-- 
2.25.1


             reply	other threads:[~2020-03-05 17:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 17:23 Shen-Ta Hsieh [this message]
2020-03-27 23:25 ` [PATCH] Add benchtests for roundeven and roundevenf Joseph Myers
2020-05-02 15:02   ` [PATCH v4 1/2] math: redirect roundeven function Shen-Ta Hsieh via Libc-alpha
2020-05-02 15:02   ` [PATCH v4 2/2] x86_64: roundeven with sse4.1 support Shen-Ta Hsieh via Libc-alpha
2020-05-28 12:05     ` H.J. Lu via Libc-alpha
2020-05-28 12:22       ` Florian Weimer via Libc-alpha
2020-05-28 12:31         ` H.J. Lu via Libc-alpha
2020-05-29  8:48           ` Cui, Lili via Libc-alpha
2020-05-29 11:29             ` H.J. Lu via Libc-alpha
2020-06-01  1:28               ` Cui, Lili via Libc-alpha
2020-06-01  2:04                 ` H.J. Lu via Libc-alpha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200305172357.3124428-1-ibmibmibm.tw@gmail.com \
    --to=ibmibmibm.tw@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).