In a Mutual Fund "Account Type", I enter an "Income Dividend" transaction of 0.482 shares with a value of $403.72. GnuCash converts this to $403.7137. Behind the scenes, it appears to be using 403 + 172/241, but this is less accurate than 403 + 72/100. How can I convince GnuCash to use 403.72 or 403 + 72/100? I'm using version 4.8.

  • Does this answer your question? superuser.com/questions/1565735/…
    – 0xFEE1DEAD
    Jul 23 at 22:44
  • Thanks, but no. That dealt with the display of the value, not the inaccuracy of the fraction chosen by GnuCash.
    – keithIHS
    Jul 24 at 0:51
  • This looks like standard mathematical roundoff error. Binary fractions do round off differently than decimals, and virtually nobody even considers trying to maintain decimal fractions in a program. Speaking as a programmer, I would say only GnuCash's authors can change this, and it would be a huge amount of effort to do so for something which is, arguably, not much more than cosmetic.
    – keshlam
    Jul 24 at 1:16
  • It's probably /256 or something like that, not /241.. As I said, binary math rather than decimal math. (There was a time when the big IBM machines could do math in Binary Counted Decimal, just to get roundoffs that looked more natural to humans. But that cost a significant amount of additional computing power and fell out of use .)
    – keshlam
    Jul 24 at 5:36
  • If I uncheck "Force Prices to display as decimals, it shows 403 + 172/241. If I use a simple 8-bit binary fraction, I can get 0.71875, which is closer than .7137. Can someone point me to a reference that explains how GnuCash is storing numbers internally?
    – keithIHS
    Jul 24 at 12:00

1 Answer 1


I have never used gnucash. The thing you need to know is how many decimal places the brokerage uses.

In a Mutual Fund "Account Type", I enter an "Income Dividend" transaction of 0.482 shares with a value of $403.72.

The company declares a dividend of 0.xx per share. The brokerage multiples this number by the number of shares you own, which is a cash value. They then either put the cash rounded to cents into your sweep account, or if they use it to purchase additional shares. Again this is is tracked at the precision they normally use. The thing to check is do they round before purchasing new shares.

When entering 2 parts of a 3 part equation, and you get a strange result in the value you didn't enter; I always suspect that the wrong pair of values were picked to enter.

  • My statement from the broker says Quantity is 0.4820, Price is 403.7200, and Amount is 194.50. When I type the 1st two into GnuCash, GC converts 403.72 to 403.7137 and calculates the Buy as 194.59. What am I missing?
    – keithIHS
    Jul 24 at 23:45
  • 1
    It looks like the numbers from your broker are confusing. They show 0.4820 shares but that is only true if they round to three significant figures, then tack on a zero at the end to make it look nice. Jul 25 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .