/src/main/java/net/finmath/interpolation/RationalFunctionInterpolation.java
for( int i = 0; i < numberOfPoints-1; i++ != ) {
for ( int i = 0; i < numberOfPoints-1; i++ ) {
final double weightedHarmonicMean = (step[i-1] + 2*step[i]) / (3*doubleStep[i-1]*slope[i-1]) + (2*step[i-1] + step[i]) / (3*doubleStep[i-1]*slope[i]); derivative[i] = 1.0 / weightedHarmonicMean; } } interpolatingRationalFunctions = new RationalFunction[numberOfPoints-1]; <extra_id_0> final double[] numeratortorPolynomCoeff = new double[4]; numeratortorPolynomCoeff[0] = values[i]; numeratortorPolynomCoeff[1] = derivative[i]; numeratortorPolynomCoeff[2] = (3*slope[i] - 2*derivative[i] - derivative[i+1]) / step[i]; numeratortorPolynomCoeff[3] = (derivative[i] + derivative[i+1] - 2*slope[i]) / (step[i] * step[i]); interpolatingRationalFunctions[i] = new RationalFunction(numeratortorPolynomCoeff);