231 [[nodiscard]] std::string
present()
const;
bool operator>=(const Number &rhs) const
Compares two numbers for greater than or equal to.
Definition number.cpp:128
Number operator*(const Number &rhs) const
Multiplies two numbers.
Definition number.cpp:55
Number & operator*=(const Number &rhs)
Multiplies the number by another number and assigns the result to the current number.
Definition number.cpp:94
bool operator<=(const Number &rhs) const
Compares two numbers for less than or equal to.
Definition number.cpp:126
Number & operator%=(const Number &rhs)
Calculates the remainder of two numbers and assigns the result to the current number.
Definition number.cpp:106
size_t prec
The precision of the number.
Definition number.hpp:74
bool operator<(const Number &rhs) const
Compares two numbers for less than.
Definition number.cpp:122
bool operator!=(const Number &rhs) const
Compares two numbers for inequality.
Definition number.cpp:120
bool operator>(const Number &rhs) const
Compares two numbers for greater than.
Definition number.cpp:124
Number operator--()
Decrements the number by one.
Definition number.cpp:136
Number & operator^=(const Number &rhs)
Raises the number to a power and assigns the result to the current number.
Definition number.cpp:112
Number & operator-=(const Number &rhs)
Subtracts the number from another number and assigns the result to the current number.
Definition number.cpp:88
Number operator++()
Increments the number by one.
Definition number.cpp:130
Number operator%(const Number &rhs) const
Calculates the remainder of two numbers. (Modulus)
Definition number.cpp:78
Number & operator/=(const Number &rhs)
Divides the number by another number and assigns the result to the current number.
Definition number.cpp:100
std::string value
The value of the number.
Definition number.hpp:71
RoundingMode mode
The rounding mode of the number.
Definition number.hpp:77
Number()
The default constructor. Initializes the number with a value of 0.
Definition number.cpp:45
std::string present() const
Presents the number in a human-readable format.
Definition number.cpp:142
Number operator+(const Number &rhs) const
Adds two numbers together.
Definition number.cpp:51
Number & operator+=(const Number &rhs)
Adds the number to another number and assigns the result to the current number.
Definition number.cpp:82
bool operator==(const Number &rhs) const
Compares two numbers for equality.
Definition number.cpp:118
Number operator^(const Number &rhs) const
Raises the number to a power.
Definition number.cpp:80
Number operator-(const Number &rhs) const
Subtracts two numbers.
Definition number.cpp:53
Number operator/(const Number &rhs) const
Divides two numbers.
Definition number.cpp:57
The public namespace for the Steppable library.
Definition argParse.cpp:40
RoundingMode
Specifies how Steppable should round the number in operations.
Definition number.hpp:46
@ DISCARD_ALL_DECIMALS
Do not append any decimal places.
Definition number.hpp:60
@ USE_CURRENT_PREC
Use the current precision.
Definition number.hpp:54
@ USE_OTHER_PREC
Use the other number's precision.
Definition number.hpp:57
@ USE_MINIMUM_PREC
Use the lower precision whenever possible.
Definition number.hpp:51
@ USE_MAXIMUM_PREC
Use the higher precision whenever possible.
Definition number.hpp:48