diff --git a/Number_types/include/CGAL/Gmpq.h b/Number_types/include/CGAL/Gmpq.h index 858d8b426b7..fb04302ee75 100644 --- a/Number_types/include/CGAL/Gmpq.h +++ b/Number_types/include/CGAL/Gmpq.h @@ -91,7 +91,7 @@ template <> class Real_embeddable_traits< Gmpq > MPFR_DECL_INIT (y, 53); /* Assume IEEE-754 */ int r = mpfr_set_q (y, x.mpq(), MPFR_RNDA); double i = mpfr_get_d (y, MPFR_RNDA); /* EXACT but can overflow */ - if (r == 0 && !isinf (i)) + if (r == 0 && is_finite (i)) return std::pair(i, i); else { diff --git a/Number_types/include/CGAL/Gmpz.h b/Number_types/include/CGAL/Gmpz.h index fe0dc2ef18a..f511af8c4c8 100644 --- a/Number_types/include/CGAL/Gmpz.h +++ b/Number_types/include/CGAL/Gmpz.h @@ -133,7 +133,7 @@ public: MPFR_DECL_INIT (y, 53); /* Assume IEEE-754 */ int r = mpfr_set_z (y, x.mpz(), MPFR_RNDA); double i = mpfr_get_d (y, MPFR_RNDA); /* EXACT but can overflow */ - if (r == 0 && !isinf (i)) + if (r == 0 && is_finite (i)) return std::pair(i, i); else { diff --git a/Number_types/include/CGAL/mpq_class.h b/Number_types/include/CGAL/mpq_class.h index d822d657a88..80997fa3789 100644 --- a/Number_types/include/CGAL/mpq_class.h +++ b/Number_types/include/CGAL/mpq_class.h @@ -210,7 +210,7 @@ class Real_embeddable_traits< mpq_class > MPFR_DECL_INIT (y, 53); /* Assume IEEE-754 */ int r = mpfr_set_q (y, x.get_mpq_t(), MPFR_RNDA); double i = mpfr_get_d (y, MPFR_RNDA); /* EXACT but can overflow */ - if (r == 0 && !isinf (i)) + if (r == 0 && is_finite (i)) return std::pair(i, i); else { diff --git a/Number_types/include/CGAL/mpz_class.h b/Number_types/include/CGAL/mpz_class.h index c19728b7651..026e6d64e60 100644 --- a/Number_types/include/CGAL/mpz_class.h +++ b/Number_types/include/CGAL/mpz_class.h @@ -274,7 +274,7 @@ public: MPFR_DECL_INIT (y, 53); /* Assume IEEE-754 */ int r = mpfr_set_z (y, x.get_mpz_t(), MPFR_RNDA); double i = mpfr_get_d (y, MPFR_RNDA); /* EXACT but can overflow */ - if (r == 0 && !isinf (i)) + if (r == 0 && is_finite (i)) return std::pair(i, i); else {