@danielsimonjr/mathts-functions 0.12.0 → 0.12.1

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.
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Exact multivariate polynomial arithmetic + Buchberger's algorithm (B-5).
3
+ *
4
+ * Replaces the former groebnerBasis internals, which (a) extracted coefficients
5
+ * by evaluating at unit points — unable to distinguish `x` from `x²` (both are 1
6
+ * at x = 1) — and (b) never ran Buchberger at all (the "basis" was the parsed
7
+ * inputs). Polynomials are parsed EXACTLY from the expression AST (`parse`), so
8
+ * coefficients are never inferred numerically; division and S-polynomial
9
+ * reduction use graded-free lex order (first variable most significant).
10
+ *
11
+ * Scope: small systems (the CAS surface's documented target). Iteration and
12
+ * basis-size caps throw an honest error instead of returning wrong results.
13
+ */
1
14
  /** One monomial: coefficient × Π varsᵢ^powersᵢ (dense exponent vector). */
2
15
  export interface Term {
3
16
  coeff: number;
@@ -12,11 +25,10 @@ export declare function polyNeg(a: Poly): Poly;
12
25
  export declare function polySub(a: Poly, b: Poly): Poly;
13
26
  export declare function polyMul(a: Poly, b: Poly): Poly;
14
27
  /**
15
- * Convert a parsed expression AST to a polynomial over `vars` — exactly.
16
- * Supports numeric constants, the given variables, `+ − * ^` (non-negative
17
- * integer constant exponents), unary minus, parentheses, and division by a
18
- * nonzero numeric constant. Anything else (other symbols, functions, variable
19
- * exponents) throws — no fabricated coefficients.
28
+ * Convert a polynomial expression string to a {@link Poly} over `vars` — exactly.
29
+ * Supports numeric constants, the given variables, `+ − * / ^`, unary minus and
30
+ * parentheses, with `/` restricted to nonzero numeric-constant divisors and `^`
31
+ * to non-negative integer literal exponents. Unknown symbols throw.
20
32
  */
21
33
  export declare function polyFromExpression(expr: string, vars: string[]): Poly;
22
34
  /** Remainder of p on multivariate division by G (lex order). */
@@ -1 +1 @@
1
- {"version":3,"file":"polynomial-ideal.d.ts","sourceRoot":"","sources":["../../src/typed/polynomial-ideal.ts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;CAClB;AAED,kFAAkF;AAClF,MAAM,MAAM,IAAI,GAAG,IAAI,EAAE,CAAC;AAY1B,mEAAmE;AACnE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,CAWvC;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAE9C;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,CAErC;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAE9C;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAW9C;AA0BD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAgIrE;AAUD,gEAAgE;AAChE,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAwBnD;AAoBD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAiDhD;AAMD,4FAA4F;AAC5F,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAc5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielsimonjr/mathts-functions",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Mathematical functions for MathTS - arithmetic, algebra, trigonometry, statistics, and more",
5
5
  "author": "Daniel Simon Jr.",
6
6
  "license": "MIT",