math-exercises 2.2.7 → 2.2.8

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 (183) hide show
  1. package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +10 -7
  3. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +0 -1
  5. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +0 -1
  7. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +0 -1
  9. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +0 -1
  11. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts +10 -0
  12. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -0
  13. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +61 -0
  14. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts +10 -0
  15. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -0
  16. package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +56 -0
  17. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts +9 -0
  18. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -0
  19. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +57 -0
  20. package/lib/exercises/math/calcul/fractions/index.d.ts +3 -0
  21. package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
  22. package/lib/exercises/math/calcul/fractions/index.js +3 -0
  23. package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
  24. package/lib/exercises/math/calcul/fractions/simplifyFraction.js +0 -1
  25. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  26. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +0 -1
  27. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  28. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +0 -1
  29. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  30. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -1
  31. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
  32. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +0 -1
  33. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
  34. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +0 -1
  35. package/lib/exercises/math/complex/addComplex.d.ts.map +1 -1
  36. package/lib/exercises/math/complex/addComplex.js +0 -1
  37. package/lib/exercises/math/complex/conjugateComplex.ts.d.ts.map +1 -1
  38. package/lib/exercises/math/complex/conjugateComplex.ts.js +0 -1
  39. package/lib/exercises/math/complex/conjugateDivideComplex.d.ts.map +1 -1
  40. package/lib/exercises/math/complex/conjugateDivideComplex.js +0 -1
  41. package/lib/exercises/math/complex/inverseComplex.d.ts.map +1 -1
  42. package/lib/exercises/math/complex/inverseComplex.js +0 -1
  43. package/lib/exercises/math/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
  44. package/lib/exercises/math/complex/moduloFromAlgebraicComplex.js +0 -1
  45. package/lib/exercises/math/complex/mutiplyComplex.d.ts.map +1 -1
  46. package/lib/exercises/math/complex/mutiplyComplex.js +0 -1
  47. package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
  48. package/lib/exercises/math/conversion/aeraConversion.js +0 -2
  49. package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
  50. package/lib/exercises/math/conversion/capacityConversion.js +0 -1
  51. package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
  52. package/lib/exercises/math/conversion/lengthConversion.js +0 -2
  53. package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
  54. package/lib/exercises/math/conversion/massConversion.js +0 -2
  55. package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
  56. package/lib/exercises/math/conversion/volumeCapacityConversion.js +0 -2
  57. package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
  58. package/lib/exercises/math/conversion/volumeConversion.js +0 -2
  59. package/lib/exercises/math/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
  60. package/lib/exercises/math/derivation/derivative/expDerivativeOne.js +0 -1
  61. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
  62. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +0 -1
  63. package/lib/exercises/math/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
  64. package/lib/exercises/math/derivation/derivative/lnDerivativeOne.js +0 -1
  65. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
  66. package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +0 -1
  67. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
  68. package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +0 -2
  69. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
  70. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +0 -1
  71. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  72. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +0 -1
  73. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
  74. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +0 -1
  75. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
  76. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +0 -1
  77. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
  78. package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +0 -1
  79. package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
  80. package/lib/exercises/math/derivation/derivativeNumberReading.js +0 -1
  81. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +0 -1
  82. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +0 -1
  83. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  84. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +0 -1
  85. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  86. package/lib/exercises/math/functions/basics/graphicInequation.js +12 -3
  87. package/lib/exercises/math/functions/cube/cubicEquation.js +0 -1
  88. package/lib/exercises/math/functions/exponential/expEquation.js +0 -1
  89. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  90. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +3 -4
  91. package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +0 -1
  92. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
  93. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +0 -1
  94. package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.d.ts.map +1 -1
  95. package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.js +0 -2
  96. package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
  97. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +0 -1
  98. package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
  99. package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.js +0 -1
  100. package/lib/exercises/math/geometry/cartesian/midpoint.js +0 -1
  101. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +0 -1
  102. package/lib/exercises/math/geometry/thales/thales.js +0 -1
  103. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  104. package/lib/exercises/math/geometry/thales/thalesCalcul.js +0 -1
  105. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
  106. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +0 -2
  107. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.d.ts.map +1 -1
  108. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +0 -2
  109. package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
  110. package/lib/exercises/math/percent/findProportion.js +1 -1
  111. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  112. package/lib/exercises/math/percent/percentToDecimal.js +0 -1
  113. package/lib/exercises/math/powers/calculateNegativePower.js +0 -1
  114. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  115. package/lib/exercises/math/powers/decimalToScientific.js +0 -1
  116. package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
  117. package/lib/exercises/math/powers/powersPower.js +0 -1
  118. package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
  119. package/lib/exercises/math/powers/scientificToDecimal.js +0 -2
  120. package/lib/exercises/math/primitive/expUPrimitive.js +0 -1
  121. package/lib/exercises/math/primitive/exponentialPrimitive.js +0 -1
  122. package/lib/exercises/math/primitive/logarithmePrimitive.js +0 -1
  123. package/lib/exercises/math/primitive/polynomialPrimitive.js +0 -1
  124. package/lib/exercises/math/primitive/sinCosPrimitive.js +0 -1
  125. package/lib/exercises/math/primitive/sinUCosUPrimitive.js +0 -1
  126. package/lib/exercises/math/probaStat/cardBasicProbas.js +0 -1
  127. package/lib/exercises/math/probaStat/diceBasicProbas.js +0 -1
  128. package/lib/exercises/math/probaStat/probabilityTree.js +0 -1
  129. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  130. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -4
  131. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +0 -1
  132. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +0 -1
  133. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts +10 -0
  134. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -0
  135. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +48 -0
  136. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
  137. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  138. package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
  139. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
  140. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
  141. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +0 -1
  142. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
  143. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +0 -1
  144. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts +10 -0
  145. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -0
  146. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +48 -0
  147. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts +8 -0
  148. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts.map +1 -0
  149. package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.js +46 -0
  150. package/lib/exercises/math/sequences/geometric/index.d.ts +2 -0
  151. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  152. package/lib/exercises/math/sequences/geometric/index.js +2 -0
  153. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts +2 -3
  154. package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
  155. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +23 -91
  156. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts +10 -0
  157. package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -0
  158. package/lib/exercises/math/sets/intervals/intervalToInequality.js +112 -0
  159. package/lib/exercises/math/squareRoots/squareRootsSum.d.ts.map +1 -1
  160. package/lib/exercises/math/squareRoots/squareRootsSum.js +0 -1
  161. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
  162. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +0 -1
  163. package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
  164. package/lib/exercises/pc/energy/energyTransfer.js +0 -1
  165. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
  166. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +0 -1
  167. package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
  168. package/lib/exercises/pc/mecanicalWaves/elongationReading.js +0 -1
  169. package/lib/index.d.ts +29 -3
  170. package/lib/index.d.ts.map +1 -1
  171. package/lib/math/geometry/line.d.ts.map +1 -1
  172. package/lib/math/geometry/line.js +0 -2
  173. package/lib/pc/constants/molecularChemistry/reaction.js +3 -1
  174. package/lib/playground.d.ts.map +1 -1
  175. package/lib/playground.js +2 -2
  176. package/lib/tree/nodes/sets/closure.d.ts +2 -0
  177. package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
  178. package/lib/tree/nodes/sets/closure.js +24 -0
  179. package/lib/tree/nodes/sets/intervalNode.d.ts +3 -0
  180. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  181. package/lib/tree/nodes/sets/intervalNode.js +13 -0
  182. package/lib/tree/parsers/latexParser.js +6 -6
  183. package/package.json +1 -1
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inequalityToInterval = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const intervals_1 = require("../../../../math/sets/intervals/intervals");
7
+ const inequationNode_1 = require("../../../../tree/nodes/inequations/inequationNode");
8
+ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
9
+ const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
10
+ const shuffle_1 = require("../../../../utils/shuffle");
11
+ const getIntervalToInequalityQuestion = () => {
12
+ const interval = intervals_1.IntervalConstructor.random();
13
+ const inequalityString = interval.toInequality();
14
+ const answer = inequalityString;
15
+ const instruction = `Soit $x \\in ${interval.toTex()}$. Traduire cette appartenance en une inégalité.`;
16
+ const question = {
17
+ answer,
18
+ instruction: instruction,
19
+ keys: ["x", "inf", "sup", "geq", "leq", "infty"],
20
+ answerFormat: "tex",
21
+ identifiers: {
22
+ intervalMin: interval.min === -Infinity ? "-infty" : interval.min,
23
+ intervalMax: interval.max === Infinity ? "infty" : interval.max,
24
+ intervalClosure: interval.closure,
25
+ },
26
+ };
27
+ return question;
28
+ };
29
+ const getPropositions = (n, { answer, intervalClosure, intervalMax, intervalMin }) => {
30
+ const switchInclusion = (symbol) => {
31
+ if (symbol === "\\le")
32
+ return "<";
33
+ if (symbol === "<")
34
+ return "\\le";
35
+ if (symbol === ">")
36
+ return "\\ge";
37
+ return ">";
38
+ };
39
+ const reverseInequality = (symbol) => {
40
+ if (symbol === "\\le")
41
+ return "\\ge";
42
+ if (symbol === "<")
43
+ return ">";
44
+ if (symbol === ">")
45
+ return "<";
46
+ return "\\le";
47
+ };
48
+ const min = intervalMin === "-infty" ? -Infinity : intervalMin;
49
+ const max = intervalMax === "infty" ? Infinity : intervalMax;
50
+ const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure);
51
+ const propositions = [];
52
+ (0, exercise_1.addValidProp)(propositions, answer);
53
+ const xNode = new variableNode_1.VariableNode("x");
54
+ let wrongIneqs = [];
55
+ if (interval.min === -Infinity) {
56
+ wrongIneqs = [
57
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], switchInclusion(interval.rightInequalitySymbol)),
58
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], reverseInequality(switchInclusion(interval.rightInequalitySymbol))),
59
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.max)], reverseInequality(interval.rightInequalitySymbol)),
60
+ ];
61
+ }
62
+ else if (interval.max === Infinity) {
63
+ wrongIneqs = [
64
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], switchInclusion(interval.leftInequalitySymbol)),
65
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], reverseInequality(switchInclusion(interval.leftInequalitySymbol))),
66
+ new inequationNode_1.InequationNode([xNode, new numberNode_1.NumberNode(interval.min)], interval.leftInequalitySymbol),
67
+ ];
68
+ }
69
+ else {
70
+ wrongIneqs = [
71
+ new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
72
+ switchInclusion(interval.leftInequalitySymbol),
73
+ interval.rightInequalitySymbol,
74
+ ]),
75
+ new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
76
+ interval.leftInequalitySymbol,
77
+ switchInclusion(interval.rightInequalitySymbol),
78
+ ]),
79
+ new inequationNode_1.InequationNode([new numberNode_1.NumberNode(interval.min), xNode, new numberNode_1.NumberNode(interval.max)], [
80
+ switchInclusion(interval.leftInequalitySymbol),
81
+ switchInclusion(interval.rightInequalitySymbol),
82
+ ]),
83
+ ];
84
+ }
85
+ wrongIneqs.forEach((ineq) => {
86
+ (0, exercise_1.addWrongProp)(propositions, ineq.toTex());
87
+ });
88
+ return (0, shuffle_1.shuffle)(propositions);
89
+ };
90
+ const isAnswerValid = (ans, { intervalClosure, intervalMax, intervalMin }) => {
91
+ const min = intervalMin === "-infty" ? -Infinity : intervalMin;
92
+ const max = intervalMax === "infty" ? Infinity : intervalMax;
93
+ const interval = new intervals_1.Interval(min.toTree(), max.toTree(), intervalClosure).toTree();
94
+ const inequality = interval.toInequality();
95
+ const answer = inequality;
96
+ const texs = answer.toAllValidTexs();
97
+ return texs.includes(ans);
98
+ };
99
+ exports.inequalityToInterval = {
100
+ id: "intervalToInequality",
101
+ connector: "=",
102
+ label: "Traduire un intervalle en inégalité",
103
+ levels: ["2ndPro", "2nde", "CAP", "1reESM"],
104
+ isSingleStep: true,
105
+ sections: ["Ensembles et intervalles"],
106
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIntervalToInequalityQuestion, nb),
107
+ qcmTimer: 60,
108
+ freeTimer: 60,
109
+ getPropositions,
110
+ isAnswerValid,
111
+ subject: "Mathématiques",
112
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"squareRootsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/squareRoots/squareRootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB,CAAC;AA+EF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
1
+ {"version":3,"file":"squareRootsSum.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/squareRoots/squareRootsSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB,CAAC;AA8EF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
@@ -62,7 +62,6 @@ const isAnswerValid = (ans, { answer, a, b, c, d, y, x, z }) => {
62
62
  }
63
63
  const tree = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(b))).simplify();
64
64
  const texs = tree.toAllValidTexs();
65
- console.log("vea SumSQRT answer: ", answer, "texs : ", texs);
66
65
  return texs.includes(ans);
67
66
  };
68
67
  exports.squareRootsSum = {
@@ -1 +1 @@
1
- {"version":3,"file":"findAtomEntitiesNumberFromMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAMhF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAuEF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
1
+ {"version":3,"file":"findAtomEntitiesNumberFromMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAMhF,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAsEF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
@@ -18,7 +18,6 @@ const getFindAtomEntitiesNumberFromMassQuestion = () => {
18
18
  const sampleMassMeasure = new measure_1.Measure(sampleMass, 0, massUnits_1.MassUnit.kg);
19
19
  const atomMass = atoms_1.nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
20
20
  const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
21
- console.log("entitiesNumber", entitiesNumber);
22
21
  const instruction = `Un échantillon a une masse $m = ${sampleMassMeasure.toTex()}$ ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name}. La masse d'un atome ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} est de $${atomMass.toTex({ scientific: 2 })}$.
23
22
  Déterminer le nombre d'atomes ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} composant l'échantillon.`;
24
23
  const question = {
@@ -1 +1 @@
1
- {"version":3,"file":"energyTransfer.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/energyTransfer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAiEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
1
+ {"version":3,"file":"energyTransfer.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/energyTransfer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAgEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
@@ -49,7 +49,6 @@ const isAnswerValid = (ans, { answer, energy }) => {
49
49
  const validanswer2 = energy.toTree().toAllValidTexs();
50
50
  let latexs = [];
51
51
  latexs.push(validanswer1, ...validanswer2);
52
- console.log(latexs);
53
52
  return latexs.includes(ans);
54
53
  };
55
54
  exports.energyTransfer = {
@@ -1 +1 @@
1
- {"version":3,"file":"gravitationalAttractionObjectHeight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/gravitationalAttractionObjectHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiIF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAerE,CAAC"}
1
+ {"version":3,"file":"gravitationalAttractionObjectHeight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/gravitationalAttractionObjectHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgIF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAerE,CAAC"}
@@ -112,7 +112,6 @@ const isAnswerValid = (ans, { answer, h }) => {
112
112
  validanswer2.toSignificant(2).toTex({ hideUnit: true }),
113
113
  validanswer3.toSignificant(2).toTex({ hideUnit: true }),
114
114
  ];
115
- console.log(latexs);
116
115
  return latexs.includes(ans);
117
116
  };
118
117
  exports.gravitationalAttractionObjectHeight = {
@@ -1 +1 @@
1
- {"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA6FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
1
+ {"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
@@ -54,7 +54,6 @@ const isAnswerValid = (ans, { answer, amplitude, period }) => {
54
54
  const node = new multiplyNode_1.MultiplyNode(amplitude.toTree(), new cosNode_1.CosNode(new multiplyNode_1.MultiplyNode(frac, new variableNode_1.VariableNode("t"))));
55
55
  const equal = new equalNode_1.EqualNode(new variableNode_1.VariableNode("y\\left(t\\right)"), node);
56
56
  const texs = equal.toAllValidTexs({ allowRawRightChildAsSolution: true });
57
- console.log(texs);
58
57
  return texs.includes(ans);
59
58
  };
60
59
  exports.elongationReading = {
package/lib/index.d.ts CHANGED
@@ -93,6 +93,20 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
93
93
  num: number;
94
94
  denum: number;
95
95
  leadingPart: number;
96
+ }> | import("./exercises/exercise").Exercise<{
97
+ denom: number;
98
+ num1: number;
99
+ num2: number;
100
+ }> | import("./exercises/exercise").Exercise<{
101
+ num1: number;
102
+ num2: number;
103
+ denom1: number;
104
+ denom2: number;
105
+ }> | import("./exercises/exercise").Exercise<{
106
+ num1: number;
107
+ num2: number;
108
+ denom1: number;
109
+ denom2: number;
96
110
  }> | import("./exercises/exercise").Exercise<{
97
111
  numbers: number[];
98
112
  }> | import("./exercises/exercise").Exercise<{
@@ -1247,6 +1261,11 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1247
1261
  rank2: number;
1248
1262
  value2: number;
1249
1263
  rankAsked: number;
1264
+ }> | import("./exercises/exercise").Exercise<{
1265
+ firstRank: number;
1266
+ firstTerm: number;
1267
+ reason: number;
1268
+ askedRank: number;
1250
1269
  }> | import("./exercises/exercise").Exercise<{
1251
1270
  firstValue: number;
1252
1271
  reason: number;
@@ -1273,6 +1292,14 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1273
1292
  reason: number;
1274
1293
  firstValue: number;
1275
1294
  firstRank: number;
1295
+ }> | import("./exercises/exercise").Exercise<{
1296
+ firstRank: number;
1297
+ firstTerm: number;
1298
+ reason: number;
1299
+ askedRank: number;
1300
+ }> | import("./exercises/exercise").Exercise<{
1301
+ sequence: number[];
1302
+ reason: number;
1276
1303
  }> | import("./exercises/exercise").Exercise<{
1277
1304
  rank: number;
1278
1305
  coeffs: number[];
@@ -1283,9 +1310,8 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1283
1310
  u0: number;
1284
1311
  coeffs: number[];
1285
1312
  }> | import("./exercises/exercise").Exercise<{
1286
- isIntervalToInequality: boolean;
1287
- intervalMin: number;
1288
- intervalMax: number;
1313
+ intervalMin: string | number;
1314
+ intervalMax: string | number;
1289
1315
  intervalClosure: import("./tree/nodes/sets/closure").ClosureType;
1290
1316
  }> | import("./exercises/exercise").Exercise<{
1291
1317
  int1Min: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;IACD,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,WAAW,EAAE,MAAM,MAAM,CAAC;KAC3B;CACF;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,MAAM,EAAE,KAAK;IAkBxC,YAAY,CAAC,KAAK,EAAE,KAAK;IAUzB,QAAQ,CAAC,KAAK,EAAE,KAAK;IAarB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM;IAc5B,WAAW,MAAO,MAAM,KAAK,KAAK,KAAG,SAAS,CAmB5C;IAEF,oBAAoB,IAAI,SAAS;CAsBlC"}
1
+ {"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,qBAAa,IAAI;IACf,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7B,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;gBACjB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK;IAkBxC,YAAY,CAAC,KAAK,EAAE,KAAK;IASzB,QAAQ,CAAC,KAAK,EAAE,KAAK;IAarB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM;IAa5B,WAAW,MAAO,MAAM,KAAK,KAAK,KAAG,SAAS,CAmB5C;IAEF,oBAAoB,IAAI,SAAS;CAsBlC"}
@@ -40,7 +40,6 @@ class Line {
40
40
  }
41
41
  getParallele(point) {
42
42
  if (this.isVertical) {
43
- console.log(this.pointA.toTexWithCoords(), this.pointB.toTexWithCoords());
44
43
  throw Error("Parallel vertical lines not implemented");
45
44
  }
46
45
  const x = new addNode_1.AddNode(point.x, new numberNode_1.NumberNode(1)).simplify();
@@ -61,7 +60,6 @@ class Line {
61
60
  }
62
61
  const x = new numberNode_1.NumberNode((0, randint_1.randint)(-10, 10));
63
62
  const y = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(this.a, x), this.b).simplify();
64
- console.log(y.toTex(), this.a.toTex(), x.toTex(), this.b?.toTex());
65
63
  return new point_1.Point(name ?? "A", x, y);
66
64
  }
67
65
  getCartesianEquation() {
@@ -324,7 +324,9 @@ class ReactionConstructor {
324
324
  for (const reactionSpecies of reaction) {
325
325
  const foundMolecule = molecule_1.molecules.find((molecule) => molecule.formula === reactionSpecies.species);
326
326
  if (!foundMolecule) {
327
- console.log(`La species '${reactionSpecies.species}' n'a pas été trouvée dans molecules.`);
327
+ // console.log(
328
+ // `La species '${reactionSpecies.species}' n'a pas été trouvée dans molecules.`,
329
+ // );
328
330
  }
329
331
  }
330
332
  }
@@ -1 +1 @@
1
- {"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,YAEtB,CAAC"}
1
+ {"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU,YAEtB,CAAC"}
package/lib/playground.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.playground = void 0;
4
- const toSeparatedThousands_1 = require("./utils/numberPrototype/toSeparatedThousands");
4
+ const infiniteNode_1 = require("./tree/nodes/numbers/infiniteNode");
5
5
  const playground = () => {
6
- console.log((0, toSeparatedThousands_1.toSeperatedThousands)("12345,6789"));
6
+ console.log(infiniteNode_1.MinusInfinityNode.evaluate({}));
7
7
  };
8
8
  exports.playground = playground;
@@ -7,6 +7,8 @@ export declare enum ClosureType {
7
7
  export declare abstract class Closure {
8
8
  static random(): ClosureType;
9
9
  static reverse(closure: ClosureType): ClosureType;
10
+ static leftReverse(closure: ClosureType): ClosureType;
11
+ static rightReverse(closure: ClosureType): ClosureType;
10
12
  static switch(closure: ClosureType): ClosureType;
11
13
  static fromBrackets(left: "[" | "]", right: "]" | "["): ClosureType;
12
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"closure.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/closure.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACrB,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;CACH;AAED,8BAAsB,OAAO;IAC3B,MAAM,CAAC,MAAM;IAcb,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW;IAYnC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW;IAYlC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;CAOtD"}
1
+ {"version":3,"file":"closure.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/closure.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACrB,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;CACH;AAED,8BAAsB,OAAO;IAC3B,MAAM,CAAC,MAAM;IAcb,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW;IAYnC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAYvC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW;IAYxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW;IAYlC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;CAOtD"}
@@ -36,6 +36,30 @@ class Closure {
36
36
  return ClosureType.FO;
37
37
  }
38
38
  }
39
+ static leftReverse(closure) {
40
+ switch (closure) {
41
+ case ClosureType.FF:
42
+ return ClosureType.OF;
43
+ case ClosureType.OO:
44
+ return ClosureType.FO;
45
+ case ClosureType.FO:
46
+ return ClosureType.OO;
47
+ case ClosureType.OF:
48
+ return ClosureType.FF;
49
+ }
50
+ }
51
+ static rightReverse(closure) {
52
+ switch (closure) {
53
+ case ClosureType.OF:
54
+ return ClosureType.OO;
55
+ case ClosureType.OO:
56
+ return ClosureType.OF;
57
+ case ClosureType.FO:
58
+ return ClosureType.FF;
59
+ case ClosureType.FF:
60
+ return ClosureType.FO;
61
+ }
62
+ }
39
63
  static switch(closure) {
40
64
  switch (closure) {
41
65
  case ClosureType.FF:
@@ -18,6 +18,9 @@ export declare class IntervalNode implements SetNode {
18
18
  toMathString(): string;
19
19
  toMathjs(): string;
20
20
  toReversedClosure(): IntervalNode;
21
+ toLeftReversedClosure(): IntervalNode;
22
+ toRightReversedClosure(): IntervalNode;
23
+ toRandomDifferentClosure(): IntervalNode;
21
24
  toComplement(): IntervalNode | UnionIntervalNode;
22
25
  toTex(): string;
23
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"intervalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/intervalNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQtD,OAAO,EAAW,WAAW,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,YAAY,CAEzD;AACD,qBAAa,YAAa,YAAW,OAAO;IAC1C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,CAAC,EAAE,IAAI,CAAC;IACR,CAAC,EAAE,IAAI,CAAC;gBACI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B,YAAY;IAIZ,QAAQ;IAIR,iBAAiB;IAGjB,qBAAqB;IAGrB,sBAAsB;IAGtB,wBAAwB;IAWxB,YAAY;IAkCZ,KAAK;CAWN"}
@@ -63,6 +63,19 @@ class IntervalNode {
63
63
  toReversedClosure() {
64
64
  return new IntervalNode(this.a, this.b, closure_1.Closure.reverse(this.closure));
65
65
  }
66
+ toLeftReversedClosure() {
67
+ return new IntervalNode(this.a, this.b, closure_1.Closure.leftReverse(this.closure));
68
+ }
69
+ toRightReversedClosure() {
70
+ return new IntervalNode(this.a, this.b, closure_1.Closure.rightReverse(this.closure));
71
+ }
72
+ toRandomDifferentClosure() {
73
+ return new IntervalNode(this.a, this.b, Math.random() < 0.3
74
+ ? closure_1.Closure.leftReverse(this.closure)
75
+ : Math.random() < 0.3
76
+ ? closure_1.Closure.reverse(this.closure)
77
+ : closure_1.Closure.rightReverse(this.closure));
78
+ }
66
79
  toComplement() {
67
80
  if ((0, infiniteNode_1.isInfiniteNode)(this.a) && (0, infiniteNode_1.isInfiniteNode)(this.b))
68
81
  return this;
@@ -101,7 +101,7 @@ const buildTree = (tokens) => {
101
101
  if (token === ")" || token === "}")
102
102
  currentDepth--;
103
103
  }
104
- console.log("depthed: ", depthedTokens);
104
+ // console.log("depthed: ", depthedTokens);
105
105
  while (true) {
106
106
  if (maxDepth === 0) {
107
107
  const tree = buildTreeForSameDepthTokens(depthedTokens.map((el) => el.token));
@@ -119,13 +119,13 @@ const buildTree = (tokens) => {
119
119
  token: tree,
120
120
  depth: token.depth - 1,
121
121
  });
122
- console.log(`depthed after iter ${i}`, depthedTokens);
122
+ // console.log(`depthed after iter ${i}`, depthedTokens);
123
123
  }
124
124
  maxDepth--;
125
125
  }
126
126
  };
127
127
  const buildTreeForSameDepthTokens = (tokens) => {
128
- console.log("start: ", tokens);
128
+ // console.log("start: ", tokens);
129
129
  let tempTokens = [];
130
130
  for (let i = 0; i < tokens.length; i++) {
131
131
  const token = tokens[i];
@@ -148,7 +148,7 @@ const buildTreeForSameDepthTokens = (tokens) => {
148
148
  else
149
149
  throw Error(`token not implemented: ${token}`);
150
150
  }
151
- console.log("after parses : ", tempTokens);
151
+ // console.log("after parses : ", tempTokens);
152
152
  //1 build les fct
153
153
  for (let i = 0; i < tempTokens.length; i++) {
154
154
  if (typeof tempTokens[i] !== "string")
@@ -210,7 +210,7 @@ const buildTreeForSameDepthTokens = (tokens) => {
210
210
  }
211
211
  }
212
212
  }
213
- console.log("after fcts: ", tempTokens);
213
+ // console.log("after fcts: ", tempTokens);
214
214
  //3 build les *
215
215
  let currentProduct;
216
216
  let currentProductStartIndex;
@@ -251,7 +251,7 @@ const buildTreeForSameDepthTokens = (tokens) => {
251
251
  }
252
252
  //4 build les +
253
253
  let currentAdd;
254
- console.log("beforeAdd", tempTokens);
254
+ // console.log("beforeAdd", tempTokens);
255
255
  for (let i = 0; i < tempTokens.length; i++) {
256
256
  const token = tempTokens[i];
257
257
  if (!currentAdd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [