public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Add sinf/cosf/sincosf CORE-MATH implementations
@ 2026-03-25 19:22 Adhemerval Zanella
  2026-03-25 19:22 ` [PATCH 1/8] benchtest: Redefine cosf ranges Adhemerval Zanella
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2026-03-25 19:22 UTC (permalink / raw)
  To: libc-alpha; +Cc: Paul Zimmermann, DJ Delorie

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-25 19:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-25 19:22 [PATCH 0/8] Add sinf/cosf/sincosf CORE-MATH implementations Adhemerval Zanella
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

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).