MathLib.arccot()

MathLib.arccot() calculates the inverse cotangent of a number. \[ \text{MathLib.arccot}(x) = \operatorname{arccot}(x) \]

Examples

Evaluating

To calculate the inverse cotangent of 2 type: MathLib.arccot(2);

Plotting

It is very easy to generate a plot of the arccot function: var plot = new MathLib.Screen2D('plot', { width: 300, height: 300, lookAt: {x: 0, y: 1.5}, range: {x: 1.75, y: 1.75} }); MathLib.arccot.draw(plot, { lineColor: 'blue' });

Specification

MathLib.arccot accepts one argument. Any additional arguments will be ignored. The type of the argument should be number. For other argument types see the unary function specification.
  1. MathLib.arccot(NaN) = NaN
  2. MathLib.arccot(+∞) = +0
  3. MathLib.arccot(-∞) = π
  4. otherwise MathLib.arccot(x) = inverse cotangent of x

Implementation

MathLib uses the identity \[ \operatorname{arccot}(x) = \frac{\pi}{2} - \arctan(x) \] and the built-in JavaScript function Math.atan.

Tests

Categories: unary Function