]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disambiguate call to sqrt(int)
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 3 Jul 2001 11:54:36 +0000 (11:54 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 3 Jul 2001 11:54:36 +0000 (11:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@4804 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria_boundary.cc
deal.II/deal.II/source/grid/tria_boundary_lib.cc

index e5524a3f7c6fae75342d16aa64c48bc546a737e6..421a7c561d336c3f437c2025cd1689703e730fec 100644 (file)
@@ -178,7 +178,7 @@ get_intermediate_points_on_quad (const typename Triangulation<dim>::quad_iterato
                                 typename std::vector<Point<dim> > &points) const
 {
   const unsigned int n=points.size(),
-                    m=static_cast<unsigned int>(std::sqrt(n));
+                    m=static_cast<unsigned int>(std::sqrt(static_cast<double>(n)));
                                   // is n a square number
   Assert(m*m==n, ExcInternalError());
 
index 5f516e38ed2184ace966cef19ffaf20fbc0735dc..cadbfc8baddc9ba8e5e7cbc1a5b234f6cf929d87 100644 (file)
@@ -208,7 +208,7 @@ HyperBallBoundary<3>::get_intermediate_points_on_quad (
   const Triangulation<3>::quad_iterator &quad,
   std::vector<Point<3> > &points) const
 {
-  unsigned int m=static_cast<unsigned int> (std::sqrt(points.size()));
+  unsigned int m=static_cast<unsigned int> (std::sqrt(static_cast<double>(points.size())));
   Assert(points.size()==m*m, ExcInternalError());
 
   std::vector<Point<3> > lp3(m);

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.