[lug] Perl and large numbers on (K)ubuntu
tkil at scrye.com
Tue Sep 27 00:14:52 MDT 2011
"David L. Anselmi" <anselmi at anselmi.us> writes:
> Also, "use bigint" might help. Or it might not:
>> Here is the output of "perl -V".
>> use64bitint=undef, use64bitall=undef, uselongdouble=undef
> My use64bitint=defined and your code works fine for me (on AMD64 and x86).
SFAIK, "use bigint" should invoke arbitrary-precision integers at
script runtime; "use64bitint" indicates whether internal integers
ought to be 32-bit or 64-bit, and is relevant only at perl source (and
xs module source) compile time.
(To mash perl source speak and C99 standardese together, "use64bitint"
indicates whether IV contains an int32_t or an int64_t.)
What *should* happen is that the "use bigint" should make all numbers
promote to arbitrary precision when needed. Whether that works across
package boundaries, or whether embedding them in a string is causing
an issue, I don't know. (I'm experimenting with this problem, but I
had to build a 32-bit environment first -- all my systems have been
upgraded to 64-bit...)
More information about the LUG