Deleted Added
full compact
e_asinf.c (22993) e_asinf.c (23579)
1/* e_asinf.c -- float version of e_asin.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
12 * is preserved.
13 * ====================================================
14 */
15
16#ifndef lint
1/* e_asinf.c -- float version of e_asin.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
12 * is preserved.
13 * ====================================================
14 */
15
16#ifndef lint
17static char rcsid[] = "$Id$";
17static char rcsid[] = "$Id: e_asinf.c,v 1.5 1997/02/22 15:09:58 peter Exp $";
18#endif
19
20#include "math.h"
21#include "math_private.h"
22
23#ifdef __STDC__
24static const float
25#else

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

68 w = p/q;
69 return x+x*w;
70 }
71 /* 1> |x|>= 0.5 */
72 w = one-fabsf(x);
73 t = w*(float)0.5;
74 p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
75 q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
18#endif
19
20#include "math.h"
21#include "math_private.h"
22
23#ifdef __STDC__
24static const float
25#else

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

68 w = p/q;
69 return x+x*w;
70 }
71 /* 1> |x|>= 0.5 */
72 w = one-fabsf(x);
73 t = w*(float)0.5;
74 p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
75 q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
76 s = sqrtf(t);
76 s = __ieee754_sqrtf(t);
77 if(ix>=0x3F79999A) { /* if |x| > 0.975 */
78 w = p/q;
79 t = pio2_hi-((float)2.0*(s+s*w)-pio2_lo);
80 } else {
81 int32_t iw;
82 w = s;
83 GET_FLOAT_WORD(iw,w);
84 SET_FLOAT_WORD(w,iw&0xfffff000);
85 c = (t-w*w)/(s+w);
86 r = p/q;
87 p = (float)2.0*s*r-(pio2_lo-(float)2.0*c);
88 q = pio4_hi-(float)2.0*w;
89 t = pio4_hi-(p-q);
90 }
91 if(hx>0) return t; else return -t;
92}
77 if(ix>=0x3F79999A) { /* if |x| > 0.975 */
78 w = p/q;
79 t = pio2_hi-((float)2.0*(s+s*w)-pio2_lo);
80 } else {
81 int32_t iw;
82 w = s;
83 GET_FLOAT_WORD(iw,w);
84 SET_FLOAT_WORD(w,iw&0xfffff000);
85 c = (t-w*w)/(s+w);
86 r = p/q;
87 p = (float)2.0*s*r-(pio2_lo-(float)2.0*c);
88 q = pio4_hi-(float)2.0*w;
89 t = pio4_hi-(p-q);
90 }
91 if(hx>0) return t; else return -t;
92}