{"id":99165,"date":"2018-07-04T07:00:00","date_gmt":"2018-07-04T21:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/?p=99165"},"modified":"2025-02-16T11:52:00","modified_gmt":"2025-02-16T19:52:00","slug":"20180704-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20180704-00\/?p=99165","title":{"rendered":"The Windows Calculator no longer generates tiny errors when calculating the square root of a perfect square"},"content":{"rendered":"<p>Some time ago, I explained why <a href=\"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20160628-00\/?p=93765\">the Windows Calculator generates tiny errors when calculating the square root of a perfect square<\/a>.<\/p>\n<p>Good news! <a href=\"http:\/\/aka.ms\/parzival\"> Square roots of perfect squares are now exact<\/a>!<\/p>\n<p>In fact, it&#8217;s more than just square roots of perfect squares. Perfect cube roots of perfect cubes are also exact. In general, rational roots and powers of integers will come out exact if the result is an integer. For example, raising 8 to the \u2154 power will produce 4 exactly.<\/p>\n<p>Getting the exact result is considerably more computationally expensive, but the calculator is not a performance-sensitive program. If calculating the \u2154 power of a number takes an extra 10 milliseconds, nobody will care.<\/p>\n<p>When the Calculator team announced this change at an internal event, they wore custom-made T-shirts that said<\/p>\n<blockquote class=\"q\" style=\"padding: 0; width: 10ex;\"><p>\u22121.06828<br \/>\n1969439<br \/>\n142e\u221219<\/p><\/blockquote>\n<p><b>Update<\/b>:<\/p>\n<blockquote class=\"twitter-tweet\">\n<p dir=\"ltr\" lang=\"en\">We have extra shirts <a href=\"https:\/\/t.co\/4FePvAX5T6\">https:\/\/t.co\/4FePvAX5T6<\/a><\/p>\n<p>\u2014 Johan Laanstra (@jplaanstra) <a href=\"https:\/\/twitter.com\/jplaanstra\/status\/1014588660635717632?ref_src=twsrc%5Etfw\">July 4, 2018<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Tweaking the algorithm.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[104],"class_list":["post-99165","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-tipssupport"],"acf":[],"blog_post_summary":"<p>Tweaking the algorithm.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/99165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=99165"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/99165\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=99165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=99165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=99165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}