math-exercises 3.0.178 → 3.0.180

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.
Files changed (161) hide show
  1. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts +14 -0
  2. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts.map +1 -0
  3. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.js +283 -0
  4. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts +15 -0
  5. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts.map +1 -0
  6. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.js +296 -0
  7. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +3 -3
  8. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts +14 -0
  9. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts.map +1 -0
  10. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.js +346 -0
  11. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts +15 -0
  12. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts.map +1 -0
  13. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.js +435 -0
  14. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts +13 -0
  15. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts.map +1 -0
  16. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.js +326 -0
  17. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts +14 -0
  18. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts.map +1 -0
  19. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.js +181 -0
  20. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts +10 -0
  21. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts.map +1 -0
  22. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.js +272 -0
  23. package/lib/exercises/math/derivation/problems/index.d.ts +5 -0
  24. package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -0
  25. package/lib/exercises/math/derivation/problems/index.js +4 -0
  26. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts +8 -0
  27. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts.map +1 -0
  28. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.js +171 -0
  29. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts +15 -0
  30. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -0
  31. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +328 -0
  32. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts +13 -0
  33. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -0
  34. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +275 -0
  35. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts +8 -0
  36. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts.map +1 -0
  37. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.js +137 -0
  38. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts +10 -0
  39. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.js +478 -0
  41. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts +10 -0
  42. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts.map +1 -0
  43. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.js +499 -0
  44. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts +10 -0
  45. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts.map +1 -0
  46. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.js +240 -0
  47. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts +12 -0
  48. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts.map +1 -0
  49. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.js +436 -0
  50. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts +12 -0
  51. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts.map +1 -0
  52. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.js +219 -0
  53. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts +13 -0
  54. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts.map +1 -0
  55. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.js +273 -0
  56. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts +18 -0
  57. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts.map +1 -0
  58. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.js +295 -0
  59. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts +13 -0
  60. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -0
  61. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +388 -0
  62. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts +9 -0
  63. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts.map +1 -0
  64. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.js +308 -0
  65. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts +14 -0
  66. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -0
  67. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +439 -0
  68. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts +14 -0
  69. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -0
  70. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +547 -0
  71. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts +15 -0
  72. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts.map +1 -0
  73. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.js +537 -0
  74. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts +15 -0
  75. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts.map +1 -0
  76. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.js +639 -0
  77. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts +14 -0
  78. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts.map +1 -0
  79. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.js +530 -0
  80. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts +10 -0
  81. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts.map +1 -0
  82. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +451 -0
  83. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts +11 -0
  84. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts.map +1 -0
  85. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +514 -0
  86. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts.map +1 -1
  87. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.js +4 -11
  88. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
  89. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +32 -17
  90. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts +13 -0
  91. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts.map +1 -0
  92. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.js +195 -0
  93. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts +9 -0
  94. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts.map +1 -0
  95. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.js +220 -0
  96. package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts +15 -0
  97. package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts.map +1 -0
  98. package/lib/exercises/math/probaStat/conditional/conditionalProbability.js +332 -0
  99. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts +8 -0
  100. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts.map +1 -0
  101. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.js +222 -0
  102. package/lib/exercises/math/probaStat/conditional/index.d.ts +5 -0
  103. package/lib/exercises/math/probaStat/conditional/index.d.ts.map +1 -0
  104. package/lib/exercises/math/probaStat/conditional/index.js +4 -0
  105. package/lib/exercises/math/probaStat/index.d.ts +1 -2
  106. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  107. package/lib/exercises/math/probaStat/index.js +1 -2
  108. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts +1 -0
  109. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  110. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +26 -199
  111. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -1
  112. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +6 -2
  113. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
  114. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +6 -5
  115. package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.d.ts.map +1 -1
  116. package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.js +4 -27
  117. package/lib/exercises/math/probaStat/twoEventsSituations.d.ts +29 -0
  118. package/lib/exercises/math/probaStat/twoEventsSituations.d.ts.map +1 -0
  119. package/lib/exercises/math/probaStat/twoEventsSituations.js +145 -0
  120. package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts +4 -1
  121. package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts.map +1 -1
  122. package/lib/exercises/math/sequences/explicitFormulaUsage.js +47 -7
  123. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +1 -1
  124. package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts +5 -1
  125. package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
  126. package/lib/exercises/math/sequences/recurrenceFormulaUsage.js +89 -9
  127. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -1
  128. package/lib/exercises/math/trigonometry/circle/associatePoint.js +55 -6
  129. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts.map +1 -1
  130. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.js +5 -6
  131. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts.map +1 -1
  132. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.js +1 -3
  133. package/lib/exercises/vea/polynomialVEA.d.ts +2 -0
  134. package/lib/exercises/vea/polynomialVEA.d.ts.map +1 -0
  135. package/lib/exercises/vea/polynomialVEA.js +17 -0
  136. package/lib/exercises/vea/valueTableVEA.d.ts +8 -0
  137. package/lib/exercises/vea/valueTableVEA.d.ts.map +1 -0
  138. package/lib/exercises/vea/valueTableVEA.js +12 -0
  139. package/lib/index.d.ts +27 -11
  140. package/lib/index.d.ts.map +1 -1
  141. package/lib/latexTester.d.ts.map +1 -1
  142. package/lib/latexTester.js +1 -1
  143. package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts +19 -0
  144. package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts.map +1 -0
  145. package/lib/math/utils/polynomial/polynomialInterpolationUtils.js +53 -0
  146. package/lib/math/utils/polynomial/polynomialUtils.d.ts +37 -0
  147. package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -0
  148. package/lib/math/utils/polynomial/polynomialUtils.js +223 -0
  149. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
  150. package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +6 -6
  151. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  152. package/lib/tree/nodes/operators/multiplyNode.js +1 -1
  153. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  154. package/lib/tree/nodes/operators/substractNode.js +2 -1
  155. package/lib/tree/utilities/nodeUtils.d.ts +6 -0
  156. package/lib/tree/utilities/nodeUtils.d.ts.map +1 -0
  157. package/lib/tree/utilities/nodeUtils.js +24 -0
  158. package/lib/utils/strings/prependArticle.d.ts +2 -0
  159. package/lib/utils/strings/prependArticle.d.ts.map +1 -0
  160. package/lib/utils/strings/prependArticle.js +1 -0
  161. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
- import { shuffleProps, tryToAddWrongProp, addValidProp, propWhile, } from "../../../exercises/exercise.js";
1
+ import { shuffleProps, tryToAddWrongProp, addValidProp, propWhile, GeneratorOptionTarget, GeneratorOptionType, } from "../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
3
+ import { AffineConstructor } from "../../../math/polynomials/affine.js";
3
4
  import { Polynomial, PolynomialConstructor, } from "../../../math/polynomials/polynomial.js";
4
5
  import { randint } from "../../../math/utils/random/randint.js";
6
+ import { random } from "../../../utils/alea/random.js";
5
7
  const getInstruction = (identifiers) => {
6
8
  const { rank, coeffs } = identifiers;
7
9
  const u = new Polynomial(coeffs, "n");
@@ -19,18 +21,44 @@ const getAnswer = (identifiers) => {
19
21
  const answer = u.calculate(rank) + "";
20
22
  return answer;
21
23
  };
24
+ const getHint = (identifiers) => {
25
+ return `La suite est donnée sous forme explicite.
26
+
27
+ Remplace $n$ par $${identifiers.rank}$ dans la formule donnée.`;
28
+ };
29
+ const getCorrection = (identifiers) => {
30
+ const { coeffs, rank } = identifiers;
31
+ const u = new Polynomial(coeffs, "n");
32
+ return `La suite étant donnée sous forme explicite, il suffit de remplacer $n$ par $${rank}$ dans la formule :
33
+
34
+ $$
35
+ u_{${rank}} = ${u.toTree().toDetailedEvaluation({ n: rank.toTree() }).toTex()}
36
+ $$
37
+
38
+ donc
39
+
40
+ $$
41
+ u_{${rank}} = ${getAnswer(identifiers)}
42
+ $$`;
43
+ };
22
44
  const getQuestionFromIdentifiers = (identifiers) => {
23
- const question = {
45
+ return {
24
46
  answer: getAnswer(identifiers),
25
47
  instruction: getInstruction(identifiers),
26
- keys: ["u", "underscore", "equal"],
48
+ keys: [],
27
49
  answerFormat: "tex",
28
50
  identifiers,
51
+ hint: getHint(identifiers),
52
+ correction: getCorrection(identifiers),
29
53
  };
30
- return question;
31
54
  };
32
- const getExplicitFormulaUsageQuestion = () => {
33
- const u = PolynomialConstructor.randomWithOrder(2, "n");
55
+ const getExplicitFormulaUsageQuestion = (opts) => {
56
+ const type = opts?.functionType?.length
57
+ ? random(opts.functionType)
58
+ : random(["Affine", "Second degré"]);
59
+ const u = type === "Affine"
60
+ ? AffineConstructor.random()
61
+ : PolynomialConstructor.randomWithOrder(2, "n");
34
62
  const rank = randint(0, 4);
35
63
  const identifiers = { rank, coeffs: u.coefficients };
36
64
  return getQuestionFromIdentifiers(identifiers);
@@ -50,16 +78,28 @@ const getPropositions = (n, { answer, rank, coeffs }) => {
50
78
  const isAnswerValid = (ans, { answer, rank }) => {
51
79
  return [answer, `u_{${rank}}=${answer}`, `u_${rank}=${answer}`].includes(ans);
52
80
  };
81
+ const options = [
82
+ {
83
+ id: "functionType",
84
+ label: "Type de fonction",
85
+ values: ["Affine", "Second degré"],
86
+ target: GeneratorOptionTarget.generation,
87
+ type: GeneratorOptionType.multiselect,
88
+ defaultValue: ["Affine", "Second degré"],
89
+ },
90
+ ];
53
91
  export const explicitFormulaUsage = {
54
92
  id: "explicitFormulaUsage",
55
93
  connector: "=",
56
94
  label: "Utiliser la formule explicite d'une suite",
57
95
  isSingleStep: true,
58
- generator: (nb) => getDistinctQuestions(getExplicitFormulaUsageQuestion, nb),
96
+ generator: (nb, opts) => getDistinctQuestions(() => getExplicitFormulaUsageQuestion(opts), nb),
59
97
  qcmTimer: 60,
60
98
  freeTimer: 60,
61
99
  getPropositions,
62
100
  isAnswerValid,
63
101
  subject: "Mathématiques",
64
102
  getQuestionFromIdentifiers,
103
+ hasHintAndCorrection: true,
104
+ options,
65
105
  };
@@ -246,7 +246,7 @@ const options = [generatorOptionFirstTermRankOne];
246
246
  export const geometricFindRandomTermFromTwoTerms = {
247
247
  id: "geometricFindRandomTermFromTwoTerms",
248
248
  connector: "=",
249
- label: "Connaissant deux termes d'une suite géométrique, en donner une formule générale",
249
+ label: "Connaissant deux termes d'une suite géométrique, en calculer un troisième",
250
250
  isSingleStep: true,
251
251
  generator: (nb, opts) => getDistinctQuestions(() => getGeometricFindRandomTermFromTwoTermsQuestion(opts), nb),
252
252
  options,
@@ -4,6 +4,10 @@ type Identifiers = {
4
4
  u0: number;
5
5
  coeffs: number[];
6
6
  };
7
- export declare const recurrenceFormulaUsage: Exercise<Identifiers>;
7
+ type Options = {
8
+ functionType: string[];
9
+ askedRank: string[];
10
+ };
11
+ export declare const recurrenceFormulaUsage: Exercise<Identifiers, Options>;
8
12
  export {};
9
13
  //# sourceMappingURL=recurrenceFormulaUsage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/recurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAKrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAwEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAaxD,CAAC"}
1
+ {"version":3,"file":"recurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/recurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAwIF,KAAK,OAAO,GAAG;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAmBF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAejE,CAAC"}
@@ -1,7 +1,8 @@
1
- import { shuffleProps, tryToAddWrongProp, addValidProp, propWhile, } from "../../../exercises/exercise.js";
1
+ import { shuffleProps, tryToAddWrongProp, addValidProp, propWhile, GeneratorOptionType, GeneratorOptionTarget, } from "../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { Polynomial } from "../../../math/polynomials/polynomial.js";
4
4
  import { randint } from "../../../math/utils/random/randint.js";
5
+ import { random } from "../../../utils/alea/random.js";
5
6
  const getInstruction = (identifiers) => {
6
7
  const { rank, u0, coeffs } = identifiers;
7
8
  const u = new Polynomial(coeffs, "u_n");
@@ -27,21 +28,80 @@ const getAnswer = (identifiers) => {
27
28
  return answer;
28
29
  };
29
30
  const getQuestionFromIdentifiers = (identifiers) => {
30
- const question = {
31
+ return {
31
32
  answer: getAnswer(identifiers),
32
33
  instruction: getInstruction(identifiers),
33
- keys: ["u", "underscore", "equal"],
34
+ keys: [],
34
35
  answerFormat: "tex",
35
36
  identifiers,
37
+ hint: getHint(identifiers),
38
+ correction: getCorrection(identifiers),
36
39
  };
37
- return question;
38
40
  };
39
- const getRecurrenceFormulaUsageQuestion = () => {
40
- const coeffs = [randint(-5, 6), randint(-5, 6), randint(-3, 4, [0])];
41
+ const getHint = (identifiers) => {
42
+ const { rank } = identifiers;
43
+ let corr = `La formule qui est donnée est une formule de récurrence. Pour calculer $u_1$, tu peux remplacer $n$ par $0$ dans la formule.`;
44
+ if (rank > 1) {
45
+ corr += `
46
+
47
+ Tu peux ensuite répéter cette méthode : remplace $n$ par $1$ et utilise la valeur de $u_1$ que tu as trouvée pour déterminer $u_2$.`;
48
+ }
49
+ return corr;
50
+ };
51
+ const getCorrection = (identifiers) => {
52
+ const { rank, u0, coeffs } = identifiers;
53
+ const u = new Polynomial(coeffs, "u_n");
54
+ let currentValue = u0;
55
+ const values = [u0];
56
+ for (let i = 0; i < rank; i++) {
57
+ currentValue = u.calculate(currentValue);
58
+ values.push(currentValue);
59
+ }
60
+ let corr = `On remplace $n$ par $0$ :
61
+
62
+ $$
63
+ u_1 = ${u.toTree().toDetailedEvaluation({ u_n: u0.toTree() }).toTex()}
64
+ $$
65
+
66
+ donc $u_1 = ${values[1].frenchify()}$.
67
+
68
+ `;
69
+ if (rank > 1) {
70
+ corr += `Puis, on se sert de ce résultat pour trouver $u_2$ : on remplace $n$ par $1$ dans la formule de récurrence :
71
+
72
+ $$
73
+ u_2 = ${u.toTree().toDetailedEvaluation({ u_n: values[1].toTree() }).toTex()}
74
+ $$
75
+
76
+ donc $u_2 = ${values[2].frenchify()}$.
77
+
78
+ `;
79
+ }
80
+ if (rank > 2) {
81
+ corr += `De même pour trouver $u_3$ :
82
+
83
+ $$
84
+ u_2 = ${u.toTree().toDetailedEvaluation({ u_n: values[2].toTree() }).toTex()}
85
+ $$
86
+
87
+ donc $u_2 = ${values[3].frenchify()}$.`;
88
+ }
89
+ return corr;
90
+ };
91
+ const getRecurrenceFormulaUsageQuestion = (opts) => {
92
+ const type = opts?.functionType?.length
93
+ ? random(opts.functionType)
94
+ : random(["Affine", "Second degré"]);
95
+ const coeffs = type === "Affine"
96
+ ? [randint(-5, 6), randint(-5, 6, [0])]
97
+ : [randint(-5, 6), randint(-5, 6), randint(-3, 4, [0])];
41
98
  const u0 = randint(-2, 3, [0]);
42
- const rank = randint(1, 4);
99
+ const texRank = opts?.askedRank?.length
100
+ ? random(opts.askedRank)
101
+ : random(["$1$", "$2$", "$3$"]);
102
+ const rank = Number(texRank[1]);
43
103
  const identifiers = { rank, u0, coeffs };
44
- return getQuestionFromIdentifiers(identifiers);
104
+ return getQuestionFromIdentifiers(identifiers, opts);
45
105
  };
46
106
  const getPropositions = (n, { answer, rank, coeffs }) => {
47
107
  const propositions = [];
@@ -57,16 +117,36 @@ const getPropositions = (n, { answer, rank, coeffs }) => {
57
117
  const isAnswerValid = (ans, { answer, rank }) => {
58
118
  return [answer, `u_{${rank}}=${answer}`, `u_${rank}=${answer}`].includes(ans);
59
119
  };
120
+ const options = [
121
+ {
122
+ id: "functionType",
123
+ label: "Type de fonction",
124
+ values: ["Affine", "Second degré"],
125
+ target: GeneratorOptionTarget.generation,
126
+ type: GeneratorOptionType.multiselect,
127
+ defaultValue: ["Affine", "Second degré"],
128
+ },
129
+ {
130
+ id: "askedRank",
131
+ label: "Rang demandé",
132
+ values: ["$1$", "$2$", "$3$"],
133
+ target: GeneratorOptionTarget.generation,
134
+ type: GeneratorOptionType.multiselect,
135
+ defaultValue: ["$1$", "$2$", "$3$"],
136
+ },
137
+ ];
60
138
  export const recurrenceFormulaUsage = {
61
139
  id: "recurrenceFormulaUsage",
62
140
  connector: "=",
63
141
  label: "Utiliser la formule de récurrence d'une suite",
64
142
  isSingleStep: true,
65
- generator: (nb) => getDistinctQuestions(getRecurrenceFormulaUsageQuestion, nb),
143
+ generator: (nb, opts) => getDistinctQuestions(() => getRecurrenceFormulaUsageQuestion(opts), nb),
66
144
  qcmTimer: 60,
67
145
  freeTimer: 60,
68
146
  getPropositions,
69
147
  isAnswerValid,
70
148
  subject: "Mathématiques",
71
149
  getQuestionFromIdentifiers,
150
+ options,
151
+ hasHintAndCorrection: true,
72
152
  };
@@ -1 +1 @@
1
- {"version":3,"file":"associatePoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/associatePoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAgFF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
1
+ {"version":3,"file":"associatePoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/associatePoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAgIF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
@@ -2,6 +2,9 @@ import { addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../..
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { RemarkableValueConstructor } from "../../../../math/trigonometry/remarkableValue.js";
4
4
  import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
5
+ import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
6
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
7
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
5
8
  import { coinFlip } from "../../../../utils/alea/coinFlip.js";
6
9
  import { random } from "../../../../utils/alea/random.js";
7
10
  const points = [
@@ -32,12 +35,55 @@ const getAnswer = (identifiers) => {
32
35
  const { point } = identifiers;
33
36
  return point;
34
37
  };
35
- // const getHint: GetHint<Identifiers> = (identifiers) => {
36
- // return ``;
37
- // };
38
- // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
39
- // return ``;
40
- // };
38
+ const getHint = (identifiers) => {
39
+ const { angleIdentifiers } = identifiers;
40
+ const angle = reifyAlgebraic(angleIdentifiers);
41
+ const isSimplifiable = angle.evaluate() > Math.PI || angle.evaluate() <= -Math.PI;
42
+ let hint = "";
43
+ if (isSimplifiable) {
44
+ hint += `Commence par te ramener à l'intervalle $]-\\pi; \\pi]$, en ajoutant ou en retirant un multiple de $2\\pi$ à $${angle.toTex()}$.
45
+
46
+ `;
47
+ }
48
+ return hint + `Le cercle trigonométrique a un périmètre de $2\\pi$.`;
49
+ };
50
+ const getCorrection = (identifiers) => {
51
+ const { angleIdentifiers } = identifiers;
52
+ const angle = reifyAlgebraic(angleIdentifiers);
53
+ const isSimplifiable = angle.evaluate() > Math.PI || angle.evaluate() <= -Math.PI;
54
+ let corr = "";
55
+ if (isSimplifiable) {
56
+ let toAdd = 0;
57
+ let newAngle = angle;
58
+ let counter = 0;
59
+ while (newAngle.evaluate() > Math.PI || newAngle.evaluate() <= -Math.PI) {
60
+ counter++;
61
+ if (counter > 1000)
62
+ throw new Error("too many iterations in remarkable values");
63
+ if (newAngle.evaluate() > 0)
64
+ toAdd--;
65
+ else
66
+ toAdd++;
67
+ console.log(newAngle.evaluate(), toAdd);
68
+ newAngle = add(newAngle, multiply(toAdd > 0 ? 2 : -2, PiNode)).simplify();
69
+ }
70
+ // const raw = frac(angle, PiNode).simplify();
71
+ corr += `On se ramène à l'intervalle $]-\\pi; \\pi]$ :
72
+
73
+ $$
74
+ ${add(angle, multiply(2 * toAdd, PiNode)).toTex()} = ${newAngle.toTex()}
75
+ $$`;
76
+ }
77
+ return (corr +
78
+ `
79
+
80
+ On se sert du cercle trigonométrique ci-dessous :
81
+
82
+ ![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/mathliveV2/activities/quizzes/generator/piCercle_nombres.jpg)
83
+
84
+ Le point cherché est donc $${getAnswer(identifiers)}$.
85
+ `);
86
+ };
41
87
  const getQuestionFromIdentifiers = (identifiers) => {
42
88
  const question = {
43
89
  answer: getAnswer(identifiers),
@@ -45,6 +91,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
45
91
  keys: points,
46
92
  answerFormat: "tex",
47
93
  identifiers,
94
+ hint: getHint(identifiers),
95
+ correction: getCorrection(identifiers),
48
96
  };
49
97
  return question;
50
98
  };
@@ -83,4 +131,5 @@ export const associatePoint = {
83
131
  isAnswerValid,
84
132
  subject: "Mathématiques",
85
133
  getQuestionFromIdentifiers,
134
+ hasHintAndCorrection: true,
86
135
  };
@@ -1 +1 @@
1
- {"version":3,"file":"selectQuadrantOnTrigoCircle.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA2FF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAuB7D,CAAC"}
1
+ {"version":3,"file":"selectQuadrantOnTrigoCircle.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA8FF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAuB7D,CAAC"}
@@ -1,13 +1,12 @@
1
- import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
1
+ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
3
  import { randint } from "../../../../math/utils/random/randint.js";
4
- const getPropositions = (n, { answer }) => {
4
+ const getPropositions = (_n, { answer }) => {
5
5
  const propositions = [];
6
- addValidProp(propositions, answer, "raw");
7
- ["Bleu", "Rouge", "Vert", "Jaune"].forEach((color) => {
8
- tryToAddWrongProp(propositions, color, "raw");
6
+ ["Bleu", "Jaune", "Rouge", "Vert"].forEach((color) => {
7
+ (color === answer ? addValidProp : tryToAddWrongProp)(propositions, color, "raw");
9
8
  });
10
- return shuffleProps(propositions, n);
9
+ return propositions;
11
10
  };
12
11
  const getAnswer = (identifiers) => {
13
12
  return ["Bleu", "Rouge", "Vert", "Jaune"][identifiers.quartant];
@@ -1 +1 @@
1
- {"version":3,"file":"associateAngleSimplification.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/associateAngleSimplification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgKF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAsB9D,CAAC"}
1
+ {"version":3,"file":"associateAngleSimplification.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/associateAngleSimplification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8JF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAsB9D,CAAC"}
@@ -95,9 +95,7 @@ $$`;
95
95
  corr += `
96
96
 
97
97
  $$
98
- ${multiply(d, fct(substract(PiNode, "x"))).toTex()} = ${isCos
99
- ? multiply(-d, cos(substract(PiNode, "x"))).toTex()
100
- : multiply(d, sin(substract(PiNode, "x"))).toTex()}
98
+ ${multiply(d, fct(substract(PiNode, "x"))).toTex()} = ${isCos ? multiply(-d, cos("x")).toTex() : multiply(d, sin("x")).toTex()}
101
99
  $$`;
102
100
  }
103
101
  corr += `
@@ -0,0 +1,2 @@
1
+ export declare const polynomialVEA: (ans: string, answer: string) => boolean;
2
+ //# sourceMappingURL=polynomialVEA.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polynomialVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/polynomialVEA.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,QAAQ,MAAM,YAmBxD,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { getArrNodeCoeffOfPolynomialNode } from "../../math/utils/polynomial/polynomialUtils.js";
2
+ import { substract } from "../../tree/nodes/operators/substractNode.js";
3
+ import { parseAlgebraic } from "../../tree/parsers/latexParser.js";
4
+ import { zip } from "../../utils/arrays/arrayZip.js";
5
+ import { handleVEAError } from "../../utils/errors/handleVEAError.js";
6
+ export const polynomialVEA = (ans, answer) => {
7
+ try {
8
+ const nodeAns = parseAlgebraic(ans);
9
+ const nodeAnswer = parseAlgebraic(answer);
10
+ const [arrNodeCoeffAns, arrNodeCoeffAnswer] = [nodeAns, nodeAnswer].map((node) => getArrNodeCoeffOfPolynomialNode(node));
11
+ return (arrNodeCoeffAns.length === arrNodeCoeffAnswer.length &&
12
+ zip(arrNodeCoeffAns, arrNodeCoeffAnswer).every(([nodeCoeffAns, nodeCoeffAnswer]) => substract(nodeCoeffAns, nodeCoeffAnswer).evaluate() === 0));
13
+ }
14
+ catch (err) {
15
+ return handleVEAError(err);
16
+ }
17
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * @param ans tableau du student
4
+ * @param answerTable tableau réponse
5
+ * TODO passer en argument le VEA check qui est ajd fixé à rationalVEA
6
+ */
7
+ export declare const valueTableVEA: (ans: string[][], answerTable: string[][]) => boolean;
8
+ //# sourceMappingURL=valueTableVEA.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueTableVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/valueTableVEA.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,EAAE,EAAE,aAAa,MAAM,EAAE,EAAE,YAOrE,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ *
3
+ * @param ans tableau du student
4
+ * @param answerTable tableau réponse
5
+ * TODO passer en argument le VEA check qui est ajd fixé à rationalVEA
6
+ */
7
+ import { rationalVEA } from "./rationalVEA.js";
8
+ export const valueTableVEA = (ans, answerTable) => {
9
+ return ans.every((row, i) => {
10
+ return row.every((cell, j) => cell === answerTable[i][j] || rationalVEA(cell, answerTable[i][j]));
11
+ });
12
+ };
package/lib/index.d.ts CHANGED
@@ -2861,15 +2861,6 @@ declare const mathExercises: (Exercise<{
2861
2861
  kIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
2862
2862
  uCoeffs: number[];
2863
2863
  }, Record<string, string | boolean | string[]>> | Exercise<{
2864
- flip: number;
2865
- pA?: number;
2866
- pB?: number;
2867
- pAB?: number;
2868
- pA_B?: number;
2869
- pB_A?: number;
2870
- }, {
2871
- probaType: string[];
2872
- }> | Exercise<{
2873
2864
  randomValues: number[];
2874
2865
  randomEffectives: number[];
2875
2866
  }, Record<string, string | boolean | string[]>> | Exercise<{
@@ -3014,6 +3005,7 @@ declare const mathExercises: (Exercise<{
3014
3005
  allowedAnsType: string[];
3015
3006
  }, {
3016
3007
  allowedAnsType: string[];
3008
+ probaTypes: string[];
3017
3009
  }> | Exercise<{
3018
3010
  exerciseVars: {
3019
3011
  n: number;
@@ -3205,6 +3197,25 @@ declare const mathExercises: (Exercise<{
3205
3197
  situationIndex: number;
3206
3198
  dictShuffle: Record<string, string>;
3207
3199
  pType: string;
3200
+ }, Record<string, string | boolean | string[]>> | Exercise<{
3201
+ flip: number;
3202
+ pA?: number;
3203
+ pB?: number;
3204
+ pAB?: number;
3205
+ pA_B?: number;
3206
+ pB_A?: number;
3207
+ }, {
3208
+ probaType: string[];
3209
+ }> | Exercise<{
3210
+ params: import("./exercises/math/probaStat/trees/probaTreeSituations.js").ProbaTreeSituationParams;
3211
+ }, Record<string, string | boolean | string[]>> | Exercise<{
3212
+ situationIndex: number;
3213
+ aCapB: number;
3214
+ aCapBBarre: number;
3215
+ aBarreCapB: number;
3216
+ aBarreCapBBarre: number;
3217
+ knowing: "A" | "\\overline{A}" | "B" | "\\overline{B}";
3218
+ asked: "A" | "\\overline{A}" | "B" | "\\overline{B}";
3208
3219
  }, Record<string, string | boolean | string[]>> | Exercise<{
3209
3220
  situationIndex: number;
3210
3221
  values: number[];
@@ -3457,13 +3468,18 @@ declare const mathExercises: (Exercise<{
3457
3468
  }, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsWithSuperfluousData.js").OptionIsWithSuperfluousData> | Exercise<{
3458
3469
  rank: number;
3459
3470
  coeffs: number[];
3460
- }, Record<string, string | boolean | string[]>> | Exercise<{
3471
+ }, {
3472
+ functionType: string[];
3473
+ }> | Exercise<{
3461
3474
  coeffs: number[];
3462
3475
  }, Record<string, string | boolean | string[]>> | Exercise<{
3463
3476
  rank: number;
3464
3477
  u0: number;
3465
3478
  coeffs: number[];
3466
- }, Record<string, string | boolean | string[]>> | Exercise<{
3479
+ }, {
3480
+ functionType: string[];
3481
+ askedRank: string[];
3482
+ }> | Exercise<{
3467
3483
  termeid: number;
3468
3484
  affine: number[];
3469
3485
  termeAdd: number;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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":"latexTester.d.ts","sourceRoot":"","sources":["../src/latexTester.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,6BAA2B,YA+LrE,CAAC"}
1
+ {"version":3,"file":"latexTester.d.ts","sourceRoot":"","sources":["../src/latexTester.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,6BAA2B,YAgMrE,CAAC"}
@@ -19,7 +19,7 @@ export const latexTester = (latex, isDefaultInMathMode = false) => {
19
19
  }
20
20
  if (char === "$") {
21
21
  if (isDefaultInMathMode)
22
- throw new Error("Dollar in default math mode");
22
+ throw new Error(`Dollar in default math mode, ${latex}`);
23
23
  if (inPython || inInlinePython)
24
24
  throw new Error("Dollar in python mode");
25
25
  if (nextChar === "$") {
@@ -0,0 +1,19 @@
1
+ import { AlgebraicNode } from "../../../tree/nodes/algebraicNode.js";
2
+ import { NodeIdentifiers } from "../../../tree/nodes/nodeConstructor.js";
3
+ export declare class PointOfFunction {
4
+ nodeAbscissa: AlgebraicNode;
5
+ nodeValue: AlgebraicNode;
6
+ nodeDerivative: AlgebraicNode;
7
+ constructor(nodeAbscissa: AlgebraicNode, nodeValue: AlgebraicNode, nodeDerivative: AlgebraicNode);
8
+ toIdentifiers(): PointOfFunctionIdentifiers;
9
+ }
10
+ export type PointOfFunctionIdentifiers = {
11
+ nodeIdsAbscissa: NodeIdentifiers;
12
+ nodeIdsValue: NodeIdentifiers;
13
+ nodeIdsDerivative: NodeIdentifiers;
14
+ };
15
+ export declare abstract class PointOfFunctionConstructor {
16
+ static fromIdentifiers(pofIds: PointOfFunctionIdentifiers): PointOfFunction;
17
+ }
18
+ export declare function createArrNodeCoeffCubic(pof1: PointOfFunction, pof2: PointOfFunction): import("../../../tree/nodes/operators/fractionNode.js").FractionNode[];
19
+ //# sourceMappingURL=polynomialInterpolationUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polynomialInterpolationUtils.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/polynomial/polynomialInterpolationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,qBAAa,eAAe;IAEjB,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,aAAa;IACxB,cAAc,EAAE,aAAa;gBAF7B,YAAY,EAAE,aAAa,EAC3B,SAAS,EAAE,aAAa,EACxB,cAAc,EAAE,aAAa;IAEtC,aAAa,IAKN,0BAA0B;CAElC;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,eAAe,CAAC;IAC9B,iBAAiB,EAAE,eAAe,CAAC;CACpC,CAAC;AAEF,8BAAsB,0BAA0B;IAC9C,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,0BAA0B;CAY1D;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,eAAe,uEA0FtB"}
@@ -0,0 +1,53 @@
1
+ import { opposite } from "../../../tree/nodes/functions/oppositeNode.js";
2
+ import { NodeConstructor, } from "../../../tree/nodes/nodeConstructor.js";
3
+ import { add } from "../../../tree/nodes/operators/addNode.js";
4
+ import { frac } from "../../../tree/nodes/operators/fractionNode.js";
5
+ import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
6
+ import { power } from "../../../tree/nodes/operators/powerNode.js";
7
+ import { substract } from "../../../tree/nodes/operators/substractNode.js";
8
+ export class PointOfFunction {
9
+ nodeAbscissa;
10
+ nodeValue;
11
+ nodeDerivative;
12
+ constructor(nodeAbscissa, nodeValue, nodeDerivative) {
13
+ this.nodeAbscissa = nodeAbscissa;
14
+ this.nodeValue = nodeValue;
15
+ this.nodeDerivative = nodeDerivative;
16
+ }
17
+ toIdentifiers() {
18
+ return {
19
+ nodeIdsAbscissa: this.nodeAbscissa.toIdentifiers(),
20
+ nodeIdsValue: this.nodeValue.toIdentifiers(),
21
+ nodeIdsDerivative: this.nodeDerivative.toIdentifiers(),
22
+ };
23
+ }
24
+ }
25
+ export class PointOfFunctionConstructor {
26
+ static fromIdentifiers(pofIds) {
27
+ const nodeAbscissa = NodeConstructor.fromIdentifiers(pofIds.nodeIdsAbscissa);
28
+ const nodeValue = NodeConstructor.fromIdentifiers(pofIds.nodeIdsValue);
29
+ const nodeDerivative = NodeConstructor.fromIdentifiers(pofIds.nodeIdsDerivative);
30
+ return new PointOfFunction(nodeAbscissa, nodeValue, nodeDerivative);
31
+ }
32
+ }
33
+ export function createArrNodeCoeffCubic(pof1, pof2) {
34
+ //
35
+ //pof1 = {x1,u1,v1}
36
+ //pof2 = {x2,u2,v2}
37
+ //
38
+ //f(x) = ax^3+bx^2+cx+d
39
+ //f'(x) = 2ax+b
40
+ //
41
+ //f(x1) = u1 <=> a(x1)^3+b(x1)^2+c(x1)+d = u1
42
+ //f(x2) = u2 <=> a(x2)^3+b(x2)^2+c(x2)+d = u2
43
+ //f'(x1) = v1 <=> 3a(x1)^2+2b(x1)+c = v1
44
+ //f'(x2) = v2 <=> 3a(x2)^2+2b(x2)+c = v2
45
+ //
46
+ const { nodeAbscissa: x1, nodeValue: u1, nodeDerivative: v1 } = pof1;
47
+ const { nodeAbscissa: x2, nodeValue: u2, nodeDerivative: v2 } = pof2;
48
+ const nodeA = frac(add(multiply(add(v1, v2), substract(x1, x2)), multiply(2, substract(u2, u1))), power(substract(x1, x2), 3));
49
+ const nodeB = frac(add(multiply(opposite(add(v1, multiply(2, v2))), power(x1, 2)), add(multiply(add(multiply(substract(v2, v1), x2), multiply(3, substract(u1, u2))), x1), multiply(2, multiply(x2, add(multiply(add(v1, frac(v2, 2)), x2), multiply(frac(3, 2), substract(u1, u2))))))), power(substract(x1, x2), 3));
50
+ const nodeC = frac(substract(add(multiply(v2, power(x1, 3)), multiply(2, multiply(add(v1, frac(v2, 2)), multiply(x2, power(x1, 2))))), add(multiply(x2, multiply(x1, add(multiply(add(v1, multiply(2, v2)), x2), multiply(6, substract(u1, u2))))), multiply(v1, power(x2, 3)))), power(substract(x1, x2), 3));
51
+ const nodeD = frac(substract(add(multiply(substract(u2, multiply(v2, x2)), power(x1, 3)), multiply(power(x2, 2), multiply(x1, add(multiply(v1, x2), multiply(3, u1))))), add(multiply(power(x1, 2), multiply(x2, add(multiply(substract(v1, v2), x2), multiply(3, u2)))), multiply(u1, power(x2, 3)))), power(substract(x1, x2), 3));
52
+ return [nodeD, nodeC, nodeB, nodeA];
53
+ }