Actually it is difficult to avoid. In order to create your transactions you
might just need the extra precision. In which case you'd need to reset it.
There's a way to do that (I forget, "D $0.001" or something like that).

IMO that's a bit of a pain to have to think about this. In Beancount
order-dependent issues are explicitly avoided, you should be able to
shuffle all the transactions randomly in the file and it should parse to
the same contents. It infers the precision using nothing but the numbers on
the transaction itself.  Ledger could (and should IMO) do the same, I don't
see an advantage in doing it the way it currently does.

More discussion here:
http://furius.ca/beancount/doc/proposal-rounding




On Sat, May 16, 2015 at 3:46 PM, Scott Carpenter <[email protected]>
wrote:

> Thanks for the replies.
>
> I wondered about the precision, too, but I had the same problem with
> ($2.53 * 1.8)
>
> From your link Martin I see that it is a known issue, and now that I
> understand it, hopefully I can avoid it. (Or will remember when I see this
> again.)
>
> Scott
>
> On Saturday, May 16, 2015 at 1:41:55 PM UTC-5, Martin Blais wrote:
>
>> On Sat, May 16, 2015 at 2:29 PM, Scott Carpenter <[email protected]>
>> wrote:
>>
>>> I can reproduce it just with those two transactions:
>>>
>>> 2015/05/13 some place
>>>     e: misc
>>>     e: sundry                          ($2.539 * 1.8)
>>>     l: credit card: big bank           $-30.25
>>>
>>> 2014/12/19 investments-r-us
>>>     a: abc: investment banana          5.7424  ba @ $24.38
>>>     a: abc: investment bread           2.6954  br @ $22.26
>>>     a: abc: cash                       $-200
>>>
>>> ledger -f [filename] --market reg "big bank"
>>>
>>> With the investment second like this, it has the error. If I put the
>>> investment first, it works.
>>>
>> Ledger has order-dependent behavior about precision: it seems to have
>> some notion of precision that depends on the last number parsed in your
>> file (across transactions). See this ticket for a detailed example of the
>> problem:
>>
>> *Bug 1082* <http://bugs.ledger-cli.org/show_bug.cgi?id=1082> - A change
>> in precision used on an amount in-stream affects the balancing precision of
>> following transactions
>>
>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to