almost

Crates.ioalmost
lib.rsalmost
version0.2.0
sourcesrc
created_at2019-06-14 00:48:27.963777
updated_at2019-08-11 18:49:55.351735
descriptionA crate for comparing floating point numbers
homepage
repositoryhttps://github.com/thomcc/almost
max_upload_size
id140989
size174,586
crates-io (github:sigp:crates-io)

documentation

README

almost: A crate for comparing floating point numbers.

Docs

This crate strives to make choices that are good for most cases, and not providing you a complex API that encourages misuse.

  1. Uses relative comparison by default.
  2. Provides a separate function for comparison with zero (the only time when absolute comparison is a good default choice).
  3. Uses a better default for tolerance than std::{f32,f64}::EPSILON.
  4. Handles infinities / subnormals properly.
  5. no_std compatible always

License

Public domain, as explained here

Commit count: 8

cargo fmt