math-exercises 2.0.3 → 2.0.5
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/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts +2 -2
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.js +67 -74
- package/lib/exercises/primitive/index.d.ts +1 -0
- package/lib/exercises/primitive/index.d.ts.map +1 -1
- package/lib/exercises/primitive/index.js +3 -2
- package/lib/exercises/primitive/sinCosPrimitive.d.ts.map +1 -1
- package/lib/exercises/primitive/sinUCosUPrimitive.d.ts.map +1 -1
- package/lib/index.d.ts +5 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/math/complex/complex.d.ts +1 -1
- package/lib/math/geometry/point.d.ts +4 -4
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/triangles.d.ts +7 -7
- package/lib/math/geometry/triangles.d.ts.map +1 -1
- package/lib/math/geometry/triangles.js +21 -11
- package/lib/math/numbers/decimals/decimal.d.ts +5 -4
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/integer/integer.d.ts +3 -3
- package/lib/math/numbers/integer/integer.d.ts.map +1 -1
- package/lib/math/numbers/integer/power.d.ts +4 -3
- package/lib/math/numbers/integer/power.d.ts.map +1 -1
- package/lib/math/numbers/nombre.d.ts +3 -2
- package/lib/math/numbers/nombre.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.d.ts +4 -2
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/reals/extendedRingElement.d.ts +1 -1
- package/lib/math/numbers/reals/real.d.ts +4 -3
- package/lib/math/numbers/reals/real.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.d.ts +4 -3
- package/lib/math/polynomials/polynomial.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.js +8 -6
- package/lib/math/polynomials/rationalFrac.d.ts.map +1 -1
- package/lib/math/polynomials/rationalFrac.js +2 -2
- package/lib/math/polynomials/trinom.d.ts +10 -6
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +1 -1
- package/lib/math/utils/arithmetic/gcd.d.ts +1 -2
- package/lib/math/utils/arithmetic/gcd.d.ts.map +1 -1
- package/lib/math/utils/arithmetic/gcd.js +6 -7
- package/lib/server.js +4 -8
- package/lib/tree/nodes/algebraicNode.d.ts +3 -1
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/complex/complexNode.d.ts +5 -4
- package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/absNode.d.ts +2 -1
- package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/absNode.js +3 -0
- package/lib/tree/nodes/functions/cosNode.d.ts +2 -1
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +3 -0
- package/lib/tree/nodes/functions/expNode.d.ts +2 -1
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +3 -0
- package/lib/tree/nodes/functions/logNode.d.ts +2 -1
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +3 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts +1 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/oppositeNode.js +12 -22
- package/lib/tree/nodes/functions/sinNode.d.ts +2 -1
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +3 -0
- package/lib/tree/nodes/functions/sqrtNode.d.ts +2 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +3 -0
- package/lib/tree/nodes/geometry/lengthNode.d.ts +1 -0
- package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/lengthNode.js +7 -0
- package/lib/tree/nodes/geometry/vectorNode.d.ts +2 -3
- package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/constantNode.d.ts +3 -1
- package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/constantNode.js +5 -1
- package/lib/tree/nodes/numbers/infiniteNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/infiniteNode.js +3 -3
- package/lib/tree/nodes/numbers/numberNode.d.ts +1 -0
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +3 -0
- package/lib/tree/nodes/numbers/piNode.d.ts +1 -1
- package/lib/tree/nodes/numbers/piNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/piNode.js +1 -1
- package/lib/tree/nodes/operators/addNode.d.ts +2 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +3 -0
- package/lib/tree/nodes/operators/divideNode.d.ts +2 -1
- package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/divideNode.js +3 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts +2 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +3 -0
- package/lib/tree/nodes/operators/multiplyNode.d.ts +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +6 -4
- package/lib/tree/nodes/operators/powerNode.d.ts +3 -2
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +6 -0
- package/lib/tree/nodes/operators/substractNode.d.ts +6 -4
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +3 -0
- package/lib/tree/nodes/variables/variableNode.d.ts +3 -1
- package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
- package/lib/tree/nodes/variables/variableNode.js +6 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8FF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAYvD,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { MathExercise } from "../../../exercises/exercise";
|
|
|
2
2
|
type Identifiers = {
|
|
3
3
|
xValue: number;
|
|
4
4
|
yValue: number;
|
|
5
|
-
affineCoeffs
|
|
6
|
-
trinomCoeffs
|
|
5
|
+
affineCoeffs?: number[];
|
|
6
|
+
trinomCoeffs?: number[];
|
|
7
7
|
isAffine: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare const inverseImageFunctionGeogebra: MathExercise<Identifiers>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/basics/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/basics/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAgLF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CAalE,CAAC"}
|
|
@@ -11,56 +11,30 @@ const shuffle_1 = require("../../../utils/shuffle");
|
|
|
11
11
|
const getInverseImageFunctionGeogebra = () => {
|
|
12
12
|
const isAffine = (0, coinFlip_1.coinFlip)();
|
|
13
13
|
const xValue = (0, randint_1.randint)(-5, 6);
|
|
14
|
-
const yValue =
|
|
14
|
+
// const yValue = randint(-5, 6);
|
|
15
|
+
let yValue;
|
|
15
16
|
let affine;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
let roots = trinom.getRoots();
|
|
25
|
-
if (roots.length === 2)
|
|
26
|
-
while (roots[0] > 10 || roots[0] < -10 || roots[1] > 10 || roots[1] < -10) {
|
|
27
|
-
trinom = new polynomial_1.Polynomial([
|
|
28
|
-
(0, randint_1.randint)(-9, 10) - yValue,
|
|
29
|
-
(0, randint_1.randint)(-9, 10),
|
|
30
|
-
(0, randint_1.randint)(-4, 5, [0]),
|
|
31
|
-
]);
|
|
32
|
-
roots = trinom.getRoots();
|
|
33
|
-
}
|
|
34
|
-
else if (roots.length === 1)
|
|
35
|
-
while (roots[0] < -10 || roots[0] > 10) {
|
|
36
|
-
trinom = new polynomial_1.Polynomial([
|
|
37
|
-
(0, randint_1.randint)(-9, 10) - yValue,
|
|
38
|
-
(0, randint_1.randint)(-9, 10),
|
|
39
|
-
(0, randint_1.randint)(-4, 5, [0]),
|
|
40
|
-
]);
|
|
41
|
-
roots = trinom.getRoots();
|
|
42
|
-
}
|
|
43
|
-
const statement = isAffine
|
|
44
|
-
? `Déterminer le ou les antécédents de $${affine.calculate(xValue)}$ par la fonction $f$ représentée ci dessous.`
|
|
45
|
-
: `Déterminer le ou les antécédents de $${yValue}$ par la fonction $f$ représentée ci dessous.`;
|
|
46
|
-
let answer = isAffine
|
|
47
|
-
? xValue
|
|
48
|
-
: roots.length === 2
|
|
49
|
-
? `${(0, round_1.round)(roots[0], 1).toString().replace(".", ",")}\\text{ et }${(0, round_1.round)(roots[1], 1)
|
|
50
|
-
.toString()
|
|
51
|
-
.replace(".", ",")}`
|
|
52
|
-
: roots.length === 1
|
|
53
|
-
? roots[0].toString().replace(".", ",")
|
|
54
|
-
: `\\text{Aucun}`;
|
|
55
|
-
const optimum = trinom.derivate().getRoots()[0];
|
|
56
|
-
let xmin = 0, xmax = 0, ymin = 0, ymax = 0;
|
|
17
|
+
let trinom;
|
|
18
|
+
let statement = "";
|
|
19
|
+
let answer = "";
|
|
20
|
+
let xmin = -1;
|
|
21
|
+
let xmax = 1;
|
|
22
|
+
let ymin = -1;
|
|
23
|
+
let ymax = 1;
|
|
24
|
+
let commands;
|
|
57
25
|
if (isAffine) {
|
|
58
|
-
|
|
59
|
-
|
|
26
|
+
do {
|
|
27
|
+
affine = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-5, 6, [0])]);
|
|
28
|
+
yValue = affine.calculate(xValue);
|
|
29
|
+
} while (Math.abs(yValue) > 10);
|
|
30
|
+
statement = `Déterminer le ou les antécédents de $${yValue}$ par la fonction $f$ représentée ci dessous.`;
|
|
31
|
+
answer = xValue.toString().replace(".", ",");
|
|
32
|
+
if (yValue > 0) {
|
|
33
|
+
ymax = yValue + 1;
|
|
60
34
|
ymin = -1;
|
|
61
35
|
}
|
|
62
36
|
else {
|
|
63
|
-
ymin =
|
|
37
|
+
ymin = yValue - 1;
|
|
64
38
|
ymax = 1;
|
|
65
39
|
}
|
|
66
40
|
if (xValue > 0) {
|
|
@@ -71,16 +45,35 @@ const getInverseImageFunctionGeogebra = () => {
|
|
|
71
45
|
xmin = xValue - 1;
|
|
72
46
|
xmax = 1;
|
|
73
47
|
}
|
|
48
|
+
commands = [affine.toString()];
|
|
74
49
|
}
|
|
75
50
|
else {
|
|
51
|
+
let roots;
|
|
52
|
+
yValue = (0, randint_1.randint)(-5, 6);
|
|
53
|
+
do {
|
|
54
|
+
trinom = new polynomial_1.Polynomial([
|
|
55
|
+
(0, randint_1.randint)(-9, 10) - yValue,
|
|
56
|
+
(0, randint_1.randint)(-9, 10),
|
|
57
|
+
(0, randint_1.randint)(-4, 5, [0]),
|
|
58
|
+
]);
|
|
59
|
+
roots = trinom.getRoots();
|
|
60
|
+
} while (roots.some((root) => Math.abs(root) > 10));
|
|
61
|
+
statement = `Déterminer le ou les antécédents de $${yValue}$ par la fonction $f$ représentée ci dessous.`;
|
|
62
|
+
answer = !roots.length
|
|
63
|
+
? "\\text{Aucun}"
|
|
64
|
+
: roots
|
|
65
|
+
.map((r) => (0, round_1.round)(r, 1).toString().replace(".", ","))
|
|
66
|
+
.join("\\text{ et }");
|
|
67
|
+
const alpha = trinom.derivate().getRoots()[0];
|
|
68
|
+
const beta = trinom.calculate(alpha);
|
|
76
69
|
if (roots.length === 2) {
|
|
77
|
-
if (yValue >
|
|
70
|
+
if (yValue > beta + yValue) {
|
|
78
71
|
ymax = yValue + 2;
|
|
79
|
-
ymin =
|
|
72
|
+
ymin = beta + yValue - 2;
|
|
80
73
|
}
|
|
81
74
|
else {
|
|
82
75
|
ymin = yValue - 2;
|
|
83
|
-
ymax =
|
|
76
|
+
ymax = beta + yValue + 2;
|
|
84
77
|
}
|
|
85
78
|
xmax = Math.max(roots[0], roots[1]) + 1;
|
|
86
79
|
xmin = Math.min(roots[0], roots[1]) - 1;
|
|
@@ -94,30 +87,27 @@ const getInverseImageFunctionGeogebra = () => {
|
|
|
94
87
|
ymin = yValue - 5;
|
|
95
88
|
ymax = yValue + 1;
|
|
96
89
|
}
|
|
97
|
-
xmax =
|
|
98
|
-
xmin =
|
|
90
|
+
xmax = alpha + 5;
|
|
91
|
+
xmin = alpha - 5;
|
|
99
92
|
}
|
|
100
93
|
if (roots.length === 0) {
|
|
101
|
-
if (yValue >
|
|
94
|
+
if (yValue > beta + yValue) {
|
|
102
95
|
ymax = yValue + 1;
|
|
103
|
-
ymin =
|
|
96
|
+
ymin = beta + yValue - 3;
|
|
104
97
|
}
|
|
105
98
|
else {
|
|
106
99
|
ymin = yValue - 1;
|
|
107
|
-
ymax =
|
|
100
|
+
ymax = beta + yValue + 3;
|
|
108
101
|
}
|
|
109
|
-
xmax =
|
|
110
|
-
xmin =
|
|
102
|
+
xmax = alpha + 5;
|
|
103
|
+
xmin = alpha - 5;
|
|
111
104
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
isAffine
|
|
115
|
-
? affine.toString()
|
|
116
|
-
: yValue !== 0
|
|
105
|
+
commands = [
|
|
106
|
+
yValue !== 0
|
|
117
107
|
? trinom.add(new polynomial_1.Polynomial([yValue])).toString()
|
|
118
108
|
: trinom.toString(),
|
|
119
|
-
|
|
120
|
-
|
|
109
|
+
];
|
|
110
|
+
}
|
|
121
111
|
const question = {
|
|
122
112
|
instruction: statement,
|
|
123
113
|
answer,
|
|
@@ -127,8 +117,8 @@ const getInverseImageFunctionGeogebra = () => {
|
|
|
127
117
|
answerFormat: "tex",
|
|
128
118
|
identifiers: {
|
|
129
119
|
xValue,
|
|
130
|
-
affineCoeffs: affine.coefficients,
|
|
131
|
-
trinomCoeffs: trinom.coefficients,
|
|
120
|
+
affineCoeffs: isAffine ? affine.coefficients : undefined,
|
|
121
|
+
trinomCoeffs: isAffine ? undefined : trinom.coefficients,
|
|
132
122
|
yValue,
|
|
133
123
|
isAffine,
|
|
134
124
|
},
|
|
@@ -138,17 +128,20 @@ const getInverseImageFunctionGeogebra = () => {
|
|
|
138
128
|
const getPropositions = (n, { answer, xValue, affineCoeffs, trinomCoeffs, yValue, isAffine }) => {
|
|
139
129
|
const propositions = [];
|
|
140
130
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
141
|
-
|
|
142
|
-
|
|
131
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "\\text{Aucun}");
|
|
132
|
+
if (isAffine) {
|
|
133
|
+
const affine = new polynomial_1.Polynomial(affineCoeffs);
|
|
134
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, affine.calculate(yValue).toString().replace(".", ","));
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
const trinom = new polynomial_1.Polynomial(trinomCoeffs);
|
|
138
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, trinom.calculate(yValue).toString().replace(".", ","));
|
|
139
|
+
}
|
|
143
140
|
while (propositions.length < n) {
|
|
144
|
-
const wrongAnswer =
|
|
145
|
-
? (0, randint_1.randint)(-9, 10
|
|
146
|
-
:
|
|
147
|
-
|
|
148
|
-
: roots.length === 1
|
|
149
|
-
? (0, randint_1.randint)(-9, 10, [roots[0]]).toString().replace(".", ",")
|
|
150
|
-
: `\\text{Aucun}`;
|
|
151
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer + "");
|
|
141
|
+
const wrongAnswer = (0, coinFlip_1.coinFlip)()
|
|
142
|
+
? `${(0, randint_1.randint)(-9, 10)}`
|
|
143
|
+
: `${(0, randint_1.randint)(-9, 10)}\\text{ et }${(0, randint_1.randint)(-9, 10)}`;
|
|
144
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
|
|
152
145
|
}
|
|
153
146
|
return (0, shuffle_1.shuffle)(propositions);
|
|
154
147
|
};
|
|
@@ -4,5 +4,6 @@ export { exponentialPrimitive } from "./exponentialPrimitive";
|
|
|
4
4
|
export { logarithmePrimitive } from "./logarithmePrimitive";
|
|
5
5
|
export { polynomialPrimitive } from "./polynomialPrimitive";
|
|
6
6
|
export { sinCosPrimitive } from "./sinCosPrimitive";
|
|
7
|
+
export { sinUCosUPrimitive } from "./sinUCosUPrimitive";
|
|
7
8
|
export * from "./usualPrimitives";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/primitive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/primitive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,mBAAmB,CAAC"}
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.sinCosPrimitive = exports.polynomialPrimitive = exports.logarithmePrimitive = exports.exponentialPrimitive = exports.expUPrimitive = exports.constantPrimitive = void 0;
|
|
17
|
+
exports.sinUCosUPrimitive = exports.sinCosPrimitive = exports.polynomialPrimitive = exports.logarithmePrimitive = exports.exponentialPrimitive = exports.expUPrimitive = exports.constantPrimitive = void 0;
|
|
18
18
|
var constantPrimitive_1 = require("./constantPrimitive");
|
|
19
19
|
Object.defineProperty(exports, "constantPrimitive", { enumerable: true, get: function () { return constantPrimitive_1.constantPrimitive; } });
|
|
20
20
|
var expUPrimitive_1 = require("./expUPrimitive");
|
|
@@ -27,5 +27,6 @@ var polynomialPrimitive_1 = require("./polynomialPrimitive");
|
|
|
27
27
|
Object.defineProperty(exports, "polynomialPrimitive", { enumerable: true, get: function () { return polynomialPrimitive_1.polynomialPrimitive; } });
|
|
28
28
|
var sinCosPrimitive_1 = require("./sinCosPrimitive");
|
|
29
29
|
Object.defineProperty(exports, "sinCosPrimitive", { enumerable: true, get: function () { return sinCosPrimitive_1.sinCosPrimitive; } });
|
|
30
|
-
|
|
30
|
+
var sinUCosUPrimitive_1 = require("./sinUCosUPrimitive");
|
|
31
|
+
Object.defineProperty(exports, "sinUCosUPrimitive", { enumerable: true, get: function () { return sinUCosUPrimitive_1.sinUCosUPrimitive; } });
|
|
31
32
|
__exportStar(require("./usualPrimitives"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sinCosPrimitive.d.ts","sourceRoot":"","sources":["../../../src/exercises/primitive/sinCosPrimitive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"sinCosPrimitive.d.ts","sourceRoot":"","sources":["../../../src/exercises/primitive/sinCosPrimitive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAAiB,CAAC,WAAW,CA2B7D,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,YAAY,CAAC,WAAW,CA4BpE,CAAC;AACF,eAAO,MAAM,4BAA4B,EAAE,GAAG,CAAC,WAAW,CAYzD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAYrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sinUCosUPrimitive.d.ts","sourceRoot":"","sources":["../../../src/exercises/primitive/sinUCosUPrimitive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"sinUCosUPrimitive.d.ts","sourceRoot":"","sources":["../../../src/exercises/primitive/sinUCosUPrimitive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,WAAW,CA0B/D,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,YAAY,CAAC,WAAW,CA8BtE,CAAC;AACF,eAAO,MAAM,8BAA8B,EAAE,GAAG,CAAC,WAAW,CAa3D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAYvD,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -352,8 +352,8 @@ declare const mathExercises: (import("./exercises/exercise").MathExercise<{
|
|
|
352
352
|
}> | import("./exercises/exercise").MathExercise<{
|
|
353
353
|
xValue: number;
|
|
354
354
|
yValue: number;
|
|
355
|
-
affineCoeffs
|
|
356
|
-
trinomCoeffs
|
|
355
|
+
affineCoeffs?: number[] | undefined;
|
|
356
|
+
trinomCoeffs?: number[] | undefined;
|
|
357
357
|
isAffine: boolean;
|
|
358
358
|
}> | import("./exercises/exercise").MathExercise<{
|
|
359
359
|
k: number;
|
|
@@ -546,6 +546,9 @@ declare const mathExercises: (import("./exercises/exercise").MathExercise<{
|
|
|
546
546
|
}> | import("./exercises/exercise").MathExercise<{
|
|
547
547
|
a: number;
|
|
548
548
|
isCos: boolean;
|
|
549
|
+
}> | import("./exercises/exercise").MathExercise<{
|
|
550
|
+
coeffs: number[];
|
|
551
|
+
isCos: boolean;
|
|
549
552
|
}> | import("./exercises/exercise").MathExercise<{
|
|
550
553
|
type: number;
|
|
551
554
|
a?: number | undefined;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqCA,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqCA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA2B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -19,7 +19,7 @@ export declare class Complex {
|
|
|
19
19
|
opposite(): Complex;
|
|
20
20
|
conjugate(): Complex;
|
|
21
21
|
toArgumentTree(): NumberNode | FractionNode | OppositeNode | import("../../tree/nodes/numbers/constantNode").ConstantNode | undefined;
|
|
22
|
-
toModuleTree(): import("../../tree/nodes/
|
|
22
|
+
toModuleTree(): import("../../tree/nodes/algebraicNode").AlgebraicNode;
|
|
23
23
|
toTree(): ComplexNode;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=complex.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Node } from "../../tree/nodes/node";
|
|
2
1
|
import { MathSet } from "../sets/mathSet";
|
|
2
|
+
import { AlgebraicNode } from "../../tree/nodes/algebraicNode";
|
|
3
3
|
export declare abstract class PointConstructor {
|
|
4
4
|
static random(domainX?: MathSet, domainY?: MathSet): Point;
|
|
5
5
|
}
|
|
6
6
|
export declare class Point {
|
|
7
7
|
name: string;
|
|
8
|
-
x:
|
|
9
|
-
y:
|
|
10
|
-
constructor(name: string, x:
|
|
8
|
+
x: AlgebraicNode;
|
|
9
|
+
y: AlgebraicNode;
|
|
10
|
+
constructor(name: string, x: AlgebraicNode, y: AlgebraicNode);
|
|
11
11
|
toTex(): string;
|
|
12
12
|
toTexWithCoords(): string;
|
|
13
13
|
toCoords(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/point.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/point.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,8BAAsB,gBAAgB;IACpC,MAAM,CAAC,MAAM,CACX,OAAO,GAAE,OAAqC,EAC9C,OAAO,GAAE,OAAqC,GAC7C,KAAK;CAOT;AAED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;gBACL,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa;IAM5D,KAAK,IAAI,MAAM;IAIf,eAAe,IAAI,MAAM;IAGzB,QAAQ,IAAI,MAAM;IAIlB,UAAU,IAAI,MAAM;IAMpB,UAAU,IAAI,MAAM;IAMpB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,SAAM,GAAG,KAAK;IAiBrC,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM;CAK7B;AAED;;;;;;;;;;;;GAYG"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Point } from
|
|
2
|
-
import {
|
|
1
|
+
import { Point } from "./point";
|
|
2
|
+
import { SqrtNode } from "../../tree/nodes/functions/sqrtNode";
|
|
3
3
|
export declare abstract class TriangleConstructor {
|
|
4
|
-
static createRandomRightTriangle({ minRapport, maxRapport, names }: {
|
|
4
|
+
static createRandomRightTriangle({ minRapport, maxRapport, names, }: {
|
|
5
5
|
minRapport?: number | undefined;
|
|
6
6
|
maxRapport?: number | undefined;
|
|
7
7
|
names?: string[] | undefined;
|
|
8
8
|
}): Triangle;
|
|
9
|
-
static createRandomTriangle({ minAngle, maxAngle, names }: {
|
|
9
|
+
static createRandomTriangle({ minAngle, maxAngle, names, }: {
|
|
10
10
|
minAngle?: number | undefined;
|
|
11
11
|
maxAngle?: number | undefined;
|
|
12
12
|
names?: string[] | undefined;
|
|
@@ -31,9 +31,9 @@ export declare class Triangle {
|
|
|
31
31
|
getSideBnumber(): number;
|
|
32
32
|
getSideCnumber(): number;
|
|
33
33
|
getTriangleName(): string;
|
|
34
|
-
getSideAnode():
|
|
35
|
-
getSideBnode():
|
|
36
|
-
getSideCnode():
|
|
34
|
+
getSideAnode(): SqrtNode;
|
|
35
|
+
getSideBnode(): SqrtNode;
|
|
36
|
+
getSideCnode(): SqrtNode;
|
|
37
37
|
getAngleA(): number;
|
|
38
38
|
getAngleB(): number;
|
|
39
39
|
getAngleC(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triangles.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/triangles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"triangles.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/triangles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKhC,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAI/D,8BAAsB,mBAAmB;IACvC,MAAM,CAAC,yBAAyB,CAAC,EAC/B,UAAc,EACd,UAAc,EACd,KAAuB,GACxB;;;;KAAA,GAAG,QAAQ;IAkBZ,MAAM,CAAC,oBAAoB,CAAC,EAC1B,QAAe,EACf,QAAc,EACd,KAAuB,GACxB;;;;KAAA,GAAG,QAAQ;CA+Bb;AAED,KAAK,qBAAqB,GAAG;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,qBAAa,QAAQ;IACnB,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;gBAEH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK;IAM1D,cAAc,IAAI,MAAM;IAOxB,cAAc,IAAI,MAAM;IAOxB,cAAc,IAAI,MAAM;IAIxB,eAAe,IAAI,MAAM;IAIzB,YAAY;IAeZ,YAAY;IAeZ,YAAY;IAeZ,SAAS,IAAI,MAAM;IASnB,SAAS,IAAI,MAAM;IASnB,SAAS,IAAI,MAAM;IASnB,YAAY,IAAI,MAAM;IAMtB,OAAO,IAAI,MAAM;IAUjB,OAAO,IAAI,OAAO;IAOlB,aAAa,IAAI,OAAO;IAOxB,WAAW,IAAI,OAAO;IAQtB,SAAS,IAAI,OAAO;IAQpB,aAAa,IAAI,MAAM;IAOvB,gBAAgB,CAAC,EACf,gBAAgB,EAAE,gBAAgB,EAClC,qBAAqB,EAAE,qBAAqB,EAC5C,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EACR,QAAQ,GACT,EAAE,qBAAqB,GAAG,MAAM,EAAE;IAsEnC,cAAc,IAAI,MAAM,EAAE;IAyB1B,YAAY,IAAI,MAAM;IAItB,YAAY,IAAI,MAAM;IAItB,YAAY,IAAI,MAAM;CAGvB"}
|
|
@@ -9,7 +9,7 @@ const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
|
9
9
|
const sqrtNode_1 = require("../../tree/nodes/functions/sqrtNode");
|
|
10
10
|
const randint_1 = require("../utils/random/randint");
|
|
11
11
|
class TriangleConstructor {
|
|
12
|
-
static createRandomRightTriangle({ minRapport = 0, maxRapport = 5, names = [
|
|
12
|
+
static createRandomRightTriangle({ minRapport = 0, maxRapport = 5, names = ["A", "B", "C"], }) {
|
|
13
13
|
let pointA, pointB, pointC, d1, d2;
|
|
14
14
|
do {
|
|
15
15
|
const xA = (0, randint_1.randint)(-10, 11);
|
|
@@ -26,7 +26,7 @@ class TriangleConstructor {
|
|
|
26
26
|
} while (!d1 || !d2 || d1 / d2 < minRapport || d1 / d2 > maxRapport);
|
|
27
27
|
return new Triangle(pointA, pointB, pointC);
|
|
28
28
|
}
|
|
29
|
-
static createRandomTriangle({ minAngle = 0.69, maxAngle = 1.5, names = [
|
|
29
|
+
static createRandomTriangle({ minAngle = 0.69, maxAngle = 1.5, names = ["A", "B", "C"], }) {
|
|
30
30
|
let pointA, pointB, pointC, triangle;
|
|
31
31
|
do {
|
|
32
32
|
pointA = new point_1.Point(names[0], new numberNode_1.NumberNode((0, randint_1.randint)(-10, 11)), new numberNode_1.NumberNode((0, randint_1.randint)(-10, 11)));
|
|
@@ -73,23 +73,32 @@ class Triangle {
|
|
|
73
73
|
return new sqrtNode_1.SqrtNode(new addNode_1.AddNode(new powerNode_1.PowerNode(new substractNode_1.SubstractNode(this.vertexA.x, this.vertexB.x), new numberNode_1.NumberNode(2)), new powerNode_1.PowerNode(new substractNode_1.SubstractNode(this.vertexC.y, this.vertexB.y), new numberNode_1.NumberNode(2))));
|
|
74
74
|
}
|
|
75
75
|
getAngleA() {
|
|
76
|
-
return Math.acos((this.getSideBnumber() ** 2 +
|
|
76
|
+
return Math.acos((this.getSideBnumber() ** 2 +
|
|
77
|
+
this.getSideCnumber() ** 2 -
|
|
78
|
+
this.getSideAnumber() ** 2) /
|
|
77
79
|
(2 * this.getSideBnumber() * this.getSideCnumber()));
|
|
78
80
|
}
|
|
79
81
|
getAngleB() {
|
|
80
|
-
return Math.acos((this.getSideAnumber() ** 2 +
|
|
82
|
+
return Math.acos((this.getSideAnumber() ** 2 +
|
|
83
|
+
this.getSideCnumber() ** 2 -
|
|
84
|
+
this.getSideBnumber() ** 2) /
|
|
81
85
|
(2 * this.getSideAnumber() * this.getSideCnumber()));
|
|
82
86
|
}
|
|
83
87
|
getAngleC() {
|
|
84
|
-
return Math.acos((this.getSideAnumber() ** 2 +
|
|
88
|
+
return Math.acos((this.getSideAnumber() ** 2 +
|
|
89
|
+
this.getSideBnumber() ** 2 -
|
|
90
|
+
this.getSideCnumber() ** 2) /
|
|
85
91
|
(2 * this.getSideAnumber() * this.getSideBnumber()));
|
|
86
92
|
}
|
|
87
93
|
getPerimeter() {
|
|
88
|
-
return this.getSideAnumber() + this.getSideBnumber() + this.getSideCnumber();
|
|
94
|
+
return (this.getSideAnumber() + this.getSideBnumber() + this.getSideCnumber());
|
|
89
95
|
}
|
|
90
96
|
getArea() {
|
|
91
97
|
const s = this.getPerimeter() / 2;
|
|
92
|
-
return Math.sqrt(s *
|
|
98
|
+
return Math.sqrt(s *
|
|
99
|
+
(s - this.getSideAnumber()) *
|
|
100
|
+
(s - this.getSideBnumber()) *
|
|
101
|
+
(s - this.getSideCnumber()));
|
|
93
102
|
}
|
|
94
103
|
isRight() {
|
|
95
104
|
if (Math.abs(Math.cos(this.getAngleA())) < 0.001)
|
|
@@ -101,7 +110,8 @@ class Triangle {
|
|
|
101
110
|
return false;
|
|
102
111
|
}
|
|
103
112
|
isEquilateral() {
|
|
104
|
-
return this.getSideAnumber() === this.getSideBnumber() &&
|
|
113
|
+
return (this.getSideAnumber() === this.getSideBnumber() &&
|
|
114
|
+
this.getSideAnumber() === this.getSideCnumber());
|
|
105
115
|
}
|
|
106
116
|
isIsosceles() {
|
|
107
117
|
return (this.getSideAnumber() === this.getSideBnumber() ||
|
|
@@ -120,7 +130,7 @@ class Triangle {
|
|
|
120
130
|
return this.vertexB.name;
|
|
121
131
|
if (Math.abs(Math.cos(this.getAngleC())) < 0.001)
|
|
122
132
|
return this.vertexC.name;
|
|
123
|
-
return
|
|
133
|
+
return "";
|
|
124
134
|
}
|
|
125
135
|
generateCommands({ highlightedAngle: highlightedAngle, colorHighlightedAngle: colorHighlightedAngle, showLabels: showLabels, setCaptions: setCaptions, highlightedSide: highlightedSide, colorHighlightedSide: colorHighlightedSide, showAxes, showGrid, }) {
|
|
126
136
|
let commands = [
|
|
@@ -141,9 +151,9 @@ class Triangle {
|
|
|
141
151
|
];
|
|
142
152
|
if (this.isRight())
|
|
143
153
|
commands.push(`alpha = Angle(${this.vertexB.name},${this.vertexA.name},${this.vertexC.name}, Line(${this.vertexB.name},${this.vertexA.name}))`, `ShowLabel(alpha, false)`);
|
|
144
|
-
const defautColor =
|
|
154
|
+
const defautColor = "Red";
|
|
145
155
|
if (highlightedAngle) {
|
|
146
|
-
let temp = [
|
|
156
|
+
let temp = [""];
|
|
147
157
|
if (highlightedAngle === this.vertexB.name)
|
|
148
158
|
temp = [this.vertexA.name, this.vertexB.name, this.vertexC.name];
|
|
149
159
|
if (highlightedAngle === this.vertexC.name)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NumberNode } from "../../../tree/nodes/numbers/numberNode";
|
|
2
|
+
import { MultiplyNode } from "../../../tree/nodes/operators/multiplyNode";
|
|
2
3
|
import { Nombre, NumberType } from "../nombre";
|
|
3
4
|
export declare abstract class DecimalConstructor {
|
|
4
5
|
static randomFracPart(precision: number, leadingZeros?: number): string;
|
|
@@ -21,8 +22,8 @@ export declare class Decimal implements Nombre {
|
|
|
21
22
|
*/
|
|
22
23
|
round(precision: number): Nombre;
|
|
23
24
|
multiplyByPowerOfTen(power: number): Decimal;
|
|
24
|
-
toScientificPart():
|
|
25
|
-
toScientificNotation():
|
|
26
|
-
toTree():
|
|
25
|
+
toScientificPart(): NumberNode;
|
|
26
|
+
toScientificNotation(): NumberNode | MultiplyNode;
|
|
27
|
+
toTree(): NumberNode;
|
|
27
28
|
}
|
|
28
29
|
//# sourceMappingURL=decimal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/decimals/decimal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/decimals/decimal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAGvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,8BAAsB,kBAAkB;IACtC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,GAAE,MAAU,GAAG,MAAM;IAW1E,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO;IAMpE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAI/D,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO;CAMrD;AAED,qBAAa,OAAQ,YAAW,MAAM;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,aAAsB;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;gBACR,KAAK,EAAE,MAAM;IASzB;;;;OAIG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAsEhC,oBAAoB,CAAC,KAAK,EAAE,MAAM;IA2BlC,gBAAgB;IAgBhB,oBAAoB;IAmBpB,MAAM;CAGP"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NumberNode } from "../../../tree/nodes/numbers/numberNode";
|
|
2
2
|
import { Nombre, NumberType } from "../nombre";
|
|
3
3
|
import { Rational } from "../rationals/rational";
|
|
4
4
|
export declare abstract class IntegerConstructor {
|
|
@@ -11,11 +11,11 @@ export declare class Integer implements Nombre {
|
|
|
11
11
|
tex: string;
|
|
12
12
|
type: NumberType;
|
|
13
13
|
constructor(value: number, tex?: string);
|
|
14
|
-
toTree():
|
|
14
|
+
toTree(): NumberNode;
|
|
15
15
|
round(precision: number): Integer;
|
|
16
16
|
divide(nb: Nombre): Nombre;
|
|
17
17
|
multiply(nb: Nombre): Rational | Integer;
|
|
18
18
|
opposite(): Integer;
|
|
19
|
-
add(nb: Nombre): Nombre;
|
|
19
|
+
add(nb: Nombre): Nombre | Integer;
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=integer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/integer/integer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/integer/integer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,8BAAsB,kBAAkB;IACtC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE;IAGrD,MAAM,CAAC,WAAW,CAAC,GAAG,GAAE,MAAW;IAGnC,MAAM,CAAC,gBAAgB,CACrB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,EACV,QAAQ,CAAC,EAAE,MAAM,EAAE;CAYtB;AAED,qBAAa,OAAQ,YAAW,MAAM;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;gBAEL,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;IAMvC,MAAM;IAIN,KAAK,CAAC,SAAS,EAAE,MAAM;IAkCvB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAc1B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO;IAYxC,QAAQ;IAGR,GAAG,CAAC,EAAE,EAAE,MAAM;CAYf"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NumberNode } from "../../../tree/nodes/numbers/numberNode";
|
|
2
|
+
import { PowerNode } from "../../../tree/nodes/operators/powerNode";
|
|
2
3
|
import { Nombre, NumberType } from "../nombre";
|
|
3
4
|
export declare class Power implements Nombre {
|
|
4
5
|
value: number;
|
|
@@ -7,8 +8,8 @@ export declare class Power implements Nombre {
|
|
|
7
8
|
operand: number;
|
|
8
9
|
power: number;
|
|
9
10
|
constructor(a: number, b: number);
|
|
10
|
-
simplify():
|
|
11
|
+
simplify(): NumberNode | PowerNode;
|
|
11
12
|
toDecimalWriting(): Nombre;
|
|
12
|
-
toTree():
|
|
13
|
+
toTree(): PowerNode;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=power.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"power.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/integer/power.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"power.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/integer/power.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG/C,qBAAa,KAAM,YAAW,MAAM;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;gBACF,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAOhC,QAAQ;IASR,gBAAgB,IAAI,MAAM;IAmB1B,MAAM;CAMP"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AlgebraicNode } from "../../tree/nodes/algebraicNode";
|
|
2
|
+
import { NodeOptions } from "../../tree/nodes/node";
|
|
2
3
|
import { Integer } from "./integer/integer";
|
|
3
4
|
export declare enum NumberType {
|
|
4
5
|
Integer = 0,
|
|
@@ -10,7 +11,7 @@ export interface Nombre {
|
|
|
10
11
|
value: number;
|
|
11
12
|
tex: string;
|
|
12
13
|
type: NumberType;
|
|
13
|
-
toTree: (opts?: NodeOptions) =>
|
|
14
|
+
toTree: (opts?: NodeOptions) => AlgebraicNode;
|
|
14
15
|
}
|
|
15
16
|
export declare abstract class NombreConstructor {
|
|
16
17
|
static random(): import("./decimals/decimal").Decimal | Integer | import("./rationals/rational").Rational | import("./reals/real").Real;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nombre.d.ts","sourceRoot":"","sources":["../../../src/math/numbers/nombre.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"nombre.d.ts","sourceRoot":"","sources":["../../../src/math/numbers/nombre.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAQ,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI1D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C,oBAAY,UAAU;IACpB,OAAO,IAAA;IACP,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,IAAI,IAAA;CACL;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,aAAa,CAAC;CAC/C;AAED,8BAAsB,iBAAiB;IACrC,MAAM,CAAC,MAAM;CAkBd"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OppositeNode } from "../../../tree/nodes/functions/oppositeNode";
|
|
2
|
+
import { NodeOptions } from "../../../tree/nodes/node";
|
|
3
|
+
import { FractionNode } from "../../../tree/nodes/operators/fractionNode";
|
|
2
4
|
import { Integer } from "../integer/integer";
|
|
3
5
|
import { Nombre, NumberType } from "../nombre";
|
|
4
6
|
export declare abstract class RationalConstructor {
|
|
@@ -22,7 +24,7 @@ export declare class Rational implements Nombre {
|
|
|
22
24
|
multiply(nb: Nombre): Rational | Integer;
|
|
23
25
|
divide(nb: Nombre): Nombre;
|
|
24
26
|
opposite(): Rational;
|
|
25
|
-
toTree(opts?: NodeOptions):
|
|
27
|
+
toTree(opts?: NodeOptions): FractionNode | OppositeNode;
|
|
26
28
|
isIrreductible(): boolean;
|
|
27
29
|
simplify(): Integer | Rational;
|
|
28
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rational.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/rationals/rational.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rational.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/rationals/rational.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAQ,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAIvE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,8BAAsB,mBAAmB;IACvC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAM,GAAE,MAAW;IAW7C,MAAM,CAAC,kBAAkB,CAAC,GAAG,GAAE,MAAW;IAO1C,MAAM,CAAC,0BAA0B,CAAC,GAAG,GAAE,MAAW;CAQnD;AAED,qBAAa,QAAS,YAAW,MAAM;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;gBAEL,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAYlD,KAAK;IAML,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAkBvB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO;IAgBxC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAgB1B,QAAQ,IAAI,QAAQ;IAIpB,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW;IAgBzB,cAAc;IAId,QAAQ,IAAI,OAAO,GAAG,QAAQ;CAY/B"}
|
|
@@ -10,6 +10,6 @@ export declare class ExtendedRingElement {
|
|
|
10
10
|
b: number;
|
|
11
11
|
algebraicElement: Nombre;
|
|
12
12
|
constructor(a: number, b: number, algebraicElement: Nombre);
|
|
13
|
-
toTree(): import("../../../tree/nodes/
|
|
13
|
+
toTree(): import("../../../tree/nodes/algebraicNode").AlgebraicNode | NumberNode | SubstractNode;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=extendedRingElement.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AlgebraicNode } from "../../../tree/nodes/algebraicNode";
|
|
2
|
+
import { SqrtNode } from "../../../tree/nodes/functions/sqrtNode";
|
|
2
3
|
import { Nombre, NumberType } from "../nombre";
|
|
3
4
|
export declare abstract class RealConstructor {
|
|
4
5
|
static random(): Real;
|
|
@@ -8,7 +9,7 @@ export declare class Real implements Nombre {
|
|
|
8
9
|
tex: string;
|
|
9
10
|
type: NumberType;
|
|
10
11
|
constructor(value: number, tex: string);
|
|
11
|
-
toTree():
|
|
12
|
+
toTree(): AlgebraicNode;
|
|
12
13
|
}
|
|
13
14
|
export declare abstract class SquareRootConstructor {
|
|
14
15
|
/**
|
|
@@ -27,6 +28,6 @@ export declare class SquareRoot extends Real {
|
|
|
27
28
|
getSimplifiedCoeffs(): [number, number];
|
|
28
29
|
simplify(): Nombre;
|
|
29
30
|
toTex(): string;
|
|
30
|
-
toTree():
|
|
31
|
+
toTree(): SqrtNode;
|
|
31
32
|
}
|
|
32
33
|
//# sourceMappingURL=real.d.ts.map
|