in reply to Re^3: unpacking unsigned long longs
in thread unpacking unsigned long longs

Alright, so I tried unpacking Q (and q) to no avail. But perl didn't spit out any errors when I try to assign 2^45 to a variable and then print it. Does that still mean perl isn't compiled to support 64 bit numbers? If so, how can I go about fixing this?

Replies are listed 'Best First'.
Re^5: unpacking unsigned long longs
by ikegami (Patriarch) on Jul 07, 2009 at 17:44 UTC

    Did you really mean 2^45 (47) or 2**45 (35184372088832).

    A double-precision floating point number can handle numbers much bigger than 2**45. And with 53 bits of precision, it can represent 2**45 faithfully.

    If so, how can I go about fixing this?

    See the "64 bit support" section in the perl distribution's INSTALL file for how to build such a perl.

    Or like I said already, tell me which cell of my table you want, and I'll provide some code to do the same thing on a 32-bit build of Perl.