-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Implement TryFrom<f64> for f32 #50552
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
Conversation
r? @TimNN (rust_highfive has picked a reviewer for you, use r? to override) |
Previous conversations about |
Please add test cases for these. Also, this would make e.g. |
I'll take a look at these in a bit. You're right on the inexactness, although it's the same if you try |
Ping from triage @clarcharr! It's been a while since we heard from you, will you have time to work on this again soon? |
@pietroalbini I haven't had time to look at this in the past few days, although I'm probably fine closing this for now. I'll open a new PR with tests once I get the time. |
Sure. |
This will only perform the conversion if it can be done without any loss of precision.