Silenced several double-promotion warnings

This commit is contained in:
Christoph Hertzberg
2016-05-22 18:17:04 +02:00
parent b5a7603822
commit 718521d5cf
12 changed files with 52 additions and 48 deletions

View File

@@ -61,7 +61,7 @@ struct generateTestMatrix<MatrixType,1>
};
template <typename Derived, typename OtherDerived>
double relerr(const MatrixBase<Derived>& A, const MatrixBase<OtherDerived>& B)
typename Derived::RealScalar relerr(const MatrixBase<Derived>& A, const MatrixBase<OtherDerived>& B)
{
return std::sqrt((A - B).cwiseAbs2().sum() / (std::min)(A.cwiseAbs2().sum(), B.cwiseAbs2().sum()));
}