#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 |
bigint & | operator<<= (int shift) |
template<typename Int > | |
bigint & | operator*= (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_capacity > | bigits_ |
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) |
Definition at line 519 of file format-inl.h.
|
private |
Definition at line 523 of file format-inl.h.
|
private |
Definition at line 524 of file format-inl.h.
|
private |
Enumerator | |
---|---|
bigits_capacity |
Definition at line 525 of file format-inl.h.
bigint | ( | ) |
Definition at line 588 of file format-inl.h.
|
explicit |
Definition at line 589 of file format-inl.h.
~bigint | ( | ) |
Definition at line 590 of file format-inl.h.
References buffer< T >::capacity().
void assign | ( | const bigint & | other | ) |
Definition at line 595 of file format-inl.h.
References bigint::bigits_, internal::copy(), buffer< T >::data(), bigint::exp_, buffer< T >::resize(), and buffer< T >::size().
Referenced by internal::fallback_format().
void assign | ( | uint64_t | n | ) |
Definition at line 602 of file format-inl.h.
References buffer< T >::resize().
void assign_pow10 | ( | int | exp | ) |
Definition at line 676 of file format-inl.h.
References internal::exp.
Referenced by internal::fallback_format().
int divmod_assign | ( | const bigint & | divisor | ) |
Definition at line 727 of file format-inl.h.
References bigint::bigits_, buffer< T >::data(), bigint::exp_, FMT_ASSERT, buffer< T >::resize(), and buffer< T >::size().
Referenced by internal::fallback_format().
|
private |
Definition at line 559 of file format-inl.h.
References buffer< T >::push_back(), and buffer< T >::size().
|
private |
Definition at line 570 of file format-inl.h.
References buffer< T >::push_back(), and buffer< T >::size().
int num_bigits | ( | ) | const |
Definition at line 612 of file format-inl.h.
References buffer< T >::size().
bigint& operator*= | ( | Int | value | ) |
Definition at line 629 of file format-inl.h.
References FMT_ASSERT, and internal::multiply().
bigint& operator<<= | ( | int | shift | ) |
Definition at line 614 of file format-inl.h.
References buffer< T >::push_back(), and buffer< T >::size().
|
delete |
|
private |
Definition at line 539 of file format-inl.h.
References buffer< T >::resize(), and buffer< T >::size().
void square | ( | ) |
Definition at line 695 of file format-inl.h.
References buffer< T >::resize(), and buffer< T >::size().
|
private |
Definition at line 546 of file format-inl.h.
References bigint::bigits_, bigint::exp_, FMT_ASSERT, and buffer< T >::size().
Definition at line 533 of file format-inl.h.
References internal::index.
Definition at line 652 of file format-inl.h.
Definition at line 635 of file format-inl.h.
Definition at line 531 of file format-inl.h.
|
staticprivate |
Definition at line 529 of file format-inl.h.
Referenced by formatter< internal::bigint >::format().
|
private |
Definition at line 526 of file format-inl.h.
Referenced by bigint::assign(), bigint::divmod_assign(), formatter< internal::bigint >::format(), and bigint::subtract_aligned().
|
private |
Definition at line 527 of file format-inl.h.
Referenced by bigint::assign(), bigint::divmod_assign(), formatter< internal::bigint >::format(), and bigint::subtract_aligned().