Re: [eigen] fix double-promotion in 3.3 Core/SpecialFunctions.h

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


std::pow(float, int) actually gets promoted to std::pow(double, double).

Note that this is correct as of c++11: http://en.cppreference.com/w/cpp/numeric/math/pow

This is especially bad for std::pow(x, 2). Inside Eigen we can use

Does pow(x, 2.0) fix it? If not, pow(x, float(2)) at least should...
Ilja



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