From d17db333a4882c86c2e043a723b3024dfdbc02f0 Mon Sep 17 00:00:00 2001 From: Ralf Hartmann Date: Mon, 24 May 2004 14:39:56 +0000 Subject: [PATCH] Proper comparison of doubles. git-svn-id: https://svn.dealii.org/trunk@9301 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/petsc_18.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bits/petsc_18.cc b/tests/bits/petsc_18.cc index 0175e192f6..f2340c68bf 100644 --- a/tests/bits/petsc_18.cc +++ b/tests/bits/petsc_18.cc @@ -32,8 +32,8 @@ void test (PETScWrappers::Vector &v) } v.compress (); - // then check the norm - Assert (v.l2_norm() == std::sqrt(norm), ExcInternalError()); + // then check the norm + Assert (fabs(v.l2_norm()-std::sqrt(norm))<1e-14, ExcInternalError()); deallog << "OK" << std::endl; } -- 2.39.5