Deleted Added
full compact
e_asinl.c (181074) e_asinl.c (181258)
1
2/* @(#)e_asin.c 1.3 95/01/18 */
3/* FreeBSD: head/lib/msun/src/e_asin.c 176451 2008-02-22 02:30:36Z das */
4/*
5 * ====================================================
6 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
7 *
8 * Developed at SunSoft, a Sun Microsystems, Inc. business.
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
11 * is preserved.
12 * ====================================================
13 */
14
15#include <sys/cdefs.h>
1
2/* @(#)e_asin.c 1.3 95/01/18 */
3/* FreeBSD: head/lib/msun/src/e_asin.c 176451 2008-02-22 02:30:36Z das */
4/*
5 * ====================================================
6 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
7 *
8 * Developed at SunSoft, a Sun Microsystems, Inc. business.
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
11 * is preserved.
12 * ====================================================
13 */
14
15#include <sys/cdefs.h>
16__FBSDID("$FreeBSD: head/lib/msun/src/e_asinl.c 181074 2008-07-31 22:41:26Z das $");
16__FBSDID("$FreeBSD: head/lib/msun/src/e_asinl.c 181258 2008-08-03 17:49:05Z das $");
17
18/*
19 * See comments in e_asin.c.
20 * Converted to long double by David Schultz <das@FreeBSD.ORG>.
21 */
22
23#include <float.h>
24

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

42 if(expt >= BIAS) { /* |x|>= 1 */
43 if(expt==BIAS && ((u.bits.manh&~LDBL_NBIT)|u.bits.manl)==0)
44 /* asin(1)=+-pi/2 with inexact */
45 return x*pio2_hi+x*pio2_lo;
46 return (x-x)/(x-x); /* asin(|x|>1) is NaN */
47 } else if (expt<BIAS-1) { /* |x|<0.5 */
48 if(expt<ASIN_LINEAR) { /* if |x| is small, asinl(x)=x */
49 if(huge+x>one) return x;/* return x with inexact if x!=0*/
17
18/*
19 * See comments in e_asin.c.
20 * Converted to long double by David Schultz <das@FreeBSD.ORG>.
21 */
22
23#include <float.h>
24

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

42 if(expt >= BIAS) { /* |x|>= 1 */
43 if(expt==BIAS && ((u.bits.manh&~LDBL_NBIT)|u.bits.manl)==0)
44 /* asin(1)=+-pi/2 with inexact */
45 return x*pio2_hi+x*pio2_lo;
46 return (x-x)/(x-x); /* asin(|x|>1) is NaN */
47 } else if (expt<BIAS-1) { /* |x|<0.5 */
48 if(expt<ASIN_LINEAR) { /* if |x| is small, asinl(x)=x */
49 if(huge+x>one) return x;/* return x with inexact if x!=0*/
50 } else
51 t = x*x;
52 p = P(t);
53 q = Q(t);
54 w = p/q;
55 return x+x*w;
50 }
51 t = x*x;
52 p = P(t);
53 q = Q(t);
54 w = p/q;
55 return x+x*w;
56 }
57 /* 1> |x|>= 0.5 */
58 w = one-fabsl(x);
59 t = w*0.5;
60 p = P(t);
61 q = Q(t);
62 s = sqrtl(t);
63 if(u.bits.manh>=THRESH) { /* if |x| is close to 1 */

--- 14 unchanged lines hidden ---
56 }
57 /* 1> |x|>= 0.5 */
58 w = one-fabsl(x);
59 t = w*0.5;
60 p = P(t);
61 q = Q(t);
62 s = sqrtl(t);
63 if(u.bits.manh>=THRESH) { /* if |x| is close to 1 */

--- 14 unchanged lines hidden ---