Deleted Added
full compact
e_atan2.c (181062) e_atan2.c (181074)
1
2/* @(#)e_atan2.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
15#include <sys/cdefs.h>
1
2/* @(#)e_atan2.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
15#include <sys/cdefs.h>
16__FBSDID("$FreeBSD: head/lib/msun/src/e_atan2.c 181062 2008-07-31 19:57:50Z das $");
16__FBSDID("$FreeBSD: head/lib/msun/src/e_atan2.c 181074 2008-07-31 22:41:26Z das $");
17
18/* __ieee754_atan2(y,x)
19 * Method :
20 * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
21 * 2. Reduce x to positive by (if x and y are unexceptional):
22 * ARG (x+iy) = arctan(y/x) ... if x > 0,
23 * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
24 *

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

37 *
38 * Constants:
39 * The hexadecimal values are the intended ones for the following
40 * constants. The decimal values may be used, provided that the
41 * compiler will convert from decimal to binary accurately enough
42 * to produce the hexadecimal values shown.
43 */
44
17
18/* __ieee754_atan2(y,x)
19 * Method :
20 * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
21 * 2. Reduce x to positive by (if x and y are unexceptional):
22 * ARG (x+iy) = arctan(y/x) ... if x > 0,
23 * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
24 *

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

37 *
38 * Constants:
39 * The hexadecimal values are the intended ones for the following
40 * constants. The decimal values may be used, provided that the
41 * compiler will convert from decimal to binary accurately enough
42 * to produce the hexadecimal values shown.
43 */
44
45#include <float.h>
46
45#include "math.h"
46#include "math_private.h"
47
48static volatile double
49tiny = 1.0e-300;
50static const double
51zero = 0.0,
52pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */

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

118 SET_HIGH_WORD(z,zh ^ 0x80000000);
119 }
120 return z ; /* atan(-,+) */
121 case 2: return pi-(z-pi_lo);/* atan(+,-) */
122 default: /* case 3 */
123 return (z-pi_lo)-pi;/* atan(-,-) */
124 }
125}
47#include "math.h"
48#include "math_private.h"
49
50static volatile double
51tiny = 1.0e-300;
52static const double
53zero = 0.0,
54pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */

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

120 SET_HIGH_WORD(z,zh ^ 0x80000000);
121 }
122 return z ; /* atan(-,+) */
123 case 2: return pi-(z-pi_lo);/* atan(+,-) */
124 default: /* case 3 */
125 return (z-pi_lo)-pi;/* atan(-,-) */
126 }
127}
128
129#if LDBL_MANT_DIG == 53
130__weak_reference(atan2, atan2l);
131#endif