Double-precision floating point (±1.7E±308, ~15 decimal digits)
1st Parameter
The angle in radians for which the tangent value is to be computed.
Read more about parameters of tan in parameters section
The tanfunction in C language Calculates the tangent of the specified angle in radians.
The tan function computes the tangent of x (measured in radians). Mathematically, it is equivalent to sin(x) / cos(x). The tangent function is periodic with a period of π radians.
The tanfunction takes 1
parameter:
•
double `x`: The angle in radians for which the tangent value is to be computed.
Computes the tangent of the angle `x` (measured in radians). Returns the result as a `double`. The function may produce undefined behavior for angles where the tangent is not finite (e.g., π/2 + kπ, where k is an integer).
The tan function return value :
Returns the tangent of x
If x is infinite, a domain error occurs and the function returns NaN
If x is NaN, NaN is returned
Output
This example calculates the tangent of 45 degrees (converted to radians).