Hi all, I’m computing zero rates for a benchmark in QuantLib,
but yesterday I encountered an error, I did debug the library and found
std::power (-124.75591365063, 0.04928131417), returns #NUM ( Not a valid
number), verified in ‘Excel’ and ‘Calc’, which leads to
failure of further calculation, the arguments in std::power(,) are formula
based, it’s runtime value, I want to know, how to handle this kind of errors, it doesn’t
throw any exceptions. Thanks & Regards, * 3i Infotech wins the "WorldBlu List of Most Democratic Workplaces 2010" Award This e-mail message may contain confidential,proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient. If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and associated companies,(collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects. ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi,
Es schrieb Deepak > I'm computing zero rates for a benchmark in QuantLib, but yesterday I > encountered an error, I did debug the library and found std::power > (-124.75591365063, 0.04928131417), returns #NUM ( Not a valid number) First off, you probably mean "std::pow", right? Have a look at http://www.cplusplus.com/reference/clibrary/cmath/pow/ There it says: "If base is negative and exponent is not an integral value, or if base is zero and exponent is negative, a domain error occurs... > I want to know, how to handle this kind of errors, it doesn't throw any > exceptions. ...setting the global variable errno to the value EDOM." Rgds, Andreas ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by deepak sharma-4
On Fri, 2010-10-15 at 10:30 +0530, Deepak wrote:
> I’m computing zero rates for a benchmark in QuantLib, but yesterday I > encountered an error, I did debug the library and found std::power > (-124.75591365063, 0.04928131417), returns #NUM ( Not a valid number), > verified in ‘Excel’ and ‘Calc’, which leads to failure of further > calculation, the arguments in std::power(,) are formula based, it’s > runtime value, Where is the call to std::pow? (file, line...) Luigi -- If I do not want others to quote me, I do not speak. -- Phil Wayne ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Luigi,
Sorry, it's our custom code in QuantLib for bootstrapstrategy .... Thanks & Regards, Deepak Sharma -----Original Message----- From: Luigi Ballabio [mailto:[hidden email]] Sent: Friday, October 15, 2010 1:15 PM To: [hidden email] Cc: [hidden email]; [hidden email] Subject: Re: [Quantlib-dev] std::power fails .. On Fri, 2010-10-15 at 10:30 +0530, Deepak wrote: > I'm computing zero rates for a benchmark in QuantLib, but yesterday I > encountered an error, I did debug the library and found std::power > (-124.75591365063, 0.04928131417), returns #NUM ( Not a valid number), > verified in 'Excel' and 'Calc', which leads to failure of further > calculation, the arguments in std::power(,) are formula based, it's > runtime value, Where is the call to std::pow? (file, line...) Luigi -- If I do not want others to quote me, I do not speak. -- Phil Wayne --- * 3i Infotech wins the "WorldBlu List of Most Democratic Workplaces 2010" Award This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient.If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and associated companies, (collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects. ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by deepak sharma-4
Hi Deepak,
Quoting Deepak <[hidden email]>: > Hi all, > > I'm computing zero rates for a benchmark in QuantLib, but yesterday I > encountered an error, I did debug the library and found std::power > (-124.75591365063, 0.04928131417), returns #NUM You may already know how to get additional error info in the case of #NUM. In any case I have updated the FAQ with an explanation for this: http://quantlib.org/quantlibxl/faq.html#faq_item_hashnum Regards, Eric ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |