good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Turning very larger numbers into an array of bitsby Marshall (Canon) |
on Feb 07, 2017 at 17:30 UTC ( [id://1181323]=note: print w/replies, xml ) | Need Help?? |
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 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 Section
Seekers of Perl Wisdom
|
|