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 an accuracy regression in f32::to_degrees #48622

Closed
wants to merge 1 commit into from

Commits on Feb 28, 2018

  1. Fix an accuracy regression in f32::to_degrees

    rust-lang#47919 regressed some test cases for `f32::to_degrees`, while improving others. This change satisfies all previous test cases and should be more accurate than both previous implementations.
    
    The `f32` to `f64` cast is lossless, `f64::to_degrees` should provide more accuracy than a native `f32::to_degrees`, and conversion back to `f32` will be as accurate a conversion as possible. It can be hard to reason about floating-point accuracy, but given that this passes all the tests, I feel confident it's an improvement.
    varkor committed Feb 28, 2018
    Configuration menu
    Copy the full SHA
    2d11f04 View commit details
    Browse the repository at this point in the history