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