Just found this: https://trulyfinancial.com/blog/lowest-currencies-2022/ The Indonesian rupiah is apparently only the third weakest currency in the world with 14,365.5 to the dollar. The Iranian Rial is 42,250 to the dollar, but at 1/3 the value of the rupia, it looks like ten digits should still be enough.

On 2022.11.15 16:55, Chris via KMyMoney-devel wrote:
Good point I hadn't considered currency exchange.

This is why you ask why something  was implemented that way and not assume its unnecessary.

Yes I am talking to you Elon ;)

Chris

On 16/11/2022 2:12 am, Thomas Baumgart via KMyMoney-devel wrote:
On Dienstag, 15. November 2022 09:08:44 CET Chris via KMyMoney-devel wrote:

Thanks

I have always used integer's, never floats or doubles, I realised back in the 90's that was a mistake when implementing credit card transactions.
Rounding errors bite hard.

I have always decided at the start of a project what was the maximum
precision needed, usually 2 decimal places but occasionally more. I can see with kmymoney 4 digits is the best because I believe that is normal for
shares. however I don't do shares so I could be wrong.

Just looked it up, shares below $1.00 is to 4 decimal places, 2 places
otherwise.

I can see storing it using numerator denominator is more flexible.
4 digits is not enough if it comes to currency exchange. We do have a user that converts between (I believe) Indonesian Rupia and Euros a lot and needs at least 10 digits of precision for the price to get correct results.

Reply via email to