The equivalent Go unit test allow for numeric differences up to 1e-15, so I had ported this check without modification to Rust. However, in a in a clean repository checked out from the current main branch, I’ve seen the following test failure:
A difference of ~1.2e-15 is still very small and does not look like an actual bug. Therefore, let’s change this unittest to allow numeric differences up to EPSILON. This constant is defined as 1e-14, so the above delta would still be considered acceptable.
The equivalent Go unit test allow for numeric differences up to 1e-15, so I had ported this check without modification to Rust. However, in a in a clean repository checked out from the current main branch, I’ve seen the following test failure:
A difference of ~1.2e-15 is still very small and does not look like an actual bug. Therefore, let’s change this unittest to allow numeric differences up to
EPSILON
. This constant is defined as 1e-14, so the above delta would still be considered acceptable.