Search code examples
pythonfloating-pointprecisionsolversympy

speed up sympy solver by reducing the precision?


The solve functionality in sympy takes some time to come up with the solution. Is it possible to speed it up by reducing the required precision (I don't really need like 15 digit after the decimal point!)?


Solution

  • You can try to use mpmath (mulch-precision math with sympy). You can set the precision to the desired level as required. Integration with sympy is traight forward, and the examples under the Advanced Mathematics sections would help you to understand its usage.