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

Float trait: shorten prefixes, rename EXP_MAX to EXP_SAT #738

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jan 3, 2025

Change SIGNIFICAND_* to SIG_* and EXPONENT_* to EXP_*. This makes things more consistent with libm, and terseness is convenient here since there isn't anything to confuse.


"Maximum" is technically correct here with regards to what the bitpattern can represent, but it is not the numeric maximum value of the exponent which has a relationship with the bias. So, replace the maximum terminology with "saturated" to indicate it only means the full bitpattern.


clippy::precedence now applies to bitwise & and |. Update with all of its suggestions, including a separate elided lifetime suggestion.

Change `SIGNIFICAND_*` to `SIG_*` and `EXPONENT_*` to `EXP_*`. This
makes things more consistent with `libm`, and terseness is convenient
here since there isn't anything to confuse.
"Maximum" is technically correct here with regards to what the
bitpattern can represent, but it is not the numeric maximum value of the
exponent which has a relationship with the bias. So, replace the maximum
terminology with "saturated" to indicate it only means the full
bitpattern.

This change is more relevant to `libm` than `compiler-builtins`.
`clippy::precedence` now applies to bitwise `&` and `|`. Update with all
of its suggestions, including a separate elided lifetime suggestion.
@tgross35 tgross35 enabled auto-merge January 3, 2025 03:13
@tgross35 tgross35 disabled auto-merge January 3, 2025 03:13
@tgross35 tgross35 enabled auto-merge January 3, 2025 03:14
@tgross35 tgross35 merged commit 520e2a0 into rust-lang:master Jan 3, 2025
26 checks passed
@tgross35 tgross35 deleted the float-trait-renaming branch January 3, 2025 03:30
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