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

Commit 3e7cd0b

Browse files
committed
wrapping
1 parent f358fe2 commit 3e7cd0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/math/hypot.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ fn cr_hypot(mut x: f64, mut y: f64) -> f64 {
143143
}
144144

145145
let off: i64 = (0x3ff_i64 << 52) - (xd & emsk) as i64;
146-
xd += off as u64;
147-
yd += off as u64;
146+
xd = xd.wrapping_mul(off as u64);
147+
yd = yd.wrapping_mul(off as u64);
148148
x = f64::from_bits(xd);
149149
y = f64::from_bits(yd);
150150
let x2: f64 = x * x;

0 commit comments

Comments
 (0)