Proposal for modifying gnucash to use exact quantities

Buddha Buck
Sun, 30 Jul 2000 16:08:07 -0400

> said:
> > I am not aware that anyone has suggested that there be a "universal"
> > denominator.
> The talk of having everything represented in "ergs" was be an example 
> of using a "universal" denominator.

Based on the two postings concerning the "erg" as a fundamental unit, 
my feeling is that while it may have certain theoretical merit for 
compensating for inflation when performing historical or future 
analysis, from an accounting standpoint its flaws are too great to 
consider using.  First off, nobody uses it.  Second, as a denominator, 
it's way too fine-grained.  Third, it is purely exchange-rate based, 
and assumes exchange rates are consistent -- which, without the 
dilligent (and profitable) efforts of currency arbitrageurs, they 
> said:
> > Therefore it is unnecessary  to carry that denominator with the
> > individual values. It can be retrieved  from the description of the
> > units in those very few places where it actually  gets used.
> Yup.  Makes sense.  One denominator per currency should be plenty.

I have my doubts about that...  Historical analysis and keeping track 
of prices may involve the use of multiple denominators for a currency 
(US Stock prices have been traditionally priced in 1/8ths of dollars, 
British currency used to have 240 pence/pound (or even 960 
farthing/pound).  Even today, a GnuCash user might have two accounts 
for a single stock:  Stock kept on the "street" for easy trading, 
denominated in single shares, and stock kept in a DRiP (Divident 
Reinvestment Program) account, denominted in 1/1000ths of a share.

How multiple denominators for the same base currency should be dealt 
with is (to me) and open question.
> said:
> > Similar analysis of the "exchange" function will show that you only
> > need the  numerators to do a currency conversion. 
> No.  You do need the denominator.  Let's say that I'm converting 1 USD to
> Italian Lira (for example).  The denominator for USD is 100.  The
> denominator for Lira is 1.  The exchange rate is 1000 Lira for 1 USD.  

The exchange rate would best be expressed in terms of the SCU for the 
currency: cents for USD, Lira for Lira.  Therefore, the exchange rate 
is 1000 Lira for 100 cents.

> The 1 USD will be internally represented as 100.  If I use your equation:
> said:
> > integer N2 (of currency C2) = convert_to_integer (N1 * C2 / C1) 
> I get N2 = 100 * (1000/1) = 100,000.  Too many Lira!  The real equation
> is:

I get N2(Lira) = 100(cents) * 1000(lira)/100(cents) = 1000 Lira.  Works 
for me.

>   N2 = (N1/D1) * (rate) * D2
> where N1 is the numerator for the first currency, D1 is the denominator 
> for the first currency, "rate" is the exchange rate, N2 is the numerator for 
> the second currency and N2 is the numerator for the second currency.  In 
> your USD/Mexican Pesos example, it just so happened that D1=D2=100 so you 
> could safely throw out the denominator terms.

Having D1=D2=100 muddled the issue, which was that the exchange rate 
was quoted in terms of the SCU:  1000 cents = 10523 centavos.  Had he 
quoted an exchange rate between (say) USD and pre-decimalized UKP, then 
it would have been clearer.

Using that example, if the exchange rate is USD2.534 = UKP1.000, we 
have an exchange rate of 2534 cents = 2400 pence.  Based on this, $25 
would be:

     N2(pence) = 2500(cents) * 2400(pence)/2534(cents) = 2368(pence)

Or 9 pound, 17 shilling, 3 pence.  UKP25 would be:
     N2(cents) = 6000(pence) * 2534(cents)/2400(pence) = 6335(cents)

or $63.35.

Since this calculation is only used to express an estimate, and won't 
actually be booked, the rounding details can be ignored.


     Buddha Buck                   
"Just as the strength of the Internet is chaos, so the strength of our
liberty depends upon the chaos and cacophony of the unfettered speech
the First Amendment protects."  -- A.L.A. v. U.S. Dept. of Justice