GNUCash is making up prices

ghaverla@freenet.edmonton.ab.ca ghaverla@freenet.edmonton.ab.ca
Sun, 16 Sep 2001 21:30:41 -0600 (MDT)


On Sun, 16 Sep 2001, Randall Hopper wrote:

> I have a Mutual Fund Account.  If I key in 0.0163979 for shares and 106.16
> for price and nothing for Buy (for a dividend reinvestment transaction),
> then GNUCash changes my price to 106.098.  Why?  This is false.
> 
> It seems to be pretending that the Buy amount must be a round cent, but
> number of shares is what's important in a Mutual Fund account.

Most of the mutual funds I buy, the number of shares is always
just approximate.  The amount of money, to the cent, that I
use to purchase the shares is exact.  The price per share, is
also exact.  The number of shares purchased or sold is just
the ratio.  That's part of the explanation for the mutual
funds I have bought and sold over the years.  Another part
is that not all decimal numbers can be represented exactly
by binary floating point formats.  But typically a person
gets almost 16 significant figures for a single division
in C (where most things default to doubles in floating point
arithmetic).

Gord

Matter Realisations     http://www.materialisations.com/
Gordon Haverland, B.Sc. M.Eng. President
101  9504 182 St. NW    Edmonton, AB, CA  T5T 3A7
780/481-8019            ghaverla @ freenet.edmonton.ab.ca
780/993-1274 (cell)