Fix implicit cast to double.

Triggers `-Wimplicit-float-conversion`, causing a bunch of build errors
in Google due to `-Wall`.
This commit is contained in:
Antonio Sanchez 2020-12-12 09:26:20 -08:00
parent 55967f87d1
commit 5dc2fbabee

View File

@ -253,10 +253,10 @@ Packet plog_impl_double(const Packet _x)
// Add the logarithm of the exponent back to the result of the interpolation.
if (base2) {
const Packet cst_log2e = pset1<Packet>(EIGEN_LOG2E);
const Packet cst_log2e = pset1<Packet>(static_cast<double>(EIGEN_LOG2E));
x = pmadd(x, cst_log2e, e);
} else {
const Packet cst_ln2 = pset1<Packet>(EIGEN_LN2);
const Packet cst_ln2 = pset1<Packet>(static_cast<double>(EIGEN_LN2));
x = pmadd(e, cst_ln2, x);
}