# HG changeset patch # User alfadur # Date 1562265650 -10800 # Node ID 517f3a1dd5c26a4e0279789fca9f7da17fe2eca7 # Parent 2932509533173464f64bf79fce7af3b029656e81 reduce convertions in signum diff -r 293250953317 -r 517f3a1dd5c2 rust/fpnum/src/lib.rs --- a/rust/fpnum/src/lib.rs Thu Jul 04 19:21:56 2019 +0300 +++ b/rust/fpnum/src/lib.rs Thu Jul 04 21:40:50 2019 +0300 @@ -26,7 +26,7 @@ #[inline] pub fn signum(&self) -> i8 { - (1u8 ^ self.sign_mask as u8).wrapping_sub(self.sign_mask as u8) as i8 + (1u64 ^ self.sign_mask).wrapping_sub(self.sign_mask) as i8 } #[inline]