As the title says, if I input a large enough computation into the REPL, it outputs 0, no matter whether I store the value or not.
I understand that as I’m on a 64-bit system, my default type for integers is Int64. So, when I input 2^100, shouldn’t it either
a) upgrade it to Int128
or
b) overflow, and then modulo to give me the value 2^100-2^63+1?
Moreover, BigInt(2^100) also returns 0, but when I check the type of that 0, it indeed is BigInt.
My sincerest apologies for such a dumb question, but I’m kinda stuck, and I think I’m misunderstanding some key concept, hence I ask for help.
It does give you a modulo and that is the zero you see. I’m not sure why you expect 2^100-2^63+1 but it’s quite clear that that number can’t possibly be represented in 64 bits as it’s larger than 2^99.