Registered Member
|
I am trying to use TTMath's Big class to deal with extra large numbers in some computations. However, when I try to call LevenbergMarquardt<fit_functor,Real>::lmdif1(functor,xvec,&nfev,eps), I get these errors about inability to convert to double (see below).
I looked through the Eigen's code and I cannot find where the double is being declared, because "Scalar" is always used. Is what I am trying to do supported?
|
Moderator
|
It seems the second template parameter is missing, so what if you change line 644 with:
LevenbergMarquardt<NumericalDiff<FunctorType>, Scalar > lm(numDiff); |
Registered Member
|
After this fix, I discovered that ttmath library is missing operators with standard types (int, double) and std::abs, std::sqrt and std::pow (not hard to fix). But it is not possible to cast BigFloat to an int the standard way (\eigen\src\Core\StableNorm.h, line 127).
The killing blow, however, is that computation with double takes a fraction of a second, while with BigFloat I had to cancel it after an hour of computation: I realized I had to find a more efficient way. Edit: Thanks Gael. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]