in reply to Largest integer in 64-bit perl
Anyway, my question is if Perl is compiled for a 64-bit machine and supports 64-bit integer operations, does it still store numbers same way internally
It's still essentially the same.
Your perl can exactly represent all integers in the range -9007199254740992..9007199254740992.
Integer values in the range -2147483647..4294967295 can be stored as 32-bit integer type (IV), the rest can only be stored as 53-bit (double) precision float type (NV).
If you go to a 64-bit perl that has the double precision NV type, then the range increases to -9223372036854775808..18446744073709551616. All of these integer values (except for 18446744073709551616 and -9223372036854775808, which can only be stored as an NV) can be stored as the integer type (IV). Not all all of them are representable as an NV.
If your perl has an nvtype of 64-bit precision long double, then the range expands to -18446744073709551616..18446744073709551616.
And if your perl has an nvtype of __float128 (or 113-bit precision long double), then the range is -10384593717069655257060992658440192..10384593717069655257060992658440192.
As you can see, except for the 64-bit perl with the 53-bit NV, the range is dependent upon on the NV type, not the IV type.
Cheers,
Rob