|
Uni20
Asynchronous tensor and runtime library.
|
Exact arithmetic or an explicit binary working precision. More...
#include <precision.hpp>
Public Types | |
| using | bit_count_type = std::int64_t |
Public Member Functions | |
| constexpr bit_count_type | bit_count () const |
| Number of binary significand bits. | |
| constexpr bool | is_exact () const noexcept |
| constexpr bool | operator== (Precision const &) const =default |
Static Public Member Functions | |
| static constexpr Precision | bits (bit_count_type count) |
| Select a positive binary significand size. | |
| static constexpr Precision | decimal_digits (std::int64_t count) |
| Request at least this many decimal digits of significand precision. | |
| static constexpr Precision | exact () noexcept |
| No approximation has been selected; rational arithmetic remains exact. | |
Exact arithmetic or an explicit binary working precision.
A provider-independent description, available in every build. It never changes numerical defaults. Providers validate their own ranges.
| using uni20::Precision::bit_count_type = std::int64_t |
|
inlineconstexpr |
Number of binary significand bits.
| std::logic_error | If this precision denotes exact arithmetic. |
|
inlinestaticconstexpr |
Select a positive binary significand size.
|
inlinestaticconstexpr |
Request at least this many decimal digits of significand precision.
Uses the upper bound 3.32193 for log2(10); may allocate extra bits.
|
inlinestaticconstexprnoexcept |
No approximation has been selected; rational arithmetic remains exact.
|
inlineconstexprnoexcept |
|
constexprdefault |