Deleted Added
full compact
e_acos.c (176451) e_acos.c (181062)
1
2/* @(#)e_acos.c 1.3 95/01/18 */
3/*
4 * ====================================================
5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6 *
7 * Developed at SunSoft, a Sun Microsystems, Inc. business.
8 * Permission to use, copy, modify, and distribute this
9 * software is freely granted, provided that this notice
10 * is preserved.
11 * ====================================================
12 */
13
14#include <sys/cdefs.h>
1
2/* @(#)e_acos.c 1.3 95/01/18 */
3/*
4 * ====================================================
5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6 *
7 * Developed at SunSoft, a Sun Microsystems, Inc. business.
8 * Permission to use, copy, modify, and distribute this
9 * software is freely granted, provided that this notice
10 * is preserved.
11 * ====================================================
12 */
13
14#include <sys/cdefs.h>
15__FBSDID("$FreeBSD: head/lib/msun/src/e_acos.c 176451 2008-02-22 02:30:36Z das $");
15__FBSDID("$FreeBSD: head/lib/msun/src/e_acos.c 181062 2008-07-31 19:57:50Z das $");
16
17/* __ieee754_acos(x)
18 * Method :
19 * acos(x) = pi/2 - asin(x)
20 * acos(-x) = pi/2 + asin(x)
21 * For |x|<=0.5
22 * acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c)
23 * For x>0.5

--- 15 unchanged lines hidden (view full) ---

39 */
40
41#include "math.h"
42#include "math_private.h"
43
44static const double
45one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
46pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
16
17/* __ieee754_acos(x)
18 * Method :
19 * acos(x) = pi/2 - asin(x)
20 * acos(-x) = pi/2 + asin(x)
21 * For |x|<=0.5
22 * acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c)
23 * For x>0.5

--- 15 unchanged lines hidden (view full) ---

39 */
40
41#include "math.h"
42#include "math_private.h"
43
44static const double
45one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
46pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
47pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
48pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
47pio2_hi = 1.57079632679489655800e+00; /* 0x3FF921FB, 0x54442D18 */
48static volatile double
49pio2_lo = 6.12323399573676603587e-17; /* 0x3C91A626, 0x33145C07 */
50static const double
49pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
50pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
51pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */
52pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */
53pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */
54pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */
55qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */
56qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */

--- 47 unchanged lines hidden ---
51pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
52pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
53pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */
54pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */
55pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */
56pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */
57qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */
58qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */

--- 47 unchanged lines hidden ---