From: Ralf Hartmann Date: Mon, 24 May 2004 14:39:56 +0000 (+0000) Subject: Proper comparison of doubles. X-Git-Tag: v8.0.0~15141 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d17db333a4882c86c2e043a723b3024dfdbc02f0;p=dealii.git Proper comparison of doubles. git-svn-id: https://svn.dealii.org/trunk@9301 0785d39b-7218-0410-832d-ea1e28bc413d --- 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; }