Hacker News new | ask | show | jobs
by lyrrad 1875 days ago
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.
1 comments

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.
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.