e_atan2.c (176451) | e_atan2.c (181062) |
---|---|
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 176451 2008-02-22 02:30:36Z das $"); | 16__FBSDID("$FreeBSD: head/lib/msun/src/e_atan2.c 181062 2008-07-31 19:57:50Z 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 * --- 15 unchanged lines hidden (view full) --- 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 "math.h" 46#include "math_private.h" 47 | 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 * --- 15 unchanged lines hidden (view full) --- 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 "math.h" 46#include "math_private.h" 47 |
48static volatile double 49tiny = 1.0e-300; |
|
48static const double | 50static const double |
49tiny = 1.0e-300, | |
50zero = 0.0, 51pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ 52pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ | 51zero = 0.0, 52pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ 53pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ |
53pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */ | 54pi = 3.1415926535897931160E+00; /* 0x400921FB, 0x54442D18 */ 55static volatile double |
54pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ 55 56double 57__ieee754_atan2(double y, double x) 58{ 59 double z; 60 int32_t k,m,hx,hy,ix,iy; 61 u_int32_t lx,ly; --- 62 unchanged lines hidden --- | 56pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ 57 58double 59__ieee754_atan2(double y, double x) 60{ 61 double z; 62 int32_t k,m,hx,hy,ix,iy; 63 u_int32_t lx,ly; --- 62 unchanged lines hidden --- |