On Sun, 17 Oct 1999 21:02:47 CDT, the world broke into rejoicing as
[EMAIL PROTECTED]  said:
> It's been rumoured that Grant Likely said:
> > 
> > I'm having a little difficulty navigating the source, and I was
> > wondering if somebody could give me a hand.
> > 
> > I have some CIBC mutual funds, and would like to track them using
> > GnuCash.  Unfortunatly the price, bought and sold fields display/accept
> > only three decimal places, and my CIBC funds are reported with a
> > precision of 5 decimal places.  Where should I start looking to modify
> > GnuCash to accept and display higher precision values?
> 
> xaccPrintAmount in src/engine/util.h

This is, indeed, an example of a field that probably does need to
be able to vary substantially from "2 decimals precision."

I'd almost think that the price field should be represented as 
two int values, those two values being treated as a fraction.

<mathematical soapbox>
It somewhat annoys me that the markets are moving to "decimalization"
when the traditional "powers of 2" units (8ths, 16ths) are so wonderfully
convenient for use with binary operations.  After all, 0.1 decimal works
out to, in binary, 0.00011001100110011... (with repeating sequences after
that), which is precisely why decimal floating point calculations head
"off" fairly quickly.
</mathematical soapbox>

(The Even Cooler Idea would be to use continued fractions, but everyone is
*certainly* allowed to trash that idea as ludicrously impractical... That
only works if we rewrite the whole thing in CL  :-)).

--
"Besides, I  think [Slackware]  sounds better than  'Microsoft,' don't
you?"  -- Patrick Volkerding
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/canada.html>

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

Reply via email to