Hacker News new | ask | show | jobs
by dnautics 3369 days ago
>is the lack of NaNs seems like a bug rather than a feature.

I think this is a reasonable concern. I'll propose to John that we make there be an optional "mode" where the infinity token is treated as "NaN". In reality, this mode just amounts to "ignore NaN traps", because the way that it's done in my hardware models, it requires almost no extra hardware.

1 comments

What if we want both NaN and infinity?
if you really want both, then either 1) use IEEE floats or 2) write your own data type, or 3) used a boxed data type, which is really the best solution for the dominant "missing data" abuse case anyways.