Documentation/Calc Functions/TAN

From The Document Foundation Wiki
Jump to: navigation, search

Other languages:

Function name:

TAN

Category:

Mathematical

Summary:

Returns the tangent of the given angle (in radians).

Syntax:

TAN(Number)

Returns:

Returns the (trigonometric) tangent of Number, the angle in radians. The resultant value ranges from -∞ and +∞, i.e. (-∞,+∞).

Arguments:

Number is the real number,or a reference to a cell containing that number, which is the angle in radians whose tangent value is to be calculated.

If Number is a multiple of PI/2 or π/2, i.e. {......-3π/2,-π/2,0,+π/2,+3π/2.....}, tan value is undefined, hence the function returns a numeric error(#NUM!) value.

Additional details:

  • The formula for tangent of an angle is:
Tane.png

where x in the Number.

  • Based on the above formula tangent is equivalent to 1 divided by the cotangent of that angle.
  • To insert an angle in degrees, either multiply the angle by PI()/180 or use the RADIANS function to convert the angle to radians.

The Fig. below illustrates the function TAN.

TAN function

Examples:

Formula Description Returns
=TAN(1) tangent of 1 radian 1.5574077246549
=TAN(PI()/4) tangent of PI/4 or π/4 radians 1
=TAN(RADIANS(45)) tangent of 45° by first converting angle in degrees to radians 1

Related LibreOffice functions:

ATAN

ATAN2

SIN

COS

COT

RADIANS

ODF standard:

Section 6.16.69, Part 2

Equivalent Excel functions:

TAN