mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Avoid float to double conversion
This commit is contained in:
parent
7aa3557d31
commit
2d74ef9682
@ -525,7 +525,7 @@ template<typename ArrayType> void array_complex(const ArrayType& m)
|
|||||||
|
|
||||||
// scalar by array division
|
// scalar by array division
|
||||||
Scalar s1 = internal::random<Scalar>();
|
Scalar s1 = internal::random<Scalar>();
|
||||||
const RealScalar tiny = sqrt(std::numeric_limits<RealScalar>::epsilon());
|
const RealScalar tiny = std::sqrt(std::numeric_limits<RealScalar>::epsilon());
|
||||||
s1 += Scalar(tiny);
|
s1 += Scalar(tiny);
|
||||||
m1 += ArrayType::Constant(rows,cols,Scalar(tiny));
|
m1 += ArrayType::Constant(rows,cols,Scalar(tiny));
|
||||||
VERIFY_IS_APPROX(s1/m1, s1 * m1.inverse());
|
VERIFY_IS_APPROX(s1/m1, s1 * m1.inverse());
|
||||||
|
Loading…
Reference in New Issue
Block a user