Function reference · Trigonometry

tan

Returns the tangent of an angle in radians.

Exact values come out at multiples of π/6, π/4 and π/3; other angles stay as they are until you evaluate them.

At odd multiples of π/2, where tangent is undefined, it throws an error.

Notation

tan(x)

Write it in an expression: nerdamer('tan(pi/4)'), or in the Playground.

nerdamer.tan

nerdamer.tan(x: ExpressionInput): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

A special angle.

tan(pi/4)
// → 1
Open in Playground

Tangent is odd.

tan(-x)
// → -tan(x)
Open in Playground

Tangent undoes arctangent.

tan(atan(3/4))
// → 3/4
Open in Playground

← Back to Function reference