|
From: Luigi B. <lui...@gm...> - 2008-08-22 15:53:09
|
Hi Sylvain, apologies for the long silence. On Mon, 2008-08-04 at 11:55 -0400, Sylvain Bertrand wrote: > As the implementation relies heavily on matrix operations, I would > need to use only long double matrices, which work if I set QL_REAL to > long double for the whole library, since matrices are forced to the > QL_REAL type. > > "QL_REAL = long double" would then have to be the default for QL > releases, otherwise the user would run the risk of using the cubic > splines with very poor results (in that case there should also be a > warning to prevent the user from changing the setting back to double > and use the splines). > > Is that something that would be acceptable? I personally don't think > of it as the best option. You're right, this is not a good option. > Another option would be to transform the current Matrix class into a > template to support different types, which would give each piece of > code the freedom to use the default QL_REAL or use more precision when > needed. Possibly. It would make the Matrix code quite a bit more complicated, though. Do you think it would be possible to improve the accuracy of matrix calculations while keeping the double type? Maybe by using some smarter algorithms instead of the naive ones we used? Later, Luigi -- The rule on staying alive as a forecaster is to give 'em a number or give 'em a date, but never give 'em both at once. -- Jane Bryant Quinn |