mathjs 11.6.0 → 11.8.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 (63) hide show
  1. package/HISTORY.md +23 -0
  2. package/README.md +0 -26
  3. package/lib/browser/math.js +1 -1
  4. package/lib/browser/math.js.LICENSE.txt +2 -2
  5. package/lib/browser/math.js.map +1 -1
  6. package/lib/cjs/core/function/typed.js +1 -1
  7. package/lib/cjs/expression/embeddedDocs/function/matrix/partitionSelect.js +1 -1
  8. package/lib/cjs/expression/node/FunctionAssignmentNode.js +1 -1
  9. package/lib/cjs/expression/node/OperatorNode.js +1 -3
  10. package/lib/cjs/expression/operators.js +19 -4
  11. package/lib/cjs/factoriesNumber.js +18 -0
  12. package/lib/cjs/function/algebra/rationalize.js +1 -3
  13. package/lib/cjs/function/algebra/simplifyConstant.js +1 -1
  14. package/lib/cjs/function/algebra/sparse/csAmd.js +1 -3
  15. package/lib/cjs/function/algebra/sparse/csLeaf.js +1 -3
  16. package/lib/cjs/function/arithmetic/expm1.js +1 -1
  17. package/lib/cjs/function/arithmetic/gcd.js +35 -12
  18. package/lib/cjs/function/arithmetic/nthRoots.js +2 -1
  19. package/lib/cjs/function/arithmetic/round.js +1 -1
  20. package/lib/cjs/function/arithmetic/sign.js +1 -1
  21. package/lib/cjs/function/bitwise/rightArithShift.js +1 -1
  22. package/lib/cjs/function/geometry/distance.js +13 -15
  23. package/lib/cjs/function/matrix/det.js +7 -1
  24. package/lib/cjs/function/matrix/diff.js +3 -3
  25. package/lib/cjs/function/matrix/eigs/complexEigs.js +3 -3
  26. package/lib/cjs/function/matrix/matrixFromColumns.js +1 -1
  27. package/lib/cjs/function/matrix/matrixFromRows.js +1 -1
  28. package/lib/cjs/function/matrix/partitionSelect.js +7 -2
  29. package/lib/cjs/function/set/setIsSubset.js +1 -1
  30. package/lib/cjs/function/set/setSize.js +3 -2
  31. package/lib/cjs/header.js +2 -2
  32. package/lib/cjs/type/matrix/DenseMatrix.js +41 -45
  33. package/lib/cjs/type/matrix/SparseMatrix.js +39 -41
  34. package/lib/cjs/type/unit/Unit.js +2 -0
  35. package/lib/cjs/utils/lruQueue.js +2 -6
  36. package/lib/cjs/utils/map.js +1 -1
  37. package/lib/cjs/utils/snapshot.js +7 -1
  38. package/lib/cjs/version.js +1 -1
  39. package/lib/esm/core/function/typed.js +1 -1
  40. package/lib/esm/expression/embeddedDocs/function/matrix/partitionSelect.js +1 -1
  41. package/lib/esm/expression/node/OperatorNode.js +1 -3
  42. package/lib/esm/expression/operators.js +1 -3
  43. package/lib/esm/function/algebra/rationalize.js +1 -3
  44. package/lib/esm/function/algebra/sparse/csAmd.js +1 -3
  45. package/lib/esm/function/algebra/sparse/csLeaf.js +1 -3
  46. package/lib/esm/function/arithmetic/expm1.js +1 -1
  47. package/lib/esm/function/arithmetic/gcd.js +27 -10
  48. package/lib/esm/function/arithmetic/nthRoots.js +2 -1
  49. package/lib/esm/function/arithmetic/round.js +1 -1
  50. package/lib/esm/function/arithmetic/sign.js +1 -1
  51. package/lib/esm/function/bitwise/rightArithShift.js +1 -1
  52. package/lib/esm/function/geometry/distance.js +13 -15
  53. package/lib/esm/function/matrix/det.js +7 -1
  54. package/lib/esm/function/matrix/diff.js +3 -3
  55. package/lib/esm/function/matrix/eigs/complexEigs.js +2 -2
  56. package/lib/esm/function/matrix/partitionSelect.js +7 -2
  57. package/lib/esm/function/set/setIsSubset.js +1 -1
  58. package/lib/esm/function/set/setSize.js +3 -2
  59. package/lib/esm/type/unit/Unit.js +2 -0
  60. package/lib/esm/utils/lruQueue.js +2 -6
  61. package/lib/esm/version.js +1 -1
  62. package/package.json +14 -14
  63. package/types/index.d.ts +251 -475
package/HISTORY.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # History
2
2
 
3
+ # 2023-04-03 11.8.0
4
+
5
+ - Extended functions `fraction`, `bignumber`, and `number` with support for
6
+ units, see #2918 (#2926).
7
+ - Implemented aliases `amp` and `amps` for unit `ampere` (#2917).
8
+ Thanks @veggiesaurus.
9
+ - Improve TypeScript definitions of function `gcd` (#2922). Thanks @brunoSnoww.
10
+ - Fix #2923: improve docs of the function `distance` (#2924). Thanks @tmtron.
11
+
12
+
13
+ # 2023-03-15, 11.7.0
14
+
15
+ - Implement #2567: accept array as parameter for function `gcd` (#2878).
16
+ Thanks @jakubriegel.
17
+ - Fix #2908: improvements in the docs and examples of functions
18
+ `partitionSelect`, `diff`, `expm1`, `round`, `nthRoots`, `sign`,
19
+ `rigthArithShift`, `setIsSubset`, `setSize`, and the docs about units.
20
+ Thanks @tmtron.
21
+ - Fix #2907: determinant of empty matrix should be 1.
22
+ - Refactor index.d.ts by writing function declarations using a generic,
23
+ reducing a lot of repetition (#2913). Thanks @brunoSnoww.
24
+
25
+
3
26
  # 2023-02-24, 11.6.0
4
27
 
5
28
  - Implement broadcasting for the following functions and their corresponding
package/README.md CHANGED
@@ -11,34 +11,8 @@ Math.js is an extensive math library for JavaScript and Node.js. It features a f
11
11
  [![License](https://img.shields.io/github/license/josdejong/mathjs.svg)](https://github.com/josdejong/mathjs/blob/master/LICENSE)
12
12
  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjosdejong%2Fmathjs.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjosdejong%2Fmathjs?ref=badge_shield)
13
13
  [![Codecov](https://codecov.io/gh/josdejong/mathjs/branch/develop/graph/badge.svg)](https://codecov.io/gh/josdejong/mathjs)
14
- [![Foresight](https://api-public.service.runforesight.com/api/v1/badge/test?repoId=13cb22bf-6cd5-4c4b-a9de-46081ac63ffb)](https://mathjs.app.runforesight.com/)
15
14
  [![Github Sponsor](https://camo.githubusercontent.com/7d9333b097b2f54a8957d126ab82937811489c9b75c3850f609985cf94cd29fe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2532302d53706f6e736f722532306d652532306f6e2532304769744875622d6f72616e6765)](https://github.com/sponsors/josdejong)
16
15
 
17
- ## Sponsors
18
-
19
- <table width="100%">
20
- <tr>
21
- <td>
22
- <img width="1000" height="0">
23
- <a href="https://www.runforesight.com/?utm_source=mathjs&utm_medium=sponsorship">
24
- <img src="https://www.thundra.io/hubfs/RunForesight/GitHub%20Sponsorship%20banners/power-up-github.png"
25
- alt="Foresight" width="260" align="right">
26
- </a>
27
-
28
- <h3>Foresight: Increase CI/CD Health & Test Performance</h3>
29
-
30
- <p>
31
- Foresight provides full visibility and deep insights into the health
32
- and performance of your tests and CI pipelines. Assess the risk of
33
- changes, resolve bottlenecks, reduce build times, and deliver
34
- high-quality software at speed with Foresight.
35
- </p>
36
-
37
- [Sign up now!](https://runforesight.com/?utm_source=mathjs&utm_medium=sponsorship)
38
- </td>
39
- </tr>
40
- </table>
41
-
42
16
  ## Features
43
17
 
44
18
  - Supports numbers, big numbers, complex numbers, fractions, units, strings, arrays, and matrices.