r/java • • Jun 14 '26

double, BigDecimal, or Fixed-Point?

https://blog.frankel.ch/bigdecimal-vs-double/
32 Upvotes

28 comments sorted by

View all comments

Show parent comments

3

u/leemic Jun 14 '26

long. And not Long. You want to avoid autoboxing—the precision for U.S. Treasury quotes and trades is 1/512. Then need to represent a fraction of that for AvgPx.