From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id C06E1385828E; Fri, 23 Feb 2024 11:50:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C06E1385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708689056; bh=mg0LqIxlOxOalq80ShFTJjqH9agq0an0NQNTYj9V8oY=; h=From:To:Subject:Date:From; b=ooH9QUGJKajK/I2OBrPnVyFqSCEgrf1ZqUXEWTnaBcgx8dteFNKQqj9IJXXi3kerl 6gTXlykRSCGJeyA8Mit4gQx7hHMc6BGewDuC++UwfbqijB13BDhwwhCy8oh9SGlvt6 hFuwcXSVa0shFzzb8MCvyKzNe/Isys+9/6fIERPY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] benchtests: Add more benchtests for rounding functions. X-Act-Checkin: glibc X-Git-Author: Junxian Zhu X-Git-Refname: refs/heads/master X-Git-Oldrev: 59e0441d4a1198aa9d21643a6e4f370faec4ffbf X-Git-Newrev: 0a4d6c825405bb0dd5058566b01f12704cfc3731 Message-Id: <20240223115056.C06E1385828E@sourceware.org> Date: Fri, 23 Feb 2024 11:50:56 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0a4d6c825405bb0dd5058566b01f12704cfc3731 commit 0a4d6c825405bb0dd5058566b01f12704cfc3731 Author: Junxian Zhu Date: Mon Jan 22 10:16:19 2024 +0800 benchtests: Add more benchtests for rounding functions. 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 Diff: --- benchtests/Makefile | 11 +++++++++++ benchtests/ceil-inputs | 22 ++++++++++++++++++++++ benchtests/ceilf-inputs | 21 +++++++++++++++++++++ benchtests/floor-inputs | 22 ++++++++++++++++++++++ benchtests/floorf-inputs | 21 +++++++++++++++++++++ benchtests/llrint-inputs | 22 ++++++++++++++++++++++ benchtests/llrintf-inputs | 21 +++++++++++++++++++++ benchtests/lrint-inputs | 22 ++++++++++++++++++++++ benchtests/lrintf-inputs | 21 +++++++++++++++++++++ benchtests/nearbyint-inputs | 22 ++++++++++++++++++++++ benchtests/nearbyintf-inputs | 21 +++++++++++++++++++++ benchtests/rintf-inputs | 7 +++++++ 12 files changed, 233 insertions(+) diff --git a/benchtests/Makefile b/benchtests/Makefile index 4fb9bae023..05b8751c55 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -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 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/ceil-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/ceilf-inputs b/benchtests/ceilf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/ceilf-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 diff --git a/benchtests/floor-inputs b/benchtests/floor-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/floor-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/floorf-inputs b/benchtests/floorf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/floorf-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 diff --git a/benchtests/llrint-inputs b/benchtests/llrint-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/llrint-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/llrintf-inputs b/benchtests/llrintf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/llrintf-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 diff --git a/benchtests/lrint-inputs b/benchtests/lrint-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/lrint-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/lrintf-inputs b/benchtests/lrintf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/lrintf-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 diff --git a/benchtests/nearbyint-inputs b/benchtests/nearbyint-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/nearbyint-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/nearbyintf-inputs b/benchtests/nearbyintf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/nearbyintf-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 diff --git a/benchtests/rintf-inputs b/benchtests/rintf-inputs new file mode 100644 index 0000000000..f7c6f06789 --- /dev/null +++ b/benchtests/rintf-inputs @@ -0,0 +1,7 @@ +## args: float +## ret: float +## includes: math.h +78.5 +-78.5 +4503599627370497.0 +-4503599627370497.0