Deleted Added
full compact
s_atanf.c (176451) s_atanf.c (181062)
1/* s_atanf.c -- float version of s_atan.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#include <sys/cdefs.h>
1/* s_atanf.c -- float version of s_atan.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#include <sys/cdefs.h>
17__FBSDID("$FreeBSD: head/lib/msun/src/s_atanf.c 176451 2008-02-22 02:30:36Z das $");
17__FBSDID("$FreeBSD: head/lib/msun/src/s_atanf.c 181062 2008-07-31 19:57:50Z das $");
18
19#include "math.h"
20#include "math_private.h"
21
22static const float atanhi[] = {
23 4.6364760399e-01, /* atan(0.5)hi 0x3eed6338 */
24 7.8539812565e-01, /* atan(1.0)hi 0x3f490fda */
25 9.8279368877e-01, /* atan(1.5)hi 0x3f7b985e */

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

57 float w,s1,s2,z;
58 int32_t ix,hx,id;
59
60 GET_FLOAT_WORD(hx,x);
61 ix = hx&0x7fffffff;
62 if(ix>=0x50800000) { /* if |x| >= 2^34 */
63 if(ix>0x7f800000)
64 return x+x; /* NaN */
18
19#include "math.h"
20#include "math_private.h"
21
22static const float atanhi[] = {
23 4.6364760399e-01, /* atan(0.5)hi 0x3eed6338 */
24 7.8539812565e-01, /* atan(1.0)hi 0x3f490fda */
25 9.8279368877e-01, /* atan(1.5)hi 0x3f7b985e */

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

57 float w,s1,s2,z;
58 int32_t ix,hx,id;
59
60 GET_FLOAT_WORD(hx,x);
61 ix = hx&0x7fffffff;
62 if(ix>=0x50800000) { /* if |x| >= 2^34 */
63 if(ix>0x7f800000)
64 return x+x; /* NaN */
65 if(hx>0) return atanhi[3]+atanlo[3];
66 else return -atanhi[3]-atanlo[3];
65 if(hx>0) return atanhi[3]+*(volatile float *)&atanlo[3];
66 else return -atanhi[3]-*(volatile float *)&atanlo[3];
67 } if (ix < 0x3ee00000) { /* |x| < 0.4375 */
68 if (ix < 0x31000000) { /* |x| < 2^-29 */
69 if(huge+x>one) return x; /* raise inexact */
70 }
71 id = -1;
72 } else {
73 x = fabsf(x);
74 if (ix < 0x3f980000) { /* |x| < 1.1875 */

--- 24 unchanged lines hidden ---
67 } if (ix < 0x3ee00000) { /* |x| < 0.4375 */
68 if (ix < 0x31000000) { /* |x| < 2^-29 */
69 if(huge+x>one) return x; /* raise inexact */
70 }
71 id = -1;
72 } else {
73 x = fabsf(x);
74 if (ix < 0x3f980000) { /* |x| < 1.1875 */

--- 24 unchanged lines hidden ---