Why does a f32 literal with a value equal to 2^-32 trigger clippy's excessive precision lint?

2026-10-28来源 Rust Users ForumEnglish

The mantissa can be all zeroes, and the biased exponent can push the implicit 1 far enough down to end up with the value according to my understanding of floats, as it's just a single bit with a lot of zeroes before it in fixed-point.

3 posts - 2 participants

Read full topic

原文:https://www.a8q9.cn/en/article/why-does-a-f32-literal-with-a-value-equal-to-2-32-trigger-clippy-s-excessive-pre-05bbd9.html

相关文章