I remember when this happened, was so great
https://medium.com/@CWE_CAPEC/buffett-overflow-integer-overflow-in-berkshire-hathaway-stock-407cf26fedc2


On Sun, Dec 21, 2025 at 09:49 Martin Blais <[email protected]> wrote:

> That's when you know you've made it! Congratulations Justus, you may be
> the first billionaire on this list.
>
> I wish for a reproduction of the original bug, I don't recall what caused
> the issue.
> Even my comments read cryptic to me now.
> I'd be tempted to remove this, but a more conservative approach would be
> to bump it.
> I did a quick check on print, I don't see any impact.
> Here you go for now:
> https://github.com/beancount/beancount/commit/c9132bba2c7a79d181eb523aef024d1cd3547cf5
>
>
>
>
>
> On Sat, Dec 20, 2025 at 8:49 PM Justus Pendleton <[email protected]>
> wrote:
>
>> The Fix for bug #584 --
>> https://github.com/beancount/beancount/commit/4c1e87bb5a6883f8217a495de5d0ddae109aa289
>> -- introduced the code:
>>
>> # Allow precision for numbers as large as 1 billion in addition to
>> # the required number of fractional digits.
>> #
>> # TODO(blais): Review this to assess performance impact, and whether
>> # we could fold this outside a calling loop.
>> ctx.prec = num_fractional_digits + 9
>>
>> The result is that any amount over 1 billion (e.g. in a bean-query)
>> results in an exception:
>>
>> decimal.InvalidOperation: [<class 'decimal.InvalidOperation'>]
>>
>> For my personal usage I can just increase the 9 to a 12 or whatever I
>> need but I wanted to ask if there's a better approach so I can try to
>> submit an actual patch?
>>
>> Cheers,
>> Justus
>>
>> --
>> 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 visit
>> https://groups.google.com/d/msgid/beancount/2d2e78cb-8352-4ebc-a366-fd508a4e509fn%40googlegroups.com
>> <https://groups.google.com/d/msgid/beancount/2d2e78cb-8352-4ebc-a366-fd508a4e509fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 visit
> https://groups.google.com/d/msgid/beancount/CAK21%2BhMYxcWDKHMtcY%2BoxrBOioboAoeGjBc1sbh9heY9wQd%2B4w%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAK21%2BhMYxcWDKHMtcY%2BoxrBOioboAoeGjBc1sbh9heY9wQd%2B4w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 visit 
https://groups.google.com/d/msgid/beancount/CAFXPr0ucZvu_WTO_db10hy_uPZKrwqBX8OmmnBDZm9-u0s%3DG6g%40mail.gmail.com.

Reply via email to