From: Martin Kronbichler Date: Sun, 5 Nov 2017 17:33:40 +0000 (+0100) Subject: Filter away small numbers to avoid roundoff errors for floats. X-Git-Tag: v9.0.0-rc1~817^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c29e5849d8e0b22cbfb840459c9976b3877a24ea;p=dealii.git Filter away small numbers to avoid roundoff errors for floats. --- diff --git a/tests/full_matrix/full_matrix_09.cc b/tests/full_matrix/full_matrix_09.cc index eff8fb1b12..77ececa4f1 100644 --- a/tests/full_matrix/full_matrix_09.cc +++ b/tests/full_matrix/full_matrix_09.cc @@ -41,7 +41,8 @@ void test() C.add(-1., E); - deallog << "Difference 1: " << (double)C.l1_norm() << std::endl; + const double tolerance = 100*std::numeric_limits::epsilon(); + deallog << "Difference 1: " << filter_out_small_numbers(C.l1_norm(),tolerance) << std::endl; C = 0; for (unsigned int i=0; i::epsilon()*50.) << std::endl; } int main()