mathjs 11.3.2 → 11.3.3
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/expression/embeddedDocs/function/arithmetic/sqrtm.js +1 -1
- package/lib/cjs/function/matrix/sqrtm.js +1 -1
- package/lib/cjs/header.js +2 -2
- package/lib/cjs/type/matrix/SparseMatrix.js +4 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/expression/embeddedDocs/function/arithmetic/sqrtm.js +1 -1
- package/lib/esm/function/matrix/sqrtm.js +1 -1
- package/lib/esm/type/matrix/SparseMatrix.js +4 -2
- package/lib/esm/version.js +1 -1
- package/package.json +10 -10
- package/types/index.d.ts +2 -2
@@ -9,7 +9,7 @@ var sqrtmDocs = {
|
|
9
9
|
category: 'Arithmetic',
|
10
10
|
syntax: ['sqrtm(x)'],
|
11
11
|
description: 'Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.',
|
12
|
-
examples: ['sqrtm([[
|
12
|
+
examples: ['sqrtm([[33, 24], [48, 57]])'],
|
13
13
|
seealso: ['sqrt', 'abs', 'square', 'multiply']
|
14
14
|
};
|
15
15
|
exports.sqrtmDocs = sqrtmDocs;
|
@@ -63,7 +63,7 @@ var createSqrtm = /* #__PURE__ */(0, _factory.factory)(name, dependencies, funct
|
|
63
63
|
*
|
64
64
|
* Examples:
|
65
65
|
*
|
66
|
-
* math.sqrtm([[
|
66
|
+
* math.sqrtm([[33, 24], [48, 57]]) // returns [[5, 2], [4, 7]]
|
67
67
|
*
|
68
68
|
* See also:
|
69
69
|
*
|
package/lib/cjs/header.js
CHANGED
@@ -6,8 +6,8 @@
|
|
6
6
|
* It features real and complex numbers, units, matrices, a large set of
|
7
7
|
* mathematical functions, and a flexible expression parser.
|
8
8
|
*
|
9
|
-
* @version 11.3.
|
10
|
-
* @date 2022-
|
9
|
+
* @version 11.3.3
|
10
|
+
* @date 2022-11-07
|
11
11
|
*
|
12
12
|
* @license
|
13
13
|
* Copyright (C) 2013-2022 Jos de Jong <wjosdejong@gmail.com>
|
@@ -532,8 +532,10 @@ var createSparseMatrixClass = /* #__PURE__ */(0, _factory.factory)(name, depende
|
|
532
532
|
_remove(k, j, this._values, this._index, this._ptr);
|
533
533
|
}
|
534
534
|
} else {
|
535
|
-
|
536
|
-
|
535
|
+
if (!eq(v, zero)) {
|
536
|
+
// insert value @ (i, j)
|
537
|
+
_insert(k, i, j, v, this._values, this._index, this._ptr);
|
538
|
+
}
|
537
539
|
}
|
538
540
|
return this;
|
539
541
|
};
|
package/lib/cjs/version.js
CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.version = void 0;
|
7
|
-
var version = '11.3.
|
7
|
+
var version = '11.3.3';
|
8
8
|
// Note: This file is automatically generated when building math.js.
|
9
9
|
// Changes made in this file will be overwritten.
|
10
10
|
exports.version = version;
|
@@ -3,6 +3,6 @@ export var sqrtmDocs = {
|
|
3
3
|
category: 'Arithmetic',
|
4
4
|
syntax: ['sqrtm(x)'],
|
5
5
|
description: 'Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.',
|
6
|
-
examples: ['sqrtm([[
|
6
|
+
examples: ['sqrtm([[33, 24], [48, 57]])'],
|
7
7
|
seealso: ['sqrt', 'abs', 'square', 'multiply']
|
8
8
|
};
|
@@ -59,7 +59,7 @@ export var createSqrtm = /* #__PURE__ */factory(name, dependencies, _ref => {
|
|
59
59
|
*
|
60
60
|
* Examples:
|
61
61
|
*
|
62
|
-
* math.sqrtm([[
|
62
|
+
* math.sqrtm([[33, 24], [48, 57]]) // returns [[5, 2], [4, 7]]
|
63
63
|
*
|
64
64
|
* See also:
|
65
65
|
*
|
@@ -526,8 +526,10 @@ export var createSparseMatrixClass = /* #__PURE__ */factory(name, dependencies,
|
|
526
526
|
_remove(k, j, this._values, this._index, this._ptr);
|
527
527
|
}
|
528
528
|
} else {
|
529
|
-
|
530
|
-
|
529
|
+
if (!eq(v, zero)) {
|
530
|
+
// insert value @ (i, j)
|
531
|
+
_insert(k, i, j, v, this._values, this._index, this._ptr);
|
532
|
+
}
|
531
533
|
}
|
532
534
|
return this;
|
533
535
|
};
|
package/lib/esm/version.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mathjs",
|
3
|
-
"version": "11.3.
|
3
|
+
"version": "11.3.3",
|
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.
|
28
|
+
"@babel/runtime": "^7.20.1",
|
29
29
|
"complex.js": "^2.1.1",
|
30
30
|
"decimal.js": "^10.4.2",
|
31
31
|
"escape-latex": "^1.2.0",
|
@@ -36,28 +36,28 @@
|
|
36
36
|
"typed-function": "^4.1.0"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@babel/core": "7.
|
39
|
+
"@babel/core": "7.20.2",
|
40
40
|
"@babel/plugin-transform-object-assign": "7.18.6",
|
41
41
|
"@babel/plugin-transform-runtime": "7.19.6",
|
42
|
-
"@babel/preset-env": "7.
|
42
|
+
"@babel/preset-env": "7.20.2",
|
43
43
|
"@babel/register": "7.18.9",
|
44
44
|
"@types/assert": "1.5.6",
|
45
45
|
"@types/mocha": "10.0.0",
|
46
|
-
"@typescript-eslint/eslint-plugin": "5.
|
47
|
-
"@typescript-eslint/parser": "5.
|
46
|
+
"@typescript-eslint/eslint-plugin": "5.42.0",
|
47
|
+
"@typescript-eslint/parser": "5.42.0",
|
48
48
|
"assert": "2.0.0",
|
49
|
-
"babel-loader": "
|
49
|
+
"babel-loader": "9.1.0",
|
50
50
|
"benchmark": "2.1.4",
|
51
51
|
"codecov": "3.8.3",
|
52
52
|
"core-js": "3.26.0",
|
53
53
|
"del": "6.1.1",
|
54
54
|
"dtslint": "4.2.1",
|
55
|
-
"eslint": "8.
|
55
|
+
"eslint": "8.27.0",
|
56
56
|
"eslint-config-prettier": "8.5.0",
|
57
57
|
"eslint-config-standard": "17.0.0",
|
58
58
|
"eslint-plugin-import": "2.26.0",
|
59
59
|
"eslint-plugin-mocha": "10.1.0",
|
60
|
-
"eslint-plugin-n": "15.
|
60
|
+
"eslint-plugin-n": "15.5.0",
|
61
61
|
"eslint-plugin-prettier": "4.2.1",
|
62
62
|
"eslint-plugin-promise": "6.1.1",
|
63
63
|
"expect-type": "0.15.0",
|
@@ -78,7 +78,7 @@
|
|
78
78
|
"math-expression-evaluator": "1.4.0",
|
79
79
|
"mkdirp": "1.0.4",
|
80
80
|
"mocha": "10.1.0",
|
81
|
-
"mocha-junit-reporter": "2.1.
|
81
|
+
"mocha-junit-reporter": "2.1.1",
|
82
82
|
"ndarray": "1.0.19",
|
83
83
|
"ndarray-determinant": "1.0.0",
|
84
84
|
"ndarray-gemm": "1.0.0",
|
package/types/index.d.ts
CHANGED
@@ -287,8 +287,8 @@ declare namespace math {
|
|
287
287
|
interface FunctionNodeCtor {
|
288
288
|
new <TFn = SymbolNode, TArgs extends MathNode[] = MathNode[]>(
|
289
289
|
fn: TFn,
|
290
|
-
args:
|
291
|
-
): FunctionNode<
|
290
|
+
args: TArgs
|
291
|
+
): FunctionNode<TFn, TArgs>
|
292
292
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
293
293
|
onUndefinedFunction: (name: string) => any
|
294
294
|
}
|