Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / mathfp / sf_atan.c
blob03da2a6b0d6dcb12d4b67fd27e6775fe0f8ca504
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 atanf (float x)
23 switch (numtestf (x))
25 case NAN:
26 errno = EDOM;
27 return (x);
28 case INF:
29 /* this should check to see if neg NaN or pos NaN... */
30 return (__PI_OVER_TWO);
31 case 0:
32 return (0.0);
33 default:
34 return (atangentf (x, 0, 0, 0));
38 #ifdef _DOUBLE_IS_32BITS
39 double atan (double x)
41 return (double) atangentf ((float) x, 0, 0, 0);
44 #endif /* defined(_DOUBLE_IS_32BITS) */