Movement against float.init being nan

Walter Bright newshound2 at digitalmars.com
Sun Aug 21 03:44:34 UTC 2022


On 8/20/2022 4:51 AM, Adam D Ruppe wrote:
> That works for float.init specifically, but if you've done some operation on it 
> and ended up with a nan, that will not necessarily be true since nans come in 
> several bit patterns.

I.e. a "payload" can be put in the mantissa bits of a NaN, which can be used to 
provide more information about the NaN. I've never seen anyone use this, though, 
but someone might, so isNaN() is the robust approach.


More information about the Digitalmars-d mailing list