|
From: Andreas S. <an...@sp...> - 2010-10-15 08:01:05
|
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 |