1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.createAcoth = void 0;
|
7 |
|
8 | var _factory = require("../../utils/factory");
|
9 |
|
10 | var _collection = require("../../utils/collection");
|
11 |
|
12 | var _number = require("../../plain/number");
|
13 |
|
14 | var name = 'acoth';
|
15 | var dependencies = ['typed', 'config', 'Complex', 'BigNumber'];
|
16 | var createAcoth = (0, _factory.factory)(name, dependencies, function (_ref) {
|
17 | var typed = _ref.typed,
|
18 | config = _ref.config,
|
19 | Complex = _ref.Complex,
|
20 | _BigNumber = _ref.BigNumber;
|
21 |
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | var acoth = typed(name, {
|
44 | number: function number(x) {
|
45 | if (x >= 1 || x <= -1 || config.predictable) {
|
46 | return (0, _number.acothNumber)(x);
|
47 | }
|
48 |
|
49 | return new Complex(x, 0).acoth();
|
50 | },
|
51 | Complex: function Complex(x) {
|
52 | return x.acoth();
|
53 | },
|
54 | BigNumber: function BigNumber(x) {
|
55 | return new _BigNumber(1).div(x).atanh();
|
56 | },
|
57 | 'Array | Matrix': function ArrayMatrix(x) {
|
58 | return (0, _collection.deepMap)(x, acoth);
|
59 | }
|
60 | });
|
61 | return acoth;
|
62 | });
|
63 | exports.createAcoth = createAcoth; |
\ | No newline at end of file |