mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-14 05:12:38 -08:00
ATAN now provides a better approximation to PI/2 when working with long doubles
This commit is contained in:
parent
2acd731e9e
commit
cf1aa3dfc3
1 changed files with 5 additions and 5 deletions
|
|
@ -429,19 +429,19 @@ ecl_atan2_long_double(long double y, long double x)
|
|||
{
|
||||
if (signbit(x)) {
|
||||
if (signbit(y)) {
|
||||
return -ECL_PI_D + atanl(-y / -x);
|
||||
return -ECL_PI_L + atanl(-y / -x);
|
||||
} else if (y == 0) {
|
||||
return ECL_PI_D;
|
||||
return ECL_PI_L;
|
||||
} else {
|
||||
return ECL_PI_D - atanl(y / -x);
|
||||
return ECL_PI_L - atanl(y / -x);
|
||||
}
|
||||
} else if (x == 0) {
|
||||
if (signbit(y)) {
|
||||
return -ECL_PI2_D;
|
||||
return -ECL_PI2_L;
|
||||
} else if (y == 0) {
|
||||
return x / y; /* Produces a NaN */
|
||||
} else {
|
||||
return ECL_PI2_D;
|
||||
return ECL_PI2_L;
|
||||
}
|
||||
} else {
|
||||
if (signbit(y)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue