mirror of
https://github.com/fluencelabs/musl
synced 2025-06-12 22:41:37 +00:00
code cleanup of named constants
zero, one, two, half are replaced by const literals The policy was to use the f suffix for float consts (1.0f), but don't use suffix for long double consts (these consts can be exactly represented as double).
This commit is contained in:
@ -18,7 +18,6 @@
|
||||
static const volatile float
|
||||
tiny = 1.0e-30;
|
||||
static const float
|
||||
zero = 0.0,
|
||||
pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */
|
||||
pi_o_2 = 1.5707963705e+00, /* 0x3fc90fdb */
|
||||
pi = 3.1415927410e+00; /* 0x40490fdb */
|
||||
@ -63,8 +62,8 @@ float atan2f(float y, float x)
|
||||
}
|
||||
} else {
|
||||
switch (m) {
|
||||
case 0: return zero; /* atan(+...,+INF) */
|
||||
case 1: return -zero; /* atan(-...,+INF) */
|
||||
case 0: return 0.0f; /* atan(+...,+INF) */
|
||||
case 1: return -0.0f; /* atan(-...,+INF) */
|
||||
case 2: return pi+tiny; /* atan(+...,-INF) */
|
||||
case 3: return -pi-tiny; /* atan(-...,-INF) */
|
||||
}
|
||||
|
Reference in New Issue
Block a user