Unexpected results with doubles

Joseph Malle malle at umich.edu
Mon Jan 7 21:42:42 UTC 2019


On Monday, 7 January 2019 at 20:18:28 UTC, H. S. Teoh wrote:
> Either there's memory corruption somewhere, or there's a 
> codegen bug in the compiler.

I think that must be it.  I ran it with ldc instead of dmd and it 
worked fine (solved the original problem! woohoo).

> Or the compiler somehow is  malfunctioning with -run.  Did
> you try compiling the program separately and running it?
> Does that make a difference?

I did try doing it without -run and it had the same issue.

> The way to dig into the cause is to disassemble the radius() 
> function and post the disassembly here.  Then we can take a 
> look to find out what's going on.

What's the best way to get readable disassembly from dmd?  I 
tried godbolt but there was lots more stuff than I expected...


More information about the Digitalmars-d-learn mailing list