Re: precision in cubicsplineinterpolation (and in general)
Posted by
Sylvain Bertrand on
URL: http://quantlib.414.s1.nabble.com/precision-in-cubicsplineinterpolation-and-in-general-tp12216p12218.html
Anyway, I tried to change the QL_REAL from double to long double (it might actually partially solve my issue).
But then I faced errors calling std::max with a long double on one side, and 0. on the other side. As everyone knows, 0. is a double, and max can only be called with two args of the same type. I would need 0.L here.
If QL_REAL was changed to float, it would produce the same error, and I would need 0.f here.
I'm quite confident on the fact that less than 0.1% of users have ever thought of changing QL_REAL, but what if? Is QuantLib supposed to support other types of Real?
Let me know how you guys feel...
On 7/23/08, Sylvain Bertrand <[hidden email]> wrote:
I assume this has never been an issue for anyone...
I've looked around in the limits.h and other headers in the stdlib and boost, and I've come to the conclusion that increasing the precision of the Real would probably have a lot of impacts.
Is anyone here familiar with those matters?
On 7/22/08, Sylvain Bertrand <[hidden email]> wrote:
Hi,
As I'm working on spline implementations, I've encountered issues with the precision of Real.
The calculations I'm doing rely heavily on precision, and it is not an option for me to consider 1e-20 as 0 or 2.0/3 as 0.666667.
2 things here:
- I want to raise to your attention the fact that the current spline implementation is also affected by this (though to a lesser extent)
- I would like to know if any of you have used workarounds for this, and what you did
Thanks
Sylvain
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev