math-exercises 3.0.171 → 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 (261) 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/variations/partialVarTableFromGraph.d.ts.map +1 -1
  7. package/lib/exercises/math/functions/variations/partialVarTableFromGraph.js +2 -1
  8. package/lib/exercises/math/functions/variations/varTableFromGraph.d.ts.map +1 -1
  9. package/lib/exercises/math/functions/variations/varTableFromGraph.js +2 -1
  10. package/lib/exercises/math/functions/variations/varTableFromSentences.d.ts.map +1 -1
  11. package/lib/exercises/math/functions/variations/varTableFromSentences.js +2 -1
  12. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.d.ts.map +1 -1
  13. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.js +0 -2
  14. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts.map +1 -1
  15. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +64 -60
  16. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts +1 -0
  17. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map +1 -1
  18. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.js +173 -47
  19. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts.map +1 -1
  20. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +112 -46
  21. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts.map +1 -1
  22. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.js +6 -0
  23. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts.map +1 -1
  24. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.js +60 -82
  25. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.d.ts.map +1 -1
  26. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +92 -6
  27. package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts +6 -1
  28. package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts.map +1 -1
  29. package/lib/exercises/math/geometry/vectors/scalarProduct/index.js +6 -1
  30. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts.map +1 -1
  31. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.js +6 -0
  32. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.js +1 -1
  33. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts.map +1 -1
  34. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.js +15 -5
  35. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts.map +1 -1
  36. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.js +18 -14
  37. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts.map +1 -1
  38. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.js +15 -5
  39. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts.map +1 -1
  40. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.js +38 -4
  41. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts.map +1 -1
  42. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.js +77 -26
  43. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts.map +1 -1
  44. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.js +6 -7
  45. package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.js +1 -1
  46. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  47. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +3 -16
  48. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts +14 -0
  49. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts.map +1 -0
  50. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.js +167 -0
  51. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -1
  52. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +29 -56
  53. package/lib/exercises/math/probaStat/randomVariable/index.d.ts +7 -0
  54. package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
  55. package/lib/exercises/math/probaStat/randomVariable/index.js +8 -0
  56. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.d.ts.map +1 -1
  57. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.js +6 -6
  58. package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.js +1 -1
  59. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.d.ts +9 -0
  60. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.d.ts.map +1 -0
  61. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.js +116 -0
  62. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts +11 -0
  63. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts.map +1 -0
  64. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.js +112 -0
  65. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts +9 -0
  66. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts.map +1 -0
  67. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.js +176 -0
  68. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts +8 -0
  69. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts.map +1 -0
  70. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.js +94 -0
  71. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts +9 -0
  72. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -0
  73. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +162 -0
  74. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts +8 -0
  75. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts.map +1 -0
  76. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.js +133 -0
  77. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts +8 -0
  78. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts.map +1 -0
  79. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.js +211 -0
  80. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts +8 -0
  81. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts.map +1 -0
  82. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.js +113 -0
  83. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
  84. package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.js +1 -1
  85. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.d.ts +31 -0
  86. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.d.ts.map +1 -0
  87. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.js +192 -0
  88. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts +40 -11
  89. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
  90. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +172 -30
  91. package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -1
  92. package/lib/exercises/math/probaStat/stats1var/medianWithList.js +16 -2
  93. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.d.ts.map +1 -1
  94. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.js +0 -2
  95. package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
  96. package/lib/exercises/vea/rationalVEA.js +7 -3
  97. package/lib/exercises/vea/varLineVEA.d.ts.map +1 -1
  98. package/lib/exercises/vea/varLineVEA.js +2 -1
  99. package/lib/exercises/vea/varSignTableVEA.d.ts +8 -0
  100. package/lib/exercises/vea/varSignTableVEA.d.ts.map +1 -1
  101. package/lib/exercises/vea/varSignTableVEA.js +8 -0
  102. package/lib/exercises/vea/xTableLineVEA.d.ts +1 -0
  103. package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -1
  104. package/lib/exercises/vea/xTableLineVEA.js +1 -0
  105. package/lib/index.d.ts +79 -3
  106. package/lib/index.d.ts.map +1 -1
  107. package/lib/latexTester.d.ts.map +1 -1
  108. package/lib/latexTester.js +3 -1
  109. package/lib/math/geometry/angle.d.ts +2 -0
  110. package/lib/math/geometry/angle.d.ts.map +1 -1
  111. package/lib/math/geometry/angle.js +17 -0
  112. package/lib/math/geometry/segment.js +1 -1
  113. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  114. package/lib/math/numbers/reals/real.js +4 -0
  115. package/lib/math/probability/randomVariable.d.ts +2 -1
  116. package/lib/math/probability/randomVariable.d.ts.map +1 -1
  117. package/lib/math/probability/randomVariable.js +7 -1
  118. package/lib/math/utils/arithmetic/primeFactors.d.ts +1 -1
  119. package/lib/math/utils/arithmetic/primeFactors.d.ts.map +1 -1
  120. package/lib/math/utils/arithmetic/primeFactors.js +23 -9
  121. package/lib/tests/exosTest.d.ts.map +1 -1
  122. package/lib/tests/exosTest.js +2 -0
  123. package/lib/tests/pdfs/mdTableToLatexTabular.js +1 -1
  124. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  125. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  126. package/lib/tree/nodes/complex/complexNode.d.ts +1 -0
  127. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  128. package/lib/tree/nodes/complex/complexNode.js +3 -0
  129. package/lib/tree/nodes/equations/equalNode.d.ts +1 -0
  130. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  131. package/lib/tree/nodes/equations/equalNode.js +3 -0
  132. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +1 -0
  133. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  134. package/lib/tree/nodes/equations/equationSolutionNode.js +3 -0
  135. package/lib/tree/nodes/equations/multiEqualNode.d.ts +1 -0
  136. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
  137. package/lib/tree/nodes/equations/multiEqualNode.js +3 -0
  138. package/lib/tree/nodes/equations/notEqualNode.d.ts +1 -0
  139. package/lib/tree/nodes/equations/notEqualNode.d.ts.map +1 -1
  140. package/lib/tree/nodes/equations/notEqualNode.js +3 -0
  141. package/lib/tree/nodes/functions/absNode.d.ts +1 -0
  142. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  143. package/lib/tree/nodes/functions/absNode.js +7 -0
  144. package/lib/tree/nodes/functions/arcSinNode.d.ts +1 -0
  145. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
  146. package/lib/tree/nodes/functions/arcSinNode.js +7 -0
  147. package/lib/tree/nodes/functions/arccosNode.d.ts +1 -0
  148. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
  149. package/lib/tree/nodes/functions/arccosNode.js +7 -0
  150. package/lib/tree/nodes/functions/arctanNode.d.ts +1 -0
  151. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
  152. package/lib/tree/nodes/functions/arctanNode.js +7 -0
  153. package/lib/tree/nodes/functions/cosNode.d.ts +1 -0
  154. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  155. package/lib/tree/nodes/functions/cosNode.js +7 -0
  156. package/lib/tree/nodes/functions/expNode.d.ts +1 -0
  157. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  158. package/lib/tree/nodes/functions/expNode.js +7 -0
  159. package/lib/tree/nodes/functions/factorialNode.d.ts +30 -0
  160. package/lib/tree/nodes/functions/factorialNode.d.ts.map +1 -0
  161. package/lib/tree/nodes/functions/factorialNode.js +79 -0
  162. package/lib/tree/nodes/functions/functionNode.d.ts +2 -1
  163. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
  164. package/lib/tree/nodes/functions/functionNode.js +1 -0
  165. package/lib/tree/nodes/functions/integralNode.d.ts +1 -0
  166. package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
  167. package/lib/tree/nodes/functions/integralNode.js +7 -0
  168. package/lib/tree/nodes/functions/log10Node.d.ts +1 -0
  169. package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
  170. package/lib/tree/nodes/functions/log10Node.js +7 -0
  171. package/lib/tree/nodes/functions/logNode.d.ts +1 -0
  172. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  173. package/lib/tree/nodes/functions/logNode.js +9 -0
  174. package/lib/tree/nodes/functions/oppositeNode.d.ts +1 -0
  175. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  176. package/lib/tree/nodes/functions/oppositeNode.js +7 -0
  177. package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
  178. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  179. package/lib/tree/nodes/functions/sinNode.js +7 -0
  180. package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -0
  181. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  182. package/lib/tree/nodes/functions/sqrtNode.js +7 -0
  183. package/lib/tree/nodes/functions/tanNode.d.ts +1 -0
  184. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
  185. package/lib/tree/nodes/functions/tanNode.js +7 -0
  186. package/lib/tree/nodes/geometry/degree.d.ts +1 -0
  187. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  188. package/lib/tree/nodes/geometry/degree.js +7 -0
  189. package/lib/tree/nodes/geometry/lengthNode.d.ts +1 -0
  190. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
  191. package/lib/tree/nodes/geometry/lengthNode.js +7 -0
  192. package/lib/tree/nodes/geometry/pointNode.d.ts +1 -0
  193. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
  194. package/lib/tree/nodes/geometry/pointNode.js +7 -0
  195. package/lib/tree/nodes/geometry/vectorNode.d.ts +1 -0
  196. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
  197. package/lib/tree/nodes/geometry/vectorNode.js +7 -0
  198. package/lib/tree/nodes/inequations/inequationNode.d.ts +1 -0
  199. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
  200. package/lib/tree/nodes/inequations/inequationNode.js +7 -0
  201. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +1 -0
  202. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  203. package/lib/tree/nodes/inequations/inequationSolutionNode.js +7 -0
  204. package/lib/tree/nodes/node.d.ts +2 -1
  205. package/lib/tree/nodes/node.d.ts.map +1 -1
  206. package/lib/tree/nodes/node.js +2 -0
  207. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
  208. package/lib/tree/nodes/nodeConstructor.js +4 -0
  209. package/lib/tree/nodes/numbers/percentNode.d.ts +1 -0
  210. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
  211. package/lib/tree/nodes/numbers/percentNode.js +7 -0
  212. package/lib/tree/nodes/operators/addNode.d.ts +1 -0
  213. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  214. package/lib/tree/nodes/operators/addNode.js +7 -0
  215. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -1
  216. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
  217. package/lib/tree/nodes/operators/binomialCoefficientNode.js +18 -2
  218. package/lib/tree/nodes/operators/divideNode.d.ts +1 -0
  219. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  220. package/lib/tree/nodes/operators/divideNode.js +7 -0
  221. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -0
  222. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  223. package/lib/tree/nodes/operators/fractionNode.js +7 -0
  224. package/lib/tree/nodes/operators/limitNode.d.ts +1 -0
  225. package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
  226. package/lib/tree/nodes/operators/limitNode.js +7 -0
  227. package/lib/tree/nodes/operators/multiplyNode.d.ts +1 -0
  228. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  229. package/lib/tree/nodes/operators/multiplyNode.js +7 -0
  230. package/lib/tree/nodes/operators/powerNode.d.ts +1 -0
  231. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  232. package/lib/tree/nodes/operators/powerNode.js +7 -0
  233. package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
  234. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  235. package/lib/tree/nodes/operators/substractNode.js +7 -0
  236. package/lib/tree/nodes/polynomials/monomNode.d.ts +1 -0
  237. package/lib/tree/nodes/polynomials/monomNode.d.ts.map +1 -1
  238. package/lib/tree/nodes/polynomials/monomNode.js +7 -0
  239. package/lib/tree/nodes/polynomials/trinomNode.d.ts +1 -0
  240. package/lib/tree/nodes/polynomials/trinomNode.d.ts.map +1 -1
  241. package/lib/tree/nodes/polynomials/trinomNode.js +7 -0
  242. package/lib/tree/nodes/sets/belongsNode.d.ts +1 -0
  243. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
  244. package/lib/tree/nodes/sets/belongsNode.js +7 -0
  245. package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
  246. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  247. package/lib/tree/nodes/sets/discreteSetNode.js +7 -0
  248. package/lib/tree/nodes/sets/intervalNode.d.ts +1 -0
  249. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  250. package/lib/tree/nodes/sets/intervalNode.js +7 -0
  251. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +1 -0
  252. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
  253. package/lib/tree/nodes/sets/unionIntervalNode.js +7 -0
  254. package/lib/tree/nodes/variables/variableNode.d.ts +1 -0
  255. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  256. package/lib/tree/nodes/variables/variableNode.js +7 -0
  257. package/lib/tree/utilities/nodeShuffler.d.ts.map +1 -1
  258. package/lib/tree/utilities/nodeShuffler.js +3 -0
  259. package/lib/tree/utilities/nodeSimplifier.d.ts.map +1 -1
  260. package/lib/tree/utilities/nodeSimplifier.js +3 -0
  261. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductLamdbaULambdaV.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAgB7C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAmSF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAMF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAsBtE,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAsBlE,CAAC"}
1
+ {"version":3,"file":"scalarProductLamdbaULambdaV.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAgB7C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AA+QF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAMF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAsBtE,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAsBlE,CAAC"}
@@ -1,18 +1,20 @@
1
1
  import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { rationalVEA } from "../../../../../../exercises/vea/rationalVEA.js";
3
4
  import { randint } from "../../../../../../math/utils/random/randint.js";
5
+ import { opposite } from "../../../../../../tree/nodes/functions/oppositeNode.js";
4
6
  import { NodeConstructor, } from "../../../../../../tree/nodes/nodeConstructor.js";
5
7
  import { isNumberNode } from "../../../../../../tree/nodes/numbers/numberNode.js";
6
8
  import { add } from "../../../../../../tree/nodes/operators/addNode.js";
7
9
  import { frac } from "../../../../../../tree/nodes/operators/fractionNode.js";
8
10
  import { multiply } from "../../../../../../tree/nodes/operators/multiplyNode.js";
9
11
  import { parseAlgebraic } from "../../../../../../tree/parsers/latexParser.js";
12
+ import { coinFlip } from "../../../../../../utils/alea/coinFlip.js";
10
13
  import { random } from "../../../../../../utils/alea/random.js";
11
14
  import { shuffle } from "../../../../../../utils/alea/shuffle.js";
12
15
  import { handleVEAError } from "../../../../../../utils/errors/handleVEAError.js";
13
- import { alignTex } from "../../../../../../utils/latex/alignTex.js";
14
16
  const parenthesesIfNeeded = (tex) => {
15
- const isShouldParentheses = tex.startsWith("-") || tex.startsWith("+");
17
+ const isShouldParentheses = tex.startsWith("-");
16
18
  return isShouldParentheses ? `(${tex})` : tex;
17
19
  };
18
20
  const getHydratedNodes = (identifiers) => {
@@ -25,16 +27,6 @@ const getHydratedNodes = (identifiers) => {
25
27
  };
26
28
  const getInstruction = (identifiers) => {
27
29
  const { nodeUDotV, nodeA, nodeB } = getHydratedNodes(identifiers);
28
- const texA = nodeA.evaluate() === -1
29
- ? "-"
30
- : nodeA.evaluate() === 1
31
- ? "+"
32
- : nodeA.toTex();
33
- const texB = nodeB.evaluate() === -1
34
- ? "-"
35
- : nodeB.evaluate() === 1
36
- ? "+"
37
- : nodeB.toTex();
38
30
  const u = "\\overrightarrow u";
39
31
  const v = "\\overrightarrow v";
40
32
  return `Soit $${u}$ et $${v}$ deux vecteurs tels que :
@@ -46,7 +38,7 @@ $$
46
38
  Calculer :
47
39
 
48
40
  $$
49
- ${parenthesesIfNeeded(`${texA}${u}`)} \\cdot ${parenthesesIfNeeded(`${texB}${v}`)}
41
+ ${multiply(nodeA, u.toTree()).toTex()} \\cdot ${parenthesesIfNeeded(multiply(nodeB, v.toTree()).toTex())}
50
42
  $$
51
43
 
52
44
  `;
@@ -58,57 +50,19 @@ const getAnswerNode = (identifiers) => {
58
50
  const getAnswer = (identifiers) => {
59
51
  return getAnswerNode(identifiers).simplify().toTex();
60
52
  };
61
- const getHint = (identifiers) => {
62
- const { nodeA, nodeB } = getHydratedNodes(identifiers);
63
- const isSignOnly = Math.abs(nodeA.evaluate()) === 1 && Math.abs(nodeB.evaluate()) === 1;
64
- if (isSignOnly) {
65
- return `Voici un calcul pour te mettre sur la piste :
66
-
67
- ${alignTex([
68
- [
69
- "",
70
- "\\overrightarrow{u} \\cdot \\overrightarrow{v} + ((-\\overrightarrow{u}) \\cdot \\overrightarrow{v})",
71
- ],
72
- [
73
- "=",
74
- "(\\overrightarrow{u} + (-\\overrightarrow{u})) \\cdot \\overrightarrow{v}",
75
- ],
76
- ["=", "(\\overrightarrow{0} \\cdot \\overrightarrow{v})"],
77
- ["=", "0"],
78
- ])}
79
-
80
- `;
81
- }
82
- else {
83
- return `Voici un calcul pour te mettre sur la piste :
84
-
85
- ${alignTex([
86
- [
87
- "",
88
- "(\\overrightarrow{u} + \\overrightarrow{u}) \\cdot \\overrightarrow{v}",
89
- ],
90
- [
91
- "=",
92
- "\\overrightarrow{u} \\cdot \\overrightarrow{v} + \\overrightarrow{u} \\cdot \\overrightarrow{v}",
93
- ],
94
- ["=", "2 (\\overrightarrow{u} \\cdot \\overrightarrow{v})"],
95
- ])}
53
+ const getHint = () => {
54
+ return `Le produit scalaire vérifie, pour $k$ et $k'$ réels :
55
+
56
+ $$
57
+ (k \\overrightarrow{u}) \\cdot \\overrightarrow{v} = k (\\overrightarrow{u} \\cdot \\overrightarrow{v})
58
+ $$
96
59
 
97
- `;
98
- }
60
+ $$
61
+ \\overrightarrow{u} \\cdot (k' \\overrightarrow{v}) = k' (\\overrightarrow{u} \\cdot \\overrightarrow{v})
62
+ $$`;
99
63
  };
100
64
  const getCorrection = (identifiers) => {
101
65
  const { nodeA, nodeB } = getHydratedNodes(identifiers);
102
- const texA = nodeA.evaluate() === -1
103
- ? "-"
104
- : nodeA.evaluate() === 1
105
- ? "+"
106
- : nodeA.toTex();
107
- const texB = nodeB.evaluate() === -1
108
- ? "-"
109
- : nodeB.evaluate() === 1
110
- ? "+"
111
- : nodeB.toTex();
112
66
  const u = "\\overrightarrow u";
113
67
  const v = "\\overrightarrow v";
114
68
  return `Le produit scalaire vérifie, pour $k$ et $k'$ réels :
@@ -124,29 +78,45 @@ $$
124
78
  On a donc :
125
79
 
126
80
  $$
127
- ${parenthesesIfNeeded(`${texA}${u}`)} \\cdot ${parenthesesIfNeeded(`${texB}${v}`)} = ${multiply(nodeA, nodeB).toTex({
128
- forceNoSimplification: true,
129
- forceTimesSign: true,
130
- })} \\times (\\overrightarrow{u} \\cdot \\overrightarrow{v}) = ${getAnswer(identifiers)}
81
+ ${multiply(nodeA, u.toTree()).toTex()} \\cdot ${parenthesesIfNeeded(multiply(nodeB, v.toTree()).toTex())} = ${(() => {
82
+ if (nodeA.evaluate() === 1 || nodeB.evaluate() === 1) {
83
+ return multiply(nodeA, nodeB).simplify().toTex();
84
+ }
85
+ else {
86
+ return multiply(nodeA, nodeB).toTex({
87
+ forceNoSimplification: true,
88
+ forceTimesSign: true,
89
+ });
90
+ }
91
+ })()} \\times (\\overrightarrow{u} \\cdot \\overrightarrow{v}) = ${getAnswer(identifiers)}
131
92
  $$
132
93
 
133
94
  `;
134
95
  };
135
96
  const getPropositions = (n, { answer, ...identifiers }) => {
136
- const propositions = [];
137
- addValidProp(propositions, answer);
97
+ const propositionsMandatory = [];
98
+ addValidProp(propositionsMandatory, answer);
138
99
  const { nodeUDotV, nodeA, nodeB } = getHydratedNodes(identifiers);
139
100
  const isSignOnly = Math.abs(nodeA.evaluate()) === 1 && Math.abs(nodeB.evaluate()) === 1;
101
+ //opposite
102
+ {
103
+ const identifiersWrong = {
104
+ ...identifiers,
105
+ nodeIdsA: opposite(nodeA).toIdentifiers(),
106
+ };
107
+ tryToAddWrongProp(propositionsMandatory, getAnswer(identifiersWrong));
108
+ }
109
+ const propositionsFiller = [];
140
110
  //student: strange magic: a * firstDigit(uDotV) + b * secondDigit(uDotV)
141
111
  if (isSignOnly) {
142
- const uDotV = nodeUDotV.evaluate();
143
- if (uDotV.frenchify().length === 2) {
144
- const [firstDigit, secondDigit] = uDotV
112
+ const absUDotV = nodeUDotV.evaluate();
113
+ if (absUDotV.frenchify().length === 2) {
114
+ const [firstDigit, secondDigit] = absUDotV
145
115
  .frenchify()
146
116
  .split("")
147
117
  .map((s) => +s);
148
118
  const nodeWrong = add(multiply(nodeA, firstDigit), multiply(nodeB, secondDigit));
149
- tryToAddWrongProp(propositions, nodeWrong.simplify().toTex());
119
+ tryToAddWrongProp(propositionsFiller, nodeWrong.simplify().toTex());
150
120
  }
151
121
  }
152
122
  //student: concatenation
@@ -155,7 +125,7 @@ const getPropositions = (n, { answer, ...identifiers }) => {
155
125
  const a = nodeA.evaluate();
156
126
  const b = nodeB.evaluate();
157
127
  if (a > 0 && b > 0) {
158
- tryToAddWrongProp(propositions, `${a.frenchify()}${b.frenchify()}`);
128
+ tryToAddWrongProp(propositionsFiller, `${a.frenchify()}${b.frenchify()}`);
159
129
  }
160
130
  }
161
131
  }
@@ -167,27 +137,31 @@ const getPropositions = (n, { answer, ...identifiers }) => {
167
137
  if (a > 0 && b > 0) {
168
138
  const nodeConcat = parseAlgebraic(`${a.frenchify()}${b.frenchify()}`);
169
139
  const nodeWrong = multiply(nodeConcat, nodeUDotV).simplify();
170
- tryToAddWrongProp(propositions, nodeWrong.toTex());
140
+ tryToAddWrongProp(propositionsFiller, nodeWrong.toTex());
171
141
  }
172
142
  }
173
143
  }
174
144
  //student: au dot bv = (a+b)(u dot v)
175
145
  {
176
146
  const nodeWrong = multiply(add(nodeA, nodeB).simplify(), nodeUDotV).simplify();
177
- tryToAddWrongProp(propositions, nodeWrong.toTex());
147
+ tryToAddWrongProp(propositionsFiller, nodeWrong.toTex());
178
148
  }
179
- propWhile(propositions, n + 2, () => {
180
- tryToAddWrongProp(propositions, randint(-30, 30).frenchify());
149
+ propWhile(propositionsFiller, n, () => {
150
+ tryToAddWrongProp(propositionsFiller, randint(-30, 30).frenchify());
181
151
  });
182
- return shuffleProps(propositions, n);
152
+ return shuffle([
153
+ ...propositionsMandatory,
154
+ ...shuffleProps(propositionsFiller.filter((propositionFiller) => !propositionsMandatory
155
+ .map((proposition) => proposition.statement)
156
+ .includes(propositionFiller.statement)), n - propositionsMandatory.length),
157
+ ]);
183
158
  };
184
159
  const getKeys = () => {
185
160
  return [];
186
161
  };
187
162
  const isAnswerValid = (ans, { answer }) => {
188
163
  try {
189
- const parsed = parseAlgebraic(ans);
190
- return parsed.simplify().toTex() === answer;
164
+ return rationalVEA(ans, answer);
191
165
  }
192
166
  catch (err) {
193
167
  return handleVEAError(err);
@@ -208,13 +182,17 @@ const getScalarProductLamdbaULambdaVQuestion = (optsIn) => {
208
182
  case 1:
209
183
  {
210
184
  //les tables de multiplication (entiers relatifs)
211
- return [...Array(2).keys()].map(() => randint(2, 10).toTree());
185
+ return random([
186
+ [1, -1],
187
+ [-1, 1],
188
+ [-1, -1],
189
+ ]).map((sign) => (sign * randint(2, 10)).toTree());
212
190
  }
213
191
  break;
214
192
  case 2:
215
193
  {
216
194
  //fraction simplifiable en un entier
217
- const common = randint(2, 10);
195
+ const common = (coinFlip() ? 1 : -1) * randint(2, 10);
218
196
  return shuffle([common, common * randint(2, 10)]).map((v, i) => i === 0 ? frac(1, v) : v.toTree());
219
197
  }
220
198
  break;
@@ -230,8 +208,8 @@ const getScalarProductLamdbaULambdaVQuestion = (optsIn) => {
230
208
  ]).map((v) => v.toTree())
231
209
  : createRandomNodes();
232
210
  const nodeUDotV = isSignOnly
233
- ? randint(10, 100).toTree()
234
- : random([1, 10, 100]).toTree();
211
+ ? ((coinFlip() ? +1 : -1) * randint(10, 100)).toTree()
212
+ : ((coinFlip() ? +1 : -1) * random([1, 10, 100])).toTree();
235
213
  const identifiers = {
236
214
  nodeIdsA: nodeA.toIdentifiers(),
237
215
  nodeIdsB: nodeB.toIdentifiers(),
@@ -1 +1 @@
1
- {"version":3,"file":"angleFromScalarProduct.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAWtC,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CAEvC,CAAC;AA8EF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAiBxD,CAAC"}
1
+ {"version":3,"file":"angleFromScalarProduct.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAYtC,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CAEvC,CAAC;AA2KF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAkBxD,CAAC"}
@@ -9,6 +9,7 @@ import { frac } from "../../../../../tree/nodes/operators/fractionNode.js";
9
9
  import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
10
10
  import { degreeParser } from "../../../../../tree/parsers/degreeParser.js";
11
11
  import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
12
+ import { alignTex } from "../../../../../utils/latex/alignTex.js";
12
13
  const getPoints = (identifiers) => {
13
14
  return identifiers.pointsIdentifiers.map(PointConstructor.fromIdentifiers);
14
15
  };
@@ -38,8 +39,92 @@ const getInstruction = (identifiers) => {
38
39
 
39
40
  Donner une mesure, arrondie au degré, de l'angle $\\widehat{${names.join("")}}$.`;
40
41
  };
41
- // const getHint: GetHint<Identifiers> = (identifiers) => {};
42
- // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
42
+ const getHint = (identifiers) => {
43
+ const points = getPoints(identifiers);
44
+ const names = points.map((p) => p.name);
45
+ const [nA, nB, nC] = names;
46
+ const u = `\\overrightarrow{${nB}${nA}}`;
47
+ const v = `\\overrightarrow{${nB}${nC}}`;
48
+ return `L'angle $\\widehat{${nA}${nB}${nC}}$ est formé par les vecteurs $${u}$ et $${v}$.
49
+ Calcule leur produit scalaire puis utilise sa définition :
50
+
51
+ $$
52
+ ${u} \\cdot ${v} = \\lVert{${nB}${nA}}\\rVert \\times \\lVert{${nB}${nC}}\\rVert \\times \\cos(\\widehat{${nA}${nB}${nC}})
53
+ $$
54
+
55
+ Tu pourras alors déterminer $\\cos(\\widehat{${nA}${nB}${nC}})$ et en déduire une mesure de l'angle $\\widehat{${nA}${nB}${nC}}$.`;
56
+ };
57
+ const getCorrection = (identifiers) => {
58
+ const points = getPoints(identifiers);
59
+ const names = points.map((p) => p.name);
60
+ const u = `\\overrightarrow{${names[1]}${names[0]}}`;
61
+ const v = `\\overrightarrow{${names[1]}${names[2]}}`;
62
+ const vecURaw = VectorConstructor.fromPointsRaw(points[1], points[0]);
63
+ const vecVRaw = VectorConstructor.fromPointsRaw(points[1], points[2]);
64
+ const vecU = vecURaw.simplify();
65
+ const vecV = vecVRaw.simplify();
66
+ const nodeNormU = vecU.getNorm();
67
+ const nodeNormV = vecV.getNorm();
68
+ const nodeScalarProduct = vecU.scalarProduct(vecV);
69
+ const nodeNormUSimplified = nodeNormU.simplify();
70
+ const nodeNormVSimplified = nodeNormV.simplify();
71
+ const nodeScalarProductSimplified = nodeScalarProduct.simplify();
72
+ const angleName = `\\widehat{${names.join("")}}`;
73
+ return `D'après la définition du produit scalaire :
74
+
75
+ $$
76
+ ${u} \\cdot ${v} = \\lVert ${u} \\rVert \\times \\lVert ${v} \\rVert \\times \\cos(${angleName})
77
+ $$
78
+
79
+ Or :
80
+
81
+ $$
82
+ ${u} = ${vecURaw.toCoords()} = ${vecU.toCoords()}
83
+ $$
84
+
85
+ $$
86
+ ${v} = ${vecVRaw.toCoords()} = ${vecV.toCoords()}
87
+ $$
88
+
89
+ Ainsi :
90
+
91
+ ${alignTex([
92
+ [`${u} \\cdot ${v}`, "=", nodeScalarProduct.toTex()],
93
+ ["", "=", nodeScalarProductSimplified.toTex()],
94
+ ])}
95
+
96
+ On calcule ensuite les normes des vecteurs :
97
+
98
+ ${alignTex([
99
+ [`\\lVert ${u} \\rVert`, "=", nodeNormU.toTex()],
100
+ ["", "=", nodeNormUSimplified.toTex()],
101
+ ])}
102
+
103
+ ${alignTex([
104
+ [`\\lVert ${v} \\rVert`, "=", nodeNormV.toTex()],
105
+ ["", "=", nodeNormVSimplified.toTex()],
106
+ ])}
107
+
108
+ On remplace alors ces valeurs dans l’égalité du produit scalaire :
109
+
110
+ $$
111
+ ${nodeScalarProductSimplified.toTex()} = ${nodeNormUSimplified.toTex()} \\times ${nodeNormVSimplified.toTex()} \\times \\cos(${angleName})
112
+ $$
113
+
114
+ D’où:
115
+
116
+ $$
117
+ \\cos(${angleName}) = \\frac{${nodeScalarProductSimplified.toTex()}}{${nodeNormUSimplified.toTex()} \\times ${nodeNormVSimplified.toTex()}}
118
+ $$
119
+
120
+ Enfin, on utilise la fonction $\\cos^{-1}$ de la calculatrice pour en déduire une mesure de $${angleName}$ :
121
+
122
+ $$
123
+ ${angleName} \\approx ${getAnswer(identifiers)}
124
+ $$
125
+
126
+ `;
127
+ };
43
128
  const getKeys = () => {
44
129
  return ["degree"];
45
130
  };
@@ -70,8 +155,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
70
155
  keys: getKeys(identifiers),
71
156
  answerFormat: "tex",
72
157
  identifiers,
73
- // hint: getHint(identifiers),
74
- // correction: getCorrection(identifiers),
158
+ hint: getHint(identifiers),
159
+ correction: getCorrection(identifiers),
75
160
  };
76
161
  };
77
162
  export const angleFromScalarProduct = {
@@ -86,8 +171,9 @@ export const angleFromScalarProduct = {
86
171
  isAnswerValid,
87
172
  subject: "Mathématiques",
88
173
  getInstruction,
89
- // getHint,
90
- // getCorrection,
174
+ getHint,
175
+ getCorrection,
176
+ hasHintAndCorrection: true,
91
177
  getAnswer,
92
178
  getQuestionFromIdentifiers,
93
179
  };
@@ -2,7 +2,12 @@ export * from "./scalarProductViaCoords.js";
2
2
  export * from "./scalarProductViaCos.js";
3
3
  export * from "./scalarProductOrthoInSquare.js";
4
4
  export * from "./scalarProductViaNorms.js";
5
- export * from "./scalarProductIdentities.js";
6
5
  export * from "./angleFromScalarProduct.js";
7
6
  export * from "./findCoordinatesToOrthogonalize.js";
7
+ export * from "./scalarProductOfVectsOnGrid1.js";
8
+ export * from "./scalarProductComputeBH.js";
9
+ export * from "./scalarProductParallelogramDiagonalPlus.js";
10
+ export * from "./alg/index.js";
11
+ export * from "./orth/index.js";
12
+ export * from "./alKashi/index.js";
8
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AAEpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6CAA6C,CAAC;AAE5D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
@@ -2,6 +2,11 @@ export * from "./scalarProductViaCoords.js";
2
2
  export * from "./scalarProductViaCos.js";
3
3
  export * from "./scalarProductOrthoInSquare.js";
4
4
  export * from "./scalarProductViaNorms.js";
5
- export * from "./scalarProductIdentities.js";
6
5
  export * from "./angleFromScalarProduct.js";
7
6
  export * from "./findCoordinatesToOrthogonalize.js";
7
+ export * from "./scalarProductOfVectsOnGrid1.js";
8
+ export * from "./scalarProductComputeBH.js";
9
+ export * from "./scalarProductParallelogramDiagonalPlus.js";
10
+ export * from "./alg/index.js";
11
+ export * from "./orth/index.js";
12
+ export * from "./alKashi/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductIsOrthogonalVecsBasisIJ.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC;AAqNF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAsBtE,CAAC"}
1
+ {"version":3,"file":"scalarProductIsOrthogonalVecsBasisIJ.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC;AA2NF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAsBtE,CAAC"}
@@ -123,6 +123,12 @@ $$
123
123
  ${i} \\cdot ${j} = ${j} \\cdot ${i} = 0
124
124
  $$
125
125
 
126
+ On a :
127
+
128
+ $$
129
+ ${i} \\cdot ${i} = ${j} \\cdot ${j} = 1
130
+ $$
131
+
126
132
  On peut donc calculer le produit scalaire en utilisant les coordonnées dans la base $(${i},${j})$ de la même manière que lorsque l'on travaille dans la base canonique du plan.
127
133
 
128
134
  ${alignTex([
@@ -27,7 +27,7 @@ $$
27
27
  ${v} = ${vecV.toCoords()}
28
28
  $$
29
29
 
30
- Les vecteurs $u$ et $v$ sont-ils orthogonaux ?`;
30
+ Les vecteurs $${u}$ et $${v}$ sont-ils orthogonaux ?`;
31
31
  };
32
32
  const getAnswerNode = (identifiers) => {
33
33
  const { vecU, vecV } = getHydrated(identifiers);
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductIsPointOnCircle.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAYvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA8LF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAmB9D,CAAC"}
1
+ {"version":3,"file":"scalarProductIsPointOnCircle.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAYvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA4MF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAmB9D,CAAC"}
@@ -54,9 +54,12 @@ const getAnswer = (identifiers) => {
54
54
  const isOrthogonal = answerNode.simplify().evaluate() === 0;
55
55
  return ["Oui", "Non"][isOrthogonal ? 0 : 1];
56
56
  };
57
- const getHint = () => {
58
- const [a, b] = ["a", "b"].map((letter) => `\\overrightarrow{${letter}}`);
59
- return `Deux vecteurs $${a}$ et $${b}$ sont orthogonaux si et seulement si $${a} \\cdot ${b} = 0$.`;
57
+ const getHint = (identifiers) => {
58
+ const { pointNames } = identifiers;
59
+ const [nA, nB, nC] = pointNames;
60
+ const [vecAB, vecAC] = [`${nA}${nB}`, `${nA}${nC}`].map((letter) => `\\overrightarrow{${letter}}`);
61
+ return `Un point $${nA}$ appartient à un cercle de diamètre $[${nB}${nC}]$ si et seulement si le triangle $${nA}${nB}${nC}$ est rectangle en $${nA}$,
62
+ donc si et seulement si les vecteurs $${vecAB}$ et $${vecAC}$ sont orthogonaux.`;
60
63
  };
61
64
  const getCorrection = (identifiers) => {
62
65
  const { pointNames } = identifiers;
@@ -72,7 +75,14 @@ const getCorrection = (identifiers) => {
72
75
  const vecComputationV = createVecComputation(point1, point3);
73
76
  const isOrthogonal = getAnswerNode(identifiers).simplify().evaluate() === 0;
74
77
  const nodeScalarProduct = vecU.scalarProduct(vecV);
75
- return `On calcule les coordonnées des vecteurs :
78
+ return `${(() => {
79
+ const [nA, nB, nC] = pointNames;
80
+ const [vecAB, vecAC] = [`${nA}${nB}`, `${nA}${nC}`].map((letter) => `\\overrightarrow{${letter}}`);
81
+ return `Le point $${nA}$ appartient au cercle de diamètre $[${nB}${nC}]$ si et seulement si le triangle $${nA}${nB}${nC}$ est rectangle en $${nA}$,
82
+ donc si et seulement si les vecteurs $${vecAB}$ et $${vecAC}$ sont orthogonaux.`;
83
+ })()}
84
+
85
+ On calcule les coordonnées des vecteurs :
76
86
 
77
87
  ${zip([vecComputationU, vecComputationV], [vecU, vecV]).map(([vecComputation, vec]) => `
78
88
 
@@ -150,7 +160,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
150
160
  export const scalarProductIsPointOnCircle = {
151
161
  id: "scalarProductIsPointOnCircle",
152
162
  connector: "=",
153
- label: "Déterminer si un point appartient ou non à un cercle de diamètre donné",
163
+ label: "Déterminer si un point appartient ou non à un cercle de diamètre donné à l'aide du produit scalaire",
154
164
  isSingleStep: true,
155
165
  generator: (nb) => getDistinctQuestions(() => getScalarProductIsPointOnCircleQuestion(), nb),
156
166
  qcmTimer: 60,
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductIsPointOnPerpendicularBisector.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAavC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAmNF,eAAO,MAAM,2CAA2C,EAAE,QAAQ,CAAC,WAAW,CAsB3E,CAAC"}
1
+ {"version":3,"file":"scalarProductIsPointOnPerpendicularBisector.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAavC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA2NF,eAAO,MAAM,2CAA2C,EAAE,QAAQ,CAAC,WAAW,CAuB3E,CAAC"}
@@ -53,9 +53,13 @@ const getAnswer = (identifiers) => {
53
53
  const isOrthogonal = answerNode.simplify().evaluate() === 0;
54
54
  return ["Oui", "Non"][isOrthogonal ? 0 : 1];
55
55
  };
56
- const getHint = () => {
57
- const [a, b] = ["a", "b"].map((letter) => `\\overrightarrow{${letter}}`);
58
- return `Deux vecteurs $${a}$ et $${b}$ sont orthogonaux si et seulement si $${a} \\cdot ${b} = 0$.`;
56
+ const getHint = (identifiers) => {
57
+ const { pointNames } = identifiers;
58
+ const [nA, nB, nC] = pointNames;
59
+ const [vecCI, vecAB] = [`${nC}I`, `${nA}${nB}`].map((letter) => `\\overrightarrow{${letter}}`);
60
+ return `La médiatrice du segment $[${nA}${nB}]$ est la droite passant par le milieu $I$ de $[${nA}${nB}]$ et qui est perpendiculaire à $(${nA}${nB})$.
61
+ Un point $${nC}$ appartient donc à cette médiatrice si et seulement si $(${nC}I)$ est perpendiculaire à $(${nA}${nB})$,
62
+ c'est à dire si les vecteurs $${vecCI}$ et $${vecAB}$ sont orthognaux.`;
59
63
  };
60
64
  const getCorrection = (identifiers) => {
61
65
  const { pointNames, pointIds } = identifiers;
@@ -73,17 +77,17 @@ const getCorrection = (identifiers) => {
73
77
  const vecComputationV = createVecComputation(pointI, point3);
74
78
  const isOrthogonal = getAnswerNode(identifiers).simplify().evaluate() === 0;
75
79
  const nodeScalarProduct = vecU.scalarProduct(vecV);
76
- return `On nomme $O$ l'origine du repère et $I$ le milieu de $[${point1.name}${point2.name}]$. On a :
80
+ return `${(() => {
81
+ const [nA, nB, nC] = pointNames;
82
+ const [vecCI, vecAB] = [`${nC}I`, `${nA}${nB}`].map((letter) => `\\overrightarrow{${letter}}`);
83
+ return `La médiatrice du segment $[${nA}${nB}]$ est la droite passant par le milieu $I$ de $[${nA}${nB}]$ et qui est perpendiculaire à $(${nA}${nB})$.
84
+ Le point $${nC}$ appartient donc à cette médiatrice si et seulement si $(${nC}I)$ est perpendiculaire à $(${nA}${nB})$,
85
+ c'est à dire si les vecteurs $${vecCI}$ et $${vecAB}$ sont orthognaux.`;
86
+ })()}
87
+
88
+ On détermine les coordonnées du milieu $I$ de $[${point1.name}${point2.name}]$ :
77
89
 
78
- ${alignTex([
79
- [
80
- "\\overrightarrow{OI}",
81
- "=",
82
- `\\frac{\\overrightarrow{O${point1.name}} + \\overrightarrow{O${point2.name}}}{2}`,
83
- ],
84
- ["", "=", `${vecOI.toCoords()}`],
85
- ["", "=", `${vecOI.simplify().toCoords()}`],
86
- ])}
90
+ ${alignTex([[`I${vecOI.toCoords()}`], [`I${vecOI.simplify().toCoords()}`]])}
87
91
 
88
92
  On peut calculer les coordonnées des vecteurs :
89
93
 
@@ -163,7 +167,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
163
167
  export const scalarProductIsPointOnPerpendicularBisector = {
164
168
  id: "scalarProductIsPointOnPerpendicularBisector",
165
169
  connector: "=",
166
- label: "Déterminer si un point appartient à la médiatrice d'un segment",
170
+ label: "Déterminer si un point appartient à la médiatrice d'un segment à l'aide du produit scalaire",
167
171
  isSingleStep: true,
168
172
  generator: (nb) => getDistinctQuestions(() => getScalarProductIsPointOnPerpendicularBisectorQuestion(), nb),
169
173
  qcmTimer: 60,
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductIsRightTriangleUsingPointCoords.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAYvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAiQF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAuB5E,CAAC"}
1
+ {"version":3,"file":"scalarProductIsRightTriangleUsingPointCoords.d.ts","sourceRoot":"","sources":["../../../../../../../src/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAYvC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA+QF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAuB5E,CAAC"}
@@ -61,9 +61,12 @@ const getAnswer = (identifiers) => {
61
61
  const isOrthogonal = answerNode.simplify().evaluate() === 0;
62
62
  return ["Oui", "Non"][isOrthogonal ? 0 : 1];
63
63
  };
64
- const getHint = () => {
65
- const [a, b] = ["a", "b"].map((letter) => `\\overrightarrow{${letter}}`);
66
- return `Deux vecteurs $${a}$ et $${b}$ sont orthogonaux si et seulement si $${a} \\cdot ${b} = 0$.`;
64
+ const getHint = (identifiers) => {
65
+ const { pointNames } = identifiers;
66
+ const [nA, nB, nC] = pointNames;
67
+ const [vecAB, vecBC] = [`${nA}${nB}`, `${nB}${nC}`].map((letter) => `\\overrightarrow{${letter}}`);
68
+ return `Un triangle $${nA}${nB}${nC}$ est rectangle en $${nB}$ si et seulement si les droites $(${nA}${nB})$ et $(${nB}${nC})$ sont perpendiculaires,
69
+ donc si et seulement si les vecteurs $${vecAB}$ et $${vecBC}$ sont orthognaux.`;
67
70
  };
68
71
  const getCorrection = (identifiers) => {
69
72
  const { pointNames } = identifiers;
@@ -79,7 +82,14 @@ const getCorrection = (identifiers) => {
79
82
  const vecComputationV = createVecComputation(point1, point3);
80
83
  const vecComputationW = createVecComputation(point2, point3);
81
84
  const isOrthogonal = getAnswerNode(identifiers).simplify().evaluate() === 0;
82
- return `On calcule les coordonnées des vecteurs :
85
+ return `${(() => {
86
+ const [nA, nB, nC] = pointNames;
87
+ const [vecAB, vecBC] = [`${nA}${nB}`, `${nB}${nC}`].map((letter) => `\\overrightarrow{${letter}}`);
88
+ return `Le triangle $${nA}${nB}${nC}$ est rectangle en $${nB}$ si et seulement si les droites $(${nA}${nB})$ et $(${nB}${nC})$ sont perpendiculaires,
89
+ donc si et seulement si les vecteurs $${vecAB}$ et $${vecBC}$ sont orthognaux.`;
90
+ })()}
91
+
92
+ On calcule les coordonnées des vecteurs :
83
93
 
84
94
  ${zip([vecComputationU, vecComputationV, vecComputationW], [vecU, vecV, vecW]).map(([vecComputation, vec]) => `
85
95
 
@@ -218,7 +228,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
218
228
  export const scalarProductIsRightTriangleUsingPointCoords = {
219
229
  id: "scalarProductIsRightTriangleUsingPointCoords",
220
230
  connector: "=",
221
- label: "Déterminer si un triangle est rectangle à partir des coordonnées de ses sommets",
231
+ label: "Déterminer si un triangle est rectangle à partir des coordonnées de ses sommets à l'aide du produit scalaire",
222
232
  isSingleStep: true,
223
233
  generator: (nb) => getDistinctQuestions(() => getScalarProductIsRightTriangleUsingPointCoordsQuestion(), nb),
224
234
  qcmTimer: 60,
@@ -1 +1 @@
1
- {"version":3,"file":"scalarProductComputeBH.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAoBtC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAAC;AA+bF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AA+BF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CA6BjE,CAAC"}
1
+ {"version":3,"file":"scalarProductComputeBH.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAqBtC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAAC;AAmeF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AA+BF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CA6BjE,CAAC"}