fix zero
This commit is contained in:
parent
b11a060042
commit
d4cfb9cd47
@ -456,7 +456,7 @@ impl Planar64{
|
|||||||
const BITS:i32=64;
|
const BITS:i32=64;
|
||||||
const FRAC:i32=32;
|
const FRAC:i32=32;
|
||||||
let pow=(((BITS-FRAC-(self.0.leading_zeros() as i32)+1)>>1)+FRAC)-1;
|
let pow=(((BITS-FRAC-(self.0.leading_zeros() as i32)+1)>>1)+FRAC)-1;
|
||||||
let mut result=Self::raw(1<<pow);
|
let mut result=Self::ZERO;
|
||||||
let wide_self=(self.0 as i128)<<FRAC;
|
let wide_self=(self.0 as i128)<<FRAC;
|
||||||
for i in (0..=pow).rev(){
|
for i in (0..=pow).rev(){
|
||||||
let new_result=Self::raw(result.0|1<<i);
|
let new_result=Self::raw(result.0|1<<i);
|
||||||
|
Loading…
Reference in New Issue
Block a user