{"id":32401,"date":"2021-05-06T16:53:40","date_gmt":"2021-05-06T20:53:40","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=32401"},"modified":"2021-05-06T16:53:40","modified_gmt":"2021-05-06T20:53:40","slug":"buffet-overflow","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/05\/06\/buffet-overflow\/","title":{"rendered":"Buffet Overflow"},"content":{"rendered":"<p><a href=\"https:\/\/www.wsj.com\/articles\/berkshire-hathaways-stock-price-is-too-much-for-computers-11620168548\">Alexander Osipovich<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=27044044\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/www.wsj.com\/articles\/berkshire-hathaways-stock-price-is-too-much-for-computers-11620168548\"><p>Berkshire Hathaway Inc. is trading at more than $421,000 per Class A share, and the market is optimistic. That&rsquo;s a problem.<\/p>\n<p>The price has grown so high, it has nearly hit the maximum number that can be stored in one common way exchange computers handle digits.<\/p>\n<p>On Tuesday, Nasdaq Inc. temporarily suspended broadcasting prices for Class A shares of Berkshire over several popular data feeds. Such feeds provide real-time price updates for a number of online brokerages and finance websites.<\/p>\n<p>Nasdaq&rsquo;s computers can only count so high because of the compact digital format they use for communicating prices. The biggest number they can handle is $429,496.7295. Nasdaq is rushing to finish an upgrade later this month that would fix the problem.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/daringfireball.net\/linked\/2021\/05\/05\/berkshire-32-bit-ints\">John Gruber<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=27065853\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/daringfireball.net\/linked\/2021\/05\/05\/berkshire-32-bit-ints\"><p>Worth noting that they&rsquo;re not using integers to store fractional values&#x2009;&mdash;&#x2009;what they&rsquo;re doing is using 10,000ths of a dollar as their integral unit. The decimal gets shifted left by four digits simply to display prices as dollar values, but the math is all done in 10,000ths of a dollar units.<\/p><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/04\/21\/macintosh-y2020\/\">Macintosh Y2020<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2016\/12\/22\/what-y2k-was-like-at-microsoft\/\">What Y2K Was Like at Microsoft<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2016\/12\/07\/why-does-calloc-exist\/\">Why Does calloc Exist?<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2015\/05\/05\/integer-overflow-bug-in-boeing-787\/\">Integer Overflow Bug in Boeing 787<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2014\/04\/20\/buggy-security-guidance-from-apple\/\">Buggy Security Guidance from Apple<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2013\/01\/30\/detecting-overflows-undefined-behaviour-and-other-nasties\/\">Detecting Overflows, Undefined Behaviour and Other Nasties<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2006\/06\/07\/bentley-overflow-bug\/\">Bentley Overflow Bug<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Alexander Osipovich (via Hacker News): Berkshire Hathaway Inc. is trading at more than $421,000 per Class A share, and the market is optimistic. That&rsquo;s a problem. The price has grown so high, it has nearly hit the maximum number that can be stored in one common way exchange computers handle digits. On Tuesday, Nasdaq Inc. [&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":"2021-05-06T20:53:43Z","apple_news_api_id":"f1f227bf-66c9-4357-b880-624de3b32180","apple_news_api_modified_at":"2021-05-06T20:53:44Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A8fInv2bJQ1e4gGJN47MhgA","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":[2],"tags":[131,1195,863],"class_list":["post-32401","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-financial","tag-integer-overflow"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32401","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=32401"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32401\/revisions"}],"predecessor-version":[{"id":32402,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32401\/revisions\/32402"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=32401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=32401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=32401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}