math-exercises 2.2.63 → 2.2.65
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/math/derivation/tangent/derivativeTangentEquationReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +6 -1
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +1 -1
- package/lib/exercises/math/functions/square/squareImageInterval.js +1 -1
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +1 -1
- package/lib/exercises/math/functions/trinoms/findSecondRoot.js +1 -1
- package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.js +1 -1
- package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/conditionalProbability.js +2 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.js +2 -1
- package/lib/index.d.ts +539 -538
- package/lib/index.d.ts.map +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +10 -4
- package/lib/tree/nodes/node.d.ts +2 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +5 -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 +20 -6
- package/lib/tree/parsers/latexParser.js +1 -0
- package/lib/tree/parsers/rationalParser.d.ts.map +1 -1
- package/lib/tree/parsers/rationalParser.js +4 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAwBlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA+PF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAmBlE,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
|
|
@@ -64,8 +64,13 @@ const getAnswerTree = ({ xA, yA, yPrimeA }) => {
|
|
|
64
64
|
const pente = new multiplyNode_1.MultiplyNode(yPrimeTree, "x".toTree());
|
|
65
65
|
//f(a)-f'(a)a
|
|
66
66
|
const b = new substractNode_1.SubstractNode(yA.toTree(), new multiplyNode_1.MultiplyNode(yPrimeTree, xA.toTree())).simplify();
|
|
67
|
-
const
|
|
67
|
+
// const yPrimeTree = frac(-3, 2);
|
|
68
|
+
// const pente = multiply(yPrimeTree, "x");
|
|
69
|
+
// //f(a)-f'(a)a
|
|
70
|
+
// const b = substract((-2).toTree(), multiply(yPrimeTree, -3)).simplify();
|
|
71
|
+
const ansTree = (0, addNode_1.add)(pente, b).simplify({
|
|
68
72
|
forceDistributeFractions: true,
|
|
73
|
+
forbidFactorize: true,
|
|
69
74
|
});
|
|
70
75
|
return ansTree;
|
|
71
76
|
};
|
|
@@ -22,7 +22,7 @@ const getPropositions = (n, { answer }) => {
|
|
|
22
22
|
const bounds = isTowardsLeft
|
|
23
23
|
? [infiniteNode_1.MinusInfinityNode, k]
|
|
24
24
|
: [k, infiniteNode_1.PlusInfinityNode];
|
|
25
|
-
const closure = closure_1.Closure.fromBrackets(isTowardsLeft ? "]" : "[", (0, random_1.random)(["]", "["]));
|
|
25
|
+
const closure = closure_1.Closure.fromBrackets(isTowardsLeft ? "]" : (0, random_1.random)(["]", "["]), isTowardsLeft ? (0, random_1.random)(["]", "["]) : "[");
|
|
26
26
|
(0, exercise_1.tryToAddWrongProp)(propositions, new intervalNode_1.IntervalNode(bounds[0], bounds[1], closure).toTex());
|
|
27
27
|
}
|
|
28
28
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
@@ -92,7 +92,7 @@ const getPropositions = (n, { answer, a, b, type, closure }) => {
|
|
|
92
92
|
};
|
|
93
93
|
const isAnswerValid = (ans, { answer, a, b, closure, type }) => {
|
|
94
94
|
const interval = getAnswer(a, b, type, closure);
|
|
95
|
-
const texs = interval.toAllValidTexs();
|
|
95
|
+
const texs = interval.toAllValidTexs({ allowCommaInInterval: true });
|
|
96
96
|
return texs.includes(ans);
|
|
97
97
|
};
|
|
98
98
|
exports.squareImageInterval = {
|
|
@@ -117,7 +117,7 @@ const getCoefficientsIdentificationQuestion = () => {
|
|
|
117
117
|
exports.coefficientsIdentification = {
|
|
118
118
|
id: "coefficientsIdentification",
|
|
119
119
|
connector: "=",
|
|
120
|
-
label: "Reconnaître les coefficients d'un trinôme exprimé sous forme développée",
|
|
120
|
+
label: "Reconnaître les coefficients $a$, $b$ et $c$ d'un trinôme exprimé sous forme développée",
|
|
121
121
|
isSingleStep: true,
|
|
122
122
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCoefficientsIdentificationQuestion, nb),
|
|
123
123
|
qcmTimer: 60,
|
|
@@ -80,7 +80,7 @@ const getFindSecondRootQuestion = (ops) => {
|
|
|
80
80
|
// const firstRoot = coinFlip()
|
|
81
81
|
// ? randint(-10, 10).toTree()
|
|
82
82
|
// : RationalConstructor.randomIrreductibleWithSign(5).toTree();
|
|
83
|
-
const firstRoot = (0, randint_1.randint)(-10, 10);
|
|
83
|
+
const firstRoot = (0, randint_1.randint)(-10, 10, [0]);
|
|
84
84
|
// const secondRoot = doWhile(
|
|
85
85
|
// () =>
|
|
86
86
|
// coinFlip()
|
|
@@ -57,7 +57,7 @@ const getCorrection = (identifiers) => {
|
|
|
57
57
|
"=",
|
|
58
58
|
new fractionNode_1.FractionNode(identifiers.perimeter.toTree(), new multiplyNode_1.MultiplyNode((2).toTree(), piNode_1.PiNode)).toTex(),
|
|
59
59
|
],
|
|
60
|
-
["", "\\
|
|
60
|
+
["", "\\approx", getAnswer(identifiers)],
|
|
61
61
|
])}
|
|
62
62
|
`;
|
|
63
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditionalProbability.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/conditionalProbability.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"conditionalProbability.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/conditionalProbability.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAMxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAyNF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -7,6 +7,7 @@ const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
|
|
|
7
7
|
const round_1 = require("../../../math/utils/round");
|
|
8
8
|
const shuffle_1 = require("../../../utils/alea/shuffle");
|
|
9
9
|
const alignTex_1 = require("../../../utils/latex/alignTex");
|
|
10
|
+
const numberVEA_1 = require("../../../exercises/vea/numberVEA");
|
|
10
11
|
const getConditionalProbability = () => {
|
|
11
12
|
let pA, pB, pAB, pA_B, pB_A;
|
|
12
13
|
let pAStr, pBStr, pABStr, pA_BStr, pB_AStr;
|
|
@@ -199,7 +200,7 @@ const getPropositions = (n, { answer }) => {
|
|
|
199
200
|
return (0, shuffle_1.shuffle)(propositions);
|
|
200
201
|
};
|
|
201
202
|
const isAnswerValid = (ans, { answer }) => {
|
|
202
|
-
return ans
|
|
203
|
+
return (0, numberVEA_1.numberVEA)(ans, answer);
|
|
203
204
|
};
|
|
204
205
|
exports.conditionalProbability = {
|
|
205
206
|
id: "conditionalProbability",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0EF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.averageList = void 0;
|
|
4
4
|
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const numberVEA_1 = require("../../../../exercises/vea/numberVEA");
|
|
6
7
|
const randfloat_1 = require("../../../../math/utils/random/randfloat");
|
|
7
8
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
9
|
const round_1 = require("../../../../math/utils/round");
|
|
@@ -62,7 +63,7 @@ const getPropositions = (n, { answer, sortedValues }) => {
|
|
|
62
63
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
63
64
|
};
|
|
64
65
|
const isAnswerValid = (ans, { answer }) => {
|
|
65
|
-
return ans
|
|
66
|
+
return (0, numberVEA_1.numberVEA)(ans, answer);
|
|
66
67
|
};
|
|
67
68
|
exports.averageList = {
|
|
68
69
|
id: "averageList",
|