Skip to content

Make f32::try_conv(u128::MAX) an error - #67

Merged
dhardy merged 2 commits into
masterfrom
push-xzsouvxxrspq
Aug 3, 2026
Merged

Make f32::try_conv(u128::MAX) an error#67
dhardy merged 2 commits into
masterfrom
push-xzsouvxxrspq

Conversation

@dhardy

@dhardy dhardy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This is a corner case; previously f32::try_conv(u128::MAX) would result in Ok(f32::INFINITY). Since we now require Exact "rounding" by default this is no longer permitted. (With the Approx and Nearest rounding modes u128::MAX still converts to f32::INFINITY).

@dhardy
dhardy merged commit 0e7c240 into master Aug 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant