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