pimath 0.0.41 → 0.0.44

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 (56) hide show
  1. package/.eslintrc.js +23 -23
  2. package/dist/pi.js +326 -575
  3. package/dist/pi.js.map +1 -1
  4. package/dist/pi.min.js +1 -1
  5. package/dist/pi.min.js.map +1 -1
  6. package/docs/assets/highlight.css +78 -78
  7. package/docs/assets/icons.css +1043 -1043
  8. package/docs/assets/main.js +52 -52
  9. package/docs/assets/search.js +1 -1
  10. package/docs/assets/style.css +1388 -1388
  11. package/docs/classes/{algebra.Equation.html → Algebra.Equation.html} +25 -25
  12. package/docs/classes/algebra.Logicalset.html +4 -4
  13. package/docs/classes/algebra.Monom.html +113 -113
  14. package/docs/classes/algebra.Polynom.html +29 -29
  15. package/docs/classes/algebra.Rational.html +3 -3
  16. package/docs/classes/coefficients.Fraction.html +18 -18
  17. package/docs/classes/coefficients.Nthroot.html +2 -2
  18. package/docs/classes/geometry.Circle.html +2 -2
  19. package/docs/classes/geometry.Line.html +2 -2
  20. package/docs/classes/geometry.Triangle.html +16 -16
  21. package/docs/classes/numeric.Numeric.html +13 -13
  22. package/docs/classes/shutingyard.Shutingyard.html +17 -17
  23. package/docs/index.html +10 -10
  24. package/docs/modules/{algebra.html → Algebra.html} +0 -0
  25. package/docs/modules/{random.html → Random.html} +0 -0
  26. package/esm/index.d.ts +2 -2
  27. package/esm/index.js +2 -2
  28. package/esm/maths/algebra/equation.d.ts +2 -6
  29. package/esm/maths/algebra/equation.js +9 -49
  30. package/esm/maths/algebra/equation.js.map +1 -1
  31. package/esm/maths/algebra/polynom.d.ts +1 -4
  32. package/esm/maths/algebra/polynom.js +62 -120
  33. package/esm/maths/algebra/polynom.js.map +1 -1
  34. package/esm/maths/algebra/rational.d.ts +6 -16
  35. package/esm/maths/algebra/rational.js +29 -140
  36. package/esm/maths/algebra/rational.js.map +1 -1
  37. package/esm/maths/coefficients/fraction.d.ts +1 -3
  38. package/esm/maths/coefficients/fraction.js +5 -37
  39. package/esm/maths/coefficients/fraction.js.map +1 -1
  40. package/esm/maths/coefficients/{nthRoot.d.ts → nthroot.d.ts} +5 -5
  41. package/esm/maths/coefficients/{nthRoot.js → nthroot.js} +5 -5
  42. package/esm/maths/coefficients/{nthRoot.js.map → nthroot.js.map} +1 -1
  43. package/esm/maths/geometry/line.js +0 -8
  44. package/esm/maths/geometry/line.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/index.ts +2 -2
  47. package/src/maths/algebra/equation.ts +12 -58
  48. package/src/maths/algebra/polynom.ts +68 -128
  49. package/src/maths/algebra/rational.ts +98 -242
  50. package/src/maths/coefficients/fraction.ts +6 -44
  51. package/src/maths/coefficients/{nthRoot.ts → nthroot.ts} +5 -5
  52. package/tests/algebra/monom.test.ts +4 -1
  53. package/tests/coefficients/fraction.test.ts +1 -43
  54. package/tests/geometry/circle.test.ts +2 -4
  55. package/tests/algebra/equation.test.ts +0 -38
  56. package/tests/algebra/rationnal.test.ts +0 -68
@@ -1,68 +0,0 @@
1
- import {describe} from "mocha";
2
- import {Rational} from "../../src/maths/algebra/rational";
3
- import {Polynom} from "../../src/maths/algebra/polynom";
4
- import {expect} from "chai";
5
-
6
- describe('Rational tests', () => {
7
- it('should calculate correctly the limits to a value', () => {
8
-
9
- const FR = new Rational(
10
- new Polynom('(x+2)'),
11
- new Polynom('(x-4)(x+2)')
12
- )
13
-
14
- expect(FR.limits(4).tex).to.be.equal("+\\infty")
15
- expect(FR.limits(4, 'below').tex).to.be.equal("-\\infty")
16
- expect(FR.limits(4, 'above').tex).to.be.equal("+\\infty")
17
- expect(FR.limits(-2).tex).to.be.equal("-\\frac{ 1 }{ 6 }")
18
- })
19
- it('should calculate the limits to Infinity', () => {
20
- const FR0 = new Rational(
21
- new Polynom('3'),
22
- new Polynom('x-5')
23
- )
24
- const FR2 = new Rational(
25
- new Polynom('2x+5'),
26
- new Polynom('x-5')
27
- )
28
-
29
- const FR3 = new Rational(
30
- new Polynom('2x^2+5'),
31
- new Polynom('x-5')
32
- )
33
-
34
- expect(FR0.limits(Infinity).value).to.be.equal(0)
35
- expect(FR0.limits(-Infinity).value).to.be.equal(0)
36
-
37
- expect(FR2.limits(Infinity).value).to.be.equal(2)
38
- expect(FR2.limits(-Infinity).value).to.be.equal(2)
39
-
40
- expect(FR3.limits(Infinity).value).to.be.equal(Infinity)
41
- expect(FR3.limits(-Infinity).value).to.be.equal(-Infinity)
42
- })
43
-
44
- it('should make a table of signs', function () {
45
-
46
- // const FR = new Rational(
47
- // new Polynom('(x-2)'),
48
- // new Polynom('(x+2)')
49
- // )
50
- // let tos = FR.makeTableOfSigns()
51
- // expect(tos.zeroes.map(x => x.tex)).to.have.all.members(['-2', '2'])
52
- // expect(tos.signs).to.be.eql([['', '-', 't', '-', 'z', '+', ''], ['', '-', 'd', '+', 't', '+', ''], [], ['', '+', 'd', '-', 'z', '+', '']])
53
- const FR2 = new Rational(
54
- new Polynom('(x-2)(x+5)(x^2+5x-31'),
55
- new Polynom('(x+2)')
56
- )
57
- let tos2 = FR2.makeTableOfSigns()
58
- });
59
-
60
- it('should calculate the derivative', function () {
61
- const FR = new Rational(
62
- new Polynom('x^2+5x+6'),
63
- new Polynom('x-3')
64
- )
65
-
66
- FR.derivative()
67
- });
68
- })