summary refs log tree commit diff
path: root/sysdeps/libm-ieee754
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-ieee754')
-rw-r--r--sysdeps/libm-ieee754/e_acoshl.c2
-rw-r--r--sysdeps/libm-ieee754/e_atan2l.c6
-rw-r--r--sysdeps/libm-ieee754/e_atanhl.c2
-rw-r--r--sysdeps/libm-ieee754/e_sinhl.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/libm-ieee754/e_acoshl.c b/sysdeps/libm-ieee754/e_acoshl.c
index 7b7bea7054..a60704aa29 100644
--- a/sysdeps/libm-ieee754/e_acoshl.c
+++ b/sysdeps/libm-ieee754/e_acoshl.c
@@ -53,7 +53,7 @@ ln2	= 6.931471805599453094287e-01L; /* 0x3FFE, 0xB17217F7, 0xD1CF79AC */
 	long double t;
 	u_int32_t se,i0,i1;
 	GET_LDOUBLE_WORDS(se,i0,i1,x);
-	if(se<0x3fff) {			/* x < 1 */
+	if(se<0x3fff || se & 0x8000) {	/* x < 1 */
 	    return (x-x)/(x-x);
 	} else if(se >=0x401b) {	/* x > 2**28 */
 	    if(se >=0x7fff) {		/* x is inf of NaN */
diff --git a/sysdeps/libm-ieee754/e_atan2l.c b/sysdeps/libm-ieee754/e_atan2l.c
index e60f2d41c1..72d3eac172 100644
--- a/sysdeps/libm-ieee754/e_atan2l.c
+++ b/sysdeps/libm-ieee754/e_atan2l.c
@@ -73,10 +73,10 @@ pi_lo   = -5.01655761266833202345176e-20L;/* 0xBFBE, 0xECE675D1, 0xFC8F8CBB */
 
 	EXTRACT_LDOUBLE_WORDS(sx,hx,lx,x);
 	ix = sx&0x7fff;
-	lx |= hx ^ 0x80000000;
+	lx |= hx & 0x7fffffff;
 	EXTRACT_LDOUBLE_WORDS(sy,hy,ly,y);
 	iy = sy&0x7fff;
-	ly |= hy ^ 0x80000000;
+	ly |= hy & 0x7fffffff;
 	if(((2*ix|((lx|-lx)>>31))>0xfffe)||
 	   ((2*iy|((ly|-ly)>>31))>0xfffe))	/* x or y is NaN */
 	   return x+y;
@@ -114,7 +114,7 @@ pi_lo   = -5.01655761266833202345176e-20L;/* 0xBFBE, 0xECE675D1, 0xFC8F8CBB */
 	    }
 	}
     /* when y is INF */
-	if(iy==0x7fff) return (hy>=0x8000)? -pi_o_2-tiny: pi_o_2+tiny;
+	if(iy==0x7fff) return (sy>=0x8000)? -pi_o_2-tiny: pi_o_2+tiny;
 
     /* compute y/x */
 	k = sy-sx;
diff --git a/sysdeps/libm-ieee754/e_atanhl.c b/sysdeps/libm-ieee754/e_atanhl.c
index 0e6dadd602..fdcd1e9fe8 100644
--- a/sysdeps/libm-ieee754/e_atanhl.c
+++ b/sysdeps/libm-ieee754/e_atanhl.c
@@ -75,5 +75,5 @@ static double long zero = 0.0;
 	    t = 0.5*__log1pl(t+t*x/(one-x));
 	} else
 	    t = 0.5*__log1pl((x+x)/(one-x));
-	if(se>0x7fff) return t; else return -t;
+	if(se<=0x7fff) return t; else return -t;
 }
diff --git a/sysdeps/libm-ieee754/e_sinhl.c b/sysdeps/libm-ieee754/e_sinhl.c
index f9ccc6fa90..4f9cfe2c38 100644
--- a/sysdeps/libm-ieee754/e_sinhl.c
+++ b/sysdeps/libm-ieee754/e_sinhl.c
@@ -63,7 +63,7 @@ static long double one = 1.0, shuge = 1.0e4931L;
 	if(ix==0x7fff) return x+x;
 
 	h = 0.5;
-	if (jx<0) h = -h;
+	if (jx & 0x8000) h = -h;
     /* |x| in [0,25], return sign(x)*0.5*(E+E/(E+1))) */
 	if (ix < 0x4003 || (ix == 0x4003 && i0 <= 0xc8000000)) { /* |x|<25 */
 	    if (ix<0x3fe3) 		/* |x|<2**-28 */