Movement against float.init being nan

Ali Çehreli acehreli at yahoo.com
Tue Aug 23 21:24:10 UTC 2022


On 8/23/22 13:44, Dave P. wrote:
 > On Friday, 19 August 2022 at 13:42:58 UTC, Hipreme wrote:
 >> [...]

 > will have completely different initial values

Although C does not initialize variables, sometimes both C and D floats 
can have the same exact bit pattern.

 > despite being syntactically identical!

C and D are different languages.

 >      writeln(f_d); // Foo(nan)

That will always be the case.

 >      writeln(f_c); // Foo(0)

And yes, 0 happens to be a valid garbage value.

Ali



More information about the Digitalmars-d mailing list