Function reference · Trigonometry

sec

Returns the secant, 1/cos(x).

Where cosine is zero, at odd multiples of π/2, it throws an error.

Notation

sec(x)

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

nerdamer.sec

nerdamer.sec(x: ExpressionInput): Expression

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

Examples

1/cos(π/3).

sec(pi/3)
// → 2
Open in Playground

1/cos(π).

sec(pi)
// → -1
Open in Playground

← Back to Function reference