Skip to content

thomcc/almost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A crate for comparing floating point numbers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages