fixed FPATAN for case of |x|=|y|
but i am pretty sure same problem might still exists for other arguments :( need to resurrect FPU functions unit testing ...
This commit is contained in:
parent
0b2231b799
commit
36a1a3df86
@ -90,7 +90,7 @@ static float128 poly_atan(float128 x1, float_status_t &status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// =================================================
|
// =================================================
|
||||||
// FPATAN Compute arctan(x/y)
|
// FPATAN Compute arctan(y/x)
|
||||||
// =================================================
|
// =================================================
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -213,8 +213,12 @@ return_PI_or_ZERO:
|
|||||||
float_raise(status, float_flag_inexact);
|
float_raise(status, float_flag_inexact);
|
||||||
|
|
||||||
/* |a| = |b| ==> return PI/4 */
|
/* |a| = |b| ==> return PI/4 */
|
||||||
if (aSig == bSig && aExp == bExp)
|
if (aSig == bSig && aExp == bExp) {
|
||||||
|
if (aSign)
|
||||||
|
return roundAndPackFloatx80(80, bSign, FLOATX80_3PI4_EXP, FLOAT_3PI4_HI, FLOAT_3PI4_LO, status);
|
||||||
|
else
|
||||||
return roundAndPackFloatx80(80, bSign, FLOATX80_PI4_EXP, FLOAT_PI_HI, FLOAT_PI_LO, status);
|
return roundAndPackFloatx80(80, bSign, FLOATX80_PI4_EXP, FLOAT_PI_HI, FLOAT_PI_LO, status);
|
||||||
|
}
|
||||||
|
|
||||||
/* ******************************** */
|
/* ******************************** */
|
||||||
/* using float128 for approximation */
|
/* using float128 for approximation */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user