Movement against float.init being nan

Walter Bright newshound2 at digitalmars.com
Sun Aug 21 15:31:03 UTC 2022


On 8/20/2022 10:03 PM, Ali Çehreli wrote:
> On 8/20/22 20:44, Walter Bright wrote:
> 
>  > 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 think it is called "nan boxing."

BTW, this influences code generation, too. For example:

     x = 0;
     y = NaN;
     z = x + y;

z gets assigned a NaN. But which NaN? The NaN that was assigned to x. I.e. the 
specific NaN values get propagated.


More information about the Digitalmars-d mailing list