News for hackers. Stuff that matters.
Re:Berkshire Hathaway’s stock price is too high for Nasdaq c... by lyrrad on Wednesday May 05, 2021 @12:50AM (#27046308)
It looks like the smallest increment before decimalization was 1/16 of a dollar, or $0.0625, which could be represented exactly in 4 decimal places. So, by storing the value of the stock to this precision, both old and new prices could be stored in this format.
Re:Berkshire Hathaway’s stock price is too high for Nasdaq c... by tspiteri on Wednesday May 05, 2021 @04:44AM (#27047603)
In that case they can store quarters of a cent instead of hundredths of a cent, and still be able to store $0.0625, while increasing their range by a factor of 25.
Re:Berkshire Hathaway’s stock price is too high for Nasdaq c... by cout on Wednesday May 05, 2021 @05:07AM (#27047742)
I'm trying to remember how we used to store it -- decimalization was 20 years ago this year!

I think we had a discriminant for the denominator, so it wasn't a rational type, but we could also easily represent both fractional and decimal prices. We could handle fractions smaller than 1/16, though I don't know if any equities traded at such prices. What you suggest would also be reasonable, but would have had to be rewritten when decimalization happened.