1 |
|
2 |
|
3 | # Function asec
|
4 |
|
5 | Calculate the inverse secant of a value. Defined as `asec(x) = acos(1/x)`.
|
6 |
|
7 | For matrices, the function is evaluated element wise.
|
8 |
|
9 |
|
10 | ## Syntax
|
11 |
|
12 | ```js
|
13 | math.asec(x)
|
14 | ```
|
15 |
|
16 | ### Parameters
|
17 |
|
18 | Parameter | Type | Description
|
19 | --------- | ---- | -----------
|
20 | `x` | number | Complex | Array | Matrix | Function input
|
21 |
|
22 | ### Returns
|
23 |
|
24 | Type | Description
|
25 | ---- | -----------
|
26 | number | Complex | Array | Matrix | The arc secant of x
|
27 |
|
28 |
|
29 | ## Examples
|
30 |
|
31 | ```js
|
32 | math.asec(0.5) // returns 1.0471975511965979
|
33 | math.asec(math.sec(1.5)) // returns 1.5
|
34 |
|
35 | math.asec(2) // returns 0 + 1.3169578969248166 i
|
36 | ```
|
37 |
|
38 |
|
39 | ## See also
|
40 |
|
41 | [acos](acos.md),
|
42 | [acot](acot.md),
|
43 | [acsc](acsc.md)
|