Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
detail::bigint Class Reference

#include <format-inl.h>

Public Member Functions

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

Private Types

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

Private Member Functions

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

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

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

Detailed Description

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

Member Typedef Documentation

◆ bigit

using detail::bigint::bigit = uint32_t
private

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

◆ double_bigit

using detail::bigint::double_bigit = uint64_t
private

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
bigits_capacity 

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

Constructor & Destructor Documentation

◆ bigint() [1/3]

detail::bigint::bigint ( )
inline

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

◆ bigint() [2/3]

detail::bigint::bigint ( uint64_t  n)
inlineexplicit

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

◆ ~bigint()

detail::bigint::~bigint ( )
inline

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

◆ bigint() [3/3]

detail::bigint::bigint ( const bigint )
delete

Member Function Documentation

◆ align()

void detail::bigint::align ( const bigint other)
inline

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

◆ assign() [1/2]

void detail::bigint::assign ( const bigint other)
inline

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

◆ assign() [2/2]

void detail::bigint::assign ( uint64_t  n)
inline

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

◆ assign_pow10()

void detail::bigint::assign_pow10 ( int  exp)
inline

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

◆ divmod_assign()

int detail::bigint::divmod_assign ( const bigint divisor)
inline

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

◆ multiply() [1/2]

void detail::bigint::multiply ( uint32_t  value)
inlineprivate

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

◆ multiply() [2/2]

void detail::bigint::multiply ( uint64_t  value)
inlineprivate

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

◆ num_bigits()

int detail::bigint::num_bigits ( ) const
inline

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

◆ operator*=()

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

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

◆ operator<<=()

FMT_NOINLINE bigint& detail::bigint::operator<<= ( int  shift)
inline

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

◆ operator=()

void detail::bigint::operator= ( const bigint )
delete

◆ operator[]() [1/2]

bigit detail::bigint::operator[] ( int  index) const
inlineprivate

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

◆ operator[]() [2/2]

bigit& detail::bigint::operator[] ( int  index)
inlineprivate

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

◆ remove_leading_zeros()

void detail::bigint::remove_leading_zeros ( )
inlineprivate

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

◆ square()

void detail::bigint::square ( )
inline

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

◆ subtract_aligned()

void detail::bigint::subtract_aligned ( const bigint other)
inlineprivate

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

◆ subtract_bigits()

void detail::bigint::subtract_bigits ( int  index,
bigit  other,
bigit borrow 
)
inlineprivate

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

Friends And Related Function Documentation

◆ add_compare

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

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

◆ compare

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

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

◆ formatter< bigint >

friend struct formatter< bigint >
friend

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

Member Data Documentation

◆ bigit_bits

FMT_CONSTEXPR_DECL const int detail::bigint::bigit_bits = bits<bigit>::value
staticprivate

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

◆ bigits_

basic_memory_buffer<bigit, bigits_capacity> detail::bigint::bigits_
private

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

◆ exp_

int detail::bigint::exp_
private

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


The documentation for this class was generated from the following file:


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:12:56