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