]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Disambiguate a call to std::pow.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Aug 2002 09:32:00 +0000 (09:32 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Aug 2002 09:32:00 +0000 (09:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@6332 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/vector.templates.h

index d5a1a0d8c416e287a07f564fcdc5277deaf87153..39c9a2372aa1527f23962fd60ab4602eb2426793 100644 (file)
@@ -265,7 +265,8 @@ Number Vector<Number>::lp_norm (const Number p) const
   while (ptr != end())
     sum0 += std::pow(std::fabs(*ptr++), p);
   
-  return std::pow(sum0+sum1+sum2+sum3, 1./p);
+  return std::pow(sum0+sum1+sum2+sum3,
+                 static_cast<Number>(1./p));
 };
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.