[Issue 8476] float comparison operand not truncated from real

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 16 09:18:06 PDT 2012


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


Maxim Fomin <maxim at maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim at maxim-fomin.ru


--- Comment #9 from Maxim Fomin <maxim at maxim-fomin.ru> 2012-10-16 09:18:02 PDT ---
Regardless of whether (when comparing floats with reals) compiler should
compare with full or truncated to smaller type precision, current behavior
seems to be inconsistent with spec. According to the spec in section "Equality
Expressions" floating point types are compared bitwise. This means that if two
floats are compared, compiler need not care about extra precision but currently
it compares 32 bit with 80 bit (issue is better revealed in 8745). 

But if this is feature and not a bug, spec should be changed and better explain
the issue.

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