math-exercises 3.0.189 → 3.0.191
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/calcul/decimals/decimalFractionToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/calcul/decimals/decimalFractionToDecimal.js +5 -4
- package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/factorizeEquation.js +9 -8
- package/lib/exercises/math/calculLitteral/equation/isEqualityTrue.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/isEqualityTrue.js +7 -6
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +5 -4
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts +6 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.js +5 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotBuildScatterPlotFromDataTable.d.ts +12 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotBuildScatterPlotFromDataTable.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotBuildScatterPlotFromDataTable.js +206 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotCommenting.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotCommenting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotCommenting.js +210 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableFromScatterPlotData.d.ts +10 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableFromScatterPlotData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableFromScatterPlotData.js +252 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts +12 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.js +352 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.d.ts +11 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.js +403 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.js +3 -2
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.js +3 -2
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.js +3 -2
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +3 -2
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +3 -2
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +4 -3
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +4 -3
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +4 -3
- package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.js +3 -2
- package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.js +3 -2
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.js +8 -4
- package/lib/exercises/math/functions/affines/affineCompareTwoImagesFromVariations.d.ts +13 -0
- package/lib/exercises/math/functions/affines/affineCompareTwoImagesFromVariations.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineCompareTwoImagesFromVariations.js +205 -0
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.d.ts +9 -0
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.js +157 -0
- package/lib/exercises/math/functions/affines/affineVariations.d.ts +12 -0
- package/lib/exercises/math/functions/affines/affineVariations.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineVariations.js +176 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromGraph.d.ts +8 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromGraph.js +203 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromTwoImages.d.ts +12 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromTwoImages.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineVariationsFromTwoImages.js +259 -0
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.js +8 -6
- package/lib/exercises/math/functions/exponentials/estimateExponentialFunctionImageFromGeometricScatterplot.d.ts +2 -0
- package/lib/exercises/math/functions/exponentials/estimateExponentialFunctionImageFromGeometricScatterplot.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/estimateExponentialFunctionImageFromGeometricScatterplot.js +155 -0
- package/lib/exercises/math/functions/exponentials/exponentialFunctionImage.d.ts +9 -0
- package/lib/exercises/math/functions/exponentials/exponentialFunctionImage.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/exponentialFunctionImage.js +99 -0
- package/lib/exercises/math/functions/exponentials/exponentialsRawVariations.d.ts +8 -0
- package/lib/exercises/math/functions/exponentials/exponentialsRawVariations.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/exponentialsRawVariations.js +99 -0
- package/lib/exercises/math/functions/exponentials/index.d.ts +8 -0
- package/lib/exercises/math/functions/exponentials/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponentials/index.js +9 -0
- package/lib/exercises/math/functions/exponentials/plausibleExponentialFunctionExpressionFromGraph.d.ts +12 -0
- package/lib/exercises/math/functions/exponentials/plausibleExponentialFunctionExpressionFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/plausibleExponentialFunctionExpressionFromGraph.js +138 -0
- package/lib/exercises/math/functions/exponentials/readExponentialFunctionParamsOnGraph.d.ts +8 -0
- package/lib/exercises/math/functions/exponentials/readExponentialFunctionParamsOnGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/readExponentialFunctionParamsOnGraph.js +142 -0
- package/lib/exercises/math/functions/exponentials/realPowersFraction.d.ts +10 -0
- package/lib/exercises/math/functions/exponentials/realPowersFraction.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/realPowersFraction.js +125 -0
- package/lib/exercises/math/functions/exponentials/realPowersMixOperations.d.ts +12 -0
- package/lib/exercises/math/functions/exponentials/realPowersMixOperations.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/realPowersMixOperations.js +148 -0
- package/lib/exercises/math/functions/exponentials/realPowersPower.d.ts +10 -0
- package/lib/exercises/math/functions/exponentials/realPowersPower.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/realPowersPower.js +128 -0
- package/lib/exercises/math/functions/exponentials/realPowersProduct.d.ts +10 -0
- package/lib/exercises/math/functions/exponentials/realPowersProduct.d.ts.map +1 -0
- package/lib/exercises/math/functions/exponentials/realPowersProduct.js +128 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLineV2.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLineV2.js +7 -6
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.js +3 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.js +7 -6
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +5 -4
- package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicStats/calculateFrequencyInList.js +5 -4
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +7 -8
- package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/medianWithList.js +5 -4
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +9 -9
- package/lib/exercises/math/sequences/geometric/geometricFindNextTermFromTwoConsecutiveTerms.d.ts +12 -0
- package/lib/exercises/math/sequences/geometric/geometricFindNextTermFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindNextTermFromTwoConsecutiveTerms.js +217 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRecurrenceFormula.d.ts +10 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRecurrenceFormula.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRecurrenceFormula.js +186 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.d.ts +14 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.js +189 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts +2 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/index.js +1 -0
- package/lib/exercises/utils/options/arrayedOptions.d.ts +2 -0
- package/lib/exercises/utils/options/arrayedOptions.d.ts.map +1 -0
- package/lib/exercises/utils/options/arrayedOptions.js +16 -0
- package/lib/index.d.ts +33 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +20 -20
- package/lib/tree/nodes/algebraicNode.d.ts +3 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +5 -3
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +5 -3
- package/lib/tree/nodes/operators/powerNode.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getOptionFirstTermRankOneStuff, } from "../../../../exercises/options/optionFirstTermRankOne.js";
|
|
3
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
4
|
+
import { nodeBySubstitutingVar } from "../../../../math/utils/functions/functionComposition.js";
|
|
5
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
+
import { EqualNode } from "../../../../tree/nodes/equations/equalNode.js";
|
|
7
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
8
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
10
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
11
|
+
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
12
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
13
|
+
import { NodeComparator } from "../../../../tree/utilities/nodeComparator.js";
|
|
14
|
+
import { NodeRewriter } from "../../../../tree/utilities/nodeRewriter.js";
|
|
15
|
+
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
16
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
17
|
+
const getInstruction = (identifiers, optsIn) => {
|
|
18
|
+
const opts = optsIn ?? optsDefault;
|
|
19
|
+
const firstRank = opts.firstTermRankOne ? 1 : 0;
|
|
20
|
+
const { firstValue, reason } = identifiers;
|
|
21
|
+
return `$(u_n)$ est une suite géométrique de premier terme $u_{${firstRank}} = ${firstValue}$ et de raison $q = ${reason}$.
|
|
22
|
+
|
|
23
|
+
Donner la relation de récurrence de $(u_n)$.`;
|
|
24
|
+
};
|
|
25
|
+
const getAnswerNode = (identifiers) => {
|
|
26
|
+
const { reason } = identifiers;
|
|
27
|
+
const nodeFormula = multiply(new VariableNode("u_{n}"), reason);
|
|
28
|
+
const equalNode = new EqualNode(new VariableNode("u_{n+1}"), nodeFormula);
|
|
29
|
+
return equalNode;
|
|
30
|
+
};
|
|
31
|
+
const getAnswer = (identifiers) => {
|
|
32
|
+
return getAnswerNode(identifiers).toTex();
|
|
33
|
+
};
|
|
34
|
+
const getHint = () => {
|
|
35
|
+
return `Quelle est la formule qui relie deux termes consécutifs d'une suite géométrique ?
|
|
36
|
+
|
|
37
|
+
$$
|
|
38
|
+
u_{n+1} = ...
|
|
39
|
+
$$
|
|
40
|
+
|
|
41
|
+
`;
|
|
42
|
+
};
|
|
43
|
+
const getCorrection = (identifiers) => {
|
|
44
|
+
const { reason } = identifiers;
|
|
45
|
+
const answer = getAnswer(identifiers);
|
|
46
|
+
return `La relation de récurrence d'une suite géométrique de raison $q$ est :
|
|
47
|
+
|
|
48
|
+
$$
|
|
49
|
+
u_{n+1} = u_{n} \\ \\times \\ q
|
|
50
|
+
$$
|
|
51
|
+
|
|
52
|
+
Ici, puisque $q = ${reason}$, on a :
|
|
53
|
+
|
|
54
|
+
$$
|
|
55
|
+
${answer}
|
|
56
|
+
$$`;
|
|
57
|
+
};
|
|
58
|
+
const getPropositions = (n, { answer, reason, firstValue }, optsIn) => {
|
|
59
|
+
const opts = optsIn ?? optsDefault;
|
|
60
|
+
const firstRank = opts?.firstTermRankOne ? 1 : 0;
|
|
61
|
+
const propositions = [];
|
|
62
|
+
addValidProp(propositions, answer);
|
|
63
|
+
//student: no lhs
|
|
64
|
+
{
|
|
65
|
+
const texWrong = answer.replace("u_{n+1}=", "");
|
|
66
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
67
|
+
}
|
|
68
|
+
//student: geometric -> arithmetic
|
|
69
|
+
{
|
|
70
|
+
const nodeFormula = add(new VariableNode("u_{n}"), reason);
|
|
71
|
+
const texWrong = "u_{n+1}=" + nodeFormula.toTex();
|
|
72
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
73
|
+
//student: no lhs
|
|
74
|
+
{
|
|
75
|
+
tryToAddWrongProp(propositions, nodeFormula.toTex());
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//student: recurrence formula -> explicit formula
|
|
79
|
+
{
|
|
80
|
+
const nodeFormula = multiply(firstValue, power(reason, substract("n".toTree(), firstRank).simplify()));
|
|
81
|
+
const equalNode = new EqualNode("u_n".toTree(), nodeFormula);
|
|
82
|
+
tryToAddWrongProp(propositions, equalNode.toTex());
|
|
83
|
+
if (probaFlip(0.1)) {
|
|
84
|
+
const equalNode = new EqualNode("u_{n+1}".toTree(), nodeFormula);
|
|
85
|
+
tryToAddWrongProp(propositions, equalNode.toTex());
|
|
86
|
+
}
|
|
87
|
+
//student: no lhs
|
|
88
|
+
{
|
|
89
|
+
tryToAddWrongProp(propositions, nodeFormula.toTex());
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (probaFlip(0.9)) {
|
|
93
|
+
//student: swap(initial, reason)
|
|
94
|
+
{
|
|
95
|
+
const nodeFormula = multiply(firstValue, power(reason, new VariableNode("n")));
|
|
96
|
+
const texWrong = "u_n=" + nodeFormula.toTex();
|
|
97
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
//student: u_n = u_n * q
|
|
102
|
+
{
|
|
103
|
+
const texWrong = answer.replace("u_{n+1}", "u_{n}");
|
|
104
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return shuffleProps(propositions, n);
|
|
108
|
+
};
|
|
109
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
110
|
+
try {
|
|
111
|
+
//TODO faire fonctionner parseAlgebraic("u_n=3+2n") (token _ not implemented)
|
|
112
|
+
if (!ans.includes("=")) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
// const nodeAns = parseAlgebraic(ans);
|
|
116
|
+
const nodeAns = (() => {
|
|
117
|
+
const [lhs, rhs] = ans.split("=");
|
|
118
|
+
const lhsRefined = lhs.replace("u_{n+1}", "v");
|
|
119
|
+
const nodeLhs = lhsRefined.toTree();
|
|
120
|
+
const rhsRefined = rhs.replace("u_n", "u").replace("u_{n}", "u");
|
|
121
|
+
const nodeRhs = parseAlgebraic(rhsRefined);
|
|
122
|
+
return new EqualNode(nodeLhs, nodeRhs);
|
|
123
|
+
})();
|
|
124
|
+
const nodeAnswer = (() => {
|
|
125
|
+
const nodeAnswer = getAnswerNode(identifiers);
|
|
126
|
+
const nodeAnswerRefined = nodeBySubstitutingVar(nodeBySubstitutingVar(nodeAnswer, new VariableNode("v"), new VariableNode("u_{n+1}")), new VariableNode("u"), new VariableNode("u_{n}"));
|
|
127
|
+
return nodeAnswerRefined;
|
|
128
|
+
})();
|
|
129
|
+
const isValidLhs = () => nodeAns.leftChild.toTex() === nodeAnswer.leftChild.toTex();
|
|
130
|
+
const isValidRhs = () => {
|
|
131
|
+
const nodeAnsRhs = nodeAns.rightChild;
|
|
132
|
+
const nodeAnswerRhs = nodeAnswer.rightChild;
|
|
133
|
+
const isEquivalentFound = () => {
|
|
134
|
+
const nodeAns = nodeAnsRhs;
|
|
135
|
+
const nodeAnswer = nodeAnswerRhs;
|
|
136
|
+
const arrNodeAnswerEquivalent = NodeRewriter.getArrNodeEquivalent(nodeAnswer);
|
|
137
|
+
return arrNodeAnswerEquivalent.some((nodeAnswerRefined) => {
|
|
138
|
+
const isEqual = NodeComparator.isEqualViaFrac(nodeAns, nodeAnswerRefined);
|
|
139
|
+
return isEqual;
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
return isEquivalentFound();
|
|
143
|
+
};
|
|
144
|
+
return isValidLhs() && isValidRhs();
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
handleVEAError(e);
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
const getGeometricFindRecurrenceFormulaQuestion = () => {
|
|
152
|
+
const firstValue = randint(-10, 10, [0]);
|
|
153
|
+
const reason = randint(-10, 10, [0, 1, firstValue]);
|
|
154
|
+
const identifiers = { reason, firstValue };
|
|
155
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
156
|
+
};
|
|
157
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
158
|
+
const question = {
|
|
159
|
+
instruction: getInstruction(identifiers),
|
|
160
|
+
answer: getAnswer(identifiers),
|
|
161
|
+
keys: ["un", "unplus1", "equal", "n"],
|
|
162
|
+
answerFormat: "tex",
|
|
163
|
+
identifiers,
|
|
164
|
+
hint: getHint(identifiers),
|
|
165
|
+
correction: getCorrection(identifiers),
|
|
166
|
+
};
|
|
167
|
+
return question;
|
|
168
|
+
};
|
|
169
|
+
const { optsDefaultFirstTermRankOne, generatorOptionFirstTermRankOne } = getOptionFirstTermRankOneStuff(false);
|
|
170
|
+
const optsDefault = Object.assign({}, optsDefaultFirstTermRankOne);
|
|
171
|
+
const options = [generatorOptionFirstTermRankOne];
|
|
172
|
+
export const geometricFindRecurrenceFormula = {
|
|
173
|
+
id: "geometricFindRecurrenceFormula",
|
|
174
|
+
connector: "=",
|
|
175
|
+
label: "Déterminer la relation de récurrence d'une suite géométrique à partir de la raison et de $u_0$",
|
|
176
|
+
isSingleStep: false,
|
|
177
|
+
generator: (nb, opts) => getDistinctQuestions(() => getGeometricFindRecurrenceFormulaQuestion(opts), nb),
|
|
178
|
+
options,
|
|
179
|
+
qcmTimer: 60,
|
|
180
|
+
freeTimer: 60,
|
|
181
|
+
getPropositions,
|
|
182
|
+
isAnswerValid,
|
|
183
|
+
subject: "Mathématiques",
|
|
184
|
+
hasHintAndCorrection: true,
|
|
185
|
+
getQuestionFromIdentifiers,
|
|
186
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Exercise } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { OptionFirstTermRankOne } from "../../../../../exercises/options/optionFirstTermRankOne.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
nodeIdsInitial: NodeIdentifiers;
|
|
6
|
+
nodeIdsReason: NodeIdentifiers;
|
|
7
|
+
firstRank: number;
|
|
8
|
+
};
|
|
9
|
+
type Options = OptionFirstTermRankOne & {
|
|
10
|
+
typeSignReason: string[];
|
|
11
|
+
};
|
|
12
|
+
export declare const geometricPlaceFirstPoints: Exercise<Identifiers, Options>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=geometricPlaceFirstPoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometricPlaceFirstPoints.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AAQ3D,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAY7C,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,eAAe,CAAC;IAChC,aAAa,EAAE,eAAe,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0LF,KAAK,OAAO,GAAG,sBAAsB,GAAG;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAkBrE,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBpE,CAAC"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, } from "../../../../../exercises/exercise.js";
|
|
2
|
+
import { getOptionFirstTermRankOneStuff, } from "../../../../../exercises/options/optionFirstTermRankOne.js";
|
|
3
|
+
import { toolBarConstructor } from "../../../../../exercises/utils/geogebra/toolBarConstructor.js";
|
|
4
|
+
import { greenMain } from "../../../../../geogebra/colors.js";
|
|
5
|
+
import { GeogebraConstructor } from "../../../../../geogebra/geogebraConstructor.js";
|
|
6
|
+
import { ggbPointToCoords } from "../../../../../geogebra/parsers/ggbPointToCoords.js";
|
|
7
|
+
import { parseGGBPoints } from "../../../../../geogebra/parsers/parseGGBPoints.js";
|
|
8
|
+
import { Point } from "../../../../../math/geometry/point.js";
|
|
9
|
+
import { NodeConstructor, } from "../../../../../tree/nodes/nodeConstructor.js";
|
|
10
|
+
import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
|
|
11
|
+
import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
|
|
12
|
+
import { power } from "../../../../../tree/nodes/operators/powerNode.js";
|
|
13
|
+
import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
|
|
14
|
+
import { VariableNode } from "../../../../../tree/nodes/variables/variableNode.js";
|
|
15
|
+
import { probaFlip } from "../../../../../utils/alea/probaFlip.js";
|
|
16
|
+
import { random } from "../../../../../utils/alea/random.js";
|
|
17
|
+
import { alignTex } from "../../../../../utils/latex/alignTex.js";
|
|
18
|
+
const nbPoints = 4;
|
|
19
|
+
const getInstruction = (identifiers) => {
|
|
20
|
+
const { firstRank, nodeIdsInitial, nodeIdsReason } = identifiers;
|
|
21
|
+
const [nodeInitial, nodeReason] = [nodeIdsInitial, nodeIdsReason].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
22
|
+
return `On considère une suite géométrique $u$ de premier rang $u_{${firstRank}}=${nodeInitial.toTex()}$ et de raison $${nodeReason.toTex()}$.
|
|
23
|
+
Dans le repère ci-dessous, placer les points représentant les $${nbPoints}$ premiers termes de de $u$.`;
|
|
24
|
+
};
|
|
25
|
+
const getAnswerStuff = (identifiers) => {
|
|
26
|
+
const { firstRank, nodeIdsInitial, nodeIdsReason } = identifiers;
|
|
27
|
+
const [nodeInitial, nodeReason] = [nodeIdsInitial, nodeIdsReason].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
28
|
+
const arrNodeTerm = [...Array(nbPoints).keys()].map((i) => multiply(nodeInitial, power(nodeReason, i))
|
|
29
|
+
.simplify({
|
|
30
|
+
towardsDistribute: true,
|
|
31
|
+
calculatePowers: true,
|
|
32
|
+
distributePowersOnFrac: true,
|
|
33
|
+
})
|
|
34
|
+
.simplify({ towardsDistribute: false }));
|
|
35
|
+
const arrPoint = arrNodeTerm.map((nodeTerm, i) => {
|
|
36
|
+
const nodeX = (firstRank + i).toTree();
|
|
37
|
+
return new Point(`P${firstRank + i}`, nodeX, nodeTerm);
|
|
38
|
+
});
|
|
39
|
+
return {
|
|
40
|
+
arrPoint,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
const getHint = () => {
|
|
44
|
+
return `Une suite est représentée par un nuage de point. L'abscisse de chaque point est le rang du terme, et l'ordonnée est le terme en lui-même.`;
|
|
45
|
+
};
|
|
46
|
+
const getCorrection = (identifiers) => {
|
|
47
|
+
const { firstRank, nodeIdsInitial, nodeIdsReason } = identifiers;
|
|
48
|
+
const [nodeInitial, nodeReason] = [nodeIdsInitial, nodeIdsReason].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
49
|
+
const { arrPoint } = getAnswerStuff(identifiers);
|
|
50
|
+
return `Une suite est représentée par un nuage de point. L'abscisse de chaque point est le rang du terme, et l'ordonnée est le terme en lui-même.
|
|
51
|
+
|
|
52
|
+
La formule générale de la suite $u$ est :
|
|
53
|
+
|
|
54
|
+
$$
|
|
55
|
+
u_{n} = ${nodeInitial.toTex()} \\ \\times \\ (${nodeReason.toTex()})^{${substract(new VariableNode("n"), firstRank)
|
|
56
|
+
.simplify({ towardsDistribute: true })
|
|
57
|
+
.toTex()}}
|
|
58
|
+
$$
|
|
59
|
+
|
|
60
|
+
Les points du nuage sont donc ici les suivants :
|
|
61
|
+
|
|
62
|
+
${alignTex(arrPoint.map((point, i) => {
|
|
63
|
+
const rank = firstRank + i;
|
|
64
|
+
return [`(${rank};u_{${rank}})`, "=", point.toCoords()];
|
|
65
|
+
}))}
|
|
66
|
+
|
|
67
|
+
En pratique, on place le premier point. Puis, pour placer le point suivant :
|
|
68
|
+
- pour l'abscisse : on se décale d'une unité sur l'axe des abscisses
|
|
69
|
+
- pour l'ordonnée : on multiplie l'ordonnée du point précédent par la raison (attention au changement de signe si la raison est négative)
|
|
70
|
+
|
|
71
|
+
`;
|
|
72
|
+
};
|
|
73
|
+
const getGGBAnswer = (identifiers) => {
|
|
74
|
+
const { arrPoint } = getAnswerStuff(identifiers);
|
|
75
|
+
return [
|
|
76
|
+
...arrPoint.flatMap((point) => point.toGGBCommand({ color: `${greenMain}`, showLabel: false })),
|
|
77
|
+
];
|
|
78
|
+
};
|
|
79
|
+
const getStudentGGBOptions = (identifiers) => {
|
|
80
|
+
const { arrPoint } = getAnswerStuff(identifiers);
|
|
81
|
+
const values = arrPoint.map((point) => point.y.evaluate());
|
|
82
|
+
const ggb = new GeogebraConstructor({
|
|
83
|
+
commands: [],
|
|
84
|
+
customToolBar: toolBarConstructor({
|
|
85
|
+
point: true,
|
|
86
|
+
}),
|
|
87
|
+
});
|
|
88
|
+
const yMin = Math.min(...values);
|
|
89
|
+
const yMax = Math.max(...values);
|
|
90
|
+
return ggb.getOptions({
|
|
91
|
+
coords: [-1, 6, Math.min(yMin, 0) - 1, Math.max(yMax, 1) + 1],
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
const isGGBAnswerValid = (ans, { ggbAnswer: _ggbAnswer, ...identifiers }) => {
|
|
95
|
+
const points = parseGGBPoints(ans)
|
|
96
|
+
.map((p) => ggbPointToCoords(p))
|
|
97
|
+
.sort((a, b) => a.x - b.x);
|
|
98
|
+
const validPoints = getAnswerStuff(identifiers).arrPoint;
|
|
99
|
+
return points.every((p, i) => Math.abs(p.x - validPoints[i].x.evaluate()) < 0.4 &&
|
|
100
|
+
Math.abs(p.y - validPoints[i].y.evaluate()) < 0.4);
|
|
101
|
+
};
|
|
102
|
+
const getPlaceFirstSequencePointsQuestion = (optsIn) => {
|
|
103
|
+
const opts = optsIn ?? optsDefault;
|
|
104
|
+
const firstRank = opts?.firstTermRankOne ? 1 : 0;
|
|
105
|
+
const typeSignReason = opts?.typeSignReason
|
|
106
|
+
? random(opts.typeSignReason)
|
|
107
|
+
: random(optsDefault.typeSignReason);
|
|
108
|
+
const [nodeInitialAbs, nodeReasonAbs] = random([
|
|
109
|
+
//increasing
|
|
110
|
+
[(1).toTree(), (2).toTree()],
|
|
111
|
+
[(1).toTree(), frac(3, 2)],
|
|
112
|
+
[(1).toTree(), frac(4, 3)],
|
|
113
|
+
// [(1).toTree(), frac(5, 3)],
|
|
114
|
+
[frac(1, 2), (2).toTree()],
|
|
115
|
+
[frac(1, 2), frac(3, 2)],
|
|
116
|
+
[frac(1, 3), (3).toTree()],
|
|
117
|
+
[(2).toTree(), frac(3, 2)],
|
|
118
|
+
[(2).toTree(), frac(4, 3)],
|
|
119
|
+
//decreasing
|
|
120
|
+
[(8).toTree(), frac(1, 2)],
|
|
121
|
+
[(9).toTree(), frac(1, 3)],
|
|
122
|
+
[(9).toTree(), frac(2, 3)],
|
|
123
|
+
[(8).toTree(), frac(3, 4)],
|
|
124
|
+
// [(10).toTree(), frac(3, 5)],
|
|
125
|
+
]);
|
|
126
|
+
const nodeInitial = (() => {
|
|
127
|
+
const sign = probaFlip(0.7) ? +1 : -1;
|
|
128
|
+
return multiply(sign, nodeInitialAbs).simplify({
|
|
129
|
+
towardsDistribute: true,
|
|
130
|
+
});
|
|
131
|
+
})();
|
|
132
|
+
const nodeReason = (() => {
|
|
133
|
+
const sign = typeSignReason === "positive" ? +1 : -1;
|
|
134
|
+
return multiply(sign, nodeReasonAbs).simplify({
|
|
135
|
+
towardsDistribute: true,
|
|
136
|
+
});
|
|
137
|
+
})();
|
|
138
|
+
const identifiers = {
|
|
139
|
+
firstRank,
|
|
140
|
+
nodeIdsInitial: nodeInitial.toIdentifiers(),
|
|
141
|
+
nodeIdsReason: nodeReason.toIdentifiers(),
|
|
142
|
+
};
|
|
143
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
144
|
+
};
|
|
145
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
146
|
+
return {
|
|
147
|
+
ggbAnswer: getGGBAnswer(identifiers),
|
|
148
|
+
instruction: getInstruction(identifiers),
|
|
149
|
+
studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
150
|
+
identifiers,
|
|
151
|
+
hint: getHint(identifiers),
|
|
152
|
+
correction: getCorrection(identifiers),
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
const { optsDefaultFirstTermRankOne, generatorOptionFirstTermRankOne } = getOptionFirstTermRankOneStuff(false);
|
|
156
|
+
const optsDefault = Object.assign({}, optsDefaultFirstTermRankOne, {
|
|
157
|
+
typeSignReason: ["positive"],
|
|
158
|
+
});
|
|
159
|
+
const options = [
|
|
160
|
+
generatorOptionFirstTermRankOne,
|
|
161
|
+
{
|
|
162
|
+
id: "typeSignReason",
|
|
163
|
+
label: "Signe de la raison",
|
|
164
|
+
target: GeneratorOptionTarget.generation,
|
|
165
|
+
type: GeneratorOptionType.multiselect,
|
|
166
|
+
values: ["positive", "négative"],
|
|
167
|
+
defaultValue: optsDefault.typeSignReason,
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
export const geometricPlaceFirstPoints = {
|
|
171
|
+
id: "geometricPlaceFirstPoints",
|
|
172
|
+
label: "Placer les premiers termes d'une suite géométrique dans un repère",
|
|
173
|
+
isSingleStep: true,
|
|
174
|
+
generator: (nb, opts) =>
|
|
175
|
+
// getDistinctQuestions(() => getPlaceFirstSequencePointsQuestion(opts), nb),
|
|
176
|
+
[...Array(nb).keys()].map(() => getPlaceFirstSequencePointsQuestion(opts)),
|
|
177
|
+
ggbTimer: 60,
|
|
178
|
+
isGGBAnswerValid,
|
|
179
|
+
subject: "Mathématiques",
|
|
180
|
+
getHint,
|
|
181
|
+
getCorrection,
|
|
182
|
+
hasHintAndCorrection: true,
|
|
183
|
+
getInstruction,
|
|
184
|
+
getGGBAnswer,
|
|
185
|
+
getStudentGGBOptions,
|
|
186
|
+
answerType: "GGB",
|
|
187
|
+
getQuestionFromIdentifiers,
|
|
188
|
+
options,
|
|
189
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/graph/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./geometricPlaceFirstPoints.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayedOptions.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/options/arrayedOptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,GAAI,OAAO,EAAE,cAAc,EACnE,QAAQ,OAAO,GAAG,SAAS,EAC3B,gBAAgB,cAAc,wBAmB/B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const defaultArrayedOptsWhereNeeded = (optsIn, arrayedOptions) => {
|
|
2
|
+
const arrayedOptionsIn = optsIn;
|
|
3
|
+
return {
|
|
4
|
+
...arrayedOptions,
|
|
5
|
+
...(arrayedOptionsIn
|
|
6
|
+
? Object.keys(arrayedOptionsIn).reduce((acc, key) => {
|
|
7
|
+
const dictIn = arrayedOptionsIn;
|
|
8
|
+
acc = {
|
|
9
|
+
...acc,
|
|
10
|
+
...(dictIn[key]?.length > 0 ? { [key]: dictIn[key] } : {}),
|
|
11
|
+
};
|
|
12
|
+
return acc;
|
|
13
|
+
}, {})
|
|
14
|
+
: {}),
|
|
15
|
+
};
|
|
16
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -1935,6 +1935,39 @@ declare const mathExercises: (Exercise<{
|
|
|
1935
1935
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1936
1936
|
q: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1937
1937
|
a: number;
|
|
1938
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1939
|
+
q: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1940
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1941
|
+
f0: number;
|
|
1942
|
+
f1: number;
|
|
1943
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1944
|
+
k: number;
|
|
1945
|
+
a: number;
|
|
1946
|
+
fakeParams: {
|
|
1947
|
+
a: number;
|
|
1948
|
+
k: number;
|
|
1949
|
+
}[];
|
|
1950
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1951
|
+
aIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1952
|
+
xIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1953
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1954
|
+
aIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1955
|
+
xIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1956
|
+
yIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1957
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1958
|
+
aIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1959
|
+
xIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1960
|
+
yIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1961
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1962
|
+
aIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1963
|
+
xIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1964
|
+
yIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1965
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1966
|
+
aIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1967
|
+
xIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1968
|
+
yIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1969
|
+
zIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1970
|
+
tIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1938
1971
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1939
1972
|
affine1Ids: import("./math/polynomials/generalAffine.js").GeneralAffineIdentifiers;
|
|
1940
1973
|
affine2Ids: import("./math/polynomials/generalAffine.js").GeneralAffineIdentifiers;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seqArithmeticSituations.d.ts","sourceRoot":"","sources":["../../../../../src/math/utils/sequences/situations/seqArithmeticSituations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAiBlE,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,CAAC,EAAE,CACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,SAAS,EAAE,OAAO,EAAE,KACpB,MAAM,CAAC;IAEZ,aAAa,EAAE,CACb,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,SAAS,EAAE,OAAO,EAAE,KACpB,aAAa,CAAC;IAEnB,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,KAAK,MAAM,CAAC;IAChE,kBAAkB,EAAE,CAClB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,SAAS,EAAE,OAAO,EAAE,KACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACzE,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK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MAAM,EACjB,eAAe,CAAC,EAAE,kCAAkC,KACjD,MAAM,CAAC;IAEZ,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,8BAA8B,EAAE,4BAA4B,CAAC;IAE7D,uBAAuB,EAAE,4BAA4B,CAAC;IAEtD,iBAAiB,EAAE,4CAA4C,CAAC;IAChE,sBAAsB,EAAE,4CAA4C,CAAC;CACtE,CAAC;
|
|
1
|
+
{"version":3,"file":"seqArithmeticSituations.d.ts","sourceRoot":"","sources":["../../../../../src/math/utils/sequences/situations/seqArithmeticSituations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAiBlE,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,CAAC,EAAE,CACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,SAAS,EAAE,OAAO,EAAE,KACpB,MAAM,CAAC;IAEZ,aAAa,EAAE,CACb,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,SAAS,EAAE,OAAO,EAAE,KACpB,aAAa,CAAC;IAEnB,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,KAAK,MAAM,CAAC;IAChE,kBAAkB,EAAE,CAClB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,SAAS,EAAE,OAAO,EAAE,KACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACzE,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,aAAa,CAAC;CACpE,CAAC;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AAE,kCAAkC,KACjD,MAAM,CAAC;IAEZ,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,8BAA8B,EAAE,4BAA4B,CAAC;IAE7D,uBAAuB,EAAE,4BAA4B,CAAC;IAEtD,iBAAiB,EAAE,4CAA4C,CAAC;IAChE,sBAAsB,EAAE,4CAA4C,CAAC;CACtE,CAAC;AAwlHF,eAAO,MAAM,oBAAoB;;sCArkHd,MAAM,UACP,MAAM,aACH,MAAM,gBACH,OAAO,EAAE;;;;;sCA2Bd,MAAM,UACP,MAAM,aACH,MAAM,gBACH,OAAO,EAAE;;;;;;;sCAmChB,MAAM,UACP,MAAM,aACH,MAAM,gBACH,OAAO,EAAE;;;;;sCAsCd,MAAM,UACP,MAAM,aACH,MAAM,gBACH,OAAO,EAAE;;;;;sCAwDd,MAAM,UACP,MAAM,aACH,MAAM,gBACH,OAAO,EAAE;;;;IA45G9B,CAAC"}
|
|
@@ -191,8 +191,8 @@ const templatesSituationsArithmetic = [
|
|
|
191
191
|
};
|
|
192
192
|
},
|
|
193
193
|
rankDecoder: {
|
|
194
|
-
targetFromRank: (rank, _firstRank) => rank.toTree(),
|
|
195
|
-
rankFromTarget: (nodeTarget, _firstRank) => nodeTarget.evaluate(),
|
|
194
|
+
targetFromRank: (rank, _firstRank) => round(rank, 0).toTree(),
|
|
195
|
+
rankFromTarget: (nodeTarget, _firstRank) => round(nodeTarget.evaluate(), 0),
|
|
196
196
|
},
|
|
197
197
|
digitsValue: 2,
|
|
198
198
|
digitsTarget: 0,
|
|
@@ -371,8 +371,8 @@ La hauteur de la plante relevée chaque jour, en $\\textrm{cm}$, est donc une su
|
|
|
371
371
|
};
|
|
372
372
|
},
|
|
373
373
|
rankDecoder: {
|
|
374
|
-
targetFromRank: (rank, firstRank) => (rank - firstRank).toTree(),
|
|
375
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() + firstRank,
|
|
374
|
+
targetFromRank: (rank, firstRank) => round(rank - firstRank, 0).toTree(),
|
|
375
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() + firstRank, 0),
|
|
376
376
|
},
|
|
377
377
|
digitsValue: 2,
|
|
378
378
|
digitsTarget: 0,
|
|
@@ -585,8 +585,8 @@ On note $u_n$ la facture (en $\\textrm{€}$) pour $${getStrFactor(firstRank)} \
|
|
|
585
585
|
}
|
|
586
586
|
},
|
|
587
587
|
rankDecoder: {
|
|
588
|
-
targetFromRank: (rank, firstRank) => (rank - firstRank).toTree(),
|
|
589
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() + firstRank,
|
|
588
|
+
targetFromRank: (rank, firstRank) => round(rank - firstRank, 0).toTree(),
|
|
589
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() + firstRank, 0),
|
|
590
590
|
},
|
|
591
591
|
digitsValue: 2,
|
|
592
592
|
digitsTarget: 0,
|
|
@@ -738,8 +738,8 @@ La facture est donc une suite arithmétique de premier terme $${initial.frPretty
|
|
|
738
738
|
};
|
|
739
739
|
},
|
|
740
740
|
rankDecoder: {
|
|
741
|
-
targetFromRank: (rank, firstRank) => (100 * (rank - firstRank)).toTree(),
|
|
742
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() / 100 + firstRank,
|
|
741
|
+
targetFromRank: (rank, firstRank) => round(100 * (rank - firstRank), 0).toTree(),
|
|
742
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() / 100 + firstRank, 0),
|
|
743
743
|
},
|
|
744
744
|
digitsValue: 2,
|
|
745
745
|
digitsTarget: 0,
|
|
@@ -923,8 +923,8 @@ La température ambiante est donc une suite arithmétique de premier terme $${in
|
|
|
923
923
|
};
|
|
924
924
|
},
|
|
925
925
|
rankDecoder: {
|
|
926
|
-
targetFromRank: (rank, firstRank) => (rank - firstRank).toTree(),
|
|
927
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() + firstRank,
|
|
926
|
+
targetFromRank: (rank, firstRank) => round(rank - firstRank, 0).toTree(),
|
|
927
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() + firstRank, 0),
|
|
928
928
|
},
|
|
929
929
|
digitsValue: 2,
|
|
930
930
|
digitsTarget: 0,
|
|
@@ -1120,8 +1120,8 @@ Le salaire d'Emma, en $\\textrm{€}$, est donc une suite arithmétique de premi
|
|
|
1120
1120
|
};
|
|
1121
1121
|
},
|
|
1122
1122
|
rankDecoder: {
|
|
1123
|
-
targetFromRank: (rank, firstRank) => (rank - firstRank).toTree(),
|
|
1124
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() + firstRank,
|
|
1123
|
+
targetFromRank: (rank, firstRank) => round(rank - firstRank, 0).toTree(),
|
|
1124
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() + firstRank, 0),
|
|
1125
1125
|
},
|
|
1126
1126
|
digitsValue: 0,
|
|
1127
1127
|
digitsTarget: 0,
|
|
@@ -1309,8 +1309,8 @@ Le montant des économies de Manon, en $\\textrm{€}$, est donc une suite arith
|
|
|
1309
1309
|
};
|
|
1310
1310
|
},
|
|
1311
1311
|
rankDecoder: {
|
|
1312
|
-
targetFromRank: (rank, firstRank) => (rank - firstRank).toTree(),
|
|
1313
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() + firstRank,
|
|
1312
|
+
targetFromRank: (rank, firstRank) => round(rank - firstRank, 0).toTree(),
|
|
1313
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() + firstRank, 0),
|
|
1314
1314
|
},
|
|
1315
1315
|
digitsValue: 0,
|
|
1316
1316
|
digitsTarget: 0,
|
|
@@ -1498,8 +1498,8 @@ Le score est donc une suite arithmétique de premier terme $${initial.frPretty(0
|
|
|
1498
1498
|
};
|
|
1499
1499
|
},
|
|
1500
1500
|
rankDecoder: {
|
|
1501
|
-
targetFromRank: (rank, firstRank) => (rank - firstRank).toTree(),
|
|
1502
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() + firstRank,
|
|
1501
|
+
targetFromRank: (rank, firstRank) => round(rank - firstRank, 0).toTree(),
|
|
1502
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() + firstRank, 0),
|
|
1503
1503
|
},
|
|
1504
1504
|
digitsValue: 2,
|
|
1505
1505
|
digitsTarget: 0,
|
|
@@ -1690,8 +1690,8 @@ Le niveau de charge est donc une suite arithmétique de premier terme $${initial
|
|
|
1690
1690
|
};
|
|
1691
1691
|
},
|
|
1692
1692
|
rankDecoder: {
|
|
1693
|
-
targetFromRank: (rank, firstRank) => (rank - firstRank).toTree(),
|
|
1694
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() + firstRank,
|
|
1693
|
+
targetFromRank: (rank, firstRank) => round(rank - firstRank, 0).toTree(),
|
|
1694
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() + firstRank, 0),
|
|
1695
1695
|
},
|
|
1696
1696
|
digitsValue: 0,
|
|
1697
1697
|
digitsTarget: 0,
|
|
@@ -1881,8 +1881,8 @@ Le nombre d'amuse-bouches est donc une suite arithmétique de premier terme $${i
|
|
|
1881
1881
|
};
|
|
1882
1882
|
},
|
|
1883
1883
|
rankDecoder: {
|
|
1884
|
-
targetFromRank: (rank, firstRank) => (rank - firstRank).toTree(),
|
|
1885
|
-
rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() + firstRank,
|
|
1884
|
+
targetFromRank: (rank, firstRank) => round(rank - firstRank, 0).toTree(),
|
|
1885
|
+
rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() + firstRank, 0),
|
|
1886
1886
|
},
|
|
1887
1887
|
digitsValue: 0,
|
|
1888
1888
|
digitsTarget: 0,
|
|
@@ -16,6 +16,9 @@ export type SimplifyOptions = {
|
|
|
16
16
|
forceSeparateSqrts?: boolean;
|
|
17
17
|
forceAddFractions?: boolean;
|
|
18
18
|
noAddOrder?: boolean;
|
|
19
|
+
forbidPowerMultiply?: boolean;
|
|
20
|
+
forbidPowerDivision?: boolean;
|
|
21
|
+
forbidPowerPower?: boolean;
|
|
19
22
|
};
|
|
20
23
|
export type EvaluateOptions = {
|
|
21
24
|
degreeMode?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"algebraicNode.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/algebraicNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"algebraicNode.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/algebraicNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;I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