MCPcopy Create free account
hub / github.com/IntegralPilot/rustc_codegen_jvm / collatz

Function collatz

tests/binary/collatz/src/main.rs:1–9  ·  view source on GitHub ↗
(n: u32)

Source from the content-addressed store, hash-verified

1fn collatz(n: u32) -> u32 {
2 if n == 1 {
3 1
4 } else if n % 2 == 0 {
5 collatz(n / 2)
6 } else {
7 collatz(3 * n + 1)
8 }
9}
10
11fn check_up_to(current: u32, limit: u32) {
12 if current > limit {

Callers 1

check_up_toFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected