Is D floating point semantics too advanced?

Walter Bright newshound1 at digitalmars.com
Sun Aug 26 12:22:02 PDT 2007


Sean Kelly wrote:
>> The behavior is as specified by the floating point standard IEEE 754. 
>> To change it would break from FORTRAN, C and C++ usage in a way that 
>> would silently break code that is transliterated.
> 
> It would be a horrible inconsistency, but the 'is' operator could be 
> made to return true in this instance.  After all, 'is' tests identity, 
> not equality.

I'd prefer sticking with isnan(). It's what the numerics guys are used to.



More information about the Digitalmars-d mailing list