Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix float64 comparison test failure on archs using FMA #1133

Merged
merged 4 commits into from Nov 7, 2022

Commits on Sep 13, 2022

  1. 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 <seth.bunce@getcruise.com>
    sbunce committed Sep 13, 2022
    Copy the full SHA
    4691831 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2022

  1. Apply suggestions from code review

    Co-authored-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
    Signed-off-by: Seth Bunce <seth.bunce@getcruise.com>
    sbunce and dswarbrick committed Sep 14, 2022
    Copy the full SHA
    0d8d662 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2022

  1. 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 <seth.bunce@gmail.com>
    sbunce committed Sep 27, 2022
    Copy the full SHA
    e672c58 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2022

  1. 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 <seth.bunce@gmail.com>
    sbunce committed Sep 28, 2022
    Copy the full SHA
    fa56c9b View commit details
    Browse the repository at this point in the history