Function beetle_collatz::fall::alpha

source ·
pub fn alpha<T: Collatz>(n: NonZeroUnchecked<T>) -> bool
Expand description

Applies the rules of the collatz conjecture until a number reaches one, returning whether it succeeds or not. Success is marked by a number reaching one, and no errors along the way.

This exists for benchmarking other faster functions’ speed relative this one. This aims to always be a correct implementation, but not very fast. Do not use if performance is important to you.