You guys have given the "correct" answer: I'm also convinced that Math::Int128 is the right way to go.

Math::Int128 *should* work on my install, but it does not.

perl -v This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x +64-multi-thread cpan Math::Int128 <snip> t/00-report-prereqs.t ..... ok t/author-eol.t ............ skipped: these tests are for testing by th +e author t/author-no-tabs.t ........ skipped: these tests are for testing by th +e author t/author-pod-spell.t ...... skipped: these tests are for testing by th +e author t/bugs.t .................. ok t/Math-Int128.t ........... 1/? # Failed test 'max int128 >> 95' # at t/Math-Int128.t line 174. # got: '4294967295' # expected: '1' # $max >> $j = 4294967295, $max / 2 ** $j = 1, $max = 1701411834604692 +3173168730 3715884105727, $j = 95, 2 ** $j = 39614081257132169000000000000.000000 +, int128(2 ** $j) = 39614081257132168796771975168 # Failed test 'max int128 >>= 95' # at t/Math-Int128.t line 183. # got: '4294967295' # expected: '1' t/Math-Int128.t ........... Dubious, test returned 148 (wstat 37888, 0 +x9400) Failed 2/785 subtests t/Math-UInt128.t .......... 1/? # Failed test 'max uint128 >> 95' # at t/Math-UInt128.t line 172. # got: '8589934591' # expected: '1' # Failed test 'max uint128 >>= 95' # at t/Math-UInt128.t line 176. # got: '8589934591' # expected: '1' <snip>
Obviously there are math overflows being triggered in the tests. I'll try another (later) version but there's some very old code on this box. Plus I need mod_perl2 and Apache2 which increases the dependencies. Not asking for sympathy. It's just how it is.

BTW pack ('Q', blah) and unpack ('Q',blah) which require 64 bit PERL, DOES work.


In reply to Re^4: History repeats: 128 bit Math:Bigint numbers in a 64 bit DBI world by RayHunter
in thread History repeats: 128 bit Math:Bigint numbers in a 64 bit DBI world by RayHunter

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.