Crates.io | fin |
lib.rs | fin |
version | 0.0.2 |
source | src |
created_at | 2017-11-02 12:07:29.735658+00 |
updated_at | 2017-11-04 20:16:31.176993+00 |
description | finite, NaN-free floiting point numbers. Not ready to be used yet! |
homepage | |
repository | |
max_upload_size | |
id | 37784 |
size | 16,490 |
fin
- finite, NaN-free floiting point numbers for rustWorking with floats can be a bit of a pain in the backside, since floats can
carry errors conditions that are not handled by the type system.
In addition, rust does not implement the Ord
trait for f3
and f64
. Which
is correct since a total ordering makes no sense in the face of NaN
-values.
fin
aims to improve on that situation as a zero-cost abstraction (in the sense
that the performance hit is not greater than manually checking conditions where
its nessesary)
Add this to your Cargo.toml
(since the fin project is very much in flux,
getting this package from github is the preferred way for now):
[dependencies]
fin = { git = "https://github.com/madmalik/fin.git" }
and this to your crate root:
extern crate fin;
Fin uses session types to track invariants on floating point numbers.
MIT