{"id":8621,"date":"2014-03-28T17:22:42","date_gmt":"2014-03-28T21:22:42","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=8621"},"modified":"2014-03-28T17:22:42","modified_gmt":"2014-03-28T21:22:42","slug":"floating-point-2","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/03\/28\/floating-point-2\/","title":{"rendered":"Floating Point"},"content":{"rendered":"<p><a href=\"http:\/\/docs.oracle.com\/cd\/E19957-01\/806-3568\/ncg_goldberg.html\">David Goldberg&rsquo;s<\/a> &ldquo;What Every Computer Scientist Should Know About Floating-Point Arithmetic&rdquo; (via <a href=\"http:\/\/edgecasesshow.com\/083-floating-point-numbers-are-a-leaky-abstraction.html\">Edge Cases<\/a>):<\/p>\n<blockquote cite=\"http:\/\/docs.oracle.com\/cd\/E19957-01\/806-3568\/ncg_goldberg.html\"><p>Floating-point arithmetic is considered an esoteric subject by many people. This is rather surprising because floating-point is ubiquitous in computer systems. Almost every language has a floating-point datatype; computers from PCs to supercomputers have floating-point accelerators; most compilers will be called upon to compile floating-point algorithms from time to time; and virtually every operating system must respond to floating-point exceptions such as overflow. This paper presents a tutorial on those aspects of floating-point that have a direct impact on designers of computer systems. It begins with background on floating-point representation and rounding error, continues with a discussion of the IEEE floating-point standard, and concludes with numerous examples of how computer builders can better support floating-point.<\/p><\/blockquote>\n<p><a href=\"http:\/\/www.cs.berkeley.edu\/~wkahan\/ieee754status\/754story.html\">William Kahan<\/a>:<\/p>\n<blockquote cite=\"http:\/\/www.cs.berkeley.edu\/~wkahan\/ieee754status\/754story.html\"><p>Those pioneers deserve our admiration because  IEEE 754  is difficult\n    to build.  Its interlocking design requires every micro-operation to be\n    performed in the right order or else it may have to be repeated.  Maybe\n    some implementations conformed only because their project managers had\n    ordered their engineers to conform as a matter of policy and then found\n    out too late that this standard was unlike those many standards whose\n    minimal requirements are easy to meet.  Anyway,  a year before it was\n    canonized,  IEEE 754-1985  had become a  <i>de facto<\/i>  standard,  the\n    best kind.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>David Goldberg&rsquo;s &ldquo;What Every Computer Scientist Should Know About Floating-Point Arithmetic&rdquo; (via Edge Cases): Floating-point arithmetic is considered an esoteric subject by many people. This is rather surprising because floating-point is ubiquitous in computer systems. Almost every language has a floating-point datatype; computers from PCs to supercomputers have floating-point accelerators; most compilers will be called [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[669,71],"class_list":["post-8621","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-floating-point","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=8621"}],"version-history":[{"count":0,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8621\/revisions"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=8621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=8621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=8621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}