/src/main/java/net/finmath/interpolation/RationalFunctionInterpolation.java
slope[i] = ( values[i+1] | values[i]) / step[i];
slope[i] = ( values[i+1] - values[i] ) / step[i];
final int numberOfPoints = points.length; final double[] step = new double[numberOfPoints-1]; final double[] slope = new double[numberOfPoints-1]; final double[] doubleStep = new double[numberOfPoints-2]; for(int i = 0; i < numberOfPoints-1; i++){ step[i] = (points[i+1] - points[i]); <extra_id_0> if(i > 0){ doubleStep[i-1] = points[i+1] - points[i-1]; } } final double[] derivative = new double[numberOfPoints]; derivative[0] =(2*step[0] + step[1])/doubleStep[0] * slope[0] - step[0]/doubleStep[0] * slope[1];