mirror of git://sourceware.org/git/glibc.git
This patch fixes the remaining part of bug 16560, spurious underflows from exp2 of arguments close to 0 (when the result is close to 1, so should not underflow), by just using 1+x instead of a more complicated calculation when the argument is sufficiently small. Tested for x86_64, x86 and mips64. [BZ #16560] * math/e_exp2l.c [LDBL_MANT_DIG == 106] (LDBL_EPSILON): Undefine and redefine. (__ieee754_exp2l): Do not multiply small fractional parts by M_LN2l. * sysdeps/i386/fpu/e_exp2l.S (__ieee754_exp2l): Just add 1 to small argument. * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Likewise. * sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise. * sysdeps/x86_64/fpu/e_exp2l.S (__ieee754_exp2l): Likewise. * math/auto-libm-test-in: Add more tests of exp2. * math/auto-libm-test-out: Regenerated. |
||
|---|---|---|
| .. | ||
| e_acosf.c | ||
| e_acoshf.c | ||
| e_asinf.c | ||
| e_atan2f.c | ||
| e_atanhf.c | ||
| e_coshf.c | ||
| e_exp2f.c | ||
| e_expf.c | ||
| e_fmodf.c | ||
| e_gammaf_r.c | ||
| e_hypotf.c | ||
| e_ilogbf.c | ||
| e_j0f.c | ||
| e_j1f.c | ||
| e_jnf.c | ||
| e_lgammaf_r.c | ||
| e_log2f.c | ||
| e_log10f.c | ||
| e_logf.c | ||
| e_powf.c | ||
| e_rem_pio2f.c | ||
| e_remainderf.c | ||
| e_sinhf.c | ||
| e_sqrtf.c | ||
| k_cosf.c | ||
| k_rem_pio2f.c | ||
| k_sinf.c | ||
| k_tanf.c | ||
| math_private.h | ||
| mpn2flt.c | ||
| s_asinhf.c | ||
| s_atanf.c | ||
| s_cbrtf.c | ||
| s_ceilf.c | ||
| s_copysignf.c | ||
| s_cosf.c | ||
| s_erff.c | ||
| s_expm1f.c | ||
| s_fabsf.c | ||
| s_finitef.c | ||
| s_floorf.c | ||
| s_fpclassifyf.c | ||
| s_frexpf.c | ||
| s_isinf_nsf.c | ||
| s_isinff.c | ||
| s_isnanf.c | ||
| s_issignalingf.c | ||
| s_llrintf.c | ||
| s_llroundf.c | ||
| s_log1pf.c | ||
| s_logbf.c | ||
| s_lrintf.c | ||
| s_lroundf.c | ||
| s_modff.c | ||
| s_nearbyintf.c | ||
| s_nextafterf.c | ||
| s_remquof.c | ||
| s_rintf.c | ||
| s_roundf.c | ||
| s_scalblnf.c | ||
| s_scalbnf.c | ||
| s_signbitf.c | ||
| s_sincosf.c | ||
| s_sinf.c | ||
| s_tanf.c | ||
| s_tanhf.c | ||
| s_truncf.c | ||
| t_exp2f.h | ||
| w_expf.c | ||