UNPKG

mathjs

Version:

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif

42 lines (25 loc) 779 B
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> # Function cot Calculate the cotangent of a value. Defined as `cot(x) = 1 / tan(x)`. For matrices, the function is evaluated element wise. ## Syntax ```js math.cot(x) ``` ### Parameters Parameter | Type | Description --------- | ---- | ----------- `x` | number &#124; Complex &#124; Unit &#124; Array &#124; Matrix | Function input ### Returns Type | Description ---- | ----------- number &#124; Complex &#124; Array &#124; Matrix | Cotangent of x ## Examples ```js math.cot(2) // returns number -0.45765755436028577 1 / math.tan(2) // returns number -0.45765755436028577 ``` ## See also [tan](tan.md), [sec](sec.md), [csc](csc.md)