Skip to content

Commit

Permalink
fix compilation issue + use boost mp type
Browse files Browse the repository at this point in the history
  • Loading branch information
sloriot committed Mar 19, 2024
1 parent a26c93d commit ae324ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CGAL_Core/include/CGAL/CORE/BigFloat_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned>(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);
Expand Down
6 changes: 3 additions & 3 deletions CGAL_Core/include/CGAL/CORE/BigInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned long>::max)();
return (std::numeric_limits<unsigned>::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;
}
Expand Down
2 changes: 1 addition & 1 deletion Number_types/include/CGAL/CORE_BigFloat.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class Interval_traits<CORE::BigFloat>

// shift such that err.m()+err.err() fits into long
int digits_long = std::numeric_limits<long>::digits;
if(::CORE::bitLength(err.m()+err.err()) >= digits_long){
if(::CORE::bitLength(err.m()+err.err()) >= static_cast<unsigned>(digits_long)){
long shift = ::CORE::bitLength(err.m()) - digits_long + 1 ;
//std::cout << "shift " << shift<< std::endl;
CORE::BigInt bi = (err.m() + err.err());
Expand Down

0 comments on commit ae324ae

Please sign in to comment.