Crate beetle_collatz
source ·Expand description
A collection of functions relating to the Collatz conjecture
Modules
- Functions for finding numbers who take the most steps to reach 1, given the rules.
- For checking to see if ranges of numbers fall to 1
- Contains functions that apply the rules of the collatz conjecture until a number reaches one
- Contains functions that apply the rules of the collatz conjecture in more performant ways
- Functions for counting how many steps a number takes to reach 1
- Functions for mapping integers to the number of steps they take to reach 1.
Structs
- Represents a single non-zero unsigned integer, which can be used with the functions in this crate
Traits
- Types implementing this can be passed to the most if not all functions in this library
Functions
- This has the effect of dividing a number by 2 until it is odd. Odd numbers are simply returned.
- Returns all the numbers N becomes on its way to falling to one.