double slope = (Math.log(entry2.variation()) - Math.log(entry1.variation())) /
(Math.log(entry2.points) - Math.log(entry1.points));
double currErr = entry2.variation() * Math.pow(currentPoints / entry1.points, slope);
if (entry1 != null && entry2 != null) {
LinearRegression reg = null;
for (int i = 0; i < ZERO_IN_ITERATIONS; i++) {
reg = new LinearRegression();
for (LogEntry entry : log) {
if (entry.variation() > currErr * 20 && entry.variation() < currErr * 1000) {
reg.add(Math.log(entry.points), Math.log(entry.variation()));
}
}
}
errorSlope = reg.slope();
errorStart = reg.yIntercept();
}
}
}