Skip to main content

exp2_q16

Function exp2_q16 

Source
pub fn exp2_q16(x: i64) -> u32
Expand description

2^x in 16.16 fixed point (1 << 16 is 1), for x in 16.16 at most 0; a positive x counts as 0. The whole part is a shift, the fraction comes from a 16-entry table, read straight between its entries. More than 32 halvings down is 0.