We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46cfa05 commit 2c1d7dcCopy full SHA for 2c1d7dc
src/float/add.rs
@@ -1,14 +1,15 @@
1
use core::num::Wrapping;
2
3
+use int::Int;
4
use float::Float;
5
6
/// Returns `a + b`
7
macro_rules! add {
8
($a:expr, $b:expr, $ty:ty) => ({
9
let a = $a;
10
let b = $b;
- let one = Wrapping(1 as <$ty as Float>::Int);
11
- let zero = Wrapping(0 as <$ty as Float>::Int);
+ let one = Wrapping(<$ty as Float>::Int::ONE);
12
+ let zero = Wrapping(<$ty as Float>::Int::ZERO);
13
14
let bits = Wrapping(<$ty>::BITS as <$ty as Float>::Int);
15
let significand_bits = Wrapping(<$ty>::SIGNIFICAND_BITS as <$ty as Float>::Int);
0 commit comments