|laziness, impatience, and hubris|
64-bit division anomolies (Solved.)by BrowserUk (Pope)
|on Feb 16, 2015 at 19:45 UTC||Need Help??|
BrowserUk has asked for the
wisdom of the Perl Monks concerning the following question:
When working with large (>2**63) integers on a 64-bit build of perl, division/modulus operations get screwy.
The cause is that the results are automatically morphed into floating point numbers. The problem is, they don't have the precision to hold the results:
Note the loss of precision in the division result.
In an attempt to prevent the morphing to fp, I tried integer, but that creates a different problem:
How does the division of one positive number by another positive number render a negative result? (When what should be unsigned division is done as signed?)
The latest I've tried this on is 5.18, so it might have been fixed in later builds, but that's not a solution for me at the moment.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked