about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32/e_sinhf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/e_sinhf.c')
-rw-r--r--sysdeps/ieee754/flt-32/e_sinhf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/ieee754/flt-32/e_sinhf.c b/sysdeps/ieee754/flt-32/e_sinhf.c
index 0a3cc90cd1..17c2219c0b 100644
--- a/sysdeps/ieee754/flt-32/e_sinhf.c
+++ b/sysdeps/ieee754/flt-32/e_sinhf.c
@@ -13,6 +13,7 @@
  * ====================================================
  */
 
+#include <float.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -34,8 +35,14 @@ __ieee754_sinhf(float x)
 	if (jx<0) h = -h;
     /* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */
 	if (ix < 0x41b00000) {		/* |x|<22 */
-	    if (__builtin_expect(ix<0x31800000, 0))	/* |x|<2**-28 */
+	    if (__builtin_expect(ix<0x31800000, 0)) {	/* |x|<2**-28 */
+		if (fabsf (x) < FLT_MIN)
+		  {
+		    float force_underflow = x * x;
+		    math_force_eval (force_underflow);
+		  }
 		if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
+	    }
 	    t = __expm1f(fabsf(x));
 	    if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one));
 	    return h*(t+t/(t+one));