math-exercises 2.0.28 → 2.0.30
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/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +6 -6
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +10 -6
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +14 -7
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +11 -11
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +4 -6
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +3 -5
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +0 -5
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +10 -16
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +3 -5
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +4 -6
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +4 -6
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.js +0 -2
- package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.js +20 -8
- package/lib/exercises/exercise.d.ts +1 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
- package/lib/exercises/functions/absolute/absoluteValueInequations.js +8 -5
- package/lib/exercises/functions/affines/interceptReading.d.ts.map +1 -1
- package/lib/exercises/functions/exponential/expSimplifiying.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/canonicalFromDevForm.js +1 -3
- package/lib/exercises/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/secondDegreeInequation.js +0 -3
- package/lib/exercises/index.d.ts +1 -0
- package/lib/exercises/index.d.ts.map +1 -1
- package/lib/exercises/index.js +1 -0
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.js +1 -6
- package/lib/exercises/matrices/index.d.ts +2 -0
- package/lib/exercises/matrices/index.d.ts.map +1 -0
- package/lib/exercises/matrices/index.js +17 -0
- package/lib/exercises/matrices/matrixInversibilityDomain.d.ts +10 -0
- package/lib/exercises/matrices/matrixInversibilityDomain.d.ts.map +1 -0
- package/lib/exercises/matrices/matrixInversibilityDomain.js +93 -0
- package/lib/exercises/sets/intervals/inequalityToInterval.d.ts +4 -1
- package/lib/exercises/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/sets/intervals/inequalityToInterval.js +10 -7
- package/lib/exercises/sets/intervals/intervalsIntersection.d.ts +7 -2
- package/lib/exercises/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/sets/intervals/intervalsIntersection.js +11 -4
- package/lib/exercises/sets/intervals/intervalsUnion.d.ts +7 -2
- package/lib/exercises/sets/intervals/intervalsUnion.d.ts.map +1 -1
- package/lib/exercises/sets/intervals/intervalsUnion.js +11 -4
- package/lib/exercises/utils/keys/intervalKeys.d.ts +3 -0
- package/lib/exercises/utils/keys/intervalKeys.d.ts.map +1 -0
- package/lib/exercises/utils/keys/intervalKeys.js +10 -0
- package/lib/index.d.ts +124 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/matrices/matrix.d.ts +10 -0
- package/lib/math/matrices/matrix.d.ts.map +1 -0
- package/lib/math/matrices/matrix.js +24 -0
- package/lib/math/numbers/decimals/decimal.d.ts +1 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +3 -0
- package/lib/math/numbers/integer/integer.d.ts +1 -0
- package/lib/math/numbers/integer/integer.d.ts.map +1 -1
- package/lib/math/numbers/integer/integer.js +3 -0
- package/lib/math/numbers/integer/power.d.ts +1 -0
- package/lib/math/numbers/integer/power.d.ts.map +1 -1
- package/lib/math/numbers/integer/power.js +3 -0
- package/lib/math/numbers/logarithms/ln.d.ts +1 -0
- package/lib/math/numbers/logarithms/ln.d.ts.map +1 -1
- package/lib/math/numbers/logarithms/ln.js +3 -0
- package/lib/math/numbers/nombre.d.ts +5 -2
- package/lib/math/numbers/nombre.d.ts.map +1 -1
- package/lib/math/numbers/nombre.js +22 -7
- package/lib/math/numbers/rationals/rational.d.ts +1 -0
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +4 -3
- package/lib/math/numbers/reals/real.d.ts +1 -0
- package/lib/math/numbers/reals/real.d.ts.map +1 -1
- package/lib/math/numbers/reals/real.js +3 -0
- package/lib/math/polynomials/affine.d.ts +20 -5
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +8 -12
- package/lib/math/polynomials/trinom.d.ts +40 -4
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +23 -28
- package/lib/math/sets/intervals/intervals.d.ts +9 -12
- package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
- package/lib/math/sets/intervals/intervals.js +61 -135
- package/lib/math/utils/random/randint.d.ts.map +1 -1
- package/lib/math/utils/random/randint.js +2 -2
- package/lib/server.d.ts +6 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +10 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +40 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts +1 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +14 -2
- package/lib/tree/nodes/sets/majorSets.d.ts +1 -0
- package/lib/tree/nodes/sets/majorSets.d.ts.map +1 -0
- package/lib/tree/nodes/sets/majorSets.js +1 -0
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts +4 -0
- package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.js +13 -2
- package/lib/types/numberType.d.ts +1 -0
- package/lib/types/numberType.d.ts.map +1 -0
- package/lib/types/numberType.js +1 -0
- package/package.json +1 -1
|
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.canonicalFromDevForm = void 0;
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
-
const integer_1 = require("../../../math/numbers/integer/integer");
|
|
7
6
|
const trinom_1 = require("../../../math/polynomials/trinom");
|
|
8
|
-
const discreteSet_1 = require("../../../math/sets/discreteSet");
|
|
9
7
|
const shuffle_1 = require("../../../utils/shuffle");
|
|
10
8
|
const getCanonicalFromDevFormQuestion = () => {
|
|
11
9
|
const trinom = trinom_1.TrinomConstructor.randomCanonical();
|
|
@@ -25,7 +23,7 @@ const getPropositions = (n, { answer, a }) => {
|
|
|
25
23
|
const propositions = [];
|
|
26
24
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
25
|
while (propositions.length < n) {
|
|
28
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, trinom_1.TrinomConstructor.randomCanonical(
|
|
26
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, trinom_1.TrinomConstructor.randomCanonical({ from: [a, -a] })
|
|
29
27
|
.getCanonicalForm()
|
|
30
28
|
.toTex());
|
|
31
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAa3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAa3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAuHF,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,WAAW,CAa5D,CAAC"}
|
|
@@ -78,12 +78,9 @@ const getPropositions = (n, { answer, a, b, c, ineqType }) => {
|
|
|
78
78
|
const isAnswerValid = (ans, { answer, a, b, c, ineqType }) => {
|
|
79
79
|
const trinom = new trinom_1.Trinom(a, b, c);
|
|
80
80
|
const roots = trinom.getRootsNode();
|
|
81
|
-
console.log("vea", roots.length);
|
|
82
81
|
const ineq = new inequation_1.InequationSymbol(ineqType);
|
|
83
82
|
const tree = getAnswer({ a, ineqType: ineq, roots });
|
|
84
83
|
const texs = tree.toAllValidTexs();
|
|
85
|
-
console.log("2ndIneq VEA texs", texs);
|
|
86
|
-
console.log("2ndIneq VEA Answer", answer);
|
|
87
84
|
return texs.includes(ans);
|
|
88
85
|
};
|
|
89
86
|
exports.secondDegreeInequation = {
|
package/lib/exercises/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exercises/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exercises/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
package/lib/exercises/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./equaDiff"), exports);
|
|
|
24
24
|
__exportStar(require("./functions"), exports);
|
|
25
25
|
__exportStar(require("./geometry"), exports);
|
|
26
26
|
__exportStar(require("./limits"), exports);
|
|
27
|
+
__exportStar(require("./matrices"), exports);
|
|
27
28
|
__exportStar(require("./percent"), exports);
|
|
28
29
|
__exportStar(require("./powers"), exports);
|
|
29
30
|
__exportStar(require("./primitive"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rationalFracForbiddenValueLimit.d.ts","sourceRoot":"","sources":["../../../src/exercises/limits/rationalFracForbiddenValueLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"rationalFracForbiddenValueLimit.d.ts","sourceRoot":"","sources":["../../../src/exercises/limits/rationalFracForbiddenValueLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAyEF,eAAO,MAAM,+BAA+B,EAAE,YAAY,CAAC,WAAW,CAarE,CAAC"}
|
|
@@ -3,11 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.rationalFracForbiddenValueLimit = void 0;
|
|
4
4
|
const exercise_1 = require("../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
-
const integer_1 = require("../../math/numbers/integer/integer");
|
|
7
6
|
const affine_1 = require("../../math/polynomials/affine");
|
|
8
7
|
const trinom_1 = require("../../math/polynomials/trinom");
|
|
9
|
-
const discreteSet_1 = require("../../math/sets/discreteSet");
|
|
10
|
-
const intervals_1 = require("../../math/sets/intervals/intervals");
|
|
11
8
|
const randint_1 = require("../../math/utils/random/randint");
|
|
12
9
|
const coinFlip_1 = require("../../utils/coinFlip");
|
|
13
10
|
const getSign = (nb) => {
|
|
@@ -16,9 +13,7 @@ const getSign = (nb) => {
|
|
|
16
13
|
const getSequenceRationalFracLimitQuestion = () => {
|
|
17
14
|
const polyDenum = new affine_1.Affine(1, (0, randint_1.randint)(-9, 10, [0]));
|
|
18
15
|
const forbiddenValue = -polyDenum.b;
|
|
19
|
-
const
|
|
20
|
-
const intervalStar = new intervals_1.Interval("[[-10;10]]").difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
|
|
21
|
-
const polyNum = trinom_1.TrinomConstructor.randomFactorized(intervalStar, interval, interval);
|
|
16
|
+
const polyNum = trinom_1.TrinomConstructor.randomFactorized(undefined, { excludes: [forbiddenValue] }, { excludes: [forbiddenValue] });
|
|
22
17
|
const numLimit = polyNum.calculate(-polyDenum.b);
|
|
23
18
|
const isRight = (0, coinFlip_1.coinFlip)();
|
|
24
19
|
const to = isRight ? `${forbiddenValue}` : `${forbiddenValue}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/matrices/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./matrixInversibilityDomain"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MathExercise } from "../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: string;
|
|
4
|
+
b: string;
|
|
5
|
+
c: string;
|
|
6
|
+
d: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const matrixInversibilityDomain: MathExercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=matrixInversibilityDomain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrixInversibilityDomain.d.ts","sourceRoot":"","sources":["../../../src/exercises/matrices/matrixInversibilityDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAyBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0FF,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,WAAW,CAY/D,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.matrixInversibilityDomain = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const matrix_1 = require("../../math/matrices/matrix");
|
|
7
|
+
const integer_1 = require("../../math/numbers/integer/integer");
|
|
8
|
+
const nombre_1 = require("../../math/numbers/nombre");
|
|
9
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
10
|
+
const infiniteNode_1 = require("../../tree/nodes/numbers/infiniteNode");
|
|
11
|
+
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
12
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
13
|
+
const substractNode_1 = require("../../tree/nodes/operators/substractNode");
|
|
14
|
+
const discreteSetNode_1 = require("../../tree/nodes/sets/discreteSetNode");
|
|
15
|
+
const intervalNode_1 = require("../../tree/nodes/sets/intervalNode");
|
|
16
|
+
const unionIntervalNode_1 = require("../../tree/nodes/sets/unionIntervalNode");
|
|
17
|
+
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
18
|
+
const latexParser_1 = require("../../tree/parsers/latexParser");
|
|
19
|
+
const intervalKeys_1 = require("../utils/keys/intervalKeys");
|
|
20
|
+
const getMatrixInversibilityDomainQuestion = () => {
|
|
21
|
+
const elements = [[], []];
|
|
22
|
+
for (let i = 0; i < 2; i++) {
|
|
23
|
+
for (let j = 0; j < 2; j++) {
|
|
24
|
+
elements[i][j] = nombre_1.NombreConstructor.random({
|
|
25
|
+
types: [nombre_1.NumberType.Integer, nombre_1.NumberType.Rational],
|
|
26
|
+
excludes: i === 0 && j === 0 ? [new integer_1.Integer(0)] : undefined,
|
|
27
|
+
}).toTree();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const matrix = new matrix_1.Matrix([
|
|
31
|
+
[new multiplyNode_1.MultiplyNode(elements[0][0], new variableNode_1.VariableNode("x")), elements[0][1]],
|
|
32
|
+
elements[1],
|
|
33
|
+
]);
|
|
34
|
+
// si d=0 & (b|c)=0 alors det = 0 sur R donc non inversible sur R
|
|
35
|
+
// sinon si d=0, inversible sur R
|
|
36
|
+
// sinon x = bc /ad et inversible sur R\x
|
|
37
|
+
const isDZero = elements[1][1].evaluate({}) === 0;
|
|
38
|
+
const isBorCZero = elements[0][1].evaluate({}) === 0 || elements[1][0].evaluate({}) === 0;
|
|
39
|
+
const x = isDZero
|
|
40
|
+
? undefined
|
|
41
|
+
: new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(elements[0][1], elements[1][0]), new multiplyNode_1.MultiplyNode(elements[0][0], elements[1][1])).simplify();
|
|
42
|
+
const answer = isDZero && isBorCZero
|
|
43
|
+
? discreteSetNode_1.EmptySet.toTex()
|
|
44
|
+
: isDZero
|
|
45
|
+
? "\\mathbb{R}"
|
|
46
|
+
: new unionIntervalNode_1.UnionIntervalNode([
|
|
47
|
+
new intervalNode_1.IntervalNode(infiniteNode_1.MinusInfinityNode, x, intervalNode_1.ClosureType.OO),
|
|
48
|
+
new intervalNode_1.IntervalNode(x, infiniteNode_1.PlusInfinityNode, intervalNode_1.ClosureType.OO),
|
|
49
|
+
]).toTex();
|
|
50
|
+
const question = {
|
|
51
|
+
answer,
|
|
52
|
+
instruction: `Soit $M = ${matrix.toTex()}$, où $x\\in \\mathbb{R}$. Sur quel ensemble la matrice $M$ est-elle inversible ?
|
|
53
|
+
`,
|
|
54
|
+
keys: intervalKeys_1.intervalKeys,
|
|
55
|
+
answerFormat: "tex",
|
|
56
|
+
identifiers: {
|
|
57
|
+
a: elements[0][0].toTex(),
|
|
58
|
+
b: elements[0][1].toTex(),
|
|
59
|
+
c: elements[1][0].toTex(),
|
|
60
|
+
d: elements[1][1].toTex(),
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
return question;
|
|
64
|
+
};
|
|
65
|
+
const getPropositions = (n, { answer, a, b, c, d }) => {
|
|
66
|
+
const propositions = [];
|
|
67
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
68
|
+
const aTree = (0, latexParser_1.parseLatex)(a);
|
|
69
|
+
const bTree = (0, latexParser_1.parseLatex)(b);
|
|
70
|
+
const cTree = (0, latexParser_1.parseLatex)(c);
|
|
71
|
+
const dTree = (0, latexParser_1.parseLatex)(d);
|
|
72
|
+
const det = new substractNode_1.SubstractNode(new multiplyNode_1.MultiplyNode(aTree, dTree), new multiplyNode_1.MultiplyNode(bTree, cTree)).simplify();
|
|
73
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, unionIntervalNode_1.UnionIntervalNodeBuilder.realMinus(det).toTex());
|
|
74
|
+
while (propositions.length < n) {
|
|
75
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, unionIntervalNode_1.UnionIntervalNodeBuilder.realMinus((0, randint_1.randint)(-10, 10).toTree()).toTex());
|
|
76
|
+
}
|
|
77
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
78
|
+
};
|
|
79
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
80
|
+
return ans === answer;
|
|
81
|
+
};
|
|
82
|
+
exports.matrixInversibilityDomain = {
|
|
83
|
+
id: "matrixInversibilityDomain",
|
|
84
|
+
label: "Déterminer le domaine d'inversibilité d'une matrice",
|
|
85
|
+
levels: ["MathExp"],
|
|
86
|
+
isSingleStep: true,
|
|
87
|
+
sections: ["Matrices"],
|
|
88
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMatrixInversibilityDomainQuestion, nb),
|
|
89
|
+
qcmTimer: 60,
|
|
90
|
+
freeTimer: 60,
|
|
91
|
+
getPropositions,
|
|
92
|
+
isAnswerValid,
|
|
93
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { MathExercise } from "../../../exercises/exercise";
|
|
2
|
+
import { ClosureType } from "../../../tree/nodes/sets/intervalNode";
|
|
2
3
|
type Identifiers = {
|
|
3
4
|
isIntervalToInequality: boolean;
|
|
4
|
-
|
|
5
|
+
intervalMin: number;
|
|
6
|
+
intervalMax: number;
|
|
7
|
+
intervalClosure: ClosureType;
|
|
5
8
|
};
|
|
6
9
|
export declare const inequalityToInterval: MathExercise<Identifiers>;
|
|
7
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inequalityToInterval.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sets/intervals/inequalityToInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"inequalityToInterval.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sets/intervals/inequalityToInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AASlC,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAKjE,KAAK,WAAW,GAAG;IACjB,sBAAsB,EAAE,OAAO,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,WAAW,CAAC;CAC9B,CAAC;AA8KF,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,WAAW,CAa1D,CAAC"}
|
|
@@ -38,12 +38,14 @@ const getInequalityToIntervalQuestion = () => {
|
|
|
38
38
|
answerFormat: "tex",
|
|
39
39
|
identifiers: {
|
|
40
40
|
isIntervalToInequality: isIntervalToInequality,
|
|
41
|
-
|
|
41
|
+
intervalMin: interval.min,
|
|
42
|
+
intervalMax: interval.max,
|
|
43
|
+
intervalClosure: interval.closure,
|
|
42
44
|
},
|
|
43
45
|
};
|
|
44
46
|
return question;
|
|
45
47
|
};
|
|
46
|
-
const getPropositions = (n, { answer, isIntervalToInequality,
|
|
48
|
+
const getPropositions = (n, { answer, isIntervalToInequality, intervalClosure, intervalMax, intervalMin }) => {
|
|
47
49
|
const reverseBracket = (bracket) => {
|
|
48
50
|
return bracket === "[" ? "]" : "[";
|
|
49
51
|
};
|
|
@@ -65,7 +67,7 @@ const getPropositions = (n, { answer, isIntervalToInequality, intervalTex }) =>
|
|
|
65
67
|
return "<";
|
|
66
68
|
return "\\le";
|
|
67
69
|
};
|
|
68
|
-
const interval = new intervals_1.Interval(
|
|
70
|
+
const interval = new intervals_1.Interval(intervalMin.toTree(), intervalMax.toTree(), intervalClosure);
|
|
69
71
|
const propositions = [];
|
|
70
72
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
71
73
|
const xNode = new variableNode_1.VariableNode("x");
|
|
@@ -117,17 +119,18 @@ const getPropositions = (n, { answer, isIntervalToInequality, intervalTex }) =>
|
|
|
117
119
|
}
|
|
118
120
|
return (0, shuffle_1.shuffle)(propositions);
|
|
119
121
|
};
|
|
120
|
-
const isAnswerValid = (ans, {
|
|
121
|
-
const interval = new intervals_1.Interval(
|
|
122
|
-
console.log(interval.toTex());
|
|
122
|
+
const isAnswerValid = (ans, { intervalClosure, intervalMax, intervalMin, isIntervalToInequality }) => {
|
|
123
|
+
const interval = new intervals_1.Interval(intervalMin.toTree(), intervalMax.toTree(), intervalClosure).toTree();
|
|
124
|
+
console.log("int", interval.toTex());
|
|
123
125
|
const inequality = interval.toInequality();
|
|
124
126
|
const answer = isIntervalToInequality
|
|
125
127
|
? inequality
|
|
126
128
|
: new belongsNode_1.BelongsNode(new variableNode_1.VariableNode("x"), interval, {
|
|
127
129
|
allowRawRightChildAsSolution: true,
|
|
128
130
|
});
|
|
131
|
+
console.log("ans", answer);
|
|
129
132
|
const texs = answer.toAllValidTexs();
|
|
130
|
-
console.log(texs);
|
|
133
|
+
console.log("texs", texs);
|
|
131
134
|
return texs.includes(ans);
|
|
132
135
|
};
|
|
133
136
|
exports.inequalityToInterval = {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { MathExercise } from "../../../exercises/exercise";
|
|
2
|
+
import { ClosureType } from "../../../tree/nodes/sets/intervalNode";
|
|
2
3
|
type Identifiers = {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
int1Min: number;
|
|
5
|
+
int1Max: number;
|
|
6
|
+
int1Closure: ClosureType;
|
|
7
|
+
int2Min: number;
|
|
8
|
+
int2Max: number;
|
|
9
|
+
int2Closure: ClosureType;
|
|
5
10
|
};
|
|
6
11
|
export declare const intervalsIntersection: MathExercise<Identifiers>;
|
|
7
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalsIntersection.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sets/intervals/intervalsIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"intervalsIntersection.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sets/intervals/intervalsIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAGjE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAwDF,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,WAAW,CAa3D,CAAC"}
|
|
@@ -22,15 +22,22 @@ const getIntervalsIntersectionQuestion = () => {
|
|
|
22
22
|
"cap",
|
|
23
23
|
],
|
|
24
24
|
answerFormat: "tex",
|
|
25
|
-
identifiers: {
|
|
25
|
+
identifiers: {
|
|
26
|
+
int1Closure: int1.closure,
|
|
27
|
+
int1Max: int1.max,
|
|
28
|
+
int1Min: int1.min,
|
|
29
|
+
int2Closure: int2.closure,
|
|
30
|
+
int2Max: int2.max,
|
|
31
|
+
int2Min: int2.min,
|
|
32
|
+
},
|
|
26
33
|
};
|
|
27
34
|
return question;
|
|
28
35
|
};
|
|
29
|
-
const getPropositions = (n, { answer,
|
|
36
|
+
const getPropositions = (n, { answer, int1Closure, int1Max, int1Min, int2Closure, int2Max, int2Min }) => {
|
|
30
37
|
const propositions = [];
|
|
31
38
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
32
|
-
const int1 = new intervals_1.Interval(
|
|
33
|
-
const int2 = new intervals_1.Interval(
|
|
39
|
+
const int1 = new intervals_1.Interval(int1Min.toTree(), int1Max.toTree(), int1Closure);
|
|
40
|
+
const int2 = new intervals_1.Interval(int2Min.toTree(), int2Max.toTree(), int2Closure);
|
|
34
41
|
(0, exercise_1.tryToAddWrongProp)(propositions, int1.union(int2).tex);
|
|
35
42
|
while (propositions.length < n) {
|
|
36
43
|
const wrongAnswer = intervals_1.IntervalConstructor.random().tex;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { MathExercise } from "../../../exercises/exercise";
|
|
2
|
+
import { ClosureType } from "../../../tree/nodes/sets/intervalNode";
|
|
2
3
|
type Identifiers = {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
int1Min: number;
|
|
5
|
+
int1Max: number;
|
|
6
|
+
int1Closure: ClosureType;
|
|
7
|
+
int2Min: number;
|
|
8
|
+
int2Max: number;
|
|
9
|
+
int2Closure: ClosureType;
|
|
5
10
|
};
|
|
6
11
|
export declare const intervalsUnion: MathExercise<Identifiers>;
|
|
7
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalsUnion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sets/intervals/intervalsUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"intervalsUnion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sets/intervals/intervalsUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAGjE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AA6CF,eAAO,MAAM,cAAc,EAAE,YAAY,CAAC,WAAW,CAapD,CAAC"}
|
|
@@ -14,15 +14,22 @@ const getIntervalsUnionQuestion = () => {
|
|
|
14
14
|
instruction: `Soit $I = ${int1.tex}$ et $J = ${int2.tex}$. Déterminer $I\\cup J$.`,
|
|
15
15
|
keys: ["infty", "lbracket", "rbracket", "semicolon", "cup", "cap"],
|
|
16
16
|
answerFormat: "tex",
|
|
17
|
-
identifiers: {
|
|
17
|
+
identifiers: {
|
|
18
|
+
int1Closure: int1.closure,
|
|
19
|
+
int1Max: int1.max,
|
|
20
|
+
int1Min: int1.min,
|
|
21
|
+
int2Closure: int2.closure,
|
|
22
|
+
int2Max: int2.max,
|
|
23
|
+
int2Min: int2.min,
|
|
24
|
+
},
|
|
18
25
|
};
|
|
19
26
|
return question;
|
|
20
27
|
};
|
|
21
|
-
const getPropositions = (n, { answer,
|
|
28
|
+
const getPropositions = (n, { answer, int1Closure, int1Max, int1Min, int2Closure, int2Max, int2Min }) => {
|
|
22
29
|
const propositions = [];
|
|
23
30
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
24
|
-
const int1 = new intervals_1.Interval(
|
|
25
|
-
const int2 = new intervals_1.Interval(
|
|
31
|
+
const int1 = new intervals_1.Interval(int1Min.toTree(), int1Max.toTree(), int1Closure);
|
|
32
|
+
const int2 = new intervals_1.Interval(int2Min.toTree(), int2Max.toTree(), int2Closure);
|
|
26
33
|
(0, exercise_1.tryToAddWrongProp)(propositions, int1.intersection(int2).tex);
|
|
27
34
|
while (propositions.length < n) {
|
|
28
35
|
const wrongAnswer = intervals_1.IntervalConstructor.random().tex;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intervalKeys.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/keys/intervalKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,eAAO,MAAM,YAAY,EAAE,KAAK,EAM/B,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Number {
|
|
3
|
+
toTree: () => AlgebraicNode;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
import { AlgebraicNode } from "./tree/nodes/algebraicNode";
|
|
1
7
|
declare const mathExercises: (import("./exercises/exercise").MathExercise<{
|
|
2
8
|
chosenNumbers: number[];
|
|
3
9
|
}> | import("./exercises/exercise").MathExercise<{
|
|
@@ -32,6 +38,38 @@ declare const mathExercises: (import("./exercises/exercise").MathExercise<{
|
|
|
32
38
|
rationalNum: [number, number];
|
|
33
39
|
rationalDenum: [number, number];
|
|
34
40
|
}> | import("./exercises/exercise").MathExercise<{
|
|
41
|
+
/**
|
|
42
|
+
* TODO
|
|
43
|
+
* Décimal : permettre facilement -0.xxx
|
|
44
|
+
* Tree shaking export
|
|
45
|
+
*
|
|
46
|
+
* VEA:
|
|
47
|
+
* -> -3x est bien transofmré en -3*x, x*(-3) mais pas en -x*3
|
|
48
|
+
* ->> faire le meme delire que pour les power mais pour les opposite ?
|
|
49
|
+
* c'est à dire créer toutes les permuts en déplacant le moins qquepart
|
|
50
|
+
* -> faire des nodes pour les Ensembles de nombre
|
|
51
|
+
*
|
|
52
|
+
* !-> choses pour lesquelles la v1 ne marchera pas :
|
|
53
|
+
* !-- fractions non réduites
|
|
54
|
+
* !-- nbs décimaux avec des 0
|
|
55
|
+
* !-- nb quelconque de moins, genre -3*-4 ou -x/-y
|
|
56
|
+
* !-> pour ces choses là il faut obligatoirement parser la rpéonse élève ?
|
|
57
|
+
*
|
|
58
|
+
* Passer les sqrtNode en tree-iable
|
|
59
|
+
*
|
|
60
|
+
*
|
|
61
|
+
*
|
|
62
|
+
* !!!à fix :
|
|
63
|
+
* ! fraction réductible
|
|
64
|
+
* ! 0,20 au lieu de 0,2
|
|
65
|
+
* ! moins partout dans fraction
|
|
66
|
+
* !puissances négatives vers inverse fraction
|
|
67
|
+
* ! simplification du ln
|
|
68
|
+
* ! meileure gestion des [] : le clavier devriat pouvoir produire des left/right ;
|
|
69
|
+
* !aussi en tapant [ puis diviser, le crochet passe en numérateur
|
|
70
|
+
* ! espace tous les 3 chiffres dans un nb (le clavier doit le fournir aussi!)
|
|
71
|
+
|
|
72
|
+
*/
|
|
35
73
|
rational: [number, number];
|
|
36
74
|
rational2: [number, number];
|
|
37
75
|
}> | import("./exercises/exercise").MathExercise<{
|
|
@@ -453,6 +491,38 @@ declare const mathExercises: (import("./exercises/exercise").MathExercise<{
|
|
|
453
491
|
signs: number[];
|
|
454
492
|
isLog10: boolean;
|
|
455
493
|
}> | import("./exercises/exercise").MathExercise<{
|
|
494
|
+
/**
|
|
495
|
+
* TODO
|
|
496
|
+
* Décimal : permettre facilement -0.xxx
|
|
497
|
+
* Tree shaking export
|
|
498
|
+
*
|
|
499
|
+
* VEA:
|
|
500
|
+
* -> -3x est bien transofmré en -3*x, x*(-3) mais pas en -x*3
|
|
501
|
+
* ->> faire le meme delire que pour les power mais pour les opposite ?
|
|
502
|
+
* c'est à dire créer toutes les permuts en déplacant le moins qquepart
|
|
503
|
+
* -> faire des nodes pour les Ensembles de nombre
|
|
504
|
+
*
|
|
505
|
+
* !-> choses pour lesquelles la v1 ne marchera pas :
|
|
506
|
+
* !-- fractions non réduites
|
|
507
|
+
* !-- nbs décimaux avec des 0
|
|
508
|
+
* !-- nb quelconque de moins, genre -3*-4 ou -x/-y
|
|
509
|
+
* !-> pour ces choses là il faut obligatoirement parser la rpéonse élève ?
|
|
510
|
+
*
|
|
511
|
+
* Passer les sqrtNode en tree-iable
|
|
512
|
+
*
|
|
513
|
+
*
|
|
514
|
+
*
|
|
515
|
+
* !!!à fix :
|
|
516
|
+
* ! fraction réductible
|
|
517
|
+
* ! 0,20 au lieu de 0,2
|
|
518
|
+
* ! moins partout dans fraction
|
|
519
|
+
* !puissances négatives vers inverse fraction
|
|
520
|
+
* ! simplification du ln
|
|
521
|
+
* ! meileure gestion des [] : le clavier devriat pouvoir produire des left/right ;
|
|
522
|
+
* !aussi en tapant [ puis diviser, le crochet passe en numérateur
|
|
523
|
+
* ! espace tous les 3 chiffres dans un nb (le clavier doit le fournir aussi!)
|
|
524
|
+
|
|
525
|
+
*/
|
|
456
526
|
coin: boolean;
|
|
457
527
|
radius: number;
|
|
458
528
|
diametre: number;
|
|
@@ -588,6 +658,11 @@ declare const mathExercises: (import("./exercises/exercise").MathExercise<{
|
|
|
588
658
|
to: string;
|
|
589
659
|
from: string | undefined;
|
|
590
660
|
a: number | undefined;
|
|
661
|
+
}> | import("./exercises/exercise").MathExercise<{
|
|
662
|
+
a: string;
|
|
663
|
+
b: string;
|
|
664
|
+
c: string;
|
|
665
|
+
d: string;
|
|
591
666
|
}> | import("./exercises/exercise").MathExercise<{
|
|
592
667
|
randNbr: number;
|
|
593
668
|
randPercent: number;
|
|
@@ -596,7 +671,38 @@ declare const mathExercises: (import("./exercises/exercise").MathExercise<{
|
|
|
596
671
|
rate: number;
|
|
597
672
|
nbMois: number;
|
|
598
673
|
}> | import("./exercises/exercise").MathExercise<{
|
|
599
|
-
isFromEvolutionToCM: boolean;
|
|
674
|
+
isFromEvolutionToCM: boolean; /**
|
|
675
|
+
* TODO
|
|
676
|
+
* Décimal : permettre facilement -0.xxx
|
|
677
|
+
* Tree shaking export
|
|
678
|
+
*
|
|
679
|
+
* VEA:
|
|
680
|
+
* -> -3x est bien transofmré en -3*x, x*(-3) mais pas en -x*3
|
|
681
|
+
* ->> faire le meme delire que pour les power mais pour les opposite ?
|
|
682
|
+
* c'est à dire créer toutes les permuts en déplacant le moins qquepart
|
|
683
|
+
* -> faire des nodes pour les Ensembles de nombre
|
|
684
|
+
*
|
|
685
|
+
* !-> choses pour lesquelles la v1 ne marchera pas :
|
|
686
|
+
* !-- fractions non réduites
|
|
687
|
+
* !-- nbs décimaux avec des 0
|
|
688
|
+
* !-- nb quelconque de moins, genre -3*-4 ou -x/-y
|
|
689
|
+
* !-> pour ces choses là il faut obligatoirement parser la rpéonse élève ?
|
|
690
|
+
*
|
|
691
|
+
* Passer les sqrtNode en tree-iable
|
|
692
|
+
*
|
|
693
|
+
*
|
|
694
|
+
*
|
|
695
|
+
* !!!à fix :
|
|
696
|
+
* ! fraction réductible
|
|
697
|
+
* ! 0,20 au lieu de 0,2
|
|
698
|
+
* ! moins partout dans fraction
|
|
699
|
+
* !puissances négatives vers inverse fraction
|
|
700
|
+
* ! simplification du ln
|
|
701
|
+
* ! meileure gestion des [] : le clavier devriat pouvoir produire des left/right ;
|
|
702
|
+
* !aussi en tapant [ puis diviser, le crochet passe en numérateur
|
|
703
|
+
* ! espace tous les 3 chiffres dans un nb (le clavier doit le fournir aussi!)
|
|
704
|
+
|
|
705
|
+
*/
|
|
600
706
|
evolution: number;
|
|
601
707
|
}> | import("./exercises/exercise").MathExercise<{
|
|
602
708
|
evolutions: string[];
|
|
@@ -760,13 +866,23 @@ declare const mathExercises: (import("./exercises/exercise").MathExercise<{
|
|
|
760
866
|
coeffs: number[];
|
|
761
867
|
}> | import("./exercises/exercise").MathExercise<{
|
|
762
868
|
isIntervalToInequality: boolean;
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
869
|
+
intervalMin: number;
|
|
870
|
+
intervalMax: number;
|
|
871
|
+
intervalClosure: import("./tree/nodes/sets/intervalNode").ClosureType;
|
|
872
|
+
}> | import("./exercises/exercise").MathExercise<{
|
|
873
|
+
int1Min: number;
|
|
874
|
+
int1Max: number;
|
|
875
|
+
int1Closure: import("./tree/nodes/sets/intervalNode").ClosureType;
|
|
876
|
+
int2Min: number;
|
|
877
|
+
int2Max: number;
|
|
878
|
+
int2Closure: import("./tree/nodes/sets/intervalNode").ClosureType;
|
|
879
|
+
}> | import("./exercises/exercise").MathExercise<{
|
|
880
|
+
int1Min: number;
|
|
881
|
+
int1Max: number;
|
|
882
|
+
int1Closure: import("./tree/nodes/sets/intervalNode").ClosureType;
|
|
883
|
+
int2Min: number;
|
|
884
|
+
int2Max: number;
|
|
885
|
+
int2Closure: import("./tree/nodes/sets/intervalNode").ClosureType;
|
|
770
886
|
}> | import("./exercises/exercise").MathExercise<{
|
|
771
887
|
type: number;
|
|
772
888
|
nb: string;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;KAC7B;CACF;AA6CD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAtCnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA/BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCA/BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAO4C,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -24,6 +24,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.mathExercises = void 0;
|
|
27
|
+
// import { exercises } from "./exercises/exercises";
|
|
28
|
+
const numberNode_1 = require("./tree/nodes/numbers/numberNode");
|
|
29
|
+
Number.prototype.toTree = function () {
|
|
30
|
+
const value = this.valueOf();
|
|
31
|
+
if (value === Infinity)
|
|
32
|
+
return infiniteNode_1.PlusInfinityNode;
|
|
33
|
+
if (value === -Infinity)
|
|
34
|
+
return infiniteNode_1.MinusInfinityNode;
|
|
35
|
+
return new numberNode_1.NumberNode(value);
|
|
36
|
+
};
|
|
27
37
|
/**
|
|
28
38
|
* TODO
|
|
29
39
|
* Décimal : permettre facilement -0.xxx
|
|
@@ -57,5 +67,6 @@ exports.mathExercises = void 0;
|
|
|
57
67
|
|
|
58
68
|
*/
|
|
59
69
|
const Exercises = __importStar(require("./exercises"));
|
|
70
|
+
const infiniteNode_1 = require("./tree/nodes/numbers/infiniteNode");
|
|
60
71
|
const mathExercises = Object.values(Exercises);
|
|
61
72
|
exports.mathExercises = mathExercises;
|
|
@@ -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":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,8BAAsB,gBAAgB;IACpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAMlC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE;CAevC;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;IAM5B,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO;IAGzB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK;CAK7B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AlgebraicNode } from "../../tree/nodes/algebraicNode";
|
|
2
|
+
export declare class Matrix {
|
|
3
|
+
elements: AlgebraicNode[][];
|
|
4
|
+
rows: number;
|
|
5
|
+
columns: number;
|
|
6
|
+
constructor(elements: AlgebraicNode[][]);
|
|
7
|
+
determinant(): AlgebraicNode;
|
|
8
|
+
toTex(): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=matrix.d.ts.map
|