numaxiom
⚠️ 0.0.x is pre-release/experimental; breaking changes are expected. See VERSIONS.md for status and compatibility details.
Numeric marker traits for ranges, signs, constants, and lightweight operations, usable in std and no_std environments. Not a num-traits shim: contracts are explicit, implementations document any variability (NaN/∞/rounding/panic).
What’s included
- Contracts:
Positive,Negative,NonPositive,NonNegative,AnySign,NonZero; domain markersNonNan/HasNan/NanConst; infinity markers (HasPositiveInfinity,HasNegativeInfinity,HasAnySignInfinityandNon*variants). - Constants:
Zero/One/Two(+Has*,Non*,*Const),MinValue/MaxValue(+ const/marker),Epsilon(+ const/marker). - Operations:
Abs,Signum,Reciprocal,Sqrt,Root,Pow,Cbrt,Hypot,Exp,Log/Log2/Log10/LogBase, rounding (Floor/Ceil/Round/Trunc), trig (Sin/Cos/Tan+Asin/Acos/Atan/Atan2),Clamp, checked and saturating math.
Features & platform notes
- Default features:
std. Works withno_stdby disabling default features. - Optional:
libmforno_stdfloat math symbols (opt-in; see ARCHITECTURE.md for details). Float ops are implemented forf32/f64only whenstdorlibmis enabled. Enablinglibminheritslibm's MSRV (currently Rust 1.63 for 0.2.x; future libm releases may raise this). - Implementers must document domain/exception behavior for ops that can vary (NaN/∞/panic/rounding/overflow).
Example
use Add;
use ;
More
- VERSIONS.md: release status and compatibility.
- ARCHITECTURE.md: design goals and implementation rules.
- CONTRIBUTING.md: contribution guide.
License
Dual-licensed under MIT OR Apache-2.0. See the bundled license files.