Skip to content

TAN function

Note: This draft page is under construction 🚧

Overview

TAN is a function of the Math and Trigonometry category that calculates the trigonometric tangent of an angle, returning a value in the range (-, +).

Usage

Syntax

TAN(angle) => tan

Argument descriptions

  • angle (number, required). The angle whose tangent is to be calculated, expressed in radians. To convert between degrees and radians, use the relation below. Alternatively, use the DEGREES or RADIANS functions.
1  degree=π180=0.01745329252 radians

Additional guidance

None.

Returned value

TAN returns a unitless number that is the trigonometric tangent of the specified angle.

Error conditions

  • In common with many other IronCalc functions, TAN propagates errors that are found in its argument.
  • If no argument, or more than one argument, is supplied, then TAN returns the #ERROR! error.
  • If the value of the angle argument is not (or cannot be converted to) a number, then TAN returns the #VALUE! error.
  • For some argument values, TAN may return a #DIV/0! error.
  • For more information about the different types of errors that you may encounter when using IronCalc functions, visit our Error Types page.

Details

  • The TAN function utilizes the tan() method provided by the Rust Standard Library.
  • The figure below illustrates the output of the TAN function for angles x in the range -2π to +2π.
  • Theoretically, tan(x) is undefined for any critical x that satisfies x=π2+kπ (where k is any integer). However, an exact representation of the mathmatical constant π requires infinite precision, which cannot be achieved with the floating-point representation available. Hence, TAN will return very large or very small values close to critical x values.

Examples

See some examples in IronCalc.