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

Avoid IEEE-754 issues for multipleOf and divisibleBy #228

Merged

Commits on Aug 17, 2017

  1. Refactor multipleOf and divisibleBy to perform integer calculations t…

    …o avoid IEEE-754 float innacuracies.
    
    This was causing, e.g. 2.4 not to be a multipleOf 0.1.
    The code multiplies by the minimum factor of 10 so that the modulo calculation is performed on integers.
     All credit goes to @manahga for coming up with this solution.
    Ben Avery committed Aug 17, 2017
    Configuration menu
    Copy the full SHA
    c4c8ff1 View commit details
    Browse the repository at this point in the history