Bug 13634 – Value range propogation applied incorrectly.

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-10-18T17:49:00Z
Last change time
2024-12-13T18:31:44Z
Assigned to
No Owner
Creator
gordon.freeman.sullied
Moved to GitHub: dmd#17685 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17685 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB