Some workaround for reducing rounding error in extreme currencies rates
Frank H. Ellenberger
f.ellenberger at online.de
Tue Dec 4 13:47:29 EST 2007
Hi,
in bugzilla are a few problems reported about currency handling. Today for me,
I solved one of them.
The case:
Assume, I bought 1473680 IDR for 130 EUR.
This is a rate of exactly 11336 IDR/EUR.
If I enter the transaction from my accout cash-EU this looks relative good.
The price editor _displays_ a rate of 0 + 251417/2834000000. Realy in a ratio
of 11336:100 % both numbers can be divided by 4 to become 18336:25 %. The
digits "1417" seems to be some noise or a randem seed ;).
If I press the edit button, it is offering "0 + 1 / 11336", which is the
original rate.
But, ... if I press OK then, I get a rate of 0,000088. This is really not
precise, the inversion would be 11363.63..
My conclusion is: do not use the price editor for currencies. Instead create
and delete a dummy transaction to enter more precise exchange rates.
So my first question is, are there any objections, that the price-editor does
not use the same smart code as xfer-editor for currencies?
2. should the conclusio be published anywhere?
Frank
More information about the gnucash-devel
mailing list