formatting of currency values in kmmsplits table

Chris DeveloperChris at rebel.com.au
Tue Nov 15 21:55:38 GMT 2022


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


More information about the KMyMoney-devel mailing list