Re: [eigen] boost::multiprecision : wrong eigen values

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]



Hi,

checking that  "eigensolverH.info() ==  Eigen::Success" indicates that the solver failed. That explains why their are not sorted.

Adding:

namespace Eigen {
  template<> struct NumTraits<TpFloat> : GenericNumTraits<TpFloat> {
    static inline TpFloat dummy_precision() { return sqrt(std::numeric_limits<TpFloat>::epsilon()); }
  };
}

fixes the issue, and then the boost version is faster. I'll check why dummy_precision is needed for that task, that should not be case as dummy_precision should only be used for unit testing and debugging purposes, not within numerical algorithms!

gael

On Sat, Jul 23, 2016 at 10:51 AM, Peter <list@xxxxxxxxxxxxxxxxx> wrote:
Dear All,


in case you are interested, I've attached an example where the eigen values using
boost::multiprecision are wrong. In addition, in contrast to the documentation,
they are not sorted, which could be a hint for the problem.

I included a Makefile, which provides executables for double, long double, boost::multiprecision and mpfr.
All, except boost::multiprecision, are consistent. As you can also realize, boost::multiprecision is
much slower compared to mpfr, so I'm not using it and I have no need for it to be fixed.
However, it  might be interesting to see, why it fails.

In case you wonder how I come up with the matrix, it's just an example I found in an application of mine.

Best regards,
Peter



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/