00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
#if defined(LIBM_SCCS) && !defined(lint)
00014
static char rcsid[] =
"$NetBSD: w_atan2.c,v 1.6 1995/05/10 20:48:39 jtc Exp $";
00015
#endif
00016
00017
00018
00019
00020
#include "math.h"
00021
#include "mathP.h"
00022
00023
00024
#ifdef __STDC__
00025
double atan2(
double y,
double x)
00026 #
else
00027 double atan2(y,x)
00028 double y,x;
00029 #endif
00030 {
00031
#ifdef _IEEE_LIBM
00032
return __ieee754_atan2(y,x);
00033
#else
00034
double z;
00035 z =
__ieee754_atan2(y,x);
00036
if(
_LIB_VERSION == _IEEE_||isnan(x)||isnan(y))
return z;
00037
if(x==0.0&&y==0.0) {
00038
return __kernel_standard(y,x,3);
00039 }
else
00040
return z;
00041
#endif
00042
}