@xuu@txt.sour.is Yes, exactly that. But: I do have more than 32 bits after all, when I use double
or long double
. 😲 I went with long double
which has 80 bits even on DOS (63 bits mantissa, I think).
(I only wrote a brute-force thingy this morning, so I didn’t even think about doing anything related to polynomials or double
. 😅 Even part 2 only took 55 ms. But for DOS, this wasn’t an option anyway, so I did the proper math while waiting for something at work. 🤣)
It’s still a bit surprising to me. Usually, AoC doesn’t require such tricks and most things fit neatly into 32 bits. Maybe there’s a better solution after all. 🤔 I might have a look at reddit.