about summary refs log tree commit diff
path: root/src/math/acosf.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-16 21:01:34 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-16 21:01:34 -0400
commit93a50a26cd0f9efc59cc83daae7b2d916b327ab1 (patch)
treeada41a23c4b01f27d1d2cf8cd88948b061aa8f61 /src/math/acosf.c
parent2cbb24bba39ad3529315098b5619b6fec078eb82 (diff)
parent40305f74bd70a575ce73260227ed3b64e0625b13 (diff)
downloadmusl-93a50a26cd0f9efc59cc83daae7b2d916b327ab1.tar.gz
musl-93a50a26cd0f9efc59cc83daae7b2d916b327ab1.tar.xz
musl-93a50a26cd0f9efc59cc83daae7b2d916b327ab1.zip
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/acosf.c')
-rw-r--r--src/math/acosf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/math/acosf.c b/src/math/acosf.c
index dd3bba29..b4665d02 100644
--- a/src/math/acosf.c
+++ b/src/math/acosf.c
@@ -36,8 +36,8 @@ float acosf(float x)
 	ix = hx & 0x7fffffff;
 	if (ix >= 0x3f800000) {  /* |x| >= 1 */
 		if (ix == 0x3f800000) {  /* |x| == 1 */
-			if(hx>0) return 0.0;  /* acos(1) = 0 */
-			return pi + (float)2.0*pio2_lo;  /* acos(-1)= pi */
+			if (hx > 0) return 0.0f;  /* acos(1) = 0 */
+			return pi + 2.0f*pio2_lo;  /* acos(-1)= pi */
 		}
 		return (x-x)/(x-x);  /* acos(|x|>1) is NaN */
 	}
@@ -50,17 +50,17 @@ float acosf(float x)
 		r = p/q;
 		return pio2_hi - (x - (pio2_lo-x*r));
 	} else if (hx < 0) {     /* x < -0.5 */
-		z = (one+x)*(float)0.5;
+		z = (one+x)*0.5f;
 		p = z*(pS0+z*(pS1+z*pS2));
 		q = one+z*qS1;
 		s = sqrtf(z);
 		r = p/q;
 		w = r*s-pio2_lo;
-		return pi - (float)2.0*(s+w);
+		return pi - 2.0f*(s+w);
 	} else {                 /* x > 0.5 */
 		int32_t idf;
 
-		z = (one-x)*(float)0.5;
+		z = (one-x)*0.5f;
 		s = sqrtf(z);
 		df = s;
 		GET_FLOAT_WORD(idf,df);
@@ -70,6 +70,6 @@ float acosf(float x)
 		q = one+z*qS1;
 		r = p/q;
 		w = r*s+c;
-		return (float)2.0*(df+w);
+		return 2.0f*(df+w);
 	}
 }