I’ve encountered several NaNs over the years in the normal course of using various websites and apps. I’ve only documented two of them: one in a media player, and one in a podcast app. I recently ran into another one using a loan calculator website. Rather than reporting on just that one, I decided to look for more and report on anything I found all at once.
I found many more errors — NaNs, but also infinites, negative numbers, and one called “incomplete data”, whatever that means — all on websites within the top Google search results for “loan calculator”. All I had to do to elicit these errors was to enter large numbers. (And in one case, simply including a dollar sign.) All of the errors arise from the use of floating-point arithmetic combined with unconstrained input values. Some sites even let me enter numbers in scientific notation, like 1e308, or even displayed them as results.
Here are screenshots of seven sites:
Site 1
NaN
Negative
Site 2
NaN
Scientific notation and Infinity
Site 3
A table of NaNs
Site 4
Infinity, infinity, and infinity
Site 5
Scientific notation and NaN
Scientific notation, NaN, and infinity
Scientific notation, infinity, and “incomplete data”
Site 6
Infinity and NaN
Infinity and infinity
Site 7
Scientific notation
Negative

(Cookies must be enabled to leave a comment...it reduces spam.)