Python | sympy.atan2() method
Last Updated :
08 Feb, 2023
In sympy, atan2() method is an inverse tangent function. Using the atan2(x, y) method in sympy module, we can compute the two-argument arctangent. This function is defined for real x and y only.
Syntax : sympy.atan(x)
Return : Returns the arc tangent of x
Code #1:
Below is the example using atan() method to find inverse tangent function.
Python3
from sympy import *
geek1 = atan2( 1 , 1 )
geek2 = atan2( 1 , - 1 )
geek3 = atan(zoo)
print (geek1)
print (geek2)
print (geek3)
|
Output:
pi/4
3*pi/4
AccumBounds(-pi/2, pi/2)
Code #2:
Python3
from sympy import atan2
geek = atan2( - 1 , - 1 )
print (geek)
|
Output:
-3*pi/4
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...