NaNs, Infinities, and Negative Numbers In Loan Calculators

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.

Floating point error in loan calculator


Here are screenshots of seven sites:

Site 1

NaN

Floating point error in loan calculator

Negative

Floating point error in loan calculator

Site 2

NaN

Floating point error in loan calculator

Scientific notation and Infinity

Floating point error in loan calculator

Site 3

A table of NaNs

Floating point error in loan calculator

Site 4

Infinity, infinity, and infinity

Floating point error in loan calculator

Site 5

Scientific notation and NaN

Floating point error in loan calculator

Scientific notation, NaN, and infinity

Floating point error in loan calculator

Scientific notation, infinity, and “incomplete data”

Floating point error in loan calculator

Site 6

Infinity and NaN

Floating point error in loan calculator

Infinity and infinity

Floating point error in loan calculator

Site 7

Scientific notation

Floating point error in loan calculator

Negative

Floating point error in loan calculator

Dingbat

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

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

Copyright © 2008-2024 Exploring Binary

Privacy policy

Powered by WordPress

css.php