TAN
Description
The TAN
function is used to calculate the tangent of a given angle. In mathematics, the tangent value represents the ratio of the opposite side to the adjacent side in a right-angled triangle. This function has a wide range of applications in trigonometric calculations and angle conversions.
Syntax
Parameters
expr
: The angle for which the tangent value needs to be calculated, of typeDOUBLE
.
Return Value
Returns the calculated tangent value, of type DOUBLE
.
Example
- Calculate the tangent value of 0 degrees:
- Calculate the tangent value of 45 degrees:
- Calculate the tangent of 90 degrees (result is infinity):
- Calculate the tangent of -90 degrees (result is negative infinity):
- Calculate the tangent value of 180 degrees: