Precision control class The Precision class is used to configure the number of digits and rounding type of the BigDecimal calculation result.
More...
#include <ssgx_decimal_t.h>
Precision control class The Precision class is used to configure the number of digits and rounding type of the BigDecimal calculation result.
◆ Precision()
| ssgx::decimal_t::Precision::Precision |
( |
RoundType | round_type, |
|
|
int | scale ) |
Constructor.
- Parameters
-
| [in] | round_type | The rounding type, one of RoundType value. |
| [in] | scale | > 0, Keep significant digits up to a certain decimal place = 0, The result will be kept as an integer < 0, Keep significant digits up to a certain integer place |
- Note
- Parameter scale must less than SSGX_MAX_PREC(99), otherwise an exception will occur.
@par Examples
@codeotherwise an exception will occur
High precision big number class This class implements the basic calculation and comparison operations...
Definition ssgx_decimal_t.h:125
BigDecimal Multiply(const BigDecimal &num) const
Multiplication of Numbers. Return a new BigDecimal object which equal to (*this) * num.
Precision control class The Precision class is used to configure the number of digits and rounding ty...
Definition ssgx_decimal_t.h:57
◆ ~Precision()
| ssgx::decimal_t::Precision::~Precision |
( |
| ) |
|
◆ BigDecimal
The documentation for this class was generated from the following file: