Product
MorphIQ Numerics
Deterministic elementary and probability functions, seeded random streams, arithmetic and checked tridiagonal solves. Strong and bounded-approximation APIs retain their individual numerical contracts.
MorphIQ Numerics is a no_std library with no heap allocation or platform
math-library calls. It provides elementary and probability functions, seeded
random streams, log-space and double-word arithmetic, reductions, finite
intervals, and checked tridiagonal solves.
Get started
Pre-release. Rust 1.89 or later is required. Before 0.1, releases are git tags
only; the library is not yet published on crates.io. Pin a released tag in
Cargo.toml:
[dependencies.morphiq-numerics]
git = "https://github.com/MorphIQ-Labs/morphiq-numerics"
tag = "v0.0.22"use morphiq_numerics::{elementary, normal};
assert_eq!(elementary::exp(0.0), 1.0);
assert_eq!(normal::norm_cdf(0.0), 0.5);Default builds are scalar and no_std, with no dependencies. Add
features = ["simd", "std"] to the dependency for SIMD with runtime CPU
detection. simd alone enables backends selected by compile-time target
features and adds only the first-party architecture crate. Slice APIs also
work without SIMD.
See the releases and repository guide for release notes and build instructions.
Choose a numerical contract
Strong APIs retain their individual guarantees: correct rounding where established and proved error bounds elsewhere. Correct rounding is the nearest binary64 result, ties to even; it is not a promise for every library operation. Read each function's domain, special values and assurance limits in its contract and derivation.
The separate fast::elementary and fast::normal namespaces expose bounded
approximations for exp, exp_coarse, ln, erfcx, norm_cdf and
log_norm_cdf, each with a matching slice API. Select an API using the error
budget of your composed computation, including cancellation, tails and inverses.
The per-function bounds
state the accelerated domains and the corresponding strong-API fallback behavior.
Scalar and SIMD results are bit-identical within each API; fast and strong APIs may return different bits. Feature flags never weaken a numerical contract. The documented floating-point environment remains required.
API reference and evidence
The public module list and function-specific derivations are maintained with the implementation. To browse the API locally from a checkout of the release:
cargo doc -p morphiq-numerics --all-features --no-deps --openIndependent oracle tests, source-bound proof artifacts and cross-target checks provide evidence with explicit coverage limits. Guarantees apply to stated functions, domains and supported platforms; they do not prove every consuming model or application. Performance measurements apply to their recorded hosts, workloads and contracts, not to every use of an API or SIMD backend.
License
Choose either the MIT license or Apache License 2.0. The repository retains applicable third-party notices.