|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
Numeric traits for an arithmetic scalar type; the reusable base NumTraits forwards to.
More...
#include <NumTraits.hpp>
Public Types | |
| using | Real = T |
| The real-valued counterpart of T (T itself for real scalars). | |
| using | NonInteger = std::conditional_t<std::is_integral_v<T>, double, T> |
| A type closed under division and roots; integers widen to double, others are unchanged. | |
| using | Literal = T |
| The type of a numeric literal paired with a value of type T. | |
Static Public Member Functions | |
| static constexpr Real | epsilon () |
| Machine epsilon: the gap between 1 and the next representable value. | |
| static constexpr Real | dummy_precision () |
| Loose tolerance for fuzzy comparisons; 0 for exact types. | |
| static constexpr Real | highest () |
| Largest finite representable value. | |
| static constexpr Real | lowest () |
| Most negative finite representable value (min() for integers, -max() for floats). | |
| static constexpr Real | norm_min () |
| Smallest positive normalized value. | |
| static constexpr Real | infinity () |
| Positive infinity (or highest() for types without an infinity). | |
| static constexpr Real | quiet_NaN () |
| A quiet NaN. | |
Static Public Attributes | |
| static constexpr bool | IsInteger = std::is_integral_v<T> |
| Whether T represents integers. | |
| static constexpr bool | IsSigned = std::is_signed_v<T> |
| Whether T is a signed type. | |
| static constexpr bool | IsComplex = false |
| Whether T is complex; always false (complex scalars are not supported). | |
| static constexpr bool | RequireInitialization = !std::is_arithmetic_v<T> |
| Whether T must be constructed before use (true for non-trivial custom scalars). | |
Custom-scalar specializations must expose this same member set.
| T | An arithmetic scalar type. |
| using mundy::GenericNumTraits< T >::Real = T |
| using mundy::GenericNumTraits< T >::NonInteger = std::conditional_t<std::is_integral_v<T>, double, T> |
| using mundy::GenericNumTraits< T >::Literal = T |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |