pimath 0.0.75 → 0.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/pi.js +81 -82
  2. package/dist/pi.js.map +1 -1
  3. package/dist/pi.min.js +1 -1
  4. package/dist/pi.min.js.map +1 -1
  5. package/docs/assets/highlight.css +78 -78
  6. package/docs/assets/main.js +52 -52
  7. package/docs/assets/search.js +1 -1
  8. package/docs/assets/style.css +1413 -1413
  9. package/docs/classes/Logicalset.Logicalset-1.html +5 -5
  10. package/docs/classes/Polynom.Rational.html +4 -4
  11. package/docs/classes/Vector.Point.html +1 -1
  12. package/docs/classes/Vector.Vector-1.html +1 -1
  13. package/docs/classes/algebra_equation.Equation.html +26 -26
  14. package/docs/classes/algebra_linearSystem.LinearSystem.html +1 -1
  15. package/docs/classes/algebra_monom.Monom.html +114 -114
  16. package/docs/classes/algebra_polynom.Polynom.html +30 -30
  17. package/docs/classes/coefficients_fraction.Fraction.html +19 -19
  18. package/docs/classes/coefficients_nthroot.NthRoot.html +3 -3
  19. package/docs/classes/expressions_numexp.NumExp.html +1 -1
  20. package/docs/classes/expressions_polynomexp.PolynomExpFactor.html +1 -1
  21. package/docs/classes/expressions_polynomexp.PolynomExpProduct.html +1 -1
  22. package/docs/classes/geometry_circle.Circle.html +3 -3
  23. package/docs/classes/geometry_line.Line.html +3 -3
  24. package/docs/classes/geometry_triangle.Triangle.html +16 -16
  25. package/docs/classes/numeric.Numeric.html +14 -14
  26. package/docs/classes/shutingyard.Shutingyard.html +18 -18
  27. package/docs/enums/algebra_equation.PARTICULAR_SOLUTION.html +1 -1
  28. package/docs/enums/geometry_line.LinePropriety.html +1 -1
  29. package/docs/enums/shutingyard.ShutingyardMode.html +1 -1
  30. package/docs/enums/shutingyard.ShutingyardType.html +1 -1
  31. package/docs/index.html +10 -10
  32. package/docs/interfaces/algebra_equation.ISolution.html +3 -3
  33. package/docs/interfaces/algebra_polynom.IEuclidian.html +1 -0
  34. package/docs/interfaces/geometry_triangle.remarquableLines.html +1 -1
  35. package/docs/modules/Logicalset.html +2 -2
  36. package/docs/modules/Polynom.html +2 -2
  37. package/docs/modules/Vector.html +2 -2
  38. package/docs/modules/algebra_monom.html +1 -1
  39. package/docs/modules/algebra_polynom.html +1 -1
  40. package/docs/modules/coefficients_fraction.html +1 -1
  41. package/docs/modules/shutingyard.html +1 -1
  42. package/esm/maths/algebra/polynom.js +81 -82
  43. package/esm/maths/algebra/polynom.js.map +1 -1
  44. package/package.json +1 -1
  45. package/src/maths/algebra/polynom.ts +98 -92
  46. package/tests/algebra/polynom.test.ts +6 -2
@@ -3,6 +3,7 @@ import {Random} from "../../src/maths/randomization/random";
3
3
  import {describe} from "mocha";
4
4
  import {Polynom} from "../../src/maths/algebra/polynom";
5
5
  import {Fraction} from "../../src/maths/coefficients/fraction";
6
+ import exp = require("constants");
6
7
 
7
8
 
8
9
  describe('Polynom tests', () => {
@@ -89,17 +90,20 @@ describe('Polynom tests', () => {
89
90
  expect(P.factors.map(x => x.tex)).to.have.all.members(['x-4', 'x-4', 'x+7', 'x+7', 'x-11', 'x-11'])
90
91
  });
91
92
 
92
- it('should factorize and regroupe', function () {
93
+ it('should factorize and regroup', function () {
93
94
  let P = new Polynom('7x(x-3)(x+5)(x^2-9)3x')
94
95
  P.factorize()
95
96
  expect(P.texFactors).to.be.equal('21x^{2}\\left( x+3 \\right)\\left( x-3 \\right)^{ 2 }\\left( x+5 \\right)')
97
+
98
+ const P2 = new Polynom('-2x^3+18x')
99
+ P2.factorize()
100
+ expect(P2.texFactors).to.be.equal('-2x\\left( x+3 \\right)\\left( x-3 \\right)')
96
101
  });
97
102
  })
98
103
 
99
104
  describe('Polynom parsing with rational power', () => {
100
105
  it('should parse with rational powers', () => {
101
106
  const P = new Polynom('3x^(2/3)-5x+5/3');
102
-
103
107
  expect(P.tex).to.be.equal('3x^{\\tfrac{ 2 }{ 3 }}-5x+\\frac{ 5 }{ 3 }')
104
108
  })
105
109
  })