{"id":401,"date":"2006-09-22T15:38:28","date_gmt":"2006-09-22T15:38:28","guid":{"rendered":"http:\/\/www.intmath.com\/blog\/?p=401"},"modified":"2006-12-31T12:45:54","modified_gmt":"2006-12-31T12:45:54","slug":"housing-mortgage-rounding-error","status":"publish","type":"post","link":"https:\/\/www.intmath.com\/blog\/mathematics\/housing-mortgage-rounding-error-401","title":{"rendered":"Housing mortgage rounding error"},"content":{"rendered":"<p>Matt, one of the users of Interactive Mathematics said...<\/p>\n<blockquote>\n<p>Hey there i was using your <a href=\"https:\/\/www.intmath.com\/money-math\/3-math-of-house-buying.php#mortgage_interactive\">calculator for mortgage<\/a> 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! <\/p>\n<\/blockquote>\n<p>My response to Matt was...<\/p>\n<blockquote>\n<p>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!<\/p>\n<\/blockquote>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>I also took it as an opportunity to tidy up the <a href=\"https:\/\/www.intmath.com\/money-math\/3-math-of-house-buying.php#mortgage_interactive\">Flash interactive<\/a>.<\/p>\n<p>Here is a screen shot of what we are talking about:<\/p>\n<p><a href=\"https:\/\/www.intmath.com\/money-math\/3-math-of-house-buying.php#mortgage_interactive\"><img id=\"image403\" src=\"\/blog\/wp-content\/images\/2006\/09\/equity.gif\" alt=\"Equity\" \/><\/a><\/p>\n<p class=\"alt\"><a href=\"#respond\" id=\"comms\">Be the first to comment<\/a> below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A reader of Interactive Mathematics found a rounding error in my Flash-based mortgage calculator.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mo_disable_npp":""},"categories":[4],"tags":[127],"_links":{"self":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/401"}],"collection":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/comments?post=401"}],"version-history":[{"count":0,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/401\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/media?parent=401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/categories?post=401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/tags?post=401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}