You might want to also look at Quadruple-precision floating-point format. In IEEE 754-2008 the 128-bit base-2 format is officially referred to as binary128.

As BrowserUk notes: The only 80-bit numbers in common usage are the extended precision 80-bit IEEE 754 floating point values used internally by the X86 & X64 floating point processors. This would not give you 80 bits of integer precession anyway.

The IEEE 754 binary128 format will yield >100 bits of precision which would meet your 80 bit requirements. Even 265 256 (typo) bit formats have been defined. However the choice of compilers is going to be limited. There can be issues affecting stack alignment which can significantly affect performance depending upon the target processor architecture. However since these are binary formats, shifting and masking albeit across 64 bit words can be done efficiently as opposed to using some kind of BCD (Binary Coded Decimal) format.

AFAIK, the low level BCD instructions are still part of the x86 family assembly instructions, but I've never used a compiler that could use them, nor have I written any assembly code for these instructions either. In any event, that doesn't sound like what you want. For raw speed, a C or FORTRAN compiler that can handle the 128bit format would seem like a promising approach. I suspect that the Perl larger int options will be slower for the main calculations that you apparently need to do.


In reply to Re: Turning very larger numbers into an array of bits by Marshall
in thread Turning very larger numbers into an array of bits by gblack

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.