21template<mp_
size_t n>
class bigint;
33 static const mp_size_t
N = n;
35 mp_limb_t data[n] = {0};
48 size_t max_bits()
const {
return n * GMP_NUMB_BITS; }
57 friend std::ostream& operator<< <n>(std::ostream &out,
const bigint<n> &b);
58 friend std::istream&
operator>> <n>(std::istream &in,
bigint<n> &b);
62#include <libff/algebra/fields/bigint.tcc>
size_t num_bits() const
Returns the number of bits representable by this bigint type.
bigint(const unsigned long x)
void print() const
Initialize from MPZ element.
bigint(const char *s)
Initalize from a small integer.
bool test_bit(const std::size_t bitno) const
bool operator==(const bigint< n > &other) const
bigint(const mpz_t r)
Initialize from a string containing an integer in decimal notation.
unsigned long as_ulong() const
Returns the number of bits in this specific bigint value, i.e., position of the most-significant 1.
bool operator!=(const bigint< n > &other) const
void to_mpz(mpz_t r) const
Return the last limb of the integer.
std::istream & operator>>(std::istream &in, alt_bn128_G1 &g)
std::ostream & operator<<(std::ostream &out, const alt_bn128_G1 &g)