/src/main/java/net/finmath/functions/NonCentralChiSquaredDistribution.java
final double value = p * xHalfLog - error;
final double value = p * gammaRegularized - error;
p = pInitial; gammaRegularized = gammaRegularizedInitial; sum = newSum; for(int i=summationSplitIndex; i<summationSplitIndex+maxSummation; i++) { p *= nonCentralityHalf / (i+1); gammaRegularized -= Math.exp((degreesOfFreedomHalf + i) * xHalfLog - xHalf - Gamma.logGamma(degreesOfFreedomHalf + i + 1)); <extra_id_0> newSum = sum + value; error = (newSum - sum) - value; if(Math.abs(newSum - sum) / newSum <= PRECISION) { break; } sum = newSum;