mathjs 13.0.3 → 13.1.0

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.
Files changed (210) hide show
  1. package/HISTORY.md +17 -1
  2. package/lib/browser/math.js +1 -1
  3. package/lib/browser/math.js.LICENSE.txt +2 -2
  4. package/lib/browser/math.js.map +1 -1
  5. package/lib/cjs/core/create.js +12 -9
  6. package/lib/cjs/core/function/typed.js +3 -4
  7. package/lib/cjs/entry/dependenciesAny/dependenciesFlatten.generated.js +0 -2
  8. package/lib/cjs/entry/dependenciesAny/dependenciesSqueeze.generated.js +0 -2
  9. package/lib/cjs/entry/impureFunctionsAny.generated.js +2 -2
  10. package/lib/cjs/entry/pureFunctionsAny.generated.js +6 -8
  11. package/lib/cjs/entry/typeChecks.js +18 -0
  12. package/lib/cjs/expression/embeddedDocs/embeddedDocs.js +2 -2
  13. package/lib/cjs/expression/embeddedDocs/function/arithmetic/hypot.js +1 -1
  14. package/lib/cjs/expression/embeddedDocs/function/matrix/diff.js +1 -1
  15. package/lib/cjs/expression/embeddedDocs/function/matrix/fft.js +1 -1
  16. package/lib/cjs/expression/embeddedDocs/function/matrix/ifft.js +1 -1
  17. package/lib/cjs/expression/embeddedDocs/function/matrix/kron.js +1 -1
  18. package/lib/cjs/expression/embeddedDocs/function/matrix/map.js +3 -3
  19. package/lib/cjs/expression/embeddedDocs/function/special/zeta.js +1 -1
  20. package/lib/cjs/expression/embeddedDocs/function/statistics/quantileSeq.js +1 -1
  21. package/lib/cjs/expression/embeddedDocs/function/trigonometry/acoth.js +1 -1
  22. package/lib/cjs/expression/embeddedDocs/function/trigonometry/acsch.js +1 -1
  23. package/lib/cjs/expression/embeddedDocs/function/utils/clone.js +1 -1
  24. package/lib/cjs/expression/function/evaluate.js +5 -0
  25. package/lib/cjs/expression/node/FunctionNode.js +1 -1
  26. package/lib/cjs/expression/transform/filter.transform.js +2 -2
  27. package/lib/cjs/expression/transform/map.transform.js +104 -37
  28. package/lib/cjs/expression/transform/utils/dimToZeroBase.js +23 -0
  29. package/lib/cjs/expression/transform/utils/lastDimToZeroBase.js +3 -4
  30. package/lib/cjs/function/arithmetic/hypot.js +3 -3
  31. package/lib/cjs/function/matrix/apply.js +1 -1
  32. package/lib/cjs/function/matrix/fft.js +3 -3
  33. package/lib/cjs/function/matrix/filter.js +2 -2
  34. package/lib/cjs/function/matrix/flatten.js +5 -6
  35. package/lib/cjs/function/matrix/ifft.js +2 -2
  36. package/lib/cjs/function/matrix/kron.js +4 -4
  37. package/lib/cjs/function/matrix/map.js +109 -18
  38. package/lib/cjs/function/matrix/size.js +7 -7
  39. package/lib/cjs/function/matrix/squeeze.js +3 -4
  40. package/lib/cjs/function/probability/random.js +1 -1
  41. package/lib/cjs/function/probability/randomInt.js +1 -1
  42. package/lib/cjs/function/statistics/cumsum.js +2 -2
  43. package/lib/cjs/function/trigonometry/acoth.js +2 -2
  44. package/lib/cjs/function/trigonometry/acsch.js +2 -2
  45. package/lib/cjs/header.js +2 -2
  46. package/lib/cjs/type/matrix/DenseMatrix.js +3 -28
  47. package/lib/cjs/type/matrix/SparseMatrix.js +5 -8
  48. package/lib/cjs/utils/array.js +27 -0
  49. package/lib/cjs/utils/collection.js +1 -1
  50. package/lib/cjs/utils/function.js +0 -14
  51. package/lib/cjs/utils/is.js +27 -0
  52. package/lib/cjs/utils/map.js +2 -20
  53. package/lib/cjs/version.js +1 -1
  54. package/lib/esm/core/create.js +9 -6
  55. package/lib/esm/core/function/typed.js +2 -3
  56. package/lib/esm/entry/dependenciesAny/dependenciesFlatten.generated.js +0 -2
  57. package/lib/esm/entry/dependenciesAny/dependenciesSqueeze.generated.js +0 -2
  58. package/lib/esm/entry/impureFunctionsAny.generated.js +3 -3
  59. package/lib/esm/entry/pureFunctionsAny.generated.js +7 -9
  60. package/lib/esm/entry/typeChecks.js +1 -1
  61. package/lib/esm/expression/embeddedDocs/embeddedDocs.js +2 -2
  62. package/lib/esm/expression/embeddedDocs/function/arithmetic/hypot.js +1 -1
  63. package/lib/esm/expression/embeddedDocs/function/matrix/diff.js +1 -1
  64. package/lib/esm/expression/embeddedDocs/function/matrix/fft.js +1 -1
  65. package/lib/esm/expression/embeddedDocs/function/matrix/ifft.js +1 -1
  66. package/lib/esm/expression/embeddedDocs/function/matrix/kron.js +1 -1
  67. package/lib/esm/expression/embeddedDocs/function/matrix/map.js +3 -3
  68. package/lib/esm/expression/embeddedDocs/function/special/zeta.js +1 -1
  69. package/lib/esm/expression/embeddedDocs/function/statistics/quantileSeq.js +1 -1
  70. package/lib/esm/expression/embeddedDocs/function/trigonometry/acoth.js +1 -1
  71. package/lib/esm/expression/embeddedDocs/function/trigonometry/acsch.js +1 -1
  72. package/lib/esm/expression/embeddedDocs/function/utils/clone.js +1 -1
  73. package/lib/esm/expression/function/compile.js +1 -1
  74. package/lib/esm/expression/function/evaluate.js +8 -3
  75. package/lib/esm/expression/node/FunctionNode.js +1 -1
  76. package/lib/esm/expression/parse.js +2 -2
  77. package/lib/esm/expression/transform/filter.transform.js +4 -4
  78. package/lib/esm/expression/transform/forEach.transform.js +4 -4
  79. package/lib/esm/expression/transform/map.transform.js +104 -37
  80. package/lib/esm/expression/transform/print.transform.js +2 -2
  81. package/lib/esm/expression/transform/utils/dimToZeroBase.js +16 -0
  82. package/lib/esm/expression/transform/utils/lastDimToZeroBase.js +4 -6
  83. package/lib/esm/function/algebra/decomposition/slu.js +1 -1
  84. package/lib/esm/function/algebra/derivative.js +15 -15
  85. package/lib/esm/function/algebra/lyap.js +4 -4
  86. package/lib/esm/function/algebra/simplify/util.js +3 -3
  87. package/lib/esm/function/algebra/simplifyConstant.js +9 -9
  88. package/lib/esm/function/algebra/solver/lsolve.js +3 -3
  89. package/lib/esm/function/algebra/solver/lsolveAll.js +3 -3
  90. package/lib/esm/function/algebra/solver/lusolve.js +5 -5
  91. package/lib/esm/function/algebra/solver/usolve.js +3 -3
  92. package/lib/esm/function/algebra/solver/usolveAll.js +3 -3
  93. package/lib/esm/function/algebra/sylvester.js +7 -7
  94. package/lib/esm/function/arithmetic/addScalar.js +4 -4
  95. package/lib/esm/function/arithmetic/ceil.js +6 -6
  96. package/lib/esm/function/arithmetic/divide.js +5 -5
  97. package/lib/esm/function/arithmetic/divideScalar.js +5 -5
  98. package/lib/esm/function/arithmetic/fix.js +5 -5
  99. package/lib/esm/function/arithmetic/floor.js +6 -6
  100. package/lib/esm/function/arithmetic/hypot.js +3 -3
  101. package/lib/esm/function/arithmetic/mod.js +3 -3
  102. package/lib/esm/function/arithmetic/multiply.js +7 -7
  103. package/lib/esm/function/arithmetic/multiplyScalar.js +4 -4
  104. package/lib/esm/function/arithmetic/norm.js +2 -2
  105. package/lib/esm/function/arithmetic/pow.js +6 -6
  106. package/lib/esm/function/arithmetic/round.js +7 -7
  107. package/lib/esm/function/arithmetic/subtractScalar.js +4 -4
  108. package/lib/esm/function/arithmetic/xgcd.js +1 -1
  109. package/lib/esm/function/combinatorics/bellNumbers.js +1 -1
  110. package/lib/esm/function/combinatorics/catalan.js +1 -1
  111. package/lib/esm/function/combinatorics/composition.js +1 -1
  112. package/lib/esm/function/combinatorics/stirlingS2.js +1 -1
  113. package/lib/esm/function/geometry/distance.js +4 -4
  114. package/lib/esm/function/geometry/intersect.js +2 -2
  115. package/lib/esm/function/logical/and.js +2 -2
  116. package/lib/esm/function/logical/or.js +2 -2
  117. package/lib/esm/function/logical/xor.js +2 -2
  118. package/lib/esm/function/matrix/apply.js +2 -2
  119. package/lib/esm/function/matrix/column.js +1 -1
  120. package/lib/esm/function/matrix/concat.js +1 -1
  121. package/lib/esm/function/matrix/count.js +1 -1
  122. package/lib/esm/function/matrix/cross.js +3 -3
  123. package/lib/esm/function/matrix/diag.js +10 -10
  124. package/lib/esm/function/matrix/diff.js +2 -2
  125. package/lib/esm/function/matrix/eigs.js +3 -3
  126. package/lib/esm/function/matrix/fft.js +3 -3
  127. package/lib/esm/function/matrix/filter.js +4 -4
  128. package/lib/esm/function/matrix/flatten.js +5 -6
  129. package/lib/esm/function/matrix/forEach.js +4 -4
  130. package/lib/esm/function/matrix/identity.js +6 -6
  131. package/lib/esm/function/matrix/ifft.js +3 -3
  132. package/lib/esm/function/matrix/inv.js +1 -1
  133. package/lib/esm/function/matrix/kron.js +7 -7
  134. package/lib/esm/function/matrix/map.js +110 -19
  135. package/lib/esm/function/matrix/matrixFromFunction.js +6 -6
  136. package/lib/esm/function/matrix/ones.js +2 -2
  137. package/lib/esm/function/matrix/partitionSelect.js +2 -2
  138. package/lib/esm/function/matrix/pinv.js +1 -1
  139. package/lib/esm/function/matrix/range.js +10 -10
  140. package/lib/esm/function/matrix/reshape.js +2 -2
  141. package/lib/esm/function/matrix/rotate.js +4 -4
  142. package/lib/esm/function/matrix/rotationMatrix.js +6 -6
  143. package/lib/esm/function/matrix/row.js +1 -1
  144. package/lib/esm/function/matrix/size.js +8 -8
  145. package/lib/esm/function/matrix/sort.js +4 -4
  146. package/lib/esm/function/matrix/sqrtm.js +1 -1
  147. package/lib/esm/function/matrix/squeeze.js +3 -4
  148. package/lib/esm/function/matrix/subset.js +2 -2
  149. package/lib/esm/function/matrix/zeros.js +2 -2
  150. package/lib/esm/function/probability/combinations.js +1 -1
  151. package/lib/esm/function/probability/combinationsWithRep.js +2 -2
  152. package/lib/esm/function/probability/kldivergence.js +4 -4
  153. package/lib/esm/function/probability/multinomial.js +1 -1
  154. package/lib/esm/function/probability/permutations.js +2 -2
  155. package/lib/esm/function/probability/pickRandom.js +6 -6
  156. package/lib/esm/function/probability/random.js +1 -1
  157. package/lib/esm/function/probability/randomInt.js +1 -1
  158. package/lib/esm/function/relational/compare.js +6 -6
  159. package/lib/esm/function/relational/deepEqual.js +1 -1
  160. package/lib/esm/function/relational/equal.js +1 -1
  161. package/lib/esm/function/relational/equalScalar.js +7 -7
  162. package/lib/esm/function/relational/equalText.js +1 -1
  163. package/lib/esm/function/relational/larger.js +3 -3
  164. package/lib/esm/function/relational/largerEq.js +4 -4
  165. package/lib/esm/function/relational/smaller.js +3 -3
  166. package/lib/esm/function/relational/smallerEq.js +3 -3
  167. package/lib/esm/function/relational/unequal.js +1 -1
  168. package/lib/esm/function/set/setCartesian.js +1 -1
  169. package/lib/esm/function/set/setDifference.js +1 -1
  170. package/lib/esm/function/set/setDistinct.js +1 -1
  171. package/lib/esm/function/set/setIntersect.js +1 -1
  172. package/lib/esm/function/set/setIsSubset.js +1 -1
  173. package/lib/esm/function/set/setMultiplicity.js +1 -1
  174. package/lib/esm/function/set/setPowerset.js +1 -1
  175. package/lib/esm/function/set/setSize.js +2 -2
  176. package/lib/esm/function/set/setSymDifference.js +1 -1
  177. package/lib/esm/function/set/setUnion.js +1 -1
  178. package/lib/esm/function/signal/freqz.js +6 -6
  179. package/lib/esm/function/statistics/corr.js +2 -2
  180. package/lib/esm/function/statistics/cumsum.js +3 -3
  181. package/lib/esm/function/statistics/max.js +1 -1
  182. package/lib/esm/function/statistics/median.js +3 -3
  183. package/lib/esm/function/statistics/min.js +1 -1
  184. package/lib/esm/function/statistics/prod.js +1 -1
  185. package/lib/esm/function/statistics/variance.js +2 -2
  186. package/lib/esm/function/string/bin.js +2 -2
  187. package/lib/esm/function/string/hex.js +2 -2
  188. package/lib/esm/function/string/oct.js +2 -2
  189. package/lib/esm/function/trigonometry/acoth.js +2 -2
  190. package/lib/esm/function/trigonometry/acsch.js +2 -2
  191. package/lib/esm/type/bigint.js +1 -1
  192. package/lib/esm/type/complex/function/complex.js +2 -2
  193. package/lib/esm/type/fraction/function/fraction.js +1 -1
  194. package/lib/esm/type/matrix/DenseMatrix.js +13 -38
  195. package/lib/esm/type/matrix/SparseMatrix.js +5 -8
  196. package/lib/esm/type/matrix/function/index.js +1 -1
  197. package/lib/esm/type/matrix/function/matrix.js +1 -1
  198. package/lib/esm/type/matrix/function/sparse.js +2 -2
  199. package/lib/esm/type/number.js +1 -1
  200. package/lib/esm/type/unit/function/createUnit.js +3 -3
  201. package/lib/esm/type/unit/function/splitUnit.js +1 -1
  202. package/lib/esm/type/unit/function/unit.js +2 -2
  203. package/lib/esm/utils/array.js +26 -0
  204. package/lib/esm/utils/collection.js +1 -1
  205. package/lib/esm/utils/function.js +0 -13
  206. package/lib/esm/utils/is.js +24 -0
  207. package/lib/esm/utils/map.js +2 -19
  208. package/lib/esm/version.js +1 -1
  209. package/package.json +13 -13
  210. package/types/index.d.ts +57 -18
@@ -1,5 +1,5 @@
1
- import { setSafeProperty, hasSafeProperty, getSafeProperty } from './customs.js';
2
- import { isObject } from './is.js';
1
+ import { getSafeProperty, hasSafeProperty, setSafeProperty } from './customs.js';
2
+ import { isMap, isObject } from './is.js';
3
3
 
4
4
  /**
5
5
  * A map facade on a bare object.
@@ -172,23 +172,6 @@ export function toObject(map) {
172
172
  return object;
173
173
  }
174
174
 
175
- /**
176
- * Returns `true` if the passed object appears to be a Map (i.e. duck typing).
177
- *
178
- * Methods looked for are `get`, `set`, `keys` and `has`.
179
- *
180
- * @param {Map | object} object
181
- * @returns
182
- */
183
- export function isMap(object) {
184
- // We can use the fast instanceof, or a slower duck typing check.
185
- // The duck typing method needs to cover enough methods to not be confused with DenseMatrix.
186
- if (!object) {
187
- return false;
188
- }
189
- return object instanceof Map || object instanceof ObjectWrappingMap || typeof object.set === 'function' && typeof object.get === 'function' && typeof object.keys === 'function' && typeof object.has === 'function';
190
- }
191
-
192
175
  /**
193
176
  * Copies the contents of key-value pairs from each `objects` in to `map`.
194
177
  *
@@ -1,3 +1,3 @@
1
- export var version = '13.0.3';
1
+ export var version = '13.1.0';
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": "13.0.3",
3
+ "version": "13.1.0",
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.24.8",
28
+ "@babel/runtime": "^7.25.4",
29
29
  "complex.js": "^2.1.1",
30
30
  "decimal.js": "^10.4.3",
31
31
  "escape-latex": "^1.2.0",
@@ -36,11 +36,11 @@
36
36
  "typed-function": "^4.2.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@babel/core": "7.24.9",
39
+ "@babel/core": "7.25.2",
40
40
  "@babel/plugin-transform-object-assign": "7.24.7",
41
41
  "@babel/plugin-transform-optional-catch-binding": "7.24.7",
42
- "@babel/plugin-transform-runtime": "7.24.7",
43
- "@babel/preset-env": "7.24.8",
42
+ "@babel/plugin-transform-runtime": "7.25.4",
43
+ "@babel/preset-env": "7.25.4",
44
44
  "@babel/register": "7.24.6",
45
45
  "@types/assert": "1.5.10",
46
46
  "@types/mocha": "10.0.7",
@@ -51,18 +51,18 @@
51
51
  "benchmark": "2.1.4",
52
52
  "c8": "10.1.2",
53
53
  "codecov": "3.8.3",
54
- "core-js": "3.37.1",
54
+ "core-js": "3.38.1",
55
55
  "del": "7.1.0",
56
56
  "dtslint": "4.2.1",
57
57
  "eslint": "8.57.0",
58
58
  "eslint-config-prettier": "9.1.0",
59
59
  "eslint-config-standard": "17.1.0",
60
60
  "eslint-plugin-import": "2.29.1",
61
- "eslint-plugin-mocha": "10.4.3",
61
+ "eslint-plugin-mocha": "10.5.0",
62
62
  "eslint-plugin-n": "16.6.2",
63
63
  "eslint-plugin-prettier": "5.2.1",
64
- "eslint-plugin-promise": "6.4.0",
65
- "expect-type": "0.19.0",
64
+ "eslint-plugin-promise": "6.6.0",
65
+ "expect-type": "0.20.0",
66
66
  "expr-eval": "2.0.2",
67
67
  "fancy-log": "2.0.0",
68
68
  "glob": "11.0.0",
@@ -70,14 +70,14 @@
70
70
  "gulp-babel": "8.0.0",
71
71
  "handlebars": "4.7.8",
72
72
  "jsep": "1.3.9",
73
- "karma": "6.4.3",
73
+ "karma": "6.4.4",
74
74
  "karma-browserstack-launcher": "1.6.0",
75
75
  "karma-firefox-launcher": "2.1.3",
76
76
  "karma-mocha": "2.0.1",
77
77
  "karma-mocha-reporter": "2.2.5",
78
78
  "karma-webpack": "5.0.1",
79
79
  "mkdirp": "3.0.1",
80
- "mocha": "10.6.0",
80
+ "mocha": "10.7.3",
81
81
  "mocha-junit-reporter": "2.2.1",
82
82
  "ndarray": "1.0.19",
83
83
  "ndarray-determinant": "1.0.0",
@@ -91,8 +91,8 @@
91
91
  "sinon": "18.0.0",
92
92
  "sylvester": "0.0.21",
93
93
  "ts-node": "10.9.2",
94
- "typescript": "5.5.3",
95
- "webpack": "5.93.0",
94
+ "typescript": "5.5.4",
95
+ "webpack": "5.94.0",
96
96
  "zeros": "1.0.0"
97
97
  },
98
98
  "type": "module",
package/types/index.d.ts CHANGED
@@ -1245,9 +1245,9 @@ export interface MathJsInstance extends MathJsFactory {
1245
1245
  gcd<T extends number | BigNumber | Fraction | Matrix>(args: T[]): T
1246
1246
 
1247
1247
  /**
1248
- * Calculate the hypotenusa of a list with values. The hypotenusa is
1248
+ * Calculate the hypotenuse of a list with values. The hypotenuse is
1249
1249
  * defined as: hypot(a, b, c, ...) = sqrt(a^2 + b^2 + c^2 + ...) For
1250
- * matrix input, the hypotenusa is calculated for all values in the
1250
+ * matrix input, the hypotenuse is calculated for all values in the
1251
1251
  * matrix.
1252
1252
  * @param args A list with numeric values or an Array or Matrix. Matrix
1253
1253
  * and Array input is flattened and returns a single number for the
@@ -1948,10 +1948,10 @@ export interface MathJsInstance extends MathJsFactory {
1948
1948
  inv<T extends number | Complex | MathCollection>(x: T): NoLiteralType<T>
1949
1949
 
1950
1950
  /**
1951
- * Calculate the kronecker product of two matrices or vectors
1951
+ * Calculate the Kronecker product of two matrices or vectors
1952
1952
  * @param x First vector
1953
1953
  * @param y Second vector
1954
- * @returns Returns the kronecker product of x and y
1954
+ * @returns Returns the Kronecker product of x and y
1955
1955
  */
1956
1956
  kron(x: MathCollection, y: MathCollection): Matrix
1957
1957
 
@@ -1967,7 +1967,29 @@ export interface MathJsInstance extends MathJsFactory {
1967
1967
  map<T extends MathCollection>(
1968
1968
  x: T,
1969
1969
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1970
- callback: (value: any, index: any, matrix: T) => MathType | string
1970
+ callback: (value: any, index: number[], matrix: T) => MathType | string
1971
+ ): T
1972
+
1973
+ /**
1974
+ * Iterate over all elements of multiple matrices/arrays, and executes the given
1975
+ * callback function.
1976
+ * @param x The first matrix to iterate on.
1977
+ * @param args The rest of the matrices and at the end the callback function is invoked with multiple
1978
+ * parameters: the values of the elements, the indices of the elements, and
1979
+ * the matrices/arrays being traversed.
1980
+ * @returns Transformed map of matrices
1981
+ */
1982
+ map<T extends MathCollection>(
1983
+ x: T,
1984
+ ...args: Array<
1985
+ | T
1986
+ | ((
1987
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1988
+ value: any,
1989
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1990
+ ...args: Array<any | number[] | T>
1991
+ ) => MathType | string)
1992
+ >
1971
1993
  ): T
1972
1994
 
1973
1995
  /**
@@ -2241,16 +2263,16 @@ export interface MathJsInstance extends MathJsFactory {
2241
2263
  **/
2242
2264
 
2243
2265
  /**
2244
- * Calculate N-dimensional fourier transform
2266
+ * Calculate N-dimensional Fourier transform
2245
2267
  * @param {Array | Matrix} arr An array or matrix
2246
- * @return {Array | Matrix} N-dimensional fourier transformation of the array
2268
+ * @return {Array | Matrix} N-dimensional Fourier transformation of the array
2247
2269
  */
2248
2270
  fft<T extends MathCollection>(arr: T): T
2249
2271
 
2250
2272
  /**
2251
- * Calculate N-dimensional inverse fourier transform
2273
+ * Calculate N-dimensional inverse Fourier transform
2252
2274
  * @param {Array | Matrix} arr An array or matrix
2253
- * @return {Array | Matrix} N-dimensional fourier transformation of the array
2275
+ * @return {Array | Matrix} N-dimensional Fourier transformation of the array
2254
2276
  */
2255
2277
  ifft<T extends MathCollection>(arr: T): T
2256
2278
 
@@ -3136,10 +3158,10 @@ export interface MathJsInstance extends MathJsFactory {
3136
3158
  acot<T extends BigNumber | Complex>(x: T): T
3137
3159
 
3138
3160
  /**
3139
- * Calculate the hyperbolic arccotangent of a value, defined as acoth(x)
3161
+ * Calculate the inverse hyperbolic tangent of a value, defined as acoth(x)
3140
3162
  * = (ln((x+1)/x) + ln(x/(x-1))) / 2.
3141
3163
  * @param x Function input
3142
- * @returns The hyperbolic arccotangent of x
3164
+ * @returns The inverse hyperbolic tangent of x
3143
3165
  */
3144
3166
  acoth(x: number): number
3145
3167
  acoth<T extends BigNumber | Complex>(x: T): T
@@ -3153,10 +3175,10 @@ export interface MathJsInstance extends MathJsFactory {
3153
3175
  acsc<T extends BigNumber | Complex>(x: T): T
3154
3176
 
3155
3177
  /**
3156
- * Calculate the hyperbolic arccosecant of a value, defined as acsch(x)
3178
+ * Calculate the inverse hyperbolic cosecant of a value, defined as acsch(x)
3157
3179
  * = ln(1/x + sqrt(1/x^2 + 1)).
3158
3180
  * @param x Function input
3159
- * @returns The hyperbolic arccosecant of x
3181
+ * @returns The inverse hyperbolic cosecant of x
3160
3182
  */
3161
3183
  acsch(x: number): number
3162
3184
  acsch<T extends BigNumber | Complex>(x: T): T
@@ -3381,6 +3403,14 @@ export interface MathJsInstance extends MathJsFactory {
3381
3403
 
3382
3404
  isObject(x: unknown): boolean
3383
3405
 
3406
+ isMap<T, U>(x: unknown): x is Map<T, U>
3407
+
3408
+ isPartitionedMap<T, U>(x: unknown): x is PartitionedMap<T, U>
3409
+
3410
+ isObjectWrappingMap<T extends string | number | symbol, U>(
3411
+ x: unknown
3412
+ ): x is ObjectWrappingMap<T, U>
3413
+
3384
3414
  isNull(x: unknown): x is null
3385
3415
 
3386
3416
  isUndefined(x: unknown): x is undefined
@@ -4157,6 +4187,15 @@ export interface UnitDefinition {
4157
4187
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
4158
4188
  export interface Index {}
4159
4189
 
4190
+ export interface PartitionedMap<T, U> {
4191
+ a: Map<T, U>
4192
+ b: Map<T, U>
4193
+ }
4194
+
4195
+ export interface ObjectWrappingMap<T extends string | number | symbol, U> {
4196
+ wrappedObject: Record<T, U>
4197
+ }
4198
+
4160
4199
  export interface EvalFunction {
4161
4200
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4162
4201
  evaluate(scope?: any): any
@@ -5059,9 +5098,9 @@ export interface MathJsChain<TValue> {
5059
5098
  ): MathJsChain<T>
5060
5099
 
5061
5100
  /**
5062
- * Calculate the hypotenusa of a list with values. The hypotenusa is
5101
+ * Calculate the hypotenuse of a list with values. The hypotenuse is
5063
5102
  * defined as: hypot(a, b, c, ...) = sqrt(a^2 + b^2 + c^2 + ...) For
5064
- * matrix input, the hypotenusa is calculated for all values in the
5103
+ * matrix input, the hypotenuse is calculated for all values in the
5065
5104
  * matrix.
5066
5105
  */
5067
5106
  hypot<T extends number | BigNumber>(this: MathJsChain<T[]>): MathJsChain<T>
@@ -5670,7 +5709,7 @@ export interface MathJsChain<TValue> {
5670
5709
  ): MathJsChain<NoLiteralType<T>>
5671
5710
 
5672
5711
  /**
5673
- * Calculate the kronecker product of two matrices or vectors
5712
+ * Calculate the Kronecker product of two matrices or vectors
5674
5713
  * @param y Second vector
5675
5714
  */
5676
5715
  kron(
@@ -6528,7 +6567,7 @@ export interface MathJsChain<TValue> {
6528
6567
  ): MathJsChain<T>
6529
6568
 
6530
6569
  /**
6531
- * Calculate the hyperbolic arccotangent of a value, defined as acoth(x)
6570
+ * Calculate the inverse hyperbolic tangent of a value, defined as acoth(x)
6532
6571
  * = (ln((x+1)/x) + ln(x/(x-1))) / 2. For matrices, the function is
6533
6572
  * evaluated element wise.
6534
6573
  */
@@ -6547,7 +6586,7 @@ export interface MathJsChain<TValue> {
6547
6586
  ): MathJsChain<T>
6548
6587
 
6549
6588
  /**
6550
- * Calculate the hyperbolic arccosecant of a value, defined as acsch(x)
6589
+ * Calculate the inverse hyperbolic cosecant of a value, defined as acsch(x)
6551
6590
  * = ln(1/x + sqrt(1/x^2 + 1)). For matrices, the function is evaluated
6552
6591
  * element wise.
6553
6592
  */