mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-13 08:31:48 +08:00
fix stable_norm unit test
This commit is contained in:
parent
0b426ea00d
commit
3b5a9acba8
@ -36,7 +36,7 @@ template<typename MatrixType> void stable_norm(const MatrixType& m)
|
|||||||
int rows = m.rows();
|
int rows = m.rows();
|
||||||
int cols = m.cols();
|
int cols = m.cols();
|
||||||
|
|
||||||
Scalar big = ei_random<Scalar>() * std::numeric_limits<RealScalar>::max() * RealScalar(1e-4);
|
Scalar big = ei_abs(ei_random<Scalar>()) * (std::numeric_limits<RealScalar>::max() * RealScalar(1e-4));
|
||||||
Scalar small = static_cast<RealScalar>(1)/big;
|
Scalar small = static_cast<RealScalar>(1)/big;
|
||||||
|
|
||||||
MatrixType vzero = MatrixType::Zero(rows, cols),
|
MatrixType vzero = MatrixType::Zero(rows, cols),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user