Editions Ideas

Walter Bright newshound2 at digitalmars.com
Sun Dec 14 07:00:33 UTC 2025


On 12/13/2025 6:50 AM, Dom Disc wrote:
> By the way, why the f*** is cast(bool)nan == true ?!?

It's the IEEE754 floating point standard behavior. NaN is never equal to 
anything else, so cast(bool)NaN is lowered to NaN!=0, which is true.

> This should also be fixed.

IEEE754 compliance is both expected and baked into the CPU hardware.



More information about the Digitalmars-d mailing list