summary refs log tree commit diff
path: root/sysdeps/libm-ieee754/s_tanhl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-ieee754/s_tanhl.c')
-rw-r--r--sysdeps/libm-ieee754/s_tanhl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sysdeps/libm-ieee754/s_tanhl.c b/sysdeps/libm-ieee754/s_tanhl.c
index 984f67108b..9863af62a5 100644
--- a/sysdeps/libm-ieee754/s_tanhl.c
+++ b/sysdeps/libm-ieee754/s_tanhl.c
@@ -46,9 +46,9 @@ static char rcsid[] = "$NetBSD: $";
 #include "math_private.h"
 
 #ifdef __STDC__
-static const long double one=1.0, two=2.0, tiny = 1.0e-16380L;
+static const long double one=1.0, two=2.0, tiny = 1.0e-4900L;
 #else
-static long double one=1.0, two=2.0, tiny = 1.0e-16380L;
+static long double one=1.0, two=2.0, tiny = 1.0e-4900L;
 #endif
 
 #ifdef __STDC__
@@ -59,7 +59,8 @@ static long double one=1.0, two=2.0, tiny = 1.0e-16380L;
 #endif
 {
 	long double t,z;
-	int32_t se,j0,j1,ix;
+	int32_t se;
+	u_int32_t j0,j1,ix;
 
     /* High word of |x|. */
 	GET_LDOUBLE_WORDS(se,j0,j1,x);
@@ -72,7 +73,7 @@ static long double one=1.0, two=2.0, tiny = 1.0e-16380L;
 	}
 
     /* |x| < 23 */
-	if (ix < 0x4003 || (ix == 0x4003 && j0 < 0xb8000000)) {	/* |x|<23 */
+	if (ix < 0x4003 || (ix == 0x4003 && j0 < 0xb8000000u)) {/* |x|<23 */
 	    if (ix<0x3fc8) 		/* |x|<2**-55 */
 		return x*(one+x);    	/* tanh(small) = small */
 	    if (ix>=0x3fff) {	/* |x|>=1  */