Function beetle_collatz::rules::basic

source ·
pub fn basic<T: Collatz>(
    __arg0: NonZeroUnchecked<T>
) -> Option<NonZeroUnchecked<T>>
Expand description

Applies the rules of the collatz conjecture to a number N, and returns the result. If N is ODD: returns 3n + 1, If N is EVEN: returns n / 2. All other functions in this module are faster than this one. Should only be used when benchmarking other functions in this module.