MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::math::detail Namespace Reference

Classes

struct  plain_givens_bounds
 The magnitudes m = max(|a|, |b|) for which the plain formula is safe, as the open interval (lo, hi): hi = sqrt(max) / 4, so a*a + b*b <= 2 m^2 stays below max; lo = 4 sqrt(min / eps), so m^2 > 16 min / eps, and any b*b too small to be normal is below half an ulp of a*a and drops out of the sum exactly as it does in the scaled form. More...

Concepts

concept  binary_ieee_limits
 T is a binary IEEE-754 format, as its numeric_limits declare (#697).

Variables

template<typename T>
const plain_givens_bounds< T > plain_givens_interval

Variable Documentation

◆ plain_givens_interval

template<typename T>
const plain_givens_bounds<T> mtl::math::detail::plain_givens_interval
inline
Initial value:
= [] {
using std::sqrt;
using L = std::numeric_limits<T>;
return plain_givens_bounds<T>{T(4) * sqrt(L::min() / L::epsilon()), sqrt(L::max()) / T(4)};
}()
auto sqrt(const V &v)
Element-wise sqrt for vectors.
Definition sqrt.hpp:13
The magnitudes m = max(|a|, |b|) for which the plain formula is safe, as the open interval (lo,...
Definition pow2_scaling.hpp:227