On 64 bit archetectures it is the default to set up for 64 bit native numbers. On 32 bit platforms it is a compile time directive to add in the support because it is slower to use 64 bit numbers on these machines. However 32 bit numbers on those machines aren't affected AFAIK.

The bigger issue is that perl represents numbers in double precision floating point (64 bit) but the mantissa, the part that matters for integer work, is only 54 bits, with 10 for the exponent.

So if you are only going to use 34 or 35 bits then perl compiled default on a 32 bit machine should work just fine since there is no problem until after 2^54. If you overflow this the problems are subtle so be sure you will stay < 2^54. On 64 bit machines you could use the integer pragma to force 64 bit integers to get really big ints but on a 32 bit native this would decrease the range from 2^54 to 2^32.

I do not know what use integer does with a 32 bit machine compiled to allow long number support.

use integer; #will represent all numbers as int type disabling floatin +g numbers

As for DBI if i converts int types into native int types to send them along to the database that would be a problem though I don't know what effect using the long int compile option has on DBI. I will look into that Monday if nothing reported here before then.


In reply to Re: 64-Bit Values and DBI by dga
in thread 64-Bit Values and DBI by tadman

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.