{"id":175,"date":"2007-09-18T08:53:57","date_gmt":"2007-09-18T12:53:57","guid":{"rendered":"http:\/\/cherrycoated.com\/wordpress\/?p=175"},"modified":"2007-09-18T08:53:57","modified_gmt":"2007-09-18T12:53:57","slug":"getting-to-two-decimal-places-with-java","status":"publish","type":"post","link":"http:\/\/www.webliminal.com\/webliminalblog\/interesting-web-sites\/getting-to-two-decimal-places-with-java","title":{"rendered":"Getting to two decimal places with Java"},"content":{"rendered":"<p><a href=\"http:\/\/webliminal.com\/images\/sidepics\/sp79.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/webliminal.com\/images\/sidepics\/cwdata\/sp79.jpg\" align=\"left\" height=\"120\" hspace=\"20\" vspace=\"10\" width=\"160\" \/><\/a> A student wrote in today asking about using Math.round() and getting results to two decimal places. Two links  that describe the old multiply by 100 and then divide by 100 method are<\/p>\n<ul>\n<li>From Sun Developer Forums, <a href=\"http:\/\/forum.java.sun.com\/thread.jspa?threadID=545068&amp;tstart=45\">http:\/\/forum.java.sun.com\/thread.jspa?threadID=545068&amp;tstart=45<\/a><\/li>\n<li>From <a href=\"http:\/\/mindprod.com\/jgloss\/jgloss.html\">Roedy Green\u00e2\u20ac\u2122s <strong>Java<\/strong> &amp; Internet Glossary<\/a>,  <a href=\"http:\/\/mindprod.com\/jgloss\/round.html\">http:\/\/mindprod.com\/jgloss\/round.html<\/a><\/li>\n<\/ul>\n<p>And here is  one that describes displaying a result to two decimal places, rounded or not,  <a href=\"http:\/\/www.gamedev.net\/community\/forums\/topic.asp?topic_id=390114\">http:\/\/www.gamedev.net\/community\/forums\/topic.asp?topic_id=390114 <\/a><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>A student wrote in today asking about using Math.round() and getting results to two decimal places. Two links that describe the old multiply by 100 and then divide by 100 method are From Sun Developer Forums, http:\/\/forum.java.sun.com\/thread.jspa?threadID=545068&amp;tstart=45 From Roedy Green\u00e2\u20ac\u2122s Java &amp; Internet Glossary, http:\/\/mindprod.com\/jgloss\/round.html And here is one that describes displaying a result to [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12],"tags":[],"class_list":["post-175","post","type-post","status-publish","format-standard","hentry","category-interesting-web-sites","category-teaching"],"_links":{"self":[{"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/posts\/175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":0,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}