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