GnuCash
5.6-150-g038405b370+
|
Normal arithmetic operators. More...
Functions | |
GncNumeric | operator+ (GncNumeric a, GncNumeric b) |
GncNumeric | operator+ (GncNumeric a, int64_t b) |
GncNumeric | operator+ (int64_t a, GncNumeric b) |
GncNumeric | operator- (GncNumeric a, GncNumeric b) |
GncNumeric | operator- (GncNumeric a, int64_t b) |
GncNumeric | operator- (int64_t a, GncNumeric b) |
GncNumeric | operator* (GncNumeric a, GncNumeric b) |
GncNumeric | operator* (GncNumeric a, int64_t b) |
GncNumeric | operator* (int64_t a, GncNumeric b) |
GncNumeric | operator/ (GncNumeric a, GncNumeric b) |
GncNumeric | operator/ (GncNumeric a, int64_t b) |
GncNumeric | operator/ (int64_t a, GncNumeric b) |
Normal arithmetic operators.
The class arithmetic operators are implemented in terms of these operators. They use GncRational operators internally then call the GncNumeric(GncRational&) constructor which will silently round half-down to obtain int64_t members.
These operators can throw std::overflow_error, std::underflow_error, or std::invalid argument as indicated in the class GncNumeric documentation.
a | The right-side operand |
b | The left-side operand |