math-exercises 2.2.93 → 2.2.95

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 (196) hide show
  1. package/lib/exercises/math/calcul/fractions/fractionSquare.d.ts +8 -0
  2. package/lib/exercises/math/calcul/fractions/fractionSquare.d.ts.map +1 -0
  3. package/lib/exercises/math/calcul/fractions/fractionSquare.js +107 -0
  4. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
  5. package/lib/exercises/math/calcul/fractions/fractionsSum.js +2 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
  7. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +2 -1
  8. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
  9. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +2 -1
  10. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  11. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +2 -1
  12. package/lib/exercises/math/calcul/fractions/index.d.ts +1 -0
  13. package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/fractions/index.js +1 -0
  15. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +2 -1
  17. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +0 -4
  19. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.d.ts.map +1 -1
  20. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +2 -1
  21. package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts +9 -0
  22. package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts.map +1 -1
  23. package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +160 -126
  24. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  25. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +2 -1
  26. package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
  27. package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
  28. package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
  29. package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -1
  30. package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +2 -1
  31. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  32. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +76 -41
  33. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  34. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +71 -40
  35. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  36. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +79 -47
  37. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  38. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -1
  39. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
  40. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -1
  41. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
  42. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -1
  43. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
  44. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -1
  45. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  46. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -1
  47. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.d.ts.map +1 -1
  48. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +2 -1
  49. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
  50. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +2 -1
  51. package/lib/exercises/math/derivation/derivative/expDerivativeFour.d.ts.map +1 -1
  52. package/lib/exercises/math/derivation/derivative/expDerivativeFour.js +2 -1
  53. package/lib/exercises/math/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
  54. package/lib/exercises/math/derivation/derivative/expDerivativeThree.js +2 -1
  55. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  56. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +2 -1
  57. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  58. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +2 -1
  59. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  60. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +2 -1
  61. package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.d.ts.map +1 -1
  62. package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.js +2 -1
  63. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  64. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +2 -1
  65. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  66. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -1
  67. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
  68. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +2 -1
  69. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
  70. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +2 -1
  71. package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
  72. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +2 -1
  73. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  74. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +2 -1
  75. package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
  76. package/lib/exercises/math/functions/affines/affineExpressionReading.js +46 -23
  77. package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
  78. package/lib/exercises/math/functions/affines/signFunction.js +2 -1
  79. package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
  80. package/lib/exercises/math/functions/basics/graphicEquation.js +2 -1
  81. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  82. package/lib/exercises/math/functions/basics/graphicInequation.js +2 -1
  83. package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
  84. package/lib/exercises/math/functions/basics/graphicInequationAffine.js +2 -1
  85. package/lib/exercises/math/functions/basics/imageFunction.d.ts.map +1 -1
  86. package/lib/exercises/math/functions/basics/imageFunction.js +2 -1
  87. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  88. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -1
  89. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  90. package/lib/exercises/math/functions/exponential/expEquation.js +2 -1
  91. package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
  92. package/lib/exercises/math/functions/logarithm/logPowerEquation.js +2 -1
  93. package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
  94. package/lib/exercises/math/functions/sign/affineProductSign.js +2 -1
  95. package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
  96. package/lib/exercises/math/functions/square/squareImageInterval.js +2 -1
  97. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts.map +1 -1
  98. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +2 -1
  99. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
  100. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +2 -1
  101. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.d.ts.map +1 -1
  102. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.js +2 -1
  103. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  104. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +2 -1
  105. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -1
  106. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +2 -1
  107. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
  108. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +2 -1
  109. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
  110. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +2 -1
  111. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
  112. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +2 -1
  113. package/lib/exercises/math/matrices/matrixInversibilityDomain.d.ts.map +1 -1
  114. package/lib/exercises/math/matrices/matrixInversibilityDomain.js +2 -1
  115. package/lib/exercises/math/percent/findRightCalcul.d.ts +10 -0
  116. package/lib/exercises/math/percent/findRightCalcul.d.ts.map +1 -0
  117. package/lib/exercises/math/percent/findRightCalcul.js +116 -0
  118. package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -1
  119. package/lib/exercises/math/percent/htToTTC.js +34 -12
  120. package/lib/exercises/math/percent/index.d.ts +2 -0
  121. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  122. package/lib/exercises/math/percent/index.js +2 -0
  123. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  124. package/lib/exercises/math/percent/percentToDecimal.js +6 -2
  125. package/lib/exercises/math/percent/percentWritings.d.ts +8 -0
  126. package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -0
  127. package/lib/exercises/math/percent/percentWritings.js +145 -0
  128. package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
  129. package/lib/exercises/math/percent/ttcToHT.js +33 -12
  130. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  131. package/lib/exercises/math/powers/powersMixOperations.js +2 -1
  132. package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
  133. package/lib/exercises/math/probaStat/probabilityTree.js +2 -1
  134. package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
  135. package/lib/exercises/math/sampling/confidenceInterval.js +2 -1
  136. package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
  137. package/lib/exercises/math/sampling/fluctuationInterval.js +2 -1
  138. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  139. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +55 -23
  140. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  141. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +2 -1
  142. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  143. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +2 -1
  144. package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
  145. package/lib/exercises/math/sets/intervals/intervalsUnion.js +2 -1
  146. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
  147. package/lib/exercises/math/trigonometry/degreeToRadians.js +2 -1
  148. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
  149. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +2 -1
  150. package/lib/exercises/vea/equationVEA.d.ts.map +1 -1
  151. package/lib/exercises/vea/equationVEA.js +2 -1
  152. package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
  153. package/lib/exercises/vea/rationalVEA.js +2 -1
  154. package/lib/exercises/vea/sqrtVEA.d.ts.map +1 -1
  155. package/lib/exercises/vea/sqrtVEA.js +2 -1
  156. package/lib/index.d.ts +16 -0
  157. package/lib/index.d.ts.map +1 -1
  158. package/lib/playground.d.ts.map +1 -1
  159. package/lib/playground.js +1 -12
  160. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  161. package/lib/tree/nodes/functions/oppositeNode.js +1 -1
  162. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  163. package/lib/tree/nodes/operators/addNode.js +1 -1
  164. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  165. package/lib/tree/nodes/operators/fractionNode.js +3 -2
  166. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  167. package/lib/tree/nodes/operators/multiplyNode.js +1 -1
  168. package/lib/tree/parsers/affineParser.d.ts.map +1 -1
  169. package/lib/tree/parsers/affineParser.js +2 -1
  170. package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -1
  171. package/lib/tree/parsers/discreteSetParser.js +2 -3
  172. package/lib/tree/parsers/equationSolutionParser.d.ts.map +1 -1
  173. package/lib/tree/parsers/equationSolutionParser.js +2 -1
  174. package/lib/tree/parsers/inequationParser.d.ts.map +1 -1
  175. package/lib/tree/parsers/inequationParser.js +2 -1
  176. package/lib/tree/parsers/intervalParser.d.ts.map +1 -1
  177. package/lib/tree/parsers/intervalParser.js +3 -2
  178. package/lib/tree/parsers/latexParser.d.ts.map +1 -1
  179. package/lib/tree/parsers/latexParser.js +12 -0
  180. package/lib/tree/parsers/monomParser.d.ts.map +1 -1
  181. package/lib/tree/parsers/monomParser.js +2 -1
  182. package/lib/tree/parsers/polynomialParser.d.ts.map +1 -1
  183. package/lib/tree/parsers/polynomialParser.js +2 -1
  184. package/lib/tree/parsers/powerParser.d.ts.map +1 -1
  185. package/lib/tree/parsers/powerParser.js +2 -1
  186. package/lib/tree/parsers/sqrtParser.d.ts.map +1 -1
  187. package/lib/tree/parsers/sqrtParser.js +2 -1
  188. package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
  189. package/lib/tree/parsers/trinomParser.js +2 -1
  190. package/lib/tree/parsers/unionIntervalParser.d.ts.map +1 -1
  191. package/lib/tree/parsers/unionIntervalParser.js +2 -1
  192. package/lib/utils/alea/random.js +1 -1
  193. package/lib/utils/errors/handleVEAError.d.ts +2 -0
  194. package/lib/utils/errors/handleVEAError.d.ts.map +1 -0
  195. package/lib/utils/errors/handleVEAError.js +9 -0
  196. package/package.json +1 -1
@@ -12,6 +12,7 @@ const closure_1 = require("../../../../tree/nodes/sets/closure");
12
12
  const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
13
13
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
14
14
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
15
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
15
16
  const getAnswer = (identifiers) => {
16
17
  const { k, inequationSymbol } = identifiers;
17
18
  const sqrtTree = (0, sqrtNode_1.sqrt)(k).simplify();
@@ -66,7 +67,7 @@ const isAnswerValid = (ans, { answer, k, inequationSymbol }) => {
66
67
  return "S=\\ " + parsed.simplify().toTex() === answer;
67
68
  }
68
69
  catch (err) {
69
- return false;
70
+ return (0, handleVEAError_1.handleVEAError)(err);
70
71
  }
71
72
  };
72
73
  exports.squareFunctionInequation = {
@@ -1 +1 @@
1
- {"version":3,"file":"convexityQuadrinomials.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/convexityQuadrinomials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAqHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"convexityQuadrinomials.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/convexityQuadrinomials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAoBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAqHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
@@ -13,6 +13,7 @@ const closure_1 = require("../../../../tree/nodes/sets/closure");
13
13
  const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
14
14
  const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
15
15
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  const getConvexityQuadrinomialsQuestion = () => {
17
18
  const quadrinomial = polynomial_1.PolynomialConstructor.randomWithOrder(3);
18
19
  const quadcoeffs = quadrinomial.coefficients;
@@ -68,7 +69,7 @@ const isAnswerValid = (ans, { answer, askConvex, quadcoeffs }) => {
68
69
  return parsed.simplify().toTex() === answer;
69
70
  }
70
71
  catch (err) {
71
- return false;
72
+ return (0, handleVEAError_1.handleVEAError)(err);
72
73
  }
73
74
  };
74
75
  exports.convexityQuadrinomials = {
@@ -1 +1 @@
1
- {"version":3,"file":"expDerivativeFour.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeFour.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA4EF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
1
+ {"version":3,"file":"expDerivativeFour.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeFour.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA4EF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -7,6 +7,7 @@ const affine_1 = require("../../../../math/polynomials/affine");
7
7
  const expNode_1 = require("../../../../tree/nodes/functions/expNode");
8
8
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
9
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
10
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
10
11
  const getInstruction = (identifiers) => {
11
12
  const { affine1Coeffs, affine2Coeffs } = identifiers;
12
13
  const affine1 = new affine_1.Affine(affine1Coeffs[1], affine1Coeffs[0]);
@@ -56,7 +57,7 @@ const isAnswerValid = (ans, { answer, affine1Coeffs, affine2Coeffs }) => {
56
57
  return parsed.simplify().toTex() === answer;
57
58
  }
58
59
  catch (err) {
59
- return false;
60
+ return (0, handleVEAError_1.handleVEAError)(err);
60
61
  }
61
62
  };
62
63
  exports.expDerivativeFour = {
@@ -1 +1 @@
1
- {"version":3,"file":"expDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
1
+ {"version":3,"file":"expDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
@@ -10,6 +10,7 @@ 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
12
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
13
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
13
14
  const getInstruction = (identifiers) => {
14
15
  const { a, b } = identifiers;
15
16
  const myfunction = new multiplyNode_1.MultiplyNode(new polynomial_1.Polynomial([b, a]).toTree(), new expNode_1.ExpNode(new variableNode_1.VariableNode("x")));
@@ -56,7 +57,7 @@ const isAnswerValid = (ans, { a, b, answer }) => {
56
57
  return parsed.simplify().toTex() === answer;
57
58
  }
58
59
  catch (err) {
59
- return false;
60
+ return (0, handleVEAError_1.handleVEAError)(err);
60
61
  }
61
62
  };
62
63
  exports.expDerivativeThree = {
@@ -1 +1 @@
1
- {"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8GF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
1
+ {"version":3,"file":"lnDerivativeThree.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/lnDerivativeThree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8GF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -13,6 +13,7 @@ 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
15
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  const getInstruction = (identifiers) => {
17
18
  const { a, b } = identifiers;
18
19
  const affine = new polynomial_1.Polynomial([b, a]).toTree();
@@ -83,7 +84,7 @@ const isAnswerValid = (ans, { a, b, answer }) => {
83
84
  .toTex() === answer);
84
85
  }
85
86
  catch (err) {
86
- return false;
87
+ return (0, handleVEAError_1.handleVEAError)(err);
87
88
  }
88
89
  };
89
90
  exports.lnDerivativeThree = {
@@ -1 +1 @@
1
- {"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAuGF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
1
+ {"version":3,"file":"quotientDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/quotientDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAuGF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
@@ -7,6 +7,7 @@ const polynomial_1 = require("../../../../math/polynomials/polynomial");
7
7
  const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
8
8
  const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
9
9
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
10
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
10
11
  const getInstruction = (identifiers) => {
11
12
  const poly1 = new polynomial_1.Polynomial(identifiers.poly1Coeffs);
12
13
  const poly2 = new polynomial_1.Polynomial(identifiers.poly2Coeffs);
@@ -83,7 +84,7 @@ const isAnswerValid = (ans, { answer, poly1Coeffs, poly2Coeffs }) => {
83
84
  return simp === simpAnswer;
84
85
  }
85
86
  catch (err) {
86
- return false;
87
+ return (0, handleVEAError_1.handleVEAError)(err);
87
88
  }
88
89
  };
89
90
  exports.quotientDerivative = {
@@ -1 +1 @@
1
- {"version":3,"file":"rootFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/rootFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+FF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAmBxD,CAAC"}
1
+ {"version":3,"file":"rootFunctionDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/rootFunctionDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAoBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+FF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAmBxD,CAAC"}
@@ -10,6 +10,7 @@ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
10
10
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
11
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
12
12
  const shuffle_1 = require("../../../../utils/alea/shuffle");
13
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
13
14
  const alignTex_1 = require("../../../../utils/latex/alignTex");
14
15
  const getStatementNode = (identifiers) => {
15
16
  return (0, multiplyNode_1.multiply)(identifiers.a, (0, sqrtNode_1.sqrt)("x"));
@@ -95,7 +96,7 @@ const isAnswerValid = (ans, { answer, a }) => {
95
96
  return simplified.toTex() === answer;
96
97
  }
97
98
  catch (err) {
98
- return false;
99
+ return (0, handleVEAError_1.handleVEAError)(err);
99
100
  }
100
101
  };
101
102
  exports.rootFunctionDerivative = {
@@ -1 +1 @@
1
- {"version":3,"file":"sqrtCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/sqrtCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAmEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"sqrtCompositionDerivation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/sqrtCompositionDerivation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAmEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
@@ -9,6 +9,7 @@ const sqrtNode_1 = require("../../../../tree/nodes/functions/sqrtNode");
9
9
  const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
10
10
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
11
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
12
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
12
13
  const getSqrtCompositionDerivationQuestion = () => {
13
14
  const affine = affine_1.AffineConstructor.random();
14
15
  const fct = new sqrtNode_1.SqrtNode(affine.toTree());
@@ -44,7 +45,7 @@ const isAnswerValid = (ans, { answer, affineA, affineB }) => {
44
45
  return simplified.toTex() === answer;
45
46
  }
46
47
  catch (err) {
47
- return false;
48
+ return (0, handleVEAError_1.handleVEAError)(err);
48
49
  }
49
50
  };
50
51
  exports.sqrtCompositionDerivation = {
@@ -1 +1 @@
1
- {"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA4CF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAmBnE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,WAAW,CAwC1E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,WAAW,CAe/D,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CA0BvD,CAAC"}
1
+ {"version":3,"file":"thirdDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAIJ,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA4CF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAmBnE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,YAAY,CAAC,WAAW,CAwC1E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,GAAG,CAAC,WAAW,CAe/D,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CA0BvD,CAAC"}
@@ -8,6 +8,7 @@ const randint_1 = require("../../../../math/utils/random/randint");
8
8
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
9
  const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
10
10
  const polynomialParser_1 = require("../../../../tree/parsers/polynomialParser");
11
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
11
12
  const getHint = (identifiers) => {
12
13
  return `Dérive chacun des termes de la somme, puis additionne les dérivées obtenues.
13
14
 
@@ -104,7 +105,7 @@ const isThirdDegreeDerivativeAnswerValid = (ans, { answer, coefficients }) => {
104
105
  return simp.toTex() === answer;
105
106
  }
106
107
  catch (err) {
107
- return false;
108
+ return (0, handleVEAError_1.handleVEAError)(err);
108
109
  }
109
110
  };
110
111
  exports.isThirdDegreeDerivativeAnswerValid = isThirdDegreeDerivativeAnswerValid;
@@ -1 +1 @@
1
- {"version":3,"file":"thirdDegreeFunctionVariation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkHF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAwB9D,CAAC"}
1
+ {"version":3,"file":"thirdDegreeFunctionVariation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAoBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkHF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAwB9D,CAAC"}
@@ -15,6 +15,7 @@ const unionIntervalNode_1 = require("../../../../tree/nodes/sets/unionIntervalNo
15
15
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
16
16
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
17
17
  const shuffle_1 = require("../../../../utils/alea/shuffle");
18
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
18
19
  const getThirdDegreeFunctionVariation = () => {
19
20
  const a = (0, randint_1.randint)(-3, 4, [0]);
20
21
  const c = (0, randint_1.randint)(-2, 3);
@@ -95,7 +96,7 @@ const isAnswerValid = (ans, { answer, racine1, racine2, coin, a }) => {
95
96
  return parsed.simplify().toTex() === answer;
96
97
  }
97
98
  catch (err) {
98
- return false;
99
+ return (0, handleVEAError_1.handleVEAError)(err);
99
100
  }
100
101
  };
101
102
  exports.thirdDegreeFunctionVariation = {
@@ -1 +1 @@
1
- {"version":3,"file":"absolueValueAffineEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/absolute/absolueValueAffineEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAGL,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAM9C,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,wBAAwB,CAAC;IACtC,YAAY,EAAE,wBAAwB,CAAC;CACxC,CAAC;AA0KF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
1
+ {"version":3,"file":"absolueValueAffineEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/absolute/absolueValueAffineEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAGL,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAO9C,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,wBAAwB,CAAC;IACtC,YAAY,EAAE,wBAAwB,CAAC;CACxC,CAAC;AA0KF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
@@ -10,6 +10,7 @@ const generalAffine_1 = require("../../../../math/polynomials/generalAffine");
10
10
  const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
11
11
  const absNode_1 = require("../../../../tree/nodes/functions/absNode");
12
12
  const rationalParser_1 = require("../../../../tree/parsers/rationalParser");
13
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
13
14
  const getPropositions = (n, { answer }) => {
14
15
  const propositions = [];
15
16
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -130,7 +131,7 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
130
131
  return answerNodes.every((e) => nodes.some((n) => n.evaluate() === e.evaluate()));
131
132
  }
132
133
  catch (err) {
133
- return false;
134
+ return (0, handleVEAError_1.handleVEAError)(err);
134
135
  }
135
136
  };
136
137
  const getAbsolueValueAffineEquationQuestion = (ops) => {
@@ -1 +1 @@
1
- {"version":3,"file":"absolueValueInequationsSup.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/absolute/absolueValueInequationsSup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAqBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAqGF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAgB5D,CAAC"}
1
+ {"version":3,"file":"absolueValueInequationsSup.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/absolute/absolueValueInequationsSup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAsBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAqGF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAgB5D,CAAC"}
@@ -16,6 +16,7 @@ const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
16
16
  const unionIntervalNode_1 = require("../../../../tree/nodes/sets/unionIntervalNode");
17
17
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
18
18
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
19
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
19
20
  const getPropositions = (n, { answer, a, b, c, isStrict }) => {
20
21
  const propositions = [];
21
22
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -64,7 +65,7 @@ const isAnswerValid = (ans, { answer, ...identifiers }) => {
64
65
  return "S=\\ " + parsed.simplify().toTex() === answer;
65
66
  }
66
67
  catch (err) {
67
- return false;
68
+ return (0, handleVEAError_1.handleVEAError)(err);
68
69
  }
69
70
  };
70
71
  const getAbsolueValueInequationsSupQuestion = (ops) => {
@@ -1 +1 @@
1
- {"version":3,"file":"absoluteValueInequations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/absolute/absoluteValueInequations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAuFF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
1
+ {"version":3,"file":"absoluteValueInequations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/absolute/absoluteValueInequations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAuFF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
@@ -11,6 +11,7 @@ const closure_1 = require("../../../../tree/nodes/sets/closure");
11
11
  const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
12
12
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
13
13
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
14
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
14
15
  const getAbsoluteValueInequationsQuestion = () => {
15
16
  const poly = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10, [0]), 1]);
16
17
  const a = (0, randint_1.randint)(1, 10);
@@ -62,7 +63,7 @@ const isAnswerValid = (ans, { answer, a, b, isStrict }) => {
62
63
  return "S=\\ " + parsed.simplify().toTex() === answer;
63
64
  }
64
65
  catch (err) {
65
- return false;
66
+ return (0, handleVEAError_1.handleVEAError)(err);
66
67
  }
67
68
  };
68
69
  exports.absoluteValueInequations = {
@@ -1 +1 @@
1
- {"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgJF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAgB/D,CAAC"}
1
+ {"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgJF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAgB/D,CAAC"}
@@ -13,6 +13,7 @@ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode"
13
13
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
14
14
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
15
15
  const shuffle_1 = require("../../../../utils/alea/shuffle");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  const alignTex_1 = require("../../../../utils/latex/alignTex");
17
18
  const getCorrection = (identifiers) => {
18
19
  const { xA, xB, yA, yB } = identifiers;
@@ -108,7 +109,7 @@ const isAnswerValid = (ans, { xA, xB, yA, yB }) => {
108
109
  .toTex() === ans);
109
110
  }
110
111
  catch (err) {
111
- return false;
112
+ return (0, handleVEAError_1.handleVEAError)(err);
112
113
  }
113
114
  // const a = new Rational(yB - yA, xB - xA).simplify().toTree();
114
115
  // //yA = axA+b donc b = yA-axA
@@ -1 +1 @@
1
- {"version":3,"file":"affineExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AA+GF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
1
+ {"version":3,"file":"affineExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAkIF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
@@ -13,13 +13,13 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
13
13
  const addNode_1 = require("../../../../tree/nodes/operators/addNode");
14
14
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
15
15
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
16
- const getAffineExpressionReadingQuestion = () => {
17
- const b = (0, randint_1.randint)(-5, 6);
18
- const secondPoint = [(0, randint_1.randint)(-5, 6, [0]), (0, randint_1.randint)(-5, 6)];
19
- const leadingCoeff = new rational_1.Rational(secondPoint[1] - b, secondPoint[0])
20
- .simplify()
21
- .toTree();
22
- const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("f(x)"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(leadingCoeff, new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(b)).simplify({ forceDistributeFractions: true, forbidFactorize: true })).toTex();
16
+ const latexParser_1 = require("../../../../tree/parsers/latexParser");
17
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
18
+ const getInstruction = () => {
19
+ return `Ci-dessous est tracée la courbe représentative d'une fonction affine $f$. Déterminer graphiquement l'expression algébrique de $f(x)$.`;
20
+ };
21
+ const getGGBOptions = (identifiers) => {
22
+ const { b, secondPoint } = identifiers;
23
23
  let xMin = Math.min(0, secondPoint[0]);
24
24
  let xMax = Math.max(0, secondPoint[0]);
25
25
  let yMin = Math.min(b, secondPoint[1]);
@@ -32,15 +32,29 @@ const getAffineExpressionReadingQuestion = () => {
32
32
  const ggb = new geogebraConstructor_1.GeogebraConstructor({
33
33
  commands,
34
34
  });
35
+ return ggb.getOptions({
36
+ coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
37
+ });
38
+ };
39
+ const getAnswer = (identifiers) => {
40
+ const { b, secondPoint } = identifiers;
41
+ const leadingCoeff = new rational_1.Rational(secondPoint[1] - b, secondPoint[0])
42
+ .simplify()
43
+ .toTree();
44
+ const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("f(x)"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(leadingCoeff, new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(b)).simplify({ forceDistributeFractions: true, forbidFactorize: true })).toTex();
45
+ return answer;
46
+ };
47
+ const getAffineExpressionReadingQuestion = () => {
48
+ const b = (0, randint_1.randint)(-5, 6);
49
+ const secondPoint = [(0, randint_1.randint)(-5, 6, [0]), (0, randint_1.randint)(-5, 6)];
50
+ const identifiers = { b, secondPoint };
35
51
  const question = {
36
- answer,
37
- instruction: `Ci-dessous est tracée la courbe représentative d'une fonction affine $f$. Déterminer graphiquement l'expression algébrique de $f(x)$.`,
52
+ answer: getAnswer(identifiers),
53
+ instruction: getInstruction(identifiers),
38
54
  keys: ["fx", "equal", "x"],
39
- ggbOptions: ggb.getOptions({
40
- coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
41
- }),
55
+ ggbOptions: getGGBOptions(identifiers),
42
56
  answerFormat: "tex",
43
- identifiers: { b, secondPoint },
57
+ identifiers,
44
58
  };
45
59
  return question;
46
60
  };
@@ -70,16 +84,25 @@ const getPropositions = (n, { answer, b, secondPoint }) => {
70
84
  return (0, exercise_1.shuffleProps)(propositions, n);
71
85
  };
72
86
  const isAnswerValid = (ans, { answer, secondPoint, b }) => {
73
- const leadingCoeff = new rational_1.Rational(secondPoint[1] - b, secondPoint[0])
74
- .simplify()
75
- .toTree();
76
- const tree = new equalNode_1.EqualNode(new variableNode_1.VariableNode("f(x)"), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(leadingCoeff, new variableNode_1.VariableNode("x")), new numberNode_1.NumberNode(b)).simplify({ forceDistributeFractions: true, forbidFactorize: true }), {
77
- allowFractionToDecimal: true,
78
- allowMinusAnywhereInFraction: true,
79
- allowRawRightChildAsSolution: true,
80
- });
81
- const texs = tree.toAllValidTexs();
82
- return texs.includes(ans);
87
+ try {
88
+ const formated = ans.replaceAll("f(x)", "").replaceAll("=", "");
89
+ const parsed = (0, latexParser_1.parseAlgebraic)(formated);
90
+ if (!parsed)
91
+ return false;
92
+ return ("f(x)=" +
93
+ parsed
94
+ .simplify({
95
+ forbidFactorize: true,
96
+ forceIsolateMonomCoeffs: true,
97
+ decimalToFractions: true,
98
+ forceDistributeFractions: true,
99
+ })
100
+ .toTex() ===
101
+ answer);
102
+ }
103
+ catch (err) {
104
+ return (0, handleVEAError_1.handleVEAError)(err);
105
+ }
83
106
  };
84
107
  exports.affineExpressionReading = {
85
108
  id: "affineExpressionReading",
@@ -1 +1 @@
1
- {"version":3,"file":"signFunction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/signFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAgIF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}
1
+ {"version":3,"file":"signFunction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/signFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAoBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAgIF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}
@@ -14,6 +14,7 @@ const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
14
14
  const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
15
15
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
16
16
  const shuffle_1 = require("../../../../utils/alea/shuffle");
17
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
17
18
  const getHint = (identifiers) => {
18
19
  const { a, b, askingPositive } = identifiers;
19
20
  const affine = new polynomial_1.Polynomial([b, a]);
@@ -105,7 +106,7 @@ const isAnswerValid = (ans, { answer, a, b, askingPositive }) => {
105
106
  return parsed.simplify().toTex() === answer;
106
107
  }
107
108
  catch (err) {
108
- return false;
109
+ return (0, handleVEAError_1.handleVEAError)(err);
109
110
  }
110
111
  };
111
112
  exports.signFunction = {
@@ -1 +1 @@
1
- {"version":3,"file":"graphicEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CAClC,CAAC;AAuHF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
1
+ {"version":3,"file":"graphicEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAiBlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CAClC,CAAC;AAuHF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
@@ -12,6 +12,7 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
12
12
  const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
13
13
  const discreteSetParser_1 = require("../../../../tree/parsers/discreteSetParser");
14
14
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
15
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
15
16
  const getInstruction = (identifiers) => {
16
17
  return `Déterminer graphiquement les solutions de l'équation $f(x) = ${identifiers.yValue}$ où $f$ est la fonction représentée ci-dessous.`;
17
18
  };
@@ -112,7 +113,7 @@ const isAnswerValid = (ans, { answer, yValue, splinePoints }) => {
112
113
  return "S=" + parsed.simplify().toTex() === answer;
113
114
  }
114
115
  catch (err) {
115
- return false;
116
+ return (0, handleVEAError_1.handleVEAError)(err);
116
117
  }
117
118
  };
118
119
  exports.graphicEquation = {
@@ -1 +1 @@
1
- {"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAO5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AA+MF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
1
+ {"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAQ5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AA+MF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -13,6 +13,7 @@ const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
13
13
  const unionIntervalNode_1 = require("../../../../tree/nodes/sets/unionIntervalNode");
14
14
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
15
15
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  const getAnswer = (identifiers) => {
17
18
  const intervalsNodes = identifiers.intervals.map((n) => new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(n.a), new numberNode_1.NumberNode(n.b), n.closure));
18
19
  const intervalsTree = intervalsNodes.length === 1
@@ -164,7 +165,7 @@ const isAnswerValid = (ans, { answer, intervals }) => {
164
165
  return "S=\\ " + parsed.simplify().toTex() === answer;
165
166
  }
166
167
  catch (err) {
167
- return false;
168
+ return (0, handleVEAError_1.handleVEAError)(err);
168
169
  }
169
170
  };
170
171
  exports.graphicInequation = {
@@ -1 +1 @@
1
- {"version":3,"file":"graphicInequationAffine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequationAffine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,gBAAgB,CAAC;IAClC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4HF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAkBzD,CAAC"}
1
+ {"version":3,"file":"graphicInequationAffine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequationAffine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAe3C,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,gBAAgB,CAAC;IAClC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4HF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAkBzD,CAAC"}
@@ -14,6 +14,7 @@ const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
14
14
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
15
15
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
16
16
  const random_1 = require("../../../../utils/alea/random");
17
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
17
18
  const getPropositions = (n, { answer }) => {
18
19
  const propositions = [];
19
20
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -83,7 +84,7 @@ const isAnswerValid = (ans, { answer }) => {
83
84
  return parsed.simplify().toTex() === answer;
84
85
  }
85
86
  catch (err) {
86
- return false;
87
+ return (0, handleVEAError_1.handleVEAError)(err);
87
88
  }
88
89
  };
89
90
  const getGraphicInequationAffineQuestion = (opts) => {
@@ -1 +1 @@
1
- {"version":3,"file":"imageFunction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/imageFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAqGF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAkB/C,CAAC"}
1
+ {"version":3,"file":"imageFunction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/imageFunction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAqGF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAkB/C,CAAC"}
@@ -8,6 +8,7 @@ const randint_1 = require("../../../../math/utils/random/randint");
8
8
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
9
9
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
10
10
  const shuffle_1 = require("../../../../utils/alea/shuffle");
11
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
11
12
  const alignTex_1 = require("../../../../utils/latex/alignTex");
12
13
  const getInstruction = (identifiers) => {
13
14
  const { rand, poly1, poly2, xValue, flip } = identifiers;
@@ -96,7 +97,7 @@ const isAnswerValid = (ans, { answer }) => {
96
97
  return parsed.simplify().toTex() === answer;
97
98
  }
98
99
  catch (err) {
99
- return false;
100
+ return (0, handleVEAError_1.handleVEAError)(err);
100
101
  }
101
102
  };
102
103
  exports.imageFunction = {
@@ -1 +1 @@
1
- {"version":3,"file":"twoFunctionsInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/twoFunctionsInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAS5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AAyPF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"twoFunctionsInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/twoFunctionsInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAU5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AAyPF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
@@ -14,6 +14,7 @@ const unionIntervalNode_1 = require("../../../../tree/nodes/sets/unionIntervalNo
14
14
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
15
15
  const random_1 = require("../../../../utils/alea/random");
16
16
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
17
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
17
18
  const getInstruction = (identifiers) => {
18
19
  return `Déterminer graphiquement les solutions de l'inéquation $f(x) ${identifiers.ineqSymbol} g(x)$ où $f$ et $g$ sont les fonctions représentées ci-dessous.`;
19
20
  };
@@ -188,7 +189,7 @@ const isAnswerValid = (ans, { answer, fSplinePoints, yValue, intervals }) => {
188
189
  return "S=\\ " + parsed.simplify().toTex() === answer;
189
190
  }
190
191
  catch (err) {
191
- return false;
192
+ return (0, handleVEAError_1.handleVEAError)(err);
192
193
  }
193
194
  };
194
195
  exports.twoFunctionsInequation = {
@@ -1 +1 @@
1
- {"version":3,"file":"expEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAiBlC,cAAc;AACd,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2FF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAgB7C,CAAC"}
1
+ {"version":3,"file":"expEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAkBlC,cAAc;AACd,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2FF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAgB7C,CAAC"}
@@ -16,6 +16,7 @@ const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
16
16
  const shuffle_1 = require("../../../../utils/alea/shuffle");
17
17
  const equationSolutionParser_1 = require("../../../../tree/parsers/equationSolutionParser");
18
18
  const discreteSetParser_1 = require("../../../../tree/parsers/discreteSetParser");
19
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
19
20
  const getInstruction = (identifiers) => {
20
21
  const { a, k } = identifiers;
21
22
  const equation = new equalNode_1.EqualNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(a), new expNode_1.ExpNode(new variableNode_1.VariableNode("x"))), new numberNode_1.NumberNode(k));
@@ -84,7 +85,7 @@ const isAnswerValid = (ans, { answer, a, k }) => {
84
85
  }
85
86
  }
86
87
  catch (err) {
87
- return false;
88
+ return (0, handleVEAError_1.handleVEAError)(err);
88
89
  }
89
90
  };
90
91
  exports.expEquation = {