• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /* @(#)w_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 /*
16  * wrapper ieee_atan2(y,x)
17  */
18 
19 #include "fdlibm.h"
20 
21 
22 #ifdef __STDC__
ieee_atan2(double y,double x)23 	double ieee_atan2(double y, double x)	/* wrapper atan2 */
24 #else
25 	double ieee_atan2(y,x)			/* wrapper atan2 */
26 	double y,x;
27 #endif
28 {
29 #ifdef _IEEE_LIBM
30 	return __ieee754_atan2(y,x);
31 #else
32 	double z;
33 	z = __ieee754_atan2(y,x);
34 	if(_LIB_VERSION == _IEEE_||ieee_isnan(x)||ieee_isnan(y)) return z;
35 	if(x==0.0&&y==0.0) {
36 	        return __kernel_standard(y,x,3); /* ieee_atan2(+-0,+-0) */
37 	} else
38 	    return z;
39 #endif
40 }
41