From ae324aee83e1093fffd63cd905342cb88e2a4205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Mar 2024 15:27:54 +0100 Subject: [PATCH] fix compilation issue + use boost mp type --- CGAL_Core/include/CGAL/CORE/BigFloat_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/BigInt.h | 6 +++--- Number_types/include/CGAL/CORE_BigFloat.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h index b6eb9054c8e1..7bf616e8fda7 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h @@ -214,7 +214,7 @@ CGAL_INLINE_FUNCTION void BigFloatRep::approx(const BigFloatRep& B, const extLong& r, const extLong& a) { if (B.err) { - if (1 + clLg(B.err) <= bitLength(B.m)) + if (static_cast(1 + clLg(B.err)) <= bitLength(B.m)) truncM(B, r + 1, a); else // 1 + clLg(B.err) > lg(B.m) truncM(B, CORE_posInfty, a); diff --git a/CGAL_Core/include/CGAL/CORE/BigInt.h b/CGAL_Core/include/CGAL/CORE/BigInt.h index 4dd1f1e8ecd7..a4b17f28937d 100644 --- a/CGAL_Core/include/CGAL/CORE/BigInt.h +++ b/CGAL_Core/include/CGAL/CORE/BigInt.h @@ -87,15 +87,15 @@ inline bool isDivisible(long x, long y) { } /// get exponent of power 2 -inline auto getBinExpo(const BigInt& z) { +inline unsigned getBinExpo(const BigInt& z) { if (z.is_zero()) { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } return lsb(abs(z)); } // bit length -inline auto bitLength(const BigInt& a) { +inline unsigned bitLength(const BigInt& a){ if (a.is_zero()) { return 0; } diff --git a/Number_types/include/CGAL/CORE_BigFloat.h b/Number_types/include/CGAL/CORE_BigFloat.h index 81e9fcbaca60..b7da346a31b3 100644 --- a/Number_types/include/CGAL/CORE_BigFloat.h +++ b/Number_types/include/CGAL/CORE_BigFloat.h @@ -178,7 +178,7 @@ class Interval_traits // shift such that err.m()+err.err() fits into long int digits_long = std::numeric_limits::digits; - if(::CORE::bitLength(err.m()+err.err()) >= digits_long){ + if(::CORE::bitLength(err.m()+err.err()) >= static_cast(digits_long)){ long shift = ::CORE::bitLength(err.m()) - digits_long + 1 ; //std::cout << "shift " << shift<< std::endl; CORE::BigInt bi = (err.m() + err.err());