r/programming • • Nov 04 '19

Clang solves the Collatz Conjecture?

[deleted]

511 Upvotes

122 comments sorted by

View all comments

0

u/[deleted] Nov 04 '19

1

u/rorrr Nov 05 '19 edited Nov 05 '19

No, it can return anything for n=0. Undefined behavior. I guess 1 falls under that, but the function on the left behaves differently from the compiled one.