OSDN Git Service

libm/*: mass removal of:
[uclinux-h8/uclibc-ng.git] / libm / w_atan2.c
1 /*
2  * ====================================================
3  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4  *
5  * Developed at SunPro, a Sun Microsystems, Inc. business.
6  * Permission to use, copy, modify, and distribute this
7  * software is freely granted, provided that this notice
8  * is preserved.
9  * ====================================================
10  */
11
12 /*
13  * wrapper atan2(y,x)
14  */
15
16 #include "math.h"
17 #include "math_private.h"
18
19 double atan2(double y, double x)        /* wrapper atan2 */
20 {
21 #ifdef _IEEE_LIBM
22         return __ieee754_atan2(y,x);
23 #else
24         double z;
25         z = __ieee754_atan2(y,x);
26         if(_LIB_VERSION == _IEEE_||isnan(x)||isnan(y)) return z;
27         if(x==0.0&&y==0.0) {
28                 return __kernel_standard(y,x,3); /* atan2(+-0,+-0) */
29         } else
30             return z;
31 #endif
32 }
33 libm_hidden_def(atan2)