Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not true for any of the finanical systems I've worked for the credit/derivatives/FI/etc desks of some of the largest investment banks down to the systems for the virtual card e-money issuer in the UK that I founded.



Derivatives are generally subject to some fairly large uncertainty in valuation, for example bid/offer spreads are usually many orders of magnitude larger than floating point error. When the derivative expires it does have some very fixed value but the investment bank will have made enough money off the trade to "generously" round up the float to the nearest cent.


Profit/margin was not larger than the ulp for single-precision float values for derivatives by the time I got there, so we all were using doubles.

The rounding-for-settlement issue that you describe is, I think, separate.


Single precision ulp is one part in ten million? I'm not sure which derivatives you worked with but that's an exceptionally small profit margin. For most derivatives a margin of one part in ten thousand would be considered small.


They use integers to store cents or fraction of cents, and that's it (or the equivalent of MySQL "DECIMAL" format if not using integers)


When you say "they" I could tell you exactly what format we stored card balances in, including the implied point position for different currencies (not the same for GBP and (say) JPY) and none of it involved DECIMAL!


> They use integers to store cents or fraction of cents or DECIMAL as alternative if not using integers

Seemed rather clear, what's difference with what you say ?


I referred to 'they' for my clients and start-up. You seemed to be making claims about those particular implementions, which seemed a bit odd.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: