Compute tangent of x, where x is in degrees


In the Julia programming language, the function tand(x) is used to compute the tangent of x, where x is in degrees.

julia> tand(45)

This example calculates the tangent of 45 degrees.

julia> tand(30)

It computes the tangent of 30 degrees.

julia> tand(0)

This example calculates the tangent of 0 degrees.

Common mistake example:

julia> tand(pi/2)
ERROR: MethodError: no method matching tand(::Float64)

In this case, the tand function expects an input in degrees, but pi/2 is given in radians. Make sure to convert the input to degrees before using tand if necessary.

See Also

acos, acosd, acosh, acot, acotd, acoth, acsc, acscd, acsch, asec, asecd, asech, asin, asind, asinh, atan, atan2, atand, atanh, cos, cosc, cosd, cosh, cospi, cot, cotd, coth, csc, cscd, csch, deg2rad, rad2deg, sin, sinc, sind, sinh, sinpi, tan, tand, tanh,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field

Checking you are not a robot: