On Tue, 13 Jun 2000, Rob Browning wrote:
> John Hasler <[EMAIL PROTECTED]> writes:
> > I also suggest that you make it EPSILON instead of .001 and define
> > EPSILON in some header file.  Please don't hard code constants.
>
> Actually, I'd much rather see something like a
>
>   (gnc:currency-zero? currency x)
>
> that would know the appropriate epsilons in each case if we're really
> going to cut things as close as 0.001.  i.e. are 1/100ths the smallest
> denomination in all currencies?
>
> Alternately, we could just have a global gnc:*currency-zero-epsilon*
> and set it to something *really* small like 0.0000000001 or whatever,
> but then we should document this assumption pretty clearly.

I wouldn't worry too much about this approach. You will eventually come 
around to the realization that you MUST count everything in integers.

Assume that I go into the store each day and purchase two widgets.
They are priced at "3 for a dollar".

After the third day, I will have 6 widgets worth exactly $2.00.
However, they will have cost me 3 x $0.67 = $2.01.

The accountants will INSIST that you maintain the distinction.

--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to