math-exercises 3.0.170 → 3.0.172

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 (276) hide show
  1. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.js +38 -10
  2. package/lib/exercises/math/derivation/variations/signVarTableFromDerivativeGraph.d.ts.map +1 -1
  3. package/lib/exercises/math/derivation/variations/signVarTableFromDerivativeGraph.js +7 -4
  4. package/lib/exercises/math/derivation/variations/signVarTableFromGraph.d.ts.map +1 -1
  5. package/lib/exercises/math/derivation/variations/signVarTableFromGraph.js +2 -3
  6. package/lib/exercises/math/functions/trinoms/problems/index.d.ts +1 -0
  7. package/lib/exercises/math/functions/trinoms/problems/index.d.ts.map +1 -1
  8. package/lib/exercises/math/functions/trinoms/problems/index.js +1 -0
  9. package/lib/exercises/math/functions/trinoms/problems/rectangleSizesFromPerimeterAndArea.d.ts +9 -0
  10. package/lib/exercises/math/functions/trinoms/problems/rectangleSizesFromPerimeterAndArea.d.ts.map +1 -0
  11. package/lib/exercises/math/functions/trinoms/problems/rectangleSizesFromPerimeterAndArea.js +202 -0
  12. package/lib/exercises/math/functions/variations/partialVarTableFromGraph.d.ts.map +1 -1
  13. package/lib/exercises/math/functions/variations/partialVarTableFromGraph.js +2 -1
  14. package/lib/exercises/math/functions/variations/varTableFromGraph.d.ts.map +1 -1
  15. package/lib/exercises/math/functions/variations/varTableFromGraph.js +2 -1
  16. package/lib/exercises/math/functions/variations/varTableFromSentences.d.ts.map +1 -1
  17. package/lib/exercises/math/functions/variations/varTableFromSentences.js +2 -1
  18. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.d.ts.map +1 -1
  19. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.js +0 -2
  20. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts.map +1 -1
  21. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +64 -60
  22. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts +1 -0
  23. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map +1 -1
  24. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.js +173 -47
  25. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts.map +1 -1
  26. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +112 -46
  27. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.js +1 -1
  28. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts.map +1 -1
  29. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.js +6 -0
  30. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts.map +1 -1
  31. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.js +60 -82
  32. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.d.ts.map +1 -1
  33. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +92 -6
  34. package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts +6 -1
  35. package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts.map +1 -1
  36. package/lib/exercises/math/geometry/vectors/scalarProduct/index.js +6 -1
  37. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts.map +1 -1
  38. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.js +6 -0
  39. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.js +1 -1
  40. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts.map +1 -1
  41. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.js +15 -5
  42. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts.map +1 -1
  43. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.js +18 -14
  44. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts.map +1 -1
  45. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.js +15 -5
  46. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts.map +1 -1
  47. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.js +38 -4
  48. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts.map +1 -1
  49. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.js +77 -26
  50. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts.map +1 -1
  51. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.js +6 -7
  52. package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.js +1 -1
  53. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  54. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +3 -16
  55. package/lib/exercises/math/probaStat/randomVariable/calculateProbaFromVATableLaw.d.ts +11 -0
  56. package/lib/exercises/math/probaStat/randomVariable/calculateProbaFromVATableLaw.d.ts.map +1 -0
  57. package/lib/exercises/math/probaStat/randomVariable/calculateProbaFromVATableLaw.js +232 -0
  58. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts +14 -0
  59. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts.map +1 -0
  60. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.js +167 -0
  61. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -1
  62. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +29 -56
  63. package/lib/exercises/math/probaStat/randomVariable/index.d.ts +8 -0
  64. package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
  65. package/lib/exercises/math/probaStat/randomVariable/index.js +9 -0
  66. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.d.ts.map +1 -1
  67. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.js +6 -6
  68. package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.js +1 -1
  69. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.d.ts +9 -0
  70. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.d.ts.map +1 -0
  71. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.js +116 -0
  72. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts +11 -0
  73. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts.map +1 -0
  74. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.js +112 -0
  75. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts +9 -0
  76. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts.map +1 -0
  77. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.js +176 -0
  78. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts +8 -0
  79. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts.map +1 -0
  80. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.js +94 -0
  81. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts +9 -0
  82. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -0
  83. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +162 -0
  84. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts +8 -0
  85. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts.map +1 -0
  86. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.js +133 -0
  87. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts +8 -0
  88. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts.map +1 -0
  89. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.js +211 -0
  90. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts +8 -0
  91. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts.map +1 -0
  92. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.js +113 -0
  93. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
  94. package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.js +1 -1
  95. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.d.ts +31 -0
  96. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.d.ts.map +1 -0
  97. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.js +192 -0
  98. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts +40 -11
  99. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
  100. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +172 -30
  101. package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -1
  102. package/lib/exercises/math/probaStat/stats1var/medianWithList.js +16 -2
  103. package/lib/exercises/math/sequences/arithmetic/arithmeticVariations.js +1 -1
  104. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.d.ts.map +1 -1
  105. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.js +0 -2
  106. package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
  107. package/lib/exercises/vea/rationalVEA.js +7 -3
  108. package/lib/exercises/vea/varLineVEA.d.ts.map +1 -1
  109. package/lib/exercises/vea/varLineVEA.js +2 -1
  110. package/lib/exercises/vea/varSignTableVEA.d.ts +8 -0
  111. package/lib/exercises/vea/varSignTableVEA.d.ts.map +1 -1
  112. package/lib/exercises/vea/varSignTableVEA.js +8 -0
  113. package/lib/exercises/vea/xTableLineVEA.d.ts +1 -0
  114. package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -1
  115. package/lib/exercises/vea/xTableLineVEA.js +1 -0
  116. package/lib/index.d.ts +86 -3
  117. package/lib/index.d.ts.map +1 -1
  118. package/lib/latexTester.d.ts.map +1 -1
  119. package/lib/latexTester.js +3 -1
  120. package/lib/math/geometry/angle.d.ts +2 -0
  121. package/lib/math/geometry/angle.d.ts.map +1 -1
  122. package/lib/math/geometry/angle.js +17 -0
  123. package/lib/math/geometry/point.js +2 -2
  124. package/lib/math/geometry/segment.js +1 -1
  125. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  126. package/lib/math/numbers/reals/real.js +4 -0
  127. package/lib/math/probability/randomVariable.d.ts +2 -1
  128. package/lib/math/probability/randomVariable.d.ts.map +1 -1
  129. package/lib/math/probability/randomVariable.js +7 -1
  130. package/lib/math/utils/arithmetic/primeFactors.d.ts +1 -1
  131. package/lib/math/utils/arithmetic/primeFactors.d.ts.map +1 -1
  132. package/lib/math/utils/arithmetic/primeFactors.js +23 -9
  133. package/lib/math/utils/random/randTupleInt.d.ts +1 -0
  134. package/lib/math/utils/random/randTupleInt.d.ts.map +1 -1
  135. package/lib/math/utils/random/randTupleInt.js +3 -0
  136. package/lib/tests/exosTest.d.ts.map +1 -1
  137. package/lib/tests/exosTest.js +2 -0
  138. package/lib/tests/pdfs/mdTableToLatexTabular.js +1 -1
  139. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  140. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  141. package/lib/tree/nodes/complex/complexNode.d.ts +1 -0
  142. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  143. package/lib/tree/nodes/complex/complexNode.js +3 -0
  144. package/lib/tree/nodes/equations/equalNode.d.ts +1 -0
  145. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  146. package/lib/tree/nodes/equations/equalNode.js +3 -0
  147. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +1 -0
  148. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  149. package/lib/tree/nodes/equations/equationSolutionNode.js +3 -0
  150. package/lib/tree/nodes/equations/multiEqualNode.d.ts +1 -0
  151. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
  152. package/lib/tree/nodes/equations/multiEqualNode.js +3 -0
  153. package/lib/tree/nodes/equations/notEqualNode.d.ts +1 -0
  154. package/lib/tree/nodes/equations/notEqualNode.d.ts.map +1 -1
  155. package/lib/tree/nodes/equations/notEqualNode.js +3 -0
  156. package/lib/tree/nodes/functions/absNode.d.ts +1 -0
  157. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  158. package/lib/tree/nodes/functions/absNode.js +7 -0
  159. package/lib/tree/nodes/functions/arcSinNode.d.ts +1 -0
  160. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
  161. package/lib/tree/nodes/functions/arcSinNode.js +7 -0
  162. package/lib/tree/nodes/functions/arccosNode.d.ts +1 -0
  163. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
  164. package/lib/tree/nodes/functions/arccosNode.js +7 -0
  165. package/lib/tree/nodes/functions/arctanNode.d.ts +1 -0
  166. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
  167. package/lib/tree/nodes/functions/arctanNode.js +7 -0
  168. package/lib/tree/nodes/functions/cosNode.d.ts +1 -0
  169. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  170. package/lib/tree/nodes/functions/cosNode.js +7 -0
  171. package/lib/tree/nodes/functions/expNode.d.ts +1 -0
  172. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  173. package/lib/tree/nodes/functions/expNode.js +7 -0
  174. package/lib/tree/nodes/functions/factorialNode.d.ts +30 -0
  175. package/lib/tree/nodes/functions/factorialNode.d.ts.map +1 -0
  176. package/lib/tree/nodes/functions/factorialNode.js +79 -0
  177. package/lib/tree/nodes/functions/functionNode.d.ts +2 -1
  178. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
  179. package/lib/tree/nodes/functions/functionNode.js +1 -0
  180. package/lib/tree/nodes/functions/integralNode.d.ts +1 -0
  181. package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
  182. package/lib/tree/nodes/functions/integralNode.js +7 -0
  183. package/lib/tree/nodes/functions/log10Node.d.ts +1 -0
  184. package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
  185. package/lib/tree/nodes/functions/log10Node.js +7 -0
  186. package/lib/tree/nodes/functions/logNode.d.ts +1 -0
  187. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  188. package/lib/tree/nodes/functions/logNode.js +9 -0
  189. package/lib/tree/nodes/functions/oppositeNode.d.ts +1 -0
  190. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  191. package/lib/tree/nodes/functions/oppositeNode.js +7 -0
  192. package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
  193. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  194. package/lib/tree/nodes/functions/sinNode.js +7 -0
  195. package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -0
  196. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  197. package/lib/tree/nodes/functions/sqrtNode.js +7 -0
  198. package/lib/tree/nodes/functions/tanNode.d.ts +1 -0
  199. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
  200. package/lib/tree/nodes/functions/tanNode.js +7 -0
  201. package/lib/tree/nodes/geometry/degree.d.ts +1 -0
  202. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  203. package/lib/tree/nodes/geometry/degree.js +7 -0
  204. package/lib/tree/nodes/geometry/lengthNode.d.ts +1 -0
  205. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
  206. package/lib/tree/nodes/geometry/lengthNode.js +7 -0
  207. package/lib/tree/nodes/geometry/pointNode.d.ts +1 -0
  208. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
  209. package/lib/tree/nodes/geometry/pointNode.js +7 -0
  210. package/lib/tree/nodes/geometry/vectorNode.d.ts +1 -0
  211. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
  212. package/lib/tree/nodes/geometry/vectorNode.js +7 -0
  213. package/lib/tree/nodes/inequations/inequationNode.d.ts +1 -0
  214. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
  215. package/lib/tree/nodes/inequations/inequationNode.js +7 -0
  216. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +1 -0
  217. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  218. package/lib/tree/nodes/inequations/inequationSolutionNode.js +7 -0
  219. package/lib/tree/nodes/node.d.ts +2 -1
  220. package/lib/tree/nodes/node.d.ts.map +1 -1
  221. package/lib/tree/nodes/node.js +2 -0
  222. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
  223. package/lib/tree/nodes/nodeConstructor.js +4 -0
  224. package/lib/tree/nodes/numbers/percentNode.d.ts +1 -0
  225. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
  226. package/lib/tree/nodes/numbers/percentNode.js +7 -0
  227. package/lib/tree/nodes/operators/addNode.d.ts +1 -0
  228. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  229. package/lib/tree/nodes/operators/addNode.js +7 -0
  230. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -1
  231. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
  232. package/lib/tree/nodes/operators/binomialCoefficientNode.js +18 -2
  233. package/lib/tree/nodes/operators/divideNode.d.ts +1 -0
  234. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  235. package/lib/tree/nodes/operators/divideNode.js +7 -0
  236. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -0
  237. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  238. package/lib/tree/nodes/operators/fractionNode.js +7 -0
  239. package/lib/tree/nodes/operators/limitNode.d.ts +1 -0
  240. package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
  241. package/lib/tree/nodes/operators/limitNode.js +7 -0
  242. package/lib/tree/nodes/operators/multiplyNode.d.ts +1 -0
  243. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  244. package/lib/tree/nodes/operators/multiplyNode.js +7 -0
  245. package/lib/tree/nodes/operators/powerNode.d.ts +1 -0
  246. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  247. package/lib/tree/nodes/operators/powerNode.js +7 -0
  248. package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
  249. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  250. package/lib/tree/nodes/operators/substractNode.js +7 -0
  251. package/lib/tree/nodes/polynomials/monomNode.d.ts +1 -0
  252. package/lib/tree/nodes/polynomials/monomNode.d.ts.map +1 -1
  253. package/lib/tree/nodes/polynomials/monomNode.js +7 -0
  254. package/lib/tree/nodes/polynomials/trinomNode.d.ts +1 -0
  255. package/lib/tree/nodes/polynomials/trinomNode.d.ts.map +1 -1
  256. package/lib/tree/nodes/polynomials/trinomNode.js +7 -0
  257. package/lib/tree/nodes/sets/belongsNode.d.ts +1 -0
  258. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
  259. package/lib/tree/nodes/sets/belongsNode.js +7 -0
  260. package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
  261. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  262. package/lib/tree/nodes/sets/discreteSetNode.js +7 -0
  263. package/lib/tree/nodes/sets/intervalNode.d.ts +1 -0
  264. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  265. package/lib/tree/nodes/sets/intervalNode.js +7 -0
  266. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +1 -0
  267. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
  268. package/lib/tree/nodes/sets/unionIntervalNode.js +7 -0
  269. package/lib/tree/nodes/variables/variableNode.d.ts +1 -0
  270. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  271. package/lib/tree/nodes/variables/variableNode.js +7 -0
  272. package/lib/tree/utilities/nodeShuffler.d.ts.map +1 -1
  273. package/lib/tree/utilities/nodeShuffler.js +3 -0
  274. package/lib/tree/utilities/nodeSimplifier.d.ts.map +1 -1
  275. package/lib/tree/utilities/nodeSimplifier.js +3 -0
  276. package/package.json +1 -1
@@ -8,6 +8,9 @@
8
8
  // GetQuestionFromIdentifiers,
9
9
  // GetAnswerTable,
10
10
  // TableVEA,
11
+ // GeneratorOption,
12
+ // GeneratorOptionTarget,
13
+ // GeneratorOptionType,
11
14
  // } from "../../../../exercises/exercise.js";
12
15
  // import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
13
16
  // import { varSignTableVEA } from "../../../../exercises/vea/varSignTableVEA.js";
@@ -128,7 +131,7 @@ export {};
128
131
  // const signWords = a > 0 ? ["négative", "positive"] : ["positive", "négative"];
129
132
  // return `On calcule $f'$ :
130
133
  // $$
131
- // f'(x) = ${poly.derivative().toTex()} = ${poly.derivative().simplify().toTex()}
134
+ // f'(x) = ${poly.derivative().simplify().toTex()}
132
135
  // $$
133
136
  // On détermine ensuite le signe de $f'(x)$ :
134
137
  // ${alignTex([
@@ -153,36 +156,60 @@ export {};
153
156
  // return handleVEAError(err);
154
157
  // }
155
158
  // };
156
- // const getSignVarTableTrinomQuestion: QuestionGenerator<Identifiers> = () => {
159
+ // const getSignVarTableTrinomQuestion: QuestionGenerator<Identifiers, Options> = (
160
+ // opts,
161
+ // ) => {
157
162
  // const trinom = TrinomConstructor.randomNiceRoots();
158
163
  // const identifiers: Identifiers = {
159
164
  // a: trinom.a,
160
165
  // b: trinom.b,
161
166
  // c: trinom.c,
162
167
  // };
163
- // return getQuestionFromIdentifiers(identifiers);
168
+ // return getQuestionFromIdentifiers(identifiers, opts);
164
169
  // };
165
- // const getQuestionFromIdentifiers: GetQuestionFromIdentifiers<Identifiers> = (
166
- // identifiers,
167
- // ) => {
170
+ // const getQuestionFromIdentifiers: GetQuestionFromIdentifiers<
171
+ // Identifiers,
172
+ // Options
173
+ // > = (identifiers, opts) => {
168
174
  // return {
169
175
  // answerTable: getAnswerTable(identifiers),
170
- // instruction: getInstruction(identifiers),
176
+ // instruction: getInstruction(identifiers, opts),
171
177
  // keys: getKeys(identifiers),
172
178
  // answerFormat: "tex",
173
179
  // identifiers,
174
180
  // hint: getHint(identifiers),
175
- // correction: getCorrection(identifiers),
181
+ // correction: getCorrection(identifiers, opts),
176
182
  // initTable: [
177
183
  // ["$x$", "", "\\ ", "", "\\ ", "", "\\ ", ""],
178
184
  // ["$f'(x)$", "\\ ", "", "", "", "", "", "\\ "],
179
185
  // ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
180
- // ["$f(x)$", "\\ ", "", "", "", "", "", "\\ "],
186
+ // [
187
+ // "$f(x)$",
188
+ // "\\ ",
189
+ // "",
190
+ // opts?.askImages ? "" : "\\ ",
191
+ // "",
192
+ // opts?.askImages ? "" : "\\ ",
193
+ // "",
194
+ // "\\ ",
195
+ // ],
181
196
  // ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
182
197
  // ],
183
198
  // };
184
199
  // };
185
- // export const signVarTable3dDegree: Exercise<Identifiers> = {
200
+ // type Options = {
201
+ // askImages: boolean;
202
+ // };
203
+ // const options: GeneratorOption[] = [
204
+ // {
205
+ // id: "askImages",
206
+ // label: "Demander les ordonnées des extrema locaux",
207
+ // target: GeneratorOptionTarget.answer,
208
+ // type: GeneratorOptionType.checkbox,
209
+ // defaultValue: false,
210
+ // },
211
+ // ];
212
+ // export const signVarTable3dDegree: Exercise<Identifiers, Options> = {
186
213
  // id: "signVarTable3dDegree",
187
214
  // label:
188
215
  // "Dresser le tableau de signes de $f'$ et de variations de $f$ pour une fonction polynôme de degré trois",
@@ -200,4 +227,5 @@ export {};
200
227
  // getQuestionFromIdentifiers,
201
228
  // hasHintAndCorrection: true,
202
229
  // answerType: "signVarTable",
230
+ // options,
203
231
  // };
@@ -1 +1 @@
1
- {"version":3,"file":"signVarTableFromDerivativeGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/signVarTableFromDerivativeGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AA4JF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAmBjE,CAAC"}
1
+ {"version":3,"file":"signVarTableFromDerivativeGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/signVarTableFromDerivativeGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AA4JF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAmBjE,CAAC"}
@@ -1,4 +1,7 @@
1
1
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
2
+ import { signLineVEA } from "../../../../exercises/vea/signLineVEA.js";
3
+ import { varLineVEA } from "../../../../exercises/vea/varLineVEA.js";
4
+ import { xTableLineVEA } from "../../../../exercises/vea/xTableLineVEA.js";
2
5
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
3
6
  import { Polynomial } from "../../../../math/polynomials/polynomial.js";
4
7
  import { randint } from "../../../../math/utils/random/randint.js";
@@ -87,9 +90,9 @@ const getKeys = () => {
87
90
  };
88
91
  const isAnswerTableValid = (ans, { answerTable }) => {
89
92
  try {
90
- return ans.every((row, i) => row.every((cell, j) => {
91
- return cell === answerTable[i][j];
92
- }));
93
+ return (xTableLineVEA(ans[0], answerTable[0]) &&
94
+ signLineVEA(ans[1], answerTable[1]) &&
95
+ varLineVEA(ans.slice(2), answerTable.slice(2)));
93
96
  }
94
97
  catch (err) {
95
98
  return handleVEAError(err);
@@ -120,7 +123,7 @@ const getVarSignTableFromGraphQuestion = () => {
120
123
  ["$x$", "-\\infty", "\\ ", "", "\\ ", "", "\\ ", "+\\infty"],
121
124
  ["$f'(x)$", "\\ ", "", "", "", "", "", "\\ "],
122
125
  ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
123
- ["$f(x)$", "\\ ", "", "", "", "", "", "\\ "],
126
+ ["$f(x)$", "\\ ", "", "\\ ", "", "\\ ", "", "\\ "],
124
127
  ["$\\ $", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ ", "\\ "],
125
128
  ];
126
129
  const identifiers = {
@@ -1 +1 @@
1
- {"version":3,"file":"signVarTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/signVarTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAsLF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAmBvD,CAAC"}
1
+ {"version":3,"file":"signVarTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/variations/signVarTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAkLF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAmBvD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
2
+ import { varSignTableVEA } from "../../../../exercises/vea/varSignTableVEA.js";
2
3
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
3
4
  import { Polynomial } from "../../../../math/polynomials/polynomial.js";
4
5
  import { randint } from "../../../../math/utils/random/randint.js";
@@ -113,9 +114,7 @@ const getKeys = () => {
113
114
  };
114
115
  const isAnswerTableValid = (ans, { answerTable }) => {
115
116
  try {
116
- return ans.every((row, i) => row.every((cell, j) => {
117
- return cell === answerTable[i][j];
118
- }));
117
+ return varSignTableVEA(ans, answerTable);
119
118
  }
120
119
  catch (err) {
121
120
  return handleVEAError(err);
@@ -1,3 +1,4 @@
1
1
  export * from "./swedishFlag.js";
2
2
  export * from "./maxSurfaceForGivenClosure.js";
3
+ export * from "./rectangleSizesFromPerimeterAndArea.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/problems/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/problems/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./swedishFlag.js";
2
2
  export * from "./maxSurfaceForGivenClosure.js";
3
+ export * from "./rectangleSizesFromPerimeterAndArea.js";
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ perimeterIds: NodeIdentifiers;
5
+ areaIds: NodeIdentifiers;
6
+ };
7
+ export declare const rectangleSizesFromPerimeterAndArea: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=rectangleSizesFromPerimeterAndArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rectangleSizesFromPerimeterAndArea.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/functions/trinoms/problems/rectangleSizesFromPerimeterAndArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAqMF,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,WAAW,CAqBpE,CAAC"}
@@ -0,0 +1,202 @@
1
+ import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { numberVEA } from "../../../../../exercises/vea/numberVEA.js";
4
+ import { randint } from "../../../../../math/utils/random/randint.js";
5
+ import { opposite } from "../../../../../tree/nodes/functions/oppositeNode.js";
6
+ import { sqrt } from "../../../../../tree/nodes/functions/sqrtNode.js";
7
+ import { reifyAlgebraic, } from "../../../../../tree/nodes/nodeConstructor.js";
8
+ import { add } from "../../../../../tree/nodes/operators/addNode.js";
9
+ import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
10
+ import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
11
+ import { square } from "../../../../../tree/nodes/operators/powerNode.js";
12
+ import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
13
+ import { valueParser } from "../../../../../tree/parsers/valueParser.js";
14
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
15
+ const getPropositions = (n, { answer }) => {
16
+ const propositions = [];
17
+ addValidProp(propositions, answer);
18
+ propWhile(propositions, n, () => {
19
+ const a = randint(1, 10);
20
+ const b = randint(a + 1, a + 10);
21
+ tryToAddWrongProp(propositions, `${a}\\text{ et }${b}`);
22
+ });
23
+ return shuffleProps(propositions, n);
24
+ };
25
+ const getAnswer = (identifiers) => {
26
+ const { areaIds, perimeterIds } = identifiers;
27
+ const area = reifyAlgebraic(areaIds);
28
+ const perimeter = reifyAlgebraic(perimeterIds);
29
+ const halfPerimeter = frac(perimeter, 2);
30
+ const yByX = substract(halfPerimeter, "x");
31
+ const a = (-1).toTree();
32
+ const b = halfPerimeter;
33
+ const c = opposite(area);
34
+ const delta = substract(square(b), multiply(4, multiply(a, c))).simplify();
35
+ const x1 = frac(substract(opposite(b), sqrt(delta)), multiply(2, a)).simplify();
36
+ const x = x1;
37
+ const y = yByX.toDetailedEvaluation({ x: x }).simplify();
38
+ const ordered = x.evaluate() < y.evaluate() ? [x, y] : [y, x];
39
+ return `${ordered[0].toTex()}\\text{ et }${ordered[1].toTex()}`;
40
+ };
41
+ const getInstruction = (identifiers) => {
42
+ const { areaIds, perimeterIds } = identifiers;
43
+ const area = reifyAlgebraic(areaIds);
44
+ const perimeter = reifyAlgebraic(perimeterIds);
45
+ return `On considère un rectangle de périmètre $${perimeter.toTex()}$ et d'aire $${area.toTex()}$.
46
+
47
+ Déterminer la longueur et la largeur de ce rectangle.`;
48
+ };
49
+ const getHint = () => {
50
+ return `Nomme $x$ et $y$ la longueur et la largeur du rectangle.
51
+
52
+ À l'aide du périmètre et de l'aire du rectangle, cela te donnera deux équations d'inconnues $x$ et $y$.
53
+
54
+ Utilise l'une des équations pour écrire $y$ en fonction de $x$.
55
+
56
+ Puis, réécris l'autre équation en utilisant ce résultat.
57
+
58
+ Tu obtiendras alors une équation du second degré, que tu peux résoudre en utilisant le discriminant.`;
59
+ };
60
+ const getCorrection = (identifiers) => {
61
+ const { areaIds, perimeterIds } = identifiers;
62
+ const perimeter = reifyAlgebraic(perimeterIds);
63
+ const halfPerimeter = frac(perimeter, 2).simplify();
64
+ const area = reifyAlgebraic(areaIds);
65
+ const yByX = substract(halfPerimeter, "x");
66
+ const a = (-1).toTree();
67
+ const b = halfPerimeter;
68
+ const c = opposite(area);
69
+ const delta = substract(square(b), multiply(4, multiply(a, c))).simplify();
70
+ const x1 = frac(substract(opposite(b), sqrt(delta)), multiply(2, a)).simplify();
71
+ const x2 = frac(add(opposite(b), sqrt(delta)), multiply(2, a)).simplify();
72
+ const x = x1;
73
+ const y = yByX.toDetailedEvaluation({ x: x }).simplify();
74
+ const oredered = x.evaluate() < y.evaluate() ? [x, y] : [y, x];
75
+ return `On note $x$ et $y$ les dimensions du rectangle. On a alors :
76
+
77
+ $$
78
+ 2x+2y = ${perimeter.toTex()}
79
+ $$
80
+
81
+ d'où
82
+
83
+ $$
84
+ x+y = ${halfPerimeter.toTex()}
85
+ $$
86
+
87
+ et
88
+
89
+
90
+ $$
91
+ xy = ${area.toTex()}
92
+ $$
93
+
94
+ La première équation permet d'exprimer $y$ en fonction de $x$ :
95
+
96
+ $$
97
+ y = ${halfPerimeter.toTex()} - x
98
+ $$
99
+
100
+ On injecte cela dans la deuxième équation :
101
+
102
+ $$
103
+ ${multiply("x", yByX).toTex()} = ${area.toTex()}
104
+ $$
105
+
106
+ Cela nous donne une équation du second degré :
107
+
108
+ $$
109
+ ${substract(multiply("x", yByX), area)
110
+ .simplify({
111
+ towardsDistribute: true,
112
+ forbidFactorize: true,
113
+ })
114
+ .toTex()}=0
115
+ $$
116
+
117
+ On calcule le discriminant :
118
+
119
+ $$
120
+ \\Delta = ${substract(square(b), multiply(4, multiply(a, c))).toSimplificationTex()}
121
+ $$
122
+
123
+ Il y a donc deux solutions :
124
+
125
+ $$
126
+ x_1 = ${frac(substract(opposite(b), sqrt(delta)), multiply(2, a)).toSimplificationTex()}
127
+ $$
128
+
129
+ ce qui donne $y = ${yByX
130
+ .toDetailedEvaluation({ x: x1 })
131
+ .toSimplificationTex()}$ ; et :
132
+
133
+ $$
134
+ x_2 = ${frac(add(opposite(b), sqrt(delta)), multiply(2, a)).toSimplificationTex()}
135
+ $$
136
+
137
+ ce qui donne $y = ${yByX
138
+ .toDetailedEvaluation({ x: x2 })
139
+ .toSimplificationTex()}$.
140
+
141
+ La largeur du rectangle est donc $${oredered[0].toTex()}$ et sa longueur est $${oredered[1].toTex()}$.
142
+ `;
143
+ };
144
+ const getKeys = () => {
145
+ return ["et"];
146
+ };
147
+ const isAnswerValid = (ans, { answer }) => {
148
+ try {
149
+ const answerValues = answer.split("\\text{ et }");
150
+ const values = ans.includes("et")
151
+ ? ans.split("\\text{ et }")
152
+ : ans.split(",");
153
+ const parsed = values.map((e) => valueParser(e));
154
+ if (parsed.some((e) => e === false))
155
+ return false;
156
+ return [...parsed]
157
+ .sort((a, b) => a - b)
158
+ .every((e, i) => numberVEA(e.frenchify(), answerValues[i]));
159
+ }
160
+ catch (err) {
161
+ return handleVEAError(err);
162
+ }
163
+ };
164
+ const getRectangleSizesFromPerimeterAndAreaQuestion = () => {
165
+ const largeur = randint(1, 10);
166
+ const longueur = randint(largeur + 1, largeur + 10);
167
+ const identifiers = {
168
+ perimeterIds: add(2 * longueur, 2 * largeur)
169
+ .simplify()
170
+ .toIdentifiers(),
171
+ areaIds: multiply(longueur, largeur).simplify().toIdentifiers(),
172
+ };
173
+ return getQuestionFromIdentifiers(identifiers);
174
+ };
175
+ const getQuestionFromIdentifiers = (identifiers) => {
176
+ return {
177
+ answer: getAnswer(identifiers),
178
+ instruction: getInstruction(identifiers),
179
+ keys: getKeys(identifiers),
180
+ answerFormat: "tex",
181
+ identifiers,
182
+ hint: getHint(identifiers),
183
+ correction: getCorrection(identifiers),
184
+ };
185
+ };
186
+ export const rectangleSizesFromPerimeterAndArea = {
187
+ id: "rectangleSizesFromPerimeterAndArea",
188
+ label: "Déterminer les dimensions d'un rectangle dont on connaît le périmètre et l'aire (second degré)",
189
+ isSingleStep: true,
190
+ generator: (nb, opts) => getDistinctQuestions(() => getRectangleSizesFromPerimeterAndAreaQuestion(opts), nb),
191
+ qcmTimer: 60,
192
+ freeTimer: 60,
193
+ getPropositions,
194
+ isAnswerValid,
195
+ subject: "Mathématiques",
196
+ getInstruction,
197
+ getHint,
198
+ getCorrection,
199
+ getAnswer,
200
+ getQuestionFromIdentifiers,
201
+ hasHintAndCorrection: true,
202
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"partialVarTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/partialVarTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA6LF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAmB1D,CAAC"}
1
+ {"version":3,"file":"partialVarTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/partialVarTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA2LF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAmB1D,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
2
+ import { varTableVEA } from "../../../../exercises/vea/varTableVEA.js";
2
3
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
3
4
  import { Polynomial } from "../../../../math/polynomials/polynomial.js";
4
5
  import { randint } from "../../../../math/utils/random/randint.js";
@@ -111,7 +112,7 @@ const getKeys = () => {
111
112
  };
112
113
  const isAnswerTableValid = (ans, { answerTable }) => {
113
114
  try {
114
- return ans.every((row, i) => row.every((cell, j) => cell === answerTable[i][j]));
115
+ return varTableVEA(ans, answerTable);
115
116
  }
116
117
  catch (err) {
117
118
  return handleVEAError(err);
@@ -1 +1 @@
1
- {"version":3,"file":"varTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AA0KF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAmBnD,CAAC"}
1
+ {"version":3,"file":"varTableFromGraph.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAwKF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAmBnD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
2
+ import { varTableVEA } from "../../../../exercises/vea/varTableVEA.js";
2
3
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
3
4
  import { Polynomial } from "../../../../math/polynomials/polynomial.js";
4
5
  import { randint } from "../../../../math/utils/random/randint.js";
@@ -106,7 +107,7 @@ const getKeys = () => {
106
107
  };
107
108
  const isAnswerTableValid = (ans, { answerTable }) => {
108
109
  try {
109
- return ans.every((row, i) => row.every((cell, j) => cell === answerTable[i][j]));
110
+ return varTableVEA(ans, answerTable);
110
111
  }
111
112
  catch (err) {
112
113
  return handleVEAError(err);
@@ -1 +1 @@
1
- {"version":3,"file":"varTableFromSentences.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableFromSentences.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAI7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,EAAE,EAAE,eAAe,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAwLF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAkBvD,CAAC"}
1
+ {"version":3,"file":"varTableFromSentences.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableFromSentences.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAI7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,EAAE,EAAE,eAAe,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;CACvB,CAAC;AAsLF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAkBvD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
2
+ import { varTableVEA } from "../../../../exercises/vea/varTableVEA.js";
2
3
  import { randint } from "../../../../math/utils/random/randint.js";
3
4
  import { randTupleInt } from "../../../../math/utils/random/randTupleInt.js";
4
5
  import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
@@ -98,7 +99,7 @@ const getKeys = () => {
98
99
  };
99
100
  const isAnswerTableValid = (ans, { answerTable }) => {
100
101
  try {
101
- return ans.every((row, i) => row.every((cell, j) => cell === answerTable[i][j]));
102
+ return varTableVEA(ans, answerTable);
102
103
  }
103
104
  catch (err) {
104
105
  return handleVEAError(err);
@@ -1 +1 @@
1
- {"version":3,"file":"circleCenterAndRadiusFromEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAEL,oBAAoB,EACrB,MAAM,yCAAyC,CAAC;AAWjD,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC;AAqJF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAWF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAwB1E,CAAC"}
1
+ {"version":3,"file":"circleCenterAndRadiusFromEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAEL,oBAAoB,EACrB,MAAM,yCAAyC,CAAC;AAWjD,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC;AAmJF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAWF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAwB1E,CAAC"}
@@ -29,7 +29,6 @@ const getPropositions = (n, { answer, isAskingRadius }) => {
29
29
  const getAnswer = (identifiers) => {
30
30
  const { equationIds, isAskingRadius } = identifiers;
31
31
  const equation = reifyAlgebraic(equationIds);
32
- console.log(equation.toTex());
33
32
  if (isAskingRadius)
34
33
  return sqrt(equation.rightChild).simplify().toTex();
35
34
  const left = equation.leftChild;
@@ -112,7 +111,6 @@ const getCircleCenterAndRadiusFromEquationQuestion = (opts) => {
112
111
  ? randint(1, 10).toTree()
113
112
  : SquareRootConstructor.randomIrreductible(20).toTree();
114
113
  const eq = CircleConstructor.cartesianEquation(center, radius);
115
- console.log("rad ", radius.toTex(), "eq ", eq.toTex());
116
114
  const identifiers = {
117
115
  isAskingRadius,
118
116
  equationIds: eq.toIdentifiers(),
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductAlKashiAngle.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAEL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAkBnD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,mBAAmB,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAmSF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAoB3D,CAAC"}
1
+ {"version":3,"file":"scalarProductAlKashiAngle.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAyBnD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,mBAAmB,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA8SF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAmB3D,CAAC"}