Bug 21698 – Windows VisualD x86-mscoff fails to compare double.infinity

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2021-03-10T14:57:00Z
Last change time
2024-12-13T19:15:07Z
Assigned to
No Owner
Creator
Berni44
Moved to GitHub: dmd#19885 →

Comments

Comment #0 by bugzilla — 2021-03-10T14:57:00Z
The following unittest fails on dlang.phobos (Windows_VisualD x86-mscoff) from the Phobos testsuite: unittest { import std.math : pow; double d1 = 21800.0; assert(pow(d1,72) == double.infinity); // fails // additional infos: import std.stdio; writeln(pow(d1,72)); // inf writeln(typeof(pow(d1,72)).stringof); // double union A { double a; ulong b; } A a; a.a = pow(d1,72); writefln!"%.064b"(a.b); // 0111111111110000000000000000000000000000000000000000000000000000 } The output at the bottom shows, that value, type and even bitpattern are correct. Anyway, the comparison fails. (It works on all other computers from the test suite.)
Comment #1 by robert.schadek — 2024-12-13T19:15:07Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19885 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB