import math
print(math.atan(0)) # 0.0
print(math.atan(0.1)) # 0.09966865249116204
print(math.atan(0.5)) # 0.4636476090008061
print(math.atan(1.5)) # 0.982793723247329
print(math.atan(10)) # 1.4711276743037347
print(math.atan(50)) # 1.550798992821746
print(math.atan(500)) # 1.5687963294615568
Note that all the inputs are in radian. import math
print(math.atan(-0.1)) # -0.09966865249116204
print(math.atan(-0.5)) # -0.4636476090008061
print(math.atan(-1.5)) # -0.982793723247329
print(math.atan(-10)) # -1.4711276743037347
print(math.atan(-50)) # -1.550798992821746
print(math.atan(-500)) # -1.5687963294615568
import math
in_degree = 57
in_redian = math.radians(in_degree)
print(math.atan(in_redian))
Output
0.782810326348054
import matplotlib.pyplot as plt
x=[]
y=[]
i=-1
while (i<=1):
x.append(i)
y.append(math.atan(i))
i=i+0.01
plt.plot(x,y)
plt.show()
acos()
asin() sin() tan()
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.