{"id":473,"date":"2016-02-03T10:43:25","date_gmt":"2016-02-03T10:43:25","guid":{"rendered":"http:\/\/wphost.spider-e.com\/?p=473"},"modified":"2016-02-06T11:19:53","modified_gmt":"2016-02-06T11:19:53","slug":"calculator-in-apples-os-x-el-capitan-cannot-perform-basic-maths","status":"publish","type":"post","link":"https:\/\/wphost.spider-e.com\/?p=473","title":{"rendered":"Calculator in Apple&#8217;s OS X El Capitan cannot perform basic maths!"},"content":{"rendered":"<p>I have discovered that the Calculator app that ships with OS X El Capitan\u00a0cannot do some pretty basic programmer&#8217;s maths. Being able to add and subtract in Base 10 (decimal) and Base 16 (Hexadecimal) is a pretty basic requirement of any programmer&#8217;s calculator. Developers use these number systems all day long, and the Calculator App in Mavericks does claim to be able to. Except it can&#8217;t do the most basic subtraction.<\/p>\n<p>Lets start with a pretty basic example in decimal. Open the calculator app and make sure it&#8217;s in &#8220;basic&#8221; mode. (CMD+1). The try this sum:<br \/>\n<strong>0 &#8211; 5 = ?<\/strong> the answer is -5, and the calculator gets this one right!<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-474 size-full\" src=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.29.36.png?resize=235%2C323\" alt=\"Screen Shot 2016-02-03 at 10.29.36\" width=\"235\" height=\"323\" srcset=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.29.36.png?w=235&amp;ssl=1 235w, https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.29.36.png?resize=218%2C300&amp;ssl=1 218w\" sizes=\"auto, (max-width: 235px) 100vw, 235px\" \/><\/p>\n<p>Now, with the answer still showing press CMD+3 to take it to programmer&#8217;s mode. You should see the display change to 0xFFFFFFFFFFFB &#8211; which is correct &#8211; that&#8217;s how you show -5 in 64-Bit Hexadecimal. Good so far! <em><strong>(click any image for a full view)<\/strong><\/em><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.32.49.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-475 size-thumbnail\" src=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.32.49.png?resize=150%2C150\" alt=\"Screen Shot 2016-02-03 at 10.32.49\" width=\"150\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.32.49.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.32.49.png?resize=120%2C120&amp;ssl=1 120w, https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.32.49.png?zoom=2&amp;resize=150%2C150 300w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>OK, so now hit the AC button to clear everything and we&#8217;ll try again, this time starting in Programmer&#8217;s mode.<\/p>\n<p>Enter the same sum again <strong>0 &#8211; 5 =<\/strong> and what answer do you get? You will get 0x7FFFFFFFFFFF &#8211; which is totally wrong. It&#8217;s not even one of those &#8220;<em>oh I see what it did<\/em>&#8221; type of wrongs, it&#8217;s just plain old wrong.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.36.02.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-476 size-thumbnail\" src=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.36.02.png?resize=150%2C150\" alt=\"Screen Shot 2016-02-03 at 10.36.02\" width=\"150\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.36.02.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.36.02.png?resize=120%2C120&amp;ssl=1 120w, https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screen-Shot-2016-02-03-at-10.36.02.png?zoom=2&amp;resize=150%2C150 300w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>And just for fun, the same thing in Windows 10&#8217;s new calculator app..<br \/>\nOh look, it gets it right!<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screenshot-2016-02-03-10.38.59.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-477 size-thumbnail\" src=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screenshot-2016-02-03-10.38.59.png?resize=150%2C150\" alt=\"Screenshot 2016-02-03 10.38.59\" width=\"150\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screenshot-2016-02-03-10.38.59.png?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screenshot-2016-02-03-10.38.59.png?resize=120%2C120&amp;ssl=1 120w, https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screenshot-2016-02-03-10.38.59.png?zoom=2&amp;resize=150%2C150 300w, https:\/\/i0.wp.com\/wphost.spider-e.com\/wp-content\/uploads\/2016\/02\/Screenshot-2016-02-03-10.38.59.png?zoom=3&amp;resize=150%2C150 450w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>For the above tests, the most recent publicly available released version of OS X El Capitan 10.11.3 was used.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have discovered that the Calculator app that ships with OS X El Capitan\u00a0cannot do some pretty basic programmer&#8217;s maths. Being able to add and subtract in Base 10 (decimal) and Base 16 (Hexadecimal) is a pretty basic requirement of any programmer&#8217;s calculator. Developers use these number systems all day long, and the Calculator App [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4,7,55,3],"tags":[],"class_list":["post-473","post","type-post","status-publish","format-standard","hentry","category-general","category-mac","category-musings","category-software"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p42WEU-7D","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=\/wp\/v2\/posts\/473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=473"}],"version-history":[{"count":2,"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=\/wp\/v2\/posts\/473\/revisions"}],"predecessor-version":[{"id":479,"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=\/wp\/v2\/posts\/473\/revisions\/479"}],"wp:attachment":[{"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wphost.spider-e.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}