MathLib.csc()

MathLib.csc() calculates the cosecant of a number (given in radians). \[ \text{MathLib.csc}(x) = \csc(x) \]

Examples

To calculate the cosecant of 2 type: MathLib.csc(2);

Specification

MathLib.csc 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.
  • MathLib.csc(NaN) = NaN
  • MathLib.csc(+0) = +∞
  • MathLib.csc(-0) = -∞
  • MathLib.csc(+∞) = NaN
  • MathLib.csc(-∞) = NaN
  • otherwise MathLib.csc(x) = cosecant of x

Implementation

MathLib uses the identity \[ \csc(x) = \frac{1}{\sin(x)} \] for its implementation of cosecant.

Tests

Categories: unary Function