Buffet Overflow
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’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. 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.
Nasdaq’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.
Worth noting that they’re not using integers to store fractional values — what they’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.
Previously:
- Macintosh Y2020
- What Y2K Was Like at Microsoft
- Why Does calloc Exist?
- Integer Overflow Bug in Boeing 787
- Buggy Security Guidance from Apple
- Detecting Overflows, Undefined Behaviour and Other Nasties
- Bentley Overflow Bug