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