|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
Primary template for error tracking traits Provides default values suitable for unknown types. More...
#include <error_tracking_traits.hpp>
Public Types | |
| using | shadow_type = long double |
| Type to use for shadow computation (higher precision reference). | |
Static Public Attributes | |
| static constexpr bool | has_exact_errors = false |
| Does this type support exact error computation (two_sum/two_prod)? | |
| static constexpr bool | has_directed_rounding = false |
| Does this type support directed rounding for interval arithmetic? | |
| static constexpr bool | exact_multiplication = false |
| Is multiplication exact in this representation? | |
| static constexpr bool | tracks_uncertainty = false |
| Does this type natively track uncertainty? | |
| static constexpr bool | is_interval_type = false |
| Is this an interval type that represents a range of values? | |
| static constexpr ErrorStrategy | default_strategy = ErrorStrategy::Shadow |
| Recommended default error tracking strategy. | |
| static constexpr unsigned | nbits = 0 |
| Number of bits in the type (0 if unknown/variable). | |
| static constexpr unsigned | rbits = 0 |
| Number of fraction bits, where the type has a meaningful one (0 if not). | |
Primary template for error tracking traits Provides default values suitable for unknown types.
| using sw::universal::error_tracking_traits< T, typename >::shadow_type = long double |
Type to use for shadow computation (higher precision reference).
|
staticconstexpr |
Recommended default error tracking strategy.
|
staticconstexpr |
Is multiplication exact in this representation?
(True for LNS where mult is just addition in log domain)
|
staticconstexpr |
Does this type support directed rounding for interval arithmetic?
|
staticconstexpr |
Does this type support exact error computation (two_sum/two_prod)?
|
staticconstexpr |
Is this an interval type that represents a range of values?
|
staticconstexpr |
Number of bits in the type (0 if unknown/variable).
|
staticconstexpr |
Number of fraction bits, where the type has a meaningful one (0 if not).
nbits counts the whole encoding, so it is not a precision: an lns<32,8> is 32 bits wide but keeps only 8 fractional bits of the logarithm (#1546).
|
staticconstexpr |
Does this type natively track uncertainty?
(True for areal with ubit, interval types)