#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
__RCSID("$NetBSD: w_atan2.c,v 1.10 2007/08/10 21:20:36 drochner Exp $");
#endif
#include "namespace.h"
#include "math.h"
#include "math_private.h"
#ifdef __weak_alias
__weak_alias(atan2, _atan2)
#endif
double
atan2(double y, double x)
{
#ifdef _IEEE_LIBM
return __ieee754_atan2(y,x);
#else
double z;
z = __ieee754_atan2(y,x);
if(_LIB_VERSION == _IEEE_||isnan(x)||isnan(y)) return z;
if(x==0.0&&y==0.0) {
return __kernel_standard(y,x,3);
} else
return z;
#endif
}