mathjs 12.4.0 → 12.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/HISTORY.md +22 -0
  2. package/README.md +28 -0
  3. package/bin/cli.js +1 -1
  4. package/bin/repl.js +1 -1
  5. package/lib/browser/math.js +1 -1
  6. package/lib/browser/math.js.LICENSE.txt +2 -2
  7. package/lib/browser/math.js.map +1 -1
  8. package/lib/cjs/core/create.js +3 -3
  9. package/lib/cjs/defaultInstance.js +1 -1
  10. package/lib/cjs/entry/allFactoriesAny.js +1 -1
  11. package/lib/cjs/entry/allFactoriesNumber.js +1 -1
  12. package/lib/cjs/expression/node/AccessorNode.js +2 -3
  13. package/lib/cjs/expression/node/ArrayNode.js +2 -3
  14. package/lib/cjs/expression/node/AssignmentNode.js +2 -3
  15. package/lib/cjs/expression/node/BlockNode.js +2 -3
  16. package/lib/cjs/expression/node/ConditionalNode.js +2 -3
  17. package/lib/cjs/expression/node/ConstantNode.js +7 -6
  18. package/lib/cjs/expression/node/FunctionAssignmentNode.js +2 -3
  19. package/lib/cjs/expression/node/FunctionNode.js +5 -6
  20. package/lib/cjs/expression/node/IndexNode.js +2 -3
  21. package/lib/cjs/expression/node/Node.js +1 -2
  22. package/lib/cjs/expression/node/ObjectNode.js +2 -3
  23. package/lib/cjs/expression/node/OperatorNode.js +2 -3
  24. package/lib/cjs/expression/node/ParenthesisNode.js +2 -3
  25. package/lib/cjs/expression/node/RangeNode.js +2 -3
  26. package/lib/cjs/expression/node/RelationalNode.js +2 -3
  27. package/lib/cjs/expression/node/SymbolNode.js +2 -3
  28. package/lib/cjs/function/algebra/simplifyCore.js +3 -0
  29. package/lib/cjs/function/algebra/sparse/csAmd.js +4 -2
  30. package/lib/cjs/function/algebra/sparse/csChol.js +4 -2
  31. package/lib/cjs/function/algebra/sparse/csCounts.js +4 -2
  32. package/lib/cjs/function/algebra/sparse/csCumsum.js +4 -2
  33. package/lib/cjs/function/algebra/sparse/csDfs.js +4 -2
  34. package/lib/cjs/function/algebra/sparse/csEreach.js +4 -2
  35. package/lib/cjs/function/algebra/sparse/csEtree.js +4 -2
  36. package/lib/cjs/function/algebra/sparse/csFkeep.js +4 -2
  37. package/lib/cjs/function/algebra/sparse/csFlip.js +4 -2
  38. package/lib/cjs/function/algebra/sparse/csIpvec.js +4 -0
  39. package/lib/cjs/function/algebra/sparse/csLeaf.js +4 -2
  40. package/lib/cjs/function/algebra/sparse/csLu.js +4 -2
  41. package/lib/cjs/function/algebra/sparse/csMark.js +4 -2
  42. package/lib/cjs/function/algebra/sparse/csMarked.js +4 -2
  43. package/lib/cjs/function/algebra/sparse/csPermute.js +4 -2
  44. package/lib/cjs/function/algebra/sparse/csPost.js +4 -2
  45. package/lib/cjs/function/algebra/sparse/csReach.js +4 -2
  46. package/lib/cjs/function/algebra/sparse/csSpsolve.js +4 -2
  47. package/lib/cjs/function/algebra/sparse/csSqr.js +4 -2
  48. package/lib/cjs/function/algebra/sparse/csSymperm.js +4 -2
  49. package/lib/cjs/function/algebra/sparse/csTdfs.js +4 -2
  50. package/lib/cjs/function/algebra/sparse/csUnflip.js +4 -2
  51. package/lib/cjs/function/utils/isNaN.js +5 -3
  52. package/lib/cjs/header.js +2 -2
  53. package/lib/cjs/type/unit/Unit.js +6 -2
  54. package/lib/cjs/utils/map.js +2 -4
  55. package/lib/cjs/utils/object.js +0 -6
  56. package/lib/cjs/utils/snapshot.js +1 -1
  57. package/lib/cjs/version.js +1 -1
  58. package/lib/esm/core/create.js +3 -3
  59. package/lib/esm/expression/node/ConstantNode.js +5 -3
  60. package/lib/esm/expression/node/FunctionNode.js +3 -3
  61. package/lib/esm/function/algebra/simplifyCore.js +3 -0
  62. package/lib/esm/function/algebra/sparse/csAmd.js +3 -2
  63. package/lib/esm/function/algebra/sparse/csChol.js +3 -2
  64. package/lib/esm/function/algebra/sparse/csCounts.js +3 -2
  65. package/lib/esm/function/algebra/sparse/csCumsum.js +4 -2
  66. package/lib/esm/function/algebra/sparse/csDfs.js +3 -2
  67. package/lib/esm/function/algebra/sparse/csEreach.js +3 -2
  68. package/lib/esm/function/algebra/sparse/csEtree.js +4 -2
  69. package/lib/esm/function/algebra/sparse/csFkeep.js +4 -2
  70. package/lib/esm/function/algebra/sparse/csFlip.js +4 -2
  71. package/lib/esm/function/algebra/sparse/csIpvec.js +4 -0
  72. package/lib/esm/function/algebra/sparse/csLeaf.js +4 -2
  73. package/lib/esm/function/algebra/sparse/csLu.js +4 -2
  74. package/lib/esm/function/algebra/sparse/csMark.js +4 -2
  75. package/lib/esm/function/algebra/sparse/csMarked.js +4 -2
  76. package/lib/esm/function/algebra/sparse/csPermute.js +4 -2
  77. package/lib/esm/function/algebra/sparse/csPost.js +3 -2
  78. package/lib/esm/function/algebra/sparse/csReach.js +4 -2
  79. package/lib/esm/function/algebra/sparse/csSpsolve.js +3 -2
  80. package/lib/esm/function/algebra/sparse/csSqr.js +3 -2
  81. package/lib/esm/function/algebra/sparse/csSymperm.js +3 -2
  82. package/lib/esm/function/algebra/sparse/csTdfs.js +4 -2
  83. package/lib/esm/function/algebra/sparse/csUnflip.js +3 -2
  84. package/lib/esm/function/utils/isNaN.js +1 -3
  85. package/lib/esm/type/unit/Unit.js +6 -2
  86. package/lib/esm/utils/object.js +0 -3
  87. package/lib/esm/version.js +1 -1
  88. package/package.json +18 -18
  89. package/types/index.d.ts +4 -0
@@ -1,3 +1,6 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
1
4
  import { csMark } from './csMark.js';
2
5
  import { csMarked } from './csMarked.js';
3
6
 
@@ -11,8 +14,6 @@ import { csMarked } from './csMarked.js';
11
14
  * The first n entries is the nonzero pattern, the last n entries is the stack
12
15
  *
13
16
  * @return {Number} The index for the nonzero pattern
14
- *
15
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
16
17
  */
17
18
  export function csEreach(a, k, parent, w) {
18
19
  // a arrays
@@ -1,11 +1,13 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  /**
2
6
  * Computes the elimination tree of Matrix A (using triu(A)) or the
3
7
  * elimination tree of A'A without forming A'A.
4
8
  *
5
9
  * @param {Matrix} a The A Matrix
6
10
  * @param {boolean} ata A value of true the function computes the etree of A'A
7
- *
8
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
9
11
  */
10
12
  export function csEtree(a, ata) {
11
13
  // check inputs
@@ -1,3 +1,7 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  /**
2
6
  * Keeps entries in the matrix when the callback function returns true, removes the entry otherwise
3
7
  *
@@ -10,8 +14,6 @@
10
14
  * @param {any} other The state
11
15
  *
12
16
  * @return The number of nonzero elements in the matrix
13
- *
14
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
15
17
  */
16
18
  export function csFkeep(a, callback, other) {
17
19
  // a arrays
@@ -1,9 +1,11 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  /**
2
6
  * This function "flips" its input about the integer -1.
3
7
  *
4
8
  * @param {Number} i The value to flip
5
- *
6
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
7
9
  */
8
10
  export function csFlip(i) {
9
11
  // flip the value
@@ -1,3 +1,7 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  /**
2
6
  * Permutes a vector; x = P'b. In MATLAB notation, x(p)=b.
3
7
  *
@@ -1,3 +1,7 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  /**
2
6
  * This function determines if j is a leaf of the ith row subtree.
3
7
  * Consider A(i,j), node j in ith row subtree and return lca(jprev,j)
@@ -11,8 +15,6 @@
11
15
  * @param {Number} ancestor The index offset within the workspace for the ancestor array
12
16
  *
13
17
  * @return {Object}
14
- *
15
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
16
18
  */
17
19
  export function csLeaf(i, j, w, first, maxfirst, prevleaf, ancestor) {
18
20
  var s, sparent;
@@ -1,3 +1,7 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  import { factory } from '../../../utils/factory.js';
2
6
  import { createCsSpsolve } from './csSpsolve.js';
3
7
  var name = 'csLu';
@@ -30,8 +34,6 @@ export var createCsLu = /* #__PURE__ */factory(name, dependencies, _ref => {
30
34
  * @param {Number} tol Partial pivoting threshold (1 for partial pivoting)
31
35
  *
32
36
  * @return {Number} The numeric LU factorization of A or null
33
- *
34
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
35
37
  */
36
38
  return function csLu(m, s, tol) {
37
39
  // validate input
@@ -1,3 +1,7 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  import { csFlip } from './csFlip.js';
2
6
 
3
7
  /**
@@ -5,8 +9,6 @@ import { csFlip } from './csFlip.js';
5
9
  *
6
10
  * @param {Array} w The array
7
11
  * @param {Number} j The array index
8
- *
9
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
10
12
  */
11
13
  export function csMark(w, j) {
12
14
  // mark w[j]
@@ -1,10 +1,12 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  /**
2
6
  * Checks if the node at w[j] is marked
3
7
  *
4
8
  * @param {Array} w The array
5
9
  * @param {Number} j The array index
6
- *
7
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
8
10
  */
9
11
  export function csMarked(w, j) {
10
12
  // check node is marked
@@ -1,3 +1,7 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  /**
2
6
  * Permutes a sparse matrix C = P * A * Q
3
7
  *
@@ -7,8 +11,6 @@
7
11
  * @param {boolean} values Create a pattern matrix (false), values and pattern otherwise
8
12
  *
9
13
  * @return {Matrix} C = P * A * Q, null on error
10
- *
11
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
12
14
  */
13
15
  export function csPermute(a, pinv, q, values) {
14
16
  // a arrays
@@ -1,3 +1,6 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
1
4
  import { csTdfs } from './csTdfs.js';
2
5
 
3
6
  /**
@@ -5,8 +8,6 @@ import { csTdfs } from './csTdfs.js';
5
8
  *
6
9
  * @param {Array} parent The tree or forest
7
10
  * @param {Number} n Number of columns
8
- *
9
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
10
11
  */
11
12
  export function csPost(parent, n) {
12
13
  // check inputs
@@ -1,3 +1,7 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  import { csMarked } from './csMarked.js';
2
6
  import { csMark } from './csMark.js';
3
7
  import { csDfs } from './csDfs.js';
@@ -15,8 +19,6 @@ import { csDfs } from './csDfs.js';
15
19
  * @param {Array} pinv The inverse row permutation vector
16
20
  *
17
21
  * @return {Number} The index for the nonzero pattern
18
- *
19
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
20
22
  */
21
23
  export function csReach(g, b, k, xi, pinv) {
22
24
  // g arrays
@@ -1,3 +1,6 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
1
4
  import { csReach } from './csReach.js';
2
5
  import { factory } from '../../../utils/factory.js';
3
6
  var name = 'csSpsolve';
@@ -24,8 +27,6 @@ export var createCsSpsolve = /* #__PURE__ */factory(name, dependencies, _ref =>
24
27
  * @param {boolean} lo The lower (true) upper triangular (false) flag
25
28
  *
26
29
  * @return {Number} The index for the nonzero pattern
27
- *
28
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
29
30
  */
30
31
  return function csSpsolve(g, b, k, xi, x, pinv, lo) {
31
32
  // g arrays
@@ -1,3 +1,6 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
1
4
  import { csPermute } from './csPermute.js';
2
5
  import { csPost } from './csPost.js';
3
6
  import { csEtree } from './csEtree.js';
@@ -30,8 +33,6 @@ export var createCsSqr = /* #__PURE__ */factory(name, dependencies, _ref => {
30
33
  * symbolic ordering and analysis for LU decomposition (false)
31
34
  *
32
35
  * @return {Object} The Symbolic ordering and analysis for matrix A
33
- *
34
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
35
36
  */
36
37
  return function csSqr(order, a, qr) {
37
38
  // a arrays
@@ -1,3 +1,6 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
1
4
  import { csCumsum } from './csCumsum.js';
2
5
  import { factory } from '../../../utils/factory.js';
3
6
  var name = 'csSymperm';
@@ -18,8 +21,6 @@ export var createCsSymperm = /* #__PURE__ */factory(name, dependencies, _ref =>
18
21
  * @param {boolean} values Process matrix values (true)
19
22
  *
20
23
  * @return {Matrix} The C matrix, C = P * A * P'
21
- *
22
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
23
24
  */
24
25
  return function csSymperm(a, pinv, values) {
25
26
  // A matrix arrays
@@ -1,3 +1,7 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
4
+
1
5
  /**
2
6
  * Depth-first search and postorder of a tree rooted at node j
3
7
  *
@@ -8,8 +12,6 @@
8
12
  * @param {Number} next The index offset within the workspace for the next array
9
13
  * @param {Array} post The post ordering array
10
14
  * @param {Number} stack The index offset within the workspace for the stack array
11
- *
12
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
13
15
  */
14
16
  export function csTdfs(j, k, w, head, next, post, stack) {
15
17
  // variables
@@ -1,11 +1,12 @@
1
+ // Copyright (c) 2006-2024, Timothy A. Davis, All Rights Reserved.
2
+ // SPDX-License-Identifier: LGPL-2.1+
3
+ // https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/CSparse/Source
1
4
  import { csFlip } from './csFlip.js';
2
5
 
3
6
  /**
4
7
  * Flips the value if it is negative of returns the same value otherwise.
5
8
  *
6
9
  * @param {Number} i The value to flip
7
- *
8
- * Reference: http://faculty.cse.tamu.edu/davis/publications.html
9
10
  */
10
11
  export function csUnflip(i) {
11
12
  // flip the value if it is negative
@@ -50,8 +50,6 @@ export var createIsNaN = /* #__PURE__ */factory(name, dependencies, _ref => {
50
50
  Unit: function Unit(x) {
51
51
  return Number.isNaN(x.value);
52
52
  },
53
- 'Array | Matrix': function ArrayMatrix(x) {
54
- return deepMap(x, Number.isNaN);
55
- }
53
+ 'Array | Matrix': typed.referToSelf(self => x => deepMap(x, self))
56
54
  });
57
55
  });
@@ -3267,6 +3267,7 @@ export var createUnitClass = /* #__PURE__ */factory(name, dependencies, _ref =>
3267
3267
  };
3268
3268
 
3269
3269
  // aliases (formerly plurals)
3270
+ // note that ALIASES is only used at creation to create more entries in UNITS by copying the aliased units
3270
3271
  var ALIASES = {
3271
3272
  meters: 'meter',
3272
3273
  inches: 'inch',
@@ -3912,13 +3913,16 @@ export var createUnitClass = /* #__PURE__ */factory(name, dependencies, _ref =>
3912
3913
  _alias.name = aliasName;
3913
3914
  Unit.UNITS[aliasName] = _alias;
3914
3915
  }
3915
- // delete the memoization cache, since adding a new unit to the array
3916
- // invalidates all old results
3916
+
3917
+ // delete the memoization cache because we created a new unit
3917
3918
  delete _findUnit.cache;
3918
3919
  return new Unit(null, name);
3919
3920
  };
3920
3921
  Unit.deleteUnit = function (name) {
3921
3922
  delete Unit.UNITS[name];
3923
+
3924
+ // delete the memoization cache because we deleted a unit
3925
+ delete _findUnit.cache;
3922
3926
  };
3923
3927
 
3924
3928
  // expose arrays with prefixes, dimensions, units, systems
@@ -365,9 +365,6 @@ export function pickShallow(object, properties) {
365
365
  }
366
366
  return copy;
367
367
  }
368
- export function values(object) {
369
- return Object.keys(object).map(key => object[key]);
370
- }
371
368
 
372
369
  // helper function to test whether a string contains a path like 'user.name'
373
370
  function isPath(str) {
@@ -1,3 +1,3 @@
1
- export var version = '12.4.0';
1
+ export var version = '12.4.2';
2
2
  // Note: This file is automatically generated when building math.js.
3
3
  // Changes made in this file will be overwritten.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mathjs",
3
- "version": "12.4.0",
3
+ "version": "12.4.2",
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.23.9",
28
+ "@babel/runtime": "^7.24.4",
29
29
  "complex.js": "^2.1.1",
30
30
  "decimal.js": "^10.4.3",
31
31
  "escape-latex": "^1.2.0",
@@ -36,47 +36,47 @@
36
36
  "typed-function": "^4.1.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@babel/core": "7.23.9",
40
- "@babel/plugin-transform-object-assign": "7.23.3",
41
- "@babel/plugin-transform-runtime": "7.23.9",
42
- "@babel/preset-env": "7.23.9",
39
+ "@babel/core": "7.24.4",
40
+ "@babel/plugin-transform-object-assign": "7.24.1",
41
+ "@babel/plugin-transform-runtime": "7.24.3",
42
+ "@babel/preset-env": "7.24.4",
43
43
  "@babel/register": "7.23.7",
44
44
  "@types/assert": "1.5.10",
45
45
  "@types/mocha": "10.0.6",
46
- "@typescript-eslint/eslint-plugin": "7.0.2",
47
- "@typescript-eslint/parser": "7.0.2",
46
+ "@typescript-eslint/eslint-plugin": "7.7.1",
47
+ "@typescript-eslint/parser": "7.7.1",
48
48
  "assert": "2.1.0",
49
49
  "babel-loader": "9.1.3",
50
50
  "benchmark": "2.1.4",
51
51
  "c8": "9.1.0",
52
52
  "codecov": "3.8.3",
53
- "core-js": "3.36.0",
53
+ "core-js": "3.37.0",
54
54
  "del": "6.1.1",
55
55
  "dtslint": "4.2.1",
56
- "eslint": "8.56.0",
56
+ "eslint": "8.57.0",
57
57
  "eslint-config-prettier": "9.1.0",
58
58
  "eslint-config-standard": "17.1.0",
59
59
  "eslint-plugin-import": "2.29.1",
60
- "eslint-plugin-mocha": "10.3.0",
60
+ "eslint-plugin-mocha": "10.4.3",
61
61
  "eslint-plugin-n": "16.6.2",
62
62
  "eslint-plugin-prettier": "5.1.3",
63
63
  "eslint-plugin-promise": "6.1.1",
64
- "expect-type": "0.17.3",
64
+ "expect-type": "0.19.0",
65
65
  "expr-eval": "2.0.2",
66
66
  "fancy-log": "2.0.0",
67
67
  "glob": "8.1.0",
68
- "gulp": "4.0.2",
68
+ "gulp": "5.0.0",
69
69
  "gulp-babel": "8.0.0",
70
70
  "handlebars": "4.7.8",
71
71
  "jsep": "1.3.8",
72
- "karma": "6.4.2",
72
+ "karma": "6.4.3",
73
73
  "karma-browserstack-launcher": "1.6.0",
74
- "karma-firefox-launcher": "2.1.2",
74
+ "karma-firefox-launcher": "2.1.3",
75
75
  "karma-mocha": "2.0.1",
76
76
  "karma-mocha-reporter": "2.2.5",
77
77
  "karma-webpack": "5.0.1",
78
78
  "mkdirp": "3.0.1",
79
- "mocha": "10.3.0",
79
+ "mocha": "10.4.0",
80
80
  "mocha-junit-reporter": "2.2.1",
81
81
  "ndarray": "1.0.19",
82
82
  "ndarray-determinant": "1.0.0",
@@ -89,8 +89,8 @@
89
89
  "process": "0.11.10",
90
90
  "sylvester": "0.0.21",
91
91
  "ts-node": "10.9.2",
92
- "typescript": "5.3.3",
93
- "webpack": "5.90.3",
92
+ "typescript": "5.4.5",
93
+ "webpack": "5.91.0",
94
94
  "zeros": "1.0.0"
95
95
  },
96
96
  "type": "module",
package/types/index.d.ts CHANGED
@@ -1036,7 +1036,9 @@ export interface MathJsInstance extends MathJsFactory {
1036
1036
  * @returns Sum of x and y
1037
1037
  */
1038
1038
  add<T extends MathType>(x: T, y: T): T
1039
+ add<T extends MathType>(...values: T[]): T
1039
1040
  add(x: MathType, y: MathType): MathType
1041
+ add(...values: MathType[]): MathType
1040
1042
 
1041
1043
  /**
1042
1044
  * Calculate the cubic root of a value.
@@ -1283,6 +1285,8 @@ export interface MathJsInstance extends MathJsFactory {
1283
1285
  multiply(x: Unit, y: Unit): Unit
1284
1286
  multiply(x: number, y: number): number
1285
1287
  multiply(x: MathType, y: MathType): MathType
1288
+ multiply<T extends MathType>(...values: T[]): T
1289
+ multiply(...values: MathType[]): MathType
1286
1290
 
1287
1291
  /**
1288
1292
  * Calculate the norm of a number, vector or matrix. The second