We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 819d4a3 commit 517c25cCopy full SHA for 517c25c
library/core/src/num/dec2flt/lemire.rs
@@ -55,7 +55,7 @@ pub fn compute_float<F: RawFloat>(q: i64, mut w: u64) -> BiasedFp {
55
// <https://arxiv.org/pdf/2101.11408.pdf#section.9.1>. For detailed
56
// explanations of rounding for positive exponents, see
57
// <https://arxiv.org/pdf/2101.11408.pdf#section.8>.
58
- let inside_safe_exponent = (q >= -27) && (q <= 55);
+ let inside_safe_exponent = (-27..=55).contains(&q);
59
if !inside_safe_exponent {
60
return fp_error;
61
}
0 commit comments