Proposal for modifying gnucash to use exact quantities

Richard Wackerbarth
Sun, 30 Jul 2000 11:58:19 -0500

On Sat, 29 Jul 2000, Terry wrote:
> On Fri, 28 Jul 2000, you wrote:
> > > I haven't seen a
> > > similar single discription and corresponding implementation on your
> > > proposal.
> >
> > I haven't made it in that form because it is too trivial.

> > At the level of Bill's proposal, I have:
> >
> > typedef gnc_amount; ANY representation of integers what satisfies the
> > dynamic range required for a particular use.  Note that I, personally,
> > will never
> ..

> > As I have said before, we don't need MATH routines. We need to define
> > FINANCIAL routines. Until those routines are defined, it is premature to
> > attempt to define the precise math routines that are appropriate.
> Then provide the routines that are needed. YOU define them EXACTLY, without
> any ambiguity, such that they can be implemented.

I just did. The implementation is about 10 lines. If it is not *trivially 
obvious*, you don't understand code.

What is needed is a *concensus* as to which API we will use.

> You have argued and argued, now simply go DO IT.
There are massive changes that need to be made in order to correct the 
problems caused by the floating point assumptions in the present 
implementation. There will be NO observed benefit until they are all in place.

> > I am still waiting for Bill, or someone else, to show how his
> > implementation will simplify the actual higher level routines that we
> > need to implement.
> And that seems to be the crux of this matter, you want to argue everybody
> into submission. You cannot do it. The reason the people are on this
> mailing list is because they are independent. You are waiting and arguing
> and NOT DOING.

If you leave it to me, I can assure you that the routines will not use ANY of 
Bill's math API. Having been there before, I believe that there is a better 
method and I will use it.

Also, I have been advocating a DISCUSSION of the financial routines needed.
If you expect me to SPECIFY them in DETAIL, I will design an accounting 
system. But it won't be "gnucash".

> Agreed - Implementing without planning is a disaster.
> But
> Planning without implementation is just as great a disaster.
> As I keep saying, JUST GO DO IT.
> You don't need anyone's permission. Once you have an exact  specification
> and implementation thereof, it can be tested in gnucash, just like Bill's.

No, for the needed routines to work, we will have to make some fundamental 
changes to gnucash. In particular, gnucash is based on the (no longer 
accepted) assumption that quantity * price = amount.

Otherwise, the changes are just foundation work. They accomplish nothing by 

Bill has elected to strike out in his own direction rather than discuss the 
bigger picture. When this discussion started, he claimed that floating point 
was fine. Discussion brought him to realize the flaw in his reasoning and he 
now accepts the need for integers. When he finally looks at the bigger 
picture here, I am confident that he will come to recognize that his design 
could be much simpler.

I, and others, would be happy to assist him in the implementation following 
that simpler design because we believe it will be a proper foundation.

Unfortunately, you cannot have two cooks and he gets veto power :-(