Proposal for modifying gnucash to use exact quantities]
Wed, 26 Jul 2000 18:07:36 +0100
Richard Wackerbarth wrote:
> On Tue, 25 Jul 2000, Terry wrote:
> > Actually - yes - the stock are purchased through dividend
> > The dividend is computed to 1/1,000 USD (stock total is carried on
> > books to 1/1,000 and the dividend is computed to 1/1,000 USD per
> > unit.) Thus the transaction value in USD is computed to 1/1,000
> > then purchase additional stock to 1/1,000 stock at the total value
> > in 1/1,000 USD. The whole transaction is carried out "on the
> > cash changes hands, but the transaction value is computed to
> > that is the smallest unit of the transaction that is accounted for.
> > if I sold the stock, I would be paid to within 1/100 USD. But the
> > reinvestment is done to 1/1,000 USD.
> I don't think so. Rather than computing a dividend to the mill and
> from that, I suspect that they either compute "exact" dividend
> and round that to milli-shares and then compute the value to the
> they compute the dividend to the penny and then convert that into
> I would be very interested in seeing a real example that contradicts
I use Gnucash to track my shares, and in the UK shares are quoted in
of a pence, but in every source I have seen they are listed to 2
places (in pence).
I happen to have a prime number of shares, so I often have fractions
when I am calculating the total worth of my investment. I also have a
share investment fund with the same company which I represent with an
equity account, when I buy shares money is transfered from my dealing
account to the precision of 2 decimal places of a penny (i.e. GBP
1/10,000). For this to be represented with no chance of rounding errors
the quantity of shares should be an integer, price an integer number of
1/10,000 of GBP and value should either be calculated as an integer
numebr of 1/10,000 GBP.
In none of my applications I need rational numbers though, as
can be represented exactly in fixed decimal point notation. The only
case I could forsee this would be if one could buy 1/3 of something or
if prices were quoted as 1/3 of a dollar (or other currency unit).
If rational numbers are indeed not required then the implementation of
the library would be simplified and more importantly the integration
into Gnucash would be easier. This isn't a flame, I am just curious to
see if there are situations in finance where rational numbers are used,
as opposed to fixed decimal point.
PGP Keys: http://www.bigfoot.com/~murdomania/contact.htm
Geek Code: http://www.bigfoot.com/~murdomania/geek.htm