From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Cc: Paul Zimmermann <Paul.Zimmermann@inria.fr>, DJ Delorie <dj@redhat.com>
Subject: [PATCH 0/8] Add sinf/cosf/sincosf CORE-MATH implementations
Date: Wed, 25 Mar 2026 16:22:18 -0300 [thread overview]
Message-ID: <20260325192357.1284741-1-adhemerval.zanella@linaro.org> (raw)
This patchset adds the optimized and correctly rounded cosf, sinf, and
sincosf from CORE-MATH [1]. The patch adds new input ranges for the
benchtests based on feedback from SPECcpu2017 usage.
The performance is similar, with some gains and some regressions. The
x86_64-v1 shows some performance regression because the CORE-MATH
implementation relies on roundeven. The x86_64v2 and forward provide
a specific instruction, and x86_64 already provides an FMA ifunc variant.
[1] https://gitlab.inria.fr/core-math/core-math
Adhemerval Zanella (8):
benchtest: Redefine cosf ranges
benchtest: Redefine sinf ranges
benchtest: Redefine sincosf ranges
math: Use sinf from CORE-MATH
math: Use cosf from CORE-MATH
math: Use sincosf from CORE-MATH
math: Consolidate common definitions for cosf/sinf/tanf/sincosf
math: Remove unused definitions for sinf/cosf/sincosf implementation
SHARED-FILES | 6 +
benchtests/cosf-inputs | 5409 ++++++-----
benchtests/sincosf-inputs | 8309 ++++++-----------
benchtests/sinf-inputs | 7919 ++++++----------
math/Makefile | 2 +
math/auto-libm-test-in | 1 +
math/auto-libm-test-out-sincos | 25 +
sysdeps/ieee754/flt-32/libm-test-ulps | 36 +
sysdeps/ieee754/flt-32/reduce_aux.h | 38 +-
.../flt-32/reduce_aux_data.c} | 37 +-
sysdeps/ieee754/flt-32/s_cosf.c | 160 +-
sysdeps/ieee754/flt-32/s_sincosf.c | 191 +-
sysdeps/ieee754/flt-32/s_sincosf.h | 95 -
sysdeps/ieee754/flt-32/s_sincosf_common.c | 90 +
sysdeps/ieee754/flt-32/s_sincosf_common.h | 63 +
sysdeps/ieee754/flt-32/s_sincosf_data.c | 157 +-
sysdeps/ieee754/flt-32/s_sincosf_data.h | 64 +
sysdeps/ieee754/flt-32/s_sinf.c | 164 +-
sysdeps/ieee754/flt-32/s_tanf.c | 65 +-
sysdeps/ieee754/flt-32/sincosf_poly.h | 87 -
sysdeps/x86/fpu/sincosf_poly.h | 111 -
21 files changed, 9752 insertions(+), 13277 deletions(-)
rename sysdeps/{x86/fpu/s_sincosf_data.c => ieee754/flt-32/reduce_aux_data.c} (58%)
delete mode 100644 sysdeps/ieee754/flt-32/s_sincosf.h
create mode 100644 sysdeps/ieee754/flt-32/s_sincosf_common.c
create mode 100644 sysdeps/ieee754/flt-32/s_sincosf_common.h
create mode 100644 sysdeps/ieee754/flt-32/s_sincosf_data.h
delete mode 100644 sysdeps/ieee754/flt-32/sincosf_poly.h
delete mode 100644 sysdeps/x86/fpu/sincosf_poly.h
--
2.43.0
next reply other threads:[~2026-03-25 19:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 19:22 Adhemerval Zanella [this message]
2026-03-25 19:22 ` [PATCH 1/8] benchtest: Redefine cosf ranges Adhemerval Zanella
2026-03-25 19:22 ` [PATCH 2/8] benchtest: Redefine sinf ranges Adhemerval Zanella
2026-03-25 19:22 ` [PATCH 3/8] benchtest: Redefine sincosf ranges Adhemerval Zanella
2026-03-25 19:22 ` [PATCH 4/8] math: Use sinf from CORE-MATH Adhemerval Zanella
2026-03-25 19:22 ` [PATCH 5/8] math: Use cosf " Adhemerval Zanella
2026-03-25 19:22 ` [PATCH 6/8] math: Use sincosf " Adhemerval Zanella
2026-03-25 19:22 ` [PATCH 7/8] math: Consolidate common definitions for cosf/sinf/tanf/sincosf Adhemerval Zanella
2026-03-25 19:22 ` [PATCH 8/8] math: Remove unused definitions for sinf/cosf/sincosf implementation Adhemerval Zanella
2026-03-30 17:41 [PATCH 0/8] Add sinf/cosf/sincosf CORE-MATH implementations Wilco Dijkstra
2026-03-30 17:51 ` Adhemerval Zanella Netto
2026-03-30 22:58 ` Wilco Dijkstra
2026-03-31 7:28 ` Paul Zimmermann
2026-04-02 15:40 ` Wilco Dijkstra
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=20260325192357.1284741-1-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=Paul.Zimmermann@inria.fr \
--cc=dj@redhat.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).