Deleted Added
full compact
e_acosf.c (22993) e_acosf.c (23579)
1/* e_acosf.c -- float version of e_acos.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_acosf.c -- float version of e_acos.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_acosf.c,v 1.4 1997/02/22 15:09:55 peter Exp $";
18#endif
19
20#include "math.h"
21#include "math_private.h"
22
23#ifdef __STDC__
24static const float
25#else

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

63 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
64 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
65 r = p/q;
66 return pio2_hi - (x - (pio2_lo-x*r));
67 } else if (hx<0) { /* x < -0.5 */
68 z = (one+x)*(float)0.5;
69 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
70 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
18#endif
19
20#include "math.h"
21#include "math_private.h"
22
23#ifdef __STDC__
24static const float
25#else

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

63 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
64 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
65 r = p/q;
66 return pio2_hi - (x - (pio2_lo-x*r));
67 } else if (hx<0) { /* x < -0.5 */
68 z = (one+x)*(float)0.5;
69 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
70 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
71 s = sqrtf(z);
71 s = __ieee754_sqrtf(z);
72 r = p/q;
73 w = r*s-pio2_lo;
74 return pi - (float)2.0*(s+w);
75 } else { /* x > 0.5 */
76 int32_t idf;
77 z = (one-x)*(float)0.5;
72 r = p/q;
73 w = r*s-pio2_lo;
74 return pi - (float)2.0*(s+w);
75 } else { /* x > 0.5 */
76 int32_t idf;
77 z = (one-x)*(float)0.5;
78 s = sqrtf(z);
78 s = __ieee754_sqrtf(z);
79 df = s;
80 GET_FLOAT_WORD(idf,df);
81 SET_FLOAT_WORD(df,idf&0xfffff000);
82 c = (z-df*df)/(s+df);
83 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
84 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
85 r = p/q;
86 w = r*s+c;
87 return (float)2.0*(df+w);
88 }
89}
79 df = s;
80 GET_FLOAT_WORD(idf,df);
81 SET_FLOAT_WORD(df,idf&0xfffff000);
82 c = (z-df*df)/(s+df);
83 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
84 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
85 r = p/q;
86 w = r*s+c;
87 return (float)2.0*(df+w);
88 }
89}