math-exercises 3.0.158 → 3.0.160

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 (268) hide show
  1. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.js +7 -6
  2. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts.map +1 -1
  3. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.js +88 -9
  4. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.d.ts.map +1 -1
  5. package/lib/exercises/math/calculLitteral/equation/factorizeEquation.js +8 -2
  6. package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
  7. package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
  8. package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
  9. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  10. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +27 -2
  11. package/lib/exercises/math/calculLitteral/equation/solveByFactorizingWithIdRmq3.d.ts.map +1 -1
  12. package/lib/exercises/math/calculLitteral/equation/solveByFactorizingWithIdRmq3.js +1 -3
  13. package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts.map +1 -1
  14. package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.js +0 -1
  15. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map +1 -1
  16. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.js +11 -4
  17. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +11 -5
  19. package/lib/exercises/math/calculLitteral/inequations/index.d.ts +1 -0
  20. package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
  21. package/lib/exercises/math/calculLitteral/inequations/index.js +1 -0
  22. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -1
  23. package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +91 -21
  24. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -1
  25. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +63 -43
  26. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -1
  27. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +72 -49
  28. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
  29. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +19 -19
  30. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts.map +1 -1
  31. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.js +26 -14
  32. package/lib/exercises/math/derivation/derivative/exp/index.d.ts +1 -0
  33. package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -1
  34. package/lib/exercises/math/derivation/derivative/exp/index.js +1 -0
  35. package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
  36. package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
  37. package/lib/exercises/math/derivation/variations/index.js +1 -0
  38. package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.d.ts +7 -0
  39. package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +174 -0
  41. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -1
  42. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +30 -3
  43. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts.map +1 -1
  44. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.js +12 -7
  45. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.js +1 -1
  46. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.js +2 -2
  47. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts.map +1 -1
  48. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.js +33 -44
  49. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts.map +1 -1
  50. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.js +80 -8
  51. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts.map +1 -1
  52. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.js +80 -25
  53. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts.map +1 -1
  54. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.js +6 -15
  55. package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
  56. package/lib/exercises/math/functions/exponential/expFactorization.js +54 -42
  57. package/lib/exercises/math/functions/exponential/index.d.ts +2 -0
  58. package/lib/exercises/math/functions/exponential/index.d.ts.map +1 -1
  59. package/lib/exercises/math/functions/exponential/index.js +2 -0
  60. package/lib/exercises/math/functions/trinoms/equation/secondDegreeInequation.js +3 -0
  61. package/lib/exercises/math/functions/trinoms/factoForm/index.d.ts +1 -0
  62. package/lib/exercises/math/functions/trinoms/factoForm/index.d.ts.map +1 -1
  63. package/lib/exercises/math/functions/trinoms/factoForm/index.js +1 -0
  64. package/lib/exercises/math/functions/trinoms/factoForm/trinomDevelopFactorizedForm.d.ts +13 -0
  65. package/lib/exercises/math/functions/trinoms/factoForm/trinomDevelopFactorizedForm.d.ts.map +1 -0
  66. package/lib/exercises/math/functions/trinoms/factoForm/trinomDevelopFactorizedForm.js +147 -0
  67. package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
  68. package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +96 -0
  69. package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
  70. package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +95 -1
  71. package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.d.ts +9 -0
  72. package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.d.ts.map +1 -0
  73. package/lib/exercises/math/functions/trinoms/summitAndCanonical/devFormFromSummitAndPoint.js +173 -0
  74. package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.d.ts +2 -0
  75. package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.d.ts.map +1 -1
  76. package/lib/exercises/math/functions/trinoms/summitAndCanonical/index.js +2 -0
  77. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromRoots.js +1 -1
  78. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.d.ts +9 -0
  79. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.d.ts.map +1 -0
  80. package/lib/exercises/math/functions/trinoms/summitAndCanonical/summitAbscissFromSymetricPoints.js +97 -0
  81. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts.map +1 -1
  82. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.js +18 -23
  83. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts.map +1 -1
  84. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.js +24 -26
  85. package/lib/exercises/math/functions/variations/index.d.ts +1 -0
  86. package/lib/exercises/math/functions/variations/index.d.ts.map +1 -1
  87. package/lib/exercises/math/functions/variations/index.js +1 -0
  88. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.d.ts +12 -0
  89. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.d.ts.map +1 -0
  90. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPerpendicularLine.js +230 -0
  91. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.d.ts +10 -0
  92. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.d.ts.map +1 -0
  93. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLineFromPointAndNormalVector.js +167 -0
  94. package/lib/exercises/math/geometry/cartesian/index.d.ts +3 -0
  95. package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
  96. package/lib/exercises/math/geometry/cartesian/index.js +3 -0
  97. package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.d.ts +10 -0
  98. package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.d.ts.map +1 -0
  99. package/lib/exercises/math/geometry/cartesian/normalVectorFromCartesianLineEquation.js +131 -0
  100. package/lib/exercises/math/geometry/circles/circleCanonicalEquationFromDevEquation.d.ts +10 -0
  101. package/lib/exercises/math/geometry/circles/circleCanonicalEquationFromDevEquation.d.ts.map +1 -0
  102. package/lib/exercises/math/geometry/circles/circleCanonicalEquationFromDevEquation.js +174 -0
  103. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.d.ts +12 -0
  104. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.d.ts.map +1 -0
  105. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.js +161 -0
  106. package/lib/exercises/math/geometry/circles/circleEquationFromDiameter.d.ts +9 -0
  107. package/lib/exercises/math/geometry/circles/circleEquationFromDiameter.d.ts.map +1 -0
  108. package/lib/exercises/math/geometry/circles/circleEquationFromDiameter.js +145 -0
  109. package/lib/exercises/math/geometry/circles/circleEquationFromPointAndRadius.d.ts +13 -0
  110. package/lib/exercises/math/geometry/circles/circleEquationFromPointAndRadius.d.ts.map +1 -0
  111. package/lib/exercises/math/geometry/circles/circleEquationFromPointAndRadius.js +181 -0
  112. package/lib/exercises/math/geometry/circles/circleRadiusOrCenterFromDevEquation.d.ts +11 -0
  113. package/lib/exercises/math/geometry/circles/circleRadiusOrCenterFromDevEquation.d.ts.map +1 -0
  114. package/lib/exercises/math/geometry/circles/circleRadiusOrCenterFromDevEquation.js +191 -0
  115. package/lib/exercises/math/geometry/circles/index.d.ts +7 -0
  116. package/lib/exercises/math/geometry/circles/index.d.ts.map +1 -0
  117. package/lib/exercises/math/geometry/circles/index.js +6 -0
  118. package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.d.ts +11 -0
  119. package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.d.ts.map +1 -0
  120. package/lib/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.js +131 -0
  121. package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts.map +1 -1
  122. package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.js +0 -2
  123. package/lib/exercises/math/geometry/index.d.ts +1 -0
  124. package/lib/exercises/math/geometry/index.d.ts.map +1 -1
  125. package/lib/exercises/math/geometry/index.js +1 -0
  126. package/lib/exercises/math/geometry/lines/cartesianEquationOfTriangleHeight.d.ts +10 -0
  127. package/lib/exercises/math/geometry/lines/cartesianEquationOfTriangleHeight.d.ts.map +1 -0
  128. package/lib/exercises/math/geometry/lines/cartesianEquationOfTriangleHeight.js +181 -0
  129. package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts +4 -1
  130. package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts.map +1 -1
  131. package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +23 -3
  132. package/lib/exercises/math/geometry/lines/index.d.ts +1 -0
  133. package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
  134. package/lib/exercises/math/geometry/lines/index.js +1 -0
  135. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.d.ts +4 -0
  136. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.d.ts.map +1 -0
  137. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/index.js +3 -0
  138. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts +9 -0
  139. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts.map +1 -0
  140. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +247 -0
  141. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts +13 -0
  142. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map +1 -0
  143. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.js +452 -0
  144. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts +9 -0
  145. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts.map +1 -0
  146. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +253 -0
  147. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.d.ts +4 -0
  148. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.d.ts.map +1 -0
  149. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/index.js +3 -0
  150. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.d.ts +10 -0
  151. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.d.ts.map +1 -0
  152. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductIdentities.js +174 -0
  153. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts +9 -0
  154. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts.map +1 -0
  155. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.js +231 -0
  156. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts +14 -0
  157. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts.map +1 -0
  158. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.js +292 -0
  159. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.d.ts +6 -0
  160. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.d.ts.map +1 -0
  161. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/index.js +5 -0
  162. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts +9 -0
  163. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts.map +1 -0
  164. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.js +202 -0
  165. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.d.ts +9 -0
  166. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.d.ts.map +1 -0
  167. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.js +127 -0
  168. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts +12 -0
  169. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts.map +1 -0
  170. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.js +167 -0
  171. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts +12 -0
  172. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts.map +1 -0
  173. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.js +180 -0
  174. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts +12 -0
  175. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts.map +1 -0
  176. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.js +235 -0
  177. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts +12 -0
  178. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts.map +1 -0
  179. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.js +423 -0
  180. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts +17 -0
  181. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts.map +1 -0
  182. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.js +347 -0
  183. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts +8 -0
  184. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts.map +1 -0
  185. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.js +301 -0
  186. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts +9 -0
  187. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -0
  188. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +141 -0
  189. package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.d.ts +10 -0
  190. package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.d.ts.map +1 -0
  191. package/lib/exercises/math/probaStat/randomVariable/findValueToMatchRandomVariableAverage.js +174 -0
  192. package/lib/exercises/math/probaStat/randomVariable/index.d.ts +1 -0
  193. package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
  194. package/lib/exercises/math/probaStat/randomVariable/index.js +2 -0
  195. package/lib/exercises/math/sequences/generation/index.d.ts +2 -0
  196. package/lib/exercises/math/sequences/generation/index.d.ts.map +1 -0
  197. package/lib/exercises/math/sequences/generation/index.js +1 -0
  198. package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.d.ts +8 -0
  199. package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.d.ts.map +1 -0
  200. package/lib/exercises/math/sequences/generation/recognizeRecurrenceOrExplicit.js +63 -0
  201. package/lib/exercises/math/sequences/graph/index.d.ts +2 -0
  202. package/lib/exercises/math/sequences/graph/index.d.ts.map +1 -0
  203. package/lib/exercises/math/sequences/graph/index.js +1 -0
  204. package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.d.ts +11 -0
  205. package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.d.ts.map +1 -0
  206. package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +113 -0
  207. package/lib/exercises/math/sequences/index.d.ts +2 -0
  208. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  209. package/lib/exercises/math/sequences/index.js +2 -0
  210. package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.d.ts +12 -0
  211. package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.d.ts.map +1 -0
  212. package/lib/exercises/math/sequences/notation/identifyRankInSequenceTermsList.js +114 -0
  213. package/lib/exercises/math/sequences/notation/identifySequenceTermInList.d.ts +12 -0
  214. package/lib/exercises/math/sequences/notation/identifySequenceTermInList.d.ts.map +1 -0
  215. package/lib/exercises/math/sequences/notation/identifySequenceTermInList.js +111 -0
  216. package/lib/exercises/math/sequences/notation/index.d.ts +3 -0
  217. package/lib/exercises/math/sequences/notation/index.d.ts.map +1 -0
  218. package/lib/exercises/math/sequences/notation/index.js +2 -0
  219. package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts.map +1 -1
  220. package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.js +0 -1
  221. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.d.ts.map +1 -1
  222. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +0 -2
  223. package/lib/exercises/vea/cartesianLineVEA.d.ts +2 -0
  224. package/lib/exercises/vea/cartesianLineVEA.d.ts.map +1 -0
  225. package/lib/exercises/vea/cartesianLineVEA.js +1 -0
  226. package/lib/exercises/vea/pointVEA.d.ts +2 -0
  227. package/lib/exercises/vea/pointVEA.d.ts.map +1 -0
  228. package/lib/exercises/vea/pointVEA.js +7 -0
  229. package/lib/index.d.ts +164 -1
  230. package/lib/index.d.ts.map +1 -1
  231. package/lib/math/geometry/circle.d.ts +6 -0
  232. package/lib/math/geometry/circle.d.ts.map +1 -1
  233. package/lib/math/geometry/circle.js +16 -0
  234. package/lib/math/geometry/line.d.ts +2 -0
  235. package/lib/math/geometry/line.d.ts.map +1 -1
  236. package/lib/math/geometry/line.js +7 -0
  237. package/lib/math/geometry/point.d.ts +1 -0
  238. package/lib/math/geometry/point.d.ts.map +1 -1
  239. package/lib/math/geometry/point.js +5 -0
  240. package/lib/math/geometry/polygons/relationPP.d.ts +8 -0
  241. package/lib/math/geometry/polygons/relationPP.d.ts.map +1 -0
  242. package/lib/math/geometry/polygons/relationPP.js +41 -0
  243. package/lib/math/polynomials/trinom.d.ts +1 -1
  244. package/lib/math/polynomials/trinom.d.ts.map +1 -1
  245. package/lib/math/polynomials/trinom.js +15 -6
  246. package/lib/math/utils/arithmetic/primeFactors.js +1 -1
  247. package/lib/math/utils/geometry/randomVecs2.d.ts +6 -0
  248. package/lib/math/utils/geometry/randomVecs2.d.ts.map +1 -0
  249. package/lib/math/utils/geometry/randomVecs2.js +34 -0
  250. package/lib/tests/questionTest.d.ts.map +1 -1
  251. package/lib/tests/questionTest.js +2 -2
  252. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +1 -0
  253. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  254. package/lib/tree/nodes/equations/equationSolutionNode.js +3 -0
  255. package/lib/tree/nodes/functions/expNode.d.ts +1 -1
  256. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  257. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +1 -0
  258. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  259. package/lib/tree/nodes/inequations/inequationSolutionNode.js +3 -0
  260. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -1
  261. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  262. package/lib/tree/nodes/operators/fractionNode.js +6 -4
  263. package/lib/tree/nodes/sets/intervalNode.d.ts +6 -0
  264. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  265. package/lib/tree/nodes/sets/namedIntervalNode.d.ts +31 -0
  266. package/lib/tree/nodes/sets/namedIntervalNode.d.ts.map +1 -0
  267. package/lib/tree/nodes/sets/namedIntervalNode.js +77 -0
  268. package/package.json +1 -1
@@ -0,0 +1,181 @@
1
+ import { addValidProp, shuffleProps, propWhile, GeneratorOptionTarget, GeneratorOptionType, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { PointConstructor, } from "../../../../math/geometry/point.js";
4
+ import { SquareRootConstructor } from "../../../../math/numbers/reals/real.js";
5
+ import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { equal } from "../../../../tree/nodes/equations/equalNode.js";
7
+ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
8
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
9
+ import { square } from "../../../../tree/nodes/operators/powerNode.js";
10
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
11
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
12
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
13
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
14
+ const getPropositions = (n, { answer }, opts) => {
15
+ const propositions = [];
16
+ addValidProp(propositions, answer);
17
+ propWhile(propositions, n, () => {
18
+ const radiusIds = randint(1, 10).toTree().toIdentifiers();
19
+ const centerIds = PointConstructor.random("O").toIdentifiers();
20
+ tryToAddWrongProp(propositions, getAnswer({
21
+ centerIds,
22
+ radiusIds,
23
+ }, opts));
24
+ });
25
+ return shuffleProps(propositions, n);
26
+ };
27
+ const getAnnswerNode = (identifiers, opts) => {
28
+ const { centerIds, radiusIds } = identifiers;
29
+ const center = PointConstructor.fromIdentifiers(centerIds);
30
+ const radius = reifyAlgebraic(radiusIds);
31
+ const radiusSquared = square(radius).simplify();
32
+ const isDev = opts?.equationType === "Développée";
33
+ if (isDev) {
34
+ return equal(substract(add(square(substract("x", center.x).simplify()), square(substract("y", center.y).simplify())), radiusSquared).simplify({ towardsDistribute: true, forbidFactorize: true }), "0");
35
+ }
36
+ else {
37
+ return equal(add(square(substract("x", center.x).simplify()), square(substract("y", center.y).simplify())), square(radius).simplify());
38
+ }
39
+ };
40
+ const getAnswer = (identifiers, opts) => {
41
+ return getAnnswerNode(identifiers, opts).toTex();
42
+ };
43
+ const getInstruction = (identifiers, opts) => {
44
+ const { centerIds, radiusIds } = identifiers;
45
+ const center = PointConstructor.fromIdentifiers(centerIds);
46
+ const radius = reifyAlgebraic(radiusIds);
47
+ return `Le cercle $\\mathcal{C}$ a pour centre $${center.toTexWithCoords()}$ et pour rayon $${radius.toTex()}$.
48
+
49
+ Donner une équation cartésienne du cercle $\\mathcal{C}$${opts?.equationType === "Développée" ? " **sous forme développée**" : ""}.`;
50
+ };
51
+ const getHint = () => {
52
+ return `Si $A(x_A;y_A)$ est le centre d'un cercle $\\mathcal{C}$ de rayon $R$, alors une équation cartésienne de $R$ est :
53
+
54
+ $$
55
+ (x-x_A)^2+(y-y_A)^2 = R^2
56
+ $$`;
57
+ };
58
+ const getCorrection = (identifiers, opts) => {
59
+ const { centerIds, radiusIds } = identifiers;
60
+ const center = PointConstructor.fromIdentifiers(centerIds);
61
+ const radius = reifyAlgebraic(radiusIds);
62
+ const radiusSquared = square(radius).simplify();
63
+ return `Si $A(x_A;y_A)$ est le centre d'un cercle $\\mathcal{C}$ de rayon $R$, alors une équation cartésienne de $R$ est :
64
+
65
+ $$
66
+ (x-x_A)^2+(y-y_A)^2 = R^2
67
+ $$
68
+
69
+ Ici, une équation cartésienne de $\\mathcal{C}$ est donc :
70
+
71
+ $$
72
+ (${substract("x", center.x).simplify().toTex()})^2 + (${substract("y", center.y)
73
+ .simplify()
74
+ .toTex()})^2 = ${square(radius).simplify().toTex()}
75
+ $$
76
+
77
+ ${opts?.equationType === "Développée"
78
+ ? `Il suffit alors de développer en utilisant des identités remarquables :
79
+
80
+ $$
81
+ ${square(substract("x", center.x))
82
+ .simplify({
83
+ towardsDistribute: true,
84
+ forbidFactorize: true,
85
+ })
86
+ .toTex()} + ${square(substract("y", center.y))
87
+ .simplify({
88
+ towardsDistribute: true,
89
+ forbidFactorize: true,
90
+ })
91
+ .toTex()} = ${radiusSquared.toTex()}
92
+ $$
93
+
94
+ $$
95
+ ${substract(add(square(substract("x", center.x).simplify({
96
+ towardsDistribute: true,
97
+ forbidFactorize: true,
98
+ })), square(substract("y", center.y).simplify({
99
+ towardsDistribute: true,
100
+ forbidFactorize: true,
101
+ }))), radiusSquared)
102
+ .simplify({ towardsDistribute: true, forbidFactorize: true })
103
+ .toTex()} = 0
104
+ $$
105
+ `
106
+ : ``}`;
107
+ };
108
+ const getKeys = () => {
109
+ return ["x", "y", "equal"];
110
+ };
111
+ const isAnswerValid = (ans, { answer: _answer, ...identifiers }) => {
112
+ try {
113
+ const split = ans.split("=");
114
+ if (split.length !== 2)
115
+ return false;
116
+ const left = parseAlgebraic(split[0]);
117
+ const right = parseAlgebraic(split[1]);
118
+ const studentEq = substract(left, right).simplify({
119
+ towardsDistribute: true,
120
+ forbidFactorize: true,
121
+ });
122
+ const ansNodeDev = getAnnswerNode(identifiers, {
123
+ equationType: "Développée",
124
+ }).leftChild;
125
+ return studentEq.toTex() === ansNodeDev.toTex();
126
+ }
127
+ catch (err) {
128
+ return handleVEAError(err);
129
+ }
130
+ };
131
+ const getCircleEquationFromPointAndRadisuQuestion = (opts) => {
132
+ const center = PointConstructor.random("O");
133
+ const radius = coinFlip()
134
+ ? randint(1, 10).toTree()
135
+ : SquareRootConstructor.randomIrreductible(20).toTree();
136
+ const identifiers = {
137
+ centerIds: center.toIdentifiers(),
138
+ radiusIds: radius.toIdentifiers(),
139
+ };
140
+ return getQuestionFromIdentifiers(identifiers, opts);
141
+ };
142
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
143
+ return {
144
+ answer: getAnswer(identifiers, opts),
145
+ instruction: getInstruction(identifiers, opts),
146
+ keys: getKeys(identifiers),
147
+ answerFormat: "tex",
148
+ identifiers,
149
+ hint: getHint(identifiers, opts),
150
+ correction: getCorrection(identifiers, opts),
151
+ };
152
+ };
153
+ const options = [
154
+ {
155
+ id: "equationType",
156
+ label: "Forme de l'équation attendue",
157
+ target: GeneratorOptionTarget.answer,
158
+ type: GeneratorOptionType.select,
159
+ values: ["Canonique", "Développée"],
160
+ defaultValue: "Canonique",
161
+ },
162
+ ];
163
+ export const circleEquationFromPointAndRadius = {
164
+ id: "circleEquationFromPointAndRadius",
165
+ connector: "\\iff",
166
+ label: "Déterminer l'équation cartésienne d'un cercle en connaissant son centre et son rayon",
167
+ isSingleStep: true,
168
+ generator: (nb, opts) => getDistinctQuestions(() => getCircleEquationFromPointAndRadisuQuestion(opts), nb),
169
+ qcmTimer: 60,
170
+ freeTimer: 60,
171
+ getPropositions,
172
+ isAnswerValid,
173
+ subject: "Mathématiques",
174
+ getInstruction,
175
+ getHint,
176
+ getCorrection,
177
+ getAnswer,
178
+ getQuestionFromIdentifiers,
179
+ hasHintAndCorrection: true,
180
+ options,
181
+ };
@@ -0,0 +1,11 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ aIds: NodeIdentifiers;
5
+ bIds: NodeIdentifiers;
6
+ cIds: NodeIdentifiers;
7
+ isAskingRadius: boolean;
8
+ };
9
+ export declare const circleRadiusOrCenterFromDevEquation: Exercise<Identifiers>;
10
+ export {};
11
+ //# sourceMappingURL=circleRadiusOrCenterFromDevEquation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circleRadiusOrCenterFromDevEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/circles/circleRadiusOrCenterFromDevEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AA0MF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAsBrE,CAAC"}
@@ -0,0 +1,191 @@
1
+ import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { pointVEA } from "../../../../exercises/vea/pointVEA.js";
4
+ import { sqrtVEA } from "../../../../exercises/vea/sqrtVEA.js";
5
+ import { Point, PointConstructor } from "../../../../math/geometry/point.js";
6
+ import { randint } from "../../../../math/utils/random/randint.js";
7
+ import { equal } from "../../../../tree/nodes/equations/equalNode.js";
8
+ import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
9
+ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
10
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
11
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
12
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
13
+ import { square } from "../../../../tree/nodes/operators/powerNode.js";
14
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
15
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
16
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
17
+ const getPropositions = (n, { answer, isAskingRadius }) => {
18
+ const propositions = [];
19
+ addValidProp(propositions, answer);
20
+ propWhile(propositions, n, () => {
21
+ if (isAskingRadius)
22
+ tryToAddWrongProp(propositions, randint(1, 10).frenchify());
23
+ else
24
+ tryToAddWrongProp(propositions, PointConstructor.random("A").toCoords());
25
+ });
26
+ return shuffleProps(propositions, n);
27
+ };
28
+ const getAnswer = (identifiers) => {
29
+ const { aIds, bIds, cIds, isAskingRadius } = identifiers;
30
+ const a = reifyAlgebraic(aIds);
31
+ const b = reifyAlgebraic(bIds);
32
+ const c = reifyAlgebraic(cIds);
33
+ const abscisse = frac(a, -2).simplify();
34
+ const ordonne = frac(b, -2).simplify();
35
+ const radiusSquared = substract(add(square(abscisse), square(ordonne)), c).simplify();
36
+ if (isAskingRadius) {
37
+ return sqrt(radiusSquared).simplify().toTex();
38
+ }
39
+ else {
40
+ return new Point("O", abscisse, ordonne).toCoords();
41
+ }
42
+ };
43
+ const getInstruction = (identifiers) => {
44
+ const { aIds, bIds, cIds, isAskingRadius } = identifiers;
45
+ const a = reifyAlgebraic(aIds);
46
+ const b = reifyAlgebraic(bIds);
47
+ const c = reifyAlgebraic(cIds);
48
+ return `Soit $\\mathcal{C}$ le cercle dont une équation cartésienne sous forme développée est :
49
+
50
+ $$
51
+ ${add(add(square("x"), multiply(a, "x")), add(add(square("y"), multiply(b, "y")), c))
52
+ .simplify({
53
+ towardsDistribute: true,
54
+ forbidFactorize: true,
55
+ })
56
+ .toTex()} = 0
57
+ $$
58
+
59
+ ${isAskingRadius
60
+ ? "Quel est le rayon de $\\mathcal{C}$ ?"
61
+ : "Quelles sont les coordonnées du centre de $\\mathcal{C}$ ?"}`;
62
+ };
63
+ const getHint = (identifiers) => {
64
+ const { aIds, bIds } = identifiers;
65
+ const a = reifyAlgebraic(aIds);
66
+ const b = reifyAlgebraic(bIds);
67
+ const aIsPos = a.evaluate() > 0;
68
+ const bIsPos = b.evaluate() > 0;
69
+ return `Tout cercle $\\mathcal{C}$ de centre $A(x_A;y_A)$ et de rayon $R$ admet une équation de la forme :
70
+
71
+ $$
72
+ (x-x_A)^2+(y-y_A)^2 = R^2
73
+ $$
74
+
75
+ Pour se ramener à cette équation, fait apparaître des identités remarquables dans l'équation de l'énoncé. Pour cela, tu peux compléter les égalités suivantes :
76
+
77
+ $$
78
+ ${add(square("x"), multiply(a, "x")).toTex()} = ${square((aIsPos ? add : substract)("x", "\\ldots")).toTex()} - \\ldots
79
+ $$
80
+
81
+ et
82
+
83
+ $$
84
+ ${add(square("y"), multiply(b, "y")).toTex()} = ${square((bIsPos ? add : substract)("y", "\\ldots")).toTex()} - \\ldots
85
+ $$
86
+ `;
87
+ };
88
+ const getCorrection = (identifiers) => {
89
+ const { aIds, bIds, cIds, isAskingRadius } = identifiers;
90
+ const a = reifyAlgebraic(aIds);
91
+ const b = reifyAlgebraic(bIds);
92
+ const c = reifyAlgebraic(cIds);
93
+ const abscisse = frac(a, -2).simplify();
94
+ const ordonne = frac(b, -2).simplify();
95
+ const radiusSquared = substract(add(square(abscisse), square(ordonne)), c).simplify();
96
+ const firstId = substract(square(substract("x", abscisse).simplify()), square(abscisse).simplify());
97
+ const secondId = substract(square(substract("y", ordonne).simplify()), square(ordonne).simplify());
98
+ return `Tout cercle $\\mathcal{C}$ de centre $A(x_A;y_A)$ et de rayon $R$ admet une équation de la forme :
99
+
100
+ $$
101
+ (x-x_A)^2+(y-y_A)^2 = R^2
102
+ $$
103
+
104
+ On réécrit donc l'équation en faisant apparaître des identités remarquables. Pour cela, on remarque que :
105
+
106
+ $$
107
+ ${add(square("x"), multiply(a, "x")).toTex()} = ${firstId.toTex()}
108
+ $$
109
+
110
+ et :
111
+
112
+ $$
113
+ ${add(square("y"), multiply(b, "y")).toTex()} = ${secondId.toTex()}
114
+ $$
115
+
116
+ L'équation peut donc se réécrire :
117
+
118
+ $$
119
+ ${add(add(firstId, secondId), c).toTex()} = 0
120
+ $$
121
+
122
+ La forme canonique est donc :
123
+
124
+ $$
125
+ ${equal(add(square(substract("x", abscisse).simplify()), square(substract("y", ordonne).simplify())), radiusSquared.simplify()).toTex()}
126
+ $$
127
+
128
+ ${isAskingRadius
129
+ ? `Le rayon de $\\mathcal{C}$ est donc $${getAnswer(identifiers)}$.`
130
+ : `Les coordonnées du centre de $\\mathcal{C}$ sont donc $${getAnswer(identifiers)}$.`}
131
+ `;
132
+ };
133
+ const getKeys = () => {
134
+ return ["semicolon"];
135
+ };
136
+ const isAnswerValid = (ans, { answer, isAskingRadius }) => {
137
+ try {
138
+ if (isAskingRadius)
139
+ return sqrtVEA(ans, answer);
140
+ else {
141
+ return pointVEA(ans, answer);
142
+ }
143
+ }
144
+ catch (err) {
145
+ return handleVEAError(err);
146
+ }
147
+ };
148
+ const getCircleCanonicalEquationFromDevEquationQuestion = () => {
149
+ const radius = randint(1, 10).toTree();
150
+ const centerx = randint(-9, 10, [0]);
151
+ const centery = randint(-9, 10, [0]);
152
+ const center = new Point("C", centerx, centery);
153
+ const identifiers = {
154
+ aIds: multiply(-2, center.x).simplify().toIdentifiers(),
155
+ bIds: multiply(-2, center.y).simplify().toIdentifiers(),
156
+ cIds: substract(add(square(center.x), square(center.y)), square(radius))
157
+ .simplify()
158
+ .toIdentifiers(),
159
+ isAskingRadius: coinFlip(),
160
+ };
161
+ return getQuestionFromIdentifiers(identifiers);
162
+ };
163
+ const getQuestionFromIdentifiers = (identifiers) => {
164
+ return {
165
+ answer: getAnswer(identifiers),
166
+ instruction: getInstruction(identifiers),
167
+ keys: getKeys(identifiers),
168
+ answerFormat: "tex",
169
+ identifiers,
170
+ hint: getHint(identifiers),
171
+ correction: getCorrection(identifiers),
172
+ };
173
+ };
174
+ export const circleRadiusOrCenterFromDevEquation = {
175
+ id: "circleRadiusOrCenterFromDevEquation",
176
+ connector: "\\iff",
177
+ label: "Déterminer le rayon ou le centre d'un cercle à partir d'un équation cartésienne développée",
178
+ isSingleStep: true,
179
+ generator: (nb, opts) => getDistinctQuestions(() => getCircleCanonicalEquationFromDevEquationQuestion(opts), nb),
180
+ qcmTimer: 60,
181
+ freeTimer: 60,
182
+ getPropositions,
183
+ isAnswerValid,
184
+ subject: "Mathématiques",
185
+ getInstruction,
186
+ getHint,
187
+ getCorrection,
188
+ getAnswer,
189
+ getQuestionFromIdentifiers,
190
+ hasHintAndCorrection: true,
191
+ };
@@ -0,0 +1,7 @@
1
+ export * from "./isPointOnCircleFromCartesianEquation.js";
2
+ export * from "./circleEquationFromPointAndRadius.js";
3
+ export * from "./circleCenterAndRadiusFromEquation.js";
4
+ export * from "./circleCanonicalEquationFromDevEquation.js";
5
+ export * from "./circleEquationFromDiameter.js";
6
+ export * from "./circleRadiusOrCenterFromDevEquation.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/circles/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./isPointOnCircleFromCartesianEquation.js";
2
+ export * from "./circleEquationFromPointAndRadius.js";
3
+ export * from "./circleCenterAndRadiusFromEquation.js";
4
+ export * from "./circleCanonicalEquationFromDevEquation.js";
5
+ export * from "./circleEquationFromDiameter.js";
6
+ export * from "./circleRadiusOrCenterFromDevEquation.js";
@@ -0,0 +1,11 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { PointIdentifiers } from "../../../../math/geometry/point.js";
3
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
4
+ type Identifiers = {
5
+ pointIds: PointIdentifiers;
6
+ radiusIds: NodeIdentifiers;
7
+ centreIds: PointIdentifiers;
8
+ };
9
+ export declare const isPointOnCircleFromCartesianEquation: Exercise<Identifiers>;
10
+ export {};
11
+ //# sourceMappingURL=isPointOnCircleFromCartesianEquation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isPointOnCircleFromCartesianEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/circles/isPointOnCircleFromCartesianEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAEL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,gBAAgB,CAAC;CAC7B,CAAC;AA8HF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAqBtE,CAAC"}
@@ -0,0 +1,131 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { PointConstructor, } from "../../../../math/geometry/point.js";
4
+ import { randint } from "../../../../math/utils/random/randint.js";
5
+ import { equal } from "../../../../tree/nodes/equations/equalNode.js";
6
+ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
7
+ import { PiNode } from "../../../../tree/nodes/numbers/piNode.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 { coinFlip } from "../../../../utils/alea/coinFlip.js";
14
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
15
+ const getPropositions = (n, { answer }) => {
16
+ const propositions = [];
17
+ addValidProp(propositions, answer, "raw");
18
+ tryToAddWrongProp(propositions, "Oui", "raw");
19
+ tryToAddWrongProp(propositions, "Non", "raw");
20
+ tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
21
+ return shuffleProps(propositions, n);
22
+ };
23
+ const getEquation = (identifiers) => {
24
+ const { centreIds, radiusIds } = identifiers;
25
+ const radius = reifyAlgebraic(radiusIds);
26
+ const centre = PointConstructor.fromIdentifiers(centreIds);
27
+ return equal(add(square(substract("x", centre.x).simplify()), square(substract("y", centre.y).simplify())), square(radius).simplify());
28
+ };
29
+ const getAnswer = (identifiers) => {
30
+ const { centreIds, pointIds, radiusIds } = identifiers;
31
+ const point = PointConstructor.fromIdentifiers(pointIds);
32
+ const radius = reifyAlgebraic(radiusIds);
33
+ const centre = PointConstructor.fromIdentifiers(centreIds);
34
+ return Math.abs(point.distanceTo(centre) - radius.evaluate()) < 0.001
35
+ ? "Oui"
36
+ : "Non";
37
+ };
38
+ const getInstruction = (identifiers) => {
39
+ const { pointIds } = identifiers;
40
+ const point = PointConstructor.fromIdentifiers(pointIds);
41
+ return `On considère le cercle $\\mathcal{C}$ d'équation :
42
+
43
+ $$
44
+ ${getEquation(identifiers).toTex()}
45
+ $$
46
+
47
+ Le point $${point.toTexWithCoords()}$ appartient-il au cercle $\\mathcal{C}$ ?`;
48
+ };
49
+ const getHint = () => {
50
+ return `Il suffit de remplacer $x$ et $y$ par les coordonnées de $A$ dans l'équation du cercle.`;
51
+ };
52
+ const getCorrection = (identifiers) => {
53
+ const { centreIds, pointIds } = identifiers;
54
+ const centre = PointConstructor.fromIdentifiers(centreIds);
55
+ const point = PointConstructor.fromIdentifiers(pointIds);
56
+ const leftEq = add(square(substract("x", centre.x).simplify()), square(substract("y", centre.y).simplify()));
57
+ const leftEqDetailed = leftEq.toDetailedEvaluation({
58
+ x: point.x,
59
+ y: point.y,
60
+ });
61
+ const isOnCircle = getAnswer(identifiers) === "Oui";
62
+ return `On remplace $x$ et $y$ par les coordonnées de $A$ dans l'équation du cercle :
63
+
64
+ ${alignTex([
65
+ ["", leftEqDetailed.toTex()],
66
+ [
67
+ "=",
68
+ add(square(substract(point.x, centre.x).simplify()), square(substract(point.y, centre.y).simplify())).toTex(),
69
+ ],
70
+ ["=", leftEqDetailed.simplify().toTex()],
71
+ ])}
72
+
73
+ ${isOnCircle
74
+ ? `Puisque l'égalité est bien vérifie, le point $A$ appartient bien au cercle.`
75
+ : `Puisque l'égalité n'est pas vérifiée, le point $A$ n'appartient pas au cercle.`}
76
+ `;
77
+ };
78
+ const getIsPointOnCircleFromCartesianEquationQuestion = () => {
79
+ const centre = PointConstructor.random("O");
80
+ const radius = randint(1, 10).toTree();
81
+ const isOnCircle = coinFlip();
82
+ let point;
83
+ if (isOnCircle) {
84
+ // point = PointConstructor.random("A");
85
+ const angle = frac(PiNode, 2);
86
+ const index = randint(0, 4);
87
+ point = centre
88
+ .translate(radius, 0)
89
+ .centralRotate(multiply(index, angle).simplify(), centre, "A");
90
+ }
91
+ else {
92
+ do {
93
+ point = PointConstructor.random("A");
94
+ } while (Math.abs(point.distanceTo(centre) - radius.evaluate()) < 0.001);
95
+ }
96
+ const identifiers = {
97
+ centreIds: centre.toIdentifiers(),
98
+ radiusIds: radius.toIdentifiers(),
99
+ pointIds: point.toIdentifiers(),
100
+ };
101
+ return getQuestionFromIdentifiers(identifiers);
102
+ };
103
+ const getQuestionFromIdentifiers = (identifiers) => {
104
+ return {
105
+ answer: getAnswer(identifiers),
106
+ instruction: getInstruction(identifiers),
107
+ keys: [],
108
+ answerFormat: "raw",
109
+ identifiers,
110
+ hint: getHint(identifiers),
111
+ correction: getCorrection(identifiers),
112
+ };
113
+ };
114
+ export const isPointOnCircleFromCartesianEquation = {
115
+ id: "isPointOnCircleFromCartesianEquation",
116
+ connector: "=",
117
+ label: "Déterminer si un point appartient à un cercle d'équation donnée",
118
+ isSingleStep: true,
119
+ generator: (nb, opts) => getDistinctQuestions(() => getIsPointOnCircleFromCartesianEquationQuestion(opts), nb),
120
+ qcmTimer: 60,
121
+ freeTimer: 60,
122
+ getPropositions,
123
+ subject: "Mathématiques",
124
+ getInstruction,
125
+ getHint,
126
+ getCorrection,
127
+ getAnswer,
128
+ getQuestionFromIdentifiers,
129
+ hasHintAndCorrection: true,
130
+ answerType: "QCU",
131
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"pinSegmentFromRotation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/pinSegmentFromRotation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAuK7C,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,cAAc,EAAE,eAAe,CAAC;CACjC,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAsYF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
1
+ {"version":3,"file":"pinSegmentFromRotation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidian/pinSegmentFromRotation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAuK7C,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,cAAc,EAAE,eAAe,CAAC;CACjC,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAoYF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -246,7 +246,6 @@ const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
246
246
  }
247
247
  return acc;
248
248
  }, {});
249
- console.log("pointsDict", pointsDict);
250
249
  return pointsDict;
251
250
  }
252
251
  function getStudentSegmentsDictFromStudentCommands(commands) {
@@ -261,7 +260,6 @@ const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
261
260
  }
262
261
  return acc;
263
262
  }, {});
264
- console.log("segmentsDict", segmentsDict);
265
263
  return segmentsDict;
266
264
  }
267
265
  const isSegmentValid = () => {
@@ -15,4 +15,5 @@ export * from "./angles/index.js";
15
15
  export * from "./lines/index.js";
16
16
  export * from "./triangles/index.js";
17
17
  export * from "./optimisation/index.js";
18
+ export * from "./circles/index.js";
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/geometry/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/geometry/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
@@ -15,3 +15,4 @@ export * from "./angles/index.js";
15
15
  export * from "./lines/index.js";
16
16
  export * from "./triangles/index.js";
17
17
  export * from "./optimisation/index.js";
18
+ export * from "./circles/index.js";
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { PointIdentifiers } from "../../../../math/geometry/point.js";
3
+ type Identifiers = {
4
+ AIds: PointIdentifiers;
5
+ BIds: PointIdentifiers;
6
+ CIds: PointIdentifiers;
7
+ };
8
+ export declare const cartesianEquationOfTriangleHeight: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=cartesianEquationOfTriangleHeight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartesianEquationOfTriangleHeight.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/cartesianEquationOfTriangleHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAEL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAYtC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AA6LF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAqBnE,CAAC"}