Movement against float.init being nan

bachmeier no at spam.net
Fri Aug 19 13:50:35 UTC 2022


On Friday, 19 August 2022 at 13:42:58 UTC, Hipreme wrote:

> What I suggest is what any sane people would: use 0 as the 
> start for float and double. 0 is the most common sense as a 
> starting point for everything, and, there are 2 options we 
> could go:

That would be a disaster. If you're computing a product, 0 is 
horrible, and there's nothing to suggest you're doing something 
wrong. At least nan is going to tell you that you've screwed up. 
The reasonable fix is to either make it a compilation error (my 
preference) or an error when compiled with a particular flag.


More information about the Digitalmars-d mailing list