# Housing mortgage rounding error

By Murray Bourne, 22 Sep 2006

Matt, one of the users of Interactive Mathematics said...

Hey there i was using your calculator for mortgage and there seems to be some sort of mistake in the code, i was testing mine against yours and getting different answers then i looked up at what the monthly payment is supposed to be in your math equation and i noticed it was .16 instead of the .92 that your get in your calculator just so you know! so your other numbers are off by about 200!

My response to Matt was...

Hi Matt. Thanks a lot for your feedback - much appreciated. Yep - there is a problem in there - maybe it was a rounding error in the Flash file, since the .16 at the top is correct. But as I said on the page, banks will find a way to charge you more, so whatever we calculate, we can guarantee the amount they charge will be higher!

I do like this sort of feedback. It means that users are trying to figure out the mathematics and are willing to let me know of a problem.

Anyway, it was a rounding error as anticipated. I had rounded the monthly interest amount to the nearest cent and then used that amount later in the code. Leaving it at full accuracy fixed the problem.

I also took it as an opportunity to tidy up the Flash interactive.

Here is a screen shot of what we are talking about:

Be the first to comment below.