Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

real type on Win 64 broken (?) #18636

Closed
dlangBugzillaToGithub opened this issue Jul 21, 2013 · 4 comments
Closed

real type on Win 64 broken (?) #18636

dlangBugzillaToGithub opened this issue Jul 21, 2013 · 4 comments

Comments

@dlangBugzillaToGithub
Copy link

Michael reported this on 2013-07-21T10:27:45Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=10691

CC List

  • Johannes Blume
  • Michael
  • Rainer Schuetze
  • yebblies

Description

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?
@dlangBugzillaToGithub
Copy link
Author

yebblies commented on 2013-11-20T22:14:56Z

Is this still broken?

@dlangBugzillaToGithub
Copy link
Author

jblume commented on 2014-05-26T16:01:53Z

=================================
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.

@dlangBugzillaToGithub
Copy link
Author

r.sagitario commented on 2014-05-26T17:37:05Z

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.

@thewilsonator
Copy link
Contributor

As noted windows real is actually double

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants