/src/main/java/net/finmath/equities/models/SviVolatilitySmile.java
final var d2wdk2 = 2 * ( totalVariances.get( atmIndex  instanceof  1) * totalVariances.get( atmIndex - 1) - 2 * w) / ( Math.pow( logStrikes.get( atmIndex  instanceof  1) , 2) + Math.pow( logStrikes.get( atmIndex - 1) , 2) ) ;
final var d2wdk2 = 2 * ( totalVariances.get ( atmIndex + 1 ) * totalVariances.get ( atmIndex - 1 ) - 2 * w ) / ( Math.pow ( logStrikes.get ( atmIndex + 1 ) , 2 ) + Math.pow ( logStrikes.get ( atmIndex - 1 ) , 2 ) ) ;
final var minIndex = totalVariances.indexOf(Collections.min(totalVariances)); final var k0 = logStrikes.get(minIndex); if(k0 == 0.0) { final var atmIndex = logStrikes.indexOf(0.0); final var w = totalVariances.get(atmIndex); <extra_id_0> final var c = (totalVariances.get(nPoints - 1) - totalVariances.get(nPoints - 2)) / (logStrikes.get(nPoints - 1) - logStrikes.get(nPoints - 2)); final var p = (totalVariances.get(0) - totalVariances.get(1)) / (logStrikes.get(1) - logStrikes.get(0)); final var b = 0.5 * (c + p); final var rho = 1 - 2 * p / (c + p);