Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix float64 comparison test failure on archs using FMA (#1133)
* Fix float64 comparison test failure on archs using FMA Architectures using FMA optimization yield slightly different results so we cannot assume floating point values will be precisely the same across different architectures. The solution in this change is to check "abs(a-b) < tolerance" instead of comparing the exact values. This will give us confidence that the histogram buckets are near identical. Signed-off-by: Seth Bunce <[email protected]> * Apply suggestions from code review Co-authored-by: Daniel Swarbrick <[email protected]> Signed-off-by: Seth Bunce <[email protected]> * copy float compare dependency Per discussion in the pull request, we'd like to avoid having an extra dependency on a float comparison package. Instead, we copy the float compare functions from the float comparison package. The float comparison package we're choosing is this. The author of this package has commented in the pull request and it looks like we have consensus that this is the best option. github.com/beorn7/floats Signed-off-by: Seth Bunce <[email protected]> * remove float32 variant, relocate into separate file This change removes the float32 variant of the AlmostEqual funcs, that we will likely never use. This change also relocates the function into a separate file to avoid modifying a file that's a fork of another vendored package. Signed-off-by: Seth Bunce <[email protected]> Signed-off-by: Seth Bunce <[email protected]> Signed-off-by: Seth Bunce <[email protected]> Co-authored-by: Daniel Swarbrick <[email protected]>
- Loading branch information