@danielsimonjr/mathts-functions 0.64.1 → 0.64.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/README.md +21 -21
- package/dist/algebra/decomposition/lup.d.ts.map +1 -1
- package/dist/algebra/rationalize.d.ts.map +1 -1
- package/dist/algebra/simplify/util.d.ts.map +1 -1
- package/dist/algebra/simplify/wildcards.d.ts +10 -0
- package/dist/algebra/simplify/wildcards.d.ts.map +1 -1
- package/dist/algebra/simplifyConstant.d.ts.map +1 -1
- package/dist/algebra/simplifyCore.d.ts.map +1 -1
- package/dist/algebra/solver/lsolve.d.ts.map +1 -1
- package/dist/algebra/solver/lsolveAll.d.ts +1 -0
- package/dist/algebra/solver/lsolveAll.d.ts.map +1 -1
- package/dist/algebra/solver/lusolve.d.ts.map +1 -1
- package/dist/algebra/solver/usolve.d.ts.map +1 -1
- package/dist/algebra/solver/usolveAll.d.ts +1 -0
- package/dist/algebra/solver/usolveAll.d.ts.map +1 -1
- package/dist/algebra/solver/utils/solveValidation.d.ts +4 -0
- package/dist/algebra/solver/utils/solveValidation.d.ts.map +1 -1
- package/dist/algebra/sparse/csAmd.d.ts +4 -0
- package/dist/algebra/sparse/csAmd.d.ts.map +1 -1
- package/dist/algebra/sparse/csChol.d.ts +12 -0
- package/dist/algebra/sparse/csChol.d.ts.map +1 -1
- package/dist/algebra/sparse/csCounts.d.ts +4 -0
- package/dist/algebra/sparse/csCounts.d.ts.map +1 -1
- package/dist/algebra/sparse/csDfs.d.ts +0 -1
- package/dist/algebra/sparse/csDfs.d.ts.map +1 -1
- package/dist/algebra/sparse/csLu.d.ts +9 -0
- package/dist/algebra/sparse/csLu.d.ts.map +1 -1
- package/dist/algebra/sparse/csSpsolve.d.ts +4 -0
- package/dist/algebra/sparse/csSpsolve.d.ts.map +1 -1
- package/dist/algebra/sparse/csSqr.d.ts +5 -0
- package/dist/algebra/sparse/csSqr.d.ts.map +1 -1
- package/dist/algebra/sparse/csSymperm.d.ts +4 -0
- package/dist/algebra/sparse/csSymperm.d.ts.map +1 -1
- package/dist/arithmetic/ceil.d.ts.map +1 -1
- package/dist/arithmetic/divide.d.ts.map +1 -1
- package/dist/arithmetic/fix.d.ts.map +1 -1
- package/dist/arithmetic/floor.d.ts.map +1 -1
- package/dist/arithmetic/log.d.ts.map +1 -1
- package/dist/arithmetic/log10.d.ts.map +1 -1
- package/dist/arithmetic/nthRoot.d.ts.map +1 -1
- package/dist/arithmetic/round.d.ts.map +1 -1
- package/dist/arithmetic/utils/nodeOperations.d.ts +1 -0
- package/dist/arithmetic/utils/nodeOperations.d.ts.map +1 -1
- package/dist/bitwise/leftShift.d.ts.map +1 -1
- package/dist/bitwise/rightArithShift.d.ts.map +1 -1
- package/dist/bitwise/rightLogShift.d.ts.map +1 -1
- package/dist/bitwise/useMatrixForArrayScalar.d.ts.map +1 -1
- package/dist/calculus-extra.d.ts.map +1 -1
- package/dist/cas/rat.d.ts +17 -0
- package/dist/cas/rat.d.ts.map +1 -1
- package/dist/clustering-extra.d.ts +4 -0
- package/dist/clustering-extra.d.ts.map +1 -1
- package/dist/complex/conj.d.ts.map +1 -1
- package/dist/complex/re.d.ts.map +1 -1
- package/dist/core/function/config.d.ts +8 -0
- package/dist/core/function/config.d.ts.map +1 -1
- package/dist/core/function/import.d.ts +5 -0
- package/dist/core/function/import.d.ts.map +1 -1
- package/dist/descriptive-stats.d.ts +16 -0
- package/dist/descriptive-stats.d.ts.map +1 -1
- package/dist/distribution-functions.d.ts.map +1 -1
- package/dist/expression/operators.d.ts +1 -1
- package/dist/factories/matrix-bridge.d.ts +7 -0
- package/dist/factories/matrix-bridge.d.ts.map +1 -1
- package/dist/geometry-extra.d.ts.map +1 -1
- package/dist/grad-forward.d.ts +1 -0
- package/dist/grad-forward.d.ts.map +1 -1
- package/dist/hypothesis-extra.d.ts +23 -0
- package/dist/hypothesis-extra.d.ts.map +1 -1
- package/dist/index.js +411 -126
- package/dist/logical/and.d.ts.map +1 -1
- package/dist/logical/nullish.d.ts.map +1 -1
- package/dist/matrix/det.d.ts +1 -1
- package/dist/matrix/det.d.ts.map +1 -1
- package/dist/matrix/diag.d.ts.map +1 -1
- package/dist/matrix/eigs/complexEigs.d.ts +5 -1
- package/dist/matrix/eigs/complexEigs.d.ts.map +1 -1
- package/dist/matrix/eigs/realSymmetric.d.ts +4 -0
- package/dist/matrix/eigs/realSymmetric.d.ts.map +1 -1
- package/dist/matrix/eigs.d.ts +1 -1
- package/dist/matrix/eigs.d.ts.map +1 -1
- package/dist/matrix/inv.d.ts +1 -1
- package/dist/matrix/inv.d.ts.map +1 -1
- package/dist/matrix/matrixFromColumns.d.ts.map +1 -1
- package/dist/matrix/matrixFromRows.d.ts.map +1 -1
- package/dist/matrix/native-accel.d.ts.map +1 -1
- package/dist/matrix/ones.d.ts.map +1 -1
- package/dist/matrix/pinv.d.ts +1 -1
- package/dist/matrix/pinv.d.ts.map +1 -1
- package/dist/matrix/range.d.ts.map +1 -1
- package/dist/matrix/resize.d.ts.map +1 -1
- package/dist/matrix/sqrtm.d.ts +1 -1
- package/dist/matrix/sqrtm.d.ts.map +1 -1
- package/dist/matrix/subset.d.ts.map +1 -1
- package/dist/matrix/utils/zerosAndOnes.d.ts +13 -0
- package/dist/matrix/utils/zerosAndOnes.d.ts.map +1 -1
- package/dist/matrix/zeros.d.ts.map +1 -1
- package/dist/ml/glm.d.ts +2 -0
- package/dist/ml/glm.d.ts.map +1 -1
- package/dist/ml/kde.d.ts +1 -0
- package/dist/ml/kde.d.ts.map +1 -1
- package/dist/ml/logistic-regression.d.ts +2 -0
- package/dist/ml/logistic-regression.d.ts.map +1 -1
- package/dist/ml/ols.d.ts +2 -0
- package/dist/ml/ols.d.ts.map +1 -1
- package/dist/ml/regularized-regression.d.ts +6 -0
- package/dist/ml/regularized-regression.d.ts.map +1 -1
- package/dist/numeric/numeric-jacobian.d.ts +1 -0
- package/dist/numeric/numeric-jacobian.d.ts.map +1 -1
- package/dist/numeric-extra.d.ts.map +1 -1
- package/dist/optimization-extra.d.ts +8 -0
- package/dist/optimization-extra.d.ts.map +1 -1
- package/dist/plain/number/arithmetic.d.ts +15 -1
- package/dist/plain/number/arithmetic.d.ts.map +1 -1
- package/dist/plain/number/bitwise.d.ts +35 -0
- package/dist/plain/number/bitwise.d.ts.map +1 -1
- package/dist/plain/number/combinations.d.ts +8 -0
- package/dist/plain/number/combinations.d.ts.map +1 -1
- package/dist/plain/number/logical.d.ts +4 -0
- package/dist/plain/number/logical.d.ts.map +1 -1
- package/dist/plain/number/probability.d.ts +14 -0
- package/dist/plain/number/probability.d.ts.map +1 -1
- package/dist/plain/number/relational.d.ts +12 -0
- package/dist/plain/number/relational.d.ts.map +1 -1
- package/dist/plain/number/trigonometry.d.ts +33 -0
- package/dist/plain/number/trigonometry.d.ts.map +1 -1
- package/dist/plain/number/utils.d.ts +5 -0
- package/dist/plain/number/utils.d.ts.map +1 -1
- package/dist/probability/util/seededRNG.d.ts +6 -0
- package/dist/probability/util/seededRNG.d.ts.map +1 -1
- package/dist/regression-extra.d.ts +1 -0
- package/dist/regression-extra.d.ts.map +1 -1
- package/dist/signal/iir-design.d.ts.map +1 -1
- package/dist/signal/remez-exchange.d.ts +4 -0
- package/dist/signal/remez-exchange.d.ts.map +1 -1
- package/dist/signal-filter-extra.d.ts +1 -0
- package/dist/signal-filter-extra.d.ts.map +1 -1
- package/dist/special/hypergeometric.d.ts +1 -1
- package/dist/special/niche.d.ts +2 -2
- package/dist/special/wave-functions.d.ts +4 -4
- package/dist/special/zeta.d.ts.map +1 -1
- package/dist/stats/power-analysis.d.ts +1 -0
- package/dist/stats/power-analysis.d.ts.map +1 -1
- package/dist/trigonometry/atan2.d.ts.map +1 -1
- package/dist/type/bignumber/BigNumber.d.ts +1 -1
- package/dist/type/bignumber/BigNumber.d.ts.map +1 -1
- package/dist/type/local/Decimal.d.ts +1 -0
- package/dist/type/local/Decimal.d.ts.map +1 -1
- package/dist/type/matrix/ImmutableDenseMatrix.d.ts +28 -38
- package/dist/type/matrix/ImmutableDenseMatrix.d.ts.map +1 -1
- package/dist/type/matrix/MatrixIndex.d.ts.map +1 -1
- package/dist/type/matrix/Spa.d.ts +1 -1
- package/dist/type/matrix/function/index.d.ts.map +1 -1
- package/dist/type/matrix/utils/matAlgo09xS0Sf.d.ts.map +1 -1
- package/dist/type/matrix/utils/matAlgo11xS0s.d.ts.map +1 -1
- package/dist/type/matrix/utils/matrixAlgorithmSuite.d.ts.map +1 -1
- package/dist/type/unit/physicalConstants.d.ts +1 -1
- package/dist/type/unit/physicalConstants.d.ts.map +1 -1
- package/dist/typed/arithmetic.d.ts +91 -91
- package/dist/typed/arithmetic.d.ts.map +1 -1
- package/dist/typed/bitwise.d.ts +14 -14
- package/dist/typed/bitwise.d.ts.map +1 -1
- package/dist/typed/cas.d.ts.map +1 -1
- package/dist/typed/combinatorics.d.ts +21 -21
- package/dist/typed/combinatorics.d.ts.map +1 -1
- package/dist/typed/complex.d.ts +8 -8
- package/dist/typed/complex.d.ts.map +1 -1
- package/dist/typed/distributions.d.ts +28 -28
- package/dist/typed/distributions.d.ts.map +1 -1
- package/dist/typed/geometry.d.ts +4 -4
- package/dist/typed/graph.d.ts.map +1 -1
- package/dist/typed/hypothesis.d.ts +26 -0
- package/dist/typed/hypothesis.d.ts.map +1 -1
- package/dist/typed/integration.d.ts +1 -1
- package/dist/typed/logical.d.ts +10 -10
- package/dist/typed/logical.d.ts.map +1 -1
- package/dist/typed/matrix-ops.d.ts +9 -9
- package/dist/typed/matrix-ops.d.ts.map +1 -1
- package/dist/typed/numeric.d.ts +4 -4
- package/dist/typed/numeric.d.ts.map +1 -1
- package/dist/typed/polynomial-ideal.d.ts +10 -0
- package/dist/typed/polynomial-ideal.d.ts.map +1 -1
- package/dist/typed/probability.d.ts +16 -16
- package/dist/typed/probability.d.ts.map +1 -1
- package/dist/typed/relational.d.ts +14 -14
- package/dist/typed/relational.d.ts.map +1 -1
- package/dist/typed/set.d.ts +20 -20
- package/dist/typed/set.d.ts.map +1 -1
- package/dist/typed/signal.d.ts +23 -23
- package/dist/typed/signal.d.ts.map +1 -1
- package/dist/typed/special.d.ts +76 -76
- package/dist/typed/special.d.ts.map +1 -1
- package/dist/typed/statistics.d.ts +34 -34
- package/dist/typed/statistics.d.ts.map +1 -1
- package/dist/typed/string.d.ts +10 -10
- package/dist/typed/string.d.ts.map +1 -1
- package/dist/typed/trigonometry.d.ts +38 -38
- package/dist/typed/trigonometry.d.ts.map +1 -1
- package/dist/typed/unit.d.ts +4 -4
- package/dist/typed/unit.d.ts.map +1 -1
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/bignumber/bitwise.d.ts +21 -0
- package/dist/utils/bignumber/bitwise.d.ts.map +1 -1
- package/dist/utils/bignumber/nearlyEqual.d.ts +16 -0
- package/dist/utils/bignumber/nearlyEqual.d.ts.map +1 -1
- package/dist/utils/emitter.d.ts +1 -0
- package/dist/utils/emitter.d.ts.map +1 -1
- package/dist/utils/factory.d.ts +2 -1
- package/dist/utils/factory.d.ts.map +1 -1
- package/dist/utils/is.d.ts +140 -0
- package/dist/utils/is.d.ts.map +1 -1
- package/dist/utils/noop.d.ts +3 -0
- package/dist/utils/noop.d.ts.map +1 -1
- package/dist/utils/product.d.ts +4 -1
- package/dist/utils/product.d.ts.map +1 -1
- package/dist/wasm/WasmLoader.d.ts +6 -0
- package/dist/wasm/WasmLoader.d.ts.map +1 -1
- package/dist/wasm/elementwise/wasm-bridge.d.ts +1 -0
- package/dist/wasm/elementwise/wasm-bridge.d.ts.map +1 -1
- package/dist/wasm/special/scalars.d.ts +22 -0
- package/dist/wasm/special/scalars.d.ts.map +1 -1
- package/dist/wasm/special/wasm-bridge.d.ts +80 -0
- package/dist/wasm/special/wasm-bridge.d.ts.map +1 -1
- package/package.json +76 -76
- package/types/assemblyscript.d.ts +101 -101
- package/types/index.d.ts +7801 -7801
- package/types/modules.d.ts +19 -19
|
@@ -88,19 +88,99 @@ export declare function lgammaJS(xs: Float64Array): Float64Array;
|
|
|
88
88
|
* 2. Fall back to pure-JS `lgammaJS`.
|
|
89
89
|
*/
|
|
90
90
|
export declare const lgammaDispatch: (xs: Float64Array) => Float64Array;
|
|
91
|
+
/**
|
|
92
|
+
* Compute the Carlson integral RC(x, y) for each pair of elements, in JavaScript.
|
|
93
|
+
*
|
|
94
|
+
* The function reads element `i` of each input array and writes element `i` of a new
|
|
95
|
+
* array. It does not change the inputs.
|
|
96
|
+
* An element with `x < 0` or `y <= 0` gives NaN.
|
|
97
|
+
*/
|
|
91
98
|
export declare function carlsonRCJS(xs: Float64Array, ys: Float64Array): Float64Array;
|
|
99
|
+
/**
|
|
100
|
+
* Compute the Carlson integral RF(x, y, z) for each element triple, in JavaScript.
|
|
101
|
+
*
|
|
102
|
+
* The function reads element `i` of each input array and writes element `i` of a new
|
|
103
|
+
* array. It does not change the inputs.
|
|
104
|
+
* An element with a negative argument gives NaN.
|
|
105
|
+
*/
|
|
92
106
|
export declare function carlsonRFJS(xs: Float64Array, ys: Float64Array, zs: Float64Array): Float64Array;
|
|
107
|
+
/**
|
|
108
|
+
* Compute the Carlson integral RD(x, y, z) for each element triple, in JavaScript.
|
|
109
|
+
*
|
|
110
|
+
* The function reads element `i` of each input array and writes element `i` of a new
|
|
111
|
+
* array. It does not change the inputs.
|
|
112
|
+
* An element with `x < 0`, `y < 0`, `z <= 0`, or `x` and `y` both 0 gives NaN.
|
|
113
|
+
*/
|
|
93
114
|
export declare function carlsonRDJS(xs: Float64Array, ys: Float64Array, zs: Float64Array): Float64Array;
|
|
115
|
+
/**
|
|
116
|
+
* Compute the Carlson integral RJ(x, y, z, p) for each element set, in JavaScript.
|
|
117
|
+
*
|
|
118
|
+
* The function reads element `i` of each input array and writes element `i` of a new
|
|
119
|
+
* array. It does not change the inputs.
|
|
120
|
+
* An element with a negative `x`, `y` or `z`, or with `p` equal to 0, gives NaN.
|
|
121
|
+
*/
|
|
94
122
|
export declare function carlsonRJJS(xs: Float64Array, ys: Float64Array, zs: Float64Array, ps: Float64Array): Float64Array;
|
|
123
|
+
/**
|
|
124
|
+
* Compute the incomplete elliptic integral of the first kind F(phi | m) for each element
|
|
125
|
+
* pair, in JavaScript.
|
|
126
|
+
*
|
|
127
|
+
* The function reads element `i` of each input array and writes element `i` of a new
|
|
128
|
+
* array. It does not change the inputs.
|
|
129
|
+
* An element with `1 - m sin^2(phi) < 0` gives NaN.
|
|
130
|
+
*/
|
|
95
131
|
export declare function ellipticFIncompleteJS(phis: Float64Array, ms: Float64Array): Float64Array;
|
|
132
|
+
/**
|
|
133
|
+
* Compute the incomplete elliptic integral of the second kind E(phi | m) for each element
|
|
134
|
+
* pair, in JavaScript.
|
|
135
|
+
*
|
|
136
|
+
* The function reads element `i` of each input array and writes element `i` of a new
|
|
137
|
+
* array. It does not change the inputs.
|
|
138
|
+
* An element with `1 - m sin^2(phi) < 0` gives NaN.
|
|
139
|
+
*/
|
|
96
140
|
export declare function ellipticEIncompleteJS(phis: Float64Array, ms: Float64Array): Float64Array;
|
|
141
|
+
/**
|
|
142
|
+
* Compute the incomplete elliptic integral of the third kind Pi(n; phi | m) for each
|
|
143
|
+
* element set, in JavaScript.
|
|
144
|
+
*
|
|
145
|
+
* The function reads element `i` of each input array and writes element `i` of a new
|
|
146
|
+
* array. It does not change the inputs.
|
|
147
|
+
* An element with `1 - m sin^2(phi) < 0` or `1 - n sin^2(phi) <= 0` gives NaN.
|
|
148
|
+
*/
|
|
97
149
|
export declare function ellipticPiIncompleteJS(ns: Float64Array, phis: Float64Array, ms: Float64Array): Float64Array;
|
|
150
|
+
/** Return the Carlson integral RC(x, y). The result is NaN if `x < 0` or `y <= 0`. */
|
|
98
151
|
export declare function carlsonRCScalar(x: number, y: number): number;
|
|
152
|
+
/** Return the Carlson integral RF(x, y, z). The result is NaN if an argument is negative. */
|
|
99
153
|
export declare function carlsonRFScalar(x: number, y: number, z: number): number;
|
|
154
|
+
/**
|
|
155
|
+
* Return the Carlson integral RD(x, y, z).
|
|
156
|
+
*
|
|
157
|
+
* The result is NaN if `x < 0`, `y < 0`, `z <= 0`, or `x` and `y` are both 0.
|
|
158
|
+
*/
|
|
100
159
|
export declare function carlsonRDScalar(x: number, y: number, z: number): number;
|
|
160
|
+
/**
|
|
161
|
+
* Return the Carlson integral RJ(x, y, z, p).
|
|
162
|
+
*
|
|
163
|
+
* The result is NaN if `x`, `y` or `z` is negative, or if `p` is 0.
|
|
164
|
+
*/
|
|
101
165
|
export declare function carlsonRJScalar(x: number, y: number, z: number, p: number): number;
|
|
166
|
+
/**
|
|
167
|
+
* Return the incomplete elliptic integral of the first kind F(phi | m).
|
|
168
|
+
*
|
|
169
|
+
* The result is 0 if `phi` is 0, and NaN if `1 - m sin^2(phi) < 0`.
|
|
170
|
+
*/
|
|
102
171
|
export declare function ellipticFIncompleteScalar(phi: number, m: number): number;
|
|
172
|
+
/**
|
|
173
|
+
* Return the incomplete elliptic integral of the second kind E(phi | m).
|
|
174
|
+
*
|
|
175
|
+
* The result is 0 if `phi` is 0, and NaN if `1 - m sin^2(phi) < 0`.
|
|
176
|
+
*/
|
|
103
177
|
export declare function ellipticEIncompleteScalar(phi: number, m: number): number;
|
|
178
|
+
/**
|
|
179
|
+
* Return the incomplete elliptic integral of the third kind Pi(n; phi | m).
|
|
180
|
+
*
|
|
181
|
+
* The result is 0 if `phi` is 0. It is NaN if `1 - m sin^2(phi) < 0` or
|
|
182
|
+
* `1 - n sin^2(phi) <= 0`.
|
|
183
|
+
*/
|
|
104
184
|
export declare function ellipticPiIncompleteScalar(n: number, phi: number, m: number): number;
|
|
105
185
|
/** Dispatch RC(x, y) element-wise — AS managed → JS. */
|
|
106
186
|
export declare function carlsonRCDispatch(xs: Float64Array, ys: Float64Array): Float64Array;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasm-bridge.d.ts","sourceRoot":"","sources":["../../../src/wasm/special/wasm-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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package/package.json
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@danielsimonjr/mathts-functions",
|
|
3
|
-
"version": "0.64.
|
|
4
|
-
"description": "Mathematical functions for MathTS - arithmetic, algebra, trigonometry, statistics, and more",
|
|
5
|
-
"author": "Daniel Simon Jr.",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "./dist/index.js",
|
|
9
|
-
"module": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist",
|
|
19
|
-
"types",
|
|
20
|
-
"README.md"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json && node scripts/copy-wasm.mjs",
|
|
24
|
-
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
25
|
-
"test": "vitest run",
|
|
26
|
-
"test:diff": "node tests/diff-special.test.mjs && node tests/diff-elementwise.test.mjs && node tests/diff-fusion.test.mjs",
|
|
27
|
-
"golden:gen": "python -X utf8 tests/golden/gen_special_goldens.py",
|
|
28
|
-
"test:watch": "vitest",
|
|
29
|
-
"test:coverage": "vitest run --coverage",
|
|
30
|
-
"typecheck": "tsc --noEmit",
|
|
31
|
-
"lint": "oxlint src",
|
|
32
|
-
"lint:fix": "oxlint src --fix",
|
|
33
|
-
"clean": "rm -rf dist",
|
|
34
|
-
"build:prod": "tsup src/index.ts --format esm --clean --minify --treeshake"
|
|
35
|
-
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"@danielsimonjr/mathts-core": "^0.15.
|
|
38
|
-
"@danielsimonjr/mathts-expression": "^0.8.
|
|
39
|
-
"@danielsimonjr/mathts-gpu": "^0.2.
|
|
40
|
-
"@danielsimonjr/mathts-matrix": "^0.7.
|
|
41
|
-
"@danielsimonjr/mathts-parallel": "^0.6.
|
|
42
|
-
"bignumber.js": "^11.1.5",
|
|
43
|
-
"complex.js": "^2.2.5",
|
|
44
|
-
"decimal.js": "^10.4.3",
|
|
45
|
-
"escape-latex": "^1.2.0",
|
|
46
|
-
"fraction.js": "^5.2.1",
|
|
47
|
-
"javascript-natural-sort": "^0.7.1",
|
|
48
|
-
"seedrandom": "^3.0.5",
|
|
49
|
-
"tiny-emitter": "^2.1.0",
|
|
50
|
-
"typed-function": "
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@types/node": "^26.4.0",
|
|
54
|
-
"@webgpu/types": "^0.1.72",
|
|
55
|
-
"tsup": "^8.0.0",
|
|
56
|
-
"typescript": "^7.0.2",
|
|
57
|
-
"vitest": "^5.0.0"
|
|
58
|
-
},
|
|
59
|
-
"publishConfig": {
|
|
60
|
-
"access": "public"
|
|
61
|
-
},
|
|
62
|
-
"repository": {
|
|
63
|
-
"type": "git",
|
|
64
|
-
"url": "git+https://github.com/danielsimonjr/MathTS.git",
|
|
65
|
-
"directory": "functions"
|
|
66
|
-
},
|
|
67
|
-
"keywords": [
|
|
68
|
-
"math",
|
|
69
|
-
"typescript",
|
|
70
|
-
"functions",
|
|
71
|
-
"arithmetic",
|
|
72
|
-
"algebra",
|
|
73
|
-
"trigonometry",
|
|
74
|
-
"statistics"
|
|
75
|
-
]
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@danielsimonjr/mathts-functions",
|
|
3
|
+
"version": "0.64.3",
|
|
4
|
+
"description": "Mathematical functions for MathTS - arithmetic, algebra, trigonometry, statistics, and more",
|
|
5
|
+
"author": "Daniel Simon Jr.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"types",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json && node scripts/copy-wasm.mjs",
|
|
24
|
+
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"test:diff": "node tests/diff-special.test.mjs && node tests/diff-elementwise.test.mjs && node tests/diff-fusion.test.mjs",
|
|
27
|
+
"golden:gen": "python -X utf8 tests/golden/gen_special_goldens.py",
|
|
28
|
+
"test:watch": "vitest",
|
|
29
|
+
"test:coverage": "vitest run --coverage",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"lint": "oxlint src",
|
|
32
|
+
"lint:fix": "oxlint src --fix",
|
|
33
|
+
"clean": "rm -rf dist",
|
|
34
|
+
"build:prod": "tsup src/index.ts --format esm --clean --minify --treeshake"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@danielsimonjr/mathts-core": "^0.15.4",
|
|
38
|
+
"@danielsimonjr/mathts-expression": "^0.8.1",
|
|
39
|
+
"@danielsimonjr/mathts-gpu": "^0.2.1",
|
|
40
|
+
"@danielsimonjr/mathts-matrix": "^0.7.4",
|
|
41
|
+
"@danielsimonjr/mathts-parallel": "^0.6.6",
|
|
42
|
+
"bignumber.js": "^11.1.5",
|
|
43
|
+
"complex.js": "^2.2.5",
|
|
44
|
+
"decimal.js": "^10.4.3",
|
|
45
|
+
"escape-latex": "^1.2.0",
|
|
46
|
+
"fraction.js": "^5.2.1",
|
|
47
|
+
"javascript-natural-sort": "^0.7.1",
|
|
48
|
+
"seedrandom": "^3.0.5",
|
|
49
|
+
"tiny-emitter": "^2.1.0",
|
|
50
|
+
"typed-function": "npm:@danielsimonjr/typed-function@5.0.0-alpha.4"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@types/node": "^26.4.0",
|
|
54
|
+
"@webgpu/types": "^0.1.72",
|
|
55
|
+
"tsup": "^8.0.0",
|
|
56
|
+
"typescript": "^7.0.2",
|
|
57
|
+
"vitest": "^5.0.0"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "git+https://github.com/danielsimonjr/MathTS.git",
|
|
65
|
+
"directory": "functions"
|
|
66
|
+
},
|
|
67
|
+
"keywords": [
|
|
68
|
+
"math",
|
|
69
|
+
"typescript",
|
|
70
|
+
"functions",
|
|
71
|
+
"arithmetic",
|
|
72
|
+
"algebra",
|
|
73
|
+
"trigonometry",
|
|
74
|
+
"statistics"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ambient type declarations for AssemblyScript builtins.
|
|
3
|
-
* These types are provided by the AssemblyScript compiler at build time
|
|
4
|
-
* but need declarations for TypeScript type-checking when WASM files
|
|
5
|
-
* are transitively included via imports from src/function/.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// AssemblyScript numeric types
|
|
9
|
-
declare type usize = number;
|
|
10
|
-
declare type i64 = number;
|
|
11
|
-
declare type u8 = number;
|
|
12
|
-
declare type u32 = number;
|
|
13
|
-
declare type f32 = number;
|
|
14
|
-
|
|
15
|
-
// f64: type alias + namespace with constants
|
|
16
|
-
declare type f64 = number;
|
|
17
|
-
declare namespace f64 {
|
|
18
|
-
const NaN: f64;
|
|
19
|
-
const POSITIVE_INFINITY: f64;
|
|
20
|
-
const NEGATIVE_INFINITY: f64;
|
|
21
|
-
const MAX_VALUE: f64;
|
|
22
|
-
const MIN_VALUE: f64;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// i32: type alias + namespace with builtins
|
|
26
|
-
declare type i32 = number;
|
|
27
|
-
declare namespace i32 {
|
|
28
|
-
function clz(value: i32): i32;
|
|
29
|
-
function ctz(value: i32): i32;
|
|
30
|
-
function rotl(value: i32, shift: i32): i32;
|
|
31
|
-
function rotr(value: i32, shift: i32): i32;
|
|
32
|
-
const MAX_VALUE: i32;
|
|
33
|
-
const MIN_VALUE: i32;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** SIMD 128-bit vector type */
|
|
37
|
-
declare type v128 = object;
|
|
38
|
-
|
|
39
|
-
/** v128 SIMD intrinsics namespace */
|
|
40
|
-
declare namespace v128 {
|
|
41
|
-
function load(ptr: usize, immOffset?: u32, immAlign?: u32): v128;
|
|
42
|
-
function store(ptr: usize, value: v128, immOffset?: u32, immAlign?: u32): void;
|
|
43
|
-
function splat<T>(value: T): v128;
|
|
44
|
-
function extract_lane<T>(vec: v128, idx: u8): T;
|
|
45
|
-
function replace_lane<T>(vec: v128, idx: u8, value: T): v128;
|
|
46
|
-
function add<T>(a: v128, b: v128): v128;
|
|
47
|
-
function sub<T>(a: v128, b: v128): v128;
|
|
48
|
-
function mul<T>(a: v128, b: v128): v128;
|
|
49
|
-
function div<T>(a: v128, b: v128): v128;
|
|
50
|
-
function neg<T>(a: v128): v128;
|
|
51
|
-
function abs<T>(a: v128): v128;
|
|
52
|
-
function sqrt<T>(a: v128): v128;
|
|
53
|
-
function min<T>(a: v128, b: v128): v128;
|
|
54
|
-
function max<T>(a: v128, b: v128): v128;
|
|
55
|
-
function and(a: v128, b: v128): v128;
|
|
56
|
-
function or(a: v128, b: v128): v128;
|
|
57
|
-
function xor(a: v128, b: v128): v128;
|
|
58
|
-
function not(a: v128): v128;
|
|
59
|
-
function shuffle<T>(a: v128, b: v128, ...lanes: u8[]): v128;
|
|
60
|
-
function swizzle(a: v128, s: v128): v128;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/** f64x2 SIMD namespace (2 x f64 packed into v128) */
|
|
64
|
-
declare namespace f64x2 {
|
|
65
|
-
function splat(value: f64): v128;
|
|
66
|
-
function extract_lane(vec: v128, idx: 0 | 1): f64;
|
|
67
|
-
function replace_lane(vec: v128, idx: 0 | 1, value: f64): v128;
|
|
68
|
-
function add(a: v128, b: v128): v128;
|
|
69
|
-
function sub(a: v128, b: v128): v128;
|
|
70
|
-
function mul(a: v128, b: v128): v128;
|
|
71
|
-
function div(a: v128, b: v128): v128;
|
|
72
|
-
function neg(a: v128): v128;
|
|
73
|
-
function abs(a: v128): v128;
|
|
74
|
-
function sqrt(a: v128): v128;
|
|
75
|
-
function min(a: v128, b: v128): v128;
|
|
76
|
-
function max(a: v128, b: v128): v128;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// AssemblyScript type cast functions (e.g., f64(intValue) converts i32 to f64)
|
|
80
|
-
declare function f64(value: number): number;
|
|
81
|
-
declare function i32(value: number): number;
|
|
82
|
-
declare function i64(value: number): number;
|
|
83
|
-
declare function u32(value: number): number;
|
|
84
|
-
|
|
85
|
-
// AssemblyScript builtins
|
|
86
|
-
declare function unchecked<T>(expr: T): T;
|
|
87
|
-
declare function changetype<T>(value: unknown): T;
|
|
88
|
-
declare function isFinite<T>(value: T): boolean;
|
|
89
|
-
declare function isNaN<T>(value: T): boolean;
|
|
90
|
-
declare function sizeof<T>(): usize;
|
|
91
|
-
declare function assert<T>(value: T, message?: string): T;
|
|
92
|
-
declare function idof<T>(): u32;
|
|
93
|
-
|
|
94
|
-
// AssemblyScript memory intrinsics
|
|
95
|
-
declare function load<T>(ptr: usize, immOffset?: u32): T;
|
|
96
|
-
declare function store<T>(ptr: usize, value: T, immOffset?: u32): void;
|
|
97
|
-
|
|
98
|
-
declare namespace memory {
|
|
99
|
-
function grow(pages: i32): i32;
|
|
100
|
-
function size(): i32;
|
|
101
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Ambient type declarations for AssemblyScript builtins.
|
|
3
|
+
* These types are provided by the AssemblyScript compiler at build time
|
|
4
|
+
* but need declarations for TypeScript type-checking when WASM files
|
|
5
|
+
* are transitively included via imports from src/function/.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// AssemblyScript numeric types
|
|
9
|
+
declare type usize = number;
|
|
10
|
+
declare type i64 = number;
|
|
11
|
+
declare type u8 = number;
|
|
12
|
+
declare type u32 = number;
|
|
13
|
+
declare type f32 = number;
|
|
14
|
+
|
|
15
|
+
// f64: type alias + namespace with constants
|
|
16
|
+
declare type f64 = number;
|
|
17
|
+
declare namespace f64 {
|
|
18
|
+
const NaN: f64;
|
|
19
|
+
const POSITIVE_INFINITY: f64;
|
|
20
|
+
const NEGATIVE_INFINITY: f64;
|
|
21
|
+
const MAX_VALUE: f64;
|
|
22
|
+
const MIN_VALUE: f64;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// i32: type alias + namespace with builtins
|
|
26
|
+
declare type i32 = number;
|
|
27
|
+
declare namespace i32 {
|
|
28
|
+
function clz(value: i32): i32;
|
|
29
|
+
function ctz(value: i32): i32;
|
|
30
|
+
function rotl(value: i32, shift: i32): i32;
|
|
31
|
+
function rotr(value: i32, shift: i32): i32;
|
|
32
|
+
const MAX_VALUE: i32;
|
|
33
|
+
const MIN_VALUE: i32;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** SIMD 128-bit vector type */
|
|
37
|
+
declare type v128 = object;
|
|
38
|
+
|
|
39
|
+
/** v128 SIMD intrinsics namespace */
|
|
40
|
+
declare namespace v128 {
|
|
41
|
+
function load(ptr: usize, immOffset?: u32, immAlign?: u32): v128;
|
|
42
|
+
function store(ptr: usize, value: v128, immOffset?: u32, immAlign?: u32): void;
|
|
43
|
+
function splat<T>(value: T): v128;
|
|
44
|
+
function extract_lane<T>(vec: v128, idx: u8): T;
|
|
45
|
+
function replace_lane<T>(vec: v128, idx: u8, value: T): v128;
|
|
46
|
+
function add<T>(a: v128, b: v128): v128;
|
|
47
|
+
function sub<T>(a: v128, b: v128): v128;
|
|
48
|
+
function mul<T>(a: v128, b: v128): v128;
|
|
49
|
+
function div<T>(a: v128, b: v128): v128;
|
|
50
|
+
function neg<T>(a: v128): v128;
|
|
51
|
+
function abs<T>(a: v128): v128;
|
|
52
|
+
function sqrt<T>(a: v128): v128;
|
|
53
|
+
function min<T>(a: v128, b: v128): v128;
|
|
54
|
+
function max<T>(a: v128, b: v128): v128;
|
|
55
|
+
function and(a: v128, b: v128): v128;
|
|
56
|
+
function or(a: v128, b: v128): v128;
|
|
57
|
+
function xor(a: v128, b: v128): v128;
|
|
58
|
+
function not(a: v128): v128;
|
|
59
|
+
function shuffle<T>(a: v128, b: v128, ...lanes: u8[]): v128;
|
|
60
|
+
function swizzle(a: v128, s: v128): v128;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** f64x2 SIMD namespace (2 x f64 packed into v128) */
|
|
64
|
+
declare namespace f64x2 {
|
|
65
|
+
function splat(value: f64): v128;
|
|
66
|
+
function extract_lane(vec: v128, idx: 0 | 1): f64;
|
|
67
|
+
function replace_lane(vec: v128, idx: 0 | 1, value: f64): v128;
|
|
68
|
+
function add(a: v128, b: v128): v128;
|
|
69
|
+
function sub(a: v128, b: v128): v128;
|
|
70
|
+
function mul(a: v128, b: v128): v128;
|
|
71
|
+
function div(a: v128, b: v128): v128;
|
|
72
|
+
function neg(a: v128): v128;
|
|
73
|
+
function abs(a: v128): v128;
|
|
74
|
+
function sqrt(a: v128): v128;
|
|
75
|
+
function min(a: v128, b: v128): v128;
|
|
76
|
+
function max(a: v128, b: v128): v128;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// AssemblyScript type cast functions (e.g., f64(intValue) converts i32 to f64)
|
|
80
|
+
declare function f64(value: number): number;
|
|
81
|
+
declare function i32(value: number): number;
|
|
82
|
+
declare function i64(value: number): number;
|
|
83
|
+
declare function u32(value: number): number;
|
|
84
|
+
|
|
85
|
+
// AssemblyScript builtins
|
|
86
|
+
declare function unchecked<T>(expr: T): T;
|
|
87
|
+
declare function changetype<T>(value: unknown): T;
|
|
88
|
+
declare function isFinite<T>(value: T): boolean;
|
|
89
|
+
declare function isNaN<T>(value: T): boolean;
|
|
90
|
+
declare function sizeof<T>(): usize;
|
|
91
|
+
declare function assert<T>(value: T, message?: string): T;
|
|
92
|
+
declare function idof<T>(): u32;
|
|
93
|
+
|
|
94
|
+
// AssemblyScript memory intrinsics
|
|
95
|
+
declare function load<T>(ptr: usize, immOffset?: u32): T;
|
|
96
|
+
declare function store<T>(ptr: usize, value: T, immOffset?: u32): void;
|
|
97
|
+
|
|
98
|
+
declare namespace memory {
|
|
99
|
+
function grow(pages: i32): i32;
|
|
100
|
+
function size(): i32;
|
|
101
|
+
}
|