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>
42 :
private boost::totally_ordered<IOUAmount>
43 ,
private boost::additive <IOUAmount>
113 operator bool() const noexcept
148 IOUAmount
const& amt,
IOUAmount mulRatio(IOUAmount const &amt, std::uint32_t num, std::uint32_t den, bool roundUp)
int exponent() const noexcept
void normalize()
Adjusts the mantissa and exponent to the proper range.
IOUAmount(std::int64_t mantissa, int exponent)
Floating point representation of amounts with high dynamic range.
std::string to_string(ListDisposition disposition)
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