Terry Boldt wrote:
>
> >
> > > 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?
I know at least one exeption: italian lira, they don't have decimal places
at all.
> > 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.
> >
> > --
> See my correction in another email - actually the test should be to the
> smallest currency unit. A global variable that would contain the smallest
> currency unit for the current currency is really all that is necessary - at
> least for what I'm doing. As a general rule, I'm not qualified to comment. If
> the test is to be made against any account then the absoulte value(s) should be
> used.
There is a guile list with currency names and currency symbols. May be
we could extend this list with the number of decimal places per currency
and other related information. The number of decimal places is e.g. also
needed for correct rounding in currency conversion. I will need this,
when I do some more work for EURO support, but this will not be before
July.
Herbert.
--
Herbert Thoma
FhG-IIS A, Studio Department
Am Weichselgarten3, 91058 Erlangen, Germany
Phone: +49-9131-776-323
Fax: +49-9131-776-399
email: [EMAIL PROTECTED]
www: http://www.iis.fhg.de/
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]