On 2023-03-03, Ismael Bouya wrote:
> Hello!
>
> (Fri, Mar 03, 2023 at 04:25:06AM -0000) Tavis Ormandy :
>> Hello! I've managed to break my ledger file again :(
>> 
>> $ ledger bal
>> Error: Divide by zero
>> 
> You said that commodity FOO had a precision of 2 decimal digits, but in
> your entry you have 3, and the second one evaluates to 0 due to that
> precision.
>

Yes, that is how I want it formatted - but I want it tracked
internally at higher precision. I think that is a valid thing to want, right?

> Although formally correct with that change, on the spirit you prbably
> wanted that instead in your second transaction:
>
> 2023/01/03 * Transaction
>     Assets:Brokerage  -1.211 FOO {$8.87} @ $16.79
>     Assets:Brokerage  -0.003 FOO {$8.87} @ $16.79 ; Fractional shares 
> liquidated
>     Assets:Checking  $20.38
>     Income:Capital Gains
>
> (check with the ledger bal command to see the difference)

Oops, yes, you're right - it was just a fictional transaction to demonstrate 
the issue :)

Tavis.

-- 
 _o)            $ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger [email protected]
_\_V _( ) _( )  @taviso

-- 

--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/ttvotd%248t3%241%40ciao.gmane.io.

Reply via email to