Use ADL and log10 for printing matrices.

This commit is contained in:
Gael Guennebaud 2016-07-21 15:48:24 +02:00
parent 82798162c0
commit bf91a44f4a

View File

@ -131,7 +131,9 @@ struct significant_decimals_default_impl
typedef typename NumTraits<Scalar>::Real RealScalar;
static inline int run()
{
return cast<RealScalar,int>(numext::ceil(-numext::log(NumTraits<RealScalar>::epsilon())/numext::log(RealScalar(10))));
using std::ceil;
using std::log10;
return cast<RealScalar,int>(ceil(-log10(NumTraits<RealScalar>::epsilon())));
}
};