Proposal for modifying gnucash to use exact quantities

Jason Rennie jrennie@ai.mit.edu
Tue, 01 Aug 2000 09:39:20 -0400


rkw@dataplex.net said:
> 1) Your API does not hide the implementation details. If we change the
>  representation of an amount, many calls will have to be changed
> rather than  localizing the changes to the "math" routines. 

The "constructor" will obviously need to be changed.  The 
gnc_numeric_convert routines will need to be changed, but they are 
specific to the storage type anyway.  The GCF reduction and conversion 
routines would need to be changed, but they need to be specific to 
gnc_numeric.  What else would need to be changed?

rkw@dataplex.net said:
> 2) The "denominator" may need to be the reciprocal of an integer
> greater than  unity. 

Since the denominator should never be negative or zero if it is acting 
in its normal role, we could say that a negative denominator acts as a 
reciprocal of the absolute value of that number.  Richard, what would 
you propose?

rkw@dataplex.net said:
> 3) There are no constraints to assure that the results remain in the
> allowable domain of values. 

Could you be more specific?  Using GNC_DENOM_FIXED would ensure that 
the denominator wouldn't change.  I don't see the reason for the 
criticism here.

Jason D Rennie                      www.ai.mit.edu/~jrennie/
MIT:  (617) 253-5339                      jrennie@ai.mit.edu
MITRE: (781) 271-7249                      jrennie@mitre.org