pimath 0.0.74 → 0.0.77

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 (60) hide show
  1. package/dist/pi.js +139 -73
  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 +94 -73
  43. package/esm/maths/algebra/polynom.js.map +1 -1
  44. package/esm/maths/algebra/rational.d.ts +1 -0
  45. package/esm/maths/algebra/rational.js +5 -0
  46. package/esm/maths/algebra/rational.js.map +1 -1
  47. package/esm/maths/expressions/ExpressionTree.d.ts +17 -0
  48. package/esm/maths/expressions/ExpressionTree.js +150 -0
  49. package/esm/maths/expressions/ExpressionTree.js.map +1 -0
  50. package/esm/maths/numeric.d.ts +1 -0
  51. package/esm/maths/numeric.js +40 -0
  52. package/esm/maths/numeric.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/maths/algebra/polynom.ts +107 -78
  55. package/src/maths/algebra/rational.ts +6 -0
  56. package/src/maths/expressions/ExpressionTree.ts +172 -0
  57. package/src/maths/numeric.ts +55 -0
  58. package/tests/algebra/polynom.test.ts +12 -2
  59. package/tests/expressions/expressiontree.test.ts +11 -0
  60. package/tests/numexp.test.ts +5 -4
@@ -1,6 +1,6 @@
1
1
  import {expect} from 'chai';
2
2
  import {NumExp} from "../src/maths/expressions/numexp";
3
- import exp = require("constants");
3
+ import {Numeric} from "../src/maths/numeric";
4
4
 
5
5
  describe('Numerical expression', () => { // the tests container
6
6
  it('RPN for numerical expression', () => {
@@ -8,7 +8,7 @@ describe('Numerical expression', () => { // the tests container
8
8
  expect(RPN.map(x => x.token)).to.have.all.members(['3', 'x', '*', '5', '+'])
9
9
 
10
10
  const RPN2 = new NumExp('-3*x^2-5').rpn
11
- expect(RPN2.map(x=>x.token)).to.have.all.members(['3', 'x', '2', '^', '*', '-', '5', '-'])
11
+ expect(RPN2.map(x => x.token)).to.have.all.members(['3', 'x', '2', '^', '*', '-', '5', '-'])
12
12
  })
13
13
 
14
14
  it('Evaluate for numerical expression', () => {
@@ -34,9 +34,10 @@ describe('Numerical expression', () => { // the tests container
34
34
 
35
35
  it('should parse without mult sign', function () {
36
36
 
37
- const expr = new NumExp('3x+5')
37
+ let a = 1 / 5
38
38
 
39
- // console.log(expr.rpn)
39
+ console.log(a, Numeric.numberCorrection(a))
40
40
 
41
+ // console.log(expr.rpn)
41
42
  });
42
43
  });