|
From: Sylvain B. <syl...@gm...> - 2008-07-23 19:53:32
|
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 <syl...@gm...> 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 <syl...@gm...> 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 >> > > |