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
 
FMT_NOINLINE bigintoperator<<= (int shift)
 
template<typename Int >
bigintoperator*= (Int value)
 
void assign_pow10 (int exp)
 
void square ()
 
void align (const bigint &other)
 
int divmod_assign (const bigint &divisor)
 

Private Types

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

Private Member Functions

bigit operator[] (int index) const
 
bigitoperator[] (int index)
 
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 1238 of file format-inl.h.

Member Typedef Documentation

◆ bigit

using bigit = uint32_t
private

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

◆ double_bigit

using double_bigit = uint64_t
private

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
bigits_capacity 

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

Constructor & Destructor Documentation

◆ bigint() [1/3]

bigint ( )

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

◆ bigint() [2/3]

bigint ( uint64_t n)
explicit

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

References bigint::assign().

◆ ~bigint()

~bigint ( )

Definition at line 1310 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

◆ align()

◆ assign() [1/2]

◆ assign() [2/2]

◆ assign_pow10()

void assign_pow10 ( int exp)

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

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

Referenced by detail::fallback_format().

◆ divmod_assign()

int divmod_assign ( const bigint & divisor)

◆ 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 1350 of file format-inl.h.

References FMT_ASSERT, and bigint::multiply().

◆ operator<<=()

FMT_NOINLINE bigint & operator<<= ( int shift)

◆ operator=()

void operator= ( const bigint & )
delete

◆ operator[]() [1/2]

bigit & operator[] ( int index)
private

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

References bigint::bigits_, detail::index, and detail::to_unsigned().

◆ operator[]() [2/2]

bigit operator[] ( int index) const
private

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

References bigint::bigits_, detail::index, and detail::to_unsigned().

◆ remove_leading_zeros()

◆ 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 1255 of file format-inl.h.

References bigint::bigit_bits, and detail::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 1373 of file format-inl.h.

◆ compare

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

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

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

◆ formatter< bigint >

friend struct formatter< bigint >
friend

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

Member Data Documentation

◆ bigit_bits

◆ bigits_

◆ exp_