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

The number system describes itself through std::numeric_limits (#838): its epsilon, range, infinities and NaNs. More...

#include <scalar.hpp>

Concept definition

template<typename T>
concept mtl::HasNumericLimits = std::numeric_limits<magnitude_t<T>>::is_specialized
The number system describes itself through std::numeric_limits (#838): its epsilon,...
Definition scalar.hpp:22

Detailed Description

The number system describes itself through std::numeric_limits (#838): its epsilon, range, infinities and NaNs.

Required of the MAGNITUDE type, because the standard does not specialize numeric_limits for std::complex: a std::complex<T> qualifies when T does.

Every MTL5 element type must meet it. Algorithms that need the precision or the range of a type read them from numeric_limits, with no per-algorithm fallback for a type that lacks them: a custom number type specializes std::numeric_limits, as the Universal number systems do.