From: Martin Kronbichler Date: Thu, 19 Nov 2009 01:08:24 +0000 (+0000) Subject: Avoid compile problem with std::pow by static_cast of the exponent to int. X-Git-Tag: v8.0.0~6803 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cfdb0fa82c5d7f3d000e0923975fbd29190bfe1;p=dealii.git Avoid compile problem with std::pow by static_cast of the exponent to int. git-svn-id: https://svn.dealii.org/trunk@20132 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/codim_one/integrate_log.cc b/tests/codim_one/integrate_log.cc index cda8c76de3..e9a08a341a 100644 --- a/tests/codim_one/integrate_log.cc +++ b/tests/codim_one/integrate_log.cc @@ -156,11 +156,11 @@ int main() for (unsigned int k=0; k<=j; k++) exact_integral += newton_binomial(j,k) - *pow(a,j-k) + *pow(a,static_cast(j-k)) *( - pow(b-a,k+1) / (k+1) * log(b-a) + pow(b-a,static_cast(k)+1) / (k+1) * log(b-a) - - pow(b-a,k+1) / pow(k+1, 2) + pow(b-a,static_cast(k)+1) / pow(k+1, 2) ); deallog << "f(x) = x^" << j << std::endl; for (unsigned int i=1; i<13; ++i)