|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
Functions | |
| template<typename T> | |
| constexpr T | pow2 (int e) |
Variables | |
| template<typename T> | |
| constexpr int | split_shift = (std::numeric_limits<T>::digits + 1) / 2 |
| Veltkamp's splitting point: s = ceil(digits / 2), factor = 2^s + 1. | |
| template<typename T> | |
| constexpr T | split_factor = T((std::uint64_t(1) << split_shift<T>) + 1) |
| template<typename T> | |
| constexpr T | split_limit = pow2<T>(std::numeric_limits<T>::max_exponent - split_shift<T> - 1) |
| The end of split's domain, 2^(max_exponent - s - 1): factor * a is at most 2^(max_exponent - 1) + 2^(max_exponent - s - 1), so it cannot overflow. | |
|
constexpr |
|
inlineconstexpr |
|
inlineconstexpr |
The end of split's domain, 2^(max_exponent - s - 1): factor * a is at most 2^(max_exponent - 1) + 2^(max_exponent - s - 1), so it cannot overflow.
(max / factor itself rounds up in double, and factor times it overflows.)
|
inlineconstexpr |
Veltkamp's splitting point: s = ceil(digits / 2), factor = 2^s + 1.