numaxiom
⚠️ Pre-release: version 0.0.1 is experimental. APIs and crate layout may change without backward compatibility guarantees.
numaxiom is a lightweight collection of numeric traits for expressing ranges, signs, and constants at the type level. It is not a num-traits compatibility layer; the goal is a const-friendly set of axioms that can be used in no_std contexts.
Key traits
Zero/One/Two(and*_Const): fetch basic constants at runtime or in const contexts. Const and non-const forms are implemented explicitly rather than derived from each other; primitives ship with both.MinValue/MaxValue/Bounded: upper and lower bounds;Bounded::bounds()returns the pair.- Sign markers:
NonNegative,NonPositive,AnySign,Positive,Negative,NonZero, etc. - Operations:
Abs,Signum,Reciprocal,Sqrt,Clamp,Epsilon. - Saturating ops:
SaturatingAdd,SaturatingSub,SaturatingMul. - Checked ops:
CheckedAdd,CheckedSub,CheckedMul,CheckedDiv,CheckedRem,CheckedNeg.
Usage
use Add;
use ;