math-exercises 1.3.12 → 1.3.13

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 (254) hide show
  1. package/README.md +73 -73
  2. package/lib/exercises/calcul/addAndSub.d.ts +6 -6
  3. package/lib/exercises/calcul/addAndSub.js +39 -39
  4. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +3 -3
  5. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +35 -35
  6. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +3 -3
  7. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +32 -32
  8. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +3 -3
  9. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +32 -32
  10. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +3 -3
  11. package/lib/exercises/calcul/fractions/fractionsDivision.js +29 -29
  12. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +3 -3
  13. package/lib/exercises/calcul/fractions/fractionsProduct.js +28 -28
  14. package/lib/exercises/calcul/fractions/fractionsSum.d.ts +3 -3
  15. package/lib/exercises/calcul/fractions/fractionsSum.js +28 -28
  16. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +3 -3
  17. package/lib/exercises/calcul/fractions/simplifyFraction.js +24 -24
  18. package/lib/exercises/calcul/operations/operationsPriorities.d.ts +10 -10
  19. package/lib/exercises/calcul/operations/operationsPriorities.js +98 -98
  20. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +111 -111
  21. package/lib/exercises/calcul/operationsPriorities.js +88 -88
  22. package/lib/exercises/calcul/rounding/rounding.d.ts +19 -19
  23. package/lib/exercises/calcul/rounding/rounding.js +85 -85
  24. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +3 -3
  25. package/lib/exercises/calculLitteral/distributivity/allIdentities.js +27 -27
  26. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +3 -3
  27. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +30 -30
  28. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +3 -3
  29. package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +31 -31
  30. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +3 -3
  31. package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +32 -32
  32. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +3 -3
  33. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +32 -32
  34. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +3 -3
  35. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +31 -31
  36. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +6 -6
  37. package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +37 -37
  38. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +6 -6
  39. package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +40 -40
  40. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +6 -6
  41. package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +41 -41
  42. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +6 -6
  43. package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +43 -43
  44. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts +3 -3
  45. package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +32 -32
  46. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts +3 -3
  47. package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +33 -33
  48. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts +3 -3
  49. package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +32 -32
  50. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +6 -6
  51. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +38 -38
  52. package/lib/exercises/derivation/derivative/affineDerivative.d.ts +4 -0
  53. package/lib/exercises/derivation/derivative/affineDerivative.d.ts.map +1 -0
  54. package/lib/exercises/derivation/derivative/affineDerivative.js +27 -0
  55. package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts +1 -0
  56. package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -0
  57. package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +28 -0
  58. package/lib/exercises/derivation/derivative/thridDegreeDerivative.d.ts +1 -0
  59. package/lib/exercises/derivation/derivative/thridDegreeDerivative.d.ts.map +1 -0
  60. package/lib/exercises/derivation/derivative/thridDegreeDerivative.js +1 -0
  61. package/lib/exercises/exercise.d.ts +16 -16
  62. package/lib/exercises/exercise.js +7 -7
  63. package/lib/exercises/exercises.d.ts +1 -1
  64. package/lib/exercises/exercises.js +113 -113
  65. package/lib/exercises/geometry/cartesian/midpoint.d.ts +3 -3
  66. package/lib/exercises/geometry/cartesian/midpoint.js +29 -29
  67. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +3 -3
  68. package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +28 -28
  69. package/lib/exercises/geometry/vectors/scalarProductViaNorms.js +27 -27
  70. package/lib/exercises/powers/powersDivision.d.ts +7 -7
  71. package/lib/exercises/powers/powersDivision.js +44 -44
  72. package/lib/exercises/powers/powersOfTenToDecimal.d.ts +6 -6
  73. package/lib/exercises/powers/powersOfTenToDecimal.js +32 -32
  74. package/lib/exercises/powers/powersPower.d.ts +7 -7
  75. package/lib/exercises/powers/powersPower.js +43 -43
  76. package/lib/exercises/powers/powersProduct.d.ts +7 -7
  77. package/lib/exercises/powers/powersProduct.js +44 -44
  78. package/lib/exercises/powers/scientificToDecimal.d.ts +6 -6
  79. package/lib/exercises/powers/scientificToDecimal.js +37 -37
  80. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +3 -3
  81. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +34 -34
  82. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +3 -3
  83. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +33 -33
  84. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +3 -3
  85. package/lib/exercises/sequences/geometric/geometricFindReason.js +29 -29
  86. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +3 -3
  87. package/lib/exercises/sequences/geometric/geometricReasonUsage.js +28 -28
  88. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +7 -7
  89. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -28
  90. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +3 -3
  91. package/lib/exercises/squareRoots/simpifySquareRoot.js +27 -27
  92. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +3 -3
  93. package/lib/exercises/trigonometry/mainRemarkableValues.js +28 -28
  94. package/lib/exercises/trigonometry/remarkableValues.d.ts +3 -3
  95. package/lib/exercises/trigonometry/remarkableValues.js +28 -28
  96. package/lib/exercises/utils/getDistinctQuestions.d.ts +2 -2
  97. package/lib/exercises/utils/getDistinctQuestions.js +15 -15
  98. package/lib/geometry/point.js +27 -27
  99. package/lib/geometry/vector.js +31 -31
  100. package/lib/index.d.ts +3 -2
  101. package/lib/index.d.ts.map +1 -1
  102. package/lib/index.js +39 -6
  103. package/lib/math/geometry/point.d.ts +12 -12
  104. package/lib/math/geometry/point.js +27 -27
  105. package/lib/math/geometry/vector.d.ts +15 -15
  106. package/lib/math/geometry/vector.js +31 -31
  107. package/lib/math/numbers/decimals/decimal.d.ts +24 -24
  108. package/lib/math/numbers/decimals/decimal.js +140 -140
  109. package/lib/math/numbers/epsilon.d.ts +1 -1
  110. package/lib/math/numbers/epsilon.js +10 -10
  111. package/lib/math/numbers/integer/integer.d.ts +14 -14
  112. package/lib/math/numbers/integer/integer.js +68 -68
  113. package/lib/math/numbers/integer/power.d.ts +13 -13
  114. package/lib/math/numbers/integer/power.js +52 -52
  115. package/lib/math/numbers/nombre.d.ts +13 -13
  116. package/lib/math/numbers/nombre.js +10 -10
  117. package/lib/math/numbers/rationals/rational.d.ts +25 -25
  118. package/lib/math/numbers/rationals/rational.js +113 -113
  119. package/lib/math/numbers/reals/real.d.ts +9 -9
  120. package/lib/math/numbers/reals/real.js +16 -16
  121. package/lib/math/numbers/reals/squareRoot.d.ts +18 -18
  122. package/lib/math/numbers/reals/squareRoot.js +63 -63
  123. package/lib/math/polynomials/affine.d.ts +15 -15
  124. package/lib/math/polynomials/affine.js +42 -42
  125. package/lib/math/polynomials/polynomial.d.ts +25 -24
  126. package/lib/math/polynomials/polynomial.d.ts.map +1 -1
  127. package/lib/math/polynomials/polynomial.js +129 -125
  128. package/lib/math/sequences/arithmeticSequence.js +1 -1
  129. package/lib/math/sequences/geometricSequence.d.ts +3 -3
  130. package/lib/math/sequences/geometricSequence.js +8 -8
  131. package/lib/math/sequences/sequence.d.ts +22 -22
  132. package/lib/math/sequences/sequence.js +21 -21
  133. package/lib/math/sets/discreteSet.d.ts +10 -10
  134. package/lib/math/sets/discreteSet.js +28 -28
  135. package/lib/math/sets/emptySet.js +6 -6
  136. package/lib/math/sets/intervals/intervals.d.ts +26 -26
  137. package/lib/math/sets/intervals/intervals.js +104 -104
  138. package/lib/math/sets/mathSet.d.ts +7 -7
  139. package/lib/math/sets/mathSet.js +10 -10
  140. package/lib/math/sets/mathSetInterface.d.ts +5 -5
  141. package/lib/math/sets/mathSetInterface.js +2 -2
  142. package/lib/math/trigonometry/remarkableValue.d.ts +10 -10
  143. package/lib/math/trigonometry/remarkableValue.js +29 -29
  144. package/lib/math/trigonometry/remarkableValues.d.ts +2 -2
  145. package/lib/math/trigonometry/remarkableValues.js +51 -51
  146. package/lib/math/utils/arithmetic/coprimesOf.d.ts +1 -1
  147. package/lib/math/utils/arithmetic/coprimesOf.js +13 -13
  148. package/lib/math/utils/arithmetic/dividersOf.d.ts +1 -1
  149. package/lib/math/utils/arithmetic/dividersOf.js +12 -12
  150. package/lib/math/utils/arithmetic/gcd.d.ts +1 -1
  151. package/lib/math/utils/arithmetic/gcd.js +7 -7
  152. package/lib/math/utils/arithmetic/isSquare.d.ts +1 -1
  153. package/lib/math/utils/arithmetic/isSquare.js +7 -7
  154. package/lib/math/utils/arithmetic/lcd.d.ts +1 -1
  155. package/lib/math/utils/arithmetic/lcd.js +12 -12
  156. package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts +1 -1
  157. package/lib/math/utils/arithmetic/nonCoprimesOf.js +13 -13
  158. package/lib/math/utils/arithmetic/nonDividersOf.d.ts +1 -1
  159. package/lib/math/utils/arithmetic/nonDividersOf.js +14 -14
  160. package/lib/math/utils/arithmetic/primeFactors.d.ts +5 -5
  161. package/lib/math/utils/arithmetic/primeFactors.js +22 -22
  162. package/lib/math/utils/decimals/decimalPartLengthOf.d.ts +1 -1
  163. package/lib/math/utils/decimals/decimalPartLengthOf.js +14 -14
  164. package/lib/math/utils/random/randTupleInt.d.ts +13 -13
  165. package/lib/math/utils/random/randTupleInt.js +30 -30
  166. package/lib/math/utils/random/randint.d.ts +4 -4
  167. package/lib/math/utils/random/randint.js +18 -18
  168. package/lib/math/utils/round.d.ts +1 -1
  169. package/lib/math/utils/round.js +8 -8
  170. package/lib/mathutils/arithmetic/coprimesOf.js +13 -13
  171. package/lib/mathutils/arithmetic/dividersOf.js +12 -12
  172. package/lib/mathutils/arithmetic/gcd.js +7 -7
  173. package/lib/mathutils/arithmetic/isSquare.js +7 -7
  174. package/lib/mathutils/arithmetic/lcd.js +12 -12
  175. package/lib/mathutils/arithmetic/nonCoprimesOf.js +13 -13
  176. package/lib/mathutils/arithmetic/nonDividersOf.js +14 -14
  177. package/lib/mathutils/arithmetic/primeFactors.js +22 -22
  178. package/lib/mathutils/decimals/decimalPartLengthOf.js +14 -14
  179. package/lib/mathutils/random/randTupleInt.js +30 -30
  180. package/lib/mathutils/random/randint.js +18 -18
  181. package/lib/mathutils/round.js +8 -8
  182. package/lib/numbers/decimals/decimal.js +140 -140
  183. package/lib/numbers/epsilon.js +10 -10
  184. package/lib/numbers/integer/integer.js +68 -68
  185. package/lib/numbers/integer/power.js +52 -52
  186. package/lib/numbers/nombre.js +10 -10
  187. package/lib/numbers/rationals/rational.js +113 -113
  188. package/lib/numbers/reals/real.js +16 -16
  189. package/lib/numbers/reals/squareRoot.js +63 -63
  190. package/lib/polynomials/affine.js +42 -42
  191. package/lib/polynomials/polynomial.js +125 -125
  192. package/lib/server.d.ts +2 -0
  193. package/lib/server.d.ts.map +1 -0
  194. package/lib/server.js +33 -0
  195. package/lib/sets/discreteSet.js +28 -28
  196. package/lib/sets/emptySet.js +6 -6
  197. package/lib/sets/intervals/intervals.js +108 -104
  198. package/lib/sets/intervals/union.js +1 -1
  199. package/lib/sets/mathSet.js +10 -10
  200. package/lib/sets/mathSetInterface.js +2 -2
  201. package/lib/tree/nodes/functions/cosNode.d.ts +9 -9
  202. package/lib/tree/nodes/functions/cosNode.js +21 -21
  203. package/lib/tree/nodes/functions/functionNode.d.ts +14 -14
  204. package/lib/tree/nodes/functions/functionNode.js +20 -20
  205. package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -7
  206. package/lib/tree/nodes/functions/oppositeNode.js +26 -26
  207. package/lib/tree/nodes/functions/sinNode.js +1 -1
  208. package/lib/tree/nodes/functions/sqrtNode.d.ts +8 -8
  209. package/lib/tree/nodes/functions/sqrtNode.js +18 -18
  210. package/lib/tree/nodes/node.d.ts +12 -12
  211. package/lib/tree/nodes/node.js +11 -11
  212. package/lib/tree/nodes/numbers/constantNode.d.ts +9 -9
  213. package/lib/tree/nodes/numbers/constantNode.js +18 -18
  214. package/lib/tree/nodes/numbers/numberNode.d.ts +10 -10
  215. package/lib/tree/nodes/numbers/numberNode.js +19 -19
  216. package/lib/tree/nodes/numbers/piNode.d.ts +2 -2
  217. package/lib/tree/nodes/numbers/piNode.js +5 -5
  218. package/lib/tree/nodes/operators/addNode.d.ts +7 -7
  219. package/lib/tree/nodes/operators/addNode.js +19 -19
  220. package/lib/tree/nodes/operators/divideNode.d.ts +11 -11
  221. package/lib/tree/nodes/operators/divideNode.js +34 -34
  222. package/lib/tree/nodes/operators/equalNode.d.ts +7 -7
  223. package/lib/tree/nodes/operators/equalNode.js +16 -16
  224. package/lib/tree/nodes/operators/fractionNode.d.ts +11 -11
  225. package/lib/tree/nodes/operators/fractionNode.js +20 -20
  226. package/lib/tree/nodes/operators/multiplyNode.d.ts +7 -7
  227. package/lib/tree/nodes/operators/multiplyNode.js +43 -43
  228. package/lib/tree/nodes/operators/operatorNode.d.ts +21 -21
  229. package/lib/tree/nodes/operators/operatorNode.js +35 -35
  230. package/lib/tree/nodes/operators/powerNode.d.ts +7 -7
  231. package/lib/tree/nodes/operators/powerNode.js +33 -33
  232. package/lib/tree/nodes/operators/substractNode.d.ts +7 -7
  233. package/lib/tree/nodes/operators/substractNode.js +24 -24
  234. package/lib/tree/nodes/variables/variableNode.d.ts +8 -8
  235. package/lib/tree/nodes/variables/variableNode.js +19 -19
  236. package/lib/tree/parsers/derivateParser.js +62 -62
  237. package/lib/tree/parsers/latexParser.js +110 -110
  238. package/lib/tree/parsers/simplify.d.ts +2 -2
  239. package/lib/tree/parsers/simplify.js +52 -52
  240. package/lib/utils/arrayEqual.d.ts +1 -1
  241. package/lib/utils/arrayEqual.js +13 -13
  242. package/lib/utils/coin.js +7 -7
  243. package/lib/utils/coinFlip.d.ts +1 -1
  244. package/lib/utils/coinFlip.js +7 -7
  245. package/lib/utils/random.d.ts +1 -1
  246. package/lib/utils/random.js +7 -7
  247. package/lib/utils/shuffle.d.ts +1 -1
  248. package/lib/utils/shuffle.js +15 -15
  249. package/package.json +50 -45
  250. package/lib/exercises/calculLitteral/factorisation/factoIdRmq.d.ts +0 -7
  251. package/lib/exercises/calculLitteral/factorisation/factoIdRmq.d.ts.map +0 -1
  252. package/lib/exercises/calculLitteral/factorisation/factoIdRmq.js +0 -38
  253. package/lib/trigonometry/remarkableValue.js +0 -29
  254. package/lib/trigonometry/remarkableValues.js +0 -51
@@ -1,32 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFactoType1Question = exports.factoIdRmq1 = void 0;
4
- const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
- const integer_1 = require("../../../math/numbers/integer/integer");
6
- const affine_1 = require("../../../math/polynomials/affine");
7
- const discreteSet_1 = require("../../../math/sets/discreteSet");
8
- const intervals_1 = require("../../../math/sets/intervals/intervals");
9
- const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
- const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
11
- exports.factoIdRmq1 = {
12
- id: 'factoIdRmq1',
13
- connector: '=',
14
- instruction: 'Factoriser :',
15
- isSingleStep: false,
16
- label: 'Factorisation du type $a^2 + 2ab + b^2$',
17
- levels: ['3', '2'],
18
- section: 'Calcul littéral',
19
- generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
20
- };
21
- function getFactoType1Question() {
22
- const interval = new intervals_1.Interval('[[1; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
23
- const affine = affine_1.AffineConstructor.random(interval, interval);
24
- const statementTree = affine.multiply(affine).toTree();
25
- const answerTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
26
- const question = {
27
- startStatement: statementTree.toTex(),
28
- answer: answerTree.toTex(),
29
- };
30
- return question;
31
- }
32
- exports.getFactoType1Question = getFactoType1Question;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFactoType1Question = exports.factoIdRmq1 = void 0;
4
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
+ const integer_1 = require("../../../math/numbers/integer/integer");
6
+ const affine_1 = require("../../../math/polynomials/affine");
7
+ const discreteSet_1 = require("../../../math/sets/discreteSet");
8
+ const intervals_1 = require("../../../math/sets/intervals/intervals");
9
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
+ const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
11
+ exports.factoIdRmq1 = {
12
+ id: 'factoIdRmq1',
13
+ connector: '=',
14
+ instruction: 'Factoriser :',
15
+ isSingleStep: false,
16
+ label: 'Factorisation du type $a^2 + 2ab + b^2$',
17
+ levels: ['3', '2'],
18
+ section: 'Calcul littéral',
19
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
20
+ };
21
+ function getFactoType1Question() {
22
+ const interval = new intervals_1.Interval('[[1; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
23
+ const affine = affine_1.AffineConstructor.random(interval, interval);
24
+ const statementTree = affine.multiply(affine).toTree();
25
+ const answerTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
26
+ const question = {
27
+ startStatement: statementTree.toTex(),
28
+ answer: answerTree.toTex(),
29
+ };
30
+ return question;
31
+ }
32
+ exports.getFactoType1Question = getFactoType1Question;
@@ -1,4 +1,4 @@
1
- import { Exercise, Question } from '../../../exercises/exercise';
2
- export declare const factoIdRmq2: Exercise;
3
- export declare function getFactoType1Question(): Question;
1
+ import { Exercise, Question } from '../../../exercises/exercise';
2
+ export declare const factoIdRmq2: Exercise;
3
+ export declare function getFactoType1Question(): Question;
4
4
  //# sourceMappingURL=factoIdRmq2.d.ts.map
@@ -1,33 +1,33 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFactoType1Question = exports.factoIdRmq2 = void 0;
4
- const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
- const integer_1 = require("../../../math/numbers/integer/integer");
6
- const affine_1 = require("../../../math/polynomials/affine");
7
- const discreteSet_1 = require("../../../math/sets/discreteSet");
8
- const intervals_1 = require("../../../math/sets/intervals/intervals");
9
- const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
- const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
11
- exports.factoIdRmq2 = {
12
- id: 'factoIdRmq2',
13
- connector: '=',
14
- instruction: 'Factoriser :',
15
- isSingleStep: false,
16
- label: 'Factorisation du type $a^2 - 2ab + b^2$',
17
- levels: ['3', '2'],
18
- section: 'Calcul littéral',
19
- generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
20
- };
21
- function getFactoType1Question() {
22
- const intervalA = new intervals_1.Interval('[[0; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
23
- const intervalB = new intervals_1.Interval('[[-10; 0]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
24
- const affine = affine_1.AffineConstructor.random(intervalA, intervalB);
25
- const statementTree = affine.multiply(affine).toTree();
26
- const answerTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
27
- const question = {
28
- startStatement: statementTree.toTex(),
29
- answer: answerTree.toTex(),
30
- };
31
- return question;
32
- }
33
- exports.getFactoType1Question = getFactoType1Question;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFactoType1Question = exports.factoIdRmq2 = void 0;
4
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
+ const integer_1 = require("../../../math/numbers/integer/integer");
6
+ const affine_1 = require("../../../math/polynomials/affine");
7
+ const discreteSet_1 = require("../../../math/sets/discreteSet");
8
+ const intervals_1 = require("../../../math/sets/intervals/intervals");
9
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
10
+ const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
11
+ exports.factoIdRmq2 = {
12
+ id: 'factoIdRmq2',
13
+ connector: '=',
14
+ instruction: 'Factoriser :',
15
+ isSingleStep: false,
16
+ label: 'Factorisation du type $a^2 - 2ab + b^2$',
17
+ levels: ['3', '2'],
18
+ section: 'Calcul littéral',
19
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
20
+ };
21
+ function getFactoType1Question() {
22
+ const intervalA = new intervals_1.Interval('[[0; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
23
+ const intervalB = new intervals_1.Interval('[[-10; 0]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
24
+ const affine = affine_1.AffineConstructor.random(intervalA, intervalB);
25
+ const statementTree = affine.multiply(affine).toTree();
26
+ const answerTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
27
+ const question = {
28
+ startStatement: statementTree.toTex(),
29
+ answer: answerTree.toTex(),
30
+ };
31
+ return question;
32
+ }
33
+ exports.getFactoType1Question = getFactoType1Question;
@@ -1,4 +1,4 @@
1
- import { Exercise, Question } from '../../../exercises/exercise';
2
- export declare const factoIdRmq3: Exercise;
3
- export declare function getFactoType1Question(): Question;
1
+ import { Exercise, Question } from '../../../exercises/exercise';
2
+ export declare const factoIdRmq3: Exercise;
3
+ export declare function getFactoType1Question(): Question;
4
4
  //# sourceMappingURL=factoIdRmq3.d.ts.map
@@ -1,32 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFactoType1Question = exports.factoIdRmq3 = void 0;
4
- const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
- const integer_1 = require("../../../math/numbers/integer/integer");
6
- const affine_1 = require("../../../math/polynomials/affine");
7
- const discreteSet_1 = require("../../../math/sets/discreteSet");
8
- const intervals_1 = require("../../../math/sets/intervals/intervals");
9
- const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
10
- exports.factoIdRmq3 = {
11
- id: 'factoIdRmq3',
12
- connector: '=',
13
- instruction: 'Factoriser :',
14
- isSingleStep: false,
15
- label: 'Factorisation du type $a^2 - b^2$',
16
- levels: ['3', '2'],
17
- section: 'Calcul littéral',
18
- generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
19
- };
20
- function getFactoType1Question() {
21
- const interval = new intervals_1.Interval('[[-10; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
22
- const affine = affine_1.AffineConstructor.random(interval, interval);
23
- const affine2 = new affine_1.Affine(affine.a, -affine.b);
24
- const statementTree = affine.multiply(affine2).toTree();
25
- const answerTree = new multiplyNode_1.MultiplyNode(affine.toTree(), affine2.toTree());
26
- const question = {
27
- startStatement: statementTree.toTex(),
28
- answer: answerTree.toTex(),
29
- };
30
- return question;
31
- }
32
- exports.getFactoType1Question = getFactoType1Question;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFactoType1Question = exports.factoIdRmq3 = void 0;
4
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
+ const integer_1 = require("../../../math/numbers/integer/integer");
6
+ const affine_1 = require("../../../math/polynomials/affine");
7
+ const discreteSet_1 = require("../../../math/sets/discreteSet");
8
+ const intervals_1 = require("../../../math/sets/intervals/intervals");
9
+ const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
10
+ exports.factoIdRmq3 = {
11
+ id: 'factoIdRmq3',
12
+ connector: '=',
13
+ instruction: 'Factoriser :',
14
+ isSingleStep: false,
15
+ label: 'Factorisation du type $a^2 - b^2$',
16
+ levels: ['3', '2'],
17
+ section: 'Calcul littéral',
18
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
19
+ };
20
+ function getFactoType1Question() {
21
+ const interval = new intervals_1.Interval('[[-10; 10]]').difference(new discreteSet_1.DiscreteSet([new integer_1.Integer(0)]));
22
+ const affine = affine_1.AffineConstructor.random(interval, interval);
23
+ const affine2 = new affine_1.Affine(affine.a, -affine.b);
24
+ const statementTree = affine.multiply(affine2).toTree();
25
+ const answerTree = new multiplyNode_1.MultiplyNode(affine.toTree(), affine2.toTree());
26
+ const question = {
27
+ startStatement: statementTree.toTex(),
28
+ answer: answerTree.toTex(),
29
+ };
30
+ return question;
31
+ }
32
+ exports.getFactoType1Question = getFactoType1Question;
@@ -1,7 +1,7 @@
1
- /**
2
- * type (ax+b)(cx+d) ± (ax+b)(ex+f)
3
- */
4
- import { Exercise, Question } from '../../../exercises/exercise';
5
- export declare const factoType1Exercise: Exercise;
6
- export declare function getFactoType1Question(): Question;
1
+ /**
2
+ * type (ax+b)(cx+d) ± (ax+b)(ex+f)
3
+ */
4
+ import { Exercise, Question } from '../../../exercises/exercise';
5
+ export declare const factoType1Exercise: Exercise;
6
+ export declare function getFactoType1Question(): Question;
7
7
  //# sourceMappingURL=factoType1Exercise.d.ts.map
@@ -1,38 +1,38 @@
1
- "use strict";
2
- /**
3
- * type (ax+b)(cx+d) ± (ax+b)(ex+f)
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getFactoType1Question = exports.factoType1Exercise = void 0;
7
- const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
8
- const affine_1 = require("../../../math/polynomials/affine");
9
- const addNode_1 = require("../../../tree/nodes/operators/addNode");
10
- const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
11
- const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
12
- const random_1 = require("../../../utils/random");
13
- const shuffle_1 = require("../../../utils/shuffle");
14
- exports.factoType1Exercise = {
15
- id: 'facto1',
16
- connector: '=',
17
- instruction: 'Factoriser :',
18
- isSingleStep: false,
19
- label: 'Factorisation du type $(ax+b)(cx+d) \\pm (ax+b)(ex+f)$',
20
- levels: ['3', '2'],
21
- section: 'Calcul littéral',
22
- generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
23
- };
24
- function getFactoType1Question() {
25
- const affines = affine_1.AffineConstructor.differentRandoms(3);
26
- const permut = [(0, shuffle_1.shuffle)([affines[0], affines[1]]), (0, shuffle_1.shuffle)([affines[0], affines[2]])];
27
- const operation = (0, random_1.random)(['add', 'substract']);
28
- const statementTree = operation === 'add'
29
- ? new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(permut[0][0].toTree(), permut[0][1].toTree()), new multiplyNode_1.MultiplyNode(permut[1][0].toTree(), permut[1][1].toTree()))
30
- : new substractNode_1.SubstractNode(new multiplyNode_1.MultiplyNode(permut[0][0].toTree(), permut[0][1].toTree()), new multiplyNode_1.MultiplyNode(permut[1][0].toTree(), permut[1][1].toTree()));
31
- const answerTree = new multiplyNode_1.MultiplyNode(affines[0].toTree(), affines[1].add(operation === 'add' ? affines[2] : affines[2].opposite()).toTree());
32
- const question = {
33
- startStatement: statementTree.toTex(),
34
- answer: answerTree.toTex(),
35
- };
36
- return question;
37
- }
38
- exports.getFactoType1Question = getFactoType1Question;
1
+ "use strict";
2
+ /**
3
+ * type (ax+b)(cx+d) ± (ax+b)(ex+f)
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getFactoType1Question = exports.factoType1Exercise = void 0;
7
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
8
+ const affine_1 = require("../../../math/polynomials/affine");
9
+ const addNode_1 = require("../../../tree/nodes/operators/addNode");
10
+ const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
11
+ const substractNode_1 = require("../../../tree/nodes/operators/substractNode");
12
+ const random_1 = require("../../../utils/random");
13
+ const shuffle_1 = require("../../../utils/shuffle");
14
+ exports.factoType1Exercise = {
15
+ id: 'facto1',
16
+ connector: '=',
17
+ instruction: 'Factoriser :',
18
+ isSingleStep: false,
19
+ label: 'Factorisation du type $(ax+b)(cx+d) \\pm (ax+b)(ex+f)$',
20
+ levels: ['3', '2'],
21
+ section: 'Calcul littéral',
22
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactoType1Question, nb),
23
+ };
24
+ function getFactoType1Question() {
25
+ const affines = affine_1.AffineConstructor.differentRandoms(3);
26
+ const permut = [(0, shuffle_1.shuffle)([affines[0], affines[1]]), (0, shuffle_1.shuffle)([affines[0], affines[2]])];
27
+ const operation = (0, random_1.random)(['add', 'substract']);
28
+ const statementTree = operation === 'add'
29
+ ? new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(permut[0][0].toTree(), permut[0][1].toTree()), new multiplyNode_1.MultiplyNode(permut[1][0].toTree(), permut[1][1].toTree()))
30
+ : new substractNode_1.SubstractNode(new multiplyNode_1.MultiplyNode(permut[0][0].toTree(), permut[0][1].toTree()), new multiplyNode_1.MultiplyNode(permut[1][0].toTree(), permut[1][1].toTree()));
31
+ const answerTree = new multiplyNode_1.MultiplyNode(affines[0].toTree(), affines[1].add(operation === 'add' ? affines[2] : affines[2].opposite()).toTree());
32
+ const question = {
33
+ startStatement: statementTree.toTex(),
34
+ answer: answerTree.toTex(),
35
+ };
36
+ return question;
37
+ }
38
+ exports.getFactoType1Question = getFactoType1Question;
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../../../exercises/exercise';
2
+ export declare const affineDerivative: Exercise;
3
+ export declare function getAffineDerivativeQuestion(): Question;
4
+ //# sourceMappingURL=affineDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"affineDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/affineDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,eAAO,MAAM,gBAAgB,EAAE,QAS9B,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,QAAQ,CAUtD"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAffineDerivativeQuestion = exports.affineDerivative = void 0;
4
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
+ const affine_1 = require("../../../math/polynomials/affine");
6
+ const randint_1 = require("../../../math/utils/random/randint");
7
+ exports.affineDerivative = {
8
+ id: 'affineDerivative',
9
+ connector: '=',
10
+ instruction: '',
11
+ isSingleStep: false,
12
+ label: "Calculer la dérivée d'une fonction affine",
13
+ levels: ['1, 0'],
14
+ section: 'Dérivation',
15
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAffineDerivativeQuestion, nb),
16
+ };
17
+ function getAffineDerivativeQuestion() {
18
+ const a = (0, randint_1.randint)(-20, 20, [0]);
19
+ const b = (0, randint_1.randint)(-20, 20);
20
+ const affine = new affine_1.Affine(a, b);
21
+ return {
22
+ instruction: `Soit $f(x) = ${affine.toTex()}$. Déterminer la fonction dérivée $f'$ de $f$.`,
23
+ startStatement: `f'(x)`,
24
+ answer: a.toString(),
25
+ };
26
+ }
27
+ exports.getAffineDerivativeQuestion = getAffineDerivativeQuestion;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=secondDegreeDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secondDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/secondDegreeDerivative.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // import { Exercise, Question } from '../../../exercises/exercise';
3
+ // import { getDistinctQuestions } from '../../../exercises/utils/getDistinctQuestions';
4
+ // import { Vector } from '../../../math/geometry/vector';
5
+ // import { Affine, AffineConstructor } from '../../../math/polynomials/affine';
6
+ // import { Polynomial } from '../../../math/polynomials/polynomial';
7
+ // import { randint } from '../../../math/utils/random/randint';
8
+ // import { distinctRandTupleInt } from '../../../math/utils/random/randTupleInt';
9
+ // import { NumberNode } from '../../../tree/nodes/numbers/numberNode';
10
+ // export const secondDegreeDerivative: Exercise = {
11
+ // id: 'secondDegreeDerivative',
12
+ // connector: '=',
13
+ // instruction: '',
14
+ // isSingleStep: false,
15
+ // label: "Calculer la dérivée d'une fonction du second degré",
16
+ // levels: ['1, 0'],
17
+ // section: 'Dérivation',
18
+ // generator: (nb: number) => getDistinctQuestions(getSecondDegreeDerivativeQuestion, nb),
19
+ // };
20
+ // export function getSecondDegreeDerivativeQuestion(): Question {
21
+ // const polynom = new Polynomial([randint(-20, 20, [0]), randint(-20, 20), randint(-20, 20)]);
22
+ // const answer = polynom.derivate();
23
+ // return {
24
+ // instruction: `Soit $f(x) = ${polynom.toTex()}$. Déterminer la fonction dérivée $f'$ de $f$.`,
25
+ // startStatement: `$f'(x)$`,
26
+ // answer: a.toString(),
27
+ // };
28
+ // }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=thridDegreeDerivative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thridDegreeDerivative.d.ts","sourceRoot":"","sources":["../../../../src/exercises/derivation/derivative/thridDegreeDerivative.ts"],"names":[],"mappings":""}
@@ -1,17 +1,17 @@
1
- export type GeneratorOptions = {};
2
- export interface Question {
3
- instruction?: string;
4
- startStatement?: string;
5
- answer: string;
6
- }
7
- export interface Exercise {
8
- id: string;
9
- instruction: string;
10
- isSingleStep: boolean;
11
- label: string;
12
- section: string;
13
- levels: string[];
14
- connector: string;
15
- generator(nb: number, options?: GeneratorOptions): Question[];
16
- }
1
+ export type GeneratorOptions = {};
2
+ export interface Question {
3
+ instruction?: string;
4
+ startStatement?: string;
5
+ answer: string;
6
+ }
7
+ export interface Exercise {
8
+ id: string;
9
+ instruction: string;
10
+ isSingleStep: boolean;
11
+ label: string;
12
+ section: string;
13
+ levels: string[];
14
+ connector: string;
15
+ generator(nb: number, options?: GeneratorOptions): Question[];
16
+ }
17
17
  //# sourceMappingURL=exercise.d.ts.map
@@ -1,7 +1,7 @@
1
- "use strict";
2
- // export enum Connector {
3
- // equal = "=",
4
- // equiv = "\\iff",
5
- // implies = "\\Rightarrow",
6
- // }
7
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ // export enum Connector {
3
+ // equal = "=",
4
+ // equiv = "\\iff",
5
+ // implies = "\\Rightarrow",
6
+ // }
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- export declare const exercises: import("./exercise").Exercise[];
1
+ export declare const exercises: import("./exercise").Exercise[];
2
2
  //# sourceMappingURL=exercises.d.ts.map