glibc/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c

221 lines
6.3 KiB
C
Raw Normal View History

2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
/* Implementation of gamma function according to ISO C.
Copyright (C) 1997-2018 Free Software Foundation, Inc.
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
Jakub Jelinek <jj@ultra.linux.cz, 1999.
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
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.
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.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
#include <math.h>
#include <math_private.h>
Do not include fenv_private.h in math_private.h. Continuing the clean-up related to the catch-all math_private.h header, this patch stops math_private.h from including fenv_private.h. Instead, fenv_private.h is included directly from those users of math_private.h that also used interfaces from fenv_private.h. No attempt is made to remove unused includes of math_private.h, but that is a natural followup. (However, since math_private.h sometimes defines optimized versions of math.h interfaces or __* variants thereof, as well as defining its own interfaces, I think it might make sense to get all those optimized versions included from include/math.h, not requiring a separate header at all, before eliminating unused math_private.h includes - that avoids a file quietly becoming less-optimized if someone adds a call to one of those interfaces without restoring a math_private.h include to that file.) There is still a pitfall that if code uses plain fe* and __fe* interfaces, but only includes fenv.h and not fenv_private.h or (before this patch) math_private.h, it will compile on platforms with exceptions and rounding modes but not get the optimized versions (and possibly not compile) on platforms without exception and rounding mode support, so making it easy to break the build for such platforms accidentally. I think it would be most natural to move the inlines / macros for fe* and __fe* in the case of no exceptions and rounding modes into include/fenv.h, so that all code including fenv.h with _ISOMAC not defined automatically gets them. Then fenv_private.h would be purely the header for the libc_fe*, SET_RESTORE_ROUND etc. internal interfaces and the risk of breaking the build on other platforms than the one you tested on because of a missing fenv_private.h include would be much reduced (and there would be some unused fenv_private.h includes to remove along with unused math_private.h includes). Tested for x86_64 and x86, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * sysdeps/generic/math_private.h: Do not include <fenv_private.h>. * math/fromfp.h: Include <fenv_private.h>. * math/math-narrow.h: Likewise. * math/s_cexp_template.c: Likewise. * math/s_csin_template.c: Likewise. * math/s_csinh_template.c: Likewise. * math/s_ctan_template.c: Likewise. * math/s_ctanh_template.c: Likewise. * math/s_iseqsig_template.c: Likewise. * math/w_acos_compat.c: Likewise. * math/w_acosf_compat.c: Likewise. * math/w_acosl_compat.c: Likewise. * math/w_asin_compat.c: Likewise. * math/w_asinf_compat.c: Likewise. * math/w_asinl_compat.c: Likewise. * math/w_ilogb_template.c: Likewise. * math/w_j0_compat.c: Likewise. * math/w_j0f_compat.c: Likewise. * math/w_j0l_compat.c: Likewise. * math/w_j1_compat.c: Likewise. * math/w_j1f_compat.c: Likewise. * math/w_j1l_compat.c: Likewise. * math/w_jn_compat.c: Likewise. * math/w_jnf_compat.c: Likewise. * math/w_llogb_template.c: Likewise. * math/w_log10_compat.c: Likewise. * math/w_log10f_compat.c: Likewise. * math/w_log10l_compat.c: Likewise. * math/w_log2_compat.c: Likewise. * math/w_log2f_compat.c: Likewise. * math/w_log2l_compat.c: Likewise. * math/w_log_compat.c: Likewise. * math/w_logf_compat.c: Likewise. * math/w_logl_compat.c: Likewise. * sysdeps/aarch64/fpu/feholdexcpt.c: Likewise. * sysdeps/aarch64/fpu/fesetround.c: Likewise. * sysdeps/aarch64/fpu/fgetexcptflg.c: Likewise. * sysdeps/aarch64/fpu/ftestexcept.c: Likewise. * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise. * sysdeps/ieee754/dbl-64/e_exp.c: Likewise. * sysdeps/ieee754/dbl-64/e_exp2.c: Likewise. * sysdeps/ieee754/dbl-64/e_gamma_r.c: Likewise. * sysdeps/ieee754/dbl-64/e_jn.c: Likewise. * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. * sysdeps/ieee754/dbl-64/e_remainder.c: Likewise. * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise. * sysdeps/ieee754/dbl-64/gamma_product.c: Likewise. * sysdeps/ieee754/dbl-64/lgamma_neg.c: Likewise. * sysdeps/ieee754/dbl-64/s_atan.c: Likewise. * sysdeps/ieee754/dbl-64/s_fma.c: Likewise. * sysdeps/ieee754/dbl-64/s_fmaf.c: Likewise. * sysdeps/ieee754/dbl-64/s_llrint.c: Likewise. * sysdeps/ieee754/dbl-64/s_llround.c: Likewise. * sysdeps/ieee754/dbl-64/s_lrint.c: Likewise. * sysdeps/ieee754/dbl-64/s_lround.c: Likewise. * sysdeps/ieee754/dbl-64/s_nearbyint.c: Likewise. * sysdeps/ieee754/dbl-64/s_sin.c: Likewise. * sysdeps/ieee754/dbl-64/s_sincos.c: Likewise. * sysdeps/ieee754/dbl-64/s_tan.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c: Likewise. * sysdeps/ieee754/dbl-64/x2y2m1.c: Likewise. * sysdeps/ieee754/float128/float128_private.h: Likewise. * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. * sysdeps/ieee754/flt-32/e_j1f.c: Likewise. * sysdeps/ieee754/flt-32/e_jnf.c: Likewise. * sysdeps/ieee754/flt-32/lgamma_negf.c: Likewise. * sysdeps/ieee754/flt-32/s_llrintf.c: Likewise. * sysdeps/ieee754/flt-32/s_llroundf.c: Likewise. * sysdeps/ieee754/flt-32/s_lrintf.c: Likewise. * sysdeps/ieee754/flt-32/s_lroundf.c: Likewise. * sysdeps/ieee754/flt-32/s_nearbyintf.c: Likewise. * sysdeps/ieee754/k_standardl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_expl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise. * sysdeps/ieee754/ldbl-128/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-128/gamma_productl.c: Likewise. * sysdeps/ieee754/ldbl-128/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-128/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_nearbyintl.c: Likewise. * sysdeps/ieee754/ldbl-128/x2y2m1l.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c: Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-96/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-96/gamma_productl.c: Likewise. * sysdeps/ieee754/ldbl-96/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fma.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-96/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-96/x2y2m1l.c: Likewise. * sysdeps/powerpc/fpu/e_sqrt.c: Likewise. * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise. * sysdeps/riscv/rv64/rvd/s_ceil.c: Likewise. * sysdeps/riscv/rv64/rvd/s_floor.c: Likewise. * sysdeps/riscv/rv64/rvd/s_nearbyint.c: Likewise. * sysdeps/riscv/rv64/rvd/s_round.c: Likewise. * sysdeps/riscv/rv64/rvd/s_roundeven.c: Likewise. * sysdeps/riscv/rv64/rvd/s_trunc.c: Likewise. * sysdeps/riscv/rvd/s_finite.c: Likewise. * sysdeps/riscv/rvd/s_fmax.c: Likewise. * sysdeps/riscv/rvd/s_fmin.c: Likewise. * sysdeps/riscv/rvd/s_fpclassify.c: Likewise. * sysdeps/riscv/rvd/s_isinf.c: Likewise. * sysdeps/riscv/rvd/s_isnan.c: Likewise. * sysdeps/riscv/rvd/s_issignaling.c: Likewise. * sysdeps/riscv/rvf/fegetround.c: Likewise. * sysdeps/riscv/rvf/feholdexcpt.c: Likewise. * sysdeps/riscv/rvf/fesetenv.c: Likewise. * sysdeps/riscv/rvf/fesetround.c: Likewise. * sysdeps/riscv/rvf/feupdateenv.c: Likewise. * sysdeps/riscv/rvf/fgetexcptflg.c: Likewise. * sysdeps/riscv/rvf/ftestexcept.c: Likewise. * sysdeps/riscv/rvf/s_ceilf.c: Likewise. * sysdeps/riscv/rvf/s_finitef.c: Likewise. * sysdeps/riscv/rvf/s_floorf.c: Likewise. * sysdeps/riscv/rvf/s_fmaxf.c: Likewise. * sysdeps/riscv/rvf/s_fminf.c: Likewise. * sysdeps/riscv/rvf/s_fpclassifyf.c: Likewise. * sysdeps/riscv/rvf/s_isinff.c: Likewise. * sysdeps/riscv/rvf/s_isnanf.c: Likewise. * sysdeps/riscv/rvf/s_issignalingf.c: Likewise. * sysdeps/riscv/rvf/s_nearbyintf.c: Likewise. * sysdeps/riscv/rvf/s_roundevenf.c: Likewise. * sysdeps/riscv/rvf/s_roundf.c: Likewise. * sysdeps/riscv/rvf/s_truncf.c: Likewise.
2018-09-03 23:09:04 +02:00
#include <fenv_private.h>
Move math_check_force_underflow macros to separate math-underflow.h. This patch continues cleaning up math_private.h by moving the math_check_force_underflow set of macros to a separate header math-underflow.h. This header is included by the files that need it rather than from math_private.h. Moving these macros to a separate file removes the math_private.h uses of macros from float.h, so the inclusion of float.h in math_private.h is also removed; files that were depending on that inclusion are fixed to include float.h directly. The inclusion of math-barriers.h from math_private.h will be removed in a separate patch. Tested for x86_64 and x86. Also tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * math/math-underflow.h: New file. * sysdeps/generic/math_private.h: Do not include <float.h>. (fabs_tg): Remove macro. Moved to math-underflow.h. (min_of_type_f): Likewise. (min_of_type_): Likewise. (min_of_type_l): Likewise. (min_of_type_f128): Likewise. (min_of_type): Likewise. (math_check_force_underflow): Likewise. (math_check_force_underflow_nonneg): Likewise. (math_check_force_underflow_complex): Likewise. * math/e_exp2_template.c: Include <math-underflow.h>. * math/k_casinh_template.c: Likewise. * math/s_catan_template.c: Likewise. * math/s_catanh_template.c: Likewise. * math/s_ccosh_template.c: Likewise. * math/s_cexp_template.c: Likewise. * math/s_clog10_template.c: Likewise. * math/s_clog_template.c: Likewise. * math/s_csin_template.c: Likewise. * math/s_csinh_template.c: Likewise. * math/s_csqrt_template.c: Likewise. * math/s_ctan_template.c: Likewise. * math/s_ctanh_template.c: Likewise. * sysdeps/ieee754/dbl-64/e_asin.c: Likewise. * sysdeps/ieee754/dbl-64/e_atanh.c: Likewise. * sysdeps/ieee754/dbl-64/e_exp2.c: Likewise. * sysdeps/ieee754/dbl-64/e_gamma_r.c: Likewise. * sysdeps/ieee754/dbl-64/e_hypot.c: Likewise. * sysdeps/ieee754/dbl-64/e_j1.c: Likewise. * sysdeps/ieee754/dbl-64/e_jn.c: Likewise. * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. * sysdeps/ieee754/dbl-64/e_sinh.c: Likewise. * sysdeps/ieee754/dbl-64/s_asinh.c: Likewise. * sysdeps/ieee754/dbl-64/s_atan.c: Likewise. * sysdeps/ieee754/dbl-64/s_erf.c: Likewise. * sysdeps/ieee754/dbl-64/s_expm1.c: Likewise. * sysdeps/ieee754/dbl-64/s_log1p.c: Likewise. * sysdeps/ieee754/dbl-64/s_sin.c: Likewise. * sysdeps/ieee754/dbl-64/s_sincos.c: Likewise. * sysdeps/ieee754/dbl-64/s_tan.c: Likewise. * sysdeps/ieee754/dbl-64/s_tanh.c: Likewise. * sysdeps/ieee754/flt-32/e_asinf.c: Likewise. * sysdeps/ieee754/flt-32/e_atanhf.c: Likewise. * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. * sysdeps/ieee754/flt-32/e_j1f.c: Likewise. * sysdeps/ieee754/flt-32/e_jnf.c: Likewise. * sysdeps/ieee754/flt-32/e_sinhf.c: Likewise. * sysdeps/ieee754/flt-32/k_sinf.c: Likewise. * sysdeps/ieee754/flt-32/k_tanf.c: Likewise. * sysdeps/ieee754/flt-32/s_asinhf.c: Likewise. * sysdeps/ieee754/flt-32/s_atanf.c: Likewise. * sysdeps/ieee754/flt-32/s_erff.c: Likewise. * sysdeps/ieee754/flt-32/s_expm1f.c: Likewise. * sysdeps/ieee754/flt-32/s_log1pf.c: Likewise. * sysdeps/ieee754/flt-32/s_tanhf.c: Likewise. * sysdeps/ieee754/ldbl-128/e_asinl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_atanhl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_expl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-128/e_hypotl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise. * sysdeps/ieee754/ldbl-128/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_sinhl.c: Likewise. * sysdeps/ieee754/ldbl-128/k_sincosl.c: Likewise. * sysdeps/ieee754/ldbl-128/k_sinl.c: Likewise. * sysdeps/ieee754/ldbl-128/k_tanl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_asinhl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_atanl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_erfl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_expm1l.c: Likewise. * sysdeps/ieee754/ldbl-128/s_log1pl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_tanhl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: Likewise. * sysdeps/ieee754/ldbl-96/e_asinl.c: Likewise. * sysdeps/ieee754/ldbl-96/e_atanhl.c: Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-96/e_hypotl.c: Likewise. * sysdeps/ieee754/ldbl-96/e_j1l.c: Likewise. * sysdeps/ieee754/ldbl-96/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-96/e_sinhl.c: Likewise. * sysdeps/ieee754/ldbl-96/k_sinl.c: Likewise. * sysdeps/ieee754/ldbl-96/k_tanl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_asinhl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_erfl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_tanhl.c: Likewise. * sysdeps/powerpc/fpu/e_hypot.c: Likewise. * sysdeps/x86/fpu/powl_helper.c: Likewise. * sysdeps/ieee754/dbl-64/s_nextup.c: Include <float.h>. * sysdeps/ieee754/flt-32/s_nextupf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_nextupl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nextupl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_nextupl.c: Likewise.
2018-05-10 02:53:04 +02:00
#include <math-underflow.h>
#include <float.h>
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
/* Coefficients B_2k / 2k(2k-1) of x^-(2k-1) inside exp in Stirling's
approximation to gamma function. */
static const long double gamma_coeff[] =
{
0x1.555555555555555555555555558p-4L,
-0xb.60b60b60b60b60b60b60b60b6p-12L,
0x3.4034034034034034034034034p-12L,
-0x2.7027027027027027027027027p-12L,
0x3.72a3c5631fe46ae1d4e700dca9p-12L,
-0x7.daac36664f1f207daac36664f2p-12L,
0x1.a41a41a41a41a41a41a41a41a4p-8L,
-0x7.90a1b2c3d4e5f708192a3b4c5ep-8L,
0x2.dfd2c703c0cfff430edfd2c704p-4L,
-0x1.6476701181f39edbdb9ce625988p+0L,
0xd.672219167002d3a7a9c886459cp+0L,
-0x9.cd9292e6660d55b3f712eb9e08p+4L,
0x8.911a740da740da740da740da74p+8L,
};
#define NCOEFF (sizeof (gamma_coeff) / sizeof (gamma_coeff[0]))
/* Return gamma (X), for positive X less than 191, in the form R *
2^(*EXP2_ADJ), where R is the return value and *EXP2_ADJ is set to
avoid overflow or underflow in intermediate calculations. */
static long double
gammal_positive (long double x, int *exp2_adj)
{
int local_signgam;
if (x < 0.5L)
{
*exp2_adj = 0;
return __ieee754_expl (__ieee754_lgammal_r (x + 1, &local_signgam)) / x;
}
else if (x <= 1.5L)
{
*exp2_adj = 0;
return __ieee754_expl (__ieee754_lgammal_r (x, &local_signgam));
}
else if (x < 11.5L)
{
/* Adjust into the range for using exp (lgamma). */
*exp2_adj = 0;
Use ceil functions not __ceil functions in glibc libm. Continuing the move to use, within libm, public names for libm functions that can be inlined as built-in functions on many architectures, this patch moves calls to __ceil functions to call the corresponding ceil names instead, with asm redirection to __ceil when the calls are not inlined. Tested for x86_64, and with build-many-glibcs.py. * include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT] (ceil): Redirect using MATH_REDIRECT. * sysdeps/aarch64/fpu/s_ceil.c: Define NO_MATH_REDIRECT before header inclusion. * sysdeps/aarch64/fpu/s_ceilf.c: Likewise. * sysdeps/ieee754/dbl-64/s_ceil.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c: Likewise. * sysdeps/ieee754/float128/s_ceilf128.c: Likewise. * sysdeps/ieee754/flt-32/s_ceilf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_ceill.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_ceil_template.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/riscv/rv64/rvd/s_ceil.c: Likewise. * sysdeps/riscv/rvf/s_ceilf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/powerpc/fpu/math_private.h [_ARCH_PWR5X] (__ceil): Remove macro. * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Use ceil functions instead of __ceil variants. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c (__truncl): Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/powerpc/power5+/fpu/s_modf.c (__modf): Likewise. * sysdeps/powerpc/power5+/fpu/s_modff.c (__modff): Likewise.
2018-09-17 22:42:06 +02:00
long double n = ceill (x - 1.5L);
long double x_adj = x - n;
long double eps;
long double prod = __gamma_productl (x_adj, 0, n, &eps);
return (__ieee754_expl (__ieee754_lgammal_r (x_adj, &local_signgam))
* prod * (1.0L + eps));
}
else
{
long double eps = 0;
long double x_eps = 0;
long double x_adj = x;
long double prod = 1;
if (x < 23.0L)
{
/* Adjust into the range for applying Stirling's
approximation. */
Use ceil functions not __ceil functions in glibc libm. Continuing the move to use, within libm, public names for libm functions that can be inlined as built-in functions on many architectures, this patch moves calls to __ceil functions to call the corresponding ceil names instead, with asm redirection to __ceil when the calls are not inlined. Tested for x86_64, and with build-many-glibcs.py. * include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT] (ceil): Redirect using MATH_REDIRECT. * sysdeps/aarch64/fpu/s_ceil.c: Define NO_MATH_REDIRECT before header inclusion. * sysdeps/aarch64/fpu/s_ceilf.c: Likewise. * sysdeps/ieee754/dbl-64/s_ceil.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c: Likewise. * sysdeps/ieee754/float128/s_ceilf128.c: Likewise. * sysdeps/ieee754/flt-32/s_ceilf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_ceill.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_ceil_template.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/riscv/rv64/rvd/s_ceil.c: Likewise. * sysdeps/riscv/rvf/s_ceilf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/powerpc/fpu/math_private.h [_ARCH_PWR5X] (__ceil): Remove macro. * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Use ceil functions instead of __ceil variants. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c (__truncl): Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/powerpc/power5+/fpu/s_modf.c (__modf): Likewise. * sysdeps/powerpc/power5+/fpu/s_modff.c (__modff): Likewise.
2018-09-17 22:42:06 +02:00
long double n = ceill (23.0L - x);
x_adj = x + n;
x_eps = (x - (x_adj - n));
prod = __gamma_productl (x_adj - n, x_eps, n, &eps);
}
/* The result is now gamma (X_ADJ + X_EPS) / (PROD * (1 + EPS)).
Compute gamma (X_ADJ + X_EPS) using Stirling's approximation,
starting by computing pow (X_ADJ, X_ADJ) with a power of 2
factored out. */
long double exp_adj = -eps;
long double x_adj_int = __roundl (x_adj);
long double x_adj_frac = x_adj - x_adj_int;
int x_adj_log2;
long double x_adj_mant = __frexpl (x_adj, &x_adj_log2);
if (x_adj_mant < M_SQRT1_2l)
{
x_adj_log2--;
x_adj_mant *= 2.0L;
}
*exp2_adj = x_adj_log2 * (int) x_adj_int;
long double ret = (__ieee754_powl (x_adj_mant, x_adj)
* __ieee754_exp2l (x_adj_log2 * x_adj_frac)
* __ieee754_expl (-x_adj)
Rename all __ieee754_sqrt(f/l) calls to sqrt(f/l) Use sqrt(f/l) to enable inlining by GCC - if inlining doesn't happen, the asm redirect ensures we will still call __ieee754_sqrt(f/l). * sysdeps/ieee754/dbl-64/e_acosh.c (__ieee754_acosh): Use sqrt. * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Likewise. * sysdeps/ieee754/dbl-64/e_hypot.c (__ieee754_hypot): Likewise. * sysdeps/ieee754/dbl-64/e_j0.c (__ieee754_j0): Likewise. * sysdeps/ieee754/dbl-64/e_j1.c (__ieee754_j1): Likewise. * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise. * sysdeps/ieee754/dbl-64/s_asinh.c (__asinh): Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c (__ieee754_acosh): Likewise. * sysdeps/ieee754/flt-32/e_acosf.c (__ieee754_acosf): Likewise. * sysdeps/ieee754/flt-32/e_acoshf.c (__ieee754_acoshf): Likewise. * sysdeps/ieee754/flt-32/e_asinf.c (__ieee754_asinf): Likewise. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Likewise. * sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Likewise. * sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_j0f): Likewise. * sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_j1f): Likewise. * sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): Likewise. * sysdeps/ieee754/flt-32/s_asinhf.c (__asinhf): Likewise. * sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl): Use sqrtl. * sysdeps/ieee754/ldbl-128/e_acosl.c (__ieee754_acosl): Likewise. * sysdeps/ieee754/ldbl-128/e_asinl.c (__ieee754_asinl): Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128/e_hypotl.c (__ieee754_hypotl): Likewise. * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l): Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Likewise. * sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Likewise. * sysdeps/ieee754/ldbl-128/s_asinhl.c (__ieee754_asinhl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (__ieee754_acoshl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c (__ieee754_hypotl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c (__ieee754_j0l): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c (__ieee754_j1l): Likewise * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c (__ieee754_asinhl): Likewise. * sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Use sqrtl. * sysdeps/ieee754/ldbl-96/e_asinl.c (__ieee754_asinl): Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Likewise. * sysdeps/ieee754/ldbl-96/e_j0l.c (__ieee754_j0l): Likewise. * sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l): Likewise. * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-96/s_asinhl.c (__ieee754_asinhl): Likewise. * sysdeps/m68k/m680x0/fpu/e_pow.c (__ieee754_pow): Likewise. * sysdeps/powerpc/fpu/e_hypot.c (__ieee754_hypot): Likewise. * sysdeps/powerpc/fpu/e_hypotf.c (__ieee754_hypotf): Likewise.
2018-03-15 19:05:03 +01:00
* sqrtl (2 * M_PIl / x_adj)
/ prod);
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
exp_adj += x_eps * __ieee754_logl (x_adj);
long double bsum = gamma_coeff[NCOEFF - 1];
long double x_adj2 = x_adj * x_adj;
for (size_t i = 1; i <= NCOEFF - 1; i++)
bsum = bsum / x_adj2 + gamma_coeff[NCOEFF - 1 - i];
exp_adj += bsum / x_adj;
return ret + ret * __expm1l (exp_adj);
}
}
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
long double
__ieee754_gammal_r (long double x, int *signgamp)
{
int64_t hx;
PowerPC floating point little-endian [3 of 15] http://sourceware.org/ml/libc-alpha/2013-08/msg00083.html Further replacement of ieee854 macros and unions. These files also have some optimisations for comparison against 0.0L, infinity and nan. Since the ABI specifies that the high double of an IBM long double pair is the value rounded to double, a high double of 0.0 means the low double must also be 0.0. The ABI also says that infinity and nan are encoded in the high double, with the low double unspecified. This means that tests for 0.0L, +/-Infinity and +/-NaN need only check the high double. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c (__ieee754_atan2l): Rewrite all uses of ieee854 long double macros and unions. Simplify tests for long doubles that are fully specified by the high double. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c (__ieee754_ilogbl): Likewise. Remove dead code too. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise. (__ieee754_ynl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c (__ieee754_log10l): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise. Remove dead code too. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c (__kernel_tanl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c (__isinf_nsl): Likewise. Simplify. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c (___isinfl): Likewise. Simplify. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c (__modfl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Likewise. Comment on variable precision. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (__nexttoward): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c (__scalblnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c (__scalbnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c (__tanhl): Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Adjust tan_towardzero ulps.
2013-08-17 10:54:58 +02:00
double xhi;
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
long double ret;
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
PowerPC floating point little-endian [3 of 15] http://sourceware.org/ml/libc-alpha/2013-08/msg00083.html Further replacement of ieee854 macros and unions. These files also have some optimisations for comparison against 0.0L, infinity and nan. Since the ABI specifies that the high double of an IBM long double pair is the value rounded to double, a high double of 0.0 means the low double must also be 0.0. The ABI also says that infinity and nan are encoded in the high double, with the low double unspecified. This means that tests for 0.0L, +/-Infinity and +/-NaN need only check the high double. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c (__ieee754_atan2l): Rewrite all uses of ieee854 long double macros and unions. Simplify tests for long doubles that are fully specified by the high double. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c (__ieee754_ilogbl): Likewise. Remove dead code too. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise. (__ieee754_ynl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c (__ieee754_log10l): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise. Remove dead code too. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c (__kernel_tanl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c (__isinf_nsl): Likewise. Simplify. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c (___isinfl): Likewise. Simplify. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c (__modfl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Likewise. Comment on variable precision. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (__nexttoward): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c (__scalblnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c (__scalbnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c (__tanhl): Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Adjust tan_towardzero ulps.
2013-08-17 10:54:58 +02:00
xhi = ldbl_high (x);
EXTRACT_WORDS64 (hx, xhi);
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
PowerPC floating point little-endian [3 of 15] http://sourceware.org/ml/libc-alpha/2013-08/msg00083.html Further replacement of ieee854 macros and unions. These files also have some optimisations for comparison against 0.0L, infinity and nan. Since the ABI specifies that the high double of an IBM long double pair is the value rounded to double, a high double of 0.0 means the low double must also be 0.0. The ABI also says that infinity and nan are encoded in the high double, with the low double unspecified. This means that tests for 0.0L, +/-Infinity and +/-NaN need only check the high double. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c (__ieee754_atan2l): Rewrite all uses of ieee854 long double macros and unions. Simplify tests for long doubles that are fully specified by the high double. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c (__ieee754_ilogbl): Likewise. Remove dead code too. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise. (__ieee754_ynl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c (__ieee754_log10l): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise. Remove dead code too. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c (__kernel_tanl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c (__isinf_nsl): Likewise. Simplify. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c (___isinfl): Likewise. Simplify. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c (__modfl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Likewise. Comment on variable precision. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (__nexttoward): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c (__scalblnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c (__scalbnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c (__tanhl): Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Adjust tan_towardzero ulps.
2013-08-17 10:54:58 +02:00
if ((hx & 0x7fffffffffffffffLL) == 0)
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
{
/* Return value for x == 0 is Inf with divide by zero exception. */
*signgamp = 0;
return 1.0 / x;
}
Use rint functions not __rint functions in glibc libm. Continuing the move to use, within libm, public names for libm functions that can be inlined as built-in functions on many architectures, this patch moves calls to __rint functions to call the corresponding rint names instead, with asm redirection to __rint when the calls are not inlined. The x86_64 math_private.h is removed as no longer useful after this patch. This patch is relative to a tree with my floor patch <https://sourceware.org/ml/libc-alpha/2018-09/msg00148.html> applied, and much the same considerations arise regarding possibly replacing an IFUNC call with a direct inline expansion. Tested for x86_64, and with build-many-glibcs.py. * include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT] (rint): Redirect using MATH_REDIRECT. * sysdeps/aarch64/fpu/s_rint.c: Define NO_MATH_REDIRECT before header inclusion. * sysdeps/aarch64/fpu/s_rintf.c: Likewise. * sysdeps/alpha/fpu/s_rint.c: Likewise. * sysdeps/alpha/fpu/s_rintf.c: Likewise. * sysdeps/i386/fpu/s_rintl.c: Likewise. * sysdeps/ieee754/dbl-64/s_rint.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c: Likewise. * sysdeps/ieee754/float128/s_rintf128.c: Likewise. * sysdeps/ieee754/flt-32/s_rintf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_rintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise. * sysdeps/m68k/coldfire/fpu/s_rint.c: Likewise. * sysdeps/m68k/coldfire/fpu/s_rintf.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_rint.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_rintf.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_rintl.c: Likewise. * sysdeps/powerpc/fpu/s_rint.c: Likewise. * sysdeps/powerpc/fpu/s_rintf.c: Likewise. * sysdeps/riscv/rv64/rvd/s_rint.c: Likewise. * sysdeps/riscv/rvf/s_rintf.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_rint.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_rintf.c: Likewise. * sysdeps/x86_64/fpu/math_private.h: Remove file. * math/e_scalb.c (invalid_fn): Use rint functions instead of __rint variants. * math/e_scalbf.c (invalid_fn): Likewise. * math/e_scalbl.c (invalid_fn): Likewise. * sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r): Likewise. * sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r): Likewise. * sysdeps/ieee754/k_standard.c (__kernel_standard): Likewise. * sysdeps/ieee754/k_standardl.c (__kernel_standard_l): Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r): Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r): Likewise. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c (__llrint): Likewise. * sysdeps/powerpc/powerpc32/fpu/s_llrintf.c (__llrintf): Likewise.
2018-09-14 15:10:39 +02:00
if (hx < 0 && (uint64_t) hx < 0xfff0000000000000ULL && rintl (x) == x)
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
{
/* Return value for integer x < 0 is NaN with invalid exception. */
*signgamp = 0;
return (x - x) / (x - x);
}
if (hx == 0xfff0000000000000ULL)
{
/* x == -Inf. According to ISO this is NaN. */
*signgamp = 0;
return x - x;
}
if ((hx & 0x7ff0000000000000ULL) == 0x7ff0000000000000ULL)
{
/* Positive infinity (return positive infinity) or NaN (return
NaN). */
*signgamp = 0;
return x + x;
}
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
if (x >= 172.0L)
{
/* Overflow. */
*signgamp = 0;
return LDBL_MAX * LDBL_MAX;
}
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
else
{
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
SET_RESTORE_ROUNDL (FE_TONEAREST);
if (x > 0.0L)
{
*signgamp = 0;
int exp2_adj;
ret = gammal_positive (x, &exp2_adj);
ret = __scalbnl (ret, exp2_adj);
}
else if (x >= -0x1p-110L)
{
*signgamp = 0;
ret = 1.0L / x;
}
else
{
long double tx = __truncl (x);
*signgamp = (tx == 2.0L * __truncl (tx / 2.0L)) ? -1 : 1;
if (x <= -191.0L)
/* Underflow. */
ret = LDBL_MIN * LDBL_MIN;
else
{
long double frac = tx - x;
if (frac > 0.5L)
frac = 1.0L - frac;
long double sinpix = (frac <= 0.25L
? __sinl (M_PIl * frac)
: __cosl (M_PIl * (0.5L - frac)));
int exp2_adj;
ret = M_PIl / (-x * sinpix
* gammal_positive (-x, &exp2_adj));
ret = __scalbnl (ret, -exp2_adj);
Refactor code forcing underflow exceptions. Various floating-point functions have code to force underflow exceptions if a tiny result was computed in a way that might not have resulted in such exceptions even though the result is inexact. This typically uses math_force_eval to ensure that the underflowing expression is evaluated, but sometimes uses volatile. This patch refactors such code to use three new macros math_check_force_underflow, math_check_force_underflow_nonneg and math_check_force_underflow_complex (which in turn use math_force_eval). In the limited number of cases not suited to a simple conversion to these macros, existing uses of volatile are changed to use math_force_eval instead. The converted code does not always execute exactly the same sequence of operations as the original code, but the overall effects should be the same. Tested for x86_64, x86, mips64 and powerpc. * sysdeps/generic/math_private.h (fabs_tg): New macro. (min_of_type): Likewise. (math_check_force_underflow): Likewise. (math_check_force_underflow_nonneg): Likewise. (math_check_force_underflow_complex): Likewise. * math/e_exp2l.c (__ieee754_exp2l): Use math_check_force_underflow_nonneg. * math/k_casinh.c (__kernel_casinh): Likewise. * math/k_casinhf.c (__kernel_casinhf): Likewise. * math/k_casinhl.c (__kernel_casinhl): Likewise. * math/s_catan.c (__catan): Use math_check_force_underflow_complex. * math/s_catanf.c (__catanf): Likewise. * math/s_catanh.c (__catanh): Likewise. * math/s_catanhf.c (__catanhf): Likewise. * math/s_catanhl.c (__catanhl): Likewise. * math/s_catanl.c (__catanl): Likewise. * math/s_ccosh.c (__ccosh): Likewise. * math/s_ccoshf.c (__ccoshf): Likewise. * math/s_ccoshl.c (__ccoshl): Likewise. * math/s_cexp.c (__cexp): Likewise. * math/s_cexpf.c (__cexpf): Likewise. * math/s_cexpl.c (__cexpl): Likewise. * math/s_clog.c (__clog): Use math_check_force_underflow_nonneg. * math/s_clog10.c (__clog10): Likewise. * math/s_clog10f.c (__clog10f): Likewise. * math/s_clog10l.c (__clog10l): Likewise. * math/s_clogf.c (__clogf): Likewise. * math/s_clogl.c (__clogl): Likewise. * math/s_csin.c (__csin): Use math_check_force_underflow_complex. * math/s_csinf.c (__csinf): Likewise. * math/s_csinh.c (__csinh): Likewise. * math/s_csinhf.c (__csinhf): Likewise. * math/s_csinhl.c (__csinhl): Likewise. * math/s_csinl.c (__csinl): Likewise. * math/s_csqrt.c (__csqrt): Use math_check_force_underflow. * math/s_csqrtf.c (__csqrtf): Likewise. * math/s_csqrtl.c (__csqrtl): Likewise. * math/s_ctan.c (__ctan): Use math_check_force_underflow_complex. * math/s_ctanf.c (__ctanf): Likewise. * math/s_ctanh.c (__ctanh): Likewise. * math/s_ctanhf.c (__ctanhf): Likewise. * math/s_ctanhl.c (__ctanhl): Likewise. * math/s_ctanl.c (__ctanl): Likewise. * stdlib/strtod_l.c (round_and_return): Use math_force_eval instead of volatile. * sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_asin): Use math_check_force_underflow. * sysdeps/ieee754/dbl-64/e_atanh.c (__ieee754_atanh): Likewise. * sysdeps/ieee754/dbl-64/e_exp.c (__ieee754_exp): Do not use volatile when forcing underflow. * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Use math_check_force_underflow_nonneg. * sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r): Likewise. * sysdeps/ieee754/dbl-64/e_j1.c (__ieee754_j1): Use math_check_force_underflow. * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise. * sysdeps/ieee754/dbl-64/e_sinh.c (__ieee754_sinh): Likewise. * sysdeps/ieee754/dbl-64/s_asinh.c (__asinh): Likewise. * sysdeps/ieee754/dbl-64/s_atan.c (atan): Use math_check_force_underflow_nonneg. * sysdeps/ieee754/dbl-64/s_erf.c (__erf): Use math_check_force_underflow. * sysdeps/ieee754/dbl-64/s_expm1.c (__expm1): Likewise. * sysdeps/ieee754/dbl-64/s_fma.c (__fma): Use math_force_eval instead of volatile. * sysdeps/ieee754/dbl-64/s_log1p.c (__log1p): Use math_check_force_underflow. * sysdeps/ieee754/dbl-64/s_sin.c (__sin): Likewise. * sysdeps/ieee754/dbl-64/s_tan.c (tan): Use math_check_force_underflow_nonneg. * sysdeps/ieee754/dbl-64/s_tanh.c (__tanh): Use math_check_force_underflow. * sysdeps/ieee754/flt-32/e_asinf.c (__ieee754_asinf): Likewise. * sysdeps/ieee754/flt-32/e_atanhf.c (__ieee754_atanhf): Likewise. * sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Use math_check_force_underflow_nonneg. * sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r): Likewise. * sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_j1f): Use math_check_force_underflow. * sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_jnf): Likewise. * sysdeps/ieee754/flt-32/e_sinhf.c (__ieee754_sinhf): Likewise. * sysdeps/ieee754/flt-32/k_sinf.c (__kernel_sinf): Likewise. * sysdeps/ieee754/flt-32/k_tanf.c (__kernel_tanf): Likewise. * sysdeps/ieee754/flt-32/s_asinhf.c (__asinhf): Likewise. * sysdeps/ieee754/flt-32/s_atanf.c (__atanf): Likewise. * sysdeps/ieee754/flt-32/s_erff.c (__erff): Likewise. * sysdeps/ieee754/flt-32/s_expm1f.c (__expm1f): Likewise. * sysdeps/ieee754/flt-32/s_log1pf.c (__log1pf): Likewise. * sysdeps/ieee754/flt-32/s_tanhf.c (__tanhf): Likewise. * sysdeps/ieee754/ldbl-128/e_asinl.c (__ieee754_asinl): Likewise. * sysdeps/ieee754/ldbl-128/e_atanhl.c (__ieee754_atanhl): Likewise. * sysdeps/ieee754/ldbl-128/e_expl.c (__ieee754_expl): Use math_check_force_underflow_nonneg. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r): Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Use math_check_force_underflow. * sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-128/e_sinhl.c (__ieee754_sinhl): Likewise. * sysdeps/ieee754/ldbl-128/k_sincosl.c (__kernel_sincosl): Likewise. * sysdeps/ieee754/ldbl-128/k_sinl.c (__kernel_sinl): Likewise. * sysdeps/ieee754/ldbl-128/k_tanl.c (__kernel_tanl): Likewise. * sysdeps/ieee754/ldbl-128/s_asinhl.c (__asinhl): Likewise. * sysdeps/ieee754/ldbl-128/s_atanl.c (__atanl): Likewise. * sysdeps/ieee754/ldbl-128/s_erfl.c (__erfl): Likewise. * sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Likewise. * sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Use math_force_eval instead of volatile. * sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Use math_check_force_underflow. * sysdeps/ieee754/ldbl-128/s_tanhl.c (__tanhl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl): Use math_check_force_underflow. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c (__ieee754_atanhl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r): Use math_check_force_underflow_nonneg. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Use math_check_force_underflow. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c (__ieee754_sinhl): Likewise. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c (__kernel_sincosl): Likewise. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c (__kernel_sinl): Likewise. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c (__kernel_tanl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c (__asinhl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c (__atanl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c (__erfl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c (__tanhl): Likewise. * sysdeps/ieee754/ldbl-96/e_asinl.c (__ieee754_asinl): Likewise. * sysdeps/ieee754/ldbl-96/e_atanhl.c (__ieee754_atanhl): Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r): Use math_check_force_underflow_nonneg. * sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l): Use math_check_force_underflow. * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-96/e_sinhl.c (__ieee754_sinhl): Likewise. * sysdeps/ieee754/ldbl-96/k_sinl.c (__kernel_sinl): Likewise. * sysdeps/ieee754/ldbl-96/k_tanl.c (__kernel_tanl): Use math_check_force_underflow_nonneg. * sysdeps/ieee754/ldbl-96/s_asinhl.c (__asinhl): Use math_check_force_underflow. * sysdeps/ieee754/ldbl-96/s_erfl.c (__erfl): Likewise. * sysdeps/ieee754/ldbl-96/s_fmal.c (__fmal): Use math_force_eval instead of volatile. * sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Use math_check_force_underflow.
2015-09-24 00:42:30 +02:00
math_check_force_underflow_nonneg (ret);
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
}
}
}
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
if (isinf (ret) && x != 0)
{
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
if (*signgamp < 0)
return -(-__copysignl (LDBL_MAX, ret) * LDBL_MAX);
else
return __copysignl (LDBL_MAX, ret) * LDBL_MAX;
}
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
else if (ret == 0)
{
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
if (*signgamp < 0)
return -(-__copysignl (LDBL_MIN, ret) * LDBL_MIN);
else
return __copysignl (LDBL_MIN, ret) * LDBL_MIN;
}
Improve tgamma accuracy (bug 18613). In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-06-30 01:29:35 +02:00
else
return ret;
2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> Jakub Jelinek <jakub@redhat.com> Roland McGrath <roland@redhat.com> Steven Munroe <sjmunroe@us.ibm.com> Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Comment fix. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * math/libm-test.inc (check_float_internal): Allow ulp <= 0.5. (erfc_test): Don't run erfcl (27.0L) test if erfcl (27.0L) is denormal. [TEST_LDOUBLE] (ceil_test, floor_test, llrint_test, llround_test, rint_test, round_test, trunc_test): Add new tests. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_ceill.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabs.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fdim.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_floorl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmax.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_fmin.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: New file. * sysdeps/powerpc/powerpc64/fpu/s_llrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_llroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lrintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_lroundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_rintl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_roundl.S: New file. * sysdeps/powerpc/powerpc64/fpu/s_truncl.S: New file. * sysdeps/unix/sysv/linux/powerpc/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/configure.in: New file. * sysdeps/unix/sysv/linux/powerpc/configure: New file. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h (__LONG_DOUBLE_MATH_OPTIONAL): Define. (__NO_LONG_DOUBLE_MATH): Define. * sysdeps/unix/sysv/linux/powerpc/nldbl-abi.h: New file. * sysdeps/powerpc/fpu/s_isnan.c: Include math_ldbl_opt.h. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl, lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llroundl, lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (ceill): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (copysignl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (floorl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (llrintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (lroundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (rintl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_round.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (roundl): Add compatibility symbols. * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Include math_ldbl_opt.h. [LONG_DOUBLE_COMPAT] (truncl): Add compatibility symbols. * misc/qefgcvt_r.c [LDBL_MIN_10_EXP == -291] (FLOAT_MIN_10_NORM): New. * sysdeps/powerpc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove. * sysdeps/powerpc/Implies: Add ieee754/ldbl-128ibm. * sysdeps/powerpc/powerpc32/Implies: Remove powerpc/soft-fp. * sysdeps/ieee754/ldbl-128ibm/Makefile: New file. * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_logl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_powl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ieee754.h: New file. * sysdeps/ieee754/ldbl-128ibm/k_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: New file. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: New file. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_asinhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cbrtl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_cosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_logbl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalblnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_sinl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_tanl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: New file. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: New file. * sysdeps/ieee754/ldbl-128ibm/t_sincosl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: New file. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: New file. * sysdeps/ieee754/ldbl-128/e_powl.c: Fix old comment.
2006-01-28 01:15:15 +01:00
}
strong_alias (__ieee754_gammal_r, __gammal_r_finite)