Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

high precision calculation in numpy

How to perform high precision calculation in numpy? By high precision I mean 100 precision in decimal.

like image 451
Hesam SoltanpanahiSarabi Avatar asked Sep 25 '26 08:09

Hesam SoltanpanahiSarabi


1 Answers

Numpy doesn't have arbitrary floating-point precision. You'll want to use decimal from the standard library, or a third-party library like mpmath. Both of those libraries use C extensions for their internal calculations, so they should be fairly fast.

like image 142
Josh Karpel Avatar answered Sep 27 '26 07:09

Josh Karpel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!