Skip to content
Commit ca2fcac6 authored by Joseph Myers's avatar Joseph Myers
Browse files

Fix ldbl-128ibm tanhl inaccuracy for small arguments (bug 19349).

The ldbl-128ibm implementation of tanhl is inaccurate for small
arguments, because it returns x*(1+x) (maybe in an attempt to raise
"inexact") when x itself would be the accurate return value but
multiplying by 1+x introduces large errors.  This patch fixes it to
return x in that case (when the mathematical result is x plus a
negligible remainder on the order of x^3) to avoid those errors.

Tested for powerpc.

	[BZ #19349]
	* sysdeps/ieee754/ldbl-128ibm/s_tanhl.c (__tanhl): Return argument
	when small.
parent e5a5315e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment