@danielsimonjr/mathts-functions 0.2.2 → 0.2.4
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/dist/algebra/decomposition/lup.d.ts +78 -0
- package/dist/algebra/decomposition/lup.d.ts.map +1 -0
- package/dist/algebra/decomposition/qr.d.ts +60 -0
- package/dist/algebra/decomposition/qr.d.ts.map +1 -0
- package/dist/algebra/decomposition/schur.d.ts +40 -0
- package/dist/algebra/decomposition/schur.d.ts.map +1 -0
- package/dist/algebra/decomposition/slu.d.ts +37 -0
- package/dist/algebra/decomposition/slu.d.ts.map +1 -0
- package/dist/algebra/derivative.d.ts +35 -0
- package/dist/algebra/derivative.d.ts.map +1 -0
- package/dist/algebra/leafCount.d.ts +9 -0
- package/dist/algebra/leafCount.d.ts.map +1 -0
- package/dist/algebra/lyap.d.ts +14 -0
- package/dist/algebra/lyap.d.ts.map +1 -0
- package/dist/algebra/polynomialRoot.d.ts +22 -0
- package/dist/algebra/polynomialRoot.d.ts.map +1 -0
- package/dist/algebra/rationalize.d.ts +43 -0
- package/dist/algebra/rationalize.d.ts.map +1 -0
- package/dist/algebra/resolve.d.ts +25 -0
- package/dist/algebra/resolve.d.ts.map +1 -0
- package/dist/algebra/simplify/util.d.ts +35 -0
- package/dist/algebra/simplify/util.d.ts.map +1 -0
- package/dist/algebra/simplify/wildcards.d.ts +5 -0
- package/dist/algebra/simplify/wildcards.d.ts.map +1 -0
- package/dist/algebra/simplify.d.ts +57 -0
- package/dist/algebra/simplify.d.ts.map +1 -0
- package/dist/algebra/simplifyConstant.d.ts +20 -0
- package/dist/algebra/simplifyConstant.d.ts.map +1 -0
- package/dist/algebra/simplifyCore.d.ts +21 -0
- package/dist/algebra/simplifyCore.d.ts.map +1 -0
- package/dist/algebra/solver/lsolve.d.ts +46 -0
- package/dist/algebra/solver/lsolve.d.ts.map +1 -0
- package/dist/algebra/solver/lsolveAll.d.ts +53 -0
- package/dist/algebra/solver/lsolveAll.d.ts.map +1 -0
- package/dist/algebra/solver/lusolve.d.ts +62 -0
- package/dist/algebra/solver/lusolve.d.ts.map +1 -0
- package/dist/algebra/solver/usolve.d.ts +46 -0
- package/dist/algebra/solver/usolve.d.ts.map +1 -0
- package/dist/algebra/solver/usolveAll.d.ts +53 -0
- package/dist/algebra/solver/usolveAll.d.ts.map +1 -0
- package/dist/algebra/solver/utils/solveValidation.d.ts +31 -0
- package/dist/algebra/solver/utils/solveValidation.d.ts.map +1 -0
- package/dist/algebra/sparse/csAmd.d.ts +15 -0
- package/dist/algebra/sparse/csAmd.d.ts.map +1 -0
- package/dist/algebra/sparse/csChol.d.ts +39 -0
- package/dist/algebra/sparse/csChol.d.ts.map +1 -0
- package/dist/algebra/sparse/csCounts.d.ts +13 -0
- package/dist/algebra/sparse/csCounts.d.ts.map +1 -0
- package/dist/algebra/sparse/csCumsum.d.ts +9 -0
- package/dist/algebra/sparse/csCumsum.d.ts.map +1 -0
- package/dist/algebra/sparse/csDfs.d.ts +23 -0
- package/dist/algebra/sparse/csDfs.d.ts.map +1 -0
- package/dist/algebra/sparse/csEreach.d.ts +20 -0
- package/dist/algebra/sparse/csEreach.d.ts.map +1 -0
- package/dist/algebra/sparse/csEtree.d.ts +16 -0
- package/dist/algebra/sparse/csEtree.d.ts.map +1 -0
- package/dist/algebra/sparse/csFkeep.d.ts +22 -0
- package/dist/algebra/sparse/csFkeep.d.ts.map +1 -0
- package/dist/algebra/sparse/csFlip.d.ts +7 -0
- package/dist/algebra/sparse/csFlip.d.ts.map +1 -0
- package/dist/algebra/sparse/csIpvec.d.ts +10 -0
- package/dist/algebra/sparse/csIpvec.d.ts.map +1 -0
- package/dist/algebra/sparse/csLeaf.d.ts +21 -0
- package/dist/algebra/sparse/csLeaf.d.ts.map +1 -0
- package/dist/algebra/sparse/csLu.d.ts +37 -0
- package/dist/algebra/sparse/csLu.d.ts.map +1 -0
- package/dist/algebra/sparse/csMark.d.ts +8 -0
- package/dist/algebra/sparse/csMark.d.ts.map +1 -0
- package/dist/algebra/sparse/csMarked.d.ts +8 -0
- package/dist/algebra/sparse/csMarked.d.ts.map +1 -0
- package/dist/algebra/sparse/csPermute.d.ts +27 -0
- package/dist/algebra/sparse/csPermute.d.ts.map +1 -0
- package/dist/algebra/sparse/csPost.d.ts +8 -0
- package/dist/algebra/sparse/csPost.d.ts.map +1 -0
- package/dist/algebra/sparse/csReach.d.ts +23 -0
- package/dist/algebra/sparse/csReach.d.ts.map +1 -0
- package/dist/algebra/sparse/csSpsolve.d.ts +15 -0
- package/dist/algebra/sparse/csSpsolve.d.ts.map +1 -0
- package/dist/algebra/sparse/csSqr.d.ts +25 -0
- package/dist/algebra/sparse/csSqr.d.ts.map +1 -0
- package/dist/algebra/sparse/csSymperm.d.ts +22 -0
- package/dist/algebra/sparse/csSymperm.d.ts.map +1 -0
- package/dist/algebra/sparse/csTdfs.d.ts +13 -0
- package/dist/algebra/sparse/csTdfs.d.ts.map +1 -0
- package/dist/algebra/sparse/csUnflip.d.ts +7 -0
- package/dist/algebra/sparse/csUnflip.d.ts.map +1 -0
- package/dist/algebra/sylvester.d.ts +30 -0
- package/dist/algebra/sylvester.d.ts.map +1 -0
- package/dist/algebra/symbolicEqual.d.ts +18 -0
- package/dist/algebra/symbolicEqual.d.ts.map +1 -0
- package/dist/arithmetic/abs.d.ts +7 -0
- package/dist/arithmetic/abs.d.ts.map +1 -0
- package/dist/arithmetic/addScalar.d.ts +7 -0
- package/dist/arithmetic/addScalar.d.ts.map +1 -0
- package/dist/arithmetic/cbrt.d.ts +37 -0
- package/dist/arithmetic/cbrt.d.ts.map +1 -0
- package/dist/arithmetic/ceil.d.ts +22 -0
- package/dist/arithmetic/ceil.d.ts.map +1 -0
- package/dist/arithmetic/cube.d.ts +7 -0
- package/dist/arithmetic/cube.d.ts.map +1 -0
- package/dist/arithmetic/divide.d.ts +42 -0
- package/dist/arithmetic/divide.d.ts.map +1 -0
- package/dist/arithmetic/divideScalar.d.ts +8 -0
- package/dist/arithmetic/divideScalar.d.ts.map +1 -0
- package/dist/arithmetic/dotDivide.d.ts +13 -0
- package/dist/arithmetic/dotDivide.d.ts.map +1 -0
- package/dist/arithmetic/dotMultiply.d.ts +11 -0
- package/dist/arithmetic/dotMultiply.d.ts.map +1 -0
- package/dist/arithmetic/dotPow.d.ts +16 -0
- package/dist/arithmetic/dotPow.d.ts.map +1 -0
- package/dist/arithmetic/exp.d.ts +7 -0
- package/dist/arithmetic/exp.d.ts.map +1 -0
- package/dist/arithmetic/expm1.d.ts +15 -0
- package/dist/arithmetic/expm1.d.ts.map +1 -0
- package/dist/arithmetic/fix.d.ts +30 -0
- package/dist/arithmetic/fix.d.ts.map +1 -0
- package/dist/arithmetic/floor.d.ts +22 -0
- package/dist/arithmetic/floor.d.ts.map +1 -0
- package/dist/arithmetic/gcd.d.ts +25 -0
- package/dist/arithmetic/gcd.d.ts.map +1 -0
- package/dist/arithmetic/hypot.d.ts +14 -0
- package/dist/arithmetic/hypot.d.ts.map +1 -0
- package/dist/arithmetic/invmod.d.ts +19 -0
- package/dist/arithmetic/invmod.d.ts.map +1 -0
- package/dist/arithmetic/lcm.d.ts +10 -0
- package/dist/arithmetic/lcm.d.ts.map +1 -0
- package/dist/arithmetic/log.d.ts +18 -0
- package/dist/arithmetic/log.d.ts.map +1 -0
- package/dist/arithmetic/log10.d.ts +18 -0
- package/dist/arithmetic/log10.d.ts.map +1 -0
- package/dist/arithmetic/log1p.d.ts +19 -0
- package/dist/arithmetic/log1p.d.ts.map +1 -0
- package/dist/arithmetic/log2.d.ts +17 -0
- package/dist/arithmetic/log2.d.ts.map +1 -0
- package/dist/arithmetic/mod.d.ts +15 -0
- package/dist/arithmetic/mod.d.ts.map +1 -0
- package/dist/arithmetic/multiplyScalar.d.ts +7 -0
- package/dist/arithmetic/multiplyScalar.d.ts.map +1 -0
- package/dist/arithmetic/norm.d.ts +33 -0
- package/dist/arithmetic/norm.d.ts.map +1 -0
- package/dist/arithmetic/nthRoot.d.ts +38 -0
- package/dist/arithmetic/nthRoot.d.ts.map +1 -0
- package/dist/arithmetic/nthRoots.d.ts +23 -0
- package/dist/arithmetic/nthRoots.d.ts.map +1 -0
- package/dist/arithmetic/pow.d.ts +34 -0
- package/dist/arithmetic/pow.d.ts.map +1 -0
- package/dist/arithmetic/round.d.ts +27 -0
- package/dist/arithmetic/round.d.ts.map +1 -0
- package/dist/arithmetic/sign.d.ts +31 -0
- package/dist/arithmetic/sign.d.ts.map +1 -0
- package/dist/arithmetic/sqrt.d.ts +16 -0
- package/dist/arithmetic/sqrt.d.ts.map +1 -0
- package/dist/arithmetic/square.d.ts +7 -0
- package/dist/arithmetic/square.d.ts.map +1 -0
- package/dist/arithmetic/subtract.d.ts +18 -0
- package/dist/arithmetic/subtract.d.ts.map +1 -0
- package/dist/arithmetic/subtractScalar.d.ts +7 -0
- package/dist/arithmetic/subtractScalar.d.ts.map +1 -0
- package/dist/arithmetic/unaryMinus.d.ts +10 -0
- package/dist/arithmetic/unaryMinus.d.ts.map +1 -0
- package/dist/arithmetic/unaryPlus.d.ts +10 -0
- package/dist/arithmetic/unaryPlus.d.ts.map +1 -0
- package/dist/arithmetic/utils/nodeOperations.d.ts +37 -0
- package/dist/arithmetic/utils/nodeOperations.d.ts.map +1 -0
- package/dist/arithmetic/xgcd.d.ts +25 -0
- package/dist/arithmetic/xgcd.d.ts.map +1 -0
- package/dist/bitwise/bitAnd.d.ts +10 -0
- package/dist/bitwise/bitAnd.d.ts.map +1 -0
- package/dist/bitwise/bitNot.d.ts +7 -0
- package/dist/bitwise/bitNot.d.ts.map +1 -0
- package/dist/bitwise/bitOr.d.ts +11 -0
- package/dist/bitwise/bitOr.d.ts.map +1 -0
- package/dist/bitwise/bitXor.d.ts +11 -0
- package/dist/bitwise/bitXor.d.ts.map +1 -0
- package/dist/bitwise/leftShift.d.ts +17 -0
- package/dist/bitwise/leftShift.d.ts.map +1 -0
- package/dist/bitwise/rightArithShift.d.ts +17 -0
- package/dist/bitwise/rightArithShift.d.ts.map +1 -0
- package/dist/bitwise/rightLogShift.d.ts +17 -0
- package/dist/bitwise/rightLogShift.d.ts.map +1 -0
- package/dist/bitwise/useMatrixForArrayScalar.d.ts +19 -0
- package/dist/bitwise/useMatrixForArrayScalar.d.ts.map +1 -0
- package/dist/combinatorics/bellNumbers.d.ts +14 -0
- package/dist/combinatorics/bellNumbers.d.ts.map +1 -0
- package/dist/combinatorics/catalan.d.ts +16 -0
- package/dist/combinatorics/catalan.d.ts.map +1 -0
- package/dist/combinatorics/composition.d.ts +16 -0
- package/dist/combinatorics/composition.d.ts.map +1 -0
- package/dist/combinatorics/stirlingS2.d.ts +22 -0
- package/dist/combinatorics/stirlingS2.d.ts.map +1 -0
- package/dist/complex/arg.d.ts +7 -0
- package/dist/complex/arg.d.ts.map +1 -0
- package/dist/complex/conj.d.ts +7 -0
- package/dist/complex/conj.d.ts.map +1 -0
- package/dist/complex/im.d.ts +7 -0
- package/dist/complex/im.d.ts.map +1 -0
- package/dist/complex/re.d.ts +7 -0
- package/dist/complex/re.d.ts.map +1 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/create.d.ts +137 -0
- package/dist/core/create.d.ts.map +1 -0
- package/dist/core/function/config.d.ts +35 -0
- package/dist/core/function/config.d.ts.map +1 -0
- package/dist/core/function/import.d.ts +30 -0
- package/dist/core/function/import.d.ts.map +1 -0
- package/dist/core/function/typed.d.ts +127 -0
- package/dist/core/function/typed.d.ts.map +1 -0
- package/dist/error/ArgumentsError.d.ts +21 -0
- package/dist/error/ArgumentsError.d.ts.map +1 -0
- package/dist/error/DimensionError.d.ts +18 -0
- package/dist/error/DimensionError.d.ts.map +1 -0
- package/dist/error/IndexError.d.ts +24 -0
- package/dist/error/IndexError.d.ts.map +1 -0
- package/dist/error/MathjsError.d.ts +13 -0
- package/dist/error/MathjsError.d.ts.map +1 -0
- package/dist/expression/operators.d.ts +942 -0
- package/dist/expression/operators.d.ts.map +1 -0
- package/dist/factories/evaluate.d.ts +91 -0
- package/dist/factories/evaluate.d.ts.map +1 -0
- package/dist/factories/index.d.ts +317 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/matrix-bridge.d.ts +241 -0
- package/dist/factories/matrix-bridge.d.ts.map +1 -0
- package/dist/factories/scope.d.ts +12 -0
- package/dist/factories/scope.d.ts.map +1 -0
- package/dist/geometry/distance.d.ts +15 -0
- package/dist/geometry/distance.d.ts.map +1 -0
- package/dist/geometry/intersect.d.ts +26 -0
- package/dist/geometry/intersect.d.ts.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/logical/and.d.ts +17 -0
- package/dist/logical/and.d.ts.map +1 -0
- package/dist/logical/not.d.ts +7 -0
- package/dist/logical/not.d.ts.map +1 -0
- package/dist/logical/nullish.d.ts +11 -0
- package/dist/logical/nullish.d.ts.map +1 -0
- package/dist/logical/or.d.ts +15 -0
- package/dist/logical/or.d.ts.map +1 -0
- package/dist/logical/xor.d.ts +15 -0
- package/dist/logical/xor.d.ts.map +1 -0
- package/dist/matrix/column.d.ts +22 -0
- package/dist/matrix/column.d.ts.map +1 -0
- package/dist/matrix/concat.d.ts +6 -0
- package/dist/matrix/concat.d.ts.map +1 -0
- package/dist/matrix/count.d.ts +9 -0
- package/dist/matrix/count.d.ts.map +1 -0
- package/dist/matrix/cross.d.ts +7 -0
- package/dist/matrix/cross.d.ts.map +1 -0
- package/dist/matrix/ctranspose.d.ts +9 -0
- package/dist/matrix/ctranspose.d.ts.map +1 -0
- package/dist/matrix/det.d.ts +42 -0
- package/dist/matrix/det.d.ts.map +1 -0
- package/dist/matrix/diag.d.ts +26 -0
- package/dist/matrix/diag.d.ts.map +1 -0
- package/dist/matrix/diff.d.ts +8 -0
- package/dist/matrix/diff.d.ts.map +1 -0
- package/dist/matrix/dot.d.ts +17 -0
- package/dist/matrix/dot.d.ts.map +1 -0
- package/dist/matrix/eigs/complexEigs.d.ts +48 -0
- package/dist/matrix/eigs/complexEigs.d.ts.map +1 -0
- package/dist/matrix/eigs/realSymmetric.d.ts +34 -0
- package/dist/matrix/eigs/realSymmetric.d.ts.map +1 -0
- package/dist/matrix/eigs.d.ts +75 -0
- package/dist/matrix/eigs.d.ts.map +1 -0
- package/dist/matrix/expm.d.ts +26 -0
- package/dist/matrix/expm.d.ts.map +1 -0
- package/dist/matrix/fft.d.ts +41 -0
- package/dist/matrix/fft.d.ts.map +1 -0
- package/dist/matrix/filter.d.ts +7 -0
- package/dist/matrix/filter.d.ts.map +1 -0
- package/dist/matrix/flatten.d.ts +7 -0
- package/dist/matrix/flatten.d.ts.map +1 -0
- package/dist/matrix/forEach.d.ts +7 -0
- package/dist/matrix/forEach.d.ts.map +1 -0
- package/dist/matrix/getMatrixDataType.d.ts +7 -0
- package/dist/matrix/getMatrixDataType.d.ts.map +1 -0
- package/dist/matrix/identity.d.ts +41 -0
- package/dist/matrix/identity.d.ts.map +1 -0
- package/dist/matrix/ifft.d.ts +33 -0
- package/dist/matrix/ifft.d.ts.map +1 -0
- package/dist/matrix/inv.d.ts +48 -0
- package/dist/matrix/inv.d.ts.map +1 -0
- package/dist/matrix/kron.d.ts +17 -0
- package/dist/matrix/kron.d.ts.map +1 -0
- package/dist/matrix/map.d.ts +7 -0
- package/dist/matrix/map.d.ts.map +1 -0
- package/dist/matrix/mapSlices.d.ts +6 -0
- package/dist/matrix/mapSlices.d.ts.map +1 -0
- package/dist/matrix/matrixFromColumns.d.ts +36 -0
- package/dist/matrix/matrixFromColumns.d.ts.map +1 -0
- package/dist/matrix/matrixFromFunction.d.ts +7 -0
- package/dist/matrix/matrixFromFunction.d.ts.map +1 -0
- package/dist/matrix/matrixFromRows.d.ts +36 -0
- package/dist/matrix/matrixFromRows.d.ts.map +1 -0
- package/dist/matrix/ones.d.ts +3 -0
- package/dist/matrix/ones.d.ts.map +1 -0
- package/dist/matrix/partitionSelect.d.ts +13 -0
- package/dist/matrix/partitionSelect.d.ts.map +1 -0
- package/dist/matrix/pinv.d.ts +51 -0
- package/dist/matrix/pinv.d.ts.map +1 -0
- package/dist/matrix/range.d.ts +27 -0
- package/dist/matrix/range.d.ts.map +1 -0
- package/dist/matrix/reshape.d.ts +8 -0
- package/dist/matrix/reshape.d.ts.map +1 -0
- package/dist/matrix/resize.d.ts +17 -0
- package/dist/matrix/resize.d.ts.map +1 -0
- package/dist/matrix/rotate.d.ts +7 -0
- package/dist/matrix/rotate.d.ts.map +1 -0
- package/dist/matrix/rotationMatrix.d.ts +17 -0
- package/dist/matrix/rotationMatrix.d.ts.map +1 -0
- package/dist/matrix/row.d.ts +22 -0
- package/dist/matrix/row.d.ts.map +1 -0
- package/dist/matrix/size.d.ts +9 -0
- package/dist/matrix/size.d.ts.map +1 -0
- package/dist/matrix/sort.d.ts +8 -0
- package/dist/matrix/sort.d.ts.map +1 -0
- package/dist/matrix/sqrtm.d.ts +33 -0
- package/dist/matrix/sqrtm.d.ts.map +1 -0
- package/dist/matrix/squeeze.d.ts +7 -0
- package/dist/matrix/squeeze.d.ts.map +1 -0
- package/dist/matrix/subset.d.ts +7 -0
- package/dist/matrix/subset.d.ts.map +1 -0
- package/dist/matrix/trace.d.ts +25 -0
- package/dist/matrix/trace.d.ts.map +1 -0
- package/dist/matrix/transpose.d.ts +45 -0
- package/dist/matrix/transpose.d.ts.map +1 -0
- package/dist/matrix/utils/zerosAndOnes.d.ts +32 -0
- package/dist/matrix/utils/zerosAndOnes.d.ts.map +1 -0
- package/dist/matrix/zeros.d.ts +3 -0
- package/dist/matrix/zeros.d.ts.map +1 -0
- package/dist/numeric/solveODE.d.ts +2 -0
- package/dist/numeric/solveODE.d.ts.map +1 -0
- package/dist/plain/number/arithmetic.d.ts +168 -0
- package/dist/plain/number/arithmetic.d.ts.map +1 -0
- package/dist/plain/number/bitwise.d.ts +29 -0
- package/dist/plain/number/bitwise.d.ts.map +1 -0
- package/dist/plain/number/combinations.d.ts +5 -0
- package/dist/plain/number/combinations.d.ts.map +1 -0
- package/dist/plain/number/constants.d.ts +5 -0
- package/dist/plain/number/constants.d.ts.map +1 -0
- package/dist/plain/number/index.d.ts +10 -0
- package/dist/plain/number/index.d.ts.map +1 -0
- package/dist/plain/number/logical.d.ts +17 -0
- package/dist/plain/number/logical.d.ts.map +1 -0
- package/dist/plain/number/probability.d.ts +15 -0
- package/dist/plain/number/probability.d.ts.map +1 -0
- package/dist/plain/number/relational.d.ts +29 -0
- package/dist/plain/number/relational.d.ts.map +1 -0
- package/dist/plain/number/trigonometry.d.ts +101 -0
- package/dist/plain/number/trigonometry.d.ts.map +1 -0
- package/dist/plain/number/utils.d.ts +21 -0
- package/dist/plain/number/utils.d.ts.map +1 -0
- package/dist/probability/bernoulli.d.ts +19 -0
- package/dist/probability/bernoulli.d.ts.map +1 -0
- package/dist/probability/combinations.d.ts +7 -0
- package/dist/probability/combinations.d.ts.map +1 -0
- package/dist/probability/combinationsWithRep.d.ts +7 -0
- package/dist/probability/combinationsWithRep.d.ts.map +1 -0
- package/dist/probability/factorial.d.ts +8 -0
- package/dist/probability/factorial.d.ts.map +1 -0
- package/dist/probability/gamma.d.ts +45 -0
- package/dist/probability/gamma.d.ts.map +1 -0
- package/dist/probability/kldivergence.d.ts +18 -0
- package/dist/probability/kldivergence.d.ts.map +1 -0
- package/dist/probability/lgamma.d.ts +24 -0
- package/dist/probability/lgamma.d.ts.map +1 -0
- package/dist/probability/multinomial.d.ts +13 -0
- package/dist/probability/multinomial.d.ts.map +1 -0
- package/dist/probability/permutations.d.ts +8 -0
- package/dist/probability/permutations.d.ts.map +1 -0
- package/dist/probability/pickRandom.d.ts +10 -0
- package/dist/probability/pickRandom.d.ts.map +1 -0
- package/dist/probability/random.d.ts +11 -0
- package/dist/probability/random.d.ts.map +1 -0
- package/dist/probability/randomInt.d.ts +11 -0
- package/dist/probability/randomInt.d.ts.map +1 -0
- package/dist/probability/util/randomMatrix.d.ts +10 -0
- package/dist/probability/util/randomMatrix.d.ts.map +1 -0
- package/dist/probability/util/seededRNG.d.ts +4 -0
- package/dist/probability/util/seededRNG.d.ts.map +1 -0
- package/dist/relational/compare.d.ts +38 -0
- package/dist/relational/compare.d.ts.map +1 -0
- package/dist/relational/compareNatural.d.ts +8 -0
- package/dist/relational/compareNatural.d.ts.map +1 -0
- package/dist/relational/compareText.d.ts +15 -0
- package/dist/relational/compareText.d.ts.map +1 -0
- package/dist/relational/compareUnits.d.ts +9 -0
- package/dist/relational/compareUnits.d.ts.map +1 -0
- package/dist/relational/deepEqual.d.ts +8 -0
- package/dist/relational/deepEqual.d.ts.map +1 -0
- package/dist/relational/equal.d.ts +26 -0
- package/dist/relational/equal.d.ts.map +1 -0
- package/dist/relational/equalScalar.d.ts +11 -0
- package/dist/relational/equalScalar.d.ts.map +1 -0
- package/dist/relational/equalText.d.ts +9 -0
- package/dist/relational/equalText.d.ts.map +1 -0
- package/dist/relational/larger.d.ts +34 -0
- package/dist/relational/larger.d.ts.map +1 -0
- package/dist/relational/largerEq.d.ts +27 -0
- package/dist/relational/largerEq.d.ts.map +1 -0
- package/dist/relational/smaller.d.ts +34 -0
- package/dist/relational/smaller.d.ts.map +1 -0
- package/dist/relational/smallerEq.d.ts +27 -0
- package/dist/relational/smallerEq.d.ts.map +1 -0
- package/dist/relational/unequal.d.ts +28 -0
- package/dist/relational/unequal.d.ts.map +1 -0
- package/dist/set/setCartesian.d.ts +15 -0
- package/dist/set/setCartesian.d.ts.map +1 -0
- package/dist/set/setDifference.d.ts +15 -0
- package/dist/set/setDifference.d.ts.map +1 -0
- package/dist/set/setDistinct.d.ts +2 -0
- package/dist/set/setDistinct.d.ts.map +1 -0
- package/dist/set/setIntersect.d.ts +15 -0
- package/dist/set/setIntersect.d.ts.map +1 -0
- package/dist/set/setIsSubset.d.ts +2 -0
- package/dist/set/setIsSubset.d.ts.map +1 -0
- package/dist/set/setMultiplicity.d.ts +2 -0
- package/dist/set/setMultiplicity.d.ts.map +1 -0
- package/dist/set/setPowerset.d.ts +2 -0
- package/dist/set/setPowerset.d.ts.map +1 -0
- package/dist/set/setSize.d.ts +2 -0
- package/dist/set/setSize.d.ts.map +1 -0
- package/dist/set/setSymDifference.d.ts +15 -0
- package/dist/set/setSymDifference.d.ts.map +1 -0
- package/dist/set/setUnion.d.ts +16 -0
- package/dist/set/setUnion.d.ts.map +1 -0
- package/dist/signal/freqz.d.ts +2 -0
- package/dist/signal/freqz.d.ts.map +1 -0
- package/dist/signal/zpk2tf.d.ts +2 -0
- package/dist/signal/zpk2tf.d.ts.map +1 -0
- package/dist/special/erf.d.ts +7 -0
- package/dist/special/erf.d.ts.map +1 -0
- package/dist/special/zeta.d.ts +38 -0
- package/dist/special/zeta.d.ts.map +1 -0
- package/dist/statistics/corr.d.ts +18 -0
- package/dist/statistics/corr.d.ts.map +1 -0
- package/dist/statistics/cumsum.d.ts +9 -0
- package/dist/statistics/cumsum.d.ts.map +1 -0
- package/dist/statistics/mad.d.ts +11 -0
- package/dist/statistics/mad.d.ts.map +1 -0
- package/dist/statistics/max.d.ts +12 -0
- package/dist/statistics/max.d.ts.map +1 -0
- package/dist/statistics/mean.d.ts +9 -0
- package/dist/statistics/mean.d.ts.map +1 -0
- package/dist/statistics/median.d.ts +11 -0
- package/dist/statistics/median.d.ts.map +1 -0
- package/dist/statistics/min.d.ts +12 -0
- package/dist/statistics/min.d.ts.map +1 -0
- package/dist/statistics/mode.d.ts +9 -0
- package/dist/statistics/mode.d.ts.map +1 -0
- package/dist/statistics/prod.d.ts +12 -0
- package/dist/statistics/prod.d.ts.map +1 -0
- package/dist/statistics/quantileSeq.d.ts +26 -0
- package/dist/statistics/quantileSeq.d.ts.map +1 -0
- package/dist/statistics/std.d.ts +10 -0
- package/dist/statistics/std.d.ts.map +1 -0
- package/dist/statistics/sum.d.ts +12 -0
- package/dist/statistics/sum.d.ts.map +1 -0
- package/dist/statistics/utils/improveErrorMessage.d.ts +18 -0
- package/dist/statistics/utils/improveErrorMessage.d.ts.map +1 -0
- package/dist/statistics/variance.d.ts +13 -0
- package/dist/statistics/variance.d.ts.map +1 -0
- package/dist/string/bin.d.ts +36 -0
- package/dist/string/bin.d.ts.map +1 -0
- package/dist/string/format.d.ts +7 -0
- package/dist/string/format.d.ts.map +1 -0
- package/dist/string/hex.d.ts +35 -0
- package/dist/string/hex.d.ts.map +1 -0
- package/dist/string/oct.d.ts +36 -0
- package/dist/string/oct.d.ts.map +1 -0
- package/dist/string/print.d.ts +7 -0
- package/dist/string/print.d.ts.map +1 -0
- package/dist/trigonometry/acos.d.ts +16 -0
- package/dist/trigonometry/acos.d.ts.map +1 -0
- package/dist/trigonometry/acosh.d.ts +14 -0
- package/dist/trigonometry/acosh.d.ts.map +1 -0
- package/dist/trigonometry/acot.d.ts +12 -0
- package/dist/trigonometry/acot.d.ts.map +1 -0
- package/dist/trigonometry/acoth.d.ts +19 -0
- package/dist/trigonometry/acoth.d.ts.map +1 -0
- package/dist/trigonometry/acsc.d.ts +19 -0
- package/dist/trigonometry/acsc.d.ts.map +1 -0
- package/dist/trigonometry/acsch.d.ts +12 -0
- package/dist/trigonometry/acsch.d.ts.map +1 -0
- package/dist/trigonometry/asec.d.ts +19 -0
- package/dist/trigonometry/asec.d.ts.map +1 -0
- package/dist/trigonometry/asech.d.ts +19 -0
- package/dist/trigonometry/asech.d.ts.map +1 -0
- package/dist/trigonometry/asin.d.ts +16 -0
- package/dist/trigonometry/asin.d.ts.map +1 -0
- package/dist/trigonometry/asinh.d.ts +5 -0
- package/dist/trigonometry/asinh.d.ts.map +1 -0
- package/dist/trigonometry/atan.d.ts +7 -0
- package/dist/trigonometry/atan.d.ts.map +1 -0
- package/dist/trigonometry/atan2.d.ts +22 -0
- package/dist/trigonometry/atan2.d.ts.map +1 -0
- package/dist/trigonometry/atanh.d.ts +14 -0
- package/dist/trigonometry/atanh.d.ts.map +1 -0
- package/dist/trigonometry/cos.d.ts +7 -0
- package/dist/trigonometry/cos.d.ts.map +1 -0
- package/dist/trigonometry/cosh.d.ts +7 -0
- package/dist/trigonometry/cosh.d.ts.map +1 -0
- package/dist/trigonometry/cot.d.ts +12 -0
- package/dist/trigonometry/cot.d.ts.map +1 -0
- package/dist/trigonometry/coth.d.ts +12 -0
- package/dist/trigonometry/coth.d.ts.map +1 -0
- package/dist/trigonometry/csc.d.ts +12 -0
- package/dist/trigonometry/csc.d.ts.map +1 -0
- package/dist/trigonometry/csch.d.ts +12 -0
- package/dist/trigonometry/csch.d.ts.map +1 -0
- package/dist/trigonometry/sec.d.ts +12 -0
- package/dist/trigonometry/sec.d.ts.map +1 -0
- package/dist/trigonometry/sech.d.ts +12 -0
- package/dist/trigonometry/sech.d.ts.map +1 -0
- package/dist/trigonometry/sin.d.ts +7 -0
- package/dist/trigonometry/sin.d.ts.map +1 -0
- package/dist/trigonometry/sinh.d.ts +7 -0
- package/dist/trigonometry/sinh.d.ts.map +1 -0
- package/dist/trigonometry/tan.d.ts +7 -0
- package/dist/trigonometry/tan.d.ts.map +1 -0
- package/dist/trigonometry/tanh.d.ts +7 -0
- package/dist/trigonometry/tanh.d.ts.map +1 -0
- package/dist/trigonometry/trigUnit.d.ts +9 -0
- package/dist/trigonometry/trigUnit.d.ts.map +1 -0
- package/dist/type/bignumber/BigNumber.d.ts +46 -0
- package/dist/type/bignumber/BigNumber.d.ts.map +1 -0
- package/dist/type/chain/Chain.d.ts +58 -0
- package/dist/type/chain/Chain.d.ts.map +1 -0
- package/dist/type/chain/function/chain.d.ts +6 -0
- package/dist/type/chain/function/chain.d.ts.map +1 -0
- package/dist/type/complex/Complex.d.ts +74 -0
- package/dist/type/complex/Complex.d.ts.map +1 -0
- package/dist/type/local/Decimal.d.ts +223 -0
- package/dist/type/local/Decimal.d.ts.map +1 -0
- package/dist/type/matrix/FibonacciHeap.d.ts +59 -0
- package/dist/type/matrix/FibonacciHeap.d.ts.map +1 -0
- package/dist/type/matrix/ImmutableDenseMatrix.d.ts +282 -0
- package/dist/type/matrix/ImmutableDenseMatrix.d.ts.map +1 -0
- package/dist/type/matrix/MatrixIndex.d.ts +386 -0
- package/dist/type/matrix/MatrixIndex.d.ts.map +1 -0
- package/dist/type/matrix/Spa.d.ts +40 -0
- package/dist/type/matrix/Spa.d.ts.map +1 -0
- package/dist/type/matrix/function/index.d.ts +11 -0
- package/dist/type/matrix/function/index.d.ts.map +1 -0
- package/dist/type/matrix/types.d.ts +435 -0
- package/dist/type/matrix/types.d.ts.map +1 -0
- package/dist/type/matrix/utils/broadcast.d.ts +18 -0
- package/dist/type/matrix/utils/broadcast.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo01xDSid.d.ts +34 -0
- package/dist/type/matrix/utils/matAlgo01xDSid.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo02xDS0.d.ts +32 -0
- package/dist/type/matrix/utils/matAlgo02xDS0.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo03xDSf.d.ts +31 -0
- package/dist/type/matrix/utils/matAlgo03xDSf.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo04xSidSid.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo04xSidSid.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo05xSfSf.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo05xSfSf.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo06xS0S0.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo06xS0S0.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo07xSSf.d.ts +26 -0
- package/dist/type/matrix/utils/matAlgo07xSSf.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo08xS0Sid.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo08xS0Sid.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo09xS0Sf.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo09xS0Sf.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo10xSids.d.ts +33 -0
- package/dist/type/matrix/utils/matAlgo10xSids.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo11xS0s.d.ts +19 -0
- package/dist/type/matrix/utils/matAlgo11xS0s.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo12xSfs.d.ts +33 -0
- package/dist/type/matrix/utils/matAlgo12xSfs.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo13xDD.d.ts +20 -0
- package/dist/type/matrix/utils/matAlgo13xDD.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo14xDs.d.ts +19 -0
- package/dist/type/matrix/utils/matAlgo14xDs.d.ts.map +1 -0
- package/dist/type/matrix/utils/matrixAlgorithmSuite.d.ts +23 -0
- package/dist/type/matrix/utils/matrixAlgorithmSuite.d.ts.map +1 -0
- package/dist/type/resultset/ResultSet.d.ts +28 -0
- package/dist/type/resultset/ResultSet.d.ts.map +1 -0
- package/dist/type/unit/Unit.d.ts +13907 -0
- package/dist/type/unit/Unit.d.ts.map +1 -0
- package/dist/type/unit/function/createUnit.d.ts +40 -0
- package/dist/type/unit/function/createUnit.d.ts.map +1 -0
- package/dist/type/unit/function/splitUnit.d.ts +10 -0
- package/dist/type/unit/function/splitUnit.d.ts.map +1 -0
- package/dist/type/unit/function/unit.d.ts +27 -0
- package/dist/type/unit/function/unit.d.ts.map +1 -0
- package/dist/type/unit/physicalConstants.d.ts +89 -0
- package/dist/type/unit/physicalConstants.d.ts.map +1 -0
- package/dist/typed/algebra.d.ts +418 -0
- package/dist/typed/algebra.d.ts.map +1 -0
- package/dist/typed/arithmetic.d.ts +302 -0
- package/dist/typed/arithmetic.d.ts.map +1 -0
- package/dist/typed/bitwise.d.ts +48 -0
- package/dist/typed/bitwise.d.ts.map +1 -0
- package/dist/typed/cas.d.ts +691 -0
- package/dist/typed/cas.d.ts.map +1 -0
- package/dist/typed/combinatorics.d.ts +333 -0
- package/dist/typed/combinatorics.d.ts.map +1 -0
- package/dist/typed/complex.d.ts +91 -0
- package/dist/typed/complex.d.ts.map +1 -0
- package/dist/typed/dist-objects.d.ts +219 -0
- package/dist/typed/dist-objects.d.ts.map +1 -0
- package/dist/typed/distributions.d.ts +247 -0
- package/dist/typed/distributions.d.ts.map +1 -0
- package/dist/typed/geometry.d.ts +329 -0
- package/dist/typed/geometry.d.ts.map +1 -0
- package/dist/typed/gpu.d.ts +62 -0
- package/dist/typed/gpu.d.ts.map +1 -0
- package/dist/typed/graph.d.ts +339 -0
- package/dist/typed/graph.d.ts.map +1 -0
- package/dist/typed/hypothesis.d.ts +274 -0
- package/dist/typed/hypothesis.d.ts.map +1 -0
- package/dist/typed/index.d.ts +299 -0
- package/dist/typed/index.d.ts.map +1 -0
- package/dist/typed/integration.d.ts +219 -0
- package/dist/typed/integration.d.ts.map +1 -0
- package/dist/typed/interpolation.d.ts +189 -0
- package/dist/typed/interpolation.d.ts.map +1 -0
- package/dist/typed/logical.d.ts +87 -0
- package/dist/typed/logical.d.ts.map +1 -0
- package/dist/typed/matrix-ops.d.ts +303 -0
- package/dist/typed/matrix-ops.d.ts.map +1 -0
- package/dist/typed/numeric.d.ts +395 -0
- package/dist/typed/numeric.d.ts.map +1 -0
- package/dist/typed/probability.d.ts +165 -0
- package/dist/typed/probability.d.ts.map +1 -0
- package/dist/typed/relational.d.ts +136 -0
- package/dist/typed/relational.d.ts.map +1 -0
- package/dist/typed/set.d.ts +145 -0
- package/dist/typed/set.d.ts.map +1 -0
- package/dist/typed/signal.d.ts +427 -0
- package/dist/typed/signal.d.ts.map +1 -0
- package/dist/typed/special.d.ts +469 -0
- package/dist/typed/special.d.ts.map +1 -0
- package/dist/typed/statistics.d.ts +174 -0
- package/dist/typed/statistics.d.ts.map +1 -0
- package/dist/typed/string.d.ts +114 -0
- package/dist/typed/string.d.ts.map +1 -0
- package/dist/typed/trigonometry.d.ts +111 -0
- package/dist/typed/trigonometry.d.ts.map +1 -0
- package/dist/typed/typed-bridge.d.ts +6 -0
- package/dist/typed/typed-bridge.d.ts.map +1 -0
- package/dist/typed/unit.d.ts +60 -0
- package/dist/typed/unit.d.ts.map +1 -0
- package/dist/types.d.ts +20 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/unit/to.d.ts +13 -0
- package/dist/unit/to.d.ts.map +1 -0
- package/dist/unit/toBest.d.ts +5 -0
- package/dist/unit/toBest.d.ts.map +1 -0
- package/dist/utils/array.d.ts +249 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/bigint.d.ts +18 -0
- package/dist/utils/bigint.d.ts.map +1 -0
- package/dist/utils/bignumber/bitwise.d.ts +99 -0
- package/dist/utils/bignumber/bitwise.d.ts.map +1 -0
- package/dist/utils/bignumber/constants.d.ts +25 -0
- package/dist/utils/bignumber/constants.d.ts.map +1 -0
- package/dist/utils/bignumber/formatter.d.ts +105 -0
- package/dist/utils/bignumber/formatter.d.ts.map +1 -0
- package/dist/utils/bignumber/nearlyEqual.d.ts +18 -0
- package/dist/utils/bignumber/nearlyEqual.d.ts.map +1 -0
- package/dist/utils/clone.d.ts +7 -0
- package/dist/utils/clone.d.ts.map +1 -0
- package/dist/utils/collection.d.ts +67 -0
- package/dist/utils/collection.d.ts.map +1 -0
- package/dist/utils/complex.d.ts +11 -0
- package/dist/utils/complex.d.ts.map +1 -0
- package/dist/utils/customs.d.ts +51 -0
- package/dist/utils/customs.d.ts.map +1 -0
- package/dist/utils/emitter.d.ts +13 -0
- package/dist/utils/emitter.d.ts.map +1 -0
- package/dist/utils/factory.d.ts +112 -0
- package/dist/utils/factory.d.ts.map +1 -0
- package/dist/utils/function.d.ts +44 -0
- package/dist/utils/function.d.ts.map +1 -0
- package/dist/utils/hasNumericValue.d.ts +8 -0
- package/dist/utils/hasNumericValue.d.ts.map +1 -0
- package/dist/utils/is.d.ts +204 -0
- package/dist/utils/is.d.ts.map +1 -0
- package/dist/utils/isBounded.d.ts +6 -0
- package/dist/utils/isBounded.d.ts.map +1 -0
- package/dist/utils/isFinite.d.ts +10 -0
- package/dist/utils/isFinite.d.ts.map +1 -0
- package/dist/utils/isInteger.d.ts +8 -0
- package/dist/utils/isInteger.d.ts.map +1 -0
- package/dist/utils/isNaN.d.ts +7 -0
- package/dist/utils/isNaN.d.ts.map +1 -0
- package/dist/utils/isNegative.d.ts +9 -0
- package/dist/utils/isNegative.d.ts.map +1 -0
- package/dist/utils/isNumeric.d.ts +6 -0
- package/dist/utils/isNumeric.d.ts.map +1 -0
- package/dist/utils/isPositive.d.ts +9 -0
- package/dist/utils/isPositive.d.ts.map +1 -0
- package/dist/utils/isPrime.d.ts +7 -0
- package/dist/utils/isPrime.d.ts.map +1 -0
- package/dist/utils/isZero.d.ts +8 -0
- package/dist/utils/isZero.d.ts.map +1 -0
- package/dist/utils/log.d.ts +5 -0
- package/dist/utils/log.d.ts.map +1 -0
- package/dist/utils/lruQueue.d.ts +6 -0
- package/dist/utils/lruQueue.d.ts.map +1 -0
- package/dist/utils/map.d.ts +95 -0
- package/dist/utils/map.d.ts.map +1 -0
- package/dist/utils/node.d.ts +2 -0
- package/dist/utils/node.d.ts.map +1 -0
- package/dist/utils/noop.d.ts +6 -0
- package/dist/utils/noop.d.ts.map +1 -0
- package/dist/utils/number.d.ts +314 -0
- package/dist/utils/number.d.ts.map +1 -0
- package/dist/utils/numeric.d.ts +10 -0
- package/dist/utils/numeric.d.ts.map +1 -0
- package/dist/utils/object.d.ts +123 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/optimizeCallback.d.ts +22 -0
- package/dist/utils/optimizeCallback.d.ts.map +1 -0
- package/dist/utils/parseNumber.d.ts +2 -0
- package/dist/utils/parseNumber.d.ts.map +1 -0
- package/dist/utils/print.d.ts +2 -0
- package/dist/utils/print.d.ts.map +1 -0
- package/dist/utils/product.d.ts +6 -0
- package/dist/utils/product.d.ts.map +1 -0
- package/dist/utils/string.d.ts +66 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/switch.d.ts +8 -0
- package/dist/utils/switch.d.ts.map +1 -0
- package/dist/utils/typeOf.d.ts +7 -0
- package/dist/utils/typeOf.d.ts.map +1 -0
- package/dist/wasm/WasmLoader.d.ts +395 -0
- package/dist/wasm/WasmLoader.d.ts.map +1 -0
- package/dist/wasm/bitwise/wasm-bridge.d.ts +65 -0
- package/dist/wasm/bitwise/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/integrity.d.ts +48 -0
- package/dist/wasm/integrity.d.ts.map +1 -0
- package/dist/wasm/interpolation/wasm-bridge.d.ts +95 -0
- package/dist/wasm/interpolation/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/poly/wasm-bridge.d.ts +99 -0
- package/dist/wasm/poly/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/signal/wasm-bridge.d.ts +61 -0
- package/dist/wasm/signal/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/sort/wasm-bridge.d.ts +43 -0
- package/dist/wasm/sort/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/special/wasm-bridge.d.ts +133 -0
- package/dist/wasm/special/wasm-bridge.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Symbolic CAS (Computer Algebra System) Functions
|
|
3
|
+
*
|
|
4
|
+
* Provides 28 symbolic/semi-symbolic math functions for calculus, transforms,
|
|
5
|
+
* series expansions, equation solving, and advanced algebra. Functions work
|
|
6
|
+
* with expression strings and use numerical evaluation via the expression
|
|
7
|
+
* evaluator when symbolic approaches are not feasible.
|
|
8
|
+
*
|
|
9
|
+
* Categories:
|
|
10
|
+
* - Calculus (8): integrate, limit, partialDerivative, directionalDerivative,
|
|
11
|
+
* gradientSymbolic, jacobian, laplacian, divergence
|
|
12
|
+
* - Transforms (4): laplace, inverseLaplace, fourierSeries, zTransform
|
|
13
|
+
* - Series (4): taylor, multivariateTaylor, series, seriesCoefficient
|
|
14
|
+
* - Solver (4): solve, implicitDiff, summation, symbolicProduct
|
|
15
|
+
* - Advanced (8): assume, asymptotic, groebnerBasis, minimalPolynomial,
|
|
16
|
+
* toRadicals, piecewise, odeGeneral, curl
|
|
17
|
+
* - Batch CAS (4): simplify, derivative, expand, factor — with worker fan-out
|
|
18
|
+
* for arrays of length ≥ 16 (Slice 5.14).
|
|
19
|
+
*
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
22
|
+
import { parse } from '../factories/evaluate.js';
|
|
23
|
+
type f64 = number;
|
|
24
|
+
type MathNode = ReturnType<typeof parse>;
|
|
25
|
+
/**
|
|
26
|
+
* Symbolic/numerical integration.
|
|
27
|
+
*
|
|
28
|
+
* For basic symbolic forms (polynomials, trig, exp), returns the symbolic
|
|
29
|
+
* antiderivative. For definite integrals (a, b provided), falls back to
|
|
30
|
+
* numerical integration using Simpson's rule.
|
|
31
|
+
*
|
|
32
|
+
* @param expr - Expression string to integrate
|
|
33
|
+
* @param varName - Variable of integration
|
|
34
|
+
* @param a - Optional lower bound (definite integral)
|
|
35
|
+
* @param b - Optional upper bound (definite integral)
|
|
36
|
+
* @returns Symbolic antiderivative string or numerical result
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* integrate('x^2', 'x') // => 'x^3/3'
|
|
40
|
+
* integrate('sin(x)', 'x') // => '-cos(x)'
|
|
41
|
+
* integrate('x^2', 'x', 0, 1) // => 0.3333...
|
|
42
|
+
*/
|
|
43
|
+
export declare function integrate(expr: string, varName: string, a?: f64, b?: f64): string | f64;
|
|
44
|
+
/**
|
|
45
|
+
* Compute symbolic limits using numerical approach and L'Hopital's rule.
|
|
46
|
+
*
|
|
47
|
+
* Handles standard limits, 0/0 indeterminate forms via L'Hopital,
|
|
48
|
+
* and one-sided limits.
|
|
49
|
+
*
|
|
50
|
+
* @param expr - Expression string
|
|
51
|
+
* @param varName - Variable approaching the limit
|
|
52
|
+
* @param value - Value being approached (can be Infinity or -Infinity)
|
|
53
|
+
* @param dir - Direction: 'left', 'right', or undefined for both
|
|
54
|
+
* @returns The limit value
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* limit('sin(x)/x', 'x', 0) // => 1
|
|
58
|
+
* limit('1/x', 'x', 0, 'right') // => Infinity
|
|
59
|
+
* limit('(x^2-1)/(x-1)', 'x', 1) // => 2
|
|
60
|
+
*/
|
|
61
|
+
export declare function limit(expr: string, varName: string, value: f64, dir?: 'left' | 'right'): f64;
|
|
62
|
+
/**
|
|
63
|
+
* Compute the partial derivative of an expression with respect to a variable.
|
|
64
|
+
*
|
|
65
|
+
* Uses numerical differentiation (4th-order central difference).
|
|
66
|
+
* Returns the derivative as a function that can be evaluated at a point.
|
|
67
|
+
*
|
|
68
|
+
* @param expr - Expression string
|
|
69
|
+
* @param varName - Variable to differentiate with respect to
|
|
70
|
+
* @param scope - Variable values at which to evaluate
|
|
71
|
+
* @returns Numerical value of the partial derivative
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* partialDerivative('x^2 + y^2', 'x', { x: 3, y: 4 }) // => 6
|
|
75
|
+
* partialDerivative('sin(x*y)', 'x', { x: 0, y: 1 }) // => 1
|
|
76
|
+
*/
|
|
77
|
+
export declare function partialDerivative(expr: string, varName: string, scope: Record<string, f64>): f64;
|
|
78
|
+
/**
|
|
79
|
+
* Compute the directional derivative of an expression.
|
|
80
|
+
*
|
|
81
|
+
* The directional derivative is the dot product of the gradient with
|
|
82
|
+
* the (normalized) direction vector.
|
|
83
|
+
*
|
|
84
|
+
* @param expr - Expression string
|
|
85
|
+
* @param vars - Variable names
|
|
86
|
+
* @param direction - Direction vector (will be normalized)
|
|
87
|
+
* @param scope - Variable values at which to evaluate
|
|
88
|
+
* @returns Directional derivative value
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* directionalDerivative('x^2 + y^2', ['x', 'y'], [1, 0], { x: 3, y: 4 }) // => 6
|
|
92
|
+
*/
|
|
93
|
+
export declare function directionalDerivative(expr: string, vars: string[], direction: f64[], scope: Record<string, f64>): f64;
|
|
94
|
+
/**
|
|
95
|
+
* Compute the symbolic gradient vector of an expression.
|
|
96
|
+
*
|
|
97
|
+
* Returns an array of partial derivative values at the given point.
|
|
98
|
+
*
|
|
99
|
+
* @param expr - Expression string
|
|
100
|
+
* @param vars - Variable names
|
|
101
|
+
* @param scope - Variable values at which to evaluate
|
|
102
|
+
* @returns Array of partial derivative values
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* gradientSymbolic('x^2 + y^2', ['x', 'y'], { x: 3, y: 4 }) // => [6, 8]
|
|
106
|
+
*/
|
|
107
|
+
export declare function gradientSymbolic(expr: string, vars: string[], scope: Record<string, f64>): f64[];
|
|
108
|
+
/**
|
|
109
|
+
* Compute the Jacobian matrix of a vector-valued function.
|
|
110
|
+
*
|
|
111
|
+
* J[i][j] = partial derivative of exprs[i] with respect to vars[j].
|
|
112
|
+
*
|
|
113
|
+
* @param exprs - Array of expression strings (vector field components)
|
|
114
|
+
* @param vars - Variable names
|
|
115
|
+
* @param scope - Variable values at which to evaluate
|
|
116
|
+
* @returns 2D array (matrix) of partial derivatives
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* jacobian(['x*y', 'x^2'], ['x', 'y'], { x: 2, y: 3 })
|
|
120
|
+
* // => [[3, 2], [4, 0]]
|
|
121
|
+
*/
|
|
122
|
+
export declare function jacobian(exprs: string[], vars: string[], scope: Record<string, f64>): f64[][];
|
|
123
|
+
/**
|
|
124
|
+
* Compute the Laplacian of a scalar field.
|
|
125
|
+
*
|
|
126
|
+
* The Laplacian is the sum of all second partial derivatives:
|
|
127
|
+
* nabla^2 f = sum_i d^2f/dx_i^2
|
|
128
|
+
*
|
|
129
|
+
* @param expr - Expression string
|
|
130
|
+
* @param vars - Variable names
|
|
131
|
+
* @param scope - Variable values at which to evaluate
|
|
132
|
+
* @returns Laplacian value
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* laplacian('x^2 + y^2 + z^2', ['x', 'y', 'z'], { x: 1, y: 2, z: 3 }) // => 6
|
|
136
|
+
*/
|
|
137
|
+
export declare function laplacian(expr: string, vars: string[], scope: Record<string, f64>): f64;
|
|
138
|
+
/**
|
|
139
|
+
* Compute the divergence of a vector field.
|
|
140
|
+
*
|
|
141
|
+
* div(F) = df1/dx1 + df2/dx2 + ... + dfn/dxn
|
|
142
|
+
*
|
|
143
|
+
* @param exprs - Array of expression strings (vector field components)
|
|
144
|
+
* @param vars - Variable names (must match length of exprs)
|
|
145
|
+
* @param scope - Variable values at which to evaluate
|
|
146
|
+
* @returns Divergence value
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* divergence(['x^2', 'y^2', 'z^2'], ['x', 'y', 'z'], { x: 1, y: 2, z: 3 })
|
|
150
|
+
* // => 2 + 4 + 6 = 12
|
|
151
|
+
*/
|
|
152
|
+
export declare function divergence(exprs: string[], vars: string[], scope: Record<string, f64>): f64;
|
|
153
|
+
/**
|
|
154
|
+
* Compute the Laplace transform of an expression.
|
|
155
|
+
*
|
|
156
|
+
* Uses a table-based approach for common functions: constants, polynomials,
|
|
157
|
+
* exponentials, sin, cos.
|
|
158
|
+
*
|
|
159
|
+
* @param expr - Time-domain expression string
|
|
160
|
+
* @param t - Time variable name
|
|
161
|
+
* @param s - Frequency variable name
|
|
162
|
+
* @returns Laplace transform as an expression string
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* laplace('1', 't', 's') // => '1/s'
|
|
166
|
+
* laplace('t^2', 't', 's') // => '2/s^3'
|
|
167
|
+
* laplace('sin(t)', 't', 's') // => '1/(s^2 + 1)'
|
|
168
|
+
* laplace('exp(-t)', 't', 's') // => '1/(s + 1)'
|
|
169
|
+
*/
|
|
170
|
+
export declare function laplace(expr: string, t: string, s: string): string;
|
|
171
|
+
/**
|
|
172
|
+
* Compute the inverse Laplace transform of an expression.
|
|
173
|
+
*
|
|
174
|
+
* Uses table lookup and partial fraction patterns.
|
|
175
|
+
*
|
|
176
|
+
* @param expr - Frequency-domain expression string
|
|
177
|
+
* @param s - Frequency variable name
|
|
178
|
+
* @param t - Time variable name
|
|
179
|
+
* @returns Inverse Laplace transform as an expression string
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* inverseLaplace('1/s', 's', 't') // => '1'
|
|
183
|
+
* inverseLaplace('1/(s + 1)', 's', 't') // => 'exp(-1*t)'
|
|
184
|
+
*/
|
|
185
|
+
export declare function inverseLaplace(expr: string, s: string, t: string): string;
|
|
186
|
+
/**
|
|
187
|
+
* Compute Fourier series coefficients of a periodic function.
|
|
188
|
+
*
|
|
189
|
+
* Computes a0, an, bn coefficients for the Fourier series representation:
|
|
190
|
+
* f(x) ~ a0/2 + sum_{k=1}^{n} [a_k cos(k*x) + b_k sin(k*x)]
|
|
191
|
+
*
|
|
192
|
+
* Assumes period 2*pi. Coefficients computed numerically.
|
|
193
|
+
*
|
|
194
|
+
* @param expr - Expression string (function of varName)
|
|
195
|
+
* @param varName - Variable name
|
|
196
|
+
* @param n - Number of harmonics
|
|
197
|
+
* @returns Object with a0, an[], bn[] coefficients
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* fourierSeries('x', 'x', 3)
|
|
201
|
+
* // => { a0: 0, an: [0, 0, 0], bn: [-2, 1, -0.667] } (approx)
|
|
202
|
+
*/
|
|
203
|
+
export declare function fourierSeries(expr: string, varName: string, n: number): {
|
|
204
|
+
a0: f64;
|
|
205
|
+
an: f64[];
|
|
206
|
+
bn: f64[];
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* Compute the Z-transform of a sequence expression.
|
|
210
|
+
*
|
|
211
|
+
* Uses table-based lookup for common sequences.
|
|
212
|
+
*
|
|
213
|
+
* @param expr - Expression in terms of n (sequence element)
|
|
214
|
+
* @param n - Sequence index variable
|
|
215
|
+
* @param z - Z-domain variable
|
|
216
|
+
* @returns Z-transform as an expression string
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* zTransform('1', 'n', 'z') // => 'z/(z - 1)'
|
|
220
|
+
* zTransform('n', 'n', 'z') // => 'z/(z - 1)^2'
|
|
221
|
+
*/
|
|
222
|
+
export declare function zTransform(expr: string, n: string, z: string): string;
|
|
223
|
+
/**
|
|
224
|
+
* Compute the Taylor series expansion of an expression around a point.
|
|
225
|
+
*
|
|
226
|
+
* Computes coefficients numerically using finite differences and returns
|
|
227
|
+
* the polynomial approximation as a string.
|
|
228
|
+
*
|
|
229
|
+
* @param expr - Expression string
|
|
230
|
+
* @param varName - Variable name
|
|
231
|
+
* @param x0 - Center of expansion (default 0, i.e., Maclaurin series)
|
|
232
|
+
* @param n - Order of expansion (default 5)
|
|
233
|
+
* @returns Taylor polynomial as an expression string
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* taylor('sin(x)', 'x', 0, 5) // => 'x - 0.1666666667*x^3 + 0.008333333333*x^5'
|
|
237
|
+
* taylor('exp(x)', 'x', 0, 4) // => '1 + x + 0.5*x^2 + ...'
|
|
238
|
+
*/
|
|
239
|
+
export declare function taylor(expr: string, varName: string, x0?: f64, n?: number): string;
|
|
240
|
+
/**
|
|
241
|
+
* Compute a multivariate Taylor expansion.
|
|
242
|
+
*
|
|
243
|
+
* Returns first-order (linear) approximation for multiple variables:
|
|
244
|
+
* f(x0) + sum_i df/dx_i * (x_i - x0_i) + ...
|
|
245
|
+
*
|
|
246
|
+
* @param expr - Expression string
|
|
247
|
+
* @param vars - Variable names
|
|
248
|
+
* @param x0 - Center point values
|
|
249
|
+
* @param n - Order (currently supports order 1)
|
|
250
|
+
* @returns Taylor approximation as expression string
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* multivariateTaylor('x*y', ['x', 'y'], [1, 1], 1) // => '1 + (x - 1)*y0 + (y - 1)*x0'
|
|
254
|
+
*/
|
|
255
|
+
export declare function multivariateTaylor(expr: string, vars: string[], x0: f64[], n?: number): string;
|
|
256
|
+
/**
|
|
257
|
+
* Power series expansion (alias for taylor).
|
|
258
|
+
*
|
|
259
|
+
* @param expr - Expression string
|
|
260
|
+
* @param varName - Variable name
|
|
261
|
+
* @param x0 - Center of expansion (default 0)
|
|
262
|
+
* @param n - Order (default 5)
|
|
263
|
+
* @returns Power series as expression string
|
|
264
|
+
*/
|
|
265
|
+
export declare function series(expr: string, varName: string, x0?: f64, n?: number): string;
|
|
266
|
+
/**
|
|
267
|
+
* Extract the kth coefficient of the Taylor series expansion.
|
|
268
|
+
*
|
|
269
|
+
* Returns c_k where f(x) = sum c_k * (x - x0)^k.
|
|
270
|
+
*
|
|
271
|
+
* @param expr - Expression string
|
|
272
|
+
* @param varName - Variable name
|
|
273
|
+
* @param x0 - Center of expansion
|
|
274
|
+
* @param k - Index of coefficient to extract
|
|
275
|
+
* @returns The kth Taylor coefficient
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* seriesCoefficient('exp(x)', 'x', 0, 3) // => 1/6 = 0.1667
|
|
279
|
+
* seriesCoefficient('sin(x)', 'x', 0, 1) // => 1
|
|
280
|
+
*/
|
|
281
|
+
export declare function seriesCoefficient(expr: string, varName: string, x0: f64, k: number): f64;
|
|
282
|
+
/**
|
|
283
|
+
* Solve an equation for a variable.
|
|
284
|
+
*
|
|
285
|
+
* Supports linear, quadratic, and cubic equations. For the expression f(x),
|
|
286
|
+
* finds roots where f(x) = 0.
|
|
287
|
+
*
|
|
288
|
+
* @param expr - Expression string (set equal to 0)
|
|
289
|
+
* @param varName - Variable to solve for
|
|
290
|
+
* @returns Array of solutions (real roots)
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* solve('x^2 - 4', 'x') // => [-2, 2]
|
|
294
|
+
* solve('x^2 + 2*x + 1', 'x') // => [-1]
|
|
295
|
+
* solve('2*x - 6', 'x') // => [3]
|
|
296
|
+
*/
|
|
297
|
+
export declare function solve(expr: string, varName: string): f64[];
|
|
298
|
+
/**
|
|
299
|
+
* Compute dy/dx from an implicit equation F(x, y) = 0.
|
|
300
|
+
*
|
|
301
|
+
* Uses the implicit function theorem: dy/dx = -(dF/dx) / (dF/dy)
|
|
302
|
+
*
|
|
303
|
+
* @param expr - Expression F(x, y)
|
|
304
|
+
* @param x - x-variable name
|
|
305
|
+
* @param y - y-variable name
|
|
306
|
+
* @param scope - Point at which to evaluate
|
|
307
|
+
* @returns dy/dx at the given point
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* // Circle: x^2 + y^2 - 25 = 0 at (3, 4)
|
|
311
|
+
* implicitDiff('x^2 + y^2 - 25', 'x', 'y', { x: 3, y: 4 }) // => -0.75
|
|
312
|
+
*/
|
|
313
|
+
export declare function implicitDiff(expr: string, x: string, y: string, scope: Record<string, f64>): f64;
|
|
314
|
+
/**
|
|
315
|
+
* Compute a symbolic summation.
|
|
316
|
+
*
|
|
317
|
+
* For known closed forms (constant, linear, quadratic, cubic), returns
|
|
318
|
+
* the exact result. Otherwise falls back to numerical summation.
|
|
319
|
+
*
|
|
320
|
+
* @param expr - Expression to sum (function of varName)
|
|
321
|
+
* @param varName - Summation index variable
|
|
322
|
+
* @param a - Lower bound (integer)
|
|
323
|
+
* @param b - Upper bound (integer)
|
|
324
|
+
* @returns Sum value
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* summation('k', 'k', 1, 100) // => 5050
|
|
328
|
+
* summation('k^2', 'k', 1, 10) // => 385
|
|
329
|
+
* summation('1', 'k', 1, 50) // => 50
|
|
330
|
+
*/
|
|
331
|
+
export declare function summation(expr: string, varName: string, a: number, b: number): f64;
|
|
332
|
+
/**
|
|
333
|
+
* Compute a symbolic product.
|
|
334
|
+
*
|
|
335
|
+
* Computes the product of expr for varName from a to b.
|
|
336
|
+
*
|
|
337
|
+
* @param expr - Expression to multiply (function of varName)
|
|
338
|
+
* @param varName - Product index variable
|
|
339
|
+
* @param a - Lower bound (integer)
|
|
340
|
+
* @param b - Upper bound (integer)
|
|
341
|
+
* @returns Product value
|
|
342
|
+
*
|
|
343
|
+
* @example
|
|
344
|
+
* symbolicProduct('k', 'k', 1, 5) // => 120 (= 5!)
|
|
345
|
+
* symbolicProduct('2*k', 'k', 1, 4) // => 384
|
|
346
|
+
*/
|
|
347
|
+
export declare function symbolicProduct(expr: string, varName: string, a: number, b: number): f64;
|
|
348
|
+
/**
|
|
349
|
+
* Declare an assumption about a variable's properties.
|
|
350
|
+
*
|
|
351
|
+
* Stores assumptions that can be queried by other CAS functions
|
|
352
|
+
* (e.g., simplification, integration).
|
|
353
|
+
*
|
|
354
|
+
* @param varName - Variable name
|
|
355
|
+
* @param property - Property to assume ('real', 'positive', 'negative', 'integer', 'nonzero')
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* assume('x', 'positive')
|
|
359
|
+
* assume('n', 'integer')
|
|
360
|
+
*/
|
|
361
|
+
export declare function assume(varName: string, property: string): void;
|
|
362
|
+
/**
|
|
363
|
+
* Query assumptions about a variable.
|
|
364
|
+
*
|
|
365
|
+
* @param varName - Variable name
|
|
366
|
+
* @returns Set of assumed properties, or empty set if none
|
|
367
|
+
*/
|
|
368
|
+
export declare function getAssumptions(varName: string): Set<string>;
|
|
369
|
+
/**
|
|
370
|
+
* Clear all assumptions about a variable (or all variables).
|
|
371
|
+
*
|
|
372
|
+
* @param varName - Variable name, or undefined to clear all
|
|
373
|
+
*/
|
|
374
|
+
export declare function clearAssumptions(varName?: string): void;
|
|
375
|
+
/**
|
|
376
|
+
* Compute the asymptotic expansion of an expression.
|
|
377
|
+
*
|
|
378
|
+
* Finds the leading-order behavior as the variable approaches
|
|
379
|
+
* the specified limit (typically infinity).
|
|
380
|
+
*
|
|
381
|
+
* @param expr - Expression string
|
|
382
|
+
* @param varName - Variable name
|
|
383
|
+
* @param towards - Limit point (default: Infinity)
|
|
384
|
+
* @returns Object with leadingTerm and order
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* asymptotic('(x^2 + 1) / x', 'x', Infinity)
|
|
388
|
+
* // => { leadingTerm: 'x', order: 1 }
|
|
389
|
+
*/
|
|
390
|
+
export declare function asymptotic(expr: string, varName: string, towards?: f64): {
|
|
391
|
+
leadingTerm: string;
|
|
392
|
+
order: f64;
|
|
393
|
+
coefficient: f64;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Compute a Groebner basis for a system of polynomial equations.
|
|
397
|
+
*
|
|
398
|
+
* Implements Buchberger's algorithm for small systems (up to 3 variables,
|
|
399
|
+
* low degree). Polynomials are represented as expression strings set to 0.
|
|
400
|
+
*
|
|
401
|
+
* This is a simplified implementation that works with monomials represented
|
|
402
|
+
* internally as coefficient maps.
|
|
403
|
+
*
|
|
404
|
+
* @param polys - Array of polynomial expression strings
|
|
405
|
+
* @param vars - Variable names
|
|
406
|
+
* @returns Array of Groebner basis polynomial strings
|
|
407
|
+
*
|
|
408
|
+
* @example
|
|
409
|
+
* groebnerBasis(['x^2 + y - 1', 'x + y^2 - 1'], ['x', 'y'])
|
|
410
|
+
*/
|
|
411
|
+
export declare function groebnerBasis(polys: string[], vars: string[]): string[];
|
|
412
|
+
/**
|
|
413
|
+
* Compute the minimal polynomial of a numerical algebraic expression.
|
|
414
|
+
*
|
|
415
|
+
* Given a numerical value (expressed as a string that evaluates to a number),
|
|
416
|
+
* attempts to find a polynomial with integer coefficients that has this
|
|
417
|
+
* value as a root.
|
|
418
|
+
*
|
|
419
|
+
* Uses the LLL-like approach of checking polynomials of increasing degree.
|
|
420
|
+
*
|
|
421
|
+
* @param expr - Expression string that evaluates to a number
|
|
422
|
+
* @param varName - Variable name for the resulting polynomial
|
|
423
|
+
* @returns Minimal polynomial as a string, or null if not found
|
|
424
|
+
*
|
|
425
|
+
* @example
|
|
426
|
+
* minimalPolynomial('sqrt(2)', 'x') // => 'x^2 - 2'
|
|
427
|
+
* minimalPolynomial('1.618033988749895', 'x') // => 'x^2 - x - 1' (golden ratio)
|
|
428
|
+
*/
|
|
429
|
+
export declare function minimalPolynomial(expr: string, varName: string): string | null;
|
|
430
|
+
/**
|
|
431
|
+
* Express a polynomial solution in radical form.
|
|
432
|
+
*
|
|
433
|
+
* Applies the quadratic formula, Cardano's formula (cubic), and
|
|
434
|
+
* Ferrari's method (quartic) to express roots using radicals.
|
|
435
|
+
*
|
|
436
|
+
* @param expr - Polynomial expression string (set equal to 0)
|
|
437
|
+
* @returns Array of root expressions in radical form
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* toRadicals('x^2 - 2') // => ['sqrt(2)', '-sqrt(2)']
|
|
441
|
+
* toRadicals('x^2 + x - 1') // => ['(-1 + sqrt(5))/2', '(-1 - sqrt(5))/2']
|
|
442
|
+
*/
|
|
443
|
+
export declare function toRadicals(expr: string): string[];
|
|
444
|
+
/**
|
|
445
|
+
* Construct a piecewise function.
|
|
446
|
+
*
|
|
447
|
+
* Returns a function that evaluates the appropriate expression based
|
|
448
|
+
* on the condition that is satisfied.
|
|
449
|
+
*
|
|
450
|
+
* @param conditions - Array of condition expression strings
|
|
451
|
+
* @param values - Array of value expression strings (one more than conditions for default)
|
|
452
|
+
* @returns A function that evaluates the piecewise expression
|
|
453
|
+
*
|
|
454
|
+
* @example
|
|
455
|
+
* const f = piecewise(
|
|
456
|
+
* ['x < 0', 'x >= 0'],
|
|
457
|
+
* ['-x', 'x']
|
|
458
|
+
* );
|
|
459
|
+
* f({ x: -3 }); // => 3
|
|
460
|
+
* f({ x: 5 }); // => 5
|
|
461
|
+
*/
|
|
462
|
+
export declare function piecewise(conditions: string[], values: string[]): (scope: Record<string, f64>) => f64;
|
|
463
|
+
/**
|
|
464
|
+
* Solve an ordinary differential equation.
|
|
465
|
+
*
|
|
466
|
+
* Handles separable and linear first/second-order ODEs numerically
|
|
467
|
+
* using the Runge-Kutta 4th order method.
|
|
468
|
+
*
|
|
469
|
+
* For an ODE dy/dx = f(x, y), returns solution values at specified points.
|
|
470
|
+
*
|
|
471
|
+
* @param ode - Right-hand side expression f(x, y) where dy/dx = f(x, y)
|
|
472
|
+
* @param y - Dependent variable name
|
|
473
|
+
* @param x - Independent variable name
|
|
474
|
+
* @param x0 - Initial x value
|
|
475
|
+
* @param y0 - Initial y value (or [y0, dy0] for 2nd order)
|
|
476
|
+
* @param xEnd - End x value
|
|
477
|
+
* @param steps - Number of steps (default 100)
|
|
478
|
+
* @returns Array of {x, y} points
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* odeGeneral('y', 'y', 'x', 0, 1, 1, 100) // dy/dx = y, y(0)=1 => e^x
|
|
482
|
+
*/
|
|
483
|
+
export declare function odeGeneral(ode: string, y: string, x: string, x0: f64, y0: f64, xEnd: f64, steps?: number): Array<{
|
|
484
|
+
x: f64;
|
|
485
|
+
y: f64;
|
|
486
|
+
}>;
|
|
487
|
+
/**
|
|
488
|
+
* Compute the curl of a 3D vector field.
|
|
489
|
+
*
|
|
490
|
+
* curl(F) = (dF3/dy - dF2/dz, dF1/dz - dF3/dx, dF2/dx - dF1/dy)
|
|
491
|
+
*
|
|
492
|
+
* @param exprs - Three expression strings [F1, F2, F3]
|
|
493
|
+
* @param vars - Three variable names [x, y, z]
|
|
494
|
+
* @param scope - Point at which to evaluate
|
|
495
|
+
* @returns Three-element array [curl_x, curl_y, curl_z]
|
|
496
|
+
*
|
|
497
|
+
* @example
|
|
498
|
+
* // F = (y, -x, 0), curl = (0, 0, -2)
|
|
499
|
+
* curl(['y', '-x', '0'], ['x', 'y', 'z'], { x: 0, y: 0, z: 0 })
|
|
500
|
+
* // => [0, 0, -2]
|
|
501
|
+
*/
|
|
502
|
+
export declare function curl(exprs: string[], vars: string[], scope: Record<string, f64>): [f64, f64, f64];
|
|
503
|
+
/**
|
|
504
|
+
* Compute the inverse Laplace transform using a lookup table of known transform pairs.
|
|
505
|
+
*
|
|
506
|
+
* Given an expression F(s) in the s-domain, returns the time-domain
|
|
507
|
+
* function f(t) by matching known Laplace transform pairs numerically.
|
|
508
|
+
*
|
|
509
|
+
* Supported patterns:
|
|
510
|
+
* - 1/s → 1 (unit step)
|
|
511
|
+
* - 1/s^2 → t (ramp)
|
|
512
|
+
* - c/s^n → c * t^(n-1) / (n-1)! (power)
|
|
513
|
+
* - 1/(s - a) → e^(at) (exponential)
|
|
514
|
+
* - c/(s - a) → c * e^(at) (scaled exponential)
|
|
515
|
+
* - s/(s^2 + b^2) → cos(b*t)
|
|
516
|
+
* - b/(s^2 + b^2) → sin(b*t)
|
|
517
|
+
* - s/(s^2 - a^2) → cosh(a*t)
|
|
518
|
+
* - a/(s^2 - a^2) → sinh(a*t)
|
|
519
|
+
*
|
|
520
|
+
* For sums/differences, each term is transformed independently.
|
|
521
|
+
*
|
|
522
|
+
* @param expr - Expression in the s-domain (string or parsed Node)
|
|
523
|
+
* @param sVar - Name of the s-domain variable (default: 's')
|
|
524
|
+
* @param tVar - Name of the time variable (default: 't')
|
|
525
|
+
* @returns Time-domain expression as a string
|
|
526
|
+
*
|
|
527
|
+
* @example
|
|
528
|
+
* inverseLaplaceTransform('1/s', 's', 't') // => '1'
|
|
529
|
+
* inverseLaplaceTransform('1/s^2', 's', 't') // => 't'
|
|
530
|
+
* inverseLaplaceTransform('1/(s - 2)', 's', 't') // => 'e^(2 * t)'
|
|
531
|
+
* inverseLaplaceTransform('s/(s^2 + 4)', 's', 't') // => 'cos(2 * t)'
|
|
532
|
+
* inverseLaplaceTransform('2/(s^2 + 4)', 's', 't') // => 'sin(2 * t)'
|
|
533
|
+
*/
|
|
534
|
+
export declare function inverseLaplaceTransform(expr: string | MathNode, sVar?: string, tVar?: string): string;
|
|
535
|
+
/**
|
|
536
|
+
* Batch fan-out threshold.
|
|
537
|
+
*
|
|
538
|
+
* Arrays of length ≥ CAS_BATCH_THRESHOLD are processed via the compute pool
|
|
539
|
+
* worker fan-out. Below the threshold the expressions are processed in-process
|
|
540
|
+
* with a simple loop (still async for a uniform call signature).
|
|
541
|
+
*/
|
|
542
|
+
export declare const CAS_BATCH_THRESHOLD = 16;
|
|
543
|
+
/**
|
|
544
|
+
* Simplify a single expression (CAS batch-capable variant).
|
|
545
|
+
*
|
|
546
|
+
* Named `casSimplify` to avoid ambiguity with the factory-generated
|
|
547
|
+
* `simplify` from the mathjs compatibility layer. Both perform algebraic
|
|
548
|
+
* simplification; this one uses string-level pattern matching and supports
|
|
549
|
+
* a batch-array overload with worker fan-out for large inputs.
|
|
550
|
+
*
|
|
551
|
+
* @param expr - Expression string or parsed MathNode
|
|
552
|
+
* @returns Simplified expression string
|
|
553
|
+
*
|
|
554
|
+
* @example
|
|
555
|
+
* casSimplify('x + x') // => '2*x'
|
|
556
|
+
* casSimplify('1*y') // => 'y'
|
|
557
|
+
* casSimplify('2 * 3') // => '6'
|
|
558
|
+
*/
|
|
559
|
+
export declare function casSimplify(expr: string | MathNode): string;
|
|
560
|
+
/**
|
|
561
|
+
* Simplify an array of expressions (batch overload with worker fan-out).
|
|
562
|
+
*
|
|
563
|
+
* Arrays shorter than {@link CAS_BATCH_THRESHOLD} (16) are processed
|
|
564
|
+
* synchronously in-process and the promise resolves immediately.
|
|
565
|
+
* Longer arrays are dispatched to the worker pool — each expression is
|
|
566
|
+
* shipped as a source string, the worker applies the same string-level
|
|
567
|
+
* simplification rules, and the results are returned as strings.
|
|
568
|
+
*
|
|
569
|
+
* **String round-trip:** batch inputs are serialised to their source string,
|
|
570
|
+
* processed in the worker, and the result strings are returned. Parsed
|
|
571
|
+
* `MathNode` inputs are converted to strings via `.toString()` before
|
|
572
|
+
* dispatch.
|
|
573
|
+
*
|
|
574
|
+
* @param exprs - Array of expression strings (or MathNodes)
|
|
575
|
+
* @returns Promise resolving to an array of simplified expression strings
|
|
576
|
+
*
|
|
577
|
+
* @example
|
|
578
|
+
* // Below threshold — resolved synchronously
|
|
579
|
+
* await casSimplify(['x + x', 'y * 1', '2 * 3'])
|
|
580
|
+
* // => ['2*x', 'y', '6']
|
|
581
|
+
*
|
|
582
|
+
* // Above threshold — worker fan-out
|
|
583
|
+
* await casSimplify(Array.from({ length: 32 }, (_, i) => `${i}*x + ${i}*x`))
|
|
584
|
+
*/
|
|
585
|
+
export declare function casSimplify(exprs: Array<string | MathNode>): Promise<string[]>;
|
|
586
|
+
/**
|
|
587
|
+
* Compute the symbolic derivative of a single expression (CAS batch-capable variant).
|
|
588
|
+
*
|
|
589
|
+
* Named `casDerivative` to avoid ambiguity with the factory-generated
|
|
590
|
+
* `derivative` from the mathjs compatibility layer.
|
|
591
|
+
*
|
|
592
|
+
* Uses power rule, trig (sin/cos), exp, and ln patterns. Unrecognised terms
|
|
593
|
+
* are left as `d/d<variable>(<term>)` placeholders.
|
|
594
|
+
*
|
|
595
|
+
* @param expr - Expression string or parsed MathNode
|
|
596
|
+
* @param variable - Variable to differentiate with respect to
|
|
597
|
+
* @returns Derivative expression string
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* casDerivative('x^2', 'x') // => '2*x^1'
|
|
601
|
+
* casDerivative('sin(x)', 'x') // => 'cos(x)'
|
|
602
|
+
* casDerivative('exp(x)', 'x') // => 'exp(x)'
|
|
603
|
+
*/
|
|
604
|
+
export declare function casDerivative(expr: string | MathNode, variable: string): string;
|
|
605
|
+
/**
|
|
606
|
+
* Compute the symbolic derivative of an array of expressions (batch overload).
|
|
607
|
+
*
|
|
608
|
+
* Arrays shorter than {@link CAS_BATCH_THRESHOLD} (16) are processed
|
|
609
|
+
* synchronously in-process. Longer arrays are dispatched to the worker pool.
|
|
610
|
+
*
|
|
611
|
+
* **String round-trip:** batch inputs are serialised to their source string
|
|
612
|
+
* before dispatch.
|
|
613
|
+
*
|
|
614
|
+
* @param exprs - Array of expression strings (or MathNodes)
|
|
615
|
+
* @param variable - Variable to differentiate with respect to
|
|
616
|
+
* @returns Promise resolving to an array of derivative expression strings
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* await casDerivative(['x^2', 'sin(x)', 'exp(x)'], 'x')
|
|
620
|
+
* // => ['2*x^1', 'cos(x)', 'exp(x)']
|
|
621
|
+
*/
|
|
622
|
+
export declare function casDerivative(exprs: Array<string | MathNode>, variable: string): Promise<string[]>;
|
|
623
|
+
/**
|
|
624
|
+
* Expand a single expression by distributing products over sums
|
|
625
|
+
* (CAS batch-capable variant).
|
|
626
|
+
*
|
|
627
|
+
* Named `casExpand` to avoid ambiguity with the `expand` function in
|
|
628
|
+
* `algebra.ts`. Both perform algebraic expansion; this one additionally
|
|
629
|
+
* supports a batch-array overload with worker fan-out for large inputs.
|
|
630
|
+
*
|
|
631
|
+
* @param expr - Expression string or parsed MathNode
|
|
632
|
+
* @returns Expanded expression string
|
|
633
|
+
*
|
|
634
|
+
* @example
|
|
635
|
+
* casExpand('(x+1)^2') // => 'x*x + x*1 + 1*x + 1*1'
|
|
636
|
+
* casExpand('(a+b)*(a-b)') // distributes fully
|
|
637
|
+
*/
|
|
638
|
+
export declare function casExpand(expr: string | MathNode): string;
|
|
639
|
+
/**
|
|
640
|
+
* Expand an array of expressions (batch overload with worker fan-out).
|
|
641
|
+
*
|
|
642
|
+
* Arrays shorter than {@link CAS_BATCH_THRESHOLD} (16) are processed
|
|
643
|
+
* synchronously in-process. Longer arrays are dispatched to the worker pool.
|
|
644
|
+
*
|
|
645
|
+
* **String round-trip:** batch inputs are serialised to their source string
|
|
646
|
+
* before dispatch.
|
|
647
|
+
*
|
|
648
|
+
* @param exprs - Array of expression strings (or MathNodes)
|
|
649
|
+
* @returns Promise resolving to an array of expanded expression strings
|
|
650
|
+
*
|
|
651
|
+
* @example
|
|
652
|
+
* await casExpand(['(x+1)^2', '(a+b)^3'])
|
|
653
|
+
*/
|
|
654
|
+
export declare function casExpand(exprs: Array<string | MathNode>): Promise<string[]>;
|
|
655
|
+
/**
|
|
656
|
+
* Factor a single expression by extracting the integer GCD from all terms
|
|
657
|
+
* (CAS batch-capable variant).
|
|
658
|
+
*
|
|
659
|
+
* Named `casFactor` to avoid ambiguity with the `factor` function in
|
|
660
|
+
* `algebra.ts`. Both factor expressions; this one additionally supports a
|
|
661
|
+
* batch-array overload with worker fan-out for large inputs.
|
|
662
|
+
*
|
|
663
|
+
* Returns the original expression unchanged when no common integer factor
|
|
664
|
+
* greater than 1 is found, or when terms do not follow the `c*var` pattern.
|
|
665
|
+
*
|
|
666
|
+
* @param expr - Expression string or parsed MathNode
|
|
667
|
+
* @returns Factored expression string
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
* casFactor('2*x + 4*y') // => '2*(x + 2*y)'
|
|
671
|
+
* casFactor('x^2 - 1') // => 'x^2 - 1' (no integer GCD > 1)
|
|
672
|
+
*/
|
|
673
|
+
export declare function casFactor(expr: string | MathNode): string;
|
|
674
|
+
/**
|
|
675
|
+
* Factor an array of expressions (batch overload with worker fan-out).
|
|
676
|
+
*
|
|
677
|
+
* Arrays shorter than {@link CAS_BATCH_THRESHOLD} (16) are processed
|
|
678
|
+
* synchronously in-process. Longer arrays are dispatched to the worker pool.
|
|
679
|
+
*
|
|
680
|
+
* **String round-trip:** batch inputs are serialised to their source string
|
|
681
|
+
* before dispatch.
|
|
682
|
+
*
|
|
683
|
+
* @param exprs - Array of expression strings (or MathNodes)
|
|
684
|
+
* @returns Promise resolving to an array of factored expression strings
|
|
685
|
+
*
|
|
686
|
+
* @example
|
|
687
|
+
* await casFactor(['2*x + 4*y', '3*a + 6*b'])
|
|
688
|
+
*/
|
|
689
|
+
export declare function casFactor(exprs: Array<string | MathNode>): Promise<string[]>;
|
|
690
|
+
export {};
|
|
691
|
+
//# sourceMappingURL=cas.d.ts.map
|