So, if I'm interpreting your (rather terse) message correctly, because 2**63 is greater than a signed 64-bit int, it gets coersed into a double; before the subtraction is done.
And because 63-bits of precision is greater than the 53 bits the double can retain, by the time the subtraction is done, the loss of precision causes the problem.
In anycase, 1<<63-1 is a much nicer way of writing that constant. Thanks!
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".
| [reply] |
Or, as stated by oiskuu here, it's because 2**63 is implemented with pow, when 1<<63 actually works on integers.
| [reply] |