diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-02-01 11:10:30 -0800 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-02-01 11:10:30 -0800 |
commit | 00f9ef6c76d2cc2069add038765cd8e5d9850279 (patch) | |
tree | 4b237752ab8bf121909f05d203eaa82b4400d801 /test/stable_norm.cpp | |
parent | acce4dd0500fbb9524fe35aacafb7fbc5f7f76f9 (diff) | |
parent | 264f8141f86e84312f0eea9e741d2260ed839890 (diff) |
merging.
Diffstat (limited to 'test/stable_norm.cpp')
-rw-r--r-- | test/stable_norm.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/stable_norm.cpp b/test/stable_norm.cpp index 9f12320e0..c3eb5ff31 100644 --- a/test/stable_norm.cpp +++ b/test/stable_norm.cpp @@ -174,7 +174,8 @@ template<typename MatrixType> void stable_norm(const MatrixType& m) VERIFY_IS_APPROX(vcopy.norm(), RealScalar(1)); VERIFY_IS_APPROX((vbig.stableNormalized()).norm(), RealScalar(1)); VERIFY_IS_APPROX((vsmall.stableNormalized()).norm(), RealScalar(1)); - VERIFY_IS_APPROX(vbig, vbig.stableNorm() * vbig.stableNormalized()); + RealScalar big_scaling = ((std::numeric_limits<RealScalar>::max)() * RealScalar(1e-4)); + VERIFY_IS_APPROX(vbig/big_scaling, (vbig.stableNorm() * vbig.stableNormalized()).eval()/big_scaling); VERIFY_IS_APPROX(vsmall, vsmall.stableNorm() * vsmall.stableNormalized()); } } |