SoPlex Documentation
Loading...
Searching...
No Matches

#include <format-inl.h>

Public Member Functions

 bigint ()
 
 bigint (uint64_t n)
 
 ~bigint ()
 
 bigint (const bigint &)=delete
 
void operator= (const bigint &)=delete
 
void assign (const bigint &other)
 
void assign (uint64_t n)
 
int num_bigits () const
 
bigintoperator<<= (int shift)
 
template<typename Int >
bigintoperator*= (Int value)
 
void assign_pow10 (int exp)
 
void square ()
 
int divmod_assign (const bigint &divisor)
 

Private Types

enum  { bigits_capacity = 32 }
 
using bigit = uint32_t
 
using double_bigit = uint64_t
 

Private Member Functions

void subtract_bigits (int index, bigit other, bigit &borrow)
 
void remove_leading_zeros ()
 
void subtract_aligned (const bigint &other)
 
void multiply (uint32_t value)
 
void multiply (uint64_t value)
 

Private Attributes

basic_memory_buffer< bigit, bigits_capacitybigits_
 
int exp_
 

Static Private Attributes

static FMT_CONSTEXPR_DECL const int bigit_bits = bits<bigit>::value
 

Friends

struct formatter< bigint >
 
int compare (const bigint &lhs, const bigint &rhs)
 
int add_compare (const bigint &lhs1, const bigint &lhs2, const bigint &rhs)
 

Detailed Description

Definition at line 519 of file format-inl.h.

Member Typedef Documentation

◆ bigit

using bigit = uint32_t
private

Definition at line 523 of file format-inl.h.

◆ double_bigit

using double_bigit = uint64_t
private

Definition at line 524 of file format-inl.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
bigits_capacity 

Definition at line 525 of file format-inl.h.

Constructor & Destructor Documentation

◆ bigint() [1/3]

bigint ( )

Definition at line 588 of file format-inl.h.

◆ bigint() [2/3]

bigint ( uint64_t n)
explicit

Definition at line 589 of file format-inl.h.

References bigint::assign().

◆ ~bigint()

~bigint ( )

Definition at line 590 of file format-inl.h.

References bigint::bigits_, bigint::bigits_capacity, and buffer< T >::capacity().

◆ bigint() [3/3]

bigint ( const bigint & )
delete

Member Function Documentation

◆ assign() [1/2]

◆ assign() [2/2]

void assign ( uint64_t n)

◆ assign_pow10()

void assign_pow10 ( int exp)

Definition at line 676 of file format-inl.h.

References bigint::assign(), internal::exp, and bigint::square().

Referenced by internal::fallback_format().

◆ divmod_assign()

◆ multiply() [1/2]

void multiply ( uint32_t value)
private

◆ multiply() [2/2]

void multiply ( uint64_t value)
private

◆ num_bigits()

int num_bigits ( ) const

◆ operator*=()

template<typename Int >
bigint & operator*= ( Int value)

Definition at line 629 of file format-inl.h.

References FMT_ASSERT, and bigint::multiply().

◆ operator<<=()

bigint & operator<<= ( int shift)

◆ operator=()

void operator= ( const bigint & )
delete

◆ remove_leading_zeros()

void remove_leading_zeros ( )
private

◆ square()

◆ subtract_aligned()

void subtract_aligned ( const bigint & other)
private

◆ subtract_bigits()

void subtract_bigits ( int index,
bigit other,
bigit & borrow )
private

Definition at line 533 of file format-inl.h.

References bigint::bigit_bits, bigint::bigits_, and internal::index.

Referenced by bigint::subtract_aligned().

Friends And Related Symbol Documentation

◆ add_compare

int add_compare ( const bigint & lhs1,
const bigint & lhs2,
const bigint & rhs )
friend

Definition at line 652 of file format-inl.h.

◆ compare

int compare ( const bigint & lhs,
const bigint & rhs )
friend

Definition at line 635 of file format-inl.h.

Referenced by bigint::divmod_assign(), and bigint::subtract_aligned().

◆ formatter< bigint >

friend struct formatter< bigint >
friend

Definition at line 529 of file format-inl.h.

Member Data Documentation

◆ bigit_bits

◆ bigits_

◆ exp_