in reply to Re^5: The 16 digit number dilemma.
in thread The 16 digit number dilemma.

I would think that would do the trick but it is off a little:
Test win: -6213077893701800743 Test perl: -6213077893701849127
I think I need to convert to the 64 before doing the calculations. The numbers do not seem the same after calculating them in different formats. The turning point is after the 64 cap of 9223372..... They stay identical until then. Is there a way to do that?

I have i (my integer) declared as:

my $i = Math::BigInt->new('0');
Is it possible to make it a signed 64 or whatever windows there is using to begin with? Thank ya so much! Im very close. Bah: I think I see the problem here with warnings:
$z = -(0x10000000000000000 - $i) if 0x8000000000000000 & $i; # line 115 Integer overflow in hexadecimal number at ./testgen line 115 (#1) (W o +verflow) The hexadecimal, octal or binary number you have specified e +ither as a literal or as an argument to hex() or oct() is too big for + your architecture, and has been converted to a floating point number +. On a 32-bit architecture the largest hexadecimal, octal or binary n +umber representable without overflow is 0xFFFFFFFF, 037777777777, or +0b11111111111111111111111111111111 respectively. Note that Perl tran +sparently promotes all numbers to a floating point representation in +ternally--subject to loss of precision errors in subsequent operation +s.
I am running an athalon XP with gentoo linux, 2.6 kernel. Is it possible to run 64 bit integers with it? The c++ code was written on windows 2000, I would have certainly thought linux was at least equal ;)

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.