What’s SymPy Anyway?
SymPy is a Python library for symbolic computation. So instead of approximating the result of the square root of 2, it keeps the square root intact—using a symbolic representation. This helps in further processing and can lead to situations where Python has introduced a floating point precision error without need. Here’s a basic example:
The result is NOT an approximated square root of 3 like in the math package:
An Interactive Example
You can try it yourself in the interactive code shell:
(Just click the image to create your own code!)
How to Install SymPy?
To install SymPy in Python,