Deleted Added
full compact
e_asin.c (176451) e_asin.c (181074)
1
2/* @(#)e_asin.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_asin.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_asin.c 176451 2008-02-22 02:30:36Z das $");
15__FBSDID("$FreeBSD: head/lib/msun/src/e_asin.c 181074 2008-07-31 22:41:26Z das $");
16
17/* __ieee754_asin(x)
18 * Method :
19 * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
20 * we approximate asin(x) on [0,0.5] by
21 * asin(x) = x + x*x^2*R(x^2)
22 * where
23 * R(x^2) is a rational approximation of (asin(x)-x)/x^3

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

39 * = pio4_hi+(pio4-2f)-(2s*z*R(z)-(pio2_lo+2c))
40 *
41 * Special cases:
42 * if x is NaN, return x itself;
43 * if |x|>1, return NaN with invalid signal.
44 *
45 */
46
16
17/* __ieee754_asin(x)
18 * Method :
19 * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
20 * we approximate asin(x) on [0,0.5] by
21 * asin(x) = x + x*x^2*R(x^2)
22 * where
23 * R(x^2) is a rational approximation of (asin(x)-x)/x^3

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

39 * = pio4_hi+(pio4-2f)-(2s*z*R(z)-(pio2_lo+2c))
40 *
41 * Special cases:
42 * if x is NaN, return x itself;
43 * if |x|>1, return NaN with invalid signal.
44 *
45 */
46
47#include <float.h>
47
48#include "math.h"
49#include "math_private.h"
50
51static const double
52one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
53huge = 1.000e+300,
54pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */

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

105 c = (t-w*w)/(s+w);
106 r = p/q;
107 p = 2.0*s*r-(pio2_lo-2.0*c);
108 q = pio4_hi-2.0*w;
109 t = pio4_hi-(p-q);
110 }
111 if(hx>0) return t; else return -t;
112}
48
49#include "math.h"
50#include "math_private.h"
51
52static const double
53one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
54huge = 1.000e+300,
55pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */

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

106 c = (t-w*w)/(s+w);
107 r = p/q;
108 p = 2.0*s*r-(pio2_lo-2.0*c);
109 q = pio4_hi-2.0*w;
110 t = pio4_hi-(p-q);
111 }
112 if(hx>0) return t; else return -t;
113}
114
115#if LDBL_MANT_DIG == 53
116__weak_reference(asin, asinl);
117#endif