From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Cc: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
Paul Zimmermann <Paul.Zimmermann@inria.fr>
Subject: [PATCH v3 08/12] math: Use sincosf from CORE-MATH
Date: Wed, 23 Sep 2026 18:50:49 -0300 [thread overview]
Message-ID: <20260923215118.2608685-9-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20260923215118.2608685-1-adhemerval.zanella@linaro.org>
The CORE-MATH implementation is correctly rounded (in any rounding mode)
and performs similarly.
* latency
- input: random [-pi, pi]
master patched improvement
x86_64 12.5512 11.1108 12.96%
x86_64v2 12.6094 11.1648 12.94%
x86_64v3 12.4137 11.1563 11.27%
aarch64 9.1758 10.1564 -9.65%
power10 5.0943 4.9589 2.73%
loongarch 2.5712 2.5029 2.73%
- input: moderate [3*pi, 2^26)
master patched improvement
x86_64 17.5750 12.5725 39.79%
x86_64v2 17.6042 13.3637 31.73%
x86_64v3 17.8084 13.3737 33.16%
aarch64 10.6784 11.3802 -6.17%
power10 6.7397 5.1304 31.37%
loongarch 2.7792 2.6993 2.96%
- input: huge [2^26, FLT_MAX]
master patched improvement
x86_64 18.5452 28.0835 -33.96%
x86_64v2 18.6174 28.0867 -33.71%
x86_64v3 19.0829 26.8577 -28.95%
aarch64 10.0751 19.5618 -48.50%
power10 7.6855 9.1092 -15.63%
loongarch 2.6530 4.0716 -34.84%
- input: spec2017.blender (526.blender_r sin trace)
master patched improvement
x86_64 13.3663 11.2555 18.75%
x86_64v2 13.4356 11.1571 20.42%
x86_64v3 13.3409 11.1726 19.41%
aarch64 9.1439 10.1583 -9.99%
power10 5.5150 4.8806 13.00%
loongarch 2.5423 2.5025 1.59%
* reciprocal-throughput
- input: random [-pi, pi]
master patched improvement
x86_64 12.3122 11.1080 10.84%
x86_64v2 12.3726 11.1606 10.86%
x86_64v3 12.3469 11.1644 10.59%
aarch64 9.1767 10.1239 -9.36%
power10 5.1895 4.9360 5.14%
loongarch 2.5718 2.5026 2.77%
- input: moderate [3*pi, 2^26)
master patched improvement
x86_64 17.5620 12.0521 45.72%
x86_64v2 17.6172 12.5897 39.93%
x86_64v3 17.8137 13.3711 33.23%
aarch64 10.6574 11.3751 -6.31%
power10 6.6460 5.1526 28.98%
loongarch 2.7793 2.6959 3.09%
- input: huge [2^26, FLT_MAX]
master patched improvement
x86_64 18.5399 28.0494 -33.90%
x86_64v2 18.6146 28.0991 -33.75%
x86_64v3 19.0775 26.8567 -28.97%
aarch64 10.1080 19.5576 -48.32%
power10 7.6618 9.0993 -15.80%
loongarch 2.6532 4.0697 -34.81%
- input: spec2017.blender (526.blender_r sin trace)
master patched improvement
x86_64 13.2879 11.2453 18.16%
x86_64v2 13.3692 11.1517 19.88%
x86_64v3 13.2673 11.1726 18.75%
aarch64 9.1475 10.1232 -9.64%
power10 5.5467 4.8679 13.94%
loongarch 2.5429 2.5030 1.59%
All the benchmarks were run with gcc 16.2.1 and
--enable-stack-protector=strong. The x86_64 row is the -march=x86-64
build on a Ryzen 9 5900X, where the FMA/AVX2 ifunc variant is selected;
x86_64v2 and x86_64v3 are builds with -march=x86-64-v2 and
-march=x86-64-v3; aarch64 is a Neoverse-N1, power10 a POWER10 built
with -mcpu=power8, and loongarch a Loongson-3C5000L-LL from the
compiler farm.
The random and moderate workloads, which cover every argument seen in
the SPEC CPU2017 traces, improve on every target except on aarch64.
The huge workload (|x| >= 2^26, no traced caller) is slower everywhere,
since the correctly rounded large-argument reduction (a 128-bit
fixed-point product of the mantissa by 4/pi) replaces the 96-bit integer
sequence of the current code.
The code is adapted to glibc style and to use the math_config
definition.h (to handle errno, overflow, and underflow).
Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu,
and powerpc64le-linux-gnu.
---
SHARED-FILES | 4 +-
math/auto-libm-test-in | 1 +
math/auto-libm-test-out-sincos | 25 ++
sysdeps/ieee754/flt-32/libm-test-ulps | 12 +
sysdeps/ieee754/flt-32/s_sincosf.c | 254 +++++++++++++-----
sysdeps/ieee754/flt-32/s_sincosf_data.h | 13 +
.../ieee754/flt-32/s_sincosf_data_generic.c | 13 +
7 files changed, 247 insertions(+), 75 deletions(-)
diff --git a/SHARED-FILES b/SHARED-FILES
index 6853931c7a4..3049ea52ecc 100644
--- a/SHARED-FILES
+++ b/SHARED-FILES
@@ -330,6 +330,8 @@ core-math:
# src/binary32/sin/sinf.c, revision ac1993d8
sysdeps/ieee754/flt-32/s_sinf.c
sysdeps/ieee754/flt-32/s_sincosf_data_generic.c
+ # src/binary32/sincos/sincosf.c, revision ac1993d8
+ sysdeps/ieee754/flt-32/s_sincosf.c
# src/binary32/sinpi/sinpif.c, revision bbfabd99d
sysdeps/ieee754/flt-32/s_sinpif.c
# src/binary32/tan/tanf.c, revision 59d21d7
@@ -373,8 +375,6 @@ arm-optimized-routines:
sysdeps/ieee754/flt-32/e_powf.c
# math/powf_log2_data.c, revision 189dfef
sysdeps/ieee754/flt-32/e_powf_log2_data.c
- # math/sincosf.c, revision af29d39
- sysdeps/ieee754/flt-32/s_sincosf.c
# math/sincosf.h, revision aed553c
sysdeps/ieee754/flt-32/s_sincosf.h
# math/sincosf_data.c, revision 189dfef
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 939da2c8334..4cc03998f49 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -9526,6 +9526,7 @@ sincos 1e22
sincos 0x1p1023
sincos 0x1p16383
sincos 0x1p+120
+sincos 0x1p-126
sincos 0x1p+127
sincos 0x1.fffff8p+127
sincos 0x1.fffffep+127
diff --git a/math/auto-libm-test-out-sincos b/math/auto-libm-test-out-sincos
index f0457631a9c..085b9f421ae 100644
--- a/math/auto-libm-test-out-sincos
+++ b/math/auto-libm-test-out-sincos
@@ -1197,6 +1197,31 @@ sincos 0x1p+120
= sincos tonearest ibm128 0x1p+120 : 0x6.0b8d19579bf2db5e5f1aa933f4p-4 -0xe.d06685b36c66c4cf35c11f6518p-4 : inexact-ok
= sincos towardzero ibm128 0x1p+120 : 0x6.0b8d19579bf2db5e5f1aa933f2p-4 -0xe.d06685b36c66c4cf35c11f6518p-4 : inexact-ok
= sincos upward ibm128 0x1p+120 : 0x6.0b8d19579bf2db5e5f1aa933f4p-4 -0xe.d06685b36c66c4cf35c11f6518p-4 : inexact-ok
+sincos 0x1p-126
+= sincos downward binary32 0x4p-128 : 0x3.fffff8p-128 0xf.fffffp-4 : inexact-ok underflow-ok errno-erange-ok
+= sincos tonearest binary32 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok underflow-ok errno-erange-ok
+= sincos towardzero binary32 0x4p-128 : 0x3.fffff8p-128 0xf.fffffp-4 : inexact-ok underflow-ok errno-erange-ok
+= sincos upward binary32 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok underflow-ok errno-erange-ok
+= sincos downward binary64 0x4p-128 : 0x3.ffffffffffffep-128 0xf.ffffffffffff8p-4 : inexact-ok
+= sincos tonearest binary64 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos towardzero binary64 0x4p-128 : 0x3.ffffffffffffep-128 0xf.ffffffffffff8p-4 : inexact-ok
+= sincos upward binary64 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos downward intel96 0x4p-128 : 0x3.fffffffffffffffcp-128 0xf.fffffffffffffffp-4 : inexact-ok
+= sincos tonearest intel96 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos towardzero intel96 0x4p-128 : 0x3.fffffffffffffffcp-128 0xf.fffffffffffffffp-4 : inexact-ok
+= sincos upward intel96 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos downward m68k96 0x4p-128 : 0x3.fffffffffffffffcp-128 0xf.fffffffffffffffp-4 : inexact-ok
+= sincos tonearest m68k96 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos towardzero m68k96 0x4p-128 : 0x3.fffffffffffffffcp-128 0xf.fffffffffffffffp-4 : inexact-ok
+= sincos upward m68k96 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos downward binary128 0x4p-128 : 0x3.fffffffffffffffffffffffffffep-128 0xf.fffffffffffffffffffffffffff8p-4 : inexact-ok
+= sincos tonearest binary128 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos towardzero binary128 0x4p-128 : 0x3.fffffffffffffffffffffffffffep-128 0xf.fffffffffffffffffffffffffff8p-4 : inexact-ok
+= sincos upward binary128 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos downward ibm128 0x4p-128 : 0x3.ffffffffffffffffffffffffffp-128 0xf.fffffffffffffffffffffffffcp-4 : inexact-ok
+= sincos tonearest ibm128 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
+= sincos towardzero ibm128 0x4p-128 : 0x3.ffffffffffffffffffffffffffp-128 0xf.fffffffffffffffffffffffffcp-4 : inexact-ok
+= sincos upward ibm128 0x4p-128 : 0x4p-128 0x1p+0 : inexact-ok
sincos 0x1p+127
= sincos downward binary32 0x8p+124 : 0x9.f9631p-4 0xc.82b8ep-4 : inexact-ok
= sincos tonearest binary32 0x8p+124 : 0x9.f9631p-4 0xc.82b8fp-4 : inexact-ok
diff --git a/sysdeps/ieee754/flt-32/libm-test-ulps b/sysdeps/ieee754/flt-32/libm-test-ulps
index 01792230183..dfe78a63c8f 100644
--- a/sysdeps/ieee754/flt-32/libm-test-ulps
+++ b/sysdeps/ieee754/flt-32/libm-test-ulps
@@ -275,6 +275,18 @@ float: 0
Function: "sin_upward":
float: 0
+Function: "sincos":
+float: 0
+
+Function: "sincos_downward":
+float: 0
+
+Function: "sincos_towardzero":
+float: 0
+
+Function: "sincos_upward":
+float: 0
+
Function: "sinh":
float: 0
diff --git a/sysdeps/ieee754/flt-32/s_sincosf.c b/sysdeps/ieee754/flt-32/s_sincosf.c
index fd49d20b58e..83556e5372b 100644
--- a/sysdeps/ieee754/flt-32/s_sincosf.c
+++ b/sysdeps/ieee754/flt-32/s_sincosf.c
@@ -1,28 +1,35 @@
-/* Compute sine and cosine of argument.
- Copyright (C) 2018-2026 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
+/* Correctly-rounded sincos of binary32 value.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+Copyright (c) 2024-2025 Alexei Sibidanov
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+The original version of this file was copied from the CORE-MATH
+project (file src/binary32/sincos/sincosf.c, revision ac1993d8).
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-#include <errno.h>
-#include <stdint.h>
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+#include <array_length.h>
#include <math.h>
-#include <math-barriers.h>
#include <libm-alias-float.h>
#include "math_config.h"
-#include "s_sincosf.h"
+#include <math_uint128.h>
+#include <s_sincosf_data.h>
#ifndef SECTION
# define SECTION
@@ -34,73 +41,174 @@
# define SINCOSF_FUNC SINCOSF
#endif
-/* Fast sincosf implementation. Worst-case ULP is 0.5607, maximum relative
- error is 0.5303 * 2^-23. A single-step range reduction is used for
- small values. Large inputs have their range reduced using fast integer
- arithmetic. */
-void
-SECTION
-SINCOSF_FUNC (float y, float *sinp, float *cosp)
+static double __attribute__ ((noinline))
+rbig (uint32_t u, int *q)
{
- double x = y;
- double s;
- int n;
- const sincos_t *p = &__sincosf_table[0];
-
- if (abstop12 (y) < abstop12 (pio4))
+ int e = (u >> 23) & 0xff, i;
+ uint64_t m = (u & (~0u >> 9)) | 1 << 23;
+ u128 p0 = u128_mul (u128_from_u64 (m), u128_from_u64 (IPI[0]));
+ u128 p1 = u128_mul (u128_from_u64 (m), u128_from_u64 (IPI[1]));
+ p1 = u128_add (p1, u128_rshift (p0, 64));
+ u128 p2 = u128_mul (u128_from_u64 (m), u128_from_u64 (IPI[2]));
+ p2 = u128_add (p2, u128_rshift (p1, 64));
+ u128 p3 = u128_mul (u128_from_u64 (m), u128_from_u64 (IPI[3]));
+ p3 = u128_add (p3, u128_rshift (p2, 64));
+ uint64_t p3h = u128_high (p3), p3l = u128_low (p3), p2l = u128_low (p2),
+ p1l = u128_low (p1);
+ int64_t a;
+ int k = e - 124, s = k - 23;
+ /* in cr_sinf(), rbig() is called in the case 127+28 <= e < 0xff
+ thus 155 <= e <= 254, which yields 28 <= k <= 127 and 5 <= s <= 104 */
+ if (s < 64)
{
- double x2 = x * x;
+ i = p3h << s | p3l >> (64 - s);
+ a = p3l << s | p2l >> (64 - s);
+ }
+ else if (s == 64)
+ {
+ i = p3l;
+ a = p2l;
+ }
+ else
+ { /* s > 64 */
+ i = p3l << (s - 64) | p2l >> (128 - s);
+ a = p2l << (s - 64) | p1l >> (128 - s);
+ }
+ int sgn = u;
+ sgn >>= 31;
+ int64_t sm = a >> 63;
+ i -= sm;
+ double z = (a ^ sgn) * 0x1p-64;
+ i = (i ^ sgn) - sgn;
+ *q = i;
+ return z;
+}
- if (__glibc_unlikely (abstop12 (y) < abstop12 (0x1p-12f)))
+static inline double
+rltl (float z, int *q)
+{
+ double x = z;
+ double idl = -0x1.b1bbead603d8bp-29 * x, idh = 0x1.45f306ep+2 * x,
+ id = roundeven_finite (idh);
+ *q = asuint64 (0x1.8p52 + id);
+ return (idh - id) + idl;
+}
+
+static inline double
+rltl0 (double x, int *q)
+{
+ double idh = 0x1.45f306dc9c883p+2 * x, id = roundeven_finite (idh);
+ *q = asuint64 (0x1.8p52 + id);
+ return idh - id;
+}
+
+static inline float
+add_sign (float x, float rh, float rl)
+{
+ float sgn = copysignf (1.0f, x);
+ return sgn * rh + sgn * rl;
+}
+
+static void __attribute__ ((noinline))
+as_sincosf_database (float x, float *sout, float *cout)
+{
+ uint32_t t = asuint (x);
+ uint32_t ax = t & (~0u >> 1);
+ for (unsigned i = 0; i < array_length (ST_SINCOSF); i++)
+ if (__glibc_unlikely (ST_SINCOSF[i].uarg == ax))
{
- /* Force underflow for tiny y. */
- if (__glibc_unlikely (abstop12 (y) < abstop12 (0x1p-126f)))
- math_force_eval ((float)x2);
- *sinp = y;
- *cosp = 1.0f;
- return;
+ *sout = add_sign (x, ST_SINCOSF[i].sh, ST_SINCOSF[i].sl);
+ *cout = ST_SINCOSF[i].ch + ST_SINCOSF[i].cl;
+ break;
}
+}
- sincosf_poly (x, x2, p, 0, sinp, cosp);
+static void __attribute__ ((noinline))
+as_sincosf_big (float x, float *sout, float *cout)
+{
+ uint32_t t = asuint (x);
+ uint32_t ax = t << 1;
+ if (__glibc_unlikely (ax >= 0xffu << 24))
+ { // nan or +-inf
+ if (ax << 8)
+ {
+ *sout = x + x;
+ *cout = x + x;
+ return; // nan
+ }
+ *sout = *cout = x - x;
+ __math_invalidf (x + x);
+ return;
}
- else if (abstop12 (y) < abstop12 (120.0f))
- {
- x = reduce_fast (x, p, &n);
+ int ia;
+ double z = rbig (t, &ia);
+ double z2 = z * z, z4 = z2 * z2;
+ double aa = (A[0] + z2 * A[1]) + z4 * (A[2] + z2 * A[3]);
+ double bb = (B[0] + z2 * B[1]) + z4 * (B[2] + z2 * B[3]);
+ bb *= z;
+ double s0 = TB[ia & 31], c0 = TB[(ia + 8u) & 31];
+ double s = s0 + z * (aa * c0 - bb * s0);
+ double c = c0 - z * (aa * s0 + bb * c0);
+ *sout = s;
+ *cout = c;
+ uint64_t tr = asuint64 (c);
+ uint64_t tail = (tr + 6) & (~UINT64_C(0) >> 36);
+ if (__glibc_unlikely (tail <= 12))
+ return as_sincosf_database (x, sout, cout);
+}
- /* Setup the signs for sin and cos. */
- s = p->sign[n & 3];
-
- if (n & 2)
- p = &__sincosf_table[1];
-
- sincosf_poly (x * s, x * x, p, n, sinp, cosp);
- }
- else if (__glibc_likely (abstop12 (y) < abstop12 (INFINITY)))
- {
- uint32_t xi = asuint (y);
- int sign = xi >> 31;
-
- x = reduce_large (xi, &n);
-
- /* Setup signs for sin and cos - include original sign. */
- s = p->sign[(n + sign) & 3];
-
- if ((n + sign) & 2)
- p = &__sincosf_table[1];
-
- sincosf_poly (x * s, x * x, p, n, sinp, cosp);
+void SECTION
+SINCOSF_FUNC (float x, float *sout, float *cout)
+{
+ uint32_t ax = asuint (x) << 1;
+ int ia;
+ double z0 = x, z;
+ if (__glibc_likely (ax < 0x822d97c8u))
+ { // |x| < 0x1.2d97c8p+3
+ if (__glibc_unlikely (ax < 0x73000000u))
+ { // |x| < 0x1p-12
+ if (__glibc_unlikely (ax < 0x66000000u))
+ { // |x| < 0x1p-25
+ if (__glibc_unlikely (ax == 0u))
+ {
+ *sout = x;
+ *cout = 1.0f;
+ }
+ else
+ {
+ *sout = fmaf (-x, fabsf (x), x);
+ *cout = 1.0f - 0x1p-25f;
+ }
+ }
+ else
+ {
+ *sout = (-0x1.555556p-3f * x) * (x * x) + x;
+ *cout = (-0x1p-1f * x) * x + 1.0f;
+ }
+ return;
+ }
+ if (__glibc_unlikely (ax == 0x812d97c8u))
+ return as_sincosf_database (x, sout, cout);
+ z = rltl0 (z0, &ia);
}
else
{
- /* Return NaN if Inf or NaN for both sin and cos. */
- *sinp = *cosp = y - y;
-#if WANT_ERRNO
- /* Needed to set errno for +-Inf, the add is a hack to work
- around a gcc register allocation issue: just passing y
- affects code generation in the fast path (PR86901). */
- __math_invalidf (y + y);
-#endif
+ if (__glibc_unlikely (ax > 0x99000000u))
+ return as_sincosf_big (x, sout, cout);
+ if (__glibc_unlikely (ax == 0x8c333330u))
+ return as_sincosf_database (x, sout, cout);
+ z = rltl (z0, &ia);
}
+ double z2 = z * z, z4 = z2 * z2;
+ double aa = (A[0] + z2 * A[1]) + z4 * (A[2] + z2 * A[3]);
+ double bb = (B[0] + z2 * B[1]) + z4 * (B[2] + z2 * B[3]);
+ aa *= z;
+ bb *= z2;
+ double s0 = TB[ia & 31], c0 = TB[(ia + 8) & 31];
+ double rs = s0 + (aa * c0 - bb * s0);
+ double rc = c0 - (aa * s0 + bb * c0);
+ *sout = rs;
+ *cout = rc;
}
#ifndef SINCOSF
diff --git a/sysdeps/ieee754/flt-32/s_sincosf_data.h b/sysdeps/ieee754/flt-32/s_sincosf_data.h
index 8bea0042f3c..354e9b6a885 100644
--- a/sysdeps/ieee754/flt-32/s_sincosf_data.h
+++ b/sysdeps/ieee754/flt-32/s_sincosf_data.h
@@ -46,4 +46,17 @@ extern const sincosf_database_t __sinf_st[4] attribute_hidden;
extern const sincosf_database_t __cosf_st[5] attribute_hidden;
#define ST_COSF __cosf_st
+typedef struct
+{
+ union
+ {
+ float arg;
+ uint32_t uarg;
+ };
+ float sh, sl;
+ float ch, cl;
+} sincosf2_database_t;
+extern const sincosf2_database_t __sincosf_st[9] attribute_hidden;
+#define ST_SINCOSF __sincosf_st
+
#endif
diff --git a/sysdeps/ieee754/flt-32/s_sincosf_data_generic.c b/sysdeps/ieee754/flt-32/s_sincosf_data_generic.c
index e9bed60f92d..a86640c4048 100644
--- a/sysdeps/ieee754/flt-32/s_sincosf_data_generic.c
+++ b/sysdeps/ieee754/flt-32/s_sincosf_data_generic.c
@@ -89,3 +89,16 @@ const sincosf_database_t __cosf_st[] =
{ { 0x1.3170fp+63 }, 0x1.fe2976p-1, 0x1p-26 },
{ { 0x1.2b9622p+67 }, 0x1.f0285ep-1, -0x1p-26 },
};
+
+const sincosf2_database_t __sincosf_st[] =
+{
+ { { 0x1.33333p+13 }, -0x1.63f4bap-2, -0x1p-27, -0x1.e01216p-1, -0x1p-26 },
+ { { 0x1.75b8a2p-1 }, 0x1.55688ap-1, -0x1p-26, 0x1.7d8e1ep-1, 0x1p-26 },
+ { { 0x1.4f0654p+0 }, 0x1.ee836cp-1, -0x1p-26, 0x1.09558p-2, -0x1p-27 },
+ { { 0x1.2d97c8p+3 }, -0x1.99bc5ap-26, -0x1p-51, -0x1p+0, 0x1p-25 },
+ { { 0x1.2d97c8p+2 }, -0x1p+0, 0x1p-25, 0x1.99bc5cp-27, -0x1p-52 },
+ { { 0x1.4555p+51 }, -0x1.b0ea44p-1, 0x1p-26, 0x1.115d7ep-1, -0x1p-26 },
+ { { 0x1.48a858p+54 }, 0x1.beac8cp-1, 0x1p-26, 0x1.f48148p-2, 0x1p-27 },
+ { { 0x1.3170fp+63 }, 0x1.5ac1eep-4, -0x1p-30, 0x1.fe2976p-1, 0x1p-26 },
+ { { 0x1.2b9622p+67 }, -0x1.f983c2p-3, 0x1p-28, 0x1.f0285ep-1, -0x1p-26 },
+};
--
2.53.0
next prev parent reply other threads:[~2026-09-23 21:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 21:50 [PATCH v3 00/12] Add sinf/cosf/sincosf CORE-MATH implementations Adhemerval Zanella
2026-09-23 21:50 ` [PATCH v3 01/12] benchtests: Redefine cosf workloads Adhemerval Zanella
2026-09-23 21:50 ` [PATCH v3 02/12] benchtests: Redefine sinf workloads Adhemerval Zanella
2026-09-23 21:50 ` [PATCH v3 03/12] benchtests: Redefine sincosf workloads Adhemerval Zanella
2026-09-23 21:50 ` [PATCH v3 04/12] math: Make roundeven_finite an architecture hook Adhemerval Zanella
2026-09-23 21:50 ` [PATCH v3 05/12] loongarch: Add an inline roundeven_finite Adhemerval Zanella
2026-10-12 1:36 ` Xi Ruoyao
2026-10-29 12:14 ` Adhemerval Zanella Netto
2026-09-23 21:50 ` [PATCH v3 06/12] math: Use sinf from CORE-MATH Adhemerval Zanella
2026-09-23 21:50 ` [PATCH v3 07/12] math: Use cosf " Adhemerval Zanella
2026-09-23 21:50 ` Adhemerval Zanella [this message]
2026-09-23 21:50 ` [PATCH v3 09/12] math: Consolidate common definitions for cosf/sinf/tanf/sincosf Adhemerval Zanella
2026-09-23 21:50 ` [PATCH v3 10/12] math: Remove unused definitions for sinf/cosf/sincosf implementation Adhemerval Zanella
2026-10-12 15:12 ` Yury Khrustalev
2026-09-23 21:50 ` [PATCH v3 11/12] math: Shorten the sinf/cosf/sincosf fast path Adhemerval Zanella
2026-09-23 21:50 ` [PATCH v3 12/12] math: Evaluate the sincosf sine and cosine as two-lane vectors Adhemerval Zanella
2026-10-07 1:45 ` [PATCH v3 00/12] Add sinf/cosf/sincosf CORE-MATH implementations anun333
2026-10-07 13:23 ` Adhemerval Zanella Netto
2026-10-07 16:45 ` anun333
2026-10-07 16:58 ` Adhemerval Zanella Netto
2026-10-07 17:23 ` anun333
2026-10-07 17:31 ` Adhemerval Zanella Netto
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260923215118.2608685-9-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=Paul.Zimmermann@inria.fr \
--cc=Wilco.Dijkstra@arm.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).