On Wed, Apr 4, 2018 at 8:14 AM, Martin Michlmayr <[email protected]> wrote:
> Can you confirm that this is a bug: > https://bitbucket.org/blais/beancount/issues/235 > > In short, price statements affect the precision in the display context. > It's more general than that: any number seen in the input affects the precision in the display context. I have 15.99 GB00BPN5P782 {113.6367 GBP} > > 15.99 * 113.6367 = 1817.050833 > > But due to > option "inferred_tolerance_default" "GBP:0.01" > > I get 1817.05 which is what I want. > No. inferred_tolerance_default affects only rounding. Rounding only occurs on interpolation, which is when you omit a number and let Beancount calculate it for you. The number that's calculated there is 1817.050833. bean-doctor context rounding.beancount 3 Hash:2b8a5cee474bed43d08b9de72fcd2202 Location: /home/blais/r/q/beancount-data/user/michlmayr/rounding.beancount:3 ------------ Balances before transaction Assets:Something Assets:Cash ------------ Transaction 2018-04-05 * Assets:Something 15.99 GB00BPN5P782 {113.6367 GBP, 2018-04-05} ; 1817.050833 GBP Assets:Cash -1817.0508 GBP ; -1817.050833 GBP Tolerances: GB00BPN5P782=0.005 Basis: (1817.050833 GBP) ------------ Balances after transaction * Assets:Something 15.99 GB00BPN5P782 {113.6367 GBP, 2018-04-05} * Assets:Cash -1817.050833 GBP It's too complicated. I have succeeded in creating a system which infers reasonable values automatically. But I have failed to create a simple system. I should probably add all explicit options to let users override tolerance, display, and rounding values for both units and cost/prices and call it a day. However, after a `price GB00BPN5P782 113.6382 GBP` statement, CONVERT() > gives me 1817.0748 GBP. I would expect 1817.07 GBP here. > > -- > Martin Michlmayr > http://www.cyrius.com/ > > -- > You received this message because you are subscribed to the Google Groups > "Beancount" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/beancount/20180404121416.nlvakxlvrps2vvfd%40jirafa.cyrius.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhPVkJ4T_rcj5%2BHTvspfC-iHCMM4Mt%3Dg-vGY5qS1GuqH7A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
