This is why I always use Fibonacci. You can go all the way up to n = 46.

I wonder how high you can go with Collatz? :D

113383 is the smallest number for which Collatz exceeds the bounds of an int32_t.

int32_t

159487 is the smallest number for which Collatz exceeds the bounds of a uint32_t.

uint32_t

My program hasn’t finished spitting out the answer for an int64_t or uint64_t yet. :)

int64_t

uint64_t

8528817511 is the smallest number for which Collatz exceeds the bounds of an int64_t.

12327829503 is the smallest number for which Collatz exceeds the bounds of a uint64_t.

Code is https://gist.github.com/RichardBarrell/3d91024aedac2772bacd

I guess it comes from too much SICP (is that possible?). An example which makes sense with scheme’s numeric tower, but less obviously becomes problematic with 64bit numbers.

This is why I always use Fibonacci. You can go all the way up to n = 46.

I wonder how high you can go with Collatz? :D

113383 is the smallest number for which Collatz exceeds the bounds of an

`int32_t`

.159487 is the smallest number for which Collatz exceeds the bounds of a

`uint32_t`

.My program hasn’t finished spitting out the answer for an

`int64_t`

or`uint64_t`

yet. :)8528817511 is the smallest number for which Collatz exceeds the bounds of an

`int64_t`

.12327829503 is the smallest number for which Collatz exceeds the bounds of a

`uint64_t`

.Code is https://gist.github.com/RichardBarrell/3d91024aedac2772bacd

I guess it comes from too much SICP (is that possible?). An example which makes sense with scheme’s numeric tower, but less obviously becomes problematic with 64bit numbers.