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.
- package/dist/pi.js +139 -73
- 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 +94 -73
- package/esm/maths/algebra/polynom.js.map +1 -1
- package/esm/maths/algebra/rational.d.ts +1 -0
- package/esm/maths/algebra/rational.js +5 -0
- package/esm/maths/algebra/rational.js.map +1 -1
- package/esm/maths/expressions/ExpressionTree.d.ts +17 -0
- package/esm/maths/expressions/ExpressionTree.js +150 -0
- package/esm/maths/expressions/ExpressionTree.js.map +1 -0
- package/esm/maths/numeric.d.ts +1 -0
- package/esm/maths/numeric.js +40 -0
- package/esm/maths/numeric.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/algebra/polynom.ts +107 -78
- package/src/maths/algebra/rational.ts +6 -0
- package/src/maths/expressions/ExpressionTree.ts +172 -0
- package/src/maths/numeric.ts +55 -0
- package/tests/algebra/polynom.test.ts +12 -2
- package/tests/expressions/expressiontree.test.ts +11 -0
- package/tests/numexp.test.ts +5 -4
package/tests/numexp.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {expect} from 'chai';
|
|
2
2
|
import {NumExp} from "../src/maths/expressions/numexp";
|
|
3
|
-
import
|
|
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
|
-
|
|
37
|
+
let a = 1 / 5
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
console.log(a, Numeric.numberCorrection(a))
|
|
40
40
|
|
|
41
|
+
// console.log(expr.rpn)
|
|
41
42
|
});
|
|
42
43
|
});
|