Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Arbitrary-precision unsigned integer class. More...
#include <Teuchos_BigUIntDecl.hpp>
Public Member Functions | |
BigUInt () | |
BigUInt (std::uint64_t v) | |
BigUInt (std::string const &s) | |
operator bool () const noexcept | |
std::uint32_t & | operator[] (int i) |
std::uint32_t const & | operator[] (int i) const |
BigUInt & | operator+= (std::uint32_t b) |
BigUInt & | operator+= (BigUInt const &b) |
BigUInt & | operator-= (std::uint32_t b) |
BigUInt & | operator-= (BigUInt const &b) |
BigUInt & | operator*= (std::uint32_t b) |
BigUInt & | operator<<= (std::uint32_t b) |
BigUInt & | operator>>= (std::uint32_t b) |
Private Attributes | |
std::uint32_t | x [n] |
Arbitrary-precision unsigned integer class.
This class implements an unsigned integer type of arbitrary precision. The precision is chosen at compile time via a template parameter. The template parameter specifies how many 32-bit "digits" will compose the full integer. Thus, the number has (32*n) bits of precision.
This class was primarily created to serve the Teuchos::print_double function for printing floating-point values in a lossless and minimal way.
Definition at line 34 of file Teuchos_BigUIntDecl.hpp.
Teuchos::BigUInt< n >::BigUInt | ( | ) |
Definition at line 23 of file Teuchos_BigUInt.hpp.
Teuchos::BigUInt< n >::BigUInt | ( | std::uint64_t | v | ) |
Definition at line 26 of file Teuchos_BigUInt.hpp.
Teuchos::BigUInt< n >::BigUInt | ( | std::string const & | s | ) |
Definition at line 33 of file Teuchos_BigUInt.hpp.
|
explicitnoexcept |
Definition at line 41 of file Teuchos_BigUInt.hpp.
std::uint32_t & Teuchos::BigUInt< n >::operator[] | ( | int | i | ) |
Definition at line 47 of file Teuchos_BigUInt.hpp.
std::uint32_t const & Teuchos::BigUInt< n >::operator[] | ( | int | i | ) | const |
Definition at line 50 of file Teuchos_BigUInt.hpp.
BigUInt< n > & Teuchos::BigUInt< n >::operator+= | ( | std::uint32_t | b | ) |
Definition at line 53 of file Teuchos_BigUInt.hpp.
BigUInt< n > & Teuchos::BigUInt< n >::operator+= | ( | BigUInt< n > const & | b | ) |
Definition at line 65 of file Teuchos_BigUInt.hpp.
BigUInt< n > & Teuchos::BigUInt< n >::operator-= | ( | std::uint32_t | b | ) |
Definition at line 78 of file Teuchos_BigUInt.hpp.
BigUInt< n > & Teuchos::BigUInt< n >::operator-= | ( | BigUInt< n > const & | b | ) |
Definition at line 95 of file Teuchos_BigUInt.hpp.
BigUInt< n > & Teuchos::BigUInt< n >::operator*= | ( | std::uint32_t | b | ) |
Definition at line 113 of file Teuchos_BigUInt.hpp.
BigUInt< n > & Teuchos::BigUInt< n >::operator<<= | ( | std::uint32_t | b | ) |
Definition at line 125 of file Teuchos_BigUInt.hpp.
BigUInt< n > & Teuchos::BigUInt< n >::operator>>= | ( | std::uint32_t | b | ) |
Definition at line 143 of file Teuchos_BigUInt.hpp.
|
private |
Definition at line 36 of file Teuchos_BigUIntDecl.hpp.