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