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

topdown/parse_units: Use big.Rat for units parsing. #4857

Commits on Jul 7, 2022

  1. topdown/parse_units: Use big.Rat for units parsing.

    Previously, we used big.Float for units parsing, but this resulted in
    occasional rounding issues, due to values like 0.001 not being perfectly
    representable in floating-point format.
    
    This issue was fixed by switching units parsing to use big.Rat, since
    Rationals can generally handle such quantities with perfect precision.
    
    Fixes open-policy-agent#4856.
    
    Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
    philipaconrad committed Jul 7, 2022
    Configuration menu
    Copy the full SHA
    6f8279d View commit details
    Browse the repository at this point in the history