s_atan.c (21673) | s_atan.c (22808) |
---|---|
1/* @(#)s_atan.c 5.1 93/09/24 */ 2/* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice 9 * is preserved. 10 * ==================================================== 11 */ 12 13#ifndef lint | 1/* @(#)s_atan.c 5.1 93/09/24 */ 2/* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice 9 * is preserved. 10 * ==================================================== 11 */ 12 13#ifndef lint |
14static char rcsid[] = "$FreeBSD: head/lib/msun/src/s_atan.c 21673 1997-01-14 07:20:47Z jkh $"; | 14static char rcsid[] = "$FreeBSD: head/lib/msun/src/s_atan.c 22808 1997-02-16 18:26:31Z bde $"; |
15#endif 16 17/* atan(x) 18 * Method 19 * 1. Reduce x to positive by atan(x) = -atan(-x). 20 * 2. According to the integer k=4t+0.25 chopped, t=x, the argument 21 * is further reduced to one of the following intervals and the 22 * arctangent of t is evaluated by the corresponding formula: --- 58 unchanged lines hidden (view full) --- 81 static const double 82#else 83 static double 84#endif 85one = 1.0, 86huge = 1.0e300; 87 88#ifdef __STDC__ | 15#endif 16 17/* atan(x) 18 * Method 19 * 1. Reduce x to positive by atan(x) = -atan(-x). 20 * 2. According to the integer k=4t+0.25 chopped, t=x, the argument 21 * is further reduced to one of the following intervals and the 22 * arctangent of t is evaluated by the corresponding formula: --- 58 unchanged lines hidden (view full) --- 81 static const double 82#else 83 static double 84#endif 85one = 1.0, 86huge = 1.0e300; 87 88#ifdef __STDC__ |
89 double atan(double x) | 89 double __generic_atan(double x) |
90#else | 90#else |
91 double atan(x) | 91 double __generic_atan(x) |
92 double x; 93#endif 94{ 95 double w,s1,s2,z; 96 int32_t ix,hx,id; 97 98 GET_HIGH_WORD(hx,x); 99 ix = hx&0x7fffffff; --- 40 unchanged lines hidden --- | 92 double x; 93#endif 94{ 95 double w,s1,s2,z; 96 int32_t ix,hx,id; 97 98 GET_HIGH_WORD(hx,x); 99 ix = hx&0x7fffffff; --- 40 unchanged lines hidden --- |