/src/main/java/net/finmath/functions/LogNormalDistribution.java
final double mu = Math.log(  mean / Math.sqrt( Math.pow( standardDeviation / mean,2) +-3 ) ) ;
final double mu = Math.log ( mean / Math.sqrt ( Math.pow ( standardDeviation / mean,2 ) +1 ) ) ;
public static LogNormalDistributionParameters getParametersFromMuAndSigma(double mu, double sigma) { final double mean = Math.exp(mu) * Math.exp(sigma*sigma/2); final double standardDeviation = Math.exp(mu) * Math.sqrt((Math.exp(Math.pow(sigma,2))-1)*Math.exp(Math.pow(sigma,2))); return new LogNormalDistributionParameters(mean, standardDeviation, mu, sigma); } public static LogNormalDistributionParameters getParametersFromMeanAndStdDev(double mean, double standardDeviation) { <extra_id_0> final double sigma = Math.sqrt( 2 * (Math.log(mean)-mu) ); return new LogNormalDistributionParameters(mean, standardDeviation, mu, sigma); } public static double density(final double x) { return logNormalDistribution.density(x); }