thanks for your replies. I actually thought Decimal() is meant to turn a float into something nice for bookkeeping (that was my interpretation of the docs) My underlying question is what is the intended way to handle rounding errors? I.e. when splitting up a transaction into multiple transactions. say distribute a yearly transaction over 12 months or a weekly one over 7 days.
Naively, I would take 1 CHF and divide it by 12, and make 12 transactions. I dislike having my posting look like " 0.08333333333333332870740406406184774823486804962158203125".But simply rounding will introduce an error of 4%: round(1/12,2) = 0.8, and 12*0.8 = 0.96 My next best idea is to make sure that of the transactions covers the error: round(1 - 11*round(1/12)) or something. but also this looks too ugly to be a "correct" way. What would you recommend? -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/beancount/10bd9738-f716-41f2-b377-88db19c29ec0o%40googlegroups.com.
