|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
#include <quire.hpp>
Public Member Functions | |
| quire () | |
| quire (int8_t initial_value) | |
| quire (int16_t initial_value) | |
| quire (int32_t initial_value) | |
| quire (int64_t initial_value) | |
| quire (uint64_t initial_value) | |
| quire (float initial_value) | |
| quire (double initial_value) | |
| template<unsigned fbits> | |
| quire (const sw::universal::internal::value< fbits > &rhs) | |
| template<unsigned fbits> | |
| quire & | operator= (const value< fbits > &rhs) |
| quire & | operator= (signed char rhs) |
| quire & | operator= (short int rhs) |
| quire & | operator= (int rhs) |
| quire & | operator= (long long rhs) |
| quire & | operator= (long long unsigned rhs) |
| quire & | operator= (float rhs) |
| quire & | operator= (double rhs) |
| quire & | operator= (long double rhs) |
| template<unsigned fbits> | |
| quire & | operator+= (const value< fbits > &rhs) |
| void | reset () |
| void | clear () |
| int | dynamic_range () const |
| int | radix_point () const |
| int | max_scale () const |
| int | min_scale () const |
| int | capacity_range () const |
| bool | isneg () const |
| bool | ispos () const |
| bool | iszero () const |
| bool | get_sign () const |
| float | sign_value () const |
| value< qbits > | to_value () const |
Static Public Attributes | |
| static constexpr unsigned | ebits = es |
| static constexpr unsigned | mbits = nbits - es |
| static constexpr unsigned | escale = 2*((unsigned(1) << es) + mbits + 1) |
| static constexpr unsigned | range = escale |
| static constexpr unsigned | half_range = range >> 1 |
| static constexpr unsigned | upper_range = half_range + 1 |
| static constexpr unsigned | qbits = range + capacity |
Friends | |
| template<unsigned nnbits, unsigned nes, unsigned ncapacity> | |
| std::ostream & | operator<< (std::ostream &ostr, const quire< nnbits, nes, ncapacity > &q) |
| template<unsigned nnbits, unsigned nes, unsigned ncapacity> | |
| std::istream & | operator>> (std::istream &istr, quire< nnbits, nes, ncapacity > &q) |
| template<unsigned nnbits, unsigned nes, unsigned ncapacity> | |
| bool | operator== (const quire< nnbits, nes, ncapacity > &lhs, const quire< nnbits, nes, ncapacity > &rhs) |
| template<unsigned nnbits, unsigned nes, unsigned ncapacity> | |
| bool | operator!= (const quire< nnbits, nes, ncapacity > &lhs, const quire< nnbits, nes, ncapacity > &rhs) |
| template<unsigned nnbits, unsigned nes, unsigned ncapacity> | |
| bool | operator< (const quire< nnbits, nes, ncapacity > &lhs, const quire< nnbits, nes, ncapacity > &rhs) |
| template<unsigned nnbits, unsigned nes, unsigned ncapacity> | |
| bool | operator> (const quire< nnbits, nes, ncapacity > &lhs, const quire< nnbits, nes, ncapacity > &rhs) |
| template<unsigned nnbits, unsigned nes, unsigned ncapacity> | |
| bool | operator<= (const quire< nnbits, nes, ncapacity > &lhs, const quire< nnbits, nes, ncapacity > &rhs) |
| template<unsigned nnbits, unsigned nes, unsigned ncapacity> | |
| bool | operator>= (const quire< nnbits, nes, ncapacity > &lhs, const quire< nnbits, nes, ncapacity > &rhs) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |