[Issue 8476] float comparison operand not truncated from real

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 30 16:09:51 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8476



--- Comment #3 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2012-07-30 16:09:48 PDT ---
(In reply to comment #1)
> I'm not sure what the issue is here. Can you point to what you think it should
> be doing?
> 
> Also, the compiler is allowed to not truncate reals to floats when doing
> comparisons, even if it is typed as a float. This is a feature, not a bug. The
> compiler is always allowed to use a higher precision for intermediate
> calculations than the source is typed.

my diagnosis is probably wrong, but 

    writeln("fitness(z) > fitness(z) ?",f > f);
    writeln("fitness(z) > fitness(z) ?",less(z,z));

are printing out different results when they should be printing the same thing.

dmd 2.059, 32 bit only.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list