Proposal for modifying gnucash to use exact quantities

Richard Wackerbarth
Fri, 28 Jul 2000 12:24:53 -0500

On Fri, 28 Jul 2000, Bill Gribble wrote:
> On Fri, Jul 28, 2000 at 08:14:47AM -0500, Christopher Browne wrote:
> > Unfortunately, all Bill has provided is a way of representing and
> > manipulating rational values.
> >
> > But I don't think it represents what people really need to do with
> > _financial amounts_.
> >
> > Once we get that library, the conclusion is liable to be:
> > "Well, now let's build something that works with transactions, and
> > adds, prices, and values them."
> Chris, I'm looking at this problem from a different perspective.
>   - I am trying to fix the problem that gnucash has with representation
>     of numbers.  We can get incorrect results, which is not acceptable.

All you need to do that is switch to some form of integer amounts of SCU.
and associate a formatting routine to display the result in a different unit.

>   - I am NOT trying to re-architect gnucash at this point.  I want to
>     make the minimally-invasive set of changes to correct this problem
>     in a reasonable way.

There is SOME rearchitecting necessary to eliminate the assumption that 
"price" * "quantity" exactly equals "value" at all times. Right now, there 
are places that hinge on the price rather than accept the slight errors due 
to roundoff.

>   - As a side effect, I want the set of changes I make to have as
>     much usefulness outside of gnucash as possible.

Useful for what? Your proposal is certainly more cumbersome than plain 
rational arithmetic routines. OTOH, it does not go far enough to implement 
the real financial operations.

> The library I have developed is making it easy (if tedious) to fix
> gnucash.  Trust me, because I am ACTUALLY DOING IT.  I don't think
> anyone else on the list has the time or interest to actually supply
> the elbow grease.  Fairly or not, I feel that the fact that I am doing
> the work gives my opinion a bit more weight.
> I respect your opinions about this, and I know that my irritation with
> RKW 

I assure you that the irritation is mutual. For the first, your attitude has 
been "damn the facts", I'm going to do it this way.