Re: test-suite failure with capfloor on mac
Posted by Ferdinando M. Ametrano-3 on Mar 20, 2004; 4:58am
URL: http://quantlib.414.s1.nabble.com/test-suite-failure-with-capfloor-on-mac-tp2831p2834.html
Hi Mark
>I checked out the R000305f0-branch from cvs and compiled it with the same
>results. The test suite passes everything except for that single case.
I've probably just patched the problem. It was related to numerical
rounding errors of the normal cumulative function N(x) for x around -7.5,
and I've fixed it requiring that is fabs(N(x))<1e-16 then the result is
zero. I've made this patch in the Black formula, while it probably should
go in the normal cumulative function.
The real solution would be to improve our normal cumulative function, but
I'm not an expert and for QuantLib I borrowed the best implementation I
know of (from "Monte Carlo Methods in Finance" by Peter Jaeckel). Of course
any contribution about this is welcome.
Mark, would you update you local copy of the branch R000305f0 and give me a
feedback about the patch?
thank you very much
ciao -- Nando