math-exercises 2.0.1 → 2.0.2

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 (956) hide show
  1. package/lib/exercises/calcul/addAndSub.d.ts +4 -5
  2. package/lib/exercises/calcul/addAndSub.d.ts.map +1 -1
  3. package/lib/exercises/calcul/addAndSub.js +14 -8
  4. package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts +4 -5
  5. package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
  6. package/lib/exercises/calcul/addAndSubWithoutRelatives.js +15 -8
  7. package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts +3 -7
  8. package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts.map +1 -1
  9. package/lib/exercises/calcul/arithmetics/euclideanDivision.js +10 -11
  10. package/lib/exercises/calcul/arithmetics/index.d.ts +4 -0
  11. package/lib/exercises/calcul/arithmetics/index.d.ts.map +1 -0
  12. package/lib/exercises/calcul/arithmetics/index.js +19 -0
  13. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts +3 -5
  14. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts.map +1 -1
  15. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.js +44 -42
  16. package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts +3 -7
  17. package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  18. package/lib/exercises/calcul/arithmetics/primeNumbers.js +18 -17
  19. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +3 -9
  20. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  21. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +17 -13
  22. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +3 -8
  23. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  24. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +16 -9
  25. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +3 -8
  26. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
  27. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +12 -7
  28. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts +3 -5
  29. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  30. package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +75 -29
  31. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +3 -5
  32. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  33. package/lib/exercises/calcul/fractions/fractionsDivision.js +17 -8
  34. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +3 -5
  35. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -1
  36. package/lib/exercises/calcul/fractions/fractionsProduct.js +17 -8
  37. package/lib/exercises/calcul/fractions/fractionsSum.d.ts +3 -5
  38. package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -1
  39. package/lib/exercises/calcul/fractions/fractionsSum.js +17 -8
  40. package/lib/exercises/calcul/fractions/index.d.ts +9 -0
  41. package/lib/exercises/calcul/fractions/index.d.ts.map +1 -0
  42. package/lib/exercises/calcul/fractions/index.js +24 -0
  43. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +5 -5
  44. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -1
  45. package/lib/exercises/calcul/fractions/simplifyFraction.js +17 -7
  46. package/lib/exercises/calcul/index.d.ts +9 -0
  47. package/lib/exercises/calcul/index.d.ts.map +1 -0
  48. package/lib/exercises/calcul/index.js +24 -0
  49. package/lib/exercises/calcul/mentalCaluls/index.d.ts +5 -0
  50. package/lib/exercises/calcul/mentalCaluls/index.d.ts.map +1 -0
  51. package/lib/exercises/calcul/mentalCaluls/index.js +20 -0
  52. package/lib/exercises/calcul/mentalCaluls/mentalAddAndSub.d.ts +7 -0
  53. package/lib/exercises/calcul/mentalCaluls/mentalAddAndSub.d.ts.map +1 -0
  54. package/lib/exercises/calcul/mentalCaluls/mentalAddAndSub.js +84 -0
  55. package/lib/exercises/calcul/mentalCaluls/mentalDivisions.d.ts +10 -0
  56. package/lib/exercises/calcul/mentalCaluls/mentalDivisions.d.ts.map +1 -0
  57. package/lib/exercises/calcul/mentalCaluls/mentalDivisions.js +101 -0
  58. package/lib/exercises/calcul/mentalCaluls/mentalMultiplications.d.ts +7 -0
  59. package/lib/exercises/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -0
  60. package/lib/exercises/calcul/mentalCaluls/mentalMultiplications.js +84 -0
  61. package/lib/exercises/calcul/mentalCaluls/mentalPercentage.d.ts +9 -0
  62. package/lib/exercises/calcul/mentalCaluls/mentalPercentage.d.ts.map +1 -0
  63. package/lib/exercises/calcul/mentalCaluls/mentalPercentage.js +140 -0
  64. package/lib/exercises/calcul/operations/index.d.ts +3 -0
  65. package/lib/exercises/calcul/operations/index.d.ts.map +1 -0
  66. package/lib/exercises/calcul/operations/index.js +18 -0
  67. package/lib/exercises/calcul/operations/operationsPriorities.d.ts +8 -5
  68. package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -1
  69. package/lib/exercises/calcul/operations/operationsPriorities.js +18 -10
  70. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +9 -5
  71. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
  72. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +19 -11
  73. package/lib/exercises/calcul/proportionality/index.d.ts +2 -0
  74. package/lib/exercises/calcul/proportionality/index.d.ts.map +1 -0
  75. package/lib/exercises/calcul/proportionality/index.js +17 -0
  76. package/lib/exercises/calcul/proportionality/proportionalityTable.d.ts +8 -5
  77. package/lib/exercises/calcul/proportionality/proportionalityTable.d.ts.map +1 -1
  78. package/lib/exercises/calcul/proportionality/proportionalityTable.js +21 -17
  79. package/lib/exercises/calcul/rounding/index.d.ts +2 -0
  80. package/lib/exercises/calcul/rounding/index.d.ts.map +1 -0
  81. package/lib/exercises/calcul/rounding/index.js +17 -0
  82. package/lib/exercises/calcul/rounding/rounding.d.ts +7 -9
  83. package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -1
  84. package/lib/exercises/calcul/rounding/rounding.js +52 -32
  85. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +3 -5
  86. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
  87. package/lib/exercises/calculLitteral/distributivity/allIdentities.js +31 -11
  88. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +3 -5
  89. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  90. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +26 -10
  91. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +6 -7
  92. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  93. package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +18 -10
  94. package/lib/exercises/calculLitteral/distributivity/index.d.ts +7 -0
  95. package/lib/exercises/calculLitteral/distributivity/index.d.ts.map +1 -0
  96. package/lib/exercises/calculLitteral/distributivity/index.js +26 -0
  97. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +6 -7
  98. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  99. package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +19 -11
  100. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +3 -5
  101. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  102. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +16 -9
  103. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +6 -7
  104. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  105. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +22 -10
  106. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts +2 -5
  107. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  108. package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +72 -26
  109. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +3 -5
  110. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  111. package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +19 -9
  112. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +3 -5
  113. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  114. package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +25 -12
  115. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +3 -5
  116. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  117. package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +25 -13
  118. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +3 -5
  119. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  120. package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +32 -15
  121. package/lib/exercises/calculLitteral/equation/expEquation.d.ts +5 -5
  122. package/lib/exercises/calculLitteral/equation/expEquation.d.ts.map +1 -1
  123. package/lib/exercises/calculLitteral/equation/expEquation.js +38 -14
  124. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts +3 -5
  125. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
  126. package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +25 -12
  127. package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts +7 -5
  128. package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
  129. package/lib/exercises/calculLitteral/equation/fractionEquation.js +42 -18
  130. package/lib/exercises/calculLitteral/equation/index.d.ts +11 -0
  131. package/lib/exercises/calculLitteral/equation/index.d.ts.map +1 -0
  132. package/lib/exercises/calculLitteral/equation/index.js +26 -0
  133. package/lib/exercises/calculLitteral/equation/logEquation.d.ts +5 -5
  134. package/lib/exercises/calculLitteral/equation/logEquation.d.ts.map +1 -1
  135. package/lib/exercises/calculLitteral/equation/logEquation.js +36 -14
  136. package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts +7 -5
  137. package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  138. package/lib/exercises/calculLitteral/equation/multiplicationEquation.js +30 -17
  139. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts +3 -5
  140. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  141. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +16 -9
  142. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts +3 -5
  143. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  144. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +17 -10
  145. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts +3 -5
  146. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  147. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +20 -9
  148. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +3 -5
  149. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  150. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +48 -15
  151. package/lib/exercises/calculLitteral/factorisation/index.d.ts +5 -0
  152. package/lib/exercises/calculLitteral/factorisation/index.d.ts.map +1 -0
  153. package/lib/exercises/calculLitteral/factorisation/index.js +20 -0
  154. package/lib/exercises/calculLitteral/index.d.ts +6 -0
  155. package/lib/exercises/calculLitteral/index.d.ts.map +1 -0
  156. package/lib/exercises/calculLitteral/index.js +21 -0
  157. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.d.ts +5 -7
  158. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
  159. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.js +32 -12
  160. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.d.ts +4 -6
  161. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
  162. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.js +42 -12
  163. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.d.ts +5 -6
  164. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
  165. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.js +46 -13
  166. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.d.ts +7 -6
  167. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  168. package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.js +54 -13
  169. package/lib/exercises/calculLitteral/inequations/index.d.ts +5 -0
  170. package/lib/exercises/calculLitteral/inequations/index.d.ts.map +1 -0
  171. package/lib/exercises/calculLitteral/inequations/index.js +20 -0
  172. package/lib/exercises/calculLitteral/simplifying/evaluateExpression.d.ts +7 -5
  173. package/lib/exercises/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
  174. package/lib/exercises/calculLitteral/simplifying/evaluateExpression.js +28 -13
  175. package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts +6 -5
  176. package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts.map +1 -1
  177. package/lib/exercises/calculLitteral/simplifying/expSimplifiying.js +71 -36
  178. package/lib/exercises/calculLitteral/simplifying/index.d.ts +5 -0
  179. package/lib/exercises/calculLitteral/simplifying/index.d.ts.map +1 -0
  180. package/lib/exercises/calculLitteral/simplifying/index.js +20 -0
  181. package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts +5 -5
  182. package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts.map +1 -1
  183. package/lib/exercises/calculLitteral/simplifying/logSimplifiying.js +35 -19
  184. package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts +4 -5
  185. package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
  186. package/lib/exercises/calculLitteral/simplifying/reduceExpression.js +50 -43
  187. package/lib/exercises/combinatory/anagrams.d.ts +3 -5
  188. package/lib/exercises/combinatory/anagrams.d.ts.map +1 -1
  189. package/lib/exercises/combinatory/anagrams.js +108 -104
  190. package/lib/exercises/combinatory/ballsCounting.d.ts +3 -5
  191. package/lib/exercises/combinatory/ballsCounting.d.ts.map +1 -1
  192. package/lib/exercises/combinatory/ballsCounting.js +38 -31
  193. package/lib/exercises/combinatory/diceCounting.d.ts +3 -5
  194. package/lib/exercises/combinatory/diceCounting.d.ts.map +1 -1
  195. package/lib/exercises/combinatory/diceCounting.js +43 -39
  196. package/lib/exercises/combinatory/index.d.ts +4 -0
  197. package/lib/exercises/combinatory/index.d.ts.map +1 -0
  198. package/lib/exercises/combinatory/index.js +19 -0
  199. package/lib/exercises/complex/addComplex.d.ts +3 -5
  200. package/lib/exercises/complex/addComplex.d.ts.map +1 -1
  201. package/lib/exercises/complex/addComplex.js +27 -14
  202. package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts +0 -9
  203. package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts.map +1 -1
  204. package/lib/exercises/complex/argumentFromAlgebraicComplex.js +51 -36
  205. package/lib/exercises/complex/conjugateComplex.ts.d.ts +3 -5
  206. package/lib/exercises/complex/conjugateComplex.ts.d.ts.map +1 -1
  207. package/lib/exercises/complex/conjugateComplex.ts.js +16 -8
  208. package/lib/exercises/complex/conjugateDivideComplex.d.ts +5 -5
  209. package/lib/exercises/complex/conjugateDivideComplex.d.ts.map +1 -1
  210. package/lib/exercises/complex/conjugateDivideComplex.js +19 -7
  211. package/lib/exercises/complex/conjugateMultiplyComplex.d.ts +3 -5
  212. package/lib/exercises/complex/conjugateMultiplyComplex.d.ts.map +1 -1
  213. package/lib/exercises/complex/conjugateMultiplyComplex.js +18 -8
  214. package/lib/exercises/complex/divideComplex.d.ts +5 -5
  215. package/lib/exercises/complex/divideComplex.d.ts.map +1 -1
  216. package/lib/exercises/complex/divideComplex.js +22 -9
  217. package/lib/exercises/complex/index.d.ts +11 -0
  218. package/lib/exercises/complex/index.d.ts.map +1 -0
  219. package/lib/exercises/complex/index.js +27 -0
  220. package/lib/exercises/complex/inverseComplex.d.ts +3 -5
  221. package/lib/exercises/complex/inverseComplex.d.ts.map +1 -1
  222. package/lib/exercises/complex/inverseComplex.js +16 -8
  223. package/lib/exercises/complex/linearCombinaisonComplex.d.ts +7 -5
  224. package/lib/exercises/complex/linearCombinaisonComplex.d.ts.map +1 -1
  225. package/lib/exercises/complex/linearCombinaisonComplex.js +21 -13
  226. package/lib/exercises/complex/moduloFromAlgebraicComplex.d.ts +2 -4
  227. package/lib/exercises/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
  228. package/lib/exercises/complex/moduloFromAlgebraicComplex.js +13 -1
  229. package/lib/exercises/complex/mutiplyComplex.d.ts +3 -5
  230. package/lib/exercises/complex/mutiplyComplex.d.ts.map +1 -1
  231. package/lib/exercises/complex/mutiplyComplex.js +20 -9
  232. package/lib/exercises/complex/reAndIm.d.ts +3 -5
  233. package/lib/exercises/complex/reAndIm.d.ts.map +1 -1
  234. package/lib/exercises/complex/reAndIm.js +16 -12
  235. package/lib/exercises/conversion/aeraConversion.d.ts +3 -5
  236. package/lib/exercises/conversion/aeraConversion.d.ts.map +1 -1
  237. package/lib/exercises/conversion/aeraConversion.js +24 -11
  238. package/lib/exercises/conversion/capacityConversion.d.ts +3 -5
  239. package/lib/exercises/conversion/capacityConversion.d.ts.map +1 -1
  240. package/lib/exercises/conversion/capacityConversion.js +24 -11
  241. package/lib/exercises/conversion/index.d.ts +7 -0
  242. package/lib/exercises/conversion/index.d.ts.map +1 -0
  243. package/lib/exercises/conversion/index.js +22 -0
  244. package/lib/exercises/conversion/lengthConversion.d.ts +3 -5
  245. package/lib/exercises/conversion/lengthConversion.d.ts.map +1 -1
  246. package/lib/exercises/conversion/lengthConversion.js +24 -11
  247. package/lib/exercises/conversion/massConversion.d.ts +3 -5
  248. package/lib/exercises/conversion/massConversion.d.ts.map +1 -1
  249. package/lib/exercises/conversion/massConversion.js +24 -11
  250. package/lib/exercises/conversion/volumeCapacityConversion.d.ts +7 -5
  251. package/lib/exercises/conversion/volumeCapacityConversion.d.ts.map +1 -1
  252. package/lib/exercises/conversion/volumeCapacityConversion.js +28 -16
  253. package/lib/exercises/conversion/volumeConversion.d.ts +3 -5
  254. package/lib/exercises/conversion/volumeConversion.d.ts.map +1 -1
  255. package/lib/exercises/conversion/volumeConversion.js +25 -12
  256. package/lib/exercises/derivation/derivative/constanteDerivative.d.ts +6 -7
  257. package/lib/exercises/derivation/derivative/constanteDerivative.d.ts.map +1 -1
  258. package/lib/exercises/derivation/derivative/constanteDerivative.js +18 -13
  259. package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts +3 -5
  260. package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
  261. package/lib/exercises/derivation/derivative/expDerivativeOne.js +20 -13
  262. package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts +3 -5
  263. package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
  264. package/lib/exercises/derivation/derivative/expDerivativeThree.js +21 -15
  265. package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts +3 -5
  266. package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts.map +1 -1
  267. package/lib/exercises/derivation/derivative/expDerivativeTwo.js +19 -14
  268. package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts +6 -7
  269. package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts.map +1 -1
  270. package/lib/exercises/derivation/derivative/firstDegreeDerivative.js +18 -13
  271. package/lib/exercises/derivation/derivative/index.d.ts +18 -0
  272. package/lib/exercises/derivation/derivative/index.d.ts.map +1 -0
  273. package/lib/exercises/derivation/derivative/index.js +38 -0
  274. package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts +3 -5
  275. package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
  276. package/lib/exercises/derivation/derivative/inverseFunctionDerivative.js +19 -8
  277. package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts +3 -5
  278. package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
  279. package/lib/exercises/derivation/derivative/lnDerivativeOne.js +27 -14
  280. package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts +3 -5
  281. package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  282. package/lib/exercises/derivation/derivative/lnDerivativeThree.js +37 -15
  283. package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts +3 -5
  284. package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts.map +1 -1
  285. package/lib/exercises/derivation/derivative/lnDerivativeTwo.js +21 -16
  286. package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts +3 -5
  287. package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
  288. package/lib/exercises/derivation/derivative/powerFunctionDerivative.js +34 -14
  289. package/lib/exercises/derivation/derivative/productDerivative.d.ts +3 -5
  290. package/lib/exercises/derivation/derivative/productDerivative.d.ts.map +1 -1
  291. package/lib/exercises/derivation/derivative/productDerivative.js +21 -7
  292. package/lib/exercises/derivation/derivative/quotientDerivative.d.ts +3 -6
  293. package/lib/exercises/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  294. package/lib/exercises/derivation/derivative/quotientDerivative.js +50 -14
  295. package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts +3 -5
  296. package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  297. package/lib/exercises/derivation/derivative/rootFunctionDerivative.js +26 -10
  298. package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts +6 -7
  299. package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
  300. package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +28 -9
  301. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts +6 -7
  302. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  303. package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +35 -10
  304. package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts +5 -5
  305. package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  306. package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.js +45 -12
  307. package/lib/exercises/derivation/derivative/usualderivative.d.ts +3 -5
  308. package/lib/exercises/derivation/derivative/usualderivative.d.ts.map +1 -1
  309. package/lib/exercises/derivation/derivative/usualderivative.js +56 -15
  310. package/lib/exercises/derivation/derivativeNumberCalcul.d.ts +5 -5
  311. package/lib/exercises/derivation/derivativeNumberCalcul.d.ts.map +1 -1
  312. package/lib/exercises/derivation/derivativeNumberCalcul.js +16 -10
  313. package/lib/exercises/derivation/derivativeNumberReading.d.ts +3 -5
  314. package/lib/exercises/derivation/derivativeNumberReading.d.ts.map +1 -1
  315. package/lib/exercises/derivation/derivativeNumberReading.js +43 -33
  316. package/lib/exercises/derivation/index.d.ts +4 -0
  317. package/lib/exercises/derivation/index.d.ts.map +1 -0
  318. package/lib/exercises/derivation/index.js +19 -0
  319. package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts +4 -5
  320. package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  321. package/lib/exercises/equaDiff/equaDiffGeneralForme.js +23 -16
  322. package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts +5 -5
  323. package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
  324. package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.js +31 -28
  325. package/lib/exercises/equaDiff/index.d.ts +3 -0
  326. package/lib/exercises/equaDiff/index.d.ts.map +1 -0
  327. package/lib/exercises/equaDiff/index.js +18 -0
  328. package/lib/exercises/exercise.d.ts +26 -21
  329. package/lib/exercises/exercise.d.ts.map +1 -1
  330. package/lib/exercises/exercise.js +3 -3
  331. package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts +3 -5
  332. package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts.map +1 -1
  333. package/lib/exercises/functions/absolute/absoluteValueEquations.js +27 -9
  334. package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts +4 -5
  335. package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
  336. package/lib/exercises/functions/absolute/absoluteValueInequations.js +31 -9
  337. package/lib/exercises/functions/absolute/index.d.ts +3 -0
  338. package/lib/exercises/functions/absolute/index.d.ts.map +1 -0
  339. package/lib/exercises/functions/absolute/index.js +18 -0
  340. package/lib/exercises/functions/affines/index.d.ts +5 -0
  341. package/lib/exercises/functions/affines/index.d.ts.map +1 -0
  342. package/lib/exercises/functions/affines/index.js +20 -0
  343. package/lib/exercises/functions/affines/leadingCoefficient.d.ts +3 -5
  344. package/lib/exercises/functions/affines/leadingCoefficient.d.ts.map +1 -1
  345. package/lib/exercises/functions/affines/leadingCoefficient.js +34 -35
  346. package/lib/exercises/functions/affines/leadingCoefficientCalculV1.d.ts +3 -5
  347. package/lib/exercises/functions/affines/leadingCoefficientCalculV1.d.ts.map +1 -1
  348. package/lib/exercises/functions/affines/leadingCoefficientCalculV1.js +19 -11
  349. package/lib/exercises/functions/affines/leadingCoefficientCalculV2.d.ts +3 -5
  350. package/lib/exercises/functions/affines/leadingCoefficientCalculV2.d.ts.map +1 -1
  351. package/lib/exercises/functions/affines/leadingCoefficientCalculV2.js +18 -10
  352. package/lib/exercises/functions/affines/signFunction.d.ts +6 -5
  353. package/lib/exercises/functions/affines/signFunction.d.ts.map +1 -1
  354. package/lib/exercises/functions/affines/signFunction.js +44 -29
  355. package/lib/exercises/functions/basics/imageFunction.d.ts +7 -5
  356. package/lib/exercises/functions/basics/imageFunction.d.ts.map +1 -1
  357. package/lib/exercises/functions/basics/imageFunction.js +24 -9
  358. package/lib/exercises/functions/basics/imageFunctionGeogebra.d.ts +7 -5
  359. package/lib/exercises/functions/basics/imageFunctionGeogebra.d.ts.map +1 -1
  360. package/lib/exercises/functions/basics/imageFunctionGeogebra.js +29 -12
  361. package/lib/exercises/functions/basics/index.d.ts +5 -0
  362. package/lib/exercises/functions/basics/index.d.ts.map +1 -0
  363. package/lib/exercises/functions/basics/index.js +20 -0
  364. package/lib/exercises/functions/basics/inverseImageFunction.d.ts +5 -5
  365. package/lib/exercises/functions/basics/inverseImageFunction.d.ts.map +1 -1
  366. package/lib/exercises/functions/basics/inverseImageFunction.js +18 -14
  367. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts +3 -5
  368. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
  369. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.js +34 -13
  370. package/lib/exercises/functions/cube/cubicEquation.d.ts +3 -5
  371. package/lib/exercises/functions/cube/cubicEquation.d.ts.map +1 -1
  372. package/lib/exercises/functions/cube/cubicEquation.js +21 -9
  373. package/lib/exercises/functions/cube/index.d.ts +2 -0
  374. package/lib/exercises/functions/cube/index.d.ts.map +1 -0
  375. package/lib/exercises/functions/cube/index.js +17 -0
  376. package/lib/exercises/functions/index.d.ts +7 -0
  377. package/lib/exercises/functions/index.d.ts.map +1 -0
  378. package/lib/exercises/functions/index.js +22 -0
  379. package/lib/exercises/functions/rationalFraction/index.d.ts +2 -0
  380. package/lib/exercises/functions/rationalFraction/index.d.ts.map +1 -0
  381. package/lib/exercises/functions/rationalFraction/index.js +17 -0
  382. package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.d.ts +2 -4
  383. package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.d.ts.map +1 -1
  384. package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.js +10 -2
  385. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts +5 -5
  386. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts.map +1 -1
  387. package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.js +17 -11
  388. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts +3 -5
  389. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts.map +1 -1
  390. package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.js +22 -14
  391. package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts +5 -5
  392. package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
  393. package/lib/exercises/functions/trinoms/canonicalFromDevForm.js +18 -9
  394. package/lib/exercises/functions/trinoms/deltaTrinom.d.ts +3 -5
  395. package/lib/exercises/functions/trinoms/deltaTrinom.d.ts.map +1 -1
  396. package/lib/exercises/functions/trinoms/deltaTrinom.js +18 -11
  397. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts +3 -5
  398. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts.map +1 -1
  399. package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.js +21 -12
  400. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts +5 -5
  401. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts.map +1 -1
  402. package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.js +14 -12
  403. package/lib/exercises/functions/trinoms/index.d.ts +11 -0
  404. package/lib/exercises/functions/trinoms/index.d.ts.map +1 -0
  405. package/lib/exercises/functions/trinoms/index.js +26 -0
  406. package/lib/exercises/functions/trinoms/niceRootsFromDevForm.d.ts +6 -5
  407. package/lib/exercises/functions/trinoms/niceRootsFromDevForm.d.ts.map +1 -1
  408. package/lib/exercises/functions/trinoms/niceRootsFromDevForm.js +22 -10
  409. package/lib/exercises/functions/trinoms/rootsFromDevForm.d.ts +6 -5
  410. package/lib/exercises/functions/trinoms/rootsFromDevForm.d.ts.map +1 -1
  411. package/lib/exercises/functions/trinoms/rootsFromDevForm.js +22 -10
  412. package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.d.ts +3 -5
  413. package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.d.ts.map +1 -1
  414. package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.js +26 -13
  415. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts +5 -5
  416. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts.map +1 -1
  417. package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.js +16 -12
  418. package/lib/exercises/geometry/areas/circleArea.d.ts +9 -0
  419. package/lib/exercises/geometry/areas/circleArea.d.ts.map +1 -0
  420. package/lib/exercises/geometry/areas/circleArea.js +52 -0
  421. package/lib/exercises/geometry/areas/index.d.ts +7 -0
  422. package/lib/exercises/geometry/areas/index.d.ts.map +1 -0
  423. package/lib/exercises/geometry/areas/index.js +22 -0
  424. package/lib/exercises/geometry/areas/rectangleArea.d.ts +8 -0
  425. package/lib/exercises/geometry/areas/rectangleArea.d.ts.map +1 -0
  426. package/lib/exercises/geometry/areas/rectangleArea.js +46 -0
  427. package/lib/exercises/geometry/areas/rightTriangleArea.d.ts +7 -0
  428. package/lib/exercises/geometry/areas/rightTriangleArea.d.ts.map +1 -0
  429. package/lib/exercises/geometry/areas/rightTriangleArea.js +75 -0
  430. package/lib/exercises/geometry/areas/squareArea.d.ts +7 -0
  431. package/lib/exercises/geometry/areas/squareArea.d.ts.map +1 -0
  432. package/lib/exercises/geometry/areas/squareArea.js +46 -0
  433. package/lib/exercises/geometry/areas/triangleArea.d.ts +5 -0
  434. package/lib/exercises/geometry/areas/triangleArea.d.ts.map +1 -0
  435. package/lib/exercises/geometry/areas/triangleArea.js +97 -0
  436. package/lib/exercises/geometry/areas/triangleAreaV2.d.ts +7 -0
  437. package/lib/exercises/geometry/areas/triangleAreaV2.d.ts.map +1 -0
  438. package/lib/exercises/geometry/areas/triangleAreaV2.js +71 -0
  439. package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.d.ts +3 -5
  440. package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
  441. package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.js +54 -24
  442. package/lib/exercises/geometry/cartesian/index.d.ts +3 -0
  443. package/lib/exercises/geometry/cartesian/index.d.ts.map +1 -0
  444. package/lib/exercises/geometry/cartesian/index.js +18 -0
  445. package/lib/exercises/geometry/cartesian/midpoint.d.ts +5 -5
  446. package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -1
  447. package/lib/exercises/geometry/cartesian/midpoint.js +29 -14
  448. package/lib/exercises/geometry/index.d.ts +7 -0
  449. package/lib/exercises/geometry/index.d.ts.map +1 -0
  450. package/lib/exercises/geometry/index.js +22 -0
  451. package/lib/exercises/geometry/perimeters/circleCircumference.d.ts +9 -0
  452. package/lib/exercises/geometry/perimeters/circleCircumference.d.ts.map +1 -0
  453. package/lib/exercises/geometry/perimeters/circleCircumference.js +52 -0
  454. package/lib/exercises/geometry/perimeters/index.d.ts +5 -0
  455. package/lib/exercises/geometry/perimeters/index.d.ts.map +1 -0
  456. package/lib/exercises/geometry/perimeters/index.js +20 -0
  457. package/lib/exercises/geometry/perimeters/rectanglePerimeter.d.ts +8 -0
  458. package/lib/exercises/geometry/perimeters/rectanglePerimeter.d.ts.map +1 -0
  459. package/lib/exercises/geometry/perimeters/rectanglePerimeter.js +46 -0
  460. package/lib/exercises/geometry/perimeters/squarePerimeter.d.ts +7 -0
  461. package/lib/exercises/geometry/perimeters/squarePerimeter.d.ts.map +1 -0
  462. package/lib/exercises/geometry/perimeters/squarePerimeter.js +46 -0
  463. package/lib/exercises/geometry/perimeters/trianglePerimeter.d.ts +7 -0
  464. package/lib/exercises/geometry/perimeters/trianglePerimeter.d.ts.map +1 -0
  465. package/lib/exercises/geometry/perimeters/trianglePerimeter.js +46 -0
  466. package/lib/exercises/geometry/pythagore/index.d.ts +3 -0
  467. package/lib/exercises/geometry/pythagore/index.d.ts.map +1 -0
  468. package/lib/exercises/geometry/pythagore/index.js +18 -0
  469. package/lib/exercises/geometry/pythagore/pythagore.d.ts +9 -0
  470. package/lib/exercises/geometry/pythagore/pythagore.d.ts.map +1 -0
  471. package/lib/exercises/geometry/pythagore/pythagore.js +65 -0
  472. package/lib/exercises/geometry/pythagore/pythagoreCalcul.d.ts +8 -0
  473. package/lib/exercises/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -0
  474. package/lib/exercises/geometry/pythagore/pythagoreCalcul.js +102 -0
  475. package/lib/exercises/geometry/thales/index.d.ts +3 -0
  476. package/lib/exercises/geometry/thales/index.d.ts.map +1 -0
  477. package/lib/exercises/geometry/thales/index.js +18 -0
  478. package/lib/exercises/geometry/thales/thales.d.ts +7 -0
  479. package/lib/exercises/geometry/thales/thales.d.ts.map +1 -0
  480. package/lib/exercises/geometry/thales/thales.js +130 -0
  481. package/lib/exercises/geometry/thales/thalesCalcul.d.ts +10 -0
  482. package/lib/exercises/geometry/thales/thalesCalcul.d.ts.map +1 -0
  483. package/lib/exercises/geometry/thales/thalesCalcul.js +145 -0
  484. package/lib/exercises/geometry/vectors/chasles.d.ts +4 -5
  485. package/lib/exercises/geometry/vectors/chasles.d.ts.map +1 -1
  486. package/lib/exercises/geometry/vectors/chasles.js +23 -16
  487. package/lib/exercises/geometry/vectors/coordinatesReading.d.ts +3 -5
  488. package/lib/exercises/geometry/vectors/coordinatesReading.d.ts.map +1 -1
  489. package/lib/exercises/geometry/vectors/coordinatesReading.js +12 -8
  490. package/lib/exercises/geometry/vectors/determinant.d.ts +3 -5
  491. package/lib/exercises/geometry/vectors/determinant.d.ts.map +1 -1
  492. package/lib/exercises/geometry/vectors/determinant.js +19 -12
  493. package/lib/exercises/geometry/vectors/index.d.ts +6 -0
  494. package/lib/exercises/geometry/vectors/index.d.ts.map +1 -0
  495. package/lib/exercises/geometry/vectors/index.js +21 -0
  496. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +5 -5
  497. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
  498. package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +16 -9
  499. package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts +3 -5
  500. package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
  501. package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.js +12 -8
  502. package/lib/exercises/index.d.ts +19 -0
  503. package/lib/exercises/index.d.ts.map +1 -0
  504. package/lib/exercises/index.js +34 -0
  505. package/lib/exercises/limits/index.d.ts +10 -0
  506. package/lib/exercises/limits/index.d.ts.map +1 -0
  507. package/lib/exercises/limits/index.js +25 -0
  508. package/lib/exercises/limits/polynomLimit.d.ts +4 -5
  509. package/lib/exercises/limits/polynomLimit.d.ts.map +1 -1
  510. package/lib/exercises/limits/polynomLimit.js +20 -14
  511. package/lib/exercises/limits/polynomLimitNoFI.d.ts +4 -5
  512. package/lib/exercises/limits/polynomLimitNoFI.d.ts.map +1 -1
  513. package/lib/exercises/limits/polynomLimitNoFI.js +20 -14
  514. package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts +6 -6
  515. package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
  516. package/lib/exercises/limits/rationalFracForbiddenValueLimit.js +32 -20
  517. package/lib/exercises/limits/rationalFracLimit.d.ts +6 -6
  518. package/lib/exercises/limits/rationalFracLimit.d.ts.map +1 -1
  519. package/lib/exercises/limits/rationalFracLimit.js +52 -15
  520. package/lib/exercises/limits/sequenceGeometricLimit.d.ts +3 -5
  521. package/lib/exercises/limits/sequenceGeometricLimit.d.ts.map +1 -1
  522. package/lib/exercises/limits/sequenceGeometricLimit.js +23 -15
  523. package/lib/exercises/limits/sequencePolynomLimit.d.ts +3 -5
  524. package/lib/exercises/limits/sequencePolynomLimit.d.ts.map +1 -1
  525. package/lib/exercises/limits/sequencePolynomLimit.js +21 -15
  526. package/lib/exercises/limits/sequencePolynomNoFILimit.d.ts +3 -5
  527. package/lib/exercises/limits/sequencePolynomNoFILimit.d.ts.map +1 -1
  528. package/lib/exercises/limits/sequencePolynomNoFILimit.js +21 -15
  529. package/lib/exercises/limits/sequencePolynomProductLimit.d.ts +5 -6
  530. package/lib/exercises/limits/sequencePolynomProductLimit.d.ts.map +1 -1
  531. package/lib/exercises/limits/sequencePolynomProductLimit.js +35 -19
  532. package/lib/exercises/limits/sequenceRationalFracLimit.d.ts +5 -6
  533. package/lib/exercises/limits/sequenceRationalFracLimit.d.ts.map +1 -1
  534. package/lib/exercises/limits/sequenceRationalFracLimit.js +55 -18
  535. package/lib/exercises/percent/applyPercent.d.ts +6 -5
  536. package/lib/exercises/percent/applyPercent.d.ts.map +1 -1
  537. package/lib/exercises/percent/applyPercent.js +32 -14
  538. package/lib/exercises/percent/averageEvolutionRate.d.ts +5 -5
  539. package/lib/exercises/percent/averageEvolutionRate.d.ts.map +1 -1
  540. package/lib/exercises/percent/averageEvolutionRate.js +17 -11
  541. package/lib/exercises/percent/evolutionToCM.d.ts +3 -5
  542. package/lib/exercises/percent/evolutionToCM.d.ts.map +1 -1
  543. package/lib/exercises/percent/evolutionToCM.js +24 -15
  544. package/lib/exercises/percent/globalPercent.d.ts +4 -5
  545. package/lib/exercises/percent/globalPercent.d.ts.map +1 -1
  546. package/lib/exercises/percent/globalPercent.js +23 -13
  547. package/lib/exercises/percent/index.d.ts +6 -0
  548. package/lib/exercises/percent/index.d.ts.map +1 -0
  549. package/lib/exercises/percent/index.js +21 -0
  550. package/lib/exercises/percent/reciprocalPercentage.d.ts +5 -5
  551. package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -1
  552. package/lib/exercises/percent/reciprocalPercentage.js +25 -14
  553. package/lib/exercises/powers/calculateNegativePower.d.ts +3 -5
  554. package/lib/exercises/powers/calculateNegativePower.d.ts.map +1 -1
  555. package/lib/exercises/powers/calculateNegativePower.js +38 -22
  556. package/lib/exercises/powers/calculatePower.d.ts +3 -5
  557. package/lib/exercises/powers/calculatePower.d.ts.map +1 -1
  558. package/lib/exercises/powers/calculatePower.js +26 -22
  559. package/lib/exercises/powers/decimalToScientific.d.ts +3 -5
  560. package/lib/exercises/powers/decimalToScientific.d.ts.map +1 -1
  561. package/lib/exercises/powers/decimalToScientific.js +25 -18
  562. package/lib/exercises/powers/index.d.ts +10 -0
  563. package/lib/exercises/powers/index.d.ts.map +1 -0
  564. package/lib/exercises/powers/index.js +25 -0
  565. package/lib/exercises/powers/powerDefinition.d.ts +3 -5
  566. package/lib/exercises/powers/powerDefinition.d.ts.map +1 -1
  567. package/lib/exercises/powers/powerDefinition.js +15 -10
  568. package/lib/exercises/powers/powersDivision.d.ts +4 -6
  569. package/lib/exercises/powers/powersDivision.d.ts.map +1 -1
  570. package/lib/exercises/powers/powersDivision.js +36 -14
  571. package/lib/exercises/powers/powersOfTenToDecimal.d.ts +3 -5
  572. package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -1
  573. package/lib/exercises/powers/powersOfTenToDecimal.js +26 -20
  574. package/lib/exercises/powers/powersPower.d.ts +4 -6
  575. package/lib/exercises/powers/powersPower.d.ts.map +1 -1
  576. package/lib/exercises/powers/powersPower.js +41 -18
  577. package/lib/exercises/powers/powersProduct.d.ts +4 -6
  578. package/lib/exercises/powers/powersProduct.d.ts.map +1 -1
  579. package/lib/exercises/powers/powersProduct.js +36 -13
  580. package/lib/exercises/powers/scientificToDecimal.d.ts +3 -5
  581. package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -1
  582. package/lib/exercises/powers/scientificToDecimal.js +24 -18
  583. package/lib/exercises/primitive/constantPrimitive.d.ts +10 -0
  584. package/lib/exercises/primitive/constantPrimitive.d.ts.map +1 -0
  585. package/lib/exercises/primitive/constantPrimitive.js +56 -0
  586. package/lib/exercises/primitive/expUPrimitive.d.ts +10 -0
  587. package/lib/exercises/primitive/expUPrimitive.d.ts.map +1 -0
  588. package/lib/exercises/primitive/expUPrimitive.js +76 -0
  589. package/lib/exercises/primitive/exponentialPrimitive.d.ts +10 -0
  590. package/lib/exercises/primitive/exponentialPrimitive.d.ts.map +1 -0
  591. package/lib/exercises/primitive/exponentialPrimitive.js +72 -0
  592. package/lib/exercises/primitive/index.d.ts +8 -0
  593. package/lib/exercises/primitive/index.d.ts.map +1 -0
  594. package/lib/exercises/primitive/index.js +31 -0
  595. package/lib/exercises/primitive/logarithmePrimitive.d.ts +9 -0
  596. package/lib/exercises/primitive/logarithmePrimitive.d.ts.map +1 -0
  597. package/lib/exercises/primitive/logarithmePrimitive.js +79 -0
  598. package/lib/exercises/primitive/polynomialPrimitive.d.ts +10 -0
  599. package/lib/exercises/primitive/polynomialPrimitive.d.ts.map +1 -0
  600. package/lib/exercises/primitive/polynomialPrimitive.js +60 -0
  601. package/lib/exercises/primitive/sinCosPrimitive.d.ts +11 -0
  602. package/lib/exercises/primitive/sinCosPrimitive.d.ts.map +1 -0
  603. package/lib/exercises/primitive/sinCosPrimitive.js +79 -0
  604. package/lib/exercises/primitive/sinUCosUPrimitive.d.ts +11 -0
  605. package/lib/exercises/primitive/sinUCosUPrimitive.d.ts.map +1 -0
  606. package/lib/exercises/primitive/sinUCosUPrimitive.js +85 -0
  607. package/lib/exercises/primitive/usualPrimitives.d.ts +11 -0
  608. package/lib/exercises/primitive/usualPrimitives.d.ts.map +1 -0
  609. package/lib/exercises/primitive/usualPrimitives.js +108 -0
  610. package/lib/exercises/probaStat/ballsBasicProbas.d.ts +5 -7
  611. package/lib/exercises/probaStat/ballsBasicProbas.d.ts.map +1 -1
  612. package/lib/exercises/probaStat/ballsBasicProbas.js +24 -12
  613. package/lib/exercises/probaStat/cardBasicProbas.d.ts +3 -5
  614. package/lib/exercises/probaStat/cardBasicProbas.d.ts.map +1 -1
  615. package/lib/exercises/probaStat/cardBasicProbas.js +49 -28
  616. package/lib/exercises/probaStat/conditionalProbability.d.ts +7 -5
  617. package/lib/exercises/probaStat/conditionalProbability.d.ts.map +1 -1
  618. package/lib/exercises/probaStat/conditionalProbability.js +24 -19
  619. package/lib/exercises/probaStat/diceBasicProbas.d.ts +3 -5
  620. package/lib/exercises/probaStat/diceBasicProbas.d.ts.map +1 -1
  621. package/lib/exercises/probaStat/diceBasicProbas.js +27 -11
  622. package/lib/exercises/probaStat/index.d.ts +8 -0
  623. package/lib/exercises/probaStat/index.d.ts.map +1 -0
  624. package/lib/exercises/probaStat/index.js +23 -0
  625. package/lib/exercises/probaStat/probabilityTree.d.ts +3 -7
  626. package/lib/exercises/probaStat/probabilityTree.d.ts.map +1 -1
  627. package/lib/exercises/probaStat/probabilityTree.js +62 -51
  628. package/lib/exercises/probaStat/stats1var/averageWithTable.d.ts +8 -0
  629. package/lib/exercises/probaStat/stats1var/averageWithTable.d.ts.map +1 -0
  630. package/lib/exercises/probaStat/stats1var/averageWithTable.js +68 -0
  631. package/lib/exercises/probaStat/stats1var/index.d.ts +7 -0
  632. package/lib/exercises/probaStat/stats1var/index.d.ts.map +1 -0
  633. package/lib/exercises/probaStat/stats1var/index.js +22 -0
  634. package/lib/exercises/probaStat/stats1var/marginalAndConditionalFrequency.d.ts +11 -0
  635. package/lib/exercises/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -0
  636. package/lib/exercises/probaStat/stats1var/marginalAndConditionalFrequency.js +129 -0
  637. package/lib/exercises/probaStat/stats1var/median.d.ts +7 -0
  638. package/lib/exercises/probaStat/stats1var/median.d.ts.map +1 -0
  639. package/lib/exercises/probaStat/stats1var/median.js +71 -0
  640. package/lib/exercises/probaStat/stats1var/medianList.d.ts +7 -0
  641. package/lib/exercises/probaStat/stats1var/medianList.d.ts.map +1 -0
  642. package/lib/exercises/probaStat/stats1var/medianList.js +56 -0
  643. package/lib/exercises/probaStat/stats1var/quartiles.d.ts +9 -0
  644. package/lib/exercises/probaStat/stats1var/quartiles.d.ts.map +1 -0
  645. package/lib/exercises/probaStat/stats1var/quartiles.js +84 -0
  646. package/lib/exercises/probaStat/stats1var/quartilesList.d.ts +8 -0
  647. package/lib/exercises/probaStat/stats1var/quartilesList.d.ts.map +1 -0
  648. package/lib/exercises/probaStat/stats1var/quartilesList.js +72 -0
  649. package/lib/exercises/probaStat/stats2var/averagePoint.d.ts +5 -5
  650. package/lib/exercises/probaStat/stats2var/averagePoint.d.ts.map +1 -1
  651. package/lib/exercises/probaStat/stats2var/averagePoint.js +29 -11
  652. package/lib/exercises/probaStat/stats2var/index.d.ts +2 -0
  653. package/lib/exercises/probaStat/stats2var/index.d.ts.map +1 -0
  654. package/lib/exercises/probaStat/stats2var/index.js +17 -0
  655. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts +3 -5
  656. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
  657. package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +12 -8
  658. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts +3 -5
  659. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
  660. package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +22 -10
  661. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts +6 -5
  662. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
  663. package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +14 -10
  664. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts +6 -5
  665. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -1
  666. package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +12 -8
  667. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts +6 -5
  668. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
  669. package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +12 -8
  670. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts +3 -5
  671. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
  672. package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +14 -10
  673. package/lib/exercises/sequences/arithmetic/firstIntegersSum.d.ts +3 -5
  674. package/lib/exercises/sequences/arithmetic/firstIntegersSum.d.ts.map +1 -1
  675. package/lib/exercises/sequences/arithmetic/firstIntegersSum.js +12 -8
  676. package/lib/exercises/sequences/arithmetic/index.d.ts +8 -0
  677. package/lib/exercises/sequences/arithmetic/index.d.ts.map +1 -0
  678. package/lib/exercises/sequences/arithmetic/index.js +23 -0
  679. package/lib/exercises/sequences/explicitFormulaUsage.d.ts +3 -5
  680. package/lib/exercises/sequences/explicitFormulaUsage.d.ts.map +1 -1
  681. package/lib/exercises/sequences/explicitFormulaUsage.js +15 -11
  682. package/lib/exercises/sequences/genericSequenceVariations.d.ts +4 -6
  683. package/lib/exercises/sequences/genericSequenceVariations.d.ts.map +1 -1
  684. package/lib/exercises/sequences/genericSequenceVariations.js +22 -18
  685. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +3 -5
  686. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  687. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +13 -10
  688. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +3 -5
  689. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  690. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +24 -13
  691. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +5 -6
  692. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -1
  693. package/lib/exercises/sequences/geometric/geometricFindReason.js +16 -11
  694. package/lib/exercises/sequences/geometric/geometricFirstTermsSum.d.ts +3 -5
  695. package/lib/exercises/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
  696. package/lib/exercises/sequences/geometric/geometricFirstTermsSum.js +23 -11
  697. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +4 -5
  698. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
  699. package/lib/exercises/sequences/geometric/geometricReasonUsage.js +12 -8
  700. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +4 -5
  701. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
  702. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +13 -9
  703. package/lib/exercises/sequences/geometric/index.d.ts +7 -0
  704. package/lib/exercises/sequences/geometric/index.d.ts.map +1 -0
  705. package/lib/exercises/sequences/geometric/index.js +22 -0
  706. package/lib/exercises/sequences/index.d.ts +6 -0
  707. package/lib/exercises/sequences/index.d.ts.map +1 -0
  708. package/lib/exercises/sequences/index.js +21 -0
  709. package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts +3 -5
  710. package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
  711. package/lib/exercises/sequences/recurrenceFormulaUsage.js +15 -11
  712. package/lib/exercises/sets/index.d.ts +3 -0
  713. package/lib/exercises/sets/index.d.ts.map +1 -0
  714. package/lib/exercises/sets/index.js +18 -0
  715. package/lib/exercises/sets/intervals/index.d.ts +4 -0
  716. package/lib/exercises/sets/intervals/index.d.ts.map +1 -0
  717. package/lib/exercises/sets/intervals/index.js +19 -0
  718. package/lib/exercises/sets/intervals/inequalityToInterval.d.ts +3 -5
  719. package/lib/exercises/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  720. package/lib/exercises/sets/intervals/inequalityToInterval.js +92 -45
  721. package/lib/exercises/sets/intervals/intervalsIntersection.d.ts +3 -5
  722. package/lib/exercises/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  723. package/lib/exercises/sets/intervals/intervalsIntersection.js +19 -7
  724. package/lib/exercises/sets/intervals/intervalsUnion.d.ts +3 -5
  725. package/lib/exercises/sets/intervals/intervalsUnion.d.ts.map +1 -1
  726. package/lib/exercises/sets/intervals/intervalsUnion.js +11 -7
  727. package/lib/exercises/sets/setBelonging.d.ts +5 -5
  728. package/lib/exercises/sets/setBelonging.d.ts.map +1 -1
  729. package/lib/exercises/sets/setBelonging.js +32 -19
  730. package/lib/exercises/squareRoots/index.d.ts +3 -0
  731. package/lib/exercises/squareRoots/index.d.ts.map +1 -0
  732. package/lib/exercises/squareRoots/index.js +18 -0
  733. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +4 -5
  734. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -1
  735. package/lib/exercises/squareRoots/simpifySquareRoot.js +13 -7
  736. package/lib/exercises/squareRoots/squareRootEquation.d.ts +3 -5
  737. package/lib/exercises/squareRoots/squareRootEquation.d.ts.map +1 -1
  738. package/lib/exercises/squareRoots/squareRootEquation.js +20 -10
  739. package/lib/exercises/trigonometry/index.d.ts +6 -0
  740. package/lib/exercises/trigonometry/index.d.ts.map +1 -0
  741. package/lib/exercises/trigonometry/index.js +21 -0
  742. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +5 -5
  743. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -1
  744. package/lib/exercises/trigonometry/mainRemarkableValues.js +33 -20
  745. package/lib/exercises/trigonometry/remarkableValues.d.ts +5 -5
  746. package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -1
  747. package/lib/exercises/trigonometry/remarkableValues.js +29 -18
  748. package/lib/exercises/trigonometry/trigonometry.d.ts +11 -0
  749. package/lib/exercises/trigonometry/trigonometry.d.ts.map +1 -0
  750. package/lib/exercises/trigonometry/trigonometry.js +114 -0
  751. package/lib/exercises/trigonometry/trigonometryAngleCalcul.d.ts +9 -0
  752. package/lib/exercises/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -0
  753. package/lib/exercises/trigonometry/trigonometryAngleCalcul.js +73 -0
  754. package/lib/exercises/trigonometry/trigonometrySideCalcul.d.ts +10 -0
  755. package/lib/exercises/trigonometry/trigonometrySideCalcul.d.ts.map +1 -0
  756. package/lib/exercises/trigonometry/trigonometrySideCalcul.js +85 -0
  757. package/lib/exercises/utils/getDistinctQuestions.d.ts +2 -2
  758. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  759. package/lib/exercises/utils/getDistinctQuestions.js +2 -3
  760. package/lib/exercises/utils/keys/equationKeys.d.ts +3 -0
  761. package/lib/exercises/utils/keys/equationKeys.d.ts.map +1 -0
  762. package/lib/exercises/utils/keys/equationKeys.js +12 -0
  763. package/lib/exercises/utils/keys/inequationKeys.d.ts +3 -0
  764. package/lib/exercises/utils/keys/inequationKeys.d.ts.map +1 -0
  765. package/lib/exercises/utils/keys/inequationKeys.js +17 -0
  766. package/lib/index.d.ts +692 -15
  767. package/lib/index.d.ts.map +1 -1
  768. package/lib/index.js +51 -23
  769. package/lib/math/complex/complex.d.ts +4 -3
  770. package/lib/math/complex/complex.d.ts.map +1 -1
  771. package/lib/math/complex/complex.js +15 -17
  772. package/lib/math/geometry/point.d.ts +3 -4
  773. package/lib/math/geometry/point.d.ts.map +1 -1
  774. package/lib/math/geometry/point.js +23 -22
  775. package/lib/math/geometry/vector.d.ts +2 -2
  776. package/lib/math/geometry/vector.d.ts.map +1 -1
  777. package/lib/math/geometry/vector.js +15 -5
  778. package/lib/math/numbers/decimals/decimal.d.ts +2 -2
  779. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  780. package/lib/math/numbers/decimals/decimal.js +24 -21
  781. package/lib/math/numbers/integer/integer.d.ts +6 -2
  782. package/lib/math/numbers/integer/integer.d.ts.map +1 -1
  783. package/lib/math/numbers/integer/integer.js +34 -7
  784. package/lib/math/numbers/integer/power.d.ts +2 -2
  785. package/lib/math/numbers/integer/power.d.ts.map +1 -1
  786. package/lib/math/numbers/integer/power.js +6 -6
  787. package/lib/math/numbers/integer/primes.d.ts.map +1 -1
  788. package/lib/math/numbers/integer/primes.js +4 -1
  789. package/lib/math/numbers/nombre.d.ts +3 -8
  790. package/lib/math/numbers/nombre.d.ts.map +1 -1
  791. package/lib/math/numbers/nombre.js +6 -1
  792. package/lib/math/numbers/rationals/rational.d.ts +7 -10
  793. package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
  794. package/lib/math/numbers/rationals/rational.js +16 -10
  795. package/lib/math/numbers/reals/extendedRingElement.d.ts +3 -1
  796. package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
  797. package/lib/math/numbers/reals/real.d.ts +2 -1
  798. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  799. package/lib/math/numbers/reals/real.js +11 -1
  800. package/lib/math/polynomials/polynomial.d.ts +9 -6
  801. package/lib/math/polynomials/polynomial.d.ts.map +1 -1
  802. package/lib/math/polynomials/polynomial.js +102 -35
  803. package/lib/math/polynomials/rationalFrac.d.ts +12 -0
  804. package/lib/math/polynomials/rationalFrac.d.ts.map +1 -0
  805. package/lib/math/polynomials/rationalFrac.js +50 -0
  806. package/lib/math/polynomials/trinom.d.ts +6 -5
  807. package/lib/math/polynomials/trinom.d.ts.map +1 -1
  808. package/lib/math/polynomials/trinom.js +57 -22
  809. package/lib/math/sets/intervals/intervals.d.ts +11 -16
  810. package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
  811. package/lib/math/sets/intervals/intervals.js +77 -63
  812. package/lib/math/trigonometry/remarkableValue.d.ts +7 -2
  813. package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -1
  814. package/lib/math/trigonometry/remarkableValue.js +16 -5
  815. package/lib/math/trigonometry/remarkableValues.d.ts +1 -1
  816. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
  817. package/lib/math/trigonometry/remarkableValues.js +11 -0
  818. package/lib/math/utils/latex/frenchify.d.ts +1 -1
  819. package/lib/math/utils/latex/frenchify.d.ts.map +1 -1
  820. package/lib/math/utils/latex/frenchify.js +3 -1
  821. package/lib/server.d.ts +2 -1
  822. package/lib/server.d.ts.map +1 -1
  823. package/lib/server.js +58 -14
  824. package/lib/tree/nodes/algebraicNode.d.ts +4 -0
  825. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -0
  826. package/lib/tree/nodes/algebraicNode.js +5 -0
  827. package/lib/tree/nodes/complex/complexNode.d.ts +7 -10
  828. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  829. package/lib/tree/nodes/complex/complexNode.js +20 -41
  830. package/lib/tree/nodes/equations/equalNode.d.ts +14 -0
  831. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -0
  832. package/lib/tree/nodes/equations/equalNode.js +41 -0
  833. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +21 -0
  834. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -0
  835. package/lib/tree/nodes/equations/equationSolutionNode.js +44 -0
  836. package/lib/tree/nodes/equations/multiEqualNode.d.ts +14 -0
  837. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -0
  838. package/lib/tree/nodes/equations/multiEqualNode.js +39 -0
  839. package/lib/tree/nodes/functions/absNode.d.ts +17 -0
  840. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -0
  841. package/lib/tree/nodes/functions/absNode.js +41 -0
  842. package/lib/tree/nodes/functions/cosNode.d.ts +8 -4
  843. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  844. package/lib/tree/nodes/functions/cosNode.js +8 -3
  845. package/lib/tree/nodes/functions/expNode.d.ts +9 -9
  846. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  847. package/lib/tree/nodes/functions/expNode.js +13 -5
  848. package/lib/tree/nodes/functions/functionNode.d.ts +7 -7
  849. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
  850. package/lib/tree/nodes/functions/functionNode.js +6 -10
  851. package/lib/tree/nodes/functions/logNode.d.ts +9 -4
  852. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  853. package/lib/tree/nodes/functions/logNode.js +20 -5
  854. package/lib/tree/nodes/functions/oppositeNode.d.ts +17 -6
  855. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  856. package/lib/tree/nodes/functions/oppositeNode.js +55 -14
  857. package/lib/tree/nodes/functions/sinNode.d.ts +8 -4
  858. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  859. package/lib/tree/nodes/functions/sinNode.js +8 -3
  860. package/lib/tree/nodes/functions/sqrtNode.d.ts +10 -5
  861. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  862. package/lib/tree/nodes/functions/sqrtNode.js +26 -5
  863. package/lib/tree/nodes/geometry/lengthNode.d.ts +14 -0
  864. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -0
  865. package/lib/tree/nodes/geometry/lengthNode.js +33 -0
  866. package/lib/tree/nodes/geometry/pointNode.d.ts +15 -0
  867. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -0
  868. package/lib/tree/nodes/geometry/pointNode.js +41 -0
  869. package/lib/tree/nodes/geometry/vectorNode.d.ts +14 -0
  870. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -0
  871. package/lib/tree/nodes/geometry/vectorNode.js +30 -0
  872. package/lib/tree/nodes/inequations/inequationNode.d.ts +21 -0
  873. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -0
  874. package/lib/tree/nodes/inequations/inequationNode.js +116 -0
  875. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +21 -0
  876. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -0
  877. package/lib/tree/nodes/inequations/inequationSolutionNode.js +46 -0
  878. package/lib/tree/nodes/node.d.ts +22 -3
  879. package/lib/tree/nodes/node.d.ts.map +1 -1
  880. package/lib/tree/nodes/node.js +7 -0
  881. package/lib/tree/nodes/numbers/constantNode.d.ts +4 -2
  882. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  883. package/lib/tree/nodes/numbers/constantNode.js +5 -1
  884. package/lib/tree/nodes/numbers/infiniteNode.d.ts +5 -0
  885. package/lib/tree/nodes/numbers/infiniteNode.d.ts.map +1 -0
  886. package/lib/tree/nodes/numbers/infiniteNode.js +7 -0
  887. package/lib/tree/nodes/numbers/numberNode.d.ts +4 -2
  888. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  889. package/lib/tree/nodes/numbers/numberNode.js +9 -5
  890. package/lib/tree/nodes/numbers/percentNode.d.ts +12 -0
  891. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -0
  892. package/lib/tree/nodes/numbers/percentNode.js +26 -0
  893. package/lib/tree/nodes/operators/addNode.d.ts +15 -6
  894. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  895. package/lib/tree/nodes/operators/addNode.js +53 -14
  896. package/lib/tree/nodes/operators/divideNode.d.ts +11 -5
  897. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  898. package/lib/tree/nodes/operators/divideNode.js +20 -10
  899. package/lib/tree/nodes/operators/fractionNode.d.ts +14 -11
  900. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  901. package/lib/tree/nodes/operators/fractionNode.js +28 -17
  902. package/lib/tree/nodes/operators/multiplyNode.d.ts +16 -11
  903. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  904. package/lib/tree/nodes/operators/multiplyNode.js +154 -33
  905. package/lib/tree/nodes/operators/operatorNode.d.ts +11 -12
  906. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  907. package/lib/tree/nodes/operators/operatorNode.js +4 -22
  908. package/lib/tree/nodes/operators/powerNode.d.ts +14 -9
  909. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  910. package/lib/tree/nodes/operators/powerNode.js +21 -8
  911. package/lib/tree/nodes/operators/substractNode.d.ts +8 -3
  912. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  913. package/lib/tree/nodes/operators/substractNode.js +15 -5
  914. package/lib/tree/nodes/sets/belongsNode.d.ts +15 -0
  915. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -0
  916. package/lib/tree/nodes/sets/belongsNode.js +36 -0
  917. package/lib/tree/nodes/sets/discreteSetNode.d.ts +15 -0
  918. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -0
  919. package/lib/tree/nodes/sets/discreteSetNode.js +54 -0
  920. package/lib/tree/nodes/sets/intervalNode.d.ts +24 -0
  921. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -0
  922. package/lib/tree/nodes/sets/intervalNode.js +71 -0
  923. package/lib/tree/nodes/sets/setNode.d.ts +4 -0
  924. package/lib/tree/nodes/sets/setNode.d.ts.map +1 -0
  925. package/lib/tree/nodes/sets/setNode.js +2 -0
  926. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +20 -0
  927. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -0
  928. package/lib/tree/nodes/sets/unionIntervalNode.js +44 -0
  929. package/lib/tree/nodes/variables/variableNode.d.ts +2 -1
  930. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  931. package/lib/tree/nodes/variables/variableNode.js +5 -1
  932. package/lib/tree/parsers/simplify.d.ts +1 -1
  933. package/lib/tree/parsers/simplify.d.ts.map +1 -1
  934. package/lib/tree/parsers/simplify.js +15 -15
  935. package/lib/tree/utilities/functionComposition.d.ts +5 -0
  936. package/lib/tree/utilities/functionComposition.d.ts.map +1 -0
  937. package/lib/tree/utilities/functionComposition.js +14 -0
  938. package/lib/tree/utilities/operatorComposition.d.ts +5 -0
  939. package/lib/tree/utilities/operatorComposition.d.ts.map +1 -0
  940. package/lib/tree/utilities/operatorComposition.js +14 -0
  941. package/lib/types/class.d.ts +4 -0
  942. package/lib/types/class.d.ts.map +1 -0
  943. package/lib/types/class.js +2 -0
  944. package/lib/utils/cartesianProducts.d.ts +13 -0
  945. package/lib/utils/cartesianProducts.d.ts.map +1 -0
  946. package/lib/utils/cartesianProducts.js +64 -0
  947. package/lib/utils/isInt.d.ts +2 -0
  948. package/lib/utils/isInt.d.ts.map +1 -0
  949. package/lib/utils/isInt.js +7 -0
  950. package/lib/utils/isLetter.d.ts +2 -0
  951. package/lib/utils/isLetter.d.ts.map +1 -0
  952. package/lib/utils/isLetter.js +7 -0
  953. package/lib/utils/permutations.d.ts +2 -0
  954. package/lib/utils/permutations.d.ts.map +1 -0
  955. package/lib/utils/permutations.js +21 -0
  956. package/package.json +1 -1
@@ -9,41 +9,47 @@ const expNode_1 = require("../../../tree/nodes/functions/expNode");
9
9
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
10
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
11
11
  const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
12
- const simplify_1 = require("../../../tree/parsers/simplify");
13
12
  const getExpDerivativeThree = () => {
14
13
  const a = (0, randint_1.randint)(-9, 10, [0]);
15
14
  const b = (0, randint_1.randint)(-9, 10);
16
- const myfunction = new multiplyNode_1.MultiplyNode(new polynomial_1.Polynomial([b, a]).toTree(), new expNode_1.ExpNode(new variableNode_1.VariableNode('x')));
17
- const derivative = new multiplyNode_1.MultiplyNode(new polynomial_1.Polynomial([b + a, a]).toTree(), new expNode_1.ExpNode(new variableNode_1.VariableNode('x')));
15
+ const myfunction = new multiplyNode_1.MultiplyNode(new polynomial_1.Polynomial([b, a]).toTree(), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
16
+ const derivative = new multiplyNode_1.MultiplyNode(new polynomial_1.Polynomial([b + a, a]).toTree(), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
18
17
  const answer = derivative.toTex();
19
18
  const question = {
20
19
  instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()}$.`,
21
20
  startStatement: "f'(x)",
22
21
  answer,
23
- keys: ['x', 'epower', 'exp'],
24
- answerFormat: 'tex',
25
- qcmGeneratorProps: { answer, a, b },
22
+ keys: ["x", "epower", "exp"],
23
+ answerFormat: "tex",
24
+ identifiers: { a, b },
26
25
  };
27
26
  return question;
28
27
  };
29
28
  const getPropositions = (n, { answer, a, b }) => {
30
29
  const propositions = [];
31
30
  (0, exercise_1.addValidProp)(propositions, answer);
32
- (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode('x'))).toTex());
33
- (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new polynomial_1.Polynomial([b + a, -a]).toTree(), new expNode_1.ExpNode(new variableNode_1.VariableNode('x'))).toTex());
34
- (0, exercise_1.tryToAddWrongProp)(propositions, a + '');
35
- (0, exercise_1.tryToAddWrongProp)(propositions, (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode('x')), new expNode_1.ExpNode(new variableNode_1.VariableNode('x')))).toTex());
31
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x"))).toTex());
32
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new polynomial_1.Polynomial([b + a, -a]).toTree(), new expNode_1.ExpNode(new variableNode_1.VariableNode("x"))).toTex());
33
+ (0, exercise_1.tryToAddWrongProp)(propositions, a + "");
34
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode("x")), new expNode_1.ExpNode(new variableNode_1.VariableNode("x"))).toTex());
36
35
  return (0, exercise_1.shuffleProps)(propositions, n);
37
36
  };
37
+ const isAnswerValid = (ans, { a, b }) => {
38
+ const affine = new polynomial_1.Polynomial([a + b, a]).toTree();
39
+ const derivative = new multiplyNode_1.MultiplyNode(affine, new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
40
+ const texs = derivative.toAllValidTexs();
41
+ return texs.includes(ans);
42
+ };
38
43
  exports.expDerivativeThree = {
39
- id: 'expDerivativeThree',
40
- connector: '=',
41
- label: 'Dérivée de $(ax+b) \\times \\exp(x)$',
42
- levels: ['1reESM', '1reSpé', '1reTech', 'MathComp'],
43
- sections: ['Dérivation', 'Exponentielle'],
44
+ id: "expDerivativeThree",
45
+ connector: "=",
46
+ label: "Dérivée de $(ax+b) \\times \\exp(x)$",
47
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp"],
48
+ sections: ["Dérivation", "Exponentielle"],
44
49
  isSingleStep: false,
45
50
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpDerivativeThree, nb),
46
51
  getPropositions,
47
52
  qcmTimer: 60,
48
53
  freeTimer: 60,
54
+ isAnswerValid,
49
55
  };
@@ -1,10 +1,8 @@
1
- import { MathExercise } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
1
+ import { MathExercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
4
3
  a: number;
5
4
  b: number;
6
5
  };
7
- type VEAProps = {};
8
- export declare const expDerivativeTwo: MathExercise<QCMProps, VEAProps>;
6
+ export declare const expDerivativeTwo: MathExercise<Identifiers>;
9
7
  export {};
10
8
  //# sourceMappingURL=expDerivativeTwo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/expDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AA6CnB,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAW7D,CAAC"}
1
+ {"version":3,"file":"expDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/expDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4DF,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,WAAW,CAYtD,CAAC"}
@@ -9,44 +9,49 @@ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
9
9
  const addNode_1 = require("../../../tree/nodes/operators/addNode");
10
10
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
11
11
  const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
12
- const simplify_1 = require("../../../tree/parsers/simplify");
13
12
  const getExpDerivative = () => {
14
13
  const a = (0, randint_1.randint)(-9, 10, [0]);
15
14
  const b = (0, randint_1.randint)(-9, 10);
16
- const myfunction = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode('x'))), new numberNode_1.NumberNode(b));
17
- const derivative = (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode('x'))));
15
+ const myfunction = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x"))), new numberNode_1.NumberNode(b));
16
+ const derivative = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
18
17
  const answer = derivative.toTex();
19
18
  const question = {
20
19
  instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()}$.`,
21
20
  startStatement: "f'(x)",
22
21
  answer,
23
- keys: ['x', 'epower', 'exp'],
24
- answerFormat: 'tex',
25
- qcmGeneratorProps: { answer, a, b },
22
+ keys: ["x", "epower", "exp"],
23
+ answerFormat: "tex",
24
+ identifiers: { a, b },
26
25
  };
27
26
  return question;
28
27
  };
29
28
  const getPropositions = (n, { answer, a, b }) => {
30
29
  const propositions = [];
31
30
  (0, exercise_1.addValidProp)(propositions, answer);
32
- const myfunction = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode('x'))), new numberNode_1.NumberNode(b));
31
+ const myfunction = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x"))), new numberNode_1.NumberNode(b));
33
32
  (0, exercise_1.tryToAddWrongProp)(propositions, myfunction.toTex());
34
- (0, exercise_1.tryToAddWrongProp)(propositions, a + '');
33
+ (0, exercise_1.tryToAddWrongProp)(propositions, a + "");
35
34
  while (propositions.length < n) {
36
35
  const randomA = (0, randint_1.randint)(-9, 10, [0]);
37
- (0, exercise_1.tryToAddWrongProp)(propositions, (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(randomA), new expNode_1.ExpNode(new variableNode_1.VariableNode('x')))).toTex());
36
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(randomA), new expNode_1.ExpNode(new variableNode_1.VariableNode("x"))).toTex());
38
37
  }
39
38
  return (0, exercise_1.shuffleProps)(propositions, n);
40
39
  };
40
+ const isAnswerValid = (ans, { a }) => {
41
+ const derivative = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
42
+ const texs = derivative.toAllValidTexs();
43
+ return texs.includes(ans);
44
+ };
41
45
  exports.expDerivativeTwo = {
42
- id: 'expDerivativeTwo',
43
- connector: '=',
44
- label: 'Dérivée de $a \\times \\exp(x) + b$',
45
- levels: ['1reESM', '1reSpé', '1reTech', 'MathComp'],
46
- sections: ['Dérivation', 'Exponentielle'],
46
+ id: "expDerivativeTwo",
47
+ connector: "=",
48
+ label: "Dérivée de $a \\times \\exp(x) + b$",
49
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp"],
50
+ sections: ["Dérivation", "Exponentielle"],
47
51
  isSingleStep: false,
48
52
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpDerivative, nb),
49
53
  getPropositions,
50
54
  qcmTimer: 60,
51
55
  freeTimer: 60,
56
+ isAnswerValid,
52
57
  };
@@ -1,12 +1,11 @@
1
- import { MathExercise, QCMGenerator, QuestionGenerator } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
1
+ import { MathExercise, QCMGenerator, QuestionGenerator, VEA } from "../../../exercises/exercise";
2
+ type Identifiers = {
4
3
  a: number;
5
4
  b: number;
6
5
  };
7
- type VEAProps = {};
8
- export declare const getFirstDegreeDerivative: QuestionGenerator<QCMProps, VEAProps>;
9
- export declare const getFirstDegreeDerivativePropositions: QCMGenerator<QCMProps>;
10
- export declare const firstDegreeDerivative: MathExercise<QCMProps, VEAProps>;
6
+ export declare const getFirstDegreeDerivative: QuestionGenerator<Identifiers>;
7
+ export declare const getFirstDegreeDerivativePropositions: QCMGenerator<Identifiers>;
8
+ export declare const isFirstDegreeDerivativeAnswerValid: VEA<Identifiers>;
9
+ export declare const firstDegreeDerivative: MathExercise<Identifiers>;
11
10
  export {};
12
11
  //# sourceMappingURL=firstDegreeDerivative.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"firstDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/firstDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,YAAY,EAEZ,iBAAiB,EAIlB,MAAM,0BAA0B,CAAC;AAIlC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AACnB,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAc1E,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,QAAQ,CAevE,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAWlE,CAAC"}
1
+ {"version":3,"file":"firstDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/firstDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAcnE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,WAAW,CAkB1E,CAAC;AACF,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,WAAW,CAK/D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,WAAW,CAY3D,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.firstDegreeDerivative = exports.getFirstDegreeDerivativePropositions = exports.getFirstDegreeDerivative = void 0;
3
+ exports.firstDegreeDerivative = exports.isFirstDegreeDerivativeAnswerValid = exports.getFirstDegreeDerivativePropositions = exports.getFirstDegreeDerivative = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const polynomial_1 = require("../../../math/polynomials/polynomial");
@@ -8,14 +8,14 @@ const randint_1 = require("../../../math/utils/random/randint");
8
8
  const getFirstDegreeDerivative = () => {
9
9
  const [a, b] = [(0, randint_1.randint)(-9, 10, [0]), (0, randint_1.randint)(-9, 10)];
10
10
  const polynomial = new polynomial_1.Polynomial([b, a]);
11
- const answer = a + '';
11
+ const answer = a + "";
12
12
  const question = {
13
- instruction: `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par $f(x) = ${polynomial.toString()}$.`,
13
+ instruction: `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par $f(x) = ${polynomial.toTex()}$.`,
14
14
  startStatement: `f'(x)`,
15
15
  answer,
16
- keys: ['x'],
17
- answerFormat: 'tex',
18
- qcmGeneratorProps: { answer, a, b },
16
+ keys: ["x"],
17
+ answerFormat: "tex",
18
+ identifiers: { a, b },
19
19
  };
20
20
  return question;
21
21
  };
@@ -24,24 +24,29 @@ const getFirstDegreeDerivativePropositions = (n, { answer, a, b }) => {
24
24
  const propositions = [];
25
25
  (0, exercise_1.addValidProp)(propositions, answer);
26
26
  (0, exercise_1.tryToAddWrongProp)(propositions, new polynomial_1.Polynomial([0, a]).toTree().toTex());
27
- (0, exercise_1.tryToAddWrongProp)(propositions, 'x');
28
- (0, exercise_1.tryToAddWrongProp)(propositions, b + '');
27
+ (0, exercise_1.tryToAddWrongProp)(propositions, "x");
28
+ (0, exercise_1.tryToAddWrongProp)(propositions, b + "");
29
29
  while (propositions.length < n) {
30
30
  const wrongAnswer = (0, randint_1.randint)(-9, 10);
31
- (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer + '');
31
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer + "");
32
32
  }
33
33
  return (0, exercise_1.shuffleProps)(propositions, n);
34
34
  };
35
35
  exports.getFirstDegreeDerivativePropositions = getFirstDegreeDerivativePropositions;
36
+ const isFirstDegreeDerivativeAnswerValid = (ans, { answer }) => {
37
+ return ans === answer;
38
+ };
39
+ exports.isFirstDegreeDerivativeAnswerValid = isFirstDegreeDerivativeAnswerValid;
36
40
  exports.firstDegreeDerivative = {
37
- id: 'firstDegreeDerivative',
38
- connector: '=',
41
+ id: "firstDegreeDerivative",
42
+ connector: "=",
39
43
  label: "Dérivée d'une fonction affine",
40
- levels: ['1reESM', '1reSpé', '1reTech', 'MathComp', '1rePro', 'TermPro'],
41
- sections: ['Dérivation'],
44
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "1rePro", "TermPro"],
45
+ sections: ["Dérivation"],
42
46
  isSingleStep: false,
43
47
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(exports.getFirstDegreeDerivative, nb),
44
48
  qcmTimer: 60,
45
49
  freeTimer: 60,
46
50
  getPropositions: exports.getFirstDegreeDerivativePropositions,
51
+ isAnswerValid: exports.isFirstDegreeDerivativeAnswerValid,
47
52
  };
@@ -0,0 +1,18 @@
1
+ export { constanteDerivative } from "./constanteDerivative";
2
+ export * from "./expDerivativeOne";
3
+ export * from "./expDerivativeThree";
4
+ export * from "./expDerivativeTwo";
5
+ export { firstDegreeDerivative } from "./firstDegreeDerivative";
6
+ export * from "./inverseFunctionDerivative";
7
+ export * from "./lnDerivativeOne";
8
+ export * from "./lnDerivativeThree";
9
+ export * from "./lnDerivativeTwo";
10
+ export * from "./powerFunctionDerivative";
11
+ export * from "./quotientDerivative";
12
+ export * from "./productDerivative";
13
+ export * from "./rootFunctionDerivative";
14
+ export { secondDegreeDerivative } from "./secondDegreeDerivative";
15
+ export { thirdDegreeDerivative } from "./thirdDegreeDerivative";
16
+ export * from "./thirdDegreeFunctionVariation";
17
+ export * from "./usualderivative";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.thirdDegreeDerivative = exports.secondDegreeDerivative = exports.firstDegreeDerivative = exports.constanteDerivative = void 0;
18
+ var constanteDerivative_1 = require("./constanteDerivative");
19
+ Object.defineProperty(exports, "constanteDerivative", { enumerable: true, get: function () { return constanteDerivative_1.constanteDerivative; } });
20
+ __exportStar(require("./expDerivativeOne"), exports);
21
+ __exportStar(require("./expDerivativeThree"), exports);
22
+ __exportStar(require("./expDerivativeTwo"), exports);
23
+ var firstDegreeDerivative_1 = require("./firstDegreeDerivative");
24
+ Object.defineProperty(exports, "firstDegreeDerivative", { enumerable: true, get: function () { return firstDegreeDerivative_1.firstDegreeDerivative; } });
25
+ __exportStar(require("./inverseFunctionDerivative"), exports);
26
+ __exportStar(require("./lnDerivativeOne"), exports);
27
+ __exportStar(require("./lnDerivativeThree"), exports);
28
+ __exportStar(require("./lnDerivativeTwo"), exports);
29
+ __exportStar(require("./powerFunctionDerivative"), exports);
30
+ __exportStar(require("./quotientDerivative"), exports);
31
+ __exportStar(require("./productDerivative"), exports);
32
+ __exportStar(require("./rootFunctionDerivative"), exports);
33
+ var secondDegreeDerivative_1 = require("./secondDegreeDerivative");
34
+ Object.defineProperty(exports, "secondDegreeDerivative", { enumerable: true, get: function () { return secondDegreeDerivative_1.secondDegreeDerivative; } });
35
+ var thirdDegreeDerivative_1 = require("./thirdDegreeDerivative");
36
+ Object.defineProperty(exports, "thirdDegreeDerivative", { enumerable: true, get: function () { return thirdDegreeDerivative_1.thirdDegreeDerivative; } });
37
+ __exportStar(require("./thirdDegreeFunctionVariation"), exports);
38
+ __exportStar(require("./usualderivative"), exports);
@@ -1,9 +1,7 @@
1
- import { MathExercise } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
1
+ import { MathExercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
4
3
  a: number;
5
4
  };
6
- type VEAProps = {};
7
- export declare const inverseFunctionDerivative: MathExercise<QCMProps, VEAProps>;
5
+ export declare const inverseFunctionDerivative: MathExercise<Identifiers>;
8
6
  export {};
9
7
  //# sourceMappingURL=inverseFunctionDerivative.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAKlC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AAiCnB,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAWtE,CAAC"}
1
+ {"version":3,"file":"inverseFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/inverseFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2CF,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,WAAW,CAa/D,CAAC"}
@@ -4,16 +4,20 @@ exports.inverseFunctionDerivative = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const randint_1 = require("../../../math/utils/random/randint");
7
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
8
+ const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
9
+ const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
10
+ const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
7
11
  const getInverseFunctionDerivative = () => {
8
12
  const a = (0, randint_1.randint)(-19, 20, [0]);
9
- const answer = `${a > 0 ? '-' : ''}\\frac{${Math.abs(a)}}{x^2}`;
13
+ const answer = `${a > 0 ? "-" : ""}\\frac{${Math.abs(a)}}{x^2}`;
10
14
  const question = {
11
15
  instruction: `Déterminer la fonction dérivée $f'$ de la fonction $f$ définie par $f(x) =\\frac{${a}}{x}$.`,
12
16
  startStatement: `f'(x)`,
13
17
  answer,
14
- keys: ['x'],
15
- answerFormat: 'tex',
16
- qcmGeneratorProps: { answer, a },
18
+ keys: ["x"],
19
+ answerFormat: "tex",
20
+ identifiers: { a },
17
21
  };
18
22
  return question;
19
23
  };
@@ -30,15 +34,22 @@ const getPropositions = (n, { answer, a }) => {
30
34
  }
31
35
  return (0, exercise_1.shuffleProps)(propositions, n);
32
36
  };
37
+ const isAnswerValid = (ans, { a }) => {
38
+ const answerTree = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-a), new powerNode_1.SquareNode(new variableNode_1.VariableNode("x")));
39
+ const texs = answerTree.toAllValidTexs();
40
+ console.log(texs);
41
+ return texs.includes(ans);
42
+ };
33
43
  exports.inverseFunctionDerivative = {
34
- id: 'inverseFunctionDerivative',
35
- connector: '=',
44
+ id: "inverseFunctionDerivative",
45
+ connector: "=",
36
46
  label: "Dérivée d'une fonction inverse",
37
- levels: ['1reESM', '1reSpé', '1reTech', 'MathComp', 'TermTech'],
38
- sections: ['Dérivation', 'Fonction inverse'],
47
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "TermTech"],
48
+ sections: ["Dérivation", "Fonction inverse"],
39
49
  isSingleStep: false,
40
50
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getInverseFunctionDerivative, nb),
41
51
  qcmTimer: 60,
42
52
  freeTimer: 60,
43
53
  getPropositions,
54
+ isAnswerValid,
44
55
  };
@@ -1,10 +1,8 @@
1
- import { MathExercise } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
1
+ import { MathExercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
4
3
  a: number;
5
4
  b: number;
6
5
  };
7
- type VEAProps = {};
8
- export declare const lnDerivativeOne: MathExercise<QCMProps, VEAProps>;
6
+ export declare const lnDerivativeOne: MathExercise<Identifiers>;
9
7
  export {};
10
8
  //# sourceMappingURL=lnDerivativeOne.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lnDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/lnDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAclC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AAqCnB,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAW5D,CAAC"}
1
+ {"version":3,"file":"lnDerivativeOne.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/lnDerivativeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqDF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAYrD,CAAC"}
@@ -4,27 +4,28 @@ exports.lnDerivativeOne = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const polynomial_1 = require("../../../math/polynomials/polynomial");
7
+ const rationalFrac_1 = require("../../../math/polynomials/rationalFrac");
7
8
  const randint_1 = require("../../../math/utils/random/randint");
8
9
  const expNode_1 = require("../../../tree/nodes/functions/expNode");
9
10
  const logNode_1 = require("../../../tree/nodes/functions/logNode");
10
11
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
11
- const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
12
12
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
13
- const simplify_1 = require("../../../tree/parsers/simplify");
14
13
  const getLnDerivative = () => {
15
14
  const a = (0, randint_1.randint)(-9, 10, [0]);
16
15
  const b = (0, randint_1.randint)(-9, 10);
17
16
  const polynom = new polynomial_1.Polynomial([b, a]);
18
- const derivative = (0, simplify_1.simplifyNode)(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(a), polynom.toTree()));
19
17
  const logTree = new logNode_1.LogNode(polynom.toTree());
20
- const answer = derivative.toTex();
18
+ const answer = new rationalFrac_1.RationalFrac(new polynomial_1.Polynomial([a]), polynom)
19
+ .simplify()
20
+ .toTree()
21
+ .toTex();
21
22
  const question = {
22
23
  instruction: `Déterminer la dérivée de la fonction $f(x) = ${logTree.toTex()}$.`,
23
24
  startStatement: "f'(x)",
24
25
  answer,
25
- keys: ['x', 'ln', 'epower'],
26
- answerFormat: 'tex',
27
- qcmGeneratorProps: { answer, a, b },
26
+ keys: ["x", "ln", "epower"],
27
+ answerFormat: "tex",
28
+ identifiers: { a, b },
28
29
  };
29
30
  return question;
30
31
  };
@@ -33,23 +34,35 @@ const getPropositions = (n, { answer, a, b }) => {
33
34
  (0, exercise_1.addValidProp)(propositions, answer);
34
35
  const polynom = new polynomial_1.Polynomial([b, a]);
35
36
  const logTree = new logNode_1.LogNode(polynom.toTree());
36
- (0, exercise_1.tryToAddWrongProp)(propositions, (0, simplify_1.simplifyNode)(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), logTree)).toTex());
37
- (0, exercise_1.tryToAddWrongProp)(propositions, a + '');
37
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), logTree).toTex());
38
+ (0, exercise_1.tryToAddWrongProp)(propositions, a + "");
38
39
  (0, exercise_1.tryToAddWrongProp)(propositions, new expNode_1.ExpNode(polynom.toTree()).toTex());
39
40
  (0, exercise_1.tryToAddWrongProp)(propositions, polynom.toTree().toTex());
40
41
  (0, exercise_1.tryToAddWrongProp)(propositions, `\\frac{${a}}{${logTree.toTex()}}`);
41
42
  (0, exercise_1.tryToAddWrongProp)(propositions, `\\frac{1}{${polynom.toTree().toTex()}}`);
42
43
  return (0, exercise_1.shuffleProps)(propositions, n);
43
44
  };
45
+ const isAnswerValid = (ans, { a, b }) => {
46
+ const frac = new rationalFrac_1.RationalFrac(new polynomial_1.Polynomial([a]), new polynomial_1.Polynomial([b, a]));
47
+ const nonSimplified = frac.toTree();
48
+ const simplified = frac.simplify().toTree();
49
+ const texs = [
50
+ ...simplified.toAllValidTexs(),
51
+ ...nonSimplified.toAllValidTexs(),
52
+ ];
53
+ console.log(texs);
54
+ return texs.includes(ans);
55
+ };
44
56
  exports.lnDerivativeOne = {
45
- id: 'lnDerivativeOne',
46
- connector: '=',
47
- label: 'Dérivée de $\\ln(ax + b)$',
48
- levels: ['1reESM', '1reSpé', '1reTech', 'MathComp', 'TermSpé'],
49
- sections: ['Dérivation', 'Logarithme népérien'],
57
+ id: "lnDerivativeOne",
58
+ connector: "=",
59
+ label: "Dérivée de $\\ln(ax + b)$",
60
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "TermSpé"],
61
+ sections: ["Dérivation", "Logarithme népérien"],
50
62
  isSingleStep: false,
51
63
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getLnDerivative, nb),
52
64
  qcmTimer: 60,
53
65
  freeTimer: 60,
54
66
  getPropositions,
67
+ isAnswerValid,
55
68
  };
@@ -1,10 +1,8 @@
1
- import { MathExercise } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
1
+ import { MathExercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
4
3
  a: number;
5
4
  b: number;
6
5
  };
7
- type VEAProps = {};
8
- export declare const lnDerivativeThree: MathExercise<QCMProps, VEAProps>;
6
+ export declare const lnDerivativeThree: MathExercise<Identifiers>;
9
7
  export {};
10
8
  //# sourceMappingURL=lnDerivativeThree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAclC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AAuDnB,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAW9D,CAAC"}
1
+ {"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8FF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAYvD,CAAC"}
@@ -12,21 +12,20 @@ const addNode_1 = require("../../../tree/nodes/operators/addNode");
12
12
  const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
13
13
  const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
14
14
  const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
15
- const simplify_1 = require("../../../tree/parsers/simplify");
16
15
  const getLnDerivative = () => {
17
16
  const a = (0, randint_1.randint)(-9, 10, [0]);
18
17
  const b = (0, randint_1.randint)(-9, 10);
19
18
  const affine = new polynomial_1.Polynomial([b, a]).toTree();
20
- const myfunction = new multiplyNode_1.MultiplyNode(affine, new logNode_1.LogNode(new variableNode_1.VariableNode('x')));
21
- const derivative = (0, simplify_1.simplifyNode)(new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new logNode_1.LogNode(new variableNode_1.VariableNode('x'))), new fractionNode_1.FractionNode(affine, new variableNode_1.VariableNode('x'))));
19
+ const myfunction = new multiplyNode_1.MultiplyNode(affine, new logNode_1.LogNode(new variableNode_1.VariableNode("x")));
20
+ const derivative = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new logNode_1.LogNode(new variableNode_1.VariableNode("x"))), new fractionNode_1.FractionNode(affine, new variableNode_1.VariableNode("x")));
22
21
  const answer = derivative.toTex();
23
22
  const question = {
24
23
  instruction: `Déterminer la dérivée de la fonction $f(x) = ${myfunction.toTex()} $.`,
25
24
  startStatement: "f'(x)",
26
25
  answer,
27
- keys: ['x', 'ln', 'epower'],
28
- answerFormat: 'tex',
29
- qcmGeneratorProps: { answer, a, b },
26
+ keys: ["x", "ln", "epower"],
27
+ answerFormat: "tex",
28
+ identifiers: { a, b },
30
29
  };
31
30
  return question;
32
31
  };
@@ -34,28 +33,51 @@ const getPropositions = (n, { answer, a, b }) => {
34
33
  const propositions = [];
35
34
  (0, exercise_1.addValidProp)(propositions, answer);
36
35
  const affine = new affine_1.Affine(a, b).toTree();
37
- (0, exercise_1.tryToAddWrongProp)(propositions, new fractionNode_1.FractionNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode('x')).toTex());
38
- (0, exercise_1.tryToAddWrongProp)(propositions, new fractionNode_1.FractionNode(affine, new variableNode_1.VariableNode('x')).toTex());
36
+ (0, exercise_1.tryToAddWrongProp)(propositions, new fractionNode_1.FractionNode(new numberNode_1.NumberNode(a), new variableNode_1.VariableNode("x")).toTex());
37
+ (0, exercise_1.tryToAddWrongProp)(propositions, new fractionNode_1.FractionNode(affine, new variableNode_1.VariableNode("x")).toTex());
39
38
  if (a === 1)
40
- (0, exercise_1.tryToAddWrongProp)(propositions, '\\ln\\left(x\\right)');
39
+ (0, exercise_1.tryToAddWrongProp)(propositions, "\\ln\\left(x\\right)");
41
40
  else
42
41
  (0, exercise_1.tryToAddWrongProp)(propositions, `${a}\\ln\\left(x\\right)`);
43
42
  while (propositions.length < n) {
44
43
  const randomA = (0, randint_1.randint)(-9, 10, [0]);
45
44
  const randomB = (0, randint_1.randint)(-9, 10);
46
- (0, exercise_1.tryToAddWrongProp)(propositions, (0, simplify_1.simplifyNode)(new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(randomA), new logNode_1.LogNode(new variableNode_1.VariableNode('x'))), new fractionNode_1.FractionNode(new polynomial_1.Polynomial([randomB, randomA]).toTree(), new variableNode_1.VariableNode('x')))).toTex());
45
+ (0, exercise_1.tryToAddWrongProp)(propositions, new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(randomA), new logNode_1.LogNode(new variableNode_1.VariableNode("x"))), new fractionNode_1.FractionNode(new polynomial_1.Polynomial([randomB, randomA]).toTree(), new variableNode_1.VariableNode("x"))).toTex());
47
46
  }
48
47
  return (0, exercise_1.shuffleProps)(propositions, n);
49
48
  };
49
+ const isAnswerValid = (ans, { a, b }) => {
50
+ const affine = new affine_1.Affine(a, b);
51
+ const xNode = new variableNode_1.VariableNode("x");
52
+ const aNode = new numberNode_1.NumberNode(a);
53
+ const bNode = new fractionNode_1.FractionNode(new numberNode_1.NumberNode(b), xNode);
54
+ const fracNode = new fractionNode_1.FractionNode(affine.toTree(), xNode);
55
+ const logNode = new logNode_1.LogNode(xNode);
56
+ const raw = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(aNode, logNode), fracNode);
57
+ let developped = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(aNode, logNode), fracNode);
58
+ let simplified = new multiplyNode_1.MultiplyNode(aNode, new addNode_1.AddNode(logNode, new numberNode_1.NumberNode(1)));
59
+ if (b !== 0) {
60
+ developped = new addNode_1.AddNode(developped, bNode);
61
+ simplified = new addNode_1.AddNode(simplified, bNode);
62
+ }
63
+ const texs = [
64
+ ...raw.toAllValidTexs(),
65
+ ...developped.toAllValidTexs(),
66
+ ...simplified.toAllValidTexs(),
67
+ ];
68
+ console.log(ans, texs);
69
+ return texs.includes(ans);
70
+ };
50
71
  exports.lnDerivativeThree = {
51
- id: 'lnDerivativeThree',
52
- connector: '=',
53
- label: 'Dérivée de $\\ln(x) \\times (ax+b)$',
54
- levels: ['1reESM', '1reSpé', '1reTech', 'MathComp', 'TermSpé'],
55
- sections: ['Dérivation', 'Logarithme népérien'],
72
+ id: "lnDerivativeThree",
73
+ connector: "=",
74
+ label: "Dérivée de $\\ln(x) \\times (ax+b)$",
75
+ levels: ["1reESM", "1reSpé", "1reTech", "MathComp", "TermSpé"],
76
+ sections: ["Dérivation", "Logarithme népérien"],
56
77
  isSingleStep: false,
57
78
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getLnDerivative, nb),
58
79
  qcmTimer: 60,
59
80
  freeTimer: 60,
60
81
  getPropositions,
82
+ isAnswerValid,
61
83
  };
@@ -1,10 +1,8 @@
1
- import { MathExercise } from '../../../exercises/exercise';
2
- type QCMProps = {
3
- answer: string;
1
+ import { MathExercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
4
3
  a: number;
5
4
  b: number;
6
5
  };
7
- type VEAProps = {};
8
- export declare const lnDerivativeTwo: MathExercise<QCMProps, VEAProps>;
6
+ export declare const lnDerivativeTwo: MathExercise<Identifiers>;
9
7
  export {};
10
8
  //# sourceMappingURL=lnDerivativeTwo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lnDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/lnDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAOb,MAAM,0BAA0B,CAAC;AAclC,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AACF,KAAK,QAAQ,GAAG,EAAE,CAAC;AA8CnB,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAY5D,CAAC"}
1
+ {"version":3,"file":"lnDerivativeTwo.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/lnDerivativeTwo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6DF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAYrD,CAAC"}