It's been rumoured that Christopher Browne said:
> > > > > 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."
> > 
> > But there are cases where you might want to display more decimels,
> > e.g converting from italian lira to whatever, or yen, etc. 
> > I'd award bonus points to something that made this configurable
> > per-account basis.
> 
> The effects are unfortunately pretty sweeping; every place where you 
> manipulate a currency amount, you have potentially to rewrite it to use a 
> function, whether
> add (&dest, a, b), mult (&dest, amt, scalar), or whatever.

No no no. Misunderstanding.  The innards of the engine currently use
double-precision float point math.  I convinced myself (and you should
do likewise) that this is enough even for billionaires to get sub-penny
accuracy.  If/when a bank writes in to tell me they're running thier 
overnight repurchase agreements on gnucash, well, then I'll consider
arbitrary-precision math patches.  But that's not the point.

xaccPrintAmount is used to create i18n'ed strings that are used in the
GUI.   It inserts e.g. commas after every three digits, tacks on a
currency symbol.  It makes sense to update these to print a few more 
decimal places on such occasions as when it might be called for.

--linas


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

Reply via email to