Name: tan

Type: function

Syntax: the tan of <angleInRadians> 

Syntax: tan(<angleInRadians>)

Summary: <return|Returns> the tangent of an angle (in <radian|radians>).

Introduced: 1.0

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Example:
tan(pi) -- returns zero

Example:
the tan of myAngle

Parameters:
angleInRadians: 
angle: A positive or negative number, or an expression that evaluates to a number.

Returns: The <tan> <function> <return|returns> a number.

Description:
Use the <tan> <function> to find the tangent of an angle.

The <tan> <function> repeats every 2*pi <radian|radians>: tan(x) = tan(x + 2 * pi), for any value of x.

If the <angleInRadians> is an odd multiple of pi/2, the tangent is infinite (undefined). The <tan> <function> instead <return|returns> a very large number for such angles, due to internal number handling.

The <tan> <function> requires its input to be in <radian|radians>. To provide an angle in <degree|degrees>, use the following <custom function>:

  function tanInDegrees angleInDegrees
    return tan(angleInDegrees * pi / 180)
  end cosInDegrees

References: pi (constant), radian (glossary), custom function (glossary), return (glossary), degree (glossary), function (control_st)

Tags: math
