Crates.io | fuzzycomp |
lib.rs | fuzzycomp |
version | 0.4.0 |
source | src |
created_at | 2020-06-06 08:50:25.119119 |
updated_at | 2021-01-03 19:55:56.714818 |
description | Comparison with margins |
homepage | https://github.com/jurij-robba/fuzzycomp |
repository | https://github.com/jurij-robba/fuzzycomp |
max_upload_size | |
id | 250601 |
size | 6,889 |
Comparison with margins.
There are problems in engineering and elsewhere where similar enough numbers count as equal. Take for example cruise control. We do not want to regulate speed for every small change but when the speed deviates enough from desired we either break or speed up.
Similarly, in finance, a candlestick that has the same open and close price is called doji and signifies indecision in markets. Of course open and close need only be close enough in real-world say 1/10 or less of the daily range.
Those are the sort of the problem the comparison functions in this library aim to solve.
Notation follows Fortran's functions:
Those functions can be used anywhere where we want to be just precise enough.