aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/matrix_functions.h
diff options
context:
space:
mode:
Diffstat (limited to 'unsupported/test/matrix_functions.h')
-rw-r--r--unsupported/test/matrix_functions.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/test/matrix_functions.h b/unsupported/test/matrix_functions.h
index 150b4c0c5..4e2636404 100644
--- a/unsupported/test/matrix_functions.h
+++ b/unsupported/test/matrix_functions.h
@@ -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()));
}