43 static_assert(std::numeric_limits<Digit>::max() > Radix);
44 static_assert(std::numeric_limits<DigitCalc>::max() > Radix * Radix);
45 static_assert(std::numeric_limits<DigitCalc>::min() < -Radix * Radix);
61 typename util::bidirectional_vector<
digit_type>::container_type{
Definition of bidirectional_vector class.
Class of floating numbers in a custom number system with given radix.
auto lowest_ind() const noexcept -> index_type
Get the index of the lowest digits.
void push_to_lowest(digit_type digit)
Add a digit to the lowest end.
util::bidirectional_vector< digit_type > digits_
Digits.
DigitCalc digit_calc_type
Type of digits for calculation.
auto operator[](index_type index) -> digit_type &
Access a digit preparing it if needed.
custom_float()
Construct zero.
void resize(index_type lowest, index_type highest)
Change the range of digits.
auto at(index_type index) const -> digit_type
Access a digit with checks.
void push_to_highest(digit_type digit)
Add a digit to the highest end.
static constexpr index_type radix
Radix of the number system.
auto highest_ind() const noexcept -> index_type
Get the index of the highest digit.
auto operator[](index_type index) const -> digit_type
Access a digit without checks.
void move_digits(index_type offset)
Move digits.
Digit digit_type
Type of digits.
Class to save data in a sequence which can be extended even toward negative direction.
void resize(index_type min_index, index_type max_index, const value_type &value=value_type())
Change the position of this object.
auto max_index() const noexcept -> index_type
Get the maximum index.
auto min_index() const noexcept -> index_type
Get the minimum index. (Equal to the index of the origin.)
auto get_or_prepare(index_type index) -> value_type &
Access a value preparing it if needed.
auto at(index_type index) const -> const value_type &
Access a value with checks.
void push_front(const value_type &value)
Add a value to the beginning.
void push_back(const value_type &value)
Add a value to the end.
void move_position(index_type offset)
Move the position of this object.
Concept of signed integers.
Definition of index_type type.
Definition of integral concept.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of classes of numbers.
Definition of signed_integral concept.