pimath 0.0.77 → 0.0.80

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.
@@ -98,6 +98,8 @@ describe('Polynom tests', () => {
98
98
  const P2 = new Polynom('-2x^3+18x')
99
99
  P2.factorize()
100
100
  expect(P2.texFactors).to.be.equal('-2x\\left( x+3 \\right)\\left( x-3 \\right)')
101
+
102
+ console.log(P2.texDisplay)
101
103
  });
102
104
  })
103
105
 
@@ -35,7 +35,17 @@ describe('Fraction tests', () => { // the tests container
35
35
  expect(Q.isReduced()).to.be.false
36
36
  })
37
37
 
38
+ it('Should parse a number with lots of decimals', ()=>{
39
+ let A = 3.45,
40
+ B = 3.333333333333322,
41
+ C = 5.314171717171717
38
42
 
43
+ let FA = new Fraction(A),
44
+ FB = new Fraction(B),
45
+ FC = new Fraction(C)
46
+
47
+ console.log(FA.tex, FB.tex, FC.tex)
48
+ })
39
49
  })
40
50
 
41
51
  describe("Fraction static functions", ()=>{
@@ -76,7 +86,7 @@ describe("Fraction static functions", ()=>{
76
86
  expect(Fraction.average(...list).tex).to.be.equal('\\frac{ 19 }{ 10 }')
77
87
  })
78
88
 
79
- it('should multiply and notreduce', function () {
89
+ it('should multiply and not reduce', function () {
80
90
  let list = [
81
91
  new Fraction('1/2'),
82
92
  new Fraction('4/3'),
@@ -100,7 +110,5 @@ describe("Evaluate fraction", () => {
100
110
  let G = new Fraction('1/7')
101
111
  expect(G.isApproximative()).to.be.false
102
112
  expect(G.isExact()).to.be.true
103
-
104
- console.log(G.tex, G.value)
105
113
  });
106
114
  })