Live data from Hacker News

64-bit bank balances ‘ought to be enough for anybody’?

tigerbeetle.com

371–372 of 372 posts

Re: 64-bit bank balances ‘ought to be enough for anybody’?

#371

Earlier quoted context omitted.

I honestly don't understand the argument here or the parent comment makes. Why is a BCD decimal 128 worse at math then a fixed point integer? You are saying it is more CPU efficient? Are you saying some operations with fixed point integer math operations are more accurate then dec128? I've seen this asserted several times, both in the post and in comments, but I've never seen a single concrete example of it being bet…

Do you know what BCD is? If you did, it becomes pretty obvious why BCD is significantly slower than fixed point integers.

I know what BCD is, I know they are slower.

What I was asking for is, when they said it was just "better", are they specifically saying "CPU computations is a bottleneck, thus BCD is not as good as fixed point integers"? Which is fine if it is, I just would like that to be stated clearly. In my line of work, BCD CPU is NEVER the bottleneck, it never will be, and it is likely that the time it takes for a CPU to compute the BCD operation it will still be stalling on pref etching the next instruction from main memory anyway.

But maybe, for their specific ledger specific database, it is better. If so, show the benchmark, and how it impacted their specific code. But don't expect me to just take fewer CPU instructions for math operations to directly translate to more desirable.

Re: 64-bit bank balances ‘ought to be enough for anybody’?

#372

Earlier quoted context omitted.

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.
Post reply on HN