Documentation/Calc Functions/TAN

From The Document Foundation Wiki
Jump to navigation Jump to search
This page contains changes which are not marked for translation.
Other languages:
English • ‎dansk



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.

Additional details:

  • Mathematically, tangent of odd multiples of π/2, i.e. {......-3π/2,-π/2,0,+π/2,+3π/2.....} is undefined but the PI() function uses an approximate value of π hence the function doesn't return any error value.
  • The formula for the 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 figure 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