X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmath%2Fatan2.c;h=825a38fe37c3b445db653f6063c83da4f32999ee;hp=3c35fbf0b2fc28868ca3822767d608589fce4349;hb=6a4cfbdbe718a115a22629ad0cb2ae21391a0454;hpb=b69f695acedd4ce2798ef9ea28d834ceccc789bd diff --git a/src/math/atan2.c b/src/math/atan2.c index 3c35fbf0..825a38fe 100644 --- a/src/math/atan2.c +++ b/src/math/atan2.c @@ -39,14 +39,14 @@ #include "libm.h" -static volatile double +// FIXME +static const volatile double tiny = 1.0e-300; static const double -zero = 0.0, pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ pi = 3.1415926535897931160E+00; /* 0x400921FB, 0x54442D18 */ -static volatile double +static const volatile double pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ double atan2(double y, double x) @@ -89,8 +89,8 @@ double atan2(double y, double x) } } else { switch(m) { - case 0: return zero; /* atan(+...,+INF) */ - case 1: return -zero; /* atan(-...,+INF) */ + case 0: return 0.0; /* atan(+...,+INF) */ + case 1: return -0.0; /* atan(-...,+INF) */ case 2: return pi+tiny; /* atan(+...,-INF) */ case 3: return -pi-tiny; /* atan(-...,-INF) */ }