2 ms·
This came up a ton when I was doing particle filters on mobile. We had optional doubles that were initialized to NaN but NaN isn't a valid value. Being able to
by vlovich123 6y ago
This came up a ton when I was doing particle filters on mobile. We had optional doubles that were initialized to NaN but NaN isn't a valid value. Being able to use optionals instead would be great (to avoid having to backtrace where an accidental NaN propagation may have started from) but the memory hit was impractical. I bet some parts of the science community might need this but the need is so spread out (each individual application) that it might not be as obvious as a popular library identifying the need.
I wish I knew language design & compiler development better & had the time to propose it & see it through.
- conradludgate 6y agoFiniteFloat or NotNaN would be nice additions to the stdlib