C++ Math atan()The function computes the inverse tangent of a number given in radian.
atan(x) = tan-1x
SyntaxSuppose a number is 'x'. Syntax would be: Note: If the value passed is an integer type, then it is cast to double.Parameterx: The value whose inverse tangent is to be calculated. Return valueIt returns the value in the range[-∏/2, ∏/2]. Example 1Let's see a simple example when the value of x is zero. Output: Value of tangent is :0 Inverse of tangent is :0 In this example, atan() function calculates the inverse tangent of a number when the value of x is equal to zero. Example 2Let's see the simple example when the value of x is negative. Output: Value of tangent is : -2.35197 Inverse of tangent is : -0.863063 In this example, atan() function calculates the inverse tangent of a number when the value of x is negative. Example 3Let's see a simple example when the value of x is positive. Output: Value of tangent is : 0.576996 Inverse of tangent is : 0.48214 In this example, atan() function calculates the inverse tangent of a number when the value of x is positive.
Next TopicC++ Math Functions
|