mathjs 11.11.0 → 11.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HISTORY.md +11 -0
- package/lib/browser/math.js +1 -1
- package/lib/browser/math.js.LICENSE.txt +2 -2
- package/lib/browser/math.js.map +1 -1
- package/lib/cjs/entry/dependenciesAny/dependenciesGcd.generated.js +4 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesMod.generated.js +4 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesPrintTransform.generated.js +24 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesQuantileSeq.generated.js +12 -0
- package/lib/cjs/entry/dependenciesAny/dependenciesQuantileSeqTransform.generated.js +12 -0
- package/lib/cjs/entry/dependenciesAny.generated.js +7 -0
- package/lib/cjs/entry/dependenciesNumber/dependenciesQuantileSeq.generated.js +10 -0
- package/lib/cjs/entry/impureFunctionsAny.generated.js +23 -11
- package/lib/cjs/entry/impureFunctionsNumber.generated.js +13 -13
- package/lib/cjs/entry/pureFunctionsAny.generated.js +55 -43
- package/lib/cjs/entry/pureFunctionsNumber.generated.js +20 -15
- package/lib/cjs/expression/embeddedDocs/function/utils/print.js +1 -1
- package/lib/cjs/expression/node/FunctionNode.js +3 -1
- package/lib/cjs/expression/transform/print.transform.js +47 -0
- package/lib/cjs/expression/transform/quantileSeq.transform.js +27 -5
- package/lib/cjs/factoriesAny.js +8 -1
- package/lib/cjs/function/algebra/simplify/util.js +2 -2
- package/lib/cjs/function/arithmetic/gcd.js +40 -4
- package/lib/cjs/function/arithmetic/mod.js +32 -3
- package/lib/cjs/function/numeric/solveODE.js +2 -2
- package/lib/cjs/function/statistics/quantileSeq.js +90 -167
- package/lib/cjs/function/string/print.js +5 -1
- package/lib/cjs/header.js +2 -2
- package/lib/cjs/plain/number/arithmetic.js +4 -12
- package/lib/cjs/type/unit/Unit.js +2 -2
- package/lib/cjs/utils/print.js +8 -0
- package/lib/cjs/utils/snapshot.js +8 -8
- package/lib/cjs/version.js +1 -1
- package/lib/esm/entry/dependenciesAny/dependenciesGcd.generated.js +4 -0
- package/lib/esm/entry/dependenciesAny/dependenciesMod.generated.js +4 -0
- package/lib/esm/entry/dependenciesAny/dependenciesPrintTransform.generated.js +16 -0
- package/lib/esm/entry/dependenciesAny/dependenciesQuantileSeq.generated.js +12 -0
- package/lib/esm/entry/dependenciesAny/dependenciesQuantileSeqTransform.generated.js +12 -0
- package/lib/esm/entry/dependenciesAny.generated.js +1 -0
- package/lib/esm/entry/dependenciesNumber/dependenciesQuantileSeq.generated.js +10 -0
- package/lib/esm/entry/impureFunctionsAny.generated.js +25 -13
- package/lib/esm/entry/impureFunctionsNumber.generated.js +15 -15
- package/lib/esm/entry/pureFunctionsAny.generated.js +51 -39
- package/lib/esm/entry/pureFunctionsNumber.generated.js +19 -14
- package/lib/esm/expression/embeddedDocs/function/utils/print.js +1 -1
- package/lib/esm/expression/node/FunctionNode.js +3 -1
- package/lib/esm/expression/transform/print.transform.js +42 -0
- package/lib/esm/expression/transform/quantileSeq.transform.js +23 -5
- package/lib/esm/factoriesAny.js +2 -1
- package/lib/esm/function/algebra/simplify/util.js +2 -2
- package/lib/esm/function/arithmetic/gcd.js +40 -4
- package/lib/esm/function/arithmetic/mod.js +32 -3
- package/lib/esm/function/numeric/solveODE.js +2 -2
- package/lib/esm/function/statistics/quantileSeq.js +82 -165
- package/lib/esm/function/string/print.js +5 -1
- package/lib/esm/plain/number/arithmetic.js +4 -12
- package/lib/esm/type/unit/Unit.js +2 -2
- package/lib/esm/utils/print.js +1 -0
- package/lib/esm/utils/snapshot.js +2 -2
- package/lib/esm/version.js +1 -1
- package/package.json +20 -20
@@ -1,18 +1,29 @@
|
|
1
|
-
import {
|
1
|
+
import { isNumber } from '../../utils/is.js';
|
2
2
|
import { flatten } from '../../utils/array.js';
|
3
3
|
import { factory } from '../../utils/factory.js';
|
4
4
|
import { createApply } from '../matrix/apply.js';
|
5
5
|
var name = 'quantileSeq';
|
6
|
-
var dependencies = ['typed', 'add', 'multiply', 'partitionSelect', 'compare', 'isInteger'];
|
6
|
+
var dependencies = ['typed', '?bignumber', 'add', 'subtract', 'divide', 'multiply', 'partitionSelect', 'compare', 'isInteger', 'smaller', 'smallerEq', 'larger'];
|
7
7
|
export var createQuantileSeq = /* #__PURE__ */factory(name, dependencies, _ref => {
|
8
8
|
var {
|
9
9
|
typed,
|
10
|
+
bignumber,
|
10
11
|
add,
|
12
|
+
subtract,
|
13
|
+
divide,
|
11
14
|
multiply,
|
12
15
|
partitionSelect,
|
13
16
|
compare,
|
14
|
-
isInteger
|
17
|
+
isInteger,
|
18
|
+
smaller,
|
19
|
+
smallerEq,
|
20
|
+
larger
|
15
21
|
} = _ref;
|
22
|
+
var apply = createApply({
|
23
|
+
typed,
|
24
|
+
isInteger
|
25
|
+
});
|
26
|
+
|
16
27
|
/**
|
17
28
|
* Compute the prob order quantile of a matrix or a list with values.
|
18
29
|
* The sequence is sorted and the middle value is returned.
|
@@ -47,122 +58,69 @@ export var createQuantileSeq = /* #__PURE__ */factory(name, dependencies, _ref =
|
|
47
58
|
* @param {Boolean} sorted=false is data sorted in ascending order
|
48
59
|
* @return {Number, BigNumber, Unit, Array} Quantile(s)
|
49
60
|
*/
|
50
|
-
|
51
|
-
var apply = createApply({
|
52
|
-
typed,
|
53
|
-
isInteger
|
54
|
-
});
|
55
|
-
/**
|
56
|
-
* Check if array value types are valid, throw error otherwise.
|
57
|
-
* @param {number | BigNumber | Unit} x
|
58
|
-
* @param {number | BigNumber | Unit} x
|
59
|
-
* @private
|
60
|
-
*/
|
61
|
-
var validate = typed({
|
62
|
-
'number | BigNumber | Unit': function numberBigNumberUnit(x) {
|
63
|
-
return x;
|
64
|
-
}
|
65
|
-
});
|
66
61
|
return typed(name, {
|
67
|
-
'Array|Matrix, number|BigNumber
|
68
|
-
'Array|Matrix, number|BigNumber
|
69
|
-
'Array|Matrix, number|BigNumber
|
70
|
-
'Array|Matrix, number|BigNumber
|
62
|
+
'Array | Matrix, number | BigNumber': (data, p) => _quantileSeqProbNumber(data, p, false),
|
63
|
+
'Array | Matrix, number | BigNumber, number': (data, prob, dim) => _quantileSeqDim(data, prob, false, dim, _quantileSeqProbNumber),
|
64
|
+
'Array | Matrix, number | BigNumber, boolean': _quantileSeqProbNumber,
|
65
|
+
'Array | Matrix, number | BigNumber, boolean, number': (data, prob, sorted, dim) => _quantileSeqDim(data, prob, sorted, dim, _quantileSeqProbNumber),
|
66
|
+
'Array | Matrix, Array | Matrix': (data, p) => _quantileSeqProbCollection(data, p, false),
|
67
|
+
'Array | Matrix, Array | Matrix, number': (data, prob, dim) => _quantileSeqDim(data, prob, false, dim, _quantileSeqProbCollection),
|
68
|
+
'Array | Matrix, Array | Matrix, boolean': _quantileSeqProbCollection,
|
69
|
+
'Array | Matrix, Array | Matrix, boolean, number': (data, prob, sorted, dim) => _quantileSeqDim(data, prob, sorted, dim, _quantileSeqProbCollection)
|
71
70
|
});
|
72
|
-
function _quantileSeqDim(data, prob, sorted, dim) {
|
73
|
-
|
74
|
-
return apply(data, dim, x => quantileSeq(x, prob, sorted));
|
71
|
+
function _quantileSeqDim(data, prob, sorted, dim, fn) {
|
72
|
+
return apply(data, dim, x => fn(x, prob, sorted));
|
75
73
|
}
|
76
|
-
function
|
77
|
-
var probArr
|
78
|
-
|
79
|
-
|
74
|
+
function _quantileSeqProbNumber(data, probOrN, sorted) {
|
75
|
+
var probArr;
|
76
|
+
var dataArr = data.valueOf();
|
77
|
+
if (smaller(probOrN, 0)) {
|
78
|
+
throw new Error('N/prob must be non-negative');
|
80
79
|
}
|
81
|
-
if (
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
if (probOrN <= 1) {
|
90
|
-
// quantileSeq([a, b, c, d, ...], prob[,sorted])
|
91
|
-
return _quantileSeq(dataArr, probOrN, sorted);
|
92
|
-
}
|
93
|
-
if (probOrN > 1) {
|
94
|
-
// quantileSeq([a, b, c, d, ...], N[,sorted])
|
95
|
-
if (!isInteger(probOrN)) {
|
96
|
-
throw new Error('N must be a positive integer');
|
97
|
-
}
|
98
|
-
var nPlusOne = probOrN + 1;
|
99
|
-
probArr = new Array(probOrN);
|
100
|
-
for (var i = 0; i < probOrN;) {
|
101
|
-
probArr[i] = _quantileSeq(dataArr, ++i / nPlusOne, sorted);
|
102
|
-
}
|
103
|
-
return probArr;
|
104
|
-
}
|
105
|
-
}
|
106
|
-
if (isBigNumber(probOrN)) {
|
107
|
-
var BigNumber = probOrN.constructor;
|
108
|
-
if (probOrN.isNegative()) {
|
109
|
-
throw new Error('N/prob must be non-negative');
|
110
|
-
}
|
111
|
-
one = new BigNumber(1);
|
112
|
-
if (probOrN.lte(one)) {
|
113
|
-
// quantileSeq([a, b, c, d, ...], prob[,sorted])
|
114
|
-
return new BigNumber(_quantileSeq(dataArr, probOrN, sorted));
|
115
|
-
}
|
116
|
-
if (probOrN.gt(one)) {
|
117
|
-
// quantileSeq([a, b, c, d, ...], N[,sorted])
|
118
|
-
if (!probOrN.isInteger()) {
|
119
|
-
throw new Error('N must be a positive integer');
|
120
|
-
}
|
121
|
-
|
122
|
-
// largest possible Array length is 2^32-1
|
123
|
-
// 2^32 < 10^15, thus safe conversion guaranteed
|
124
|
-
var intN = probOrN.toNumber();
|
125
|
-
if (intN > 4294967295) {
|
126
|
-
throw new Error('N must be less than or equal to 2^32-1, as that is the maximum length of an Array');
|
127
|
-
}
|
128
|
-
var _nPlusOne = new BigNumber(intN + 1);
|
129
|
-
probArr = new Array(intN);
|
130
|
-
for (var _i = 0; _i < intN;) {
|
131
|
-
probArr[_i] = new BigNumber(_quantileSeq(dataArr, new BigNumber(++_i).div(_nPlusOne), sorted));
|
132
|
-
}
|
133
|
-
return probArr;
|
134
|
-
}
|
135
|
-
}
|
136
|
-
if (isCollection(probOrN)) {
|
137
|
-
// quantileSeq([a, b, c, d, ...], [prob1, prob2, ...][,sorted])
|
138
|
-
var probOrNArr = probOrN.valueOf();
|
139
|
-
probArr = new Array(probOrNArr.length);
|
140
|
-
for (var _i2 = 0; _i2 < probArr.length; ++_i2) {
|
141
|
-
var currProb = probOrNArr[_i2];
|
142
|
-
if (isNumber(currProb)) {
|
143
|
-
if (currProb < 0 || currProb > 1) {
|
144
|
-
throw new Error('Probability must be between 0 and 1, inclusive');
|
145
|
-
}
|
146
|
-
} else if (isBigNumber(currProb)) {
|
147
|
-
one = new currProb.constructor(1);
|
148
|
-
if (currProb.isNegative() || currProb.gt(one)) {
|
149
|
-
throw new Error('Probability must be between 0 and 1, inclusive');
|
150
|
-
}
|
151
|
-
} else {
|
152
|
-
throw new TypeError('Unexpected type of argument in function quantileSeq'); // FIXME: becomes redundant when converted to typed-function
|
153
|
-
}
|
154
|
-
|
155
|
-
probArr[_i2] = _quantileSeq(dataArr, currProb, sorted);
|
156
|
-
}
|
157
|
-
return probArr;
|
158
|
-
}
|
159
|
-
throw new TypeError('Unexpected type of argument in function quantileSeq'); // FIXME: becomes redundant when converted to typed-function
|
80
|
+
if (smallerEq(probOrN, 1)) {
|
81
|
+
// quantileSeq([a, b, c, d, ...], prob[,sorted])
|
82
|
+
return isNumber(probOrN) ? _quantileSeq(dataArr, probOrN, sorted) : bignumber(_quantileSeq(dataArr, probOrN, sorted));
|
83
|
+
}
|
84
|
+
if (larger(probOrN, 1)) {
|
85
|
+
// quantileSeq([a, b, c, d, ...], N[,sorted])
|
86
|
+
if (!isInteger(probOrN)) {
|
87
|
+
throw new Error('N must be a positive integer');
|
160
88
|
}
|
161
89
|
|
162
|
-
|
90
|
+
// largest possible Array length is 2^32-1
|
91
|
+
// 2^32 < 10^15, thus safe conversion guaranteed
|
92
|
+
if (larger(probOrN, 4294967295)) {
|
93
|
+
throw new Error('N must be less than or equal to 2^32-1, as that is the maximum length of an Array');
|
94
|
+
}
|
95
|
+
var nPlusOne = add(probOrN, 1);
|
96
|
+
probArr = [];
|
97
|
+
for (var i = 0; smaller(i, probOrN); i++) {
|
98
|
+
var prob = divide(i + 1, nPlusOne);
|
99
|
+
probArr.push(_quantileSeq(dataArr, prob, sorted));
|
100
|
+
}
|
101
|
+
return isNumber(probOrN) ? probArr : bignumber(probArr);
|
163
102
|
}
|
103
|
+
}
|
164
104
|
|
165
|
-
|
105
|
+
/**
|
106
|
+
* Calculate the prob order quantile of an n-dimensional array.
|
107
|
+
*
|
108
|
+
* @param {Array, Matrix} array
|
109
|
+
* @param {Array, Matrix} prob
|
110
|
+
* @param {Boolean} sorted
|
111
|
+
* @return {Number, BigNumber, Unit} prob order quantile
|
112
|
+
* @private
|
113
|
+
*/
|
114
|
+
|
115
|
+
function _quantileSeqProbCollection(data, probOrN, sorted) {
|
116
|
+
var dataArr = data.valueOf();
|
117
|
+
// quantileSeq([a, b, c, d, ...], [prob1, prob2, ...][,sorted])
|
118
|
+
var probOrNArr = probOrN.valueOf();
|
119
|
+
var probArr = [];
|
120
|
+
for (var i = 0; i < probOrNArr.length; ++i) {
|
121
|
+
probArr.push(_quantileSeq(dataArr, probOrNArr[i], sorted));
|
122
|
+
}
|
123
|
+
return probArr;
|
166
124
|
}
|
167
125
|
|
168
126
|
/**
|
@@ -180,70 +138,29 @@ export var createQuantileSeq = /* #__PURE__ */factory(name, dependencies, _ref =
|
|
180
138
|
if (len === 0) {
|
181
139
|
throw new Error('Cannot calculate quantile of an empty sequence');
|
182
140
|
}
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
validate(value);
|
189
|
-
return value;
|
190
|
-
}
|
191
|
-
var _integerPart = Math.floor(_index);
|
192
|
-
var _left;
|
193
|
-
var _right;
|
194
|
-
if (sorted) {
|
195
|
-
_left = flat[_integerPart];
|
196
|
-
_right = flat[_integerPart + 1];
|
197
|
-
} else {
|
198
|
-
_right = partitionSelect(flat, _integerPart + 1);
|
199
|
-
|
200
|
-
// max of partition is kth largest
|
201
|
-
_left = flat[_integerPart];
|
202
|
-
for (var i = 0; i < _integerPart; ++i) {
|
203
|
-
if (compare(flat[i], _left) > 0) {
|
204
|
-
_left = flat[i];
|
205
|
-
}
|
206
|
-
}
|
207
|
-
}
|
208
|
-
validate(_left);
|
209
|
-
validate(_right);
|
210
|
-
|
211
|
-
// Q(prob) = (1-f)*A[floor(index)] + f*A[floor(index)+1]
|
212
|
-
return add(multiply(_left, 1 - _fracPart), multiply(_right, _fracPart));
|
213
|
-
}
|
214
|
-
|
215
|
-
// If prob is a BigNumber
|
216
|
-
var index = prob.times(len - 1);
|
217
|
-
if (index.isInteger()) {
|
218
|
-
index = index.toNumber();
|
219
|
-
var _value = sorted ? flat[index] : partitionSelect(flat, index);
|
220
|
-
validate(_value);
|
221
|
-
return _value;
|
141
|
+
var index = isNumber(prob) ? prob * (len - 1) : prob.times(len - 1);
|
142
|
+
var integerPart = isNumber(prob) ? Math.floor(index) : index.floor().toNumber();
|
143
|
+
var fracPart = isNumber(prob) ? index % 1 : index.minus(integerPart);
|
144
|
+
if (isInteger(index)) {
|
145
|
+
return sorted ? flat[index] : partitionSelect(flat, isNumber(prob) ? index : index.valueOf());
|
222
146
|
}
|
223
|
-
var integerPart = index.floor();
|
224
|
-
var fracPart = index.minus(integerPart);
|
225
|
-
var integerPartNumber = integerPart.toNumber();
|
226
147
|
var left;
|
227
148
|
var right;
|
228
149
|
if (sorted) {
|
229
|
-
left = flat[
|
230
|
-
right = flat[
|
150
|
+
left = flat[integerPart];
|
151
|
+
right = flat[integerPart + 1];
|
231
152
|
} else {
|
232
|
-
right = partitionSelect(flat,
|
153
|
+
right = partitionSelect(flat, integerPart + 1);
|
233
154
|
|
234
155
|
// max of partition is kth largest
|
235
|
-
left = flat[
|
236
|
-
for (var
|
237
|
-
if (compare(flat[
|
238
|
-
left = flat[
|
156
|
+
left = flat[integerPart];
|
157
|
+
for (var i = 0; i < integerPart; ++i) {
|
158
|
+
if (compare(flat[i], left) > 0) {
|
159
|
+
left = flat[i];
|
239
160
|
}
|
240
161
|
}
|
241
162
|
}
|
242
|
-
validate(left);
|
243
|
-
validate(right);
|
244
|
-
|
245
163
|
// Q(prob) = (1-f)*A[floor(index)] + f*A[floor(index)+1]
|
246
|
-
|
247
|
-
return add(multiply(left, one.minus(fracPart)), multiply(right, fracPart));
|
164
|
+
return add(multiply(left, subtract(1, fracPart)), multiply(right, fracPart));
|
248
165
|
}
|
249
166
|
});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { format } from '../../utils/string.js';
|
2
2
|
import { isString } from '../../utils/is.js';
|
3
3
|
import { factory } from '../../utils/factory.js';
|
4
|
+
import { printTemplate } from '../../utils/print.js';
|
4
5
|
var name = 'print';
|
5
6
|
var dependencies = ['typed'];
|
6
7
|
export var createPrint = /* #__PURE__ */factory(name, dependencies, _ref => {
|
@@ -67,9 +68,12 @@ export var createPrint = /* #__PURE__ */factory(name, dependencies, _ref => {
|
|
67
68
|
* @private
|
68
69
|
*/
|
69
70
|
function _print(template, values, options) {
|
70
|
-
return template.replace(
|
71
|
+
return template.replace(printTemplate, function (original, key) {
|
71
72
|
var keys = key.split('.');
|
72
73
|
var value = values[keys.shift()];
|
74
|
+
if (value !== undefined && value.isMatrix) {
|
75
|
+
value = value.toArray();
|
76
|
+
}
|
73
77
|
while (keys.length && value !== undefined) {
|
74
78
|
var k = keys.shift();
|
75
79
|
value = k ? value[k] : value + '.';
|
@@ -146,18 +146,10 @@ log1pNumber.signature = n1;
|
|
146
146
|
* @private
|
147
147
|
*/
|
148
148
|
export function modNumber(x, y) {
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
return x - y * Math.floor(x / y);
|
154
|
-
} else if (y === 0) {
|
155
|
-
return x;
|
156
|
-
} else {
|
157
|
-
// y < 0
|
158
|
-
// TODO: implement mod for a negative divisor
|
159
|
-
throw new Error('Cannot calculate mod for a negative divisor');
|
160
|
-
}
|
149
|
+
// We don't use JavaScript's % operator here as this doesn't work
|
150
|
+
// correctly for x < 0 and x === 0
|
151
|
+
// see https://en.wikipedia.org/wiki/Modulo_operation
|
152
|
+
return y === 0 ? x : x - y * Math.floor(x / y);
|
161
153
|
}
|
162
154
|
modNumber.signature = n2;
|
163
155
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
3
|
-
function ownKeys(
|
4
|
-
function _objectSpread(
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
5
|
import { isComplex, isUnit, typeOf } from '../../utils/is.js';
|
6
6
|
import { factory } from '../../utils/factory.js';
|
7
7
|
import { memoize } from '../../utils/function.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export var printTemplate = /\$([\w.]+)/g;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
-
function ownKeys(
|
4
|
-
function _objectSpread(
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
5
|
/**
|
6
6
|
* This file contains helper methods to create expected snapshot structures
|
7
7
|
* of both instance and ES6 exports.
|
package/lib/esm/version.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mathjs",
|
3
|
-
"version": "11.11.
|
3
|
+
"version": "11.11.1",
|
4
4
|
"description": "Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.",
|
5
5
|
"author": "Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)",
|
6
6
|
"homepage": "https://mathjs.org",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"unit"
|
26
26
|
],
|
27
27
|
"dependencies": {
|
28
|
-
"@babel/runtime": "^7.22.
|
28
|
+
"@babel/runtime": "^7.22.15",
|
29
29
|
"complex.js": "^2.1.1",
|
30
30
|
"decimal.js": "^10.4.3",
|
31
31
|
"escape-latex": "^1.2.0",
|
@@ -33,33 +33,33 @@
|
|
33
33
|
"javascript-natural-sort": "^0.7.1",
|
34
34
|
"seedrandom": "^3.0.5",
|
35
35
|
"tiny-emitter": "^2.1.0",
|
36
|
-
"typed-function": "^4.1.
|
36
|
+
"typed-function": "^4.1.1"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@babel/core": "7.22.
|
39
|
+
"@babel/core": "7.22.20",
|
40
40
|
"@babel/plugin-transform-object-assign": "7.22.5",
|
41
|
-
"@babel/plugin-transform-runtime": "7.22.
|
42
|
-
"@babel/preset-env": "7.22.
|
43
|
-
"@babel/register": "7.22.
|
41
|
+
"@babel/plugin-transform-runtime": "7.22.15",
|
42
|
+
"@babel/preset-env": "7.22.20",
|
43
|
+
"@babel/register": "7.22.15",
|
44
44
|
"@types/assert": "1.5.6",
|
45
45
|
"@types/mocha": "10.0.1",
|
46
|
-
"@typescript-eslint/eslint-plugin": "6.
|
47
|
-
"@typescript-eslint/parser": "6.
|
48
|
-
"assert": "2.
|
46
|
+
"@typescript-eslint/eslint-plugin": "6.7.2",
|
47
|
+
"@typescript-eslint/parser": "6.7.2",
|
48
|
+
"assert": "2.1.0",
|
49
49
|
"babel-loader": "9.1.3",
|
50
50
|
"benchmark": "2.1.4",
|
51
|
-
"c8": "8.0.
|
51
|
+
"c8": "8.0.1",
|
52
52
|
"codecov": "3.8.3",
|
53
|
-
"core-js": "3.
|
53
|
+
"core-js": "3.32.2",
|
54
54
|
"del": "6.1.1",
|
55
55
|
"dtslint": "4.2.1",
|
56
|
-
"eslint": "8.
|
57
|
-
"eslint-config-prettier": "
|
56
|
+
"eslint": "8.49.0",
|
57
|
+
"eslint-config-prettier": "9.0.0",
|
58
58
|
"eslint-config-standard": "17.1.0",
|
59
|
-
"eslint-plugin-import": "2.
|
59
|
+
"eslint-plugin-import": "2.28.1",
|
60
60
|
"eslint-plugin-mocha": "10.1.0",
|
61
|
-
"eslint-plugin-n": "16.0
|
62
|
-
"eslint-plugin-prettier": "
|
61
|
+
"eslint-plugin-n": "16.1.0",
|
62
|
+
"eslint-plugin-prettier": "5.0.0",
|
63
63
|
"eslint-plugin-promise": "6.1.1",
|
64
64
|
"expect-type": "0.16.0",
|
65
65
|
"expr-eval": "2.0.2",
|
@@ -67,7 +67,7 @@
|
|
67
67
|
"glob": "8.1.0",
|
68
68
|
"gulp": "4.0.2",
|
69
69
|
"gulp-babel": "8.0.0",
|
70
|
-
"handlebars": "4.7.
|
70
|
+
"handlebars": "4.7.8",
|
71
71
|
"jsep": "1.3.8",
|
72
72
|
"karma": "6.4.2",
|
73
73
|
"karma-browserstack-launcher": "1.6.0",
|
@@ -85,11 +85,11 @@
|
|
85
85
|
"ndarray-pack": "1.2.1",
|
86
86
|
"numericjs": "1.2.6",
|
87
87
|
"pad-right": "0.2.2",
|
88
|
-
"prettier": "
|
88
|
+
"prettier": "3.0.3",
|
89
89
|
"process": "0.11.10",
|
90
90
|
"sylvester": "0.0.21",
|
91
91
|
"ts-node": "10.9.1",
|
92
|
-
"typescript": "5.
|
92
|
+
"typescript": "5.2.2",
|
93
93
|
"webpack": "5.88.2",
|
94
94
|
"zeros": "1.0.0"
|
95
95
|
},
|