about summary refs log tree commit diff
path: root/src/math/acosl.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2012-11-14 01:01:38 +0100
committerSzabolcs Nagy <nsz@port70.net>2012-11-14 01:01:38 +0100
commit45ff9d8eb6f43b8f612d1b01ada627f5b4447c45 (patch)
tree92515e65ee6782a78ce4a1c97839872a14939155 /src/math/acosl.c
parent529a8de46cbf6cce525ab25c4532822006502f29 (diff)
downloadmusl-45ff9d8eb6f43b8f612d1b01ada627f5b4447c45.tar.gz
musl-45ff9d8eb6f43b8f612d1b01ada627f5b4447c45.tar.xz
musl-45ff9d8eb6f43b8f612d1b01ada627f5b4447c45.zip
math: ld80 invtrig cleanups
keeping only commonly used data in invtrigl
Diffstat (limited to 'src/math/acosl.c')
-rw-r--r--src/math/acosl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/math/acosl.c b/src/math/acosl.c
index cc565336..83857d49 100644
--- a/src/math/acosl.c
+++ b/src/math/acosl.c
@@ -23,9 +23,7 @@ long double acosl(long double x)
 }
 #elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
 #include "__invtrigl.h"
-
-static const long double
-pi = 3.14159265358979323846264338327950280e+00L;
+#define ACOS_CONST      (BIAS - 65)     /* 2**-65 */
 
 long double acosl(long double x)
 {
@@ -41,7 +39,8 @@ long double acosl(long double x)
 			if (expsign > 0)
 				return 0.0;  /* acos(1) = 0 */
 			else
-				return pi + 2.0 * pio2_lo;  /* acos(-1)= pi */
+				// FIXME
+				return pi_hi + 2.0 * pio2_lo;  /* acos(-1)= pi */
 		}
 		return (x - x) / (x - x);  /* acos(|x|>1) is NaN */
 	}
@@ -60,7 +59,7 @@ long double acosl(long double x)
 		s = sqrtl(z);
 		r = p / q;
 		w = r * s - pio2_lo;
-		return pi - 2.0 * (s + w);
+		return pi_hi - 2.0 * (s + w);
 	} else {                   /* x > 0.5 */
 		z = (1.0 - x) * 0.5;
 		s = sqrtl(z);