Python | sympy.evalf() method
With the help of sympy.evalf() method, we are able to evaluate the mathematical expressions.
Syntax :
sympy.evalf()
Return : Return the evaluated mathematical expression.
Example #1 :
In this example we can see that by using sympy.evalf() method, we are able to evaluate the mathematical expressions.
# Import sympy from sympy import * # Use sympy.evalf() method expn = sqrt(9) gfg = expn.evalf() print(gfg) |
chevron_right
filter_none
Output :
3.00000000000000
Example #2 :
# Import sympy from sympy import * # Use sympy.evalf() method expn = sqrt(9)*cos(45) gfg = expn.evalf() print(gfg) |
chevron_right
filter_none
Output :
1.57596596645319
Recommended Posts:
- class method vs static method in Python
- Python | os.dup() method
- Python | set() method
- Python | next() method
- Python | os.waitid() method
- Python | shutil.which() method
- Python PIL | getpalette() Method
- Python PIL | getcolors() Method
- Python | os.WIFEXITED() method
- Python | Tensorflow cos() method
- Python | os.major() method
- Python | os.stat() method
- Python | os.minor() method
- Python | os.fstat() method
- Python | os.umask() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



