wide-mul is a crate feature
here goes another bottom-up rewrite
This commit is contained in:
parent
8ee6204a42
commit
f22cd653df
fixed_wide
@ -4,8 +4,9 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default=["zeroes"]
|
default=["zeroes","wide-mul"]
|
||||||
ratio=[]
|
ratio=[]
|
||||||
|
wide-mul=[]
|
||||||
zeroes=["ratio","dep:arrayvec"]
|
zeroes=["ratio","dep:arrayvec"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use bnum::{BInt,cast::As};
|
use bnum::{BInt,cast::As};
|
||||||
|
|
||||||
#[derive(Clone,Copy,Debug,Hash)]
|
#[derive(Clone,Copy,Debug,Hash)]
|
||||||
|
/// A Fixed point number for which multiply operations widen the bits in the output. (when the wide-mul feature is enabled)
|
||||||
/// N is the number of u64s to use
|
/// N is the number of u64s to use
|
||||||
/// F is the number of fractional bits (always N*32 lol)
|
/// F is the number of fractional bits (always N*32 lol)
|
||||||
pub struct Fixed<const N:usize,const F:usize>{
|
pub struct Fixed<const N:usize,const F:usize>{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user