3#include <xrpl/basics/Number.h>
4#include <xrpl/beast/utility/Zero.h>
6#include <boost/operators.hpp>
23class IOUAmount :
private boost::totally_ordered<IOUAmount>,
private boost::additive<IOUAmount>
70 operator bool() const noexcept;
145operator bool() const noexcept
Floating point representation of amounts with high dynamic range.
IOUAmount & operator+=(IOUAmount const &other)
mantissa_type mantissa() const noexcept
bool operator==(IOUAmount const &other) const
exponent_type exponent() const noexcept
static IOUAmount fromNumber(Number const &number)
bool operator<(IOUAmount const &other) const
IOUAmount & operator=(beast::Zero)
std::int64_t mantissa_type
IOUAmount operator-() const
int signum() const noexcept
Return the sign of the amount.
static IOUAmount minPositiveAmount()
void normalize()
Adjusts the mantissa and exponent to the proper range.
IOUAmount & operator-=(IOUAmount const &other)
Number is a floating point type that can represent a wide range of values.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string to_string(BaseUInt< Bits, Tag > const &a)
IOUAmount mulRatio(IOUAmount const &amt, std::uint32_t num, std::uint32_t den, bool roundUp)
Zero allows classes to offer efficient comparisons to zero.