D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10691 - real type on Win 64 broken (?)
Summary: real type on Win 64 broken (?)
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Windows
: P3 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-21 10:27 UTC by Michael
Modified: 2024-12-13 18:09 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Michael 2013-07-21 10:27:45 UTC
import std.stdio;

void main()
{
    writeln(real.min_normal, " ", real.max);
}

Produces every time different output:
1 run - 8.9527e-313 8.9527e-313
2 run - 1.21008e-312 1.21008e-312
3 run - 3.56e-312 3.56e-312
...

Or not recognized by ms linker?
Comment 1 yebblies 2013-11-20 22:14:56 UTC
Is this still broken?
Comment 2 Johannes Blume 2014-05-26 16:01:53 UTC
=================================
DMD v2.065 official (32-bit):
3.3621e-4932 1.18973e+4932
3.3621e-4932 1.18973e+4932
3.3621e-4932 1.18973e+4932

DMD v2.065 official (64-bit):
2.27151e-312 2.27151e-312
2.79471e-312 2.79471e-312
1.74681e-312 1.74681e-312
=================================
DMD v2.066 git MSVC2013 (32-bit):
3.3621e-4932 1.18973e+4932
3.3621e-4932 1.18973e+4932
3.3621e-4932 1.18973e+4932

DMD v2.066 git MSVC2013 (64-bit):
0 inf
0 inf
0 inf
=================================

So the random results on Win64 seem to be fixed on git.
Comment 3 Rainer Schuetze 2014-05-26 17:37:05 UTC
Yeah, the output was fixed when the unittests for Win64 were enabled. Unfortunately the runtime still uses C's sprintf for printing floating point numbers, and the MS library only supports double, not real.
Comment 4 dlangBugzillaToGithub 2024-12-13 18:09:39 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18636

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB