poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Svede <jsv...@yahoo.com>
Subject Re: NPV bug?
Date Thu, 09 Dec 2010 04:10:40 GMT
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 <dfisher@jmlafferty.com>
To: POI Users List <user@poi.apache.org>
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: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message