glibc/sysdeps/i386/fpu
Paul Zimmermann 392b3f0971 replace tgammaf by the CORE-MATH implementation
The CORE-MATH implementation is correctly rounded (for any rounding mode).
This can be checked by exhaustive tests in a few minutes since there are
less than 2^32 values to check against for example GNU MPFR.
This patch also adds some bench values for tgammaf.

Tested on x86_64 and x86 (cfarm26).

With the initial GNU libc code it gave on an Intel(R) Core(TM) i7-8700:

      "tgammaf": {
       "": {
        "duration": 3.50188e+09,
        "iterations": 2e+07,
        "max": 602.891,
        "min": 65.1415,
        "mean": 175.094
       }
      }

With the new code:

      "tgammaf": {
       "": {
        "duration": 3.30825e+09,
        "iterations": 5e+07,
        "max": 211.592,
        "min": 32.0325,
        "mean": 66.1649
       }
      }

With the initial GNU libc code it gave on cfarm26 (i686):

  "tgammaf": {
   "": {
    "duration": 3.70505e+09,
    "iterations": 6e+06,
    "max": 2420.23,
    "min": 243.154,
    "mean": 617.509
   }
  }

With the new code:

  "tgammaf": {
   "": {
    "duration": 3.24497e+09,
    "iterations": 1.8e+07,
    "max": 1238.15,
    "min": 101.155,
    "mean": 180.276
   }
  }

Signed-off-by: Alexei Sibidanov <sibid@uvic.ca>
Signed-off-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>

Changes in v2:
    - include <math.h> (fix the linknamespace failures)
    - restored original benchtests/strcoll-inputs/filelist#en_US.UTF-8 file
    - restored original wrapper code (math/w_tgammaf_compat.c),
      except for the dealing with the sign
    - removed the tgammaf/float entries in all libm-test-ulps files
    - address other comments from Joseph Myers
      (https://sourceware.org/pipermail/libc-alpha/2024-July/158736.html)

Changes in v3:
    - pass NULL argument for signgam from w_tgammaf_compat.c
    - use of math_narrow_eval
    - added more comments

Changes in v4:
    - initialize local_signgam to 0 in math/w_tgamma_template.c
    - replace sysdeps/ieee754/dbl-64/gamma_productf.c by dummy file

Changes in v5:
    - do not mention local_signgam any more in math/w_tgammaf_compat.c
    - initialize local_signgam to 1 instead of 0 in w_tgamma_template.c
      and added comment

Changes in v6:
    - pass NULL as 2nd argument of __ieee754_gammaf_r in
      w_tgammaf_compat.c, and check for NULL in e_gammaf_r.c

Changes in v7:
    - added Signed-off-by line for Alexei Sibidanov (author of the code)

Changes in v8:
    - added Signed-off-by line for Paul Zimmermann (submitted of the patch)

Changes in v9:
    - address comments from review by Adhemerval Zanella
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2024-10-11 11:12:32 +02:00
..
doasin.c Update. 2001-03-12 00:04:52 +00:00
e_acos.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acosf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acosh.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_acoshf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_acoshl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_acosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_asin.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_asinf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atan2.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atan2f.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atan2l.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atanh.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_atanhf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_atanhl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_exp2.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_exp2l.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_exp10.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_exp10l.S Fix exp10 inaccuracy and exceptions (bugs 13884, 13914). 2012-05-06 18:23:44 +00:00
e_exp_data.c Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
e_exp.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_expl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_fmod.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_fmodf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_fmodl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_hypot.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_ilogb.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_ilogbf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_ilogbl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log2_data.c Add new log2 implementation 2018-09-12 17:36:33 +01:00
e_log2.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log2l.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log10.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log10f.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log10l.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log_data.c Add new log implementation 2018-09-12 17:33:30 +01:00
e_log.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_logl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_pow_log_data.c Add new pow implementation 2018-09-19 10:04:51 +01:00
e_pow.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_powl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_remainder.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_remainderf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_remainderl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_scalb.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_scalbf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_scalbl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_sqrt.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_sqrtf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fclrexcpt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fegetenv.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fegetexcept.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fegetmode.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fegetround.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fesetenv.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fesetexcept.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fesetmode.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fesetround.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
feupdateenv.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ftestexcept.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386-math-asm.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Implies Use x86_64 fpu/bits/fenv.h for i386 and x86_64 2012-06-06 10:13:19 -07:00
libm-test-ulps replace tgammaf by the CORE-MATH implementation 2024-10-11 11:12:32 +02:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
math_err.c Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
math-tests-snan.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
math-tests-trap-force.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mpatan2.c Update. 2001-03-12 00:04:52 +00:00
mpatan.c Update. 2001-03-12 00:04:52 +00:00
mpsqrt.c Update. 2001-03-12 00:04:52 +00:00
s_asinh.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_asinhf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_asinhl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_atan.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_atanf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_atanl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_cbrt.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_cbrtf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_cbrtl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_ceil.c math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600) 2024-04-04 14:29:28 -03:00
s_ceilf.c math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600) 2024-04-04 14:29:28 -03:00
s_expm1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_expm1f.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_expm1l.S Fix x86/x86_64 expm1l inaccuracy and exceptions (bugs 13885, 13923). 2012-05-07 19:13:08 +00:00
s_f32xaddf64.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_f32xdivf64.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_f32xmulf64.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_f32xsubf64.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_fdim.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_finite.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_finitef.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_finitel.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_floor.c math: x86 floor traps when FE_INEXACT is enabled (BZ 31601) 2024-04-04 14:29:28 -03:00
s_floorf.c math: x86 floor traps when FE_INEXACT is enabled (BZ 31601) 2024-04-04 14:29:28 -03:00
s_fmax.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_fmaxf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_fmaxl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_fmin.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_fminf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_fminl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_frexp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_frexpf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_frexpl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_isinfl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_llrint.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_llrintf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_llrintl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_log1p.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_log1pf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_log1pl.S x86: Remove .tfloat usage 2022-10-03 14:03:21 -03:00
s_logb.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_logbf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_logbl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lrint.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_lrintf.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_lrintl.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_nearbyint.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nearbyintf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nearbyintl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nextafterl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nexttoward.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_nexttowardf.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_remquo.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_remquof.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_remquol.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_rint.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_rintf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_rintl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalbln.c Update. 1999-07-14 00:54:57 +00:00
s_scalblnf.c Update. 1999-07-14 00:54:57 +00:00
s_scalblnl.c Update. 1999-07-14 00:54:57 +00:00
s_scalbn.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalbnf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalbnl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_significand.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_significandf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_significandl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_trunc.c math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603) 2024-04-04 14:29:28 -03:00
s_truncf.c math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603) 2024-04-04 14:29:28 -03:00
Versions Update. 2000-06-14 00:55:24 +00:00
w_exp2.c Remove the error handling wrapper from exp and exp2 2018-11-21 09:55:02 +00:00
w_exp10_compat.c math: Fix i386 and m68k exp10 on static build (BZ 31775) 2024-05-21 13:44:22 -03:00
w_exp.c Remove the error handling wrapper from exp and exp2 2018-11-21 09:55:02 +00:00
w_fmod_compat.c math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) 2024-05-21 13:43:39 -03:00
w_fmodf_compat.c math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) 2024-05-21 13:43:39 -03:00
w_log2.c Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
w_log.c Remove the error handling wrapper from log 2018-11-21 09:56:27 +00:00
w_pow.c Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
w_sqrt_compat.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
w_sqrt.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00