20 #ifndef RIPPLE_BASICS_IOUAMOUNT_H_INCLUDED
21 #define RIPPLE_BASICS_IOUAMOUNT_H_INCLUDED
23 #include <ripple/beast/utility/Zero.h>
24 #include <boost/operators.hpp>
41 class IOUAmount :
private boost::totally_ordered<IOUAmount>,
42 private boost::additive<IOUAmount>
109 explicit operator bool() const noexcept
147 IOUAmount
const& amt,
IOUAmount mulRatio(IOUAmount const &amt, std::uint32_t num, std::uint32_t den, bool roundUp)
int exponent() const noexcept
static IOUAmount minPositiveAmount()
void normalize()
Adjusts the mantissa and exponent to the proper range.
IOUAmount(std::int64_t mantissa, int exponent)
IOUAmount & operator=(beast::Zero)
Floating point representation of amounts with high dynamic range.
bool operator<(IOUAmount const &other) const
int signum() const noexcept
Return the sign of the amount.
IOUAmount & operator=(IOUAmount const &other)=default
Zero allows classes to offer efficient comparisons to zero.
IOUAmount & operator-=(IOUAmount const &other)
IOUAmount & operator+=(IOUAmount const &other)
bool operator==(IOUAmount const &other) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::int64_t mantissa() const noexcept
IOUAmount operator-() const
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.