albusshin
albusshin

Reputation: 4010

Unlimited-precision decimal math support in Python itself

I have a question towards the pure math support of Python. As far as I know, at some point the calculation is not precise enough in Python, given that the operands are large enough.

Is there some kind of unlimited precision support in Python the language itself, rather than importing a library like numpy? I'm asking for something like BigDecimal in Java, which supports unlimited precision of decimal calculation.

Upvotes: 1

Views: 555

Answers (2)

user3666197
user3666197

Reputation: 1

For python native decimal.Decimal & fractions.Fraction performance once harnessed inside numpy dense-matrix ( sparse-matrix est'd ) computations -- quantitative performance comparison -- kindly ref. >>> https://stackoverflow.com/a/26248202/3666197

Upvotes: 1

tom
tom

Reputation: 2365

Have you looked at the decimal module? https://docs.python.org/2/library/decimal.html

Upvotes: 1

Related Questions