diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-12-16 16:23:47 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-12-16 16:23:47 +0100 |
commit | 99501a2c4c015a0f5a4a11d3cfbcdf1d3a39fe49 (patch) | |
tree | 32cb8eeeb13ad5d3879556b311afacdd007af5c8 /test/nullary.cpp | |
parent | 7dad5f797e8c270be5f32aee154f6660df2242f5 (diff) |
Fix wrong negative in nullary unit test when extended precision is used (FPU).
Diffstat (limited to 'test/nullary.cpp')
-rw-r--r-- | test/nullary.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/nullary.cpp b/test/nullary.cpp index 5408d88b2..fbc721a1a 100644 --- a/test/nullary.cpp +++ b/test/nullary.cpp @@ -80,7 +80,9 @@ void testVectorType(const VectorType& base) Matrix<Scalar,1,Dynamic> col_vector(size); row_vector.setLinSpaced(size,low,high); col_vector.setLinSpaced(size,low,high); - VERIFY( row_vector.isApprox(col_vector.transpose(), NumTraits<Scalar>::epsilon())); + // when using the extended precision (e.g., FPU) the relative error might exceed 1 bit + // when computing the squared sum in isApprox, thus the 2x factor. + VERIFY( row_vector.isApprox(col_vector.transpose(), Scalar(2)*NumTraits<Scalar>::epsilon())); Matrix<Scalar,Dynamic,1> size_changer(size+50); size_changer.setLinSpaced(size,low,high); |