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 ;)

In reply to Re^6: The 16 digit number dilemma. by docster
in thread The 16 digit number dilemma. by docster

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.