Skip to main content

iterations

Function iterations 

Source
const fn iterations(bits: u32) -> u32
Expand description

Calculate the maximum number of iterations required according to safegcd-bounds: https://github.com/sipa/safegcd-bounds

Computed in u64 because 45907 * bits + 30179 exceeds u32::MAX once bits >= 93558. The count itself (about 2.3 * bits) only exceeds u32::MAX for bits above 1864517463, which panics rather than wrapping.