Movement against float.init being nan

Walter Bright newshound2 at digitalmars.com
Sun Aug 21 03:25:57 UTC 2022


On 8/20/2022 6:19 AM, Hipreme wrote:
> I don't see how easier it is to track a nan. Division by zero causes exception 
> which is the best thing ever. Multiplication produces a zero result, which is 
> pretty obvious to track. If the number does not change you will pretty much 
> print both values and you'll easily find the 0 there.

x * NaN => NaN
x / NaN => NaN
x + NaN => NaN
x - NaN => NaN
-Nan => NaN
cos(NaN) => NaN
exp(NaN) => NaN

Only a subset of this is true for 0.



More information about the Digitalmars-d mailing list