diff --git a/fixed_wide/src/fixed.rs b/fixed_wide/src/fixed.rs index bcee486..d88203b 100644 --- a/fixed_wide/src/fixed.rs +++ b/fixed_wide/src/fixed.rs @@ -154,49 +154,33 @@ macro_rules! impl_into_float { // SBBB BBBB // 1001 1110 0000 0000 let sign=if self.bits.is_negative(){(1 as $unsigned)<<(<$unsigned>::BITS-1)}else{0}; - println!("sign={sign}"); let unsigned=self.bits.unsigned_abs(); - println!("unsigned={unsigned}"); let most_significant_bit=unsigned.bits(); - println!("most_significant_bit={most_significant_bit}"); let exp=if unsigned.is_zero(){ 0 }else{ let msb=most_significant_bit as $unsigned; - println!("msb={msb}"); let _127=((1 as $unsigned)<<($exponent_bits-1))-1; - println!("_127={_127}"); let msb_offset=msb+_127-1-F as $unsigned; - println!("msb_offset={msb_offset}"); msb_offset<<($mantissa_bits-1) }; - println!("exp={exp:#034b}"); let digits=unsigned.digits(); - println!("digits={digits:?}"); let digit_index=most_significant_bit>>DIGIT_SHIFT; - println!("digit_index={digit_index}"); let digit=digits[digit_index as usize]; - println!("digit={digit:#034b}"); //How many bits does the mantissa take from this digit let take_bits=most_significant_bit-(digit_index<::from_bits(bits) } }