2 ms·
> float default is NaN, why... just WHY!!!!! All operations that are fed NaN as an operand produce a NaN result. This makes it very obvious when the initializa
by WalterBright 4y ago
> float default is NaN, why... just WHY!!!!!
All operations that are fed NaN as an operand produce a NaN result. This makes it very obvious when the initialization of a float has been neglected. Defaulting to 0.0 means uninitialization bugs are nearly impossible to detect.
> char default is 0xFF....
Same thing. It's intended to flush out uninitialization bugs.