I think this is the same problem mentioned by Tony Edgecombe on Oct 21
(I couldn't seem to reply to that post), and it looks like this is
being fixed in the next version, but I wanted to point out that
rounding problems seem to be pervasive whenever conversion occurs:

1/21 Purchase
    Assets:Investments  370.949 ABC @@ $3140.89
    Equity:Starting

12/26 Reinvest Income
    Assets:Investments  9.928 ABC @@ $113.68
    Income:Dividends

12/28 Sell
    Assets:Investments      -380.877 ABC
    Assets:Investments      $4402.94
    Income:Capital Gains    $-1148.37

$ ledger -s bal
            $4402.94  Assets:Investments
       $-3140.890099  Equity:Starting
           $-1262.05  Income
           $-1148.37    Capital Gains
        $-113.679998    Dividends
--------------------
                   0

$ ledger -B -s bal
      $4402.94000359  Assets:Investments
       $-3140.890099  Equity:Starting
           $-1262.05  Income
           $-1148.37    Capital Gains
        $-113.679998    Dividends
--------------------
        $-0.00009341

Splitting up the transaction amounts helps a little:

1/21 Purchase
    Assets:Investments  370.949 ABC
    Equity:Starting     $-3140.89

12/26 Reinvest Income
    Assets:Investments  9.928 ABC
    Income:Dividends    $-113.68

12/28 Sell
    Assets:Investments      -380.877 ABC
    Assets:Investments      $4402.94
    Income:Capital Gains    $-1148.37

$ ledger -s bal
            $4402.94  Assets:Investments
           $-3140.89  Equity:Starting
           $-1262.05  Income
           $-1148.37    Capital Gains
            $-113.68    Dividends
--------------------
                   0

$ ledger -B -s bal
       $4402.9400025  Assets:Investments
           $-3140.89  Equity:Starting
           $-1262.05  Income
           $-1148.37    Capital Gains
            $-113.68    Dividends
--------------------
          $0.0000025

This is from ledger 2.6.1 packaged in Debian.

Reply via email to