fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libm / mathfp / sf_atan.c
blobf0f522076af5f721220e12416b325f0d15c1e230
2 /* @(#)z_atanf.c 1.0 98/08/13 */
3 /******************************************************************
4 * Arctangent
6 * Input:
7 * x - floating point value
9 * Output:
10 * arctan of x
12 * Description:
13 * This routine returns the arctan of x.
15 *****************************************************************/
17 #include "fdlibm.h"
18 #include "zmath.h"
20 float
21 _DEFUN (atanf, (float),
22 float x)
24 switch (numtestf (x))
26 case NAN:
27 errno = EDOM;
28 return (x);
29 case INF:
30 /* this should check to see if neg NaN or pos NaN... */
31 return (__PI_OVER_TWO);
32 case 0:
33 return (0.0);
34 default:
35 return (atangentf (x, 0, 0, 0));
39 #ifdef _DOUBLE_IS_32BITS
40 double atan (double x)
42 return (double) atangentf ((float) x, 0, 0, 0);
45 #endif /* defined(_DOUBLE_IS_32BITS) */