Minimize number of array accesses.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1581391 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2014-03-25 16:00:36 +00:00
parent 5c70086611
commit 6d3f22348c

View File

@ -2546,9 +2546,11 @@ public class FastMath {
/* Add in effect of epsB. atan'(x) = 1/(1+x^2) */
yb += epsB / (1d + epsA * epsA);
final double eighths = EIGHTHS[idx];
//result = yb + eighths[idx] + ya;
double za = EIGHTHS[idx] + ya;
double zb = -(za - EIGHTHS[idx] - ya);
double za = eighths + ya;
double zb = -(za - eighths - ya);
temp = za + yb;
zb += -(temp - za - yb);
za = temp;