Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A lot of decimal digits if using total price #109

Open
blais opened this issue Mar 17, 2016 · 1 comment
Open

A lot of decimal digits if using total price #109

blais opened this issue Mar 17, 2016 · 1 comment
Labels
BUG This is a bug, not a feature request; something isn't working. core-ops Component: Core data structures and stream ops P2 Low priority, addressing would result in useful improvements

Comments

@blais
Copy link
Member

blais commented Mar 17, 2016

Original report by Jakob Schnitzer (Bitbucket: yagebu, GitHub: yagebu).


The bean-web journal (and the fava journal) use the input precision to render units, price and cost. I actually like this as it allows me to spot problems with the data in my file. However, some computed will be shown with ~20 decimal digits.

I've input most of my transactions in foreign currencies using a total price with @@, e.g. 9.50 GBP @@ 11.18 EUR. This leads to a price with a lot of unnecessary digits (1.176842105263157894736842105 EUR in the example), as the number don't divide nicely. It would be nice if beancount would only calculate the price number of digits required to make the transaction balance under the known tolerances. Or is there some reason why this behaviour would be bad?

@blais
Copy link
Member Author

blais commented Mar 18, 2016

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


This is an interesting idea I hadn't thought about, basically for the completion to round from the most precise until the tolerance fails. I like this. Will definitely consider this and implement eventually.

@blais blais added P2 Low priority, addressing would result in useful improvements core-ops Component: Core data structures and stream ops BUG This is a bug, not a feature request; something isn't working. labels May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG This is a bug, not a feature request; something isn't working. core-ops Component: Core data structures and stream ops P2 Low priority, addressing would result in useful improvements
Projects
None yet
Development

No branches or pull requests

1 participant