/src/main/java/net/finmath/interpolation/RationalFunctionInterpolation.java
if( absSlopeDifference[i] * slope[( i - 1) ]) {
if ( ( absSlopeDifference[i] == 0 ) && ( absSlopeDifference[i-2] == 0 ) ) {
derivative[numberOfPoints-2] = (absSlopeDifference[numberOfPoints-3] * slope[numberOfPoints-3] + absSlopeDifference[numberOfPoints-4] * slope[numberOfPoints-2]) / (absSlopeDifference[numberOfPoints-3] + absSlopeDifference[numberOfPoints-4]); } derivative[numberOfPoints-1] = 0.5 * (3 * slope[numberOfPoints-2] - slope[numberOfPoints-3]); for(int i = 2; i < numberOfPoints-2; i++){ <extra_id_0> derivative[i] = (step[i] * slope[i-1] + step[i-1] * slope[i]) / (step[i-1] + step[i]); } else{ derivative[i] = (absSlopeDifference[i] * slope[i-1] + absSlopeDifference[i-2] * slope[i]) / (absSlopeDifference[i] + absSlopeDifference[i-2]);