Rounding up to nearest dollar USD in Fava- Can't figure out how to show two decimal spaces on particular file USD

2025-07-19 Thread CD
I have several Beancount files and one of them is rounding to a dollar instead of two decimal places but I can't seem to find the display option that is causing that. Only that one file does it. -Chris -- You received this message because you are subscribed to the Google Groups "

Re: Number of decimal places with beanprice

2025-06-11 Thread Chary Ev2geny
k you for that analysis! > For reference, I will also copy here the reply I added to that issue: > > Thanks for elaborating! I had the same issue. However, I searched for > decimal places > ```sql > select * where round(number, 6) != number > ``` > and there was no records

Re: Number of decimal places with beanprice

2025-06-03 Thread 'Alen Šiljak' via Beancount
Thank you for that analysis! For reference, I will also copy here the reply I added to that issue: Thanks for elaborating! I had the same issue. However, I searched for decimal places ```sql select * where round(number, 6) != number ``` and there was no records with that many decimal places. I

Re: Number of decimal places with beanprice

2025-06-03 Thread Chary Ev2geny
0 price CEMB 44.86999893188476562500 USD > 2025-05-30 price CQE_AX 2.9603814697265625000 AUD > ``` > These are from two different sources. Mine has 4 decimals, so likely using > a different API. > Is there a way to limit the number of

Number of decimal places with beanprice

2025-05-30 Thread 'Alen Šiljak' via Beancount
D 2025-05-30 price CEMB 44.86999893188476562500 USD 2025-05-30 price CQE_AX 2.9603814697265625000 AUD ``` These are from two different sources. Mine has 4 decimals, so likely using a different API. Is there a way to limit the number of decimal places and/or to get rid of the zer

Re: Share Split Decimal Precision

2023-03-14 Thread Archimedes Smith
tried to maintain my dated lots with the recent Vanguard ETF splits. > Most of my transactions have no issue resolving, but a few of my reinvested > dividends are throwing me balance errors with very small decimal places. > Any idea how I can fix this? >

Share Split Decimal Precision

2023-03-14 Thread William Bean
I've tried to maintain my dated lots with the recent Vanguard ETF splits. Most of my transactions have no issue resolving, but a few of my reinvested dividends are throwing me balance errors with very small decimal places. Any idea how I can fix this? 2021-12-27 * "Reinvested dividen

Re: Decimal Precision

2023-03-03 Thread Daniele Nicolodi
On 02/03/23 19:28, fin wrote: i'll figure it out eventually now that i know the error is indeed something i did wrong and not the error/rounding issue. AFAIK there are never been bugs reported on Beancount regarding inaccuracies due to rounding or other computing errors. The only issues someh

Re: Decimal Precision

2023-03-02 Thread fin
t to fix it to preserve the original lot date. also, i really should know more about bean-doctor and thanks for reminding me about that. using fava is not always the quickest way for me to learn but i'm too used to clicking these days... >>my assumption is that using the De

Re: Decimal Precision

2023-03-02 Thread Daniele Nicolodi
it due to precision or rounding? my assumption is that using the Decimal Python type should remove a lot of internal conversion issues since because the data is starting out as strings that any calculations should be as accurate as possible given those strings to start with. is there a way ri

Re: Decimal Precision

2023-03-02 Thread fin
g to wade through all these various docs and mentions about precision because i'm trying to figure out why certain transactions do not balance (and fava complains). my assumption is that using the Decimal Python type should remove a lot of internal conversion issues since because the d

Decimal types

2022-09-11 Thread Martin Blais
For those interested in the minute details of Decimal representations between C, C++ and Python... I just wrote a technical note to summarize the types that may appear in the deep in the gutters of the C++ codebase: https://github.com/beancount/beancount/blob/master/experiments/v3/decimal

Re: Decimal Precision

2022-07-26 Thread William Bean
were my findings: 1. Results from queries were outputting many decimal places due to not using display context. This was solved and merged into the master in April 2022. My install is older than that, so an update should solve this without issue. 2. Results from printer were also outputting many

Re: Decimal Precision

2022-07-26 Thread William Bean
m Bean wrote: > >> I've been struggling with the best way to produce beancount results with >> a specific number of decimal places. Really this comes about when I need to >> perform math via plugin (or fava extension), which generates decimals >> carried out many di

Re: Decimal Precision

2022-07-25 Thread Martin Blais
eancount results with a > specific number of decimal places. Really this comes about when I need to > perform math via plugin (or fava extension), which generates decimals > carried out many digits. I reviewed the display_context.py file, but it > does not seem to have a rounding or trimming f

Decimal Precision

2022-07-25 Thread William Bean
I've been struggling with the best way to produce beancount results with a specific number of decimal places. Really this comes about when I need to perform math via plugin (or fava extension), which generates decimals carried out many digits. I reviewed the display_context.py file, b

Re: decimal

2021-04-06 Thread Martin Blais
don't have the cycles to >> rewrite it >> Try this in the meantime: >> >> option "inferred_tolerance_default" "EUR:0.0005" >> >> >> >> On Mon, Apr 5, 2021 at 4:08 PM francois PEGORY >> wrote: >> >>&g

Re: decimal

2021-04-06 Thread francois PEGORY
t of a mess. > Just another reason why it needs a rewrite. > This is really gnawing at me, but I just don't have the cycles to > rewrite it > Try this in the meantime: > > option "inferred_tolerance_default" "EUR:0.0005" > > > > On Mon, Apr 5, 2

Re: decimal

2021-04-05 Thread Martin Blais
t 4:08 PM francois PEGORY wrote: > i have a problem with decimal of commodities. > my stocks have 5 decimal for units but euro have only two decimals. > > so basically here i have a buy operation.: > 2021-02-09 * "Achat" "100" > Assets:Titre: Assurance-vi

decimal

2021-04-05 Thread francois PEGORY
i have a problem with decimal of commodities. my stocks have 5 decimal for units but euro have only two decimals. so basically here i have a buy operation.: 2021-02-09 * "Achat" "100" Assets:Titre: Assurance-vie 0.081869 SMG-ASIE {232.69 EUR, 2021-0

Re: [FIFO] How to transfer lots between accounts and how to query lot information with 8 decimal digits?

2020-12-22 Thread Peter
--- > - -- > >Assets:Crypto:BTC:Binance 0.20 BTC BTC 0.20 0.20 > Assets:Crypto:BTC:Coinbase-Pro 0.14 BTC EUR 18,000.00 2,490.00 > Assets:Crypto:BTC:Coinbase-Pro 0.12 BTC EUR 20,000.00 2,500.00 > Assets:Crypto:BTC:Coinbase-Pro -0.20 BTC

Re: [FIFO] How to transfer lots between accounts and how to query lot information with 8 decimal digits?

2020-12-22 Thread 'Tobias Höbel' via Beancount
After reading https://groups.google.com/g/beancount/c/Qvbcq-Sk5NY/m/WGkLFIb7AgAJ more carefully I found a partial solution: Providing the cost currency in the lot reducing transaction, FIFO booking works: option "booking_method" "FIFO" option "operating_currency" "EUR" option "inferred_tolerance_

[FIFO] How to transfer lots between accounts and how to query lot information with 8 decimal digits?

2020-12-22 Thread Tobi
; > > account date position >------ -- >Assets:Crypto:BTC:Binance 2020-12-19 0.2 BTC >Assets:Crypto:BTC:Coinbase-Pro 2020-12-17 0.1 BTC {18000 EUR} >Assets:Crypto:BTC:Coinbase-Pro 2020-12-18 0.1 BTC {2 EUR} >Assets:Cr

Re: How to debug shares being incorrectly reported as a decimal value

2020-11-16 Thread Cameron Wood
" __default__ : sign=0 integer_max=1 fractional_common=_ fractional_max=_ "0.*" "0.*" which I *think* confirms what I thought, that there postings which should have caused this to render as a decimal. That said I recognise this is just a cosmetic thing, and it's on

Re: How to debug shares being incorrectly reported as a decimal value

2020-11-15 Thread Daniele Nicolodi
price commodity X > > > > On Sun, Nov 15, 2020 at 4:38 AM Cameron Wood > mailto:cameron.e.w...@gmail.com>> wrote: > > Hello, and thank you for your reply. > > > On Saturday, 14 November 2020 at 22:19:53 UTC+1 > c79m...@gmail.com <

Re: How to debug shares being incorrectly reported as a decimal value

2020-11-15 Thread Martin Blais
t; > > On Sun, Nov 15, 2020 at 4:38 AM Cameron Wood > wrote: > >> Hello, and thank you for your reply. >> >> >> On Saturday, 14 November 2020 at 22:19:53 UTC+1 c79m...@gmail.com wrote: >> >>> I don't have any immediate help, but was wondering if

Re: How to debug shares being incorrectly reported as a decimal value

2020-11-15 Thread Martin Blais
20 at 22:19:53 UTC+1 c79m...@gmail.com wrote: > >> I don't have any immediate help, but was wondering if you could give an >> example of where it's being represented as a decimal? What do the opening >> / initialization lines look like for your new account? (vs the old

Re: How to debug shares being incorrectly reported as a decimal value

2020-11-15 Thread Cameron Wood
Hi, and thanks for your reply. On Saturday, 14 November 2020 at 22:54:52 UTC+1 bl...@furius.ca wrote: > Read this: http://furius.ca/beancount/doc/tolerances > > TL;DR > Beancount infers good defaults for the tolerance and precision > automatically from the history of numbers appearing in your l

Re: How to debug shares being incorrectly reported as a decimal value

2020-11-15 Thread Cameron Wood
Hello, and thank you for your reply. On Saturday, 14 November 2020 at 22:19:53 UTC+1 c79m...@gmail.com wrote: > I don't have any immediate help, but was wondering if you could give an > example of where it's being represented as a decimal? What do the opening > / initia

Re: How to debug shares being incorrectly reported as a decimal value

2020-11-14 Thread Martin Blais
and noticed > they were being rendered as decimals, even though there wasn't any decimal > and they should have been represented as integers. > > To try and track this down, I've played around with the posting, changing > both sides of the posting, changing the name, and all sor

Re: How to debug shares being incorrectly reported as a decimal value

2020-11-14 Thread c79m...@gmail.com
I don't have any immediate help, but was wondering if you could give an example of where it's being represented as a decimal? What do the opening / initialization lines look like for your new account? (vs the old one?) - Cameron Murphy On Saturday, November 14, 2020 at 10:12:1

How to debug shares being incorrectly reported as a decimal value

2020-11-14 Thread Cameron Wood
ple of new accounts to hold some new investments, and noticed they were being rendered as decimals, even though there wasn't any decimal and they should have been represented as integers. To try and track this down, I've played around with the posting, changing both sides of the postin

Re: Decimal(): understanding, syntax

2020-08-10 Thread Daniele Nicolodi
On 10/08/2020 03:52, nugget wrote: > As a summary, what i think I leared: > > * The design of Beancounts D() technically allows allows higher > precision (float) numbers as input. Floating points numbers have finite precision. Decimal numbers (as in Python Decimal objects) ha

Re: Decimal(): understanding, syntax

2020-08-10 Thread Martin Michlmayr
* nugget [2020-08-10 02:52]: >- The design of Beancounts D() technically allows allows higher >precision (float) numbers as input. Not float as in the data type float. You pass a string to Decimal() because floats already have rounding that you can avoid with Decimal() >

Re: Decimal(): understanding, syntax

2020-08-10 Thread Martin Michlmayr
> Thanks all for your replies. > > best, > nugget > > On Sunday, August 9, 2020 at 11:15:33 PM UTC+2, Daniele Nicolodi wrote: > > > > On 08/08/2020 10:41, Daniele Nicolodi wrote: > > > Another thing to potentially consider is to reduce the number of decimal > &

Re: Decimal(): understanding, syntax

2020-08-10 Thread nugget
Sunday, August 9, 2020 at 11:15:33 PM UTC+2, Daniele Nicolodi wrote: > > On 08/08/2020 10:41, Daniele Nicolodi wrote: > > Another thing to potentially consider is to reduce the number of decimal > > digits used when serializing Decimal numbers. Maybe 12 (or so) digits > > are

Re: Decimal(): understanding, syntax

2020-08-09 Thread Daniele Nicolodi
On 08/08/2020 10:41, Daniele Nicolodi wrote: > Another thing to potentially consider is to reduce the number of decimal > digits used when serializing Decimal numbers. Maybe 12 (or so) digits > are enough instead that the current 28. I am sure someone has a model for when 1e-12 BTC will

Re: Decimal(): understanding, syntax

2020-08-08 Thread Daniele Nicolodi
On 07/08/2020 23:48, Martin Blais wrote: > On Sat, Aug 8, 2020 at 12:31 AM Daniele Nicolodi <mailto:dani...@grinta.net>> wrote: > > On 07/08/2020 15:49, nugget wrote: > > Hi all, > > i get these very long decimal numbers when using the Decimal() method.

Re: Decimal(): understanding, syntax

2020-08-08 Thread Daniele Nicolodi
On 08/08/2020 01:11, nugget wrote: > 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 > er

Re: Decimal(): understanding, syntax

2020-08-08 Thread Martin Michlmayr
* nugget [2020-08-08 00:11]: > 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

Re: Decimal(): understanding, syntax

2020-08-08 Thread nugget
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

Re: Decimal(): understanding, syntax

2020-08-07 Thread Martin Blais
On Sat, Aug 8, 2020 at 12:31 AM Daniele Nicolodi wrote: > On 07/08/2020 15:49, nugget wrote: > > Hi all, > > i get these very long decimal numbers when using the Decimal() method. > > See my minimal example. How can I fix this? > > What is exactly the problem you

Re: Decimal(): understanding, syntax

2020-08-07 Thread Daniele Nicolodi
On 07/08/2020 15:49, nugget wrote: > Hi all, > i get these very long decimal numbers when using the Decimal() method. > See my minimal example. How can I fix this? What is exactly the problem you want to "fix"? 1/9 is a periodic number that cannot be represented with a finit

Re: Decimal(): understanding, syntax

2020-08-07 Thread Martin Michlmayr
* nugget [2020-08-07 14:49]: > i get these very long decimal numbers when using the Decimal() > method. See my minimal example. How can I fix this? rounding to two > digits seems not to be the solution. Thanks! This is what I use to round decimal numbers: def d_round(d): return d.q

Decimal(): understanding, syntax

2020-08-07 Thread nugget
Hi all, i get these very long decimal numbers when using the Decimal() method. See my minimal example. How can I fix this? rounding to two digits seems not to be the solution. Thanks! 2020-01-01 * "format" "1" myAccount 1 CHF 2020-01-01 * "

String with comma to decimal using D()

2019-04-30 Thread Florian Lindner
Hello, https://aumayr.github.io/beancount-docs-static/api_reference/beancount.core.html?highlight=link#beancount.core.number.D says: "Convert a string, possibly with commas, into a Decimal object." However, feeding it a string with comma: units = amount.Amount(D(row["Soll

Re: String with comma to decimal using D()

2019-04-27 Thread Martin Blais
gt; > https://aumayr.github.io/beancount-docs-static/api_reference/beancount.core.html?highlight=link#beancount.core.number.D > > > > "Convert a string, possibly with commas, into a Decimal object." > > > > > > > but the documentation seems wrong or mis

Re: String with comma to decimal using D()

2019-04-27 Thread Florian Lindner
with commas, into a Decimal object." > > > but the documentation seems wrong or misleading. > > It's not wrong per se (although I can see how it can be viewed as > misleading if you're used to comma decimal separators). The comma is > used to separate t

Re: String with comma to decimal using D()

2019-04-26 Thread Martin Michlmayr
* Florian Lindner [2019-04-26 10:14]: > https://aumayr.github.io/beancount-docs-static/api_reference/beancount.core.html?highlight=link#beancount.core.number.D > > "Convert a string, possibly with commas, into a Decimal object." > but the documentation seems wrong or

String with comma to decimal using D()

2019-04-26 Thread Florian Lindner
Hello, https://aumayr.github.io/beancount-docs-static/api_reference/beancount.core.html?highlight=link#beancount.core.number.D says: "Convert a string, possibly with commas, into a Decimal object." However, feeding it a string with comma: units = amount.Amount(D(row["Soll

Re: bean-web: How to define the decimal precision?

2019-03-07 Thread Roland Everaert
uffer >>> from the fact that most columns are rounding-up values to the next integer >>> instead of displaying the real number with its decimals :( >>> >>> I hope this will be fixed soon, or maybe their is some parameters I can >>> modify to set the precisio

Re: bean-web: How to define the decimal precision?

2019-03-06 Thread Martin Blais
ter than bean-web. However, it still suffer >> from the fact that most columns are rounding-up values to the next integer >> instead of displaying the real number with its decimals :( >> >> I hope this will be fixed soon, or maybe their is some parameters I can >> modify t

Re: bean-web: How to define the decimal precision?

2019-03-05 Thread ethan . glasser . camp
ed soon, or maybe their is some parameters I can > modify to set the precision to 1 or 2 digits after the decimal point. > > Le mercredi 28 novembre 2018 16:29:26 UTC+1, Roland Everaert a écrit : >> >> Is bean-query also affected by the same limitation? >> >>

Re: bean-web: How to define the decimal precision?

2018-12-12 Thread Roland Everaert
the precision to 1 or 2 digits after the decimal point. Le mercredi 28 novembre 2018 16:29:26 UTC+1, Roland Everaert a écrit : > > Is bean-query also affected by the same limitation? > > I will try fava when times permit, thanks. > Martin Blais writes: > > > On Fri, Nov 23

Re: bean-web: How to define the decimal precision?

2018-11-28 Thread Roland Everaert
ike a better default than atempting to infer >> everything >> > automatically. >> > >> > >> > >> > >> > On Wed, Nov 21, 2018 at 12:13 PM Roland Everaert >> > wrote: >> > >> >> Hello, >> >

Re: bean-web: How to define the decimal precision?

2018-11-23 Thread Martin Blais
; How can I tell bean-web the number of digits to display after the > period? > >> > >> I often see, in the balance sheet to name one page, thatvalues are > rounded > >> and no decimal is shown. > >> > >> I want to see number with 1 or 2 digits afte

Re: bean-web: How to define the decimal precision?

2018-11-23 Thread Roland Everaert
e a better default than atempting to infer everything > automatically. > > > > > On Wed, Nov 21, 2018 at 12:13 PM Roland Everaert > wrote: > >> Hello, >> >> How can I tell bean-web the number of digits to display after the period? >> >> I often see

Re: bean-web: How to define the decimal precision?

2018-11-22 Thread Martin Blais
, in the balance sheet to name one page, thatvalues are rounded > and no decimal is shown. > > I want to see number with 1 or 2 digits after the decimal comma. > > Example: > > - Current configuration > Real value: 3.67 > Displayed value: 4 > > - Expected configuration

bean-web: How to define the decimal precision?

2018-11-21 Thread Roland Everaert
Hello, How can I tell bean-web the number of digits to display after the period? I often see, in the balance sheet to name one page, thatvalues are rounded and no decimal is shown. I want to see number with 1 or 2 digits after the decimal comma. Example: - Current configuration Real value

Re: How showing fava statements decimal?

2018-05-27 Thread Martin Blais
http://furius.ca/beancount/doc/options See option "inferred_tolerance_default." On Thu, May 24, 2018 at 11:26 PM, wrote: > The command is error when whole pasted into cygwin... > So,I need know that what option control display decimal(or call > fractional). > If this

Re: How showing fava statements decimal?

2018-05-24 Thread pannaimage322
The command is error when whole pasted into cygwin... So,I need know that what option control display decimal(or call fractional). If this option is dcontext of beancount,how write in beancount-file? Like:option "dcontext" "CNY" "sign=1"? or e.g. something?

Re: How showing fava statements decimal?

2018-05-18 Thread Martin Blais
ay 18, 2018 at 12:09 PM, Zhuoyun Wei wrote: > I believe this may have something to do with the precision of inferred > numbers. Try padding every number in your file to 2 decimal digits: > > 95 CNY -> 95.00 CNY > 0.2 CNY -> 0.20 CNY > > ... and see if that solves your

Re: How showing fava statements decimal?

2018-05-18 Thread pannaimage322
good work,3Q. 在 2018年5月19日星期六 UTC+8上午12:09:38,Zhuoyun Wei写道: > > I believe this may have something to do with the precision of inferred > numbers. Try padding every number in your file to 2 decimal digits: > > 95 CNY -> 95.00 CNY > 0.2 CNY -> 0.20 CNY > > ... and

Re: How showing fava statements decimal?

2018-05-18 Thread Zhuoyun Wei
I believe this may have something to do with the precision of inferred numbers. Try padding every number in your file to 2 decimal digits: 95 CNY -> 95.00 CNY 0.2 CNY -> 0.20 CNY ... and see if that solves your issue. 2018-05-18 00:35:39 pannaimage...@gmail.com : > I'm writen

Re: How showing fava statements decimal?

2018-05-18 Thread pannaimage322
sercontent.com/-MUGaGxvbSoo/Wv6CRctfUTI/AEo/9VLJwLvr_jQGFJWKX0Cc7p15wuyvxIQmACLcBGAs/s1600/ScreenClip.png> 在 2018年5月17日星期四 UTC+8下午11:59:45,Jason Chu写道: > > I'm pretty sure the number of decimal places is controlled by the input to > beancount. If you always refer to your

Re: How showing fava statements decimal?

2018-05-17 Thread Jason Chu
I'm pretty sure the number of decimal places is controlled by the input to beancount. If you always refer to your units as whole numbers, you'll see no decimals, but if you use 1.00, you'll see 1.00 in all the reports. On Thu, May 17, 2018 at 7:49 AM wrote: > I need numb

Re: How showing fava statements decimal?

2018-05-17 Thread pannaimage322
I need number of account show decimal,like 5.、5.663,is decimal not commas. 在 2018年5月17日星期四 UTC+8下午7:30:49,Martin Michlmayr写道: > > Put this in your beancount file: > > option "render_commas" "true" > > or > > option "render_commas" &quo

Re: How showing fava statements decimal?

2018-05-17 Thread Martin Michlmayr
Put this in your beancount file: option "render_commas" "true" or option "render_commas" "false" * pannaimage...@gmail.com [2018-05-17 04:25]: > I guess some option not setup,bu I con't found it. > Currently statements like: > >

How showing fava statements decimal?

2018-05-17 Thread pannaimage322
I guess some option not setup,bu I con't found it. Currently statements like: I need it chanage to like this:

Issue #205: amounts smaller than 1E-6 are incorrectly handled (scientific notation instead of decimal) (blais/beancount)

2017-12-08 Thread Markus Teufelberger
New issue 205: amounts smaller than 1E-6 are incorrectly handled (scientific notation instead of decimal) https://bitbucket.org/blais/beancount/issues/205/amounts-smaller-than-1e-6-are-incorrectly Markus Teufelberger: See the following test case(s): ``` #!python $ python3 Python 3.6.3 (default

Issue #166: Inconsistent rendering of decimal numbers (blais/beancount)

2017-05-03 Thread Limbo Peng
New issue 166: Inconsistent rendering of decimal numbers https://bitbucket.org/blais/beancount/issues/166/inconsistent-rendering-of-decimal-numbers Limbo Peng: ## Description The output of `bean-report` renders decimal numbers inconsistently when a beancount file is included in another

Re: should decimal point/digit group style be commodity-specific ?

2016-09-04 Thread Simon Michael
True, John. I should clarify, I'm thinking about just the characters to use for decimal point and digit group separator, and the digit group sizes, but not the precision (number of digits after the decimal point) which I agree should certainly stay commodity-specific. > On Sep 4, 20

Re: should decimal point/digit group style be commodity-specific ?

2016-09-04 Thread John Wiegley
>>>>> "SM" == Simon Michael writes: SM> We could simplify this and say decimal point and digit group style are the SM> same across all commodities, perhaps reducing confusion and hassle, cf SM> https://github.com/simonmichael/hledger/issues/395<https://githu

should decimal point/digit group style be commodity-specific ?

2016-09-04 Thread Simon Michael
In hledger, each commodity/currency has its own style of decimal point and digit grouping. (http://hledger.org/manual.html#amounts <http://hledger.org/manual.html#amounts>, http://hledger.org/manual.html#commodity-directive <http://hledger.org/manual.html#commodity-directive>)