Tan Function

Returns the tangent of a numeric expression.

Syntax
Tan(radians)

Parameters

radians
Specify a real number value representing an angle.

Return Values
Real number containing the tangent of the parameter radians.

Description
Tan returns the Tangent of the numeric expression. The numeric expression (radians) may be any numeric value as long as it is expressed in radian units.

To convert from degrees to radians, use the DegToRad function.

See Also
Abs Function, Atan Function, Atan2 Function, Cos Function, Int Function, Mod Operator, Not Operator, Sgn Function, Sin Function, Sqr Function, Str$ Function, Val Function

Tan Function Example

Function tantest
    Real num
    Print "Enter number in radians to calculate tangent for:"
    Input num
    Print "The tangent of ", num, "is ", Tan(num)
Fend

The examples shown below show some typical results using the Tan instruction from the Command window.

> print tan(0)
0.00
> print tan(degtorad(45))
1
>