mirror of https://github.com/CGAL/cgal
fix conversion warning
follow the code rather than the doc...
This commit is contained in:
parent
5dc53d720f
commit
c249476467
|
|
@ -214,7 +214,7 @@ CGAL_INLINE_FUNCTION
|
|||
void BigFloatRep::approx(const BigFloatRep& B,
|
||||
const extLong& r, const extLong& a) {
|
||||
if (B.err) {
|
||||
if (static_cast<unsigned>(1 + clLg(B.err)) <= bitLength(B.m))
|
||||
if (static_cast<std::size_t>(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);
|
||||
|
|
|
|||
|
|
@ -87,15 +87,15 @@ inline bool isDivisible(long x, long y) {
|
|||
|
||||
}
|
||||
/// get exponent of power 2
|
||||
inline unsigned getBinExpo(const BigInt& z) {
|
||||
inline std::size_t getBinExpo(const BigInt& z) {
|
||||
if (z.is_zero()) {
|
||||
return (std::numeric_limits<unsigned>::max)();
|
||||
return (std::numeric_limits<std::size_t>::max)();
|
||||
}
|
||||
return lsb(abs(z));
|
||||
}
|
||||
|
||||
// bit length
|
||||
inline unsigned bitLength(const BigInt& a){
|
||||
inline std::size_t bitLength(const BigInt& a){
|
||||
if (a.is_zero()) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ public:
|
|||
|
||||
// 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()) >= static_cast<unsigned>(digits_long)){
|
||||
if(::CORE::bitLength(err.m()+err.err()) >= static_cast<std::size_t>(digits_long)){
|
||||
long shift = ::CORE::bitLength(err.m()) - digits_long + 1 ;
|
||||
//std::cout << "shift " << shift<< std::endl;
|
||||
CORE::BigInt bi = (err.m() + err.err());
|
||||
|
|
|
|||
Loading…
Reference in New Issue