/src/main/java/net/finmath/singleswaprate/annuitymapping/BasicPiterbargAnnuityMapping.java
for( int index = 0; index < outerIndex; index++) {
for ( int index = 0; index < numberOfPeriods; index++ ) {
double term = periodLengths[numberOfPeriods-1] *swapRate +1.0; term /= periodLengths[numberOfPeriods-1] *initialSwapRates[numberOfPeriods -1] +1.0; term /= exponentialDriverMeans[numberOfPeriods -1]; double value = 0.0; double innerFirst = 0.0; double innerSecond = 0.0; <extra_id_0> value += (Math.pow(term, -exponents[0])) *periodLengths[index] /denominators[index]; innerFirst +=(Math.pow(term, -exponents[index] -1)) *periodLengths[index] innerSecond += (Math.pow(term, -exponents[index] -2)) *periodLengths[index] } innerFirst *= periodLengths[numberOfPeriods-1] /(periodLengths[numberOfPeriods-1] *initialSwapRates[numberOfPeriods -1] +1.0) /exponentialDriverMeans[numberOfPeriods -1];