From 563b59025806e5b6ff96e3cebb1fd495936f3102 Mon Sep 17 00:00:00 2001 From: Ralf Hartmann Date: Mon, 7 Nov 2005 11:56:30 +0000 Subject: [PATCH] Make it compile also for PetscScalar=float. git-svn-id: https://svn.dealii.org/trunk@11724 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/petsc_33.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5