{"id":24304,"date":"2021-10-14T09:18:24","date_gmt":"2021-10-14T03:48:24","guid":{"rendered":"https:\/\/python-programs.com\/?p=24304"},"modified":"2021-11-05T21:05:32","modified_gmt":"2021-11-05T15:35:32","slug":"python-program-for-atan-function","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-atan-function\/","title":{"rendered":"Python Program for atan() Function"},"content":{"rendered":"

In the previous article, we have discussed Python Program for asin() Function<\/a>
\natan() Function in Python:<\/strong><\/p>\n

The arc tangent of a number (x) is returned as a numeric value between -PI\/2 and PI\/2 radians by the math.atan() method.<\/p>\n

Arc tangent is also defined as an inverse tangent function of x, where x is the value to be calculated for the arc tangent.<\/p>\n

Syntax:<\/strong><\/p>\n

math.atan(x)<\/pre>\n

Parameters:<\/strong><\/p>\n

x: <\/strong>This is Required. It is a number that is either positive or negative. If x is not a number, TypeError is returned.<\/p>\n

Return Value:<\/strong><\/p>\n

It returns a float value ranging from -PI\/2 to PI\/2 representing a number’s arc tangent.<\/p>\n

The Arc Tangent value is returned if the number argument is positive or negative.
\nThe atan() function throws a TypeError if the number argument is not a number.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given first number = 0.7\r\nGiven second number = 1<\/pre>\n

Output:<\/strong><\/p>\n

The result after applying atan() function on above given first number 0.7  =  0.6107259643892086\r\nThe result after applying atan() function on above given second number 1  =  0.7853981633974483<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given first number = -1\r\nGiven second number = 0.3<\/pre>\n

Output:<\/strong><\/p>\n

The result after applying atan() function on above given first number -1  =  -0.7853981633974483\r\nThe result after applying atan() function on above given second number 0.3  =  0.2914567944778671<\/pre>\n

Program for atan() Function in Python<\/h2>\n