🦊 inari
A Rust implementation of interval arithmetic.
Requirements
Rust version
A recent version of the nightly toolchain is required since some unstable features (asm, stdsimd) are used in the crate. You need to specify the toolchain by, for example, the toolchain file in your crate (see example.
Target CPU
-
x86-64
Haswell-based and newer processors are supported.
You need to specify the target CPU when building a crate that depends on inari. One way to do that is to add a configuration file to the consuming crate (see example; you may want to change
native
tohaswell
for maximum compatibility if you are going to distribute your binary). -
AArch64 (a.k.a. ARM64)
Experimental, it is not tested continuously.
Conditional features
gmp
(enabled by default) - Enables operations that depend on GMP and MPFR, namely, transcendental functions and conversion between texts and intervals. You can opt-out the feature to reduce dependencies. Even in that case, you still have access to all arithmetic operations that are required for writing filters for robust geometric predicates.
Related projects
- Graphest - a faithful graphing calculator
Changelog
TODO
- Improve conformance to the standard
- More formatting options
References
- IEEE Std 1788-2015 - IEEE Standard for Interval Arithmetic. https://doi.org/10.1109/IEEESTD.2015.7140721
- IEEE Std 1788.1-2017 - IEEE Standard for Interval Arithmetic (Simplified). https://doi.org/10.1109/IEEESTD.2018.8277144