Proposal for modifying gnucash to use exact quantities

Richard Wackerbarth
Sat, 29 Jul 2000 09:40:54 -0500

On Sat, 29 Jul 2000, Bill Gribble wrote:
> On Sat, Jul 29, 2000 at 01:30:05PM +0100, Steven Murdoch wrote:
> > It seems clear to me that there are many occasions where a value is
> > stored, and it's only permissable values are integers (things like
> > number of shares, bank balance, number of accounts etc...). Bill's API
> > is clearly sufficient for this purpose and already has the required
> > functions to accomodate this, simply by setting the denominator to be
> > one.
> Not exactly.  Bank balances are stored as a denominated integer
> (rational).  The currency of, for example, a US bank account is US
> dollars, so the balance of the account is a balance in US dollars, not
> any other unit (such as, for example, pennies).  The *denomination* of
> the account balance is pennies (1/100 of a US dollar) and the value
> that's stored has a denominator of 100.

That is one interpretation. An equally valid view is that the denomination is 
cents and the balance is displayed in dollars. There is no requirement that 
the implementation match any particular view. It is only necessary that the 
implementation be capable of representing that view in an accurate manner.