math-exercises 3.0.200 → 3.0.201

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 (406) hide show
  1. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +1 -1
  2. package/lib/exercises/math/calcul/index.d.ts +1 -0
  3. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/index.js +1 -0
  5. package/lib/exercises/math/calculLitteral/inequations/index.d.ts +1 -0
  6. package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
  7. package/lib/exercises/math/calculLitteral/inequations/index.js +1 -0
  8. package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.d.ts +14 -0
  9. package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.d.ts.map +1 -0
  10. package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.js +263 -0
  11. package/lib/exercises/math/combinatory/anagrams.d.ts.map +1 -1
  12. package/lib/exercises/math/combinatory/anagrams.js +89 -68
  13. package/lib/exercises/math/combinatory/index.d.ts +1 -0
  14. package/lib/exercises/math/combinatory/index.d.ts.map +1 -1
  15. package/lib/exercises/math/combinatory/index.js +1 -0
  16. package/lib/exercises/math/dataRepresentations/index.d.ts +1 -1
  17. package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
  18. package/lib/exercises/math/dataRepresentations/index.js +5 -1
  19. package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts +0 -2
  20. package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts.map +1 -1
  21. package/lib/exercises/math/dataRepresentations/scatterPlot/index.js +2 -2
  22. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +2 -0
  23. package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -1
  24. package/lib/exercises/math/derivation/derivative/trigo/index.js +3 -0
  25. package/lib/exercises/math/derivation/problems/index.d.ts +0 -1
  26. package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -1
  27. package/lib/exercises/math/derivation/problems/index.js +1 -1
  28. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -1
  29. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +5 -2
  30. package/lib/exercises/math/derivation/tangent/index.d.ts +0 -1
  31. package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
  32. package/lib/exercises/math/derivation/tangent/index.js +1 -1
  33. package/lib/exercises/math/derivation/variations/index.d.ts +1 -1
  34. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
  35. package/lib/exercises/math/derivation/variations/index.js +2 -1
  36. package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.d.ts +10 -0
  37. package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.d.ts.map +1 -0
  38. package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.js +222 -0
  39. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +1 -1
  40. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +1 -1
  41. package/lib/exercises/math/functions/affines/index.d.ts +5 -0
  42. package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
  43. package/lib/exercises/math/functions/affines/index.js +5 -0
  44. package/lib/exercises/math/functions/integral/index.d.ts +1 -0
  45. package/lib/exercises/math/functions/integral/index.d.ts.map +1 -1
  46. package/lib/exercises/math/functions/integral/index.js +1 -0
  47. package/lib/exercises/math/functions/integral/integralTrinomialOverX2.d.ts +12 -0
  48. package/lib/exercises/math/functions/integral/integralTrinomialOverX2.d.ts.map +1 -0
  49. package/lib/exercises/math/functions/integral/integralTrinomialOverX2.js +280 -0
  50. package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.d.ts +13 -0
  51. package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.d.ts.map +1 -0
  52. package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.js +622 -0
  53. package/lib/exercises/math/functions/logarithm/index.d.ts +5 -0
  54. package/lib/exercises/math/functions/logarithm/index.d.ts.map +1 -1
  55. package/lib/exercises/math/functions/logarithm/index.js +5 -0
  56. package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.d.ts +10 -0
  57. package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.d.ts.map +1 -0
  58. package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.js +172 -0
  59. package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.d.ts +11 -0
  60. package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.d.ts.map +1 -0
  61. package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.js +163 -0
  62. package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.d.ts +18 -0
  63. package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.d.ts.map +1 -0
  64. package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.js +330 -0
  65. package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.d.ts +11 -0
  66. package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.d.ts.map +1 -0
  67. package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.js +185 -0
  68. package/lib/exercises/math/index.d.ts +1 -1
  69. package/lib/exercises/math/index.d.ts.map +1 -1
  70. package/lib/exercises/math/index.js +2 -1
  71. package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts +15 -0
  72. package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts.map +1 -0
  73. package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.js +505 -0
  74. package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.d.ts +16 -0
  75. package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.d.ts.map +1 -0
  76. package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.js +433 -0
  77. package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.d.ts +15 -0
  78. package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.d.ts.map +1 -0
  79. package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.js +436 -0
  80. package/lib/exercises/math/integration/fromExpr/byParts/index.d.ts +3 -0
  81. package/lib/exercises/math/integration/fromExpr/byParts/index.d.ts.map +1 -0
  82. package/lib/exercises/math/integration/fromExpr/byParts/index.js +2 -0
  83. package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.d.ts +9 -0
  84. package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.d.ts.map +1 -0
  85. package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.js +234 -0
  86. package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.d.ts +12 -0
  87. package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.d.ts.map +1 -0
  88. package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.js +330 -0
  89. package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.d.ts +15 -0
  90. package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.d.ts.map +1 -0
  91. package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.js +450 -0
  92. package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.d.ts +10 -0
  93. package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.d.ts.map +1 -0
  94. package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.js +261 -0
  95. package/lib/exercises/math/integration/fromExpr/index.d.ts +8 -0
  96. package/lib/exercises/math/integration/fromExpr/index.d.ts.map +1 -0
  97. package/lib/exercises/math/integration/fromExpr/index.js +8 -0
  98. package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts +13 -0
  99. package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts.map +1 -0
  100. package/lib/exercises/math/integration/fromExpr/integralFromExpr.js +359 -0
  101. package/lib/exercises/math/integration/fromExpr/meanValue/index.d.ts +2 -0
  102. package/lib/exercises/math/integration/fromExpr/meanValue/index.d.ts.map +1 -0
  103. package/lib/exercises/math/integration/fromExpr/meanValue/index.js +1 -0
  104. package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.d.ts +14 -0
  105. package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.d.ts.map +1 -0
  106. package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.js +429 -0
  107. package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.d.ts +10 -0
  108. package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.d.ts.map +1 -0
  109. package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.js +286 -0
  110. package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.d.ts +9 -0
  111. package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.d.ts.map +1 -0
  112. package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.js +231 -0
  113. package/lib/exercises/math/integration/fromGraph/index.d.ts +7 -0
  114. package/lib/exercises/math/integration/fromGraph/index.d.ts.map +1 -0
  115. package/lib/exercises/math/integration/fromGraph/index.js +6 -0
  116. package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.d.ts +15 -0
  117. package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.d.ts.map +1 -0
  118. package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.js +464 -0
  119. package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.d.ts +15 -0
  120. package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.d.ts.map +1 -0
  121. package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.js +493 -0
  122. package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.d.ts +18 -0
  123. package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.d.ts.map +1 -0
  124. package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.js +466 -0
  125. package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.d.ts +10 -0
  126. package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.d.ts.map +1 -0
  127. package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.js +192 -0
  128. package/lib/exercises/math/integration/index.d.ts +4 -0
  129. package/lib/exercises/math/integration/index.d.ts.map +1 -0
  130. package/lib/exercises/math/integration/index.js +3 -0
  131. package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.d.ts +14 -0
  132. package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.d.ts.map +1 -0
  133. package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.js +222 -0
  134. package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.d.ts +8 -0
  135. package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.d.ts.map +1 -0
  136. package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.js +121 -0
  137. package/lib/exercises/math/limits/index.d.ts +3 -0
  138. package/lib/exercises/math/limits/index.d.ts.map +1 -1
  139. package/lib/exercises/math/limits/index.js +3 -0
  140. package/lib/exercises/math/limits/kLogXPlusTrinomLimit.d.ts +12 -0
  141. package/lib/exercises/math/limits/kLogXPlusTrinomLimit.d.ts.map +1 -0
  142. package/lib/exercises/math/limits/kLogXPlusTrinomLimit.js +224 -0
  143. package/lib/exercises/math/limits/logOfPolynomialLimit.d.ts +10 -0
  144. package/lib/exercises/math/limits/logOfPolynomialLimit.d.ts.map +1 -0
  145. package/lib/exercises/math/limits/logOfPolynomialLimit.js +154 -0
  146. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.d.ts +12 -0
  147. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.d.ts.map +1 -0
  148. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.js +170 -0
  149. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.d.ts +7 -0
  150. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.d.ts.map +1 -0
  151. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.js +163 -0
  152. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.d.ts +14 -0
  153. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.d.ts.map +1 -0
  154. package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.js +150 -0
  155. package/lib/exercises/math/probaStat/basicProbas/index.d.ts +5 -0
  156. package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
  157. package/lib/exercises/math/probaStat/basicProbas/index.js +5 -0
  158. package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.d.ts +12 -0
  159. package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.d.ts.map +1 -0
  160. package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.js +193 -0
  161. package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.d.ts +13 -0
  162. package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.d.ts.map +1 -0
  163. package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.js +171 -0
  164. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.d.ts +9 -0
  165. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.d.ts.map +1 -0
  166. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.js +125 -0
  167. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.d.ts +9 -0
  168. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.d.ts.map +1 -0
  169. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.js +126 -0
  170. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.d.ts +8 -0
  171. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.d.ts.map +1 -0
  172. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.js +150 -0
  173. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.d.ts +15 -0
  174. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.d.ts.map +1 -0
  175. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.js +386 -0
  176. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.d.ts +14 -0
  177. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.d.ts.map +1 -0
  178. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.js +248 -0
  179. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.d.ts +47 -0
  180. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.d.ts.map +1 -0
  181. package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.js +184 -0
  182. package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.d.ts +9 -0
  183. package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.d.ts.map +1 -0
  184. package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.js +120 -0
  185. package/lib/exercises/math/probaStat/binomial/fromSituation/index.d.ts +7 -0
  186. package/lib/exercises/math/probaStat/binomial/fromSituation/index.d.ts.map +1 -0
  187. package/lib/exercises/math/probaStat/binomial/fromSituation/index.js +6 -0
  188. package/lib/exercises/math/probaStat/binomial/index.d.ts +1 -0
  189. package/lib/exercises/math/probaStat/binomial/index.d.ts.map +1 -1
  190. package/lib/exercises/math/probaStat/binomial/index.js +1 -0
  191. package/lib/exercises/math/probaStat/index.d.ts +1 -0
  192. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  193. package/lib/exercises/math/probaStat/index.js +1 -0
  194. package/lib/exercises/math/probaStat/tchebychev/index.d.ts +5 -0
  195. package/lib/exercises/math/probaStat/tchebychev/index.d.ts.map +1 -0
  196. package/lib/exercises/math/probaStat/tchebychev/index.js +4 -0
  197. package/lib/exercises/math/probaStat/tchebychev/mean/index.d.ts +4 -0
  198. package/lib/exercises/math/probaStat/tchebychev/mean/index.d.ts.map +1 -0
  199. package/lib/exercises/math/probaStat/tchebychev/mean/index.js +3 -0
  200. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.d.ts +11 -0
  201. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.d.ts.map +1 -0
  202. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.js +273 -0
  203. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.d.ts +14 -0
  204. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.d.ts.map +1 -0
  205. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.js +219 -0
  206. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.d.ts +14 -0
  207. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.d.ts.map +1 -0
  208. package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.js +245 -0
  209. package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.d.ts +10 -0
  210. package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.d.ts.map +1 -0
  211. package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.js +191 -0
  212. package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.d.ts +10 -0
  213. package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.d.ts.map +1 -0
  214. package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.js +135 -0
  215. package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.d.ts +10 -0
  216. package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.d.ts.map +1 -0
  217. package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.js +155 -0
  218. package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.d.ts +9 -0
  219. package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.d.ts.map +1 -0
  220. package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.js +124 -0
  221. package/lib/exercises/math/probaStat/trees/index.d.ts +1 -0
  222. package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
  223. package/lib/exercises/math/probaStat/trees/index.js +1 -0
  224. package/lib/exercises/math/sequences/geometric/graph/index.d.ts +4 -0
  225. package/lib/exercises/math/sequences/geometric/graph/index.d.ts.map +1 -1
  226. package/lib/exercises/math/sequences/geometric/graph/index.js +4 -0
  227. package/lib/exercises/math/sequences/geometric/index.d.ts +2 -0
  228. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  229. package/lib/exercises/math/sequences/geometric/index.js +2 -0
  230. package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.d.ts.map +1 -1
  231. package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.js +71 -48
  232. package/lib/exercises/math/sequences/geometric/situations/index.d.ts +2 -1
  233. package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -1
  234. package/lib/exercises/math/sequences/geometric/situations/index.js +2 -2
  235. package/lib/exercises/math/sets/index.d.ts +3 -0
  236. package/lib/exercises/math/sets/index.d.ts.map +1 -1
  237. package/lib/exercises/math/sets/index.js +3 -0
  238. package/lib/exercises/math/spaceGeometry/basis/index.d.ts +6 -0
  239. package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -1
  240. package/lib/exercises/math/spaceGeometry/basis/index.js +6 -0
  241. package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts +11 -0
  242. package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts.map +1 -0
  243. package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.js +576 -0
  244. package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.d.ts +11 -0
  245. package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.d.ts.map +1 -0
  246. package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.js +595 -0
  247. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.d.ts +11 -0
  248. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.d.ts.map +1 -0
  249. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.js +501 -0
  250. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.d.ts +16 -0
  251. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.d.ts.map +1 -0
  252. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.js +753 -0
  253. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.d.ts +12 -0
  254. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.d.ts.map +1 -0
  255. package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.js +546 -0
  256. package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.d.ts +13 -0
  257. package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.d.ts.map +1 -0
  258. package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.js +233 -0
  259. package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.d.ts +11 -0
  260. package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.d.ts.map +1 -0
  261. package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.js +192 -0
  262. package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.d.ts +15 -0
  263. package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.d.ts.map +1 -0
  264. package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.js +511 -0
  265. package/lib/exercises/math/spaceGeometry/collinearity/index.d.ts +3 -0
  266. package/lib/exercises/math/spaceGeometry/collinearity/index.d.ts.map +1 -0
  267. package/lib/exercises/math/spaceGeometry/collinearity/index.js +2 -0
  268. package/lib/exercises/math/spaceGeometry/index.d.ts +5 -0
  269. package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
  270. package/lib/exercises/math/spaceGeometry/index.js +5 -1
  271. package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts +22 -0
  272. package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts.map +1 -0
  273. package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.js +366 -0
  274. package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts +2 -0
  275. package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts.map +1 -0
  276. package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.js +2 -0
  277. package/lib/exercises/math/spaceGeometry/parametricLine/index.d.ts +3 -0
  278. package/lib/exercises/math/spaceGeometry/parametricLine/index.d.ts.map +1 -0
  279. package/lib/exercises/math/spaceGeometry/parametricLine/index.js +2 -0
  280. package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts +14 -0
  281. package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts.map +1 -0
  282. package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.js +325 -0
  283. package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.d.ts +13 -0
  284. package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.d.ts.map +1 -0
  285. package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.js +181 -0
  286. package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.d.ts +10 -0
  287. package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.d.ts.map +1 -0
  288. package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.js +208 -0
  289. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts +8 -0
  290. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts.map +1 -0
  291. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.js +255 -0
  292. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts +10 -0
  293. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts.map +1 -0
  294. package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.js +232 -0
  295. package/lib/exercises/math/spaceGeometry/planes/index.d.ts +5 -1
  296. package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -1
  297. package/lib/exercises/math/spaceGeometry/planes/index.js +6 -2
  298. package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.d.ts +10 -0
  299. package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.d.ts.map +1 -0
  300. package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.js +273 -0
  301. package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.d.ts +12 -0
  302. package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.d.ts.map +1 -0
  303. package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.js +398 -0
  304. package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts +22 -0
  305. package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts.map +1 -0
  306. package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.js +509 -0
  307. package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts +8 -0
  308. package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts.map +1 -0
  309. package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.js +229 -0
  310. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.d.ts +9 -0
  311. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.d.ts.map +1 -0
  312. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.js +200 -0
  313. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.d.ts +8 -0
  314. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.d.ts.map +1 -0
  315. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.js +176 -0
  316. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.d.ts +9 -0
  317. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.d.ts.map +1 -0
  318. package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.js +263 -0
  319. package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts +6 -0
  320. package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts.map +1 -0
  321. package/lib/exercises/math/spaceGeometry/scalarProduct/index.js +6 -0
  322. package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.d.ts +14 -0
  323. package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.d.ts.map +1 -0
  324. package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.js +497 -0
  325. package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.d.ts +8 -0
  326. package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.d.ts.map +1 -0
  327. package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.js +173 -0
  328. package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.d.ts +10 -0
  329. package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.d.ts.map +1 -0
  330. package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.js +236 -0
  331. package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +2 -0
  332. package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -1
  333. package/lib/exercises/math/spaceGeometry/vectors/index.js +2 -0
  334. package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.d.ts +8 -0
  335. package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.d.ts.map +1 -0
  336. package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.js +156 -0
  337. package/lib/exercises/math/trigonometry/functions/index.d.ts +1 -0
  338. package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -1
  339. package/lib/exercises/math/trigonometry/functions/index.js +1 -0
  340. package/lib/exercises/utils/data/randomDataTable.d.ts +4 -1
  341. package/lib/exercises/utils/data/randomDataTable.d.ts.map +1 -1
  342. package/lib/exercises/utils/data/randomDataTable.js +1 -2
  343. package/lib/exercises/vea/varLineVEA.d.ts.map +1 -1
  344. package/lib/exercises/vea/varLineVEA.js +15 -2
  345. package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -1
  346. package/lib/exercises/vea/xTableLineVEA.js +13 -2
  347. package/lib/index.d.ts +539 -34
  348. package/lib/index.d.ts.map +1 -1
  349. package/lib/latexTester.d.ts.map +1 -1
  350. package/lib/latexTester.js +9 -7
  351. package/lib/math/geometry/parametricLine.d.ts +1 -1
  352. package/lib/math/geometry/parametricLine.d.ts.map +1 -1
  353. package/lib/math/geometry/parametricLine.js +2 -2
  354. package/lib/math/geometry/spaceVector.d.ts +11 -1
  355. package/lib/math/geometry/spaceVector.d.ts.map +1 -1
  356. package/lib/math/geometry/spaceVector.js +18 -4
  357. package/lib/math/probability/randomVariable.d.ts +3 -2
  358. package/lib/math/probability/randomVariable.d.ts.map +1 -1
  359. package/lib/math/probability/randomVariable.js +14 -8
  360. package/lib/math/systems/generalSystem.d.ts +3 -3
  361. package/lib/math/systems/generalSystem.d.ts.map +1 -1
  362. package/lib/math/systems/generalSystem.js +20 -17
  363. package/lib/math/utils/functions/functionComparison.d.ts.map +1 -1
  364. package/lib/math/utils/functions/functionComparison.js +2 -45
  365. package/lib/math/utils/functions/functionComposition.d.ts +3 -1
  366. package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
  367. package/lib/math/utils/functions/functionComposition.js +17 -17
  368. package/lib/math/utils/integration/rectanglesMethod.d.ts +6 -0
  369. package/lib/math/utils/integration/rectanglesMethod.d.ts.map +1 -0
  370. package/lib/math/utils/integration/rectanglesMethod.js +66 -0
  371. package/lib/math/utils/polynomial/polynomialUtils.d.ts +9 -1
  372. package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -1
  373. package/lib/math/utils/polynomial/polynomialUtils.js +66 -7
  374. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +34 -2
  375. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
  376. package/lib/math/utils/sequences/situations/seqGeometricSituations.js +288 -47
  377. package/lib/tests/questionTest.d.ts.map +1 -1
  378. package/lib/tests/questionTest.js +5 -2
  379. package/lib/tests/singleExo.test.js +2 -2
  380. package/lib/tree/nodes/functions/cosNode.d.ts +1 -1
  381. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  382. package/lib/tree/nodes/functions/cosNode.js +5 -2
  383. package/lib/tree/nodes/functions/factorialNode.d.ts +1 -0
  384. package/lib/tree/nodes/functions/factorialNode.d.ts.map +1 -1
  385. package/lib/tree/nodes/functions/factorialNode.js +16 -1
  386. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  387. package/lib/tree/nodes/functions/logNode.js +2 -1
  388. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -0
  389. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
  390. package/lib/tree/nodes/operators/binomialCoefficientNode.js +34 -0
  391. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  392. package/lib/tree/nodes/sets/discreteSetNode.js +1 -0
  393. package/lib/tree/utilities/nodeComparator.d.ts +7 -0
  394. package/lib/tree/utilities/nodeComparator.d.ts.map +1 -1
  395. package/lib/tree/utilities/nodeComparator.js +59 -0
  396. package/lib/tree/utilities/nodeInspector.d.ts +2 -0
  397. package/lib/tree/utilities/nodeInspector.d.ts.map +1 -1
  398. package/lib/tree/utilities/nodeInspector.js +23 -1
  399. package/lib/tree/utilities/nodeRewriter.d.ts.map +1 -1
  400. package/lib/tree/utilities/nodeRewriter.js +4 -1
  401. package/lib/types/keyIds.d.ts +1 -1
  402. package/lib/types/keyIds.d.ts.map +1 -1
  403. package/lib/utils/strings/splitAndKeep.d.ts +2 -0
  404. package/lib/utils/strings/splitAndKeep.d.ts.map +1 -0
  405. package/lib/utils/strings/splitAndKeep.js +13 -0
  406. package/package.json +1 -1
@@ -1,6 +1,10 @@
1
+ import { Point } from "../../../../math/geometry/point.js";
1
2
  import { add } from "../../../../tree/nodes/operators/addNode.js";
3
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
4
+ import { power } from "../../../../tree/nodes/operators/powerNode.js";
2
5
  import { substract } from "../../../../tree/nodes/operators/substractNode.js";
3
6
  import { alignTex } from "../../../../utils/latex/alignTex.js";
7
+ import { mdTable } from "../../../../utils/markdown/mdTable.js";
4
8
  import { randfloat } from "../../random/randfloat.js";
5
9
  import { randint } from "../../random/randint.js";
6
10
  import { round } from "../../round.js";
@@ -10,30 +14,31 @@ const getStrFactor = (firstRank) => {
10
14
  };
11
15
  //decoration
12
16
  const createSituationGeometricFromTemplate = (templateSituationsGeometric) => {
13
- const { variationFindExplicitFormula, variationFindRecurrenceFormula, variationFindRandomTerm,
14
- // variationFindRank,
17
+ const { variationFindExplicitFormula, variationFindRecurrenceFormula, variationFindRandomTerm, variationFindRank,
15
18
  // variationFindThreshold,
16
19
  } = templateSituationsGeometric;
17
- return Object.assign({}, templateSituationsGeometric, {
18
- variationFindExplicitFormula: Object.assign({}, variationFindExplicitFormula, {
19
- getCorrectionStuff: (initial, reason, firstRank, ...otherArgs) => {
20
- const { str: strRaw } = variationFindExplicitFormula.getCorrectionStuff(initial, reason, firstRank, ...otherArgs);
21
- const str = `${strRaw}
20
+ return {
21
+ ...templateSituationsGeometric,
22
+ ...{
23
+ variationFindExplicitFormula: Object.assign({}, variationFindExplicitFormula, {
24
+ getCorrectionStuff: (initial, reason, firstRank, ...otherArgs) => {
25
+ const { str: strRaw } = variationFindExplicitFormula.getCorrectionStuff(initial, reason, firstRank, ...otherArgs);
26
+ const str = `${strRaw}
22
27
 
23
28
  $$
24
29
  ${seqGeometricUtils
25
- .getAnswerNodeExplicitFormula(initial, reason, firstRank)
26
- .toTex()}
30
+ .getAnswerNodeExplicitFormula(initial, reason, firstRank)
31
+ .toTex()}
27
32
  $$
28
33
 
29
34
  `;
30
- return { str };
31
- },
32
- }),
33
- variationFindRecurrenceFormula: Object.assign({}, variationFindRecurrenceFormula, {
34
- getCorrectionStuff: (initial, reason, firstRank, ...otherArgs) => {
35
- const { str: strRaw, rank1, rank2, } = variationFindRecurrenceFormula.getCorrectionStuff(initial, reason, firstRank, ...otherArgs);
36
- const str = `${strRaw}
35
+ return { str };
36
+ },
37
+ }),
38
+ variationFindRecurrenceFormula: Object.assign({}, variationFindRecurrenceFormula, {
39
+ getCorrectionStuff: (initial, reason, firstRank, ...otherArgs) => {
40
+ const { str: strRaw, rank1, rank2, } = variationFindRecurrenceFormula.getCorrectionStuff(initial, reason, firstRank, ...otherArgs);
41
+ const str = `${strRaw}
37
42
 
38
43
  $$
39
44
  u_{${rank2.frenchify()}} = (${reason.frenchify()}) \\times u_{${rank1.frenchify()}}
@@ -43,27 +48,27 @@ La relation de récurrence est, pour $n \\geq ${firstRank.frenchify()}$ :
43
48
 
44
49
  $$
45
50
  ${seqGeometricUtils
46
- .getAnswerNodeRecurrenceFormula(initial, reason, firstRank)
47
- .toTex()}
51
+ .getAnswerNodeRecurrenceFormula(initial, reason, firstRank)
52
+ .toTex()}
48
53
  $$
49
54
 
50
55
  `;
51
- return { str, rank1, rank2 };
52
- },
53
- }),
54
- variationFindRandomTerm: Object.assign({}, variationFindRandomTerm, {
55
- getCorrectionStuff: (initial, reason, firstRank, ...otherArgs) => {
56
- const [rankAsked] = otherArgs;
57
- const { str: strRaw } = variationFindRandomTerm.getCorrectionStuff(initial, reason, firstRank, ...otherArgs);
58
- const answerNode = variationFindRandomTerm.getAnswerNode(initial, reason, firstRank, ...otherArgs);
59
- const str = `${strRaw}
56
+ return { str, rank1, rank2 };
57
+ },
58
+ }),
59
+ variationFindRandomTerm: Object.assign({}, variationFindRandomTerm, {
60
+ getCorrectionStuff: (initial, reason, firstRank, ...otherArgs) => {
61
+ const [rankAsked] = otherArgs;
62
+ const { str: strRaw } = variationFindRandomTerm.getCorrectionStuff(initial, reason, firstRank, ...otherArgs);
63
+ const answerNode = variationFindRandomTerm.getAnswerNode(initial, reason, firstRank, ...otherArgs);
64
+ const str = `${strRaw}
60
65
 
61
66
  Le terme général est :
62
67
 
63
68
  $$
64
69
  ${seqGeometricUtils
65
- .getAnswerNodeExplicitFormula(initial, reason, firstRank)
66
- .toTex()}
70
+ .getAnswerNodeExplicitFormula(initial, reason, firstRank)
71
+ .toTex()}
67
72
  $$
68
73
 
69
74
  En particulier :
@@ -71,10 +76,58 @@ En particulier :
71
76
  ${alignTex([[`u_{${rankAsked}}`, "=", answerNode.toTex()]])}
72
77
 
73
78
  `;
74
- return { str };
79
+ return { str };
80
+ },
81
+ }),
82
+ variationFindRank: {
83
+ ...variationFindRank,
84
+ ...{
85
+ getCorrectionStuff: (initial, reason, firstRank, ...otherArgs) => {
86
+ const [_valueAsked, _rankDecoder, _digitsValue, digitsTarget] = otherArgs;
87
+ const { str: strRaw } = variationFindRank.getCorrectionStuff(initial, reason, firstRank, ...otherArgs);
88
+ const { answerNode, rankNode } = variationFindRank.getAnswerStuff(initial, reason, firstRank, ...otherArgs);
89
+ const texRankSimplified = rankNode.evaluate().frPretty(0);
90
+ const texAnswer = [
91
+ ...new Set([
92
+ answerNode.toTex(),
93
+ answerNode.evaluate().frPretty(digitsTarget),
94
+ ]),
95
+ ].join(" = ");
96
+ const nodeInitial = initial.toTree();
97
+ const nodeReason = reason.toTree();
98
+ const arrNodeTerm = [...Array(15).keys()].map((i) => multiply(nodeInitial, power(nodeReason, i))
99
+ .simplify({
100
+ towardsDistribute: true,
101
+ calculatePowers: true,
102
+ distributePowersOnFrac: true,
103
+ })
104
+ .simplify({ towardsDistribute: false }));
105
+ const arrPoint = arrNodeTerm.map((nodeTerm, i) => {
106
+ const nodeX = (firstRank + i).toTree();
107
+ return new Point(`P${firstRank + i}`, nodeX, nodeTerm);
108
+ });
109
+ const str = `${strRaw}
110
+
111
+ On note $p$ le rang recherché.
112
+ On affiche le tableau de valeurs avec la calculatrice :
113
+
114
+ ${mdTable([
115
+ ["n", "u_{n}"],
116
+ ...arrPoint.map((point) => [
117
+ point.x.toTex(),
118
+ round(point.y.evaluate(), 2).frenchify(),
119
+ ]),
120
+ ], true)}
121
+
122
+ Le rang $p$ est donc $${texRankSimplified}$.
123
+
124
+ Le nombre recherché est donc $${texAnswer}$.`;
125
+ return { str };
126
+ },
127
+ },
75
128
  },
76
- }),
77
- });
129
+ },
130
+ };
78
131
  };
79
132
  //raw material
80
133
  const templatesSituationsGeometric = [
@@ -107,9 +160,11 @@ const templatesSituationsGeometric = [
107
160
  };
108
161
  },
109
162
  rankDecoder: {
110
- targetFromRank: (rank, firstRank) => (2026 + rank - firstRank).toTree(),
111
- rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() - 2026 + firstRank,
163
+ targetFromRank: (rank, firstRank) => round(2026 + rank - firstRank, 0).toTree(),
164
+ rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() - 2026 + firstRank, 0),
112
165
  },
166
+ digitsValue: 2,
167
+ digitsTarget: 0,
113
168
  getStrSituation: (initial, reason, firstRank, superfluousData) => {
114
169
  const evoPercentage = (reason - 1) * 100;
115
170
  const strEvoPercentage = evoPercentage.frPretty(2);
@@ -198,6 +253,32 @@ Utilise le terme général de $u_n$ pour déterminer le capital pour l'année $2
198
253
  const strEvoPercentage = evoPercentage.frPretty(2);
199
254
  return {
200
255
  str: `Le pourcentage d'évolution est $${strEvoPercentage} \\%$ donc chaque année, le capital est multiplié par $${reason.frenchify()}$.
256
+ Le capital en $\\textrm{€}$, au premier janvier de l'année $${add(2026, substract("n".toTree(), firstRank))
257
+ .simplify()
258
+ .toTex()}$, est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
259
+ };
260
+ },
261
+ },
262
+ variationFindRank: {
263
+ getStrQuestion: (_initial, _reason, _firstRank, ...otherArgs) => {
264
+ const [valueAsked] = otherArgs;
265
+ return `Quelle année le capital sera-t-il de $${round(valueAsked, 2).frPretty(2)} \\ \\textrm{€}$ ?`;
266
+ },
267
+ getAnswerStuff: (initial, reason, firstRank, ...otherArgs) => {
268
+ const [valueAsked, rankDecoder] = otherArgs;
269
+ const rankNode = seqGeometricUtils.getAnswerNodeRandomRank(initial, reason, firstRank, valueAsked);
270
+ const answerNode = rankDecoder.targetFromRank(rankNode.evaluate(), firstRank);
271
+ return { answerNode, rankNode };
272
+ },
273
+ getHint: (_firstRank, ...otherArgs) => {
274
+ const [valueAsked] = otherArgs;
275
+ return `Quelle est la nature de la suite $u_n$ ?
276
+
277
+ Utilise le terme général de $(u_n)$ pour déterminer $n$ tel que $u_n = ${valueAsked.frPretty(2)}$.`;
278
+ },
279
+ getCorrectionStuff: (initial, reason, firstRank) => {
280
+ return {
281
+ str: `Chaque année, le capital est multiplié par $${reason.frenchify()}$.
201
282
  Le capital en $\\textrm{€}$, au premier janvier de l'année $${add(2026, substract("n".toTree(), firstRank))
202
283
  .simplify()
203
284
  .toTex()}$, est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
@@ -234,9 +315,11 @@ Le capital en $\\textrm{€}$, au premier janvier de l'année $${add(2026, subst
234
315
  };
235
316
  },
236
317
  rankDecoder: {
237
- targetFromRank: (rank, firstRank) => (2025 + rank - firstRank).toTree(),
238
- rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() - 2025 + firstRank,
318
+ targetFromRank: (rank, firstRank) => round(2025 + rank - firstRank, 0).toTree(),
319
+ rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() - 2025 + firstRank, 0),
239
320
  },
321
+ digitsValue: 2,
322
+ digitsTarget: 0,
240
323
  getStrSituation: (initial, reason, firstRank, superfluousData) => {
241
324
  const evoPercentage = (reason - 1) * 100;
242
325
  const strMinusEvoPercentage = (-evoPercentage).frPretty(0);
@@ -328,6 +411,32 @@ Utilise le terme général de $u_n$ pour déterminer la valeur de la voiture de
328
411
  const strEvoPercentage = evoPercentage.frPretty(0);
329
412
  return {
330
413
  str: `Le pourcentage d'évolution est $${strEvoPercentage} \\%$ donc chaque année, la valeur de la voiture de Killian est multipliée par $${reason.frenchify()}$.
414
+ La valeur de la voiture de Killian en $\\textrm{€}$, au premier juillet de l'année $${add(2025, substract("n".toTree(), firstRank))
415
+ .simplify()
416
+ .toTex()}$, est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
417
+ };
418
+ },
419
+ },
420
+ variationFindRank: {
421
+ getStrQuestion: (_initial, _reason, _firstRank, ...otherArgs) => {
422
+ const [valueAsked] = otherArgs;
423
+ return `Quelle année la valeur de la voiture sera-t-elle de $${round(valueAsked, 2).frPretty(2)} \\ \\textrm{€}$ ?`;
424
+ },
425
+ getAnswerStuff: (initial, reason, firstRank, ...otherArgs) => {
426
+ const [valueAsked, rankDecoder] = otherArgs;
427
+ const rankNode = seqGeometricUtils.getAnswerNodeRandomRank(initial, reason, firstRank, valueAsked);
428
+ const answerNode = rankDecoder.targetFromRank(rankNode.evaluate(), firstRank);
429
+ return { answerNode, rankNode };
430
+ },
431
+ getHint: (_firstRank, ...otherArgs) => {
432
+ const [valueAsked] = otherArgs;
433
+ return `Quelle est la nature de la suite $u_n$ ?
434
+
435
+ Utilise le terme général de $(u_n)$ pour déterminer $n$ tel que $u_n = ${valueAsked.frPretty(2)}$.`;
436
+ },
437
+ getCorrectionStuff: (initial, reason, firstRank) => {
438
+ return {
439
+ str: `Chaque année, la valeur de la voiture est multipliée par $${reason.frenchify()}$.
331
440
  La valeur de la voiture de Killian en $\\textrm{€}$, au premier juillet de l'année $${add(2025, substract("n".toTree(), firstRank))
332
441
  .simplify()
333
442
  .toTex()}$, est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
@@ -364,9 +473,11 @@ La valeur de la voiture de Killian en $\\textrm{€}$, au premier juillet de l'a
364
473
  };
365
474
  },
366
475
  rankDecoder: {
367
- targetFromRank: (rank, firstRank) => (0 + rank - firstRank).toTree(),
368
- rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() - 0 + firstRank,
476
+ targetFromRank: (rank, firstRank) => round(0 + rank - firstRank, 0).toTree(),
477
+ rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() - 0 + firstRank, 0),
369
478
  },
479
+ digitsValue: 2,
480
+ digitsTarget: 0,
370
481
  getStrSituation: (initial, reason, firstRank, superfluousData) => {
371
482
  const factorPercentage = reason * 100;
372
483
  const strFactorPercentage = factorPercentage.frPretty(0);
@@ -457,6 +568,30 @@ Utilise le terme général de $u_n$ pour déterminer la hauteur de la balle au $
457
568
  const strFactorPercentage = factorPercentage.frPretty(0);
458
569
  return {
459
570
  str: `Le coefficient multiplicateur est $${strFactorPercentage} \\%$ donc à chaque rebond, la hauteur de la balle est multipliée par $${reason.frenchify()}$.
571
+ La hauteur de la balle est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
572
+ };
573
+ },
574
+ },
575
+ variationFindRank: {
576
+ getStrQuestion: (_initial, _reason, _firstRank, ...otherArgs) => {
577
+ const [valueAsked] = otherArgs;
578
+ return `Après combien de rebonds la hauteur de la balle sera-t-elle de $${round(valueAsked, 2).frPretty(2)} \\ \\textrm{m}$ ?`;
579
+ },
580
+ getAnswerStuff: (initial, reason, firstRank, ...otherArgs) => {
581
+ const [valueAsked, rankDecoder] = otherArgs;
582
+ const rankNode = seqGeometricUtils.getAnswerNodeRandomRank(initial, reason, firstRank, valueAsked);
583
+ const answerNode = rankDecoder.targetFromRank(rankNode.evaluate(), firstRank);
584
+ return { answerNode, rankNode };
585
+ },
586
+ getHint: (_firstRank, ...otherArgs) => {
587
+ const [valueAsked] = otherArgs;
588
+ return `Quelle est la nature de la suite $u_n$ ?
589
+
590
+ Utilise le terme général de $(u_n)$ pour déterminer $n$ tel que $u_n = ${valueAsked.frPretty(2)}$.`;
591
+ },
592
+ getCorrectionStuff: (initial, reason, _firstRank) => {
593
+ return {
594
+ str: `Après chaque rebond, la hauteur de la balle est multipliée par $${reason.frenchify()}$.
460
595
  La hauteur de la balle est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
461
596
  };
462
597
  },
@@ -491,9 +626,11 @@ La hauteur de la balle est donc une suite géométrique de premier terme $${init
491
626
  };
492
627
  },
493
628
  rankDecoder: {
494
- targetFromRank: (rank, firstRank) => (0 + rank - firstRank).toTree(),
495
- rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() - 0 + firstRank,
629
+ targetFromRank: (rank, firstRank) => round(0 + rank - firstRank, 0).toTree(),
630
+ rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() - 0 + firstRank, 0),
496
631
  },
632
+ digitsValue: 2,
633
+ digitsTarget: 0,
497
634
  getStrSituation: (initial, reason, firstRank, superfluousData) => {
498
635
  const evoPercentage = (reason - 1) * 100;
499
636
  const strEvoPercentage = evoPercentage.frPretty(0);
@@ -579,6 +716,30 @@ Utilise le terme général de $u_n$ pour déterminer le nombre de bactéries apr
579
716
  const strEvoPercentage = evoPercentage.frPretty(0);
580
717
  return {
581
718
  str: `Le pourcentage d'évolution est $${strEvoPercentage} \\%$ donc chaque heure, le nombre de bactéries est multiplié par $${reason.frenchify()}$.
719
+ Le nombre de bactéries est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
720
+ };
721
+ },
722
+ },
723
+ variationFindRank: {
724
+ getStrQuestion: (_initial, _reason, _firstRank, ...otherArgs) => {
725
+ const [valueAsked] = otherArgs;
726
+ return `Après combien d'heures le nombre de bactéries sera-t-il de $${round(valueAsked, 0).frPretty(0)}$ ?`;
727
+ },
728
+ getAnswerStuff: (initial, reason, firstRank, ...otherArgs) => {
729
+ const [valueAsked, rankDecoder] = otherArgs;
730
+ const rankNode = seqGeometricUtils.getAnswerNodeRandomRank(initial, reason, firstRank, valueAsked);
731
+ const answerNode = rankDecoder.targetFromRank(rankNode.evaluate(), firstRank);
732
+ return { answerNode, rankNode };
733
+ },
734
+ getHint: (_firstRank, ...otherArgs) => {
735
+ const [valueAsked] = otherArgs;
736
+ return `Quelle est la nature de la suite $u_n$ ?
737
+
738
+ Utilise le terme général de $(u_n)$ pour déterminer $n$ tel que $u_n = ${valueAsked.frPretty(0)}$.`;
739
+ },
740
+ getCorrectionStuff: (initial, reason, _firstRank) => {
741
+ return {
742
+ str: `Chaque heure, le nombre de bactéries est multiplié par $${reason.frenchify()}$.
582
743
  Le nombre de bactéries est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
583
744
  };
584
745
  },
@@ -588,7 +749,7 @@ Le nombre de bactéries est donc une suite géométrique de premier terme $${ini
588
749
  {
589
750
  type: "factor",
590
751
  randInitial: () => randint(2, 8),
591
- randReason: () => randint(2, 8),
752
+ randReason: () => randint(2, 4),
592
753
  randThreshold: (initial, reason, firstRank) => seqGeometricUtils.randThreshold(initial, reason, firstRank, 2),
593
754
  randSuperfluousData: () => {
594
755
  const rand = randint(0, 2);
@@ -613,9 +774,11 @@ Le nombre de bactéries est donc une suite géométrique de premier terme $${ini
613
774
  };
614
775
  },
615
776
  rankDecoder: {
616
- targetFromRank: (rank, firstRank) => (0 + rank - firstRank).toTree(),
617
- rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() - 0 + firstRank,
777
+ targetFromRank: (rank, firstRank) => round(0 + rank - firstRank, 0).toTree(),
778
+ rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() - 0 + firstRank, 0),
618
779
  },
780
+ digitsValue: 2,
781
+ digitsTarget: 0,
619
782
  getStrSituation: (initial, reason, firstRank, superfluousData) => {
620
783
  if (superfluousData === undefined) {
621
784
  return `Justine dévoile un secret à $${initial}$ de ses amies.
@@ -699,6 +862,30 @@ Utilise le terme général de $u_n$ pour déterminer le nombre de personnes info
699
862
  getCorrectionStuff: (initial, reason, _firstRank) => {
700
863
  return {
701
864
  str: `Le coefficient multiplicateur est $${reason}$ donc, chaque jour, le nombre de personnes informées est multiplié par $${reason.frenchify()}$.
865
+ Le nombre de personnes informées est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
866
+ };
867
+ },
868
+ },
869
+ variationFindRank: {
870
+ getStrQuestion: (_initial, _reason, _firstRank, ...otherArgs) => {
871
+ const [valueAsked] = otherArgs;
872
+ return `Après combien de jours le nombre de personnes informées sera-t-il de $${round(valueAsked, 0).frPretty(0)}$ ?`;
873
+ },
874
+ getAnswerStuff: (initial, reason, firstRank, ...otherArgs) => {
875
+ const [valueAsked, rankDecoder] = otherArgs;
876
+ const rankNode = seqGeometricUtils.getAnswerNodeRandomRank(initial, reason, firstRank, valueAsked);
877
+ const answerNode = rankDecoder.targetFromRank(rankNode.evaluate(), firstRank);
878
+ return { answerNode, rankNode };
879
+ },
880
+ getHint: (_firstRank, ...otherArgs) => {
881
+ const [valueAsked] = otherArgs;
882
+ return `Quelle est la nature de la suite $u_n$ ?
883
+
884
+ Utilise le terme général de $(u_n)$ pour déterminer $n$ tel que $u_n = ${valueAsked.frPretty(0)}$.`;
885
+ },
886
+ getCorrectionStuff: (initial, reason, _firstRank) => {
887
+ return {
888
+ str: `Chaque jour, le nombre de personnes informées est multiplié par $${reason.frenchify()}$.
702
889
  Le nombre de personnes informées est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
703
890
  };
704
891
  },
@@ -733,9 +920,11 @@ Le nombre de personnes informées est donc une suite géométrique de premier te
733
920
  };
734
921
  },
735
922
  rankDecoder: {
736
- targetFromRank: (rank, firstRank) => (2025 + rank - firstRank).toTree(),
737
- rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() - 2025 + firstRank,
923
+ targetFromRank: (rank, firstRank) => round(2025 + rank - firstRank, 0).toTree(),
924
+ rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() - 2025 + firstRank, 0),
738
925
  },
926
+ digitsValue: 2,
927
+ digitsTarget: 0,
739
928
  getStrSituation: (initial, reason, firstRank, superfluousData) => {
740
929
  const evoPercentage = (reason - 1) * 100;
741
930
  const strEvoPercentage = evoPercentage.frPretty(0);
@@ -832,6 +1021,32 @@ Utilise le terme général de $u_n$ pour déterminer le salaire pour l'année $2
832
1021
  const strEvoPercentage = evoPercentage.frPretty(2);
833
1022
  return {
834
1023
  str: `Le pourcentage d'évolution est $${strEvoPercentage} \\%$ donc chaque année, le salaire est multiplié par $${reason.frenchify()}$.
1024
+ Le salaire en $\\textrm{€}$ pour l'année $${add(2025, substract("n".toTree(), firstRank))
1025
+ .simplify()
1026
+ .toTex()}$, est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
1027
+ };
1028
+ },
1029
+ },
1030
+ variationFindRank: {
1031
+ getStrQuestion: (_initial, _reason, _firstRank, ...otherArgs) => {
1032
+ const [valueAsked] = otherArgs;
1033
+ return `Quelle année le salaire de Sofiane sera-t-il de $${round(valueAsked, 2).frPretty(2)} \\ \\textrm{€}$ ?`;
1034
+ },
1035
+ getAnswerStuff: (initial, reason, firstRank, ...otherArgs) => {
1036
+ const [valueAsked, rankDecoder] = otherArgs;
1037
+ const rankNode = seqGeometricUtils.getAnswerNodeRandomRank(initial, reason, firstRank, valueAsked);
1038
+ const answerNode = rankDecoder.targetFromRank(rankNode.evaluate(), firstRank);
1039
+ return { answerNode, rankNode };
1040
+ },
1041
+ getHint: (_firstRank, ...otherArgs) => {
1042
+ const [valueAsked] = otherArgs;
1043
+ return `Quelle est la nature de la suite $u_n$ ?
1044
+
1045
+ Utilise le terme général de $(u_n)$ pour déterminer $n$ tel que $u_n = ${valueAsked.frPretty(2)}$.`;
1046
+ },
1047
+ getCorrectionStuff: (initial, reason, firstRank) => {
1048
+ return {
1049
+ str: `Chaque année, le salaire est multiplié par $${reason.frenchify()}$.
835
1050
  Le salaire en $\\textrm{€}$ pour l'année $${add(2025, substract("n".toTree(), firstRank))
836
1051
  .simplify()
837
1052
  .toTex()}$, est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
@@ -868,9 +1083,11 @@ Le salaire en $\\textrm{€}$ pour l'année $${add(2025, substract("n".toTree(),
868
1083
  };
869
1084
  },
870
1085
  rankDecoder: {
871
- targetFromRank: (rank, firstRank) => (0 + rank - firstRank).toTree(),
872
- rankFromTarget: (nodeTarget, firstRank) => nodeTarget.evaluate() - 0 + firstRank,
1086
+ targetFromRank: (rank, firstRank) => round(0 + rank - firstRank, 0).toTree(),
1087
+ rankFromTarget: (nodeTarget, firstRank) => round(nodeTarget.evaluate() - 0 + firstRank, 0),
873
1088
  },
1089
+ digitsValue: 2,
1090
+ digitsTarget: 0,
874
1091
  getStrSituation: (initial, reason, _firstRank, superfluousData) => {
875
1092
  const evoPercentage = (reason - 1) * 100;
876
1093
  const strEvoPercentage = evoPercentage.frPretty(0);
@@ -954,6 +1171,30 @@ Utilise le terme général de $u_n$ pour déterminer le loyer pour le mois $${ta
954
1171
  const strEvoPercentage = evoPercentage.frPretty(0);
955
1172
  return {
956
1173
  str: `Le pourcentage d'évolution est $${strEvoPercentage} \\%$ donc chaque mois, le loyer est multiplié par $${reason.frenchify()}$.
1174
+ Le loyer en $\\textrm{€}$ pour le mois $n$ est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
1175
+ };
1176
+ },
1177
+ },
1178
+ variationFindRank: {
1179
+ getStrQuestion: (_initial, _reason, _firstRank, ...otherArgs) => {
1180
+ const [valueAsked] = otherArgs;
1181
+ return `Après combien de mois de location le loyer sera-t-il de $${round(valueAsked, 2).frPretty(2)} \\ \\textrm{€}$ ?`;
1182
+ },
1183
+ getAnswerStuff: (initial, reason, firstRank, ...otherArgs) => {
1184
+ const [valueAsked, rankDecoder] = otherArgs;
1185
+ const rankNode = seqGeometricUtils.getAnswerNodeRandomRank(initial, reason, firstRank, valueAsked);
1186
+ const answerNode = rankDecoder.targetFromRank(rankNode.evaluate(), firstRank);
1187
+ return { answerNode, rankNode };
1188
+ },
1189
+ getHint: (_firstRank, ...otherArgs) => {
1190
+ const [valueAsked] = otherArgs;
1191
+ return `Quelle est la nature de la suite $u_n$ ?
1192
+
1193
+ Utilise le terme général de $(u_n)$ pour déterminer $n$ tel que $u_n = ${valueAsked.frPretty(2)}$.`;
1194
+ },
1195
+ getCorrectionStuff: (initial, reason, _firstRank) => {
1196
+ return {
1197
+ str: `Chaque mois, le loyer est multiplié par $${reason.frenchify()}$.
957
1198
  Le loyer en $\\textrm{€}$ pour le mois $n$ est donc une suite géométrique de premier terme $${initial.frenchify()}$ et de raison $${reason.frenchify()}$.`,
958
1199
  };
959
1200
  },
@@ -1 +1 @@
1
- {"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AA0BjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;CAsU3B,CAAC"}
1
+ {"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AA0BjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;CA6U3B,CAAC"}
@@ -60,6 +60,7 @@ export const questionTest = (exo, question) => {
60
60
  }
61
61
  const dotDecimalPattern = /\d+\.\d+/;
62
62
  const pythonPattern = /\`.*\`/;
63
+ const latexArraystretchPattern = /.*\\def\\arraystretch\{\d+\.\d+\}.*/;
63
64
  if (question.studentGgbOptions?.coords?.length) {
64
65
  if (exo.answerType !== "GGB") {
65
66
  throw new Error(`exo ${exo.id} has studentGgbOptions but answerType is not GGB`);
@@ -111,7 +112,8 @@ export const questionTest = (exo, question) => {
111
112
  }
112
113
  if (question.answer) {
113
114
  if (question.answer.match(dotDecimalPattern) &&
114
- !question.answer.match(pythonPattern))
115
+ !(question.answer.match(pythonPattern) ||
116
+ question.answer.match(latexArraystretchPattern)))
115
117
  throw new Error(`exo ${exo.id} has invalid number format, answer: ${question.answer}`);
116
118
  if (question.answer.includes("[object Object]"))
117
119
  throw new Error(`exo ${exo.id} has invalid answer`);
@@ -240,7 +242,8 @@ export const questionTest = (exo, question) => {
240
242
  if (prop.statement.includes("undefined"))
241
243
  throw new Error(`exo ${exo.id} has invalid prop (undefined) : ${prop.statement}`);
242
244
  if (prop.statement.match(dotDecimalPattern) &&
243
- !prop.statement.match(pythonPattern))
245
+ !(prop.statement.match(pythonPattern) ||
246
+ prop.statement.match(latexArraystretchPattern)))
244
247
  throw new Error(`exo ${exo.id} has invalid prop (dot) : ${prop.statement}`);
245
248
  if (prop.statement.includes("[object Object]"))
246
249
  throw new Error(`exo ${exo.id} has invalid prop (objectObject) : ${prop.statement}`);
@@ -1,9 +1,9 @@
1
1
  import "../prototypesEnhancement.js";
2
2
  import { exoTest } from "./exoTest.js";
3
- import { geometricFindExplicitFormulaFromSituation, } from "../exercises/math/index.js";
3
+ import { productOfSinAXPlusBCosCXPlusDDerivative, } from "../exercises/math/index.js";
4
4
  try {
5
5
  for (let i = 0; i < 1000; i++)
6
- exoTest(geometricFindExplicitFormulaFromSituation);
6
+ exoTest(productOfSinAXPlusBCosCXPlusDDerivative);
7
7
  }
8
8
  catch (err) {
9
9
  throw err;
@@ -25,6 +25,6 @@ export declare class CosNode implements FunctionNode {
25
25
  evaluate(vars?: Record<string, number>, opts?: EvaluateOptions): number;
26
26
  equals(node: AlgebraicNode): boolean;
27
27
  toDetailedEvaluation(vars: Record<string, AlgebraicNode>): CosNode;
28
- derivative(): AlgebraicNode;
28
+ derivative(varName?: string | undefined): AlgebraicNode;
29
29
  }
30
30
  //# sourceMappingURL=cosNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cosNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/cosNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAI7B,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AAED,eAAO,MAAM,GAAG,GAAI,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,YAIrD,CAAC;AAEF,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAGf,mBAAmB,IAAI,MAAM;IAG7B,mBAAmB;IAOnB,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,aAAa;IA+BnD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,EAAE,eAAe;IAO9D,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAGpC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAGxD,UAAU,IAAI,aAAa;CAG5B"}
1
+ {"version":3,"file":"cosNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/cosNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAO7B,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AAED,eAAO,MAAM,GAAG,GAAI,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,YAIrD,CAAC;AAEF,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAGf,mBAAmB,IAAI,MAAM;IAG7B,mBAAmB;IAOnB,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,aAAa;IA+BnD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,EAAE,eAAe;IAO9D,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAGpC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAGxD,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa;CAGxD"}
@@ -2,6 +2,9 @@ import { NodeIds, NodeType } from "../node.js";
2
2
  import { FunctionsIds, isFunctionNode } from "./functionNode.js";
3
3
  import { mainTrigoValues } from "../../../math/trigonometry/remarkableValues.js";
4
4
  import { hasVariableNode } from "../hasVariableNode.js";
5
+ import { multiply } from "../operators/multiplyNode.js";
6
+ import { opposite } from "./oppositeNode.js";
7
+ import { sin } from "./sinNode.js";
5
8
  export function isCosNode(a) {
6
9
  return isFunctionNode(a) && a.id === FunctionsIds.cos;
7
10
  }
@@ -96,7 +99,7 @@ export class CosNode {
96
99
  toDetailedEvaluation(vars) {
97
100
  return new CosNode(this.child.toDetailedEvaluation(vars));
98
101
  }
99
- derivative() {
100
- throw new Error("unimplemented derivative");
102
+ derivative(varName) {
103
+ return multiply(this.child.derivative(varName), opposite(sin(this.child)));
101
104
  }
102
105
  }
@@ -20,6 +20,7 @@ export declare class FactorialNode implements FunctionNode {
20
20
  toSimplificationTex(): string;
21
21
  toTex(opts?: ToTexOptions): string;
22
22
  toEquivalentNodes(): AlgebraicNode[];
23
+ toMultiplyNode(): AlgebraicNode;
23
24
  toAllValidTexs(): string[];
24
25
  simplify(opts?: SimplifyOptions): import("../numbers/constantNode.js").ConstantNode | import("../numbers/numberNode.js").NumberNode | FactorialNode;
25
26
  evaluate(vars?: Record<string, number>): number;
@@ -1 +1 @@
1
- {"version":3,"file":"factorialNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/factorialNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGrE,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,aAAa,CAE3D;AACD,eAAO,MAAM,KAAK,GAAI,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,kBAIvD,CAAC;AACF,qBAAa,aAAc,YAAW,YAAY;IAChD,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,mBAAmB;IAOnB,mBAAmB,IAAI,MAAM;IAG7B,KAAK,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM;IAOlC,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAO/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGtC,MAAM,CAAC,IAAI,EAAE,aAAa;IAI1B,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAKxD,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa;CAGzD"}
1
+ {"version":3,"file":"factorialNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/factorialNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKrE,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,aAAa,CAE3D;AACD,eAAO,MAAM,KAAK,GAAI,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,kBAIvD,CAAC;AACF,qBAAa,aAAc,YAAW,YAAY;IAChD,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,mBAAmB;IAOnB,mBAAmB,IAAI,MAAM;IAG7B,KAAK,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM;IAYlC,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,aAAa;IAQ/B,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAO/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGtC,MAAM,CAAC,IAAI,EAAE,aAAa;IAI1B,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAKxD,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa;CAGzD"}
@@ -3,6 +3,8 @@ import { NodeIds, NodeType } from "../node.js";
3
3
  import { FunctionsIds, isFunctionNode } from "./functionNode.js";
4
4
  import { isNumberNode } from "../numbers/numberNode.js";
5
5
  import { factorial } from "../../../math/utils/arithmetic/factorial.js";
6
+ import { multiply } from "../operators/multiplyNode.js";
7
+ import { isOperatorNode } from "../operators/operatorNode.js";
6
8
  export function isFactorialNode(a) {
7
9
  return isFunctionNode(a) && a.id === FunctionsIds.factorial;
8
10
  }
@@ -41,7 +43,13 @@ export class FactorialNode {
41
43
  throw new Error("unimplemented");
42
44
  }
43
45
  toTex(opts) {
44
- return `${this.child.toTex(opts)}!`;
46
+ const child = this.child;
47
+ if (isOperatorNode(child)) {
48
+ return `(${this.child.toTex(opts)})!`;
49
+ }
50
+ else {
51
+ return `${this.child.toTex(opts)}!`;
52
+ }
45
53
  }
46
54
  // toMathjs() {
47
55
  // return abs(this.child.toMathjs());
@@ -54,6 +62,13 @@ export class FactorialNode {
54
62
  });
55
63
  return res;
56
64
  }
65
+ toMultiplyNode() {
66
+ const valueChild = this.child.evaluate();
67
+ return [...Array(valueChild).keys()]
68
+ .map((i) => i + 1)
69
+ .map((v) => v.toTree())
70
+ .reduce((acc, x) => multiply(acc, x));
71
+ }
57
72
  toAllValidTexs() {
58
73
  return this.toEquivalentNodes().map((node) => node.toTex());
59
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"logNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/logNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAOrE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AACD,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAOpD,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,mBAAmB,IAAI,MAAM;IAG7B,KAAK,IAAI,MAAM;IAaf,iBAAiB,IAAI,aAAa,EAAE;IAQpC,mBAAmB;IAOnB,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,GAAG,aAAa;IAoC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGtC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAGpC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAGxD,UAAU,IAAI,aAAa;CAG5B"}
1
+ {"version":3,"file":"logNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/logNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQrE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AACD,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAOpD,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,mBAAmB,IAAI,MAAM;IAG7B,KAAK,IAAI,MAAM;IAaf,iBAAiB,IAAI,aAAa,EAAE;IAQpC,mBAAmB;IAOnB,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,GAAG,aAAa;IAoC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGtC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAGpC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAGxD,UAAU,IAAI,aAAa;CAG5B"}
@@ -7,6 +7,7 @@ import { NumberNode, isNumberNode } from "../numbers/numberNode.js";
7
7
  import { isInt } from "../../../utils/isInt.js";
8
8
  import { isExpNode } from "./expNode.js";
9
9
  import { maxPowerDecomposition } from "../../../math/utils/arithmetic/maxPowerDecomposition.js";
10
+ import { frac } from "../operators/fractionNode.js";
10
11
  export function isLogNode(a) {
11
12
  return isFunctionNode(a) && a.id === FunctionsIds.log;
12
13
  }
@@ -110,6 +111,6 @@ export class LogNode {
110
111
  return new LogNode(this.child.toDetailedEvaluation(vars));
111
112
  }
112
113
  derivative() {
113
- throw new Error("unimplemented derivative");
114
+ return frac(this.child.derivative(), this.child);
114
115
  }
115
116
  }