summaryrefslogtreecommitdiff
path: root/lib/libm/noieee_src/n_asincos.c
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2008-06-12 22:43:37 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2008-06-12 22:43:37 +0000
commitf6a3bcfb9f4f2503211521e9e050cbad259b5f11 (patch)
tree61e44cf88a3e5fbebfe1c9bdc9d94280c5a10036 /lib/libm/noieee_src/n_asincos.c
parent69037fa1d73cf6dd6b62ce497d9619816ba29a2b (diff)
spacing, add rcs ids, no binary change
Diffstat (limited to 'lib/libm/noieee_src/n_asincos.c')
-rw-r--r--lib/libm/noieee_src/n_asincos.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/lib/libm/noieee_src/n_asincos.c b/lib/libm/noieee_src/n_asincos.c
index 7e99c1c66f6..b8d6567f9cd 100644
--- a/lib/libm/noieee_src/n_asincos.c
+++ b/lib/libm/noieee_src/n_asincos.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: n_asincos.c,v 1.6 2008/06/12 22:43:36 martynas Exp $ */
/* $NetBSD: n_asincos.c,v 1.1 1995/10/10 23:36:34 ragge Exp $ */
/*
* Copyright (c) 1985, 1993
@@ -42,12 +43,12 @@ static char sccsid[] = "@(#)asincos.c 8.1 (Berkeley) 6/4/93";
* sqrt(x)
*
* Required kernel function:
- * atan2(y,x)
+ * atan2(y,x)
*
- * Method :
- * asin(x) = atan2(x,sqrt(1-x*x)); for better accuracy, 1-x*x is
+ * Method:
+ * asin(x) = atan2(x,sqrt(1-x*x)); for better accuracy, 1-x*x is
* computed as follows
- * 1-x*x if x < 0.5,
+ * 1-x*x if x < 0.5,
* 2*(1-|x|)-(1-|x|)*(1-|x|) if x >= 0.5.
*
* Special cases:
@@ -56,22 +57,22 @@ static char sccsid[] = "@(#)asincos.c 8.1 (Berkeley) 6/4/93";
*
* Accuracy:
* 1) If atan2() uses machine PI, then
- *
+ *
* asin(x) returns (PI/pi) * (the exact arc sine of x) nearly rounded;
* and PI is the exact pi rounded to machine precision (see atan2 for
* details):
*
* in decimal:
- * pi = 3.141592653589793 23846264338327 .....
+ * pi = 3.141592653589793 23846264338327 .....
* 53 bits PI = 3.141592653589793 115997963 ..... ,
- * 56 bits PI = 3.141592653589793 227020265 ..... ,
+ * 56 bits PI = 3.141592653589793 227020265 ..... ,
*
* in hexadecimal:
* pi = 3.243F6A8885A308D313198A2E....
* 53 bits PI = 3.243F6A8885A30 = 2 * 1.921FB54442D18 error=.276ulps
* 56 bits PI = 3.243F6A8885A308 = 4 * .C90FDAA22168C2 error=.206ulps
- *
- * In a test run with more than 200,000 random arguments on a VAX, the
+ *
+ * In a test run with more than 200,000 random arguments on a VAX, the
* maximum observed error in ulps (units in the last place) was
* 2.06 ulps. (comparing against (PI/pi)*(exact asin(x)));
*
@@ -79,7 +80,7 @@ static char sccsid[] = "@(#)asincos.c 8.1 (Berkeley) 6/4/93";
*
* asin(x) returns the exact asin(x) with error below about 2 ulps.
*
- * In a test run with more than 1,024,000 random arguments on a VAX, the
+ * In a test run with more than 1,024,000 random arguments on a VAX, the
* maximum observed error in ulps (units in the last place) was
* 1.99 ulps.
*/
@@ -99,7 +100,7 @@ asin(x)
s=copysign(x,one);
if(s <= 0.5)
return(atan2(x,sqrt(one-x*x)));
- else
+ else
{ t=one-s; s=t+t; return(atan2(x,sqrt(s-t*t))); }
}
@@ -114,9 +115,9 @@ asin(x)
* sqrt(x)
*
* Required kernel function:
- * atan2(y,x)
+ * atan2(y,x)
*
- * Method :
+ * Method:
* ________
* / 1 - x
* acos(x) = 2*atan2( / -------- , 1 ) .
@@ -128,22 +129,22 @@ asin(x)
*
* Accuracy:
* 1) If atan2() uses machine PI, then
- *
+ *
* acos(x) returns (PI/pi) * (the exact arc cosine of x) nearly rounded;
* and PI is the exact pi rounded to machine precision (see atan2 for
* details):
*
* in decimal:
- * pi = 3.141592653589793 23846264338327 .....
+ * pi = 3.141592653589793 23846264338327 .....
* 53 bits PI = 3.141592653589793 115997963 ..... ,
- * 56 bits PI = 3.141592653589793 227020265 ..... ,
+ * 56 bits PI = 3.141592653589793 227020265 ..... ,
*
* in hexadecimal:
* pi = 3.243F6A8885A308D313198A2E....
* 53 bits PI = 3.243F6A8885A30 = 2 * 1.921FB54442D18 error=.276ulps
* 56 bits PI = 3.243F6A8885A308 = 4 * .C90FDAA22168C2 error=.206ulps
- *
- * In a test run with more than 200,000 random arguments on a VAX, the
+ *
+ * In a test run with more than 200,000 random arguments on a VAX, the
* maximum observed error in ulps (units in the last place) was
* 2.07 ulps. (comparing against (PI/pi)*(exact acos(x)));
*
@@ -151,7 +152,7 @@ asin(x)
*
* acos(x) returns the exact acos(x) with error below about 2 ulps.
*
- * In a test run with more than 1,024,000 random arguments on a VAX, the
+ * In a test run with more than 1,024,000 random arguments on a VAX, the
* maximum observed error in ulps (units in the last place) was
* 2.15 ulps.
*/