pub fn to_fixed(x: f64, m: i32, n: i32) -> Result<(u128, bool), String>
Convert x (f64) into fixed point format (Qm.n), if possible.
x
use fixed2float::to_fixed; assert_eq!(to_fixed(1.5, 1, 3).unwrap(), (0b1100, true));