Determine whether floating point numbers are close in value
In use cases such as testing it is often times more useful to know whether two floating point
numbers are close to each other rather than exactly equal. Due to finite precision of computers,
we usually cannot even expect bitwise equality of two values even if underlaying math suggests
it. This is where is_close
comes in. The crate is
strongly inspired by
Python's PEP 485 aka math.isclose
.
You'll find plenty of examples at our documentation.
Copyright © 2020 The promi Developers
isclose_ is licensed under MIT OR Apache 2.0 license