←back to thread

570 points PaulHoule | 2 comments | | HN request time: 0.444s | source
1. convery ◴[] No.44498468[source]
It certainly is fast, but I'm curious if LLMs ever will figure out how bitshifts work..

e.g. from the playground: `static const uint64_t MERSENNE_PRIME = (1ULL << 127) - 1;` which it insists is the correct way to store a 128-bit integer in followup questions.

replies(1): >>44498600 #
2. ethan_smith ◴[] No.44498600[source]
For 128-bit values in C++, you'd need uint128_t (compiler extension) or a library like Boost.Multiprecision since 1ULL << 127 overflows the 64-bit type before subtraction occurs.