Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit db0a6e2

Browse files
committed
wrapping
1 parent 87bee1f commit db0a6e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/math/hypot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ fn cr_hypot(mut x: f64, mut y: f64) -> f64 {
165165
ey = tld;
166166
ex &= 0x7ff_u64 << 52;
167167
let aidr: u64 = ey + (0x3fe_u64 << 52) - ex;
168-
let mid: u64 = (aidr - 0x3c90000000000000 + 16) >> 5;
168+
let mid: u64 = (aidr.wrapping_sub(0x3c90000000000000) + 16) >> 5;
169169
if __builtin_expect(
170170
mid == 0 || aidr < 0x39b0000000000000_u64 || aidr > 0x3c9fffffffffff80_u64,
171171
false,

0 commit comments

Comments
 (0)