[GNC] Precision in exchange rate conversion

John Ralls jralls at ceridwen.us
Wed Feb 19 23:01:49 EST 2020


That's not mangling the data, it's presenting the exact value of 11102.12/1975.10, a number that isn't representable as a decimal without rounding.

As for the display being clever, of course it isn't, it's a computer.
But it you enter the two values 11102.12 and 1975.10 GnuCash shouldn't change them, it should just calculate the ratio and present that as the price, either exactly as 5 + 61331/98755 or as  5.621041972558352 rounded to however many decimal places. When I test that, it's exactly what I get, see the attached screen shot. Note the exact exchange rate in the exchange rate box but the rounded decimal values to the right of it.

Regards,
John Ralls

> On Feb 19, 2020, at 12:12 PM, Paul Abraham <paul at acasa.org.uk> wrote:
> 
> Hmm. That seems to work, but it certainly isn't what I want. The
>   exchange rate is now shown as "5 + 61331/98755" which is less than
>   helpful - it most certainly is not how real world exchange rates are
>   quoted, and it makes comparison almost impossible!
> 
>   Why does the display option mangle the data? That isn't very clever. I
>   think I'll just stick in a fudge factor as a separate split to correct
>   the total though it's a long way from ideal.
> 
>   Thanks very much for the answer, though. I can stop chasing moonbeams
>   now ;-)



More information about the gnucash-user mailing list