34 operator double()
const;
Definition: decimal.hpp:13
void sin()
Computes the sine of a number (in radians)
Decimal(const lb_decimal_t *other)
Decimal operator-(const Decimal &other) const
bool is_zero() const
Returns true if this Decimal number is equivalent to zero.
void abs()
Computes the absolute value.
void fract()
Returns a new Decimal representing the fractional portion of the number.
Decimal(const Decimal &other)
void floor()
Returns the largest integer less than or equal to a number.
Decimal & operator/=(const Decimal &other)
Decimal & operator%=(const Decimal &other)
Decimal min(const Decimal &other) const
Returns the minimum of the two numbers.
Decimal operator/(const Decimal &other) const
Decimal(double other)
Constructs a new Decimal number from double.
void norm_pdf()
The Probability density function for a Normal distribution.
bool operator>=(const Decimal &other) const
bool is_negative() const
Returns true if the decimal is negative.
void sqrt()
The square root of a Decimal. Uses a standard Babylonian method.
Decimal & operator+=(const Decimal &other)
void log10()
Calculates the base 10 logarithm of a specified Decimal number.
Decimal(const std::string &str)
Constructs a new Decimal number from string.
Decimal(double other, uint32_t dp)
bool is_positive() const
Returns true if the decimal is positive.
Decimal & operator-=(const Decimal &other)
Decimal operator+(const Decimal &other) const
Decimal max(const Decimal &other) const
Returns the maximum of the two numbers.
void pow(const Decimal &exp)
bool operator<(const Decimal &other) const
void normalize()
Strips any trailing zero’s from a Decimal and converts -0 to 0.
bool operator==(const Decimal &other) const
Decimal & operator*=(const Decimal &other)
Decimal(const char *str)
Constructs a new Decimal number from string.
void exp_with_tolerance(const Decimal &tolerance)
void ceil()
Returns the smallest integer greater than or equal to a number.
bool operator>(const Decimal &other) const
Decimal operator-() const
std::string to_string() const
Decimal operator*(const Decimal &other) const
void cos()
Computes the cosine of a number (in radians)
Decimal operator%(const Decimal &other) const
bool operator<=(const Decimal &other) const
struct lb_decimal_t lb_decimal_t
Definition: decimal.hpp:8
Definition: async_result.hpp:7
std::ostream & operator<<(std::ostream &stream, const Decimal &value)