mathjs 12.4.2 → 12.4.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 +8 -0
- package/README.md +4 -0
- package/bin/cli.js +1 -1
- 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/core/function/config.js +1 -11
- package/lib/cjs/core/function/import.js +3 -4
- package/lib/cjs/expression/parse.js +7 -7
- package/lib/cjs/function/algebra/derivative.js +1 -1
- package/lib/cjs/function/algebra/rationalize.js +2 -2
- package/lib/cjs/function/algebra/simplifyConstant.js +1 -1
- package/lib/cjs/function/statistics/mad.js +1 -1
- package/lib/cjs/function/statistics/std.js +1 -1
- package/lib/cjs/function/statistics/utils/improveErrorMessage.js +2 -2
- package/lib/cjs/header.js +2 -2
- package/lib/cjs/type/unit/Unit.js +3 -2
- package/lib/cjs/utils/array.js +0 -11
- package/lib/cjs/utils/bignumber/formatter.js +1 -1
- package/lib/cjs/utils/factory.js +1 -2
- package/lib/cjs/utils/object.js +1 -1
- package/lib/cjs/utils/snapshot.js +4 -4
- package/lib/cjs/version.js +1 -1
- package/lib/esm/core/function/config.js +1 -11
- package/lib/esm/core/function/import.js +3 -4
- package/lib/esm/expression/parse.js +7 -7
- package/lib/esm/function/algebra/derivative.js +1 -1
- package/lib/esm/function/algebra/rationalize.js +2 -2
- package/lib/esm/function/algebra/simplifyConstant.js +1 -1
- package/lib/esm/function/statistics/mad.js +1 -1
- package/lib/esm/function/statistics/std.js +1 -1
- package/lib/esm/function/statistics/utils/improveErrorMessage.js +2 -2
- package/lib/esm/type/unit/Unit.js +3 -2
- package/lib/esm/utils/array.js +0 -10
- package/lib/esm/utils/bignumber/formatter.js +1 -1
- package/lib/esm/utils/factory.js +1 -2
- package/lib/esm/utils/object.js +1 -1
- package/lib/esm/utils/snapshot.js +4 -4
- package/lib/esm/version.js +1 -1
- package/package.json +1 -1
- package/types/EXPLANATION.md +13 -1
- package/types/index.d.ts +14 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mathjs",
|
3
|
-
"version": "12.4.
|
3
|
+
"version": "12.4.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",
|
package/types/EXPLANATION.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Mathjs TypeScript types
|
2
2
|
|
3
|
-
The code base of Mathjs is
|
3
|
+
The code base of Mathjs is written in JavaScript. The TypeScript definitions are maintained separately.
|
4
4
|
|
5
5
|
## Library structure
|
6
6
|
|
@@ -52,3 +52,15 @@ export const {
|
|
52
52
|
// ...
|
53
53
|
} : Record<string, FactoryFunctionMap>
|
54
54
|
```
|
55
|
+
|
56
|
+
## Testing the type definitions
|
57
|
+
|
58
|
+
The types are defined in `types/index.d.ts`.
|
59
|
+
|
60
|
+
The tests for the type definitions are located in `test/typescript-types/testTypes.ts`.
|
61
|
+
|
62
|
+
To run the tests for the type definitions:
|
63
|
+
|
64
|
+
```
|
65
|
+
npm run test:types
|
66
|
+
```
|
package/types/index.d.ts
CHANGED
@@ -2805,6 +2805,19 @@ export interface MathJsInstance extends MathJsFactory {
|
|
2805
2805
|
*/
|
2806
2806
|
prod(A: MathCollection): MathScalarType
|
2807
2807
|
|
2808
|
+
/**
|
2809
|
+
* @param A A single matrix
|
2810
|
+
* @param probOrN prob is the order of the quantile, while N is the
|
2811
|
+
* amount of evenly distributed steps of probabilities; only one of
|
2812
|
+
* these options can be provided
|
2813
|
+
* @param sorted =false is data sorted in ascending order
|
2814
|
+
* @returns Quantile(s)
|
2815
|
+
*/
|
2816
|
+
quantileSeq<T extends MathScalarType>(
|
2817
|
+
A: T[] | T[][],
|
2818
|
+
prob: number | BigNumber | MathArray,
|
2819
|
+
sorted?: boolean
|
2820
|
+
): T
|
2808
2821
|
/**
|
2809
2822
|
* Compute the prob order quantile of a matrix or a list with values.
|
2810
2823
|
* The sequence is sorted and the middle value is returned. Supported
|
@@ -2823,7 +2836,7 @@ export interface MathJsInstance extends MathJsFactory {
|
|
2823
2836
|
A: MathCollection,
|
2824
2837
|
prob: number | BigNumber | MathArray,
|
2825
2838
|
sorted?: boolean
|
2826
|
-
):
|
2839
|
+
): MathScalarType | MathArray
|
2827
2840
|
|
2828
2841
|
/**
|
2829
2842
|
* Compute the standard deviation of a matrix or a list with values. The
|