Function

nerdamer.arctan

src/index.ts:748
nerdamer.arctan(x: ExpressionInput): Expression

Computes the arctangent (inverse tangent) of an expression. Returns exact symbolic values involving π for well-known inputs:

`0 → 0`

,

`1/√3 → π/6`

,

`1 → π/4`

,

`√3 → π/3`

. Uses the identity

`atan(-x) = -atan(x)`

for negative arguments. At infinity:

`atan(+∞) = π/2`

,

`atan(−∞) = −π/2`

.

Parameters

NameTypeDescription
xExpressionInputThe input expression.

Returns

Expression — The arctangent of `x` in radians.

Examples

atan(0).text()              // "0"
atan(1).text()              // "1/4*pi"
atan('sqrt(3)').text()      // "1/3*pi"

// Symbolic
atan('x').text()            // "atan(x)"