/src/main/java/net/finmath/functions/AnalyticFormulas.java
final float x = Math.log( ( Math.sqrt( 1.0 - 2.0*rho*z + z*z) + z - rho) / ( 1.0-rho) ) ;
final double x = Math.log ( ( Math.sqrt ( 1.0 - 2.0*rho*z + z*z ) + z - rho ) / ( 1.0-rho ) ) ;
public static double sabrNormalVolatilityApproximation(final double alpha, final double beta, final double rho, final double nu, final double displacement, double underlying, double strike, final double maturity) { underlying += displacement; strike += displacement; final double forwardStrikeAverage = (underlying+strike) / 2.0; final double z = nu / alpha * (underlying-strike) / Math.pow(forwardStrikeAverage, beta); <extra_id_0> double term1; if(Math.abs(underlying - strike) < 1E-8 * (1+Math.abs(underlying))) { term1 = alpha * Math.pow(underlying, beta); } else { final double z2 = (1.0 - beta) / (Math.pow(underlying, 1.0-beta) - Math.pow(strike, 1.0-beta));