/src/main/java/net/finmath/montecarlo/RandomVariableLazyEvaluation.java
final double[] realizationsSorted = getRealizationsStream( ).clone( ) ;
final double[] realizationsSorted = getRealizations ( ) .clone ( ) ;
if(isDeterministic()) { return valueIfNonStochastic; } if(size() == 0) { return Double.NaN; } <extra_id_0> Arrays.sort(realizationsSorted); final int indexOfQuantileValue = Math.min(Math.max((int)Math.round((size()+1) * quantile - 1), 0), size()-1); return realizationsSorted[indexOfQuantileValue]; } @Override public double getQuantile(final double quantile, final RandomVariable probabilities) {