Skip to main content

zval

Function zval 

Source
pub fn zval(d: i32, ls: i32) -> i32
Expand description

d · 2^{−ls/256} (both Q8; result Q8) saturated to ±(ZM+1), with ls clamped to [−16·256, 24·256]: t = ⌊d·m/2^16⌉ with the Q16 mantissa m = 2^{(256−f)/256}, then an arithmetic or saturating shift.