Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::FractionBacking Concept Reference

An integer backing over which fraction arithmetic obeys ℚ's laws under Op: it does not wrap, so a wrapped intermediate cross-product cannot silently break a law. Either it is exact, or it saturates and offers the is_finite hook (RejectsNonFinite) through which ℚ's tripwire rejects the saturated value instead of clamping. More...

Concept definition

template<typename I, typename Op>
(is_exact_total_v<I, Op> ||
(is_saturating_v<I, Op> && dedekind::numbers::RejectsNonFinite<I>))
An integer backing over which fraction arithmetic obeys ℚ's laws under Op: it does not wrap,...
Definition rational.cppm:541
Definition integral.cppm:98
The rejection contract a saturating backing must offer ℚ's tripwire: is_finite(i),...
Definition rational.cppm:91

Detailed Description

An integer backing over which fraction arithmetic obeys ℚ's laws under Op: it does not wrap, so a wrapped intermediate cross-product cannot silently break a law. Either it is exact, or it saturates and offers the is_finite hook (RejectsNonFinite) through which ℚ's tripwire rejects the saturated value instead of clamping.

Template Parameters
Ithe integer carrier.
Opthe operation on I (std::plus / std::multiplies).