aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/flt-32/k_tanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/k_tanf.c')
-rw-r--r--sysdeps/ieee754/flt-32/k_tanf.c2
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;