Hi all, Sorry for the delay in responding.
I can create the ticket and the test case, I'll try to get to this by the end of the week. Thanks for the confirmation! Jon ----- Original Message ---- From: David Fisher <[email protected]> To: POI Users List <[email protected]> Sent: Wed, December 8, 2010 5:42:15 PM Subject: Re: NPV bug? Hi Marcel, Please have a look at http://poi.apache.org/guidelines.html in the "Submitting Patches" section. Thanks and Regards, Dave On Dec 8, 2010, at 2:46 PM, Marcel May wrote: > <npv.patch.txt> > > Oops, the patch got swallowed. > > On Dec 9, 2010, at 2:33 AM, Marcel May wrote: > >> I can confirm this is a bug - just had the same problem. >> >> a) the NPV computation is wrong >> - sum += ds[i] / Math.pow(rate + 1, i); >> + sum += ds[i] / Math.pow(rate + 1, i+1); >> >> I think the computation should actually use the FinanceLib#npv method >> (which >>is correct). >> >> b) The impl does not support ranges >> >> I got a patch fix a) and b), including a test case: >> >> >> >> Jon, do you want to create the bug ticket? Then I'll add my patch for it. >> >> Cheers, >> Marcel > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
