| LSSTApplications
    20.0.0
    LSSTDataManagementBasePackage | 
 
 
 
Go to the documentation of this file.
   23 #ifndef LSST_SPHGEOM_BIGINTEGER_H_ 
   24 #define LSST_SPHGEOM_BIGINTEGER_H_ 
   58             _checkCapacity(
b._size);
 
   71     unsigned getSize()
 const { 
return _size; }
 
   78     uint32_t 
const * 
getDigits()
 const { 
return _digits; }
 
   86             setTo(
static_cast<uint64_t
>(-
x));
 
   89             setTo(
static_cast<uint64_t
>(
x));
 
   96         _digits[0] = 
static_cast<uint32_t
>(
x);
 
   97         _digits[1] = 
static_cast<uint32_t
>(
x >> 32);
 
   98         _size = (_digits[1] == 0) ? (_digits[0] != 0) : 2;
 
  119     void _checkCapacity(
unsigned n)
 const {
 
  133 #endif // LSST_SPHGEOM_BIGINTEGER_H_ 
  
void negate()
negate multiplies this integer by -1.
uint32_t const  * getDigits() const
getDigits returns the underlying digit array.
void setTo(uint64_t x)
setTo sets this integer to the given unsigned 64 bit integer value.
BigInteger & subtract(BigInteger const &b)
subtract subtracts b from this integer.
BigInteger & multiplyPow2(unsigned n)
multiplyPow2 multiplies this integer by 2ⁿ.
unsigned getSize() const
getSize returns the number of digits in the value of this integer.
void setTo(int64_t x)
setTo sets this integer to the given signed 64 bit integer value.
BigInteger(uint32_t *digits, unsigned capacity)
This constructor creates a zero-valued integer with the given digit array.
void setToZero()
setToZero sets this integer to zero.
unsigned getCapacity() const
getCapacity returns the number of digits in the underlying digit array.
BigInteger & add(BigInteger const &b)
add adds b to this integer.
BigInteger is an arbitrary precision signed integer class.
A base class for image defects.
int getSign() const
getSign returns -1, 0 or 1 if this integer is negative, zero or positive.
BigInteger & multiply(BigInteger const &b)
multiply multiplies this integer by b.
BigInteger & operator=(BigInteger const &b)