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.
- package/dist/pi.js +81 -82
- package/dist/pi.js.map +1 -1
- package/dist/pi.min.js +1 -1
- package/dist/pi.min.js.map +1 -1
- package/docs/assets/highlight.css +78 -78
- package/docs/assets/main.js +52 -52
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +1413 -1413
- package/docs/classes/Logicalset.Logicalset-1.html +5 -5
- package/docs/classes/Polynom.Rational.html +4 -4
- package/docs/classes/Vector.Point.html +1 -1
- package/docs/classes/Vector.Vector-1.html +1 -1
- package/docs/classes/algebra_equation.Equation.html +26 -26
- package/docs/classes/algebra_linearSystem.LinearSystem.html +1 -1
- package/docs/classes/algebra_monom.Monom.html +114 -114
- package/docs/classes/algebra_polynom.Polynom.html +30 -30
- package/docs/classes/coefficients_fraction.Fraction.html +19 -19
- package/docs/classes/coefficients_nthroot.NthRoot.html +3 -3
- package/docs/classes/expressions_numexp.NumExp.html +1 -1
- package/docs/classes/expressions_polynomexp.PolynomExpFactor.html +1 -1
- package/docs/classes/expressions_polynomexp.PolynomExpProduct.html +1 -1
- package/docs/classes/geometry_circle.Circle.html +3 -3
- package/docs/classes/geometry_line.Line.html +3 -3
- package/docs/classes/geometry_triangle.Triangle.html +16 -16
- package/docs/classes/numeric.Numeric.html +14 -14
- package/docs/classes/shutingyard.Shutingyard.html +18 -18
- package/docs/enums/algebra_equation.PARTICULAR_SOLUTION.html +1 -1
- package/docs/enums/geometry_line.LinePropriety.html +1 -1
- package/docs/enums/shutingyard.ShutingyardMode.html +1 -1
- package/docs/enums/shutingyard.ShutingyardType.html +1 -1
- package/docs/index.html +10 -10
- package/docs/interfaces/algebra_equation.ISolution.html +3 -3
- package/docs/interfaces/algebra_polynom.IEuclidian.html +1 -0
- package/docs/interfaces/geometry_triangle.remarquableLines.html +1 -1
- package/docs/modules/Logicalset.html +2 -2
- package/docs/modules/Polynom.html +2 -2
- package/docs/modules/Vector.html +2 -2
- package/docs/modules/algebra_monom.html +1 -1
- package/docs/modules/algebra_polynom.html +1 -1
- package/docs/modules/coefficients_fraction.html +1 -1
- package/docs/modules/shutingyard.html +1 -1
- package/esm/maths/algebra/polynom.js +81 -82
- package/esm/maths/algebra/polynom.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/algebra/polynom.ts +98 -92
- 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
|
|
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
|
})
|