1 | 'use strict';
|
2 |
|
3 | var deepMap = require('../../utils/collection/deepMap');
|
4 |
|
5 | function factory(type, config, load, typed) {
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | var acsch = typed('acsch', {
|
28 | 'number': function number(x) {
|
29 | x = 1 / x;
|
30 | return Math.log(x + Math.sqrt(x * x + 1));
|
31 | },
|
32 |
|
33 | 'Complex': function Complex(x) {
|
34 | return x.acsch();
|
35 | },
|
36 |
|
37 | 'BigNumber': function BigNumber(x) {
|
38 | return new type.BigNumber(1).div(x).asinh();
|
39 | },
|
40 |
|
41 | 'Array | Matrix': function ArrayMatrix(x) {
|
42 | return deepMap(x, acsch);
|
43 | }
|
44 | });
|
45 |
|
46 | acsch.toTex = { 1: '\\mathrm{csch}^{-1}\\left(${args[0]}\\right)' };
|
47 |
|
48 | return acsch;
|
49 | }
|
50 |
|
51 | exports.name = 'acsch';
|
52 | exports.factory = factory; |
\ | No newline at end of file |