On Thu, 15 Jun 2000, Hendrik Boom wrote:
> > Each currency has its own "primitive" amount and all transactions are
> > conducted in terms of that unit. Prices are often expressed to a higher
> > precision or as a rational fraction of that unit.
>
> This suggests that we should be storing integers that indicate
> how many of the primitive amount are to be used.  For US$ this would
> be an exact count of pennies.

I believe that this is the correct approach.

> The range of integers must be greater than 32-bits, because
> that would limit amounts to about #40,000,000.00.

You are correct. 32 bits are inadequate. It would be sufficient for MY 
personal accounts :-( ....
but not those of Mr. Gates.

> So the obvious type is int64

Or we can "roll our own" with a money struct.

In cases like this, C++ does have its advantages over C. But we can work 
around it.

> Thus, for display
> purposes, we may have to know the primitive amount for each currency as
> well as the format to be used.

Correct.

> I've always been doubtful about the use of floating point by gnucash.

Likewise.

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


Reply via email to