>>>>> Craig Earls <enderw88-re5jqeeqqe8avxtiumw...@public.gmane.org> writes:

> I was playing around with numerical value expressions in postings and found
> some interesting behavior.

> Behavior #1:
>      Assets:401K (1 QQQQ * 7.456)

> Results in 7 shares of QQQQ being reported.

>     Assets:401K (1.0 QQQQ * 7.456)

> Results in 7.5 shares of QQQQ being reported

> Behavior #2:
>    Assets:401K (1 QQQQ * 7.58/85.88)

> Results in an unbalance error since the second number rounds to zero.

> Ledger uses the number of significant figures describe the commodity,
> ignoring other figures in the calculation I am using no other formatting
> suggestions in my ledger command.  I would expect it would use the largest
> number of significant figures available in the calculation.  So If my
> expectations are correct, this should be a bug.  If not I will add this
> behavior to the documentation.

This is a bug.  Within parenthesized amounts, all precision should be both
used and ignored for display (that is, it won't affect future display of
amounts of that commodity type).

John

Reply via email to