Return-Path: Delivered-To: apmail-poi-user-archive@www.apache.org Received: (qmail 1467 invoked from network); 9 Dec 2010 04:28:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Dec 2010 04:28:55 -0000 Received: (qmail 16431 invoked by uid 500); 9 Dec 2010 04:28:54 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 16308 invoked by uid 500); 9 Dec 2010 04:28:54 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 16300 invoked by uid 99); 9 Dec 2010 04:28:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Dec 2010 04:28:53 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.138.91.38] (HELO nm14-vm1.bullet.mail.ne1.yahoo.com) (98.138.91.38) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 09 Dec 2010 04:28:46 +0000 Received: from [98.138.90.57] by nm14.bullet.mail.ne1.yahoo.com with NNFMP; 09 Dec 2010 04:28:25 -0000 Received: from [98.138.89.195] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 09 Dec 2010 04:28:25 -0000 Received: from [127.0.0.1] by omp1053.mail.ne1.yahoo.com with NNFMP; 09 Dec 2010 04:28:25 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 335334.91397.bm@omp1053.mail.ne1.yahoo.com Received: (qmail 10046 invoked by uid 60001); 9 Dec 2010 04:28:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291868904; bh=FE5JQrkSdriyXPyncc6Rf4TjJCpuPMle8iXMtKNg2Pg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=4yNyCqQ206cpQA8T4GiASB2tPyzwNi4IlJPOX1SFjZSSmtLHb2LEWshXNKMEXKohCVJdwaTkaxaeI/d+V8H83+XQguZC8c5UcZzw3W5sl5z3v7u+O/LX0JAKQ7dK/REm1HmN04LH3YaMIQoLan98q2EdMrgXgNJLkgTJ9rM5G5I= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Vz2JATnFnnHaIiW8Lv9SrtJ33fjNk5Fo49tHeQ+UmlqeQ3G6FM8d2gSkS+8c0uRJb+HktdOI+GsA8g874xQTgKCrIUtDvHSZ1kKTPPfPQznCxLNfBZpXvIgVOTgmRPR3N03K75KacxPOS8Ppn5gLrOOemRScPBMi3BvOVaYJxJg=; Message-ID: <693115.9085.qm@web113614.mail.gq1.yahoo.com> X-YMail-OSG: RvD4fFgVM1mOTTSw_KFK.OD1AMoKYNU7DdD6UEbW6x96oKf otMsQAukEb2oivD9tYhPouEHvmF8SIe6WyW5Gq3wztkqxRumzHs_vq_Mf4x_ EK0p8YFRGht9cnXAtFuiNbXABXHBuPGKuMUh7mSfUtruvayc4Y8GpcPe5O5P 3GffZvv0nVg6Iz7ta2x1U80V769ZgtJtz3Vm4V46DpiskeOXmv66dZminmNo QCWndaZkUE1HklxvgVWiaRQ37TfVKQk7erqEbxhMfyqmJtaDU11fCmxbIsoQ rqKQKj7ItA12QfxtHtgy5Cv5ytY2MEWlaXWIyjobvOwmtVN1prE90KV0ntW7 U2.QF3QtZFcN4hY7oxIRjDVZCKBvjC.6hbs7ggOENVc9e Received: from [24.9.231.33] by web113614.mail.gq1.yahoo.com via HTTP; Wed, 08 Dec 2010 20:28:24 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 References: <4CFC98DD.7030302@dinom.ru> <4CFD0E3A.2000108@dinom.ru> <335744.45102.qm@web113607.mail.gq1.yahoo.com> <671717.20030.qm@web113619.mail.gq1.yahoo.com> <987085.37359.qm@web113606.mail.gq1.yahoo.com> <2A82C1F9-9958-449C-A1F1-891844A8C5D1@consol.de> <80508634-064C-40F8-B9C9-2ECC41C3F130@gmail.com> <188225.70711.qm@web113605.mail.gq1.yahoo.com> Date: Wed, 8 Dec 2010 20:28:24 -0800 (PST) From: Jon Svede Subject: Re: NPV bug? To: POI Users List In-Reply-To: <188225.70711.qm@web113605.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I created issue #50437 and attached my .xls file. Marcel can work from that and submit his test case or I can create one. Jon ----- Original Message ---- From: Jon Svede To: POI Users List Sent: Wed, December 8, 2010 9:10:40 PM Subject: Re: NPV bug? 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 To: POI Users List 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: > > > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org