about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-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 92206069c8..be9a5d0f09 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;