|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
The Numeric Landing (IEEE 754 and Lipschitz Boundaries). More...
#include <cmath>#include <concepts>#include <functional>#include <limits>#include <optional>import dedekind.category:topoi;
Classes | |
| struct | dedekind::category::NumericWitness< T > |
| A typed witness of numeric classification in Ω_K3. More... | |
| struct | dedekind::category::IntervalBoundaryPolicy< T > |
| Closed interval policy [lower, upper] for integral species. More... | |
| struct | dedekind::category::FullMachineBoundaryPolicy< T > |
| Full-machine boundary policy (no clipping). More... | |
| struct | dedekind::category::NaNHolePolicy< T > |
| IEEE-754 NaN-hole classifier policy for floating species. More... | |
Namespaces | |
| namespace | dedekind::category |
Concepts | |
| concept | dedekind::category::IsNumericSpecies |
| concept | dedekind::category::IsLipschitzBoundaryPolicy |
| User-provided Lipschitz boundary policy over a numeric species. | |
| concept | dedekind::category::IsNumericHoleClassifier |
| A characteristic morphism χ: T -> Ω_K3 for numeric support. | |
Macros | |
| #define | DEDEKIND_NOINLINE |
| #define | DEDEKIND_BRIDGE_CONSTEXPR constexpr |
| #define | DEDEKIND_BRIDGE_NOINLINE |
Functions | |
| template<std::signed_integral T> | |
| constexpr std::optional< T > | dedekind::category::detail::checked_add_signed (T a, T b) |
| template<std::signed_integral T> | |
| constexpr std::optional< T > | dedekind::category::detail::checked_mul_signed (T a, T b) |
|
template<typename T, typename Policy> requires IsLipschitzBoundaryPolicy<Policy, T> | |
| constexpr Ternary | dedekind::category::classify_numeric (T x, Policy policy) |
| Classify a numeric value under a user policy. | |
| template<std::integral T, typename Policy> requires IsLipschitzBoundaryPolicy<Policy, T> | |
| constexpr NumericWitness< T > | dedekind::category::certify_add (T a, T b, Policy policy) |
| Certified integer addition with an explicit support policy. | |
| template<std::floating_point T, typename Policy = NaNHolePolicy<T>> requires IsLipschitzBoundaryPolicy<Policy, T> | |
| constexpr NumericWitness< T > | dedekind::category::certify_add (T a, T b, Policy policy={}) |
| Certified floating addition with NaN-hole policy. | |
| template<std::integral T, typename Policy> requires IsLipschitzBoundaryPolicy<Policy, T> | |
| constexpr NumericWitness< T > | dedekind::category::certify_mul (T a, T b, Policy policy) |
| Certified integer multiplication with an explicit support policy. | |
|
template<std::floating_point T, typename Policy = NaNHolePolicy<T>> requires IsLipschitzBoundaryPolicy<Policy, T> | |
| constexpr NumericWitness< T > | dedekind::category::certify_mul (T a, T b, Policy policy={}) |
| Certified floating multiplication with NaN-hole policy. | |
| template<std::integral T, typename Policy> requires IsLipschitzBoundaryPolicy<Policy, T> | |
| constexpr NumericWitness< T > | dedekind::category::certify_div (T a, T b, Policy policy) |
| Certified integer division with explicit policy. | |
|
template<std::floating_point T, typename Policy = NaNHolePolicy<T>> requires IsLipschitzBoundaryPolicy<Policy, T> | |
| constexpr NumericWitness< T > | dedekind::category::certify_div (T a, T b, Policy policy={}) |
| Certified floating division with NaN-hole policy. | |
| DEDEKIND_BRIDGE_NOINLINE DEDEKIND_BRIDGE_CONSTEXPR NumericWitness< int > | dedekind::category::certify_add_int_interval (int a, int b, IntervalBoundaryPolicy< int > policy) |
| Non-template bridge functions for profiler-friendly attribution. | |
| DEDEKIND_BRIDGE_NOINLINE DEDEKIND_BRIDGE_CONSTEXPR NumericWitness< unsigned int > | dedekind::category::certify_add_uint_full (unsigned int a, unsigned int b, FullMachineBoundaryPolicy< unsigned int > policy={}) |
| DEDEKIND_BRIDGE_NOINLINE DEDEKIND_BRIDGE_CONSTEXPR NumericWitness< int > | dedekind::category::certify_mul_int_interval (int a, int b, IntervalBoundaryPolicy< int > policy) |
| DEDEKIND_BRIDGE_NOINLINE DEDEKIND_BRIDGE_CONSTEXPR NumericWitness< int > | dedekind::category::certify_div_int_full (int a, int b, FullMachineBoundaryPolicy< int > policy={}) |
| DEDEKIND_BRIDGE_NOINLINE DEDEKIND_BRIDGE_CONSTEXPR NumericWitness< double > | dedekind::category::certify_add_double_nan (double a, double b, NaNHolePolicy< double > policy={}) |
| DEDEKIND_BRIDGE_NOINLINE DEDEKIND_BRIDGE_CONSTEXPR NumericWitness< double > | dedekind::category::certify_mul_double_nan (double a, double b, NaNHolePolicy< double > policy={}) |
| DEDEKIND_BRIDGE_NOINLINE DEDEKIND_BRIDGE_CONSTEXPR NumericWitness< double > | dedekind::category::certify_div_double_nan (double a, double b, NaNHolePolicy< double > policy={}) |
Variables | |
| constexpr bool | dedekind::category::numeric_uses_builtin_overflow_checks = false |
| Compile-time diagnostic: portable fallback overflow path enabled. | |
The Numeric Landing (IEEE 754 and Lipschitz Boundaries).
@partition :numeric
This partition defines first-pass, honest APIs for machine-numeric hazards:
The boundary may not always be inferable from the type alone. For such cases, users can provide a boundary policy explicitly.