Tuesday, September 24, 2024
Google search engine
HomeLanguagesPython | sympy.atan() method

Python | sympy.atan() method

In sympy, atan() method is an inverse tangent function. Using the atan(x) method in the sympy module, we can compute the inverse tangent or arctangent of x.

Syntax : sympy.atan(x)

Return : Returns the arc tangent of x 

Code #1: Below is the example using atan() method to find the inverse tangent function. 

Python3




# importing sympy library
from sympy import *
 
# calling atan() method on expression
geek1 = atan(-1)
geek2 = atan(1)
geek2 = atan(zoo) # zoo = infinity
 
print(geek1)
print(geek2)
print(geek3)


Output: 

-pi/4
pi/4
AccumBounds(-pi/2, pi/2)

  Code #2: 

Python3




# importing sympy library
from sympy import atan
 
 
# calling atan() method on expression
geek = atan(1)
print(geek)


Output: 

pi/4
Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments