aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/matrix_exponential.cpp
diff options
context:
space:
mode:
authorGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2011-08-21 00:20:29 +0100
committerGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2011-08-21 00:20:29 +0100
commit9e667e28f56f2ed405f0d1e7b81b63fa82323e4f (patch)
treee93f376df688f3960b72be31654c1550cf5f7c8b /unsupported/test/matrix_exponential.cpp
parent6d7a32231d0b64ff7d43badc05a4789b7a5f518f (diff)
Add coverage for long double to matrix_exponential test.
Diffstat (limited to 'unsupported/test/matrix_exponential.cpp')
-rw-r--r--unsupported/test/matrix_exponential.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/unsupported/test/matrix_exponential.cpp b/unsupported/test/matrix_exponential.cpp
index 996b42a7f..26403c4e6 100644
--- a/unsupported/test/matrix_exponential.cpp
+++ b/unsupported/test/matrix_exponential.cpp
@@ -55,7 +55,7 @@ void test2dRotation(double tol)
for (int i=0; i<=20; i++)
{
angle = static_cast<T>(pow(10, i / 5. - 2));
- B << cos(angle), sin(angle), -sin(angle), cos(angle);
+ B << std::cos(angle), std::sin(angle), -std::sin(angle), std::cos(angle);
C = (angle*A).matrixFunction(expfn);
std::cout << "test2dRotation: i = " << i << " error funm = " << relerr(C, B);
@@ -146,8 +146,10 @@ void test_matrix_exponential()
{
CALL_SUBTEST_2(test2dRotation<double>(1e-13));
CALL_SUBTEST_1(test2dRotation<float>(2e-5)); // was 1e-5, relaxed for clang 2.8 / linux / x86-64
+ CALL_SUBTEST_8(test2dRotation<long double>(1e-13));
CALL_SUBTEST_2(test2dHyperbolicRotation<double>(1e-14));
CALL_SUBTEST_1(test2dHyperbolicRotation<float>(1e-5));
+ CALL_SUBTEST_8(test2dHyperbolicRotation<long double>(1e-14));
CALL_SUBTEST_6(testPascal<float>(1e-6));
CALL_SUBTEST_5(testPascal<double>(1e-15));
CALL_SUBTEST_2(randomTest(Matrix2d(), 1e-13));
@@ -158,4 +160,5 @@ void test_matrix_exponential()
CALL_SUBTEST_5(randomTest(Matrix3cf(), 1e-4));
CALL_SUBTEST_1(randomTest(Matrix4f(), 1e-4));
CALL_SUBTEST_6(randomTest(MatrixXf(8,8), 1e-4));
+ CALL_SUBTEST_9(randomTest(Matrix<long double,Dynamic,Dynamic>(7,7), 1e-13));
}