float init 0 request
Guillaume Piolat
first.name at gmail.com
Sun Aug 16 19:43:45 UTC 2026
On Friday, 14 August 2026 at 05:57:55 UTC, ABrightLight wrote:
> Hello. I understand this subject's been discussed a number of
> times before, but I'd like to throw in my reasoning for why it
> would benefit us more for floats to initialize to 0 than NaN.
There is nothing to "fix" because NaN init is the right choice.
I work in float all the time (audio) and this "issue" is not even
an issue, when I happen to have a NaN bug I'm actually glad I can
track it down so easily thanks to its stickyness.
There are lot of things I'd want out of D floating point way
before that:
- A way to warn for downcasts from double to float like -vtls.
Domain-specific use but very much relevant.
- Making "fast math" options illegal, as they are enticing, vague
and very dangerous.
- `real` could disappear, again this has been debated for days
with no point. It doesn't hurt eigher to be here... just line NaN
init.
More information about the Digitalmars-d
mailing list