MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::detail::lanv2_constants< T > Struct Template Reference

Constants for lanv2(): the relative precision and the power-of-two scale window of LAPACK's dlanv2. More...

#include <francis_qr.hpp>

Public Attributes

T eps {}
T safmn2 {}
T safmx2 {}
bool have_range = false

Detailed Description

template<typename T>
struct mtl::detail::lanv2_constants< T >

Constants for lanv2(): the relative precision and the power-of-two scale window of LAPACK's dlanv2.

The field names are dlanv2's, so the port can be read side by side with the Fortran:

  • eps: the machine epsilon of T (dlanv2's EPS, from dlamch('P')).
  • safmn2: a "safe minimum". LAPACK's SAFMIN, dlamch('S'), is the safe minimum, the smallest positive number whose reciprocal does not overflow. SAFMN2 (the 2 sets it apart from SAFMIN) is derived from it: the power of two nearest sqrt(SAFMIN / EPS) from below. Its square is still a normal number, with a margin of 1/EPS, so entries that small can be multiplied without underflow. dlanv2 rescales a block whose entries fall below it.
  • safmx2: the matching "safe maximum", 1 / safmn2. dlanv2 rescales a block whose entries rise above it.
  • have_range: false for a type without numeric_limits. That type then skips the rescaling loop, which only guards against overflow and underflow in tau.

Member Data Documentation

◆ eps

template<typename T>
T mtl::detail::lanv2_constants< T >::eps {}

◆ have_range

template<typename T>
bool mtl::detail::lanv2_constants< T >::have_range = false

◆ safmn2

template<typename T>
T mtl::detail::lanv2_constants< T >::safmn2 {}

◆ safmx2

template<typename T>
T mtl::detail::lanv2_constants< T >::safmx2 {}

The documentation for this struct was generated from the following file: