From: Ralf Hartmann Date: Mon, 7 Nov 2005 11:56:30 +0000 (+0000) Subject: Make it compile also for PetscScalar=float. X-Git-Tag: v8.0.0~12903 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=563b59025806e5b6ff96e3cebb1fd495936f3102;p=dealii.git Make it compile also for PetscScalar=float. git-svn-id: https://svn.dealii.org/trunk@11724 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/petsc_33.cc b/tests/bits/petsc_33.cc index 07cb7080b1..c42fef1bf1 100644 --- a/tests/bits/petsc_33.cc +++ b/tests/bits/petsc_33.cc @@ -34,8 +34,8 @@ void test (PETScWrappers::Vector &v) // then check the norm const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5; - Assert (std::fabs(v.lp_norm(3) - std::pow(sum, 1./3.)) < - eps*std::pow(sum, 1./3.), + const double true_value=std::pow(sum, static_cast (1./3.)); + Assert (std::fabs(v.lp_norm(3) - true_value) < eps*true_value, ExcInternalError()); deallog << "OK" << std::endl;