mathjs 11.12.0 → 12.0.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 (29) hide show
  1. package/HISTORY.md +39 -2
  2. package/README.md +1 -1
  3. package/lib/browser/math.js +1 -1
  4. package/lib/browser/math.js.LICENSE.txt +1 -1
  5. package/lib/browser/math.js.map +1 -1
  6. package/lib/cjs/entry/dependenciesAny/dependenciesEigs.generated.js +4 -0
  7. package/lib/cjs/entry/pureFunctionsAny.generated.js +2 -0
  8. package/lib/cjs/expression/embeddedDocs/function/matrix/eigs.js +2 -2
  9. package/lib/cjs/expression/node/AssignmentNode.js +1 -1
  10. package/lib/cjs/expression/node/FunctionAssignmentNode.js +1 -1
  11. package/lib/cjs/function/matrix/eigs/complexEigs.js +73 -68
  12. package/lib/cjs/function/matrix/eigs/{realSymetric.js → realSymmetric.js} +57 -51
  13. package/lib/cjs/function/matrix/eigs.js +118 -45
  14. package/lib/cjs/header.js +1 -1
  15. package/lib/cjs/utils/number.js +1 -1
  16. package/lib/cjs/version.js +1 -1
  17. package/lib/esm/entry/dependenciesAny/dependenciesEigs.generated.js +4 -0
  18. package/lib/esm/entry/pureFunctionsAny.generated.js +2 -0
  19. package/lib/esm/expression/embeddedDocs/function/matrix/eigs.js +2 -2
  20. package/lib/esm/expression/node/AssignmentNode.js +1 -1
  21. package/lib/esm/expression/node/FunctionAssignmentNode.js +1 -1
  22. package/lib/esm/function/matrix/eigs/complexEigs.js +73 -68
  23. package/lib/esm/function/matrix/eigs/{realSymetric.js → realSymmetric.js} +55 -51
  24. package/lib/esm/function/matrix/eigs.js +119 -47
  25. package/lib/esm/utils/number.js +1 -1
  26. package/lib/esm/version.js +1 -1
  27. package/package.json +2 -2
  28. package/types/EXPLANATION.md +54 -0
  29. package/types/index.d.ts +6797 -6477
package/HISTORY.md CHANGED
@@ -1,9 +1,46 @@
1
1
  # History
2
2
 
3
- # 2023-10-25, 11.12.0
3
+
4
+ # 2023-10-26, 12.0.0
5
+
6
+ Breaking changes:
7
+
8
+ - Fix #2879, #2927, #3014: change the confusing interface of `eigs`.
9
+ Before, functions `eigs` returned an object:
10
+ ```
11
+ { values: MathCollection; vectors: MathCollection }
12
+ ```
13
+ where `vectors` was a 2d matrix of which the columns contained the vectors.
14
+ This is changed to `eigs` returning an object:
15
+ ```
16
+ {
17
+ values: MathCollection
18
+ eigenvectors: Array<{
19
+ value: number | BigNumber
20
+ vector: MathCollection
21
+ }>
22
+ }
23
+ ```
24
+ Where `eigenvectors` is an array containing an object with the corresponding
25
+ eigenvalue and vector.
26
+ - Refactored the TypeScript type definitions to make them work with a `NodeNext`
27
+ module resolution (#3079, #2919).
28
+ - Type `MathJsStatic` is renamed to `MathJsInstance`.
29
+ - Type `FactoryDependencies` is deprecated, use `MathJsFactory` instead, and
30
+ import dependency maps directly from the library.
31
+ - Change the assignment operator of .toTex output from `:=` to `=` (see #2980,
32
+ #3032).
33
+ - Drop official support for Node.js 14 and 16.
34
+
35
+ Fixes:
36
+
37
+ - Find eigenvectors of defective matrices (#3037). Thanks @gwhitney.
38
+
39
+
40
+ # 2023-10-26, 11.12.0
4
41
 
5
42
  - Implemented function `subtractScalar` (#3081, #2643), thanks @vrushaket.
6
- - Fix #3073: function format not escaping control characters and double
43
+ - Fix #3073: function format not escaping control characters and double
7
44
  quotes (#3082).
8
45
  - Fix: function `clone` not throwing an error when passing an unsupported
9
46
  type like a function.
package/README.md CHANGED
@@ -135,7 +135,7 @@ A common case is to implement a new function. This involves the following steps:
135
135
  - Write documentation on the function in the source code comment of `myNewFunction.js`. This documentation is used to auto generate documentation on the website.
136
136
  - Write embedded documentation for the new function in `./src/expression/embeddedDocs/function/arithmetic/myNewFunction.js`. Add the new documentation to the index file `./src/expression/embeddedDocs/embeddedDocs.js`.
137
137
  - Write unit tests for the function in `./test/unit-tests/function/arithmetic/myNewFunction.test.js`.
138
- - Write a TypeScript definition for the new function in `./types/index.d.ts`, and write tests for it in `./types/index.ts`. Normally, two definitions need to be added: one for the static function `math.myNewFunction(...)` and one for the chained API `math.chain(...).myNewFunction(...)`.
138
+ - Write the necessary TypeScript definitions for the new function in `./types/index.d.ts`, and write tests for it in `./test/typescript-tests/testTypes.ts`. This is described in [./types/EXPLANATION.md](./types/EXPLANATION.md).
139
139
  - Ensure the code style is ok by running `npm run lint` (run `npm run format` to fix the code style automatically).
140
140
 
141
141