(b) the Millennium problems are not the only million-dollar prizes in mathematics
(c) part of the joke
(d) part of the joke (and part of the C++ standard)
Searching 'collatz conjecture prize' quite literally puts a prize of a bout 120MM Yen (~ $1MM) as the top result.
Thanks.
<shrug>
Thanks for finding this and letting me know, I've learned something.
But also a layer deeper, collatz() takes a uint128 as input and the Collatz conjecture has already been proven to be true for all numbers that would fit into a uint128. So LLVM arrives to the correct answer (`return true`) because of the wrong reason, mathematically speaking.
So the compiler doesn't actually need to figure out if the loop is infinite or not.
Technically, it doesn't, but it requires programs to make forward progress, which is defined as either terminating, calling I/O functions, accessing a volatile variable or performing an atomic or synchronization operation. Infinite loops that'll eventually do one of these are perfectly valid C++ and don't have to terminate.
I can't speak to online forums (I use them for so many things), but I'm sure Twitter is the right place for humor, and not the right place to announce a serious belief you've proved a long standing mathematical problem.
OK, I guess my sense of humour hasn't translated into your context. Clearly my comment makes you think I didn't get the joke, but I did.
> "I'm guessing you didn't realize that this joke is presented as a joke, ..."
Oh, I did. Really, I did.
I guess we're just talking past each other. <shrug> You didn't get my joke, probably because you think I didn't get the original.
Time to give up.
I really do think we've just been talking past each other. When something is as obviously "tongue-in-cheek" as the original post, I find it funny when people (a) get the joke, then (b) play it with a completely straight bat. It appears that doesn't cross cultural boundaries in the way I thought it would.
You're not alone ... some of my comments are getting significant numbers of downvotes.
<shrug> ... "Humour".
I'll go back to appearing humourless and commenting purely technically on purely technical things. Meanwhile ... nice to connect with you ... thanks for the responses.
I appreciate the feedback ... I think the best thing for me is just not to try again, and to be explicit when I know something is a joke, and clear that I'm adding factual information.
Watching people continue to downvote the comments I've made, HN is clearly the wrong place for me to do otherwise.
Specifically, Collatz says "if x is even then x /= 2" but the code checks "x is odd".
It's not but there are more bounties out there than just the Millenium list. For the Collatz Conjecture specifically there's a 120M Japanese Yen prize which at this moment is a bit more than 1 million USD.
https://www.prnewswire.com/news-releases/bakuage-offers-priz...
Thanks.
The input is an unsigned __int128, and I believe Collatz has only been verified up to 2^68.
I get that it is supposed to be a joke, but it kind of falls flat because it misses the point entirely.
For instance not all languages that target LLVM will get this result. That is interesting.
(b) The Collatz Conjecture isn't one of the Millennium problems;
(c) It's using bounded numbers in the range where the Collatz Conjecture is known to be true;
(d) It seems reasonable to say "If this routine exits then the value will be "true";
(e) None of what I say here is deep or new, so when people get excited about this sort of thing it makes me wonder what I've missed.
So ... what have I missed?