Comment #0 by gordon.freeman.sullied — 2014-10-18T17:49:00Z
long a = 0;
long b = 9223372036854775807;
a = cast(double) b;
writeln(b);
writeln(a);
The results are:
b = 9223372036854775807
a = -9223372036854775808
This should not be possible.
Comment #1 by gordon.freeman.sullied — 2014-10-18T17:52:14Z
In the case of a large negative or positive value stored in a long, an intermediate double will not fully store it, therefore this should not be possible without more explicit means.
Comment #2 by robert.schadek — 2024-12-13T18:31:44Z