1#ifndef LINEARALGEBRA_SRC_MOLPRO_LINALG_SCALAR_TRAITS_H_
2#define LINEARALGEBRA_SRC_MOLPRO_LINALG_SCALAR_TRAITS_H_
53template <
typename value_type>
56 if constexpr (std::is_same_v<real_t, double>) {
57 return tolerance_for_double;
59 return real_t(tolerance_for_double) *
60 (std::numeric_limits<real_t>::epsilon() / real_t(std::numeric_limits<double>::epsilon()));
typename real_type< T >::type real_type_t
The real type underlying T, i.e. T itself for a real type and U for std::complex<U>.
Definition: scalar_traits.h:43
real_type_t< value_type > precision_scaled(double tolerance_for_double)
Rescale a tolerance that was calibrated for IEEE double precision to the working precision.
Definition: scalar_traits.h:54
Definition: scalar_traits.h:19
T type
Definition: scalar_traits.h:32
The real type underlying a (possibly complex) scalar type.
Definition: scalar_traits.h:26
T type
Definition: scalar_traits.h:27