|
| | quire () |
| | quire (int8_t iv) |
| | quire (int16_t iv) |
| | quire (int32_t iv) |
| | quire (int64_t iv) |
| | quire (uint8_t iv) |
| | quire (uint16_t iv) |
| | quire (uint32_t iv) |
| | quire (uint64_t iv) |
| | quire (float iv) |
| | quire (double iv) |
| template<unsigned fbits, BlockTripleOperator op, typename bt> |
| | quire (const blocktriple< fbits, op, bt > &rhs) |
| constexpr | quire (const SpecificValue code) noexcept |
| template<unsigned fbits, BlockTripleOperator op, typename bt> |
| quire & | operator= (const blocktriple< fbits, op, bt > &rhs) |
| template<typename T = NumberType, std::enable_if_t<!std::is_arithmetic_v< T >, int > = 0> |
| quire & | operator= (const T &rhs) |
| quire & | operator= (int8_t rhs) |
| quire & | operator= (int16_t rhs) |
| quire & | operator= (int32_t rhs) |
| quire & | operator= (int64_t rhs) |
| quire & | operator= (uint8_t rhs) |
| quire & | operator= (uint16_t rhs) |
| quire & | operator= (uint32_t rhs) |
| quire & | operator= (uint64_t rhs) |
| quire & | operator= (float rhs) |
| quire & | operator= (double rhs) |
| template<unsigned fbits, BlockTripleOperator op, typename bt> |
| quire & | operator+= (const blocktriple< fbits, op, bt > &rhs) |
| | Add a blocktriple value to the quire.
|
| template<typename T = NumberType, std::enable_if_t<!std::is_arithmetic_v< T >, int > = 0> |
| quire & | operator+= (const T &rhs) |
| template<unsigned fbits, BlockTripleOperator op, typename bt> |
| quire & | operator-= (const blocktriple< fbits, op, bt > &rhs) |
| | Subtract a blocktriple value from the quire.
|
| template<typename T = NumberType, std::enable_if_t<!std::is_arithmetic_v< T >, int > = 0> |
| quire & | operator-= (const T &rhs) |
| quire & | operator+= (const quire &rhs) |
| | Add two quires.
|
| quire & | operator-= (const quire &rhs) |
| | Subtract two quires.
|
| bool | iszero () const noexcept |
| bool | isoverflow () const noexcept |
| bool | isnan () const noexcept |
| bool | isinf () const noexcept |
| bool | isnar () const noexcept |
| bool | sign () const noexcept |
| bool | isneg () const noexcept |
| bool | ispos () const noexcept |
| int | dynamic_range () const noexcept |
| int | max_scale () const noexcept |
| int | min_scale () const noexcept |
| int | capacity_range () const noexcept |
| unsigned | total_bits () const noexcept |
| int | scale () const noexcept |
| | Find the scale (position of MSB relative to radix point).
|
| bool | operator[] (unsigned index) const |
| | Bit addressing: index 0 is at the bottom of the lower range.
|
| bool | testbit (unsigned index) const |
| bool | anyAfter (unsigned index) const noexcept |
| | Check if any bit is set at or below the given index.
|
| void | reset () noexcept |
| void | clear () noexcept |
| void | set_sign (bool v) noexcept |
| void | setnan () noexcept |
| void | setinf (bool negative) noexcept |
| void | setbit (unsigned index) |
| void | zero () noexcept |
| void | maxpos () noexcept |
| void | minpos () noexcept |
| void | minneg () noexcept |
| void | maxneg () noexcept |
| blocktriple< qbits, BlockTripleOperator::REP, LimbType > | to_blocktriple () const |
| | Convert quire value to a blocktriple<qbits, REP>.
|
| template<typename TargetType> |
| TargetType | convert_to () const |
| | Convert quire to a target number type.
|
| const accumulator_type & | accumulator () const noexcept |
| bool | load_bits (const std::string &string_of_bits) |
| | Load from a bit string in format "+:cccc_uuuu.llll" Returns false (without modifying the quire) on malformed or oversized input.
|
|
| template<typename NT, unsigned c, typename LT> |
| std::ostream & | operator<< (std::ostream &ostr, const quire< NT, c, LT > &q) |
| template<typename NT, unsigned c, typename LT> |
| bool | operator== (const quire< NT, c, LT > &lhs, const quire< NT, c, LT > &rhs) |
| template<typename NT, unsigned c, typename LT> |
| bool | operator!= (const quire< NT, c, LT > &lhs, const quire< NT, c, LT > &rhs) |
| template<typename NT, unsigned c, typename LT> |
| bool | operator< (const quire< NT, c, LT > &lhs, const quire< NT, c, LT > &rhs) |
| template<typename NT, unsigned c, typename LT> |
| bool | operator> (const quire< NT, c, LT > &lhs, const quire< NT, c, LT > &rhs) |
| template<typename NT, unsigned c, typename LT> |
| bool | operator<= (const quire< NT, c, LT > &lhs, const quire< NT, c, LT > &rhs) |
| template<typename NT, unsigned c, typename LT> |
| bool | operator>= (const quire< NT, c, LT > &lhs, const quire< NT, c, LT > &rhs) |
| template<typename NT, unsigned c, typename LT> |
| quire< NT, c, LT > | abs (const quire< NT, c, LT > &q) |
template<typename NumberType, unsigned capacity = quire_traits<NumberType>::capacity, typename LimbType = uint32_t>
template<typename TargetType>
Convert quire to a target number type.
float and double are rounded to nearest, ties to even, once, from every bit of the accumulator: the leading 64 bits and a sticky bit for the rest; a value beyond the target's range overflows to +-inf, and one below it rounds through the subnormals (#2058). An integral target follows the integer-cast rule (#2104, shared/integer_cast.hpp): the value truncated toward zero; past the range, an infinity or an overflowed sum saturates to +-max() (unsigned: max() - 1, a negative value 0); NaN is the integer NaR (min(), unsigned max()). Another target of at most 8 bytes goes through double, rounded to odd, so the target's own rounding of it is correct; that needs at most 51 significand bits and a range inside double's (quire_converts_through_double_v), and any other target (cfloat<64,11>, posit<64,es>, posit<32,6>, cfloat<32,12>) does not compile: resolve it with its quire_resolve() or from to_blocktriple() (#2107).