math-exercises 2.2.94 → 2.2.96

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 (209) hide show
  1. package/lib/exercises/math/calcul/fractions/fractionSquare.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/fractions/fractionSquare.js +2 -1
  3. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/fractions/fractionsSum.js +2 -1
  5. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +2 -1
  7. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +2 -1
  9. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +2 -1
  11. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +2 -1
  13. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
  14. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +0 -4
  15. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  16. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +82 -34
  17. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +2 -1
  19. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  20. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +86 -36
  21. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  22. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +82 -32
  23. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  24. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +2 -1
  25. package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -1
  26. package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +2 -1
  27. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  28. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +2 -1
  29. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  30. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +2 -1
  31. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  32. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +2 -1
  33. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  34. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +3 -1
  35. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
  36. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -1
  37. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
  38. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -1
  39. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
  40. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -1
  41. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  42. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -1
  43. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.d.ts.map +1 -1
  44. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +2 -1
  45. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.d.ts.map +1 -1
  46. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +38 -16
  47. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts +3 -3
  48. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
  49. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +171 -75
  50. package/lib/exercises/math/dataReading/index.d.ts +2 -0
  51. package/lib/exercises/math/dataReading/index.d.ts.map +1 -0
  52. package/lib/exercises/math/dataReading/index.js +17 -0
  53. package/lib/exercises/math/dataReading/tableReading.d.ts +8 -0
  54. package/lib/exercises/math/dataReading/tableReading.d.ts.map +1 -0
  55. package/lib/exercises/math/dataReading/tableReading.js +105 -0
  56. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
  57. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +2 -1
  58. package/lib/exercises/math/derivation/derivative/expDerivativeFour.d.ts.map +1 -1
  59. package/lib/exercises/math/derivation/derivative/expDerivativeFour.js +2 -1
  60. package/lib/exercises/math/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
  61. package/lib/exercises/math/derivation/derivative/expDerivativeThree.js +2 -1
  62. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  63. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +2 -1
  64. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
  65. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +75 -11
  66. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  67. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +2 -1
  68. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  69. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +2 -1
  70. package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.d.ts.map +1 -1
  71. package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.js +2 -1
  72. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  73. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +2 -1
  74. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  75. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -1
  76. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
  77. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +2 -1
  78. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
  79. package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +2 -1
  80. package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
  81. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +2 -1
  82. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  83. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +2 -2
  84. package/lib/exercises/math/functions/affines/affineExpressionReading.js +2 -1
  85. package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
  86. package/lib/exercises/math/functions/affines/signFunction.js +2 -1
  87. package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
  88. package/lib/exercises/math/functions/basics/graphicEquation.js +2 -1
  89. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  90. package/lib/exercises/math/functions/basics/graphicInequation.js +2 -1
  91. package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
  92. package/lib/exercises/math/functions/basics/graphicInequationAffine.js +2 -1
  93. package/lib/exercises/math/functions/basics/imageFunction.d.ts.map +1 -1
  94. package/lib/exercises/math/functions/basics/imageFunction.js +2 -1
  95. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  96. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -1
  97. package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
  98. package/lib/exercises/math/functions/exponential/expEquation.js +2 -1
  99. package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
  100. package/lib/exercises/math/functions/logarithm/logPowerEquation.js +2 -1
  101. package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
  102. package/lib/exercises/math/functions/sign/affineProductSign.js +2 -1
  103. package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
  104. package/lib/exercises/math/functions/square/squareImageInterval.js +2 -1
  105. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts.map +1 -1
  106. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +2 -1
  107. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
  108. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +2 -1
  109. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.d.ts.map +1 -1
  110. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.js +2 -1
  111. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  112. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +2 -1
  113. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -1
  114. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +2 -1
  115. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
  116. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +2 -1
  117. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
  118. package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +2 -1
  119. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
  120. package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +2 -1
  121. package/lib/exercises/math/index.d.ts +1 -0
  122. package/lib/exercises/math/index.d.ts.map +1 -1
  123. package/lib/exercises/math/index.js +1 -0
  124. package/lib/exercises/math/matrices/matrixInversibilityDomain.d.ts.map +1 -1
  125. package/lib/exercises/math/matrices/matrixInversibilityDomain.js +2 -1
  126. package/lib/exercises/math/percent/index.d.ts +1 -0
  127. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  128. package/lib/exercises/math/percent/index.js +1 -1
  129. package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -1
  130. package/lib/exercises/math/percent/percentWritings.js +10 -1
  131. package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
  132. package/lib/exercises/math/powers/powersMixOperations.js +2 -1
  133. package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
  134. package/lib/exercises/math/probaStat/diceBasicProbas.js +72 -20
  135. package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
  136. package/lib/exercises/math/probaStat/probabilityTree.js +2 -1
  137. package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
  138. package/lib/exercises/math/sampling/confidenceInterval.js +2 -1
  139. package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
  140. package/lib/exercises/math/sampling/fluctuationInterval.js +2 -1
  141. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
  142. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +2 -1
  143. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  144. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +2 -1
  145. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  146. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +2 -1
  147. package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
  148. package/lib/exercises/math/sets/intervals/intervalsUnion.js +2 -1
  149. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
  150. package/lib/exercises/math/trigonometry/degreeToRadians.js +2 -1
  151. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
  152. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +2 -1
  153. package/lib/exercises/vea/equationVEA.d.ts.map +1 -1
  154. package/lib/exercises/vea/equationVEA.js +2 -1
  155. package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
  156. package/lib/exercises/vea/rationalVEA.js +3 -2
  157. package/lib/exercises/vea/sqrtVEA.d.ts.map +1 -1
  158. package/lib/exercises/vea/sqrtVEA.js +2 -1
  159. package/lib/index.d.ts +9 -3
  160. package/lib/index.d.ts.map +1 -1
  161. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  162. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  163. package/lib/tree/nodes/operators/addNode.d.ts +2 -1
  164. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  165. package/lib/tree/nodes/operators/addNode.js +22 -4
  166. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  167. package/lib/tree/nodes/operators/fractionNode.js +1 -1
  168. package/lib/tree/nodes/operators/multiplyNode.d.ts +2 -1
  169. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  170. package/lib/tree/nodes/operators/multiplyNode.js +13 -1
  171. package/lib/tree/nodes/operators/operatorNode.d.ts +5 -0
  172. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
  173. package/lib/tree/nodes/operators/operatorNode.js +5 -1
  174. package/lib/tree/nodes/polynomials/monomNode.d.ts +2 -6
  175. package/lib/tree/nodes/polynomials/monomNode.d.ts.map +1 -1
  176. package/lib/tree/nodes/polynomials/monomNode.js +102 -94
  177. package/lib/tree/parsers/affineParser.d.ts +1 -1
  178. package/lib/tree/parsers/affineParser.d.ts.map +1 -1
  179. package/lib/tree/parsers/affineParser.js +18 -22
  180. package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -1
  181. package/lib/tree/parsers/discreteSetParser.js +2 -1
  182. package/lib/tree/parsers/equationSolutionParser.d.ts.map +1 -1
  183. package/lib/tree/parsers/equationSolutionParser.js +2 -1
  184. package/lib/tree/parsers/inequationParser.d.ts.map +1 -1
  185. package/lib/tree/parsers/inequationParser.js +2 -1
  186. package/lib/tree/parsers/intervalParser.d.ts.map +1 -1
  187. package/lib/tree/parsers/intervalParser.js +3 -2
  188. package/lib/tree/parsers/latexParser.js +3 -3
  189. package/lib/tree/parsers/monomParser.d.ts.map +1 -1
  190. package/lib/tree/parsers/monomParser.js +2 -1
  191. package/lib/tree/parsers/polynomialParser.d.ts +5 -1
  192. package/lib/tree/parsers/polynomialParser.d.ts.map +1 -1
  193. package/lib/tree/parsers/polynomialParser.js +5 -4
  194. package/lib/tree/parsers/powerParser.d.ts.map +1 -1
  195. package/lib/tree/parsers/powerParser.js +2 -1
  196. package/lib/tree/parsers/purifyLatex.d.ts +1 -1
  197. package/lib/tree/parsers/purifyLatex.js +1 -1
  198. package/lib/tree/parsers/sqrtParser.d.ts.map +1 -1
  199. package/lib/tree/parsers/sqrtParser.js +2 -1
  200. package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
  201. package/lib/tree/parsers/trinomParser.js +2 -1
  202. package/lib/tree/parsers/unionIntervalParser.d.ts.map +1 -1
  203. package/lib/tree/parsers/unionIntervalParser.js +2 -1
  204. package/lib/utils/alea/random.js +1 -1
  205. package/lib/utils/alea/shuffle.js +1 -1
  206. package/lib/utils/errors/handleVEAError.d.ts +2 -0
  207. package/lib/utils/errors/handleVEAError.d.ts.map +1 -0
  208. package/lib/utils/errors/handleVEAError.js +9 -0
  209. package/package.json +1 -1
@@ -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;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;AA+IF,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;
@@ -95,7 +96,6 @@ const getPropositions = (n, { answer, xA, xB, yA, yB }) => {
95
96
  };
96
97
  const isAnswerValid = (ans, { xA, xB, yA, yB }) => {
97
98
  try {
98
- // const parsed = affineParser(ans);
99
99
  const parsed = (0, latexParser_1.parseAlgebraic)(ans);
100
100
  if (!parsed)
101
101
  return false;
@@ -108,7 +108,7 @@ const isAnswerValid = (ans, { xA, xB, yA, yB }) => {
108
108
  .toTex() === ans);
109
109
  }
110
110
  catch (err) {
111
- return false;
111
+ return (0, handleVEAError_1.handleVEAError)(err);
112
112
  }
113
113
  // const a = new Rational(yB - yA, xB - xA).simplify().toTree();
114
114
  // //yA = axA+b donc b = yA-axA
@@ -14,6 +14,7 @@ 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
16
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
17
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
17
18
  const getInstruction = () => {
18
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)$.`;
19
20
  };
@@ -100,7 +101,7 @@ const isAnswerValid = (ans, { answer, secondPoint, b }) => {
100
101
  answer);
101
102
  }
102
103
  catch (err) {
103
- return false;
104
+ return (0, handleVEAError_1.handleVEAError)(err);
104
105
  }
105
106
  };
106
107
  exports.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 = {
@@ -1 +1 @@
1
- {"version":3,"file":"logPowerEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/logPowerEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAgGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB3D,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmB7D,CAAC"}
1
+ {"version":3,"file":"logPowerEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/logPowerEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAgGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB3D,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmB7D,CAAC"}
@@ -17,6 +17,7 @@ const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode")
17
17
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
18
18
  const discreteSetParser_1 = require("../../../../tree/parsers/discreteSetParser");
19
19
  const equationSolutionParser_1 = require("../../../../tree/parsers/equationSolutionParser");
20
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
20
21
  /**a*b^x+c=d */
21
22
  const getKeys = (identifiers, opts) => {
22
23
  const keys = ["x", "equal", "S", "lbrace", "semicolon", "rbrace"];
@@ -77,7 +78,7 @@ const isAnswerValid = (ans, { a, c, k, powered, isLog10, answer }) => {
77
78
  }
78
79
  }
79
80
  catch (err) {
80
- return false;
81
+ return (0, handleVEAError_1.handleVEAError)(err);
81
82
  }
82
83
  };
83
84
  exports.logPowerEquation = {
@@ -1 +1 @@
1
- {"version":3,"file":"affineProductSign.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/affineProductSign.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAGL,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAc9C,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,wBAAwB,CAAC;IACrC,UAAU,EAAE,wBAAwB,CAAC;IACrC,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AA8IF,KAAK,OAAO,GAAG;IACb,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAaF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiB5D,CAAC"}
1
+ {"version":3,"file":"affineProductSign.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/sign/affineProductSign.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAiBT,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAGL,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAe9C,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,wBAAwB,CAAC;IACrC,UAAU,EAAE,wBAAwB,CAAC;IACrC,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AA8IF,KAAK,OAAO,GAAG;IACb,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAaF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiB5D,CAAC"}
@@ -13,6 +13,7 @@ const unionIntervalNode_1 = require("../../../../tree/nodes/sets/unionIntervalNo
13
13
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
14
14
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
15
15
  const doWhile_1 = require("../../../../utils/doWhile");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  const getPropositions = (n, { answer, ...identifiers }, opts) => {
17
18
  const propositions = [];
18
19
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -92,7 +93,7 @@ const isAnswerValid = (ans, { answer, ...identifiers }, opts) => {
92
93
  ansNode.toClosedForm().toTex());
93
94
  }
94
95
  catch (err) {
95
- return false;
96
+ return (0, handleVEAError_1.handleVEAError)(err);
96
97
  }
97
98
  };
98
99
  const getAffineProductSignQuestion = (opts) => {
@@ -1 +1 @@
1
- {"version":3,"file":"squareImageInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/square/squareImageInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAAW,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAKrE,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsIF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
1
+ {"version":3,"file":"squareImageInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/square/squareImageInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAAW,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAMrE,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsIF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
@@ -7,6 +7,7 @@ const randint_1 = require("../../../../math/utils/random/randint");
7
7
  const closure_1 = require("../../../../tree/nodes/sets/closure");
8
8
  const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
9
9
  const intervalParser_1 = require("../../../../tree/parsers/intervalParser");
10
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
10
11
  // a < x < b avec a > 0 ==> a^2 < x^2 < b^2
11
12
  // a < x < b avec b < 0 ==> b^2 < x^2 < a^2
12
13
  // a < x < b avec a<0 et b>0 ==> 0 < x^2 < max(|a|,|b|)^2
@@ -101,7 +102,7 @@ const isAnswerValid = (ans, { answer, a, b, closure, type }) => {
101
102
  return parsed.simplify().toTex() === answer;
102
103
  }
103
104
  catch (err) {
104
- return false;
105
+ return (0, handleVEAError_1.handleVEAError)(err);
105
106
  }
106
107
  };
107
108
  exports.squareImageInterval = {
@@ -1 +1 @@
1
- {"version":3,"file":"coefficientsIdentification.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/coefficientsIdentification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAEL,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAO1C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAuIF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAgB5D,CAAC"}
1
+ {"version":3,"file":"coefficientsIdentification.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/coefficientsIdentification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAEL,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAQ1C,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,YAAY,EAAE,eAAe,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAuIF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAgB5D,CAAC"}
@@ -12,6 +12,7 @@ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
12
12
  const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
13
13
  const latexParser_1 = require("../../../../tree/parsers/latexParser");
14
14
  const random_1 = require("../../../../utils/alea/random");
15
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
15
16
  const getPropositions = (n, { answer, aIdentifiers, bIdentifiers, cIdentifiers, isAsking }) => {
16
17
  const propositions = [];
17
18
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -79,7 +80,7 @@ const isAnswerValid = (ans, { answer }) => {
79
80
  return parsed.simplify().toTex() === answer;
80
81
  }
81
82
  catch (err) {
82
- return false;
83
+ return (0, handleVEAError_1.handleVEAError)(err);
83
84
  }
84
85
  };
85
86
  const getCoefficientsIdentificationQuestion = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAgB3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAwHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
1
+ {"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAiB3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAwHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,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 unionIntervalNode_1 = require("../../../../tree/nodes/sets/unionIntervalNode");
15
15
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  const getAnswer = ({ a, roots, ineqType }) => {
17
18
  const aPositive = a > 0;
18
19
  const insideInterval = new intervalNode_1.IntervalNode(roots[0], roots[1], ineqType.isStrict ? closure_1.ClosureType.OO : closure_1.ClosureType.FF);
@@ -84,7 +85,7 @@ const isAnswerValid = (ans, { answer, a, b, c, ineqType }) => {
84
85
  return "S=\\ " + parsed.simplify().toTex() === answer;
85
86
  }
86
87
  catch (err) {
87
- return false;
88
+ return (0, handleVEAError_1.handleVEAError)(err);
88
89
  }
89
90
  };
90
91
  exports.secondDegreeInequation = {
@@ -1 +1 @@
1
- {"version":3,"file":"trinomSignFromRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/trinomSignFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,0BAA0B,CAAC;AAiBlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAuHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAgBrD,CAAC"}
1
+ {"version":3,"file":"trinomSignFromRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/trinomSignFromRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAuHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAgBrD,CAAC"}
@@ -10,6 +10,7 @@ const intervalNode_1 = require("../../../../tree/nodes/sets/intervalNode");
10
10
  const unionIntervalNode_1 = require("../../../../tree/nodes/sets/unionIntervalNode");
11
11
  const coinFlip_1 = require("../../../../utils/alea/coinFlip");
12
12
  const unionIntervalParser_1 = require("../../../../tree/parsers/unionIntervalParser");
13
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
13
14
  const getPropositions = (n, { answer, trinomCoeffs, isAskingPositive }) => {
14
15
  const propositions = [];
15
16
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -81,7 +82,7 @@ const isAnswerValid = (ans, { answer, isAskingPositive, trinomCoeffs }) => {
81
82
  return parsed.simplify().toTex() === answer;
82
83
  }
83
84
  catch (err) {
84
- return false;
85
+ return (0, handleVEAError_1.handleVEAError)(err);
85
86
  }
86
87
  };
87
88
  const getTrinomSignFromRootsQuestion = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"readAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAWvD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAuJF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
1
+ {"version":3,"file":"readAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAYvD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAuJF,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 latexParser_1 = require("../../../../tree/parsers/latexParser");
15
15
  const random_1 = require("../../../../utils/alea/random");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  const getPropositions = (n, { answer, absciss, abscissTex, abscissType, axisUnit, oneUnitTex }) => {
17
18
  const propositions = [];
18
19
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -66,7 +67,7 @@ const isAnswerValid = (ans, { answer, abscissTex }) => {
66
67
  return Math.abs(node.evaluate({}) - answerNode.evaluate({})) < 0.00001;
67
68
  }
68
69
  catch (err) {
69
- return false;
70
+ return (0, handleVEAError_1.handleVEAError)(err);
70
71
  }
71
72
  };
72
73
  const getReadAbscissOnLineQuestion = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"readAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAUvD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAwJF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
1
+ {"version":3,"file":"readAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAWvD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAwJF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,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 latexParser_1 = require("../../../../tree/parsers/latexParser");
15
15
  const random_1 = require("../../../../utils/alea/random");
16
+ const handleVEAError_1 = require("../../../../utils/errors/handleVEAError");
16
17
  const getPropositions = (n, { answer, absciss, abscissTex, abscissType, axisUnit, oneUnitTex }) => {
17
18
  const propositions = [];
18
19
  (0, exercise_1.addValidProp)(propositions, answer);
@@ -67,7 +68,7 @@ const isAnswerValid = (ans, { answer, abscissTex }) => {
67
68
  return Math.abs(node.evaluate({}) - answerNode.evaluate({})) < 0.00001;
68
69
  }
69
70
  catch (err) {
70
- return false;
71
+ return (0, handleVEAError_1.handleVEAError)(err);
71
72
  }
72
73
  };
73
74
  const getReadAbscissOnSemiLineQuestion = () => {