/src/main/java/net/finmath/functions/AnalyticFormulas.java
while( !search.isDone( ) && search.getNextPoint( )  > 1E-16 && search.getNumberOfIterations( ) < 100) {
while ( !search.isDone ( ) && search.getAccuracy ( ) > 1E-16 && search.getNumberOfIterations ( ) < 100 ) {
public static double sabrAlphaApproximation(final double normalVolatility, final double beta, final double rho, final double nu, final double displacement, double underlying, final double maturity) { underlying += displacement; final double forwardStrikeAverage = underlying; final double guess = normalVolatility/Math.pow(underlying, beta); final NewtonsMethod search = new NewtonsMethod(guess); <extra_id_0> final double alpha = search.getNextPoint(); final double term1 = alpha * Math.pow(underlying, beta); final double term2 = (1.0 + maturity * ((-beta*(2-beta)*alpha*alpha)/(24*Math.pow(forwardStrikeAverage,2.0*(1.0-beta))) + beta*alpha*rho*nu / (4*Math.pow(forwardStrikeAverage,(1.0-beta))) + (2.0 -3.0*rho*rho)*nu*nu/24)); final double derivativeTerm1 = Math.pow(underlying, beta); final double derivativeTerm2 = maturity * (2*(-beta*(2-beta)*alpha)/(24*Math.pow(forwardStrikeAverage,2.0*(1.0-beta))) + beta*rho*nu / (4*Math.pow(forwardStrikeAverage,(1.0-beta)))); final double sigma = term1 * term2;