Skip to main content

closed_form_wide_scale

Function closed_form_wide_scale 

Source
pub fn closed_form_wide_scale(s: u32, e: i32) -> ActScale
Expand description

The per-block scale’s closed form (crate::spatial::decode_engine::numerics::wide_scale, an 8-bit significand), for a normal amax with significand s (24 bits) and unbiased exponent e: with m₁ = ⌈⌈S/2⁹⌉/127⌉, the scale is m₁·2^(e−14) when m₁ ≤ 255, else ⌈⌈S/2¹⁰⌉/127⌉·2^(e−13), a significand of 128 to 130.