1 | import { factory } from '../../utils/factory.js';
|
2 | import { deepMap } from '../../utils/collection.js';
|
3 | import { acothNumber } from '../../plain/number/index.js';
|
4 | var name = 'acoth';
|
5 | var dependencies = ['typed', 'config', 'Complex', 'BigNumber'];
|
6 | export var createAcoth = factory(name, dependencies, (_ref) => {
|
7 | var {
|
8 | typed,
|
9 | config,
|
10 | Complex,
|
11 | BigNumber: _BigNumber
|
12 | } = _ref;
|
13 |
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | return typed(name, {
|
36 | number: function number(x) {
|
37 | if (x >= 1 || x <= -1 || config.predictable) {
|
38 | return acothNumber(x);
|
39 | }
|
40 |
|
41 | return new Complex(x, 0).acoth();
|
42 | },
|
43 | Complex: function Complex(x) {
|
44 | return x.acoth();
|
45 | },
|
46 | BigNumber: function BigNumber(x) {
|
47 | return new _BigNumber(1).div(x).atanh();
|
48 | },
|
49 | 'Array | Matrix': function ArrayMatrix(x) {
|
50 | return deepMap(x, this);
|
51 | }
|
52 | });
|
53 | }); |
\ | No newline at end of file |