diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-09-14 11:59:10 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-09-14 11:59:10 +0000 |
commit | db030d4e285510f3684f7bce771ebe72b1505cb2 (patch) | |
tree | 20fd695ab4fc28df0df394fd7821726bab67076c /test | |
parent | 8473a77f2fc3461a4d93de08cda4a50a62ca0abe (diff) |
* fix issues with "long double" type (useful to enforce the use of x87 registers)
* extend the documentation on "extending Eigen"
Diffstat (limited to 'test')
-rw-r--r-- | test/basicstuff.cpp | 1 | ||||
-rw-r--r-- | test/main.h | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp index 769e021af..40e999c87 100644 --- a/test/basicstuff.cpp +++ b/test/basicstuff.cpp @@ -111,5 +111,6 @@ void test_basicstuff() CALL_SUBTEST( basicStuff(MatrixXi(8, 12)) ); CALL_SUBTEST( basicStuff(MatrixXcd(20, 20)) ); CALL_SUBTEST( basicStuff(Matrix<float, 100, 100>()) ); + CALL_SUBTEST( basicStuff(Matrix<long double,Dynamic,Dynamic>(10,10)) ); } } diff --git a/test/main.h b/test/main.h index 5079fdb5b..aeba4429d 100644 --- a/test/main.h +++ b/test/main.h @@ -169,6 +169,7 @@ template<> inline float test_precision<float>() { return 1e-4f; } template<> inline double test_precision<double>() { return 1e-6; } template<> inline float test_precision<std::complex<float> >() { return test_precision<float>(); } template<> inline double test_precision<std::complex<double> >() { return test_precision<double>(); } +template<> inline long double test_precision<long double>() { return 1e-6; } inline bool test_ei_isApprox(const int& a, const int& b) { return ei_isApprox(a, b, test_precision<int>()); } @@ -201,6 +202,13 @@ inline bool test_ei_isApprox(const std::complex<double>& a, const std::complex<d inline bool test_ei_isMuchSmallerThan(const std::complex<double>& a, const std::complex<double>& b) { return ei_isMuchSmallerThan(a, b, test_precision<std::complex<double> >()); } +inline bool test_ei_isApprox(const long double& a, const long double& b) +{ return ei_isApprox(a, b, test_precision<long double>()); } +inline bool test_ei_isMuchSmallerThan(const long double& a, const long double& b) +{ return ei_isMuchSmallerThan(a, b, test_precision<long double>()); } +inline bool test_ei_isApproxOrLessThan(const long double& a, const long double& b) +{ return ei_isApproxOrLessThan(a, b, test_precision<long double>()); } + template<typename Derived1, typename Derived2> inline bool test_ei_isApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2) |