glibc/sysdeps/x86_64/fpu
Joseph Myers a84e78c8b3 Fix catan, catanh, __ieee754_logf in round-downward mode (bug 16799, bug 16800).
This patch fixes incorrect results from catan and catanh of certain
special inputs in round-downward mode (bug 16799), and incorrect
results of __ieee754_logf (+/-0) in round-downward mode (bug 16800)
that show up through catan/catanh when tested in all rounding modes,
but not directly in the testing for logf because the bug gets hidden
by the wrappers.

Both bugs involve a zero that should be +0 being -0 instead: one
computed as (1-x)*(1+x) in the catan/catanh case, and one as (x-x) in
the logf case.  The fixes ensure positive zero is used.  Testing of
catan and catanh in all rounding modes is duly enabled.

I expect there are various other bugs in special cases in __ieee754_*
functions that are normally hidden by the wrappers but would show up
for testing with -lieee (or in future with -fno-math-errno if we
replace -lieee and _LIB_VERSION with compile-time redirection to new
*_noerrno symbol names).

Tested x86_64 and x86 and ulps updated accordingly.

	[BZ #16799]
	[BZ #16800]
	* math/s_catan.c (__catan): Avoid passing -0 denominator to atan2
	with 0 numerator.
	* 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.
	* sysdeps/ieee754/flt-32/e_logf.c (__ieee754_logf): Always divide
	by positive zero when computing -Inf result.
	* math/libm-test.inc (catan_test): Use ALL_RM_TEST.
	(catanh_test): Likewise.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-04-02 17:41:02 +00:00
..
multiarch Fix implicit __isinf declarations in exp. 2014-03-24 22:00:32 +00:00
Implies Use x86_64 fpu/bits/fenv.h for i386 and x86_64 2012-06-06 10:13:19 -07:00
dla.h Better DLA_FMS 2011-10-24 22:11:21 -04:00
e_acosl.c
e_atan2l.c
e_exp2l.S Optimize libm 2011-10-12 11:27:51 -04:00
e_exp10l.S Fix exp10 inaccuracy and exceptions (bugs 13884, 13914). 2012-05-06 18:23:44 +00:00
e_expf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_expl.S Fix x86/x86_64 expl/exp10l spurious underflows (bug 16348). 2014-03-27 18:41:14 +00:00
e_fmodl.S Optimize libm 2011-10-12 11:27:51 -04:00
e_ilogbl.S Remove useless __ilogb*_finite aliases 2012-04-18 00:40:13 +02:00
e_log2l.S Get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}. 2012-08-02 21:04:29 +02:00
e_log10l.S Get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}. 2012-08-02 21:04:29 +02:00
e_logl.S Fix log (1) in round-downward mode (bug 16731). 2014-03-21 18:13:58 +00:00
e_powl.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_remainderl.S Optimize libm 2011-10-12 11:27:51 -04:00
e_scalbl.S Get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}. 2012-08-02 21:04:29 +02:00
e_sqrt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_sqrtf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
e_sqrtl.c
fclrexcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fedisblxcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
feenablxcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fegetenv.c Make x86_64 fegetenv preserve exception mask (bug 16198). 2014-03-26 18:59:08 +00:00
fegetexcept.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fegetround.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
feholdexcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fesetenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fesetround.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
feupdateenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fgetexcptflg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fraiseexcpt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fsetexcptflg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ftestexcept.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
k_rem_pio2l.c Dummy files to prevent stub versions from being used. 2007-05-17 18:39:55 +00:00
libm-test-ulps Fix catan, catanh, __ieee754_logf in round-downward mode (bug 16799, bug 16800). 2014-04-02 17:41:02 +00:00
math_ldbl.h
math_private.h Use movq for 64-bit operations 2013-05-15 20:33:45 +02:00
printf_fphex.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_atanl.c
s_ceill.S Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_copysign.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_copysignf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_copysignl.S
s_cosf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_expm1l.S Fix x86/x86_64 expm1l inaccuracy and exceptions (bugs 13885, 13923). 2012-05-07 19:13:08 +00:00
s_fabs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fabsf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fabsl.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fdiml.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_finitel.S
s_floorl.S
s_fmax.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmaxf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmaxl.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fmin.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fminf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fminl.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_fpclassifyl.c
s_isinfl.c
s_isnanl.c
s_llrint.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_llrintf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_llrintl.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_log1pl.S Remove __ELF__ conditionals 2012-02-07 00:41:11 +01:00
s_logbl.c
s_lrint.S
s_lrintf.S
s_lrintl.S
s_nearbyintl.S
s_nextafterl.c
s_nexttoward.c
s_nexttowardf.c
s_rintl.c
s_scalbnl.S
s_signbit.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_signbitf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_significandl.c
s_sincosf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_sinf.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s_truncl.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00