in reply to Re: Range iterator outside integer range ... Why?
in thread Range iterator outside integer range ... Why?
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Range iterator outside integer range ... Why?
by Eily (Monsignor) on Jan 16, 2015 at 16:27 UTC |