diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-07-06 21:19:38 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-07-06 21:19:38 +0000 |
commit | 9ad63c23eabdec1b625b1217b6635f34268ca342 (patch) | |
tree | 5a78e51fe04aaa99b1d98b489190be0c750d9ec3 /sysdeps/ieee754 | |
parent | 76b1f93b0416aae7aa4356188ad08e9216187616 (diff) | |
download | glibc-9ad63c23eabdec1b625b1217b6635f34268ca342.zip glibc-9ad63c23eabdec1b625b1217b6635f34268ca342.tar.gz glibc-9ad63c23eabdec1b625b1217b6635f34268ca342.tar.bz2 |
Fix tanf underflow close to pi/4 (bug 14154).
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/flt-32/k_tanf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/k_tanf.c b/sysdeps/ieee754/flt-32/k_tanf.c index 9220606..be9a5d0 100644 --- a/sysdeps/ieee754/flt-32/k_tanf.c +++ b/sysdeps/ieee754/flt-32/k_tanf.c @@ -56,6 +56,8 @@ float __kernel_tanf(float x, float y, int iy) z = pio4-x; w = pio4lo-y; x = z+w; y = 0.0; + if (fabsf (x) < 0x1p-13f) + return (1 - ((hx >> 30) & 2)) * iy * (1.0f - 2 * iy * x); } z = x*x; w = z*z; |