pimath 0.0.42 → 0.0.43
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/.eslintrc.js +23 -23
- package/dist/pi.js +327 -579
- 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/icons.css +1043 -1043
- package/docs/assets/main.js +52 -52
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +1388 -1388
- package/docs/classes/{algebra.Equation.html → Algebra.Equation.html} +25 -25
- package/docs/classes/algebra.Logicalset.html +4 -4
- package/docs/classes/algebra.Monom.html +113 -113
- package/docs/classes/algebra.Polynom.html +29 -29
- package/docs/classes/algebra.Rational.html +3 -3
- package/docs/classes/coefficients.Fraction.html +18 -18
- package/docs/classes/coefficients.Nthroot.html +2 -2
- package/docs/classes/geometry.Circle.html +2 -2
- package/docs/classes/geometry.Line.html +2 -2
- package/docs/classes/geometry.Triangle.html +16 -16
- package/docs/classes/numeric.Numeric.html +13 -13
- package/docs/classes/shutingyard.Shutingyard.html +17 -17
- package/docs/index.html +10 -10
- package/docs/modules/{algebra.html → Algebra.html} +0 -0
- package/docs/modules/{random.html → Random.html} +0 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -2
- package/esm/maths/algebra/equation.d.ts +2 -7
- package/esm/maths/algebra/equation.js +9 -52
- package/esm/maths/algebra/equation.js.map +1 -1
- package/esm/maths/algebra/polynom.d.ts +1 -4
- package/esm/maths/algebra/polynom.js +62 -120
- package/esm/maths/algebra/polynom.js.map +1 -1
- package/esm/maths/algebra/rational.d.ts +6 -16
- package/esm/maths/algebra/rational.js +30 -141
- package/esm/maths/algebra/rational.js.map +1 -1
- package/esm/maths/coefficients/fraction.d.ts +1 -3
- package/esm/maths/coefficients/fraction.js +5 -37
- package/esm/maths/coefficients/fraction.js.map +1 -1
- package/esm/maths/coefficients/{nthRoot.d.ts → nthroot.d.ts} +5 -5
- package/esm/maths/coefficients/{nthRoot.js → nthroot.js} +5 -5
- package/esm/maths/coefficients/{nthRoot.js.map → nthroot.js.map} +1 -1
- package/esm/maths/geometry/line.js +0 -8
- package/esm/maths/geometry/line.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -2
- package/src/maths/algebra/equation.ts +12 -61
- package/src/maths/algebra/polynom.ts +68 -128
- package/src/maths/algebra/rational.ts +98 -242
- package/src/maths/coefficients/fraction.ts +6 -44
- package/src/maths/coefficients/{nthRoot.ts → nthroot.ts} +5 -5
- package/src/maths/geometry/line.ts +1 -0
- package/tests/algebra/monom.test.ts +4 -1
- package/tests/coefficients/fraction.test.ts +1 -43
- package/tests/geometry/circle.test.ts +2 -4
- package/tests/algebra/equation.test.ts +0 -38
- 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
|
-
})
|