math-exercises 1.3.6 → 1.3.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 (254) hide show
  1. package/README.md +8 -6
  2. package/lib/exercises/calcul/addAndSub.d.ts +7 -0
  3. package/lib/exercises/calcul/addAndSub.d.ts.map +1 -0
  4. package/lib/exercises/calcul/addAndSub.js +3 -3
  5. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +4 -0
  6. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -0
  7. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +6 -6
  8. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +4 -0
  9. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -0
  10. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +5 -5
  11. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +4 -0
  12. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -0
  13. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +5 -5
  14. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +4 -0
  15. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -0
  16. package/lib/exercises/calcul/fractions/fractionsDivision.js +3 -3
  17. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +4 -0
  18. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -0
  19. package/lib/exercises/calcul/fractions/fractionsProduct.js +3 -3
  20. package/lib/exercises/calcul/fractions/fractionsSum.d.ts +4 -0
  21. package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -0
  22. package/lib/exercises/calcul/fractions/fractionsSum.js +3 -3
  23. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +4 -0
  24. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -0
  25. package/lib/exercises/calcul/fractions/simplifyFraction.js +2 -2
  26. package/lib/exercises/calcul/operations/operationsPriorities.d.ts +11 -0
  27. package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -0
  28. package/lib/exercises/calcul/operations/operationsPriorities.js +7 -7
  29. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +1 -0
  30. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -0
  31. package/lib/exercises/calcul/rounding/rounding.d.ts +20 -0
  32. package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -0
  33. package/lib/exercises/calcul/rounding/rounding.js +3 -3
  34. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +4 -0
  35. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts.map +1 -0
  36. package/lib/exercises/calculLitteral/distributivity/allIdentities.js +2 -2
  37. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +4 -0
  38. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -0
  39. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +6 -6
  40. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +4 -0
  41. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -0
  42. package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +7 -7
  43. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +4 -0
  44. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -0
  45. package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +7 -7
  46. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +4 -0
  47. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -0
  48. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +7 -7
  49. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +4 -0
  50. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -0
  51. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +6 -6
  52. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +7 -0
  53. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -0
  54. package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +6 -6
  55. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +7 -0
  56. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -0
  57. package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +8 -8
  58. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +7 -0
  59. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -0
  60. package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +8 -8
  61. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +7 -0
  62. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -0
  63. package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +8 -8
  64. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +7 -0
  65. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -0
  66. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +7 -7
  67. package/lib/exercises/exercise.d.ts +16 -0
  68. package/lib/exercises/exercise.d.ts.map +1 -0
  69. package/lib/exercises/exercises.d.ts +2 -0
  70. package/lib/exercises/exercises.d.ts.map +1 -0
  71. package/lib/exercises/exercises.js +1 -2
  72. package/lib/exercises/geometry/cartesian/midpoint.d.ts +4 -0
  73. package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -0
  74. package/lib/exercises/geometry/cartesian/midpoint.js +4 -4
  75. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +4 -0
  76. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -0
  77. package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +4 -4
  78. package/lib/exercises/geometry/vectors/scalarProductViaNorms.d.ts +1 -0
  79. package/lib/exercises/geometry/vectors/scalarProductViaNorms.d.ts.map +1 -0
  80. package/lib/exercises/powers/powersDivision.d.ts +8 -0
  81. package/lib/exercises/powers/powersDivision.d.ts.map +1 -0
  82. package/lib/exercises/powers/powersDivision.js +5 -5
  83. package/lib/exercises/powers/powersOfTenToDecimal.d.ts +7 -0
  84. package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -0
  85. package/lib/exercises/powers/powersOfTenToDecimal.js +4 -4
  86. package/lib/exercises/powers/powersPower.d.ts +8 -0
  87. package/lib/exercises/powers/powersPower.d.ts.map +1 -0
  88. package/lib/exercises/powers/powersPower.js +4 -4
  89. package/lib/exercises/powers/powersProduct.d.ts +8 -0
  90. package/lib/exercises/powers/powersProduct.d.ts.map +1 -0
  91. package/lib/exercises/powers/powersProduct.js +5 -5
  92. package/lib/exercises/powers/scientificToDecimal.d.ts +7 -0
  93. package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -0
  94. package/lib/exercises/powers/scientificToDecimal.js +6 -6
  95. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +4 -0
  96. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -0
  97. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +33 -23
  98. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +4 -0
  99. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -0
  100. package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +33 -0
  101. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +4 -0
  102. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -0
  103. package/lib/exercises/sequences/geometric/geometricFindReason.js +28 -22
  104. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +4 -0
  105. package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts.map +1 -0
  106. package/lib/exercises/sequences/geometric/geometricReasonUsage.js +28 -0
  107. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +4 -0
  108. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -0
  109. package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -0
  110. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +4 -0
  111. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -0
  112. package/lib/exercises/squareRoots/simpifySquareRoot.js +1 -1
  113. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +4 -0
  114. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -0
  115. package/lib/exercises/trigonometry/mainRemarkableValues.js +2 -2
  116. package/lib/exercises/trigonometry/remarkableValues.d.ts +4 -0
  117. package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -0
  118. package/lib/exercises/trigonometry/remarkableValues.js +2 -2
  119. package/lib/exercises/utils/getDistinctQuestions.d.ts +3 -0
  120. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -0
  121. package/lib/index.d.ts +3 -0
  122. package/lib/index.d.ts.map +1 -0
  123. package/lib/index.js +19 -4
  124. package/lib/math/geometry/point.d.ts +13 -0
  125. package/lib/math/geometry/point.d.ts.map +1 -0
  126. package/lib/math/geometry/point.js +4 -4
  127. package/lib/math/geometry/vector.d.ts +16 -0
  128. package/lib/math/geometry/vector.d.ts.map +1 -0
  129. package/lib/math/geometry/vector.js +4 -4
  130. package/lib/math/numbers/decimals/decimal.d.ts +25 -0
  131. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -0
  132. package/lib/math/numbers/decimals/decimal.js +2 -2
  133. package/lib/math/numbers/epsilon.d.ts +2 -0
  134. package/lib/math/numbers/epsilon.d.ts.map +1 -0
  135. package/lib/math/numbers/integer/integer.d.ts +15 -0
  136. package/lib/math/numbers/integer/integer.d.ts.map +1 -0
  137. package/lib/math/numbers/integer/integer.js +2 -2
  138. package/lib/math/numbers/integer/power.d.ts +14 -0
  139. package/lib/math/numbers/integer/power.d.ts.map +1 -0
  140. package/lib/math/numbers/integer/power.js +2 -2
  141. package/lib/math/numbers/nombre.d.ts +14 -0
  142. package/lib/math/numbers/nombre.d.ts.map +1 -0
  143. package/lib/math/numbers/rationals/rational.d.ts +26 -0
  144. package/lib/math/numbers/rationals/rational.d.ts.map +1 -0
  145. package/lib/math/numbers/rationals/rational.js +8 -8
  146. package/lib/math/numbers/reals/real.d.ts +10 -0
  147. package/lib/math/numbers/reals/real.d.ts.map +1 -0
  148. package/lib/math/numbers/reals/real.js +1 -1
  149. package/lib/math/numbers/reals/squareRoot.d.ts +19 -0
  150. package/lib/math/numbers/reals/squareRoot.d.ts.map +1 -0
  151. package/lib/math/numbers/reals/squareRoot.js +6 -6
  152. package/lib/math/polynomials/affine.d.ts +16 -0
  153. package/lib/math/polynomials/affine.d.ts.map +1 -0
  154. package/lib/math/polynomials/polynomial.d.ts +25 -0
  155. package/lib/math/polynomials/polynomial.d.ts.map +1 -0
  156. package/lib/math/sequences/arithmeticSequence.d.ts +1 -0
  157. package/lib/math/sequences/arithmeticSequence.d.ts.map +1 -0
  158. package/lib/math/sequences/geometricSequence.d.ts +4 -0
  159. package/lib/math/sequences/geometricSequence.d.ts.map +1 -0
  160. package/lib/math/sequences/sequence.d.ts +23 -0
  161. package/lib/math/sequences/sequence.d.ts.map +1 -0
  162. package/lib/math/sequences/sequence.js +7 -2
  163. package/lib/math/sets/discreteSet.d.ts +11 -0
  164. package/lib/math/sets/discreteSet.d.ts.map +1 -0
  165. package/lib/math/sets/discreteSet.js +1 -1
  166. package/lib/math/sets/emptySet.d.ts +1 -0
  167. package/lib/math/sets/emptySet.d.ts.map +1 -0
  168. package/lib/math/sets/intervals/intervals.d.ts +27 -0
  169. package/lib/math/sets/intervals/intervals.d.ts.map +1 -0
  170. package/lib/math/sets/intervals/intervals.js +5 -5
  171. package/lib/math/sets/mathSet.d.ts +8 -0
  172. package/lib/math/sets/mathSet.d.ts.map +1 -0
  173. package/lib/math/sets/mathSetInterface.d.ts +6 -0
  174. package/lib/math/sets/mathSetInterface.d.ts.map +1 -0
  175. package/lib/math/trigonometry/remarkableValue.d.ts +11 -0
  176. package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -0
  177. package/lib/math/trigonometry/remarkableValue.js +6 -6
  178. package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
  179. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -0
  180. package/lib/math/trigonometry/remarkableValues.js +6 -6
  181. package/lib/math/utils/arithmetic/coprimesOf.d.ts +2 -0
  182. package/lib/math/utils/arithmetic/coprimesOf.d.ts.map +1 -0
  183. package/lib/math/utils/arithmetic/dividersOf.d.ts +2 -0
  184. package/lib/math/utils/arithmetic/dividersOf.d.ts.map +1 -0
  185. package/lib/math/utils/arithmetic/gcd.d.ts +2 -0
  186. package/lib/math/utils/arithmetic/gcd.d.ts.map +1 -0
  187. package/lib/math/utils/arithmetic/isSquare.d.ts +2 -0
  188. package/lib/math/utils/arithmetic/isSquare.d.ts.map +1 -0
  189. package/lib/math/utils/arithmetic/lcd.d.ts +2 -0
  190. package/lib/math/utils/arithmetic/lcd.d.ts.map +1 -0
  191. package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts +2 -0
  192. package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts.map +1 -0
  193. package/lib/math/utils/arithmetic/nonDividersOf.d.ts +2 -0
  194. package/lib/math/utils/arithmetic/nonDividersOf.d.ts.map +1 -0
  195. package/lib/math/utils/arithmetic/primeFactors.d.ts +6 -0
  196. package/lib/math/utils/arithmetic/primeFactors.d.ts.map +1 -0
  197. package/lib/math/utils/decimals/decimalPartLengthOf.d.ts +2 -0
  198. package/lib/math/utils/decimals/decimalPartLengthOf.d.ts.map +1 -0
  199. package/lib/math/utils/random/randTupleInt.d.ts +14 -0
  200. package/lib/math/utils/random/randTupleInt.d.ts.map +1 -0
  201. package/lib/math/utils/random/randTupleInt.js +1 -1
  202. package/lib/math/utils/random/randint.d.ts +5 -0
  203. package/lib/math/utils/random/randint.d.ts.map +1 -0
  204. package/lib/math/utils/round.d.ts +2 -0
  205. package/lib/math/utils/round.d.ts.map +1 -0
  206. package/lib/tree/nodes/functions/cosNode.d.ts +10 -0
  207. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -0
  208. package/lib/tree/nodes/functions/functionNode.d.ts +15 -0
  209. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -0
  210. package/lib/tree/nodes/functions/oppositeNode.d.ts +8 -0
  211. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -0
  212. package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
  213. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -0
  214. package/lib/tree/nodes/functions/sqrtNode.d.ts +9 -0
  215. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -0
  216. package/lib/tree/nodes/node.d.ts +13 -0
  217. package/lib/tree/nodes/node.d.ts.map +1 -0
  218. package/lib/tree/nodes/numbers/constantNode.d.ts +10 -0
  219. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -0
  220. package/lib/tree/nodes/numbers/numberNode.d.ts +11 -0
  221. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -0
  222. package/lib/tree/nodes/numbers/piNode.d.ts +3 -0
  223. package/lib/tree/nodes/numbers/piNode.d.ts.map +1 -0
  224. package/lib/tree/nodes/operators/addNode.d.ts +8 -0
  225. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -0
  226. package/lib/tree/nodes/operators/divideNode.d.ts +12 -0
  227. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -0
  228. package/lib/tree/nodes/operators/equalNode.d.ts +8 -0
  229. package/lib/tree/nodes/operators/equalNode.d.ts.map +1 -0
  230. package/lib/tree/nodes/operators/fractionNode.d.ts +12 -0
  231. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -0
  232. package/lib/tree/nodes/operators/multiplyNode.d.ts +8 -0
  233. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -0
  234. package/lib/tree/nodes/operators/operatorNode.d.ts +22 -0
  235. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -0
  236. package/lib/tree/nodes/operators/powerNode.d.ts +8 -0
  237. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -0
  238. package/lib/tree/nodes/operators/substractNode.d.ts +8 -0
  239. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -0
  240. package/lib/tree/nodes/variables/variableNode.d.ts +9 -0
  241. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -0
  242. package/lib/tree/parsers/derivateParser.d.ts +1 -0
  243. package/lib/tree/parsers/derivateParser.d.ts.map +1 -0
  244. package/lib/tree/parsers/simplify.d.ts +3 -0
  245. package/lib/tree/parsers/simplify.d.ts.map +1 -0
  246. package/lib/utils/arrayEqual.d.ts +2 -0
  247. package/lib/utils/arrayEqual.d.ts.map +1 -0
  248. package/lib/utils/coinFlip.d.ts +2 -0
  249. package/lib/utils/coinFlip.d.ts.map +1 -0
  250. package/lib/utils/random.d.ts +2 -0
  251. package/lib/utils/random.d.ts.map +1 -0
  252. package/lib/utils/shuffle.d.ts +2 -0
  253. package/lib/utils/shuffle.d.ts.map +1 -0
  254. package/package.json +6 -8
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGeometricRecurrenceFormulaUsage = exports.geometricRecurrenceFormulaUsage = void 0;
4
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
5
+ const randint_1 = require("../../../math/utils/random/randint");
6
+ exports.geometricRecurrenceFormulaUsage = {
7
+ id: 'geometricRecurrenceFormulaUsage',
8
+ connector: '=',
9
+ instruction: '',
10
+ label: "Utiliser la formule de récurrence d'une suite géométrique",
11
+ levels: ['1', '0'],
12
+ isSingleStep: false,
13
+ section: 'Suites',
14
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricRecurrenceFormulaUsage, nb),
15
+ };
16
+ function getGeometricRecurrenceFormulaUsage() {
17
+ const firstRank = (0, randint_1.randint)(1, 20);
18
+ const firstValue = (0, randint_1.randint)(1, 10);
19
+ const reason = (0, randint_1.randint)(2, 10);
20
+ const askedRank = firstRank + 1;
21
+ const question = {
22
+ instruction: `$(u_n)$ est une suite définie par $u_{n+1} = ${reason}\\times u_n$ et $u_{${firstRank}} = ${firstValue}. Calculer $u_{${askedRank}}`,
23
+ startStatement: `u_{${askedRank}}`,
24
+ answer: (firstValue * reason).toString(),
25
+ };
26
+ return question;
27
+ }
28
+ exports.getGeometricRecurrenceFormulaUsage = getGeometricRecurrenceFormulaUsage;
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../exercise';
2
+ export declare const simplifySquareRoot: Exercise;
3
+ export declare function getSimplifySquareRoot(): Question;
4
+ //# sourceMappingURL=simpifySquareRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpifySquareRoot.d.ts","sourceRoot":"","sources":["../../../src/exercises/squareRoots/simpifySquareRoot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,kBAAkB,EAAE,QAShC,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,QAAQ,CAUhD"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSimplifySquareRoot = exports.simplifySquareRoot = void 0;
4
- const squareRoot_1 = require("#root/math/numbers/reals/squareRoot");
4
+ const squareRoot_1 = require("../../math/numbers/reals/squareRoot");
5
5
  const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
6
6
  exports.simplifySquareRoot = {
7
7
  id: 'simplifySqrt',
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../exercise';
2
+ export declare const mainRemarkableValuesExercise: Exercise;
3
+ export declare function getMainRemarkableValues(): Question;
4
+ //# sourceMappingURL=mainRemarkableValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mainRemarkableValues.d.ts","sourceRoot":"","sources":["../../../src/exercises/trigonometry/mainRemarkableValues.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,4BAA4B,EAAE,QAS1C,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,CAYlD"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getMainRemarkableValues = exports.mainRemarkableValuesExercise = void 0;
4
- const remarkableValue_1 = require("#root/math/trigonometry/remarkableValue");
5
- const coinFlip_1 = require("#root/utils/coinFlip");
4
+ const remarkableValue_1 = require("../../math/trigonometry/remarkableValue");
5
+ const coinFlip_1 = require("../../utils/coinFlip");
6
6
  const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
7
7
  exports.mainRemarkableValuesExercise = {
8
8
  id: 'mainRemarkableValues',
@@ -0,0 +1,4 @@
1
+ import { Exercise, Question } from '../exercise';
2
+ export declare const remarkableValuesExercise: Exercise;
3
+ export declare function getRemarkableValues(): Question;
4
+ //# sourceMappingURL=remarkableValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/exercises/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,wBAAwB,EAAE,QAStC,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,QAAQ,CAU9C"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRemarkableValues = exports.remarkableValuesExercise = void 0;
4
- const remarkableValue_1 = require("#root/math/trigonometry/remarkableValue");
5
- const coinFlip_1 = require("#root/utils/coinFlip");
4
+ const remarkableValue_1 = require("../../math/trigonometry/remarkableValue");
5
+ const coinFlip_1 = require("../../utils/coinFlip");
6
6
  const getDistinctQuestions_1 = require("../utils/getDistinctQuestions");
7
7
  exports.remarkableValuesExercise = {
8
8
  id: 'remarkableValues',
@@ -0,0 +1,3 @@
1
+ import { Question } from '../exercise';
2
+ export declare const getDistinctQuestions: (generator: Function, nb: number) => Question[];
3
+ //# sourceMappingURL=getDistinctQuestions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDistinctQuestions.d.ts","sourceRoot":"","sources":["../../../src/exercises/utils/getDistinctQuestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,eAAO,MAAM,oBAAoB,cAAe,QAAQ,MAAM,MAAM,KAAG,QAAQ,EAW9E,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare const allExercises: import("./exercises/exercise").Exercise[];
2
+ export { allExercises };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,YAAY,2CAAiB,CAAC;AAcpC,OAAO,EAAE,YAAY,EAAE,CAAC"}
package/lib/index.js CHANGED
@@ -1,7 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exercises = void 0;
3
+ exports.allExercises = void 0;
4
4
  const exercises_1 = require("./exercises/exercises");
5
- Object.defineProperty(exports, "exercises", { enumerable: true, get: function () { return exercises_1.exercises; } });
6
- exercises_1.exercises.forEach((exo) => console.log(exo.generator(10)));
7
- console.log('erger');
5
+ const geometricExplicitFormulaUsage_1 = require("./exercises/sequences/geometric/geometricExplicitFormulaUsage");
6
+ const geometricFindExplicitFormula_1 = require("./exercises/sequences/geometric/geometricFindExplicitFormula");
7
+ const geometricFindReason_1 = require("./exercises/sequences/geometric/geometricFindReason");
8
+ const geometricReasonUsage_1 = require("./exercises/sequences/geometric/geometricReasonUsage");
9
+ const geometricRecurrenceFormulaUsage_1 = require("./exercises/sequences/geometric/geometricRecurrenceFormulaUsage");
10
+ const allExercises = [...exercises_1.exercises];
11
+ exports.allExercises = allExercises;
12
+ const exos = [
13
+ geometricExplicitFormulaUsage_1.geometricExplicitFormulaUsage,
14
+ geometricFindExplicitFormula_1.geometricFindExplicitFormula,
15
+ geometricFindReason_1.geometricFindReason,
16
+ geometricReasonUsage_1.geometricReasonUsage,
17
+ geometricRecurrenceFormulaUsage_1.geometricRecurrenceFormulaUsage,
18
+ ];
19
+ exos.forEach((exo) => {
20
+ console.log(exo);
21
+ console.log(exo.generator(10));
22
+ });
@@ -0,0 +1,13 @@
1
+ import { Node } from '../../tree/nodes/node';
2
+ export declare abstract class PointConstructor {
3
+ }
4
+ export declare class Point {
5
+ name: string;
6
+ x: Node;
7
+ y: Node;
8
+ constructor(name: string, x: Node, y: Node);
9
+ toTex(): string;
10
+ toTexWithCoords(): string;
11
+ midpoint(B: Point, name?: string): Point;
12
+ }
13
+ //# sourceMappingURL=point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/point.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAM7C,8BAAsB,gBAAgB;CAMrC;AAED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,IAAI,CAAC;IACR,CAAC,EAAE,IAAI,CAAC;gBACI,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI;IAM1C,KAAK,IAAI,MAAM;IAGf,eAAe,IAAI,MAAM;IAIzB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,SAAM,GAAG,KAAK;CAOtC"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Point = exports.PointConstructor = void 0;
4
- const numberNode_1 = require("#root/tree/nodes/numbers/numberNode");
5
- const addNode_1 = require("#root/tree/nodes/operators/addNode");
6
- const fractionNode_1 = require("#root/tree/nodes/operators/fractionNode");
7
- const simplify_1 = require("#root/tree/parsers/simplify");
4
+ const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
5
+ const addNode_1 = require("../../tree/nodes/operators/addNode");
6
+ const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
7
+ const simplify_1 = require("../../tree/parsers/simplify");
8
8
  class PointConstructor {
9
9
  }
10
10
  exports.PointConstructor = PointConstructor;
@@ -0,0 +1,16 @@
1
+ import { Node } from '../../tree/nodes/node';
2
+ import { Point } from './point';
3
+ export declare abstract class VectorConstructor {
4
+ static fromPoints(origin: Point, end: Point): Vector;
5
+ }
6
+ export declare class Vector {
7
+ name: string;
8
+ tex: string;
9
+ x: Node;
10
+ y: Node;
11
+ constructor(name: string, x: Node, y: Node);
12
+ toTex(): string;
13
+ toTexWithCoords(): string;
14
+ scalarProduct(v: Vector): Node;
15
+ }
16
+ //# sourceMappingURL=vector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/vector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAK7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,8BAAsB,iBAAiB;IACrC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,GAAG,MAAM;CAOrD;AAED,qBAAa,MAAM;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,IAAI,CAAC;IACR,CAAC,EAAE,IAAI,CAAC;gBACI,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI;IAO1C,KAAK,IAAI,MAAM;IAIf,eAAe,IAAI,MAAM;IAIzB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;CAG/B"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Vector = exports.VectorConstructor = void 0;
4
- const addNode_1 = require("#root/tree/nodes/operators/addNode");
5
- const multiplyNode_1 = require("#root/tree/nodes/operators/multiplyNode");
6
- const substractNode_1 = require("#root/tree/nodes/operators/substractNode");
7
- const simplify_1 = require("#root/tree/parsers/simplify");
4
+ const addNode_1 = require("../../tree/nodes/operators/addNode");
5
+ const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
6
+ const substractNode_1 = require("../../tree/nodes/operators/substractNode");
7
+ const simplify_1 = require("../../tree/parsers/simplify");
8
8
  class VectorConstructor {
9
9
  static fromPoints(origin, end) {
10
10
  return new Vector(`${origin.name}${end.name}`, new substractNode_1.SubstractNode(end.x, origin.x), new substractNode_1.SubstractNode(end.y, origin.y));
@@ -0,0 +1,25 @@
1
+ import { Node } from '../../../tree/nodes/node';
2
+ import { Nombre, NumberType } from '../nombre';
3
+ export declare abstract class DecimalConstructor {
4
+ static randomFracPart(precision: number): string;
5
+ static random(min: number, max: number, precision: number): Decimal;
6
+ static fromParts(intPart: string, decimalPart: string): Decimal;
7
+ }
8
+ export declare class Decimal implements Nombre {
9
+ value: number;
10
+ tex: string;
11
+ type: NumberType;
12
+ precision: number;
13
+ intPart: number;
14
+ decimalPart: string;
15
+ constructor(value: number);
16
+ /**
17
+ *
18
+ * @param precision 0 = unité, 1 = dixieme, ... , -1 : dizaine
19
+ * @returns
20
+ */
21
+ round(precision: number): Nombre;
22
+ multiplyByPowerOfTen(power: number): Decimal;
23
+ toTree(): Node;
24
+ }
25
+ //# sourceMappingURL=decimal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/decimals/decimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAG7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,8BAAsB,kBAAkB;IACtC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAQhD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAKnE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;CAGhE;AAED,qBAAa,OAAQ,YAAW,MAAM;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,aAAsB;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;gBACR,KAAK,EAAE,MAAM;IASzB;;;;OAIG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAoEhC,oBAAoB,CAAC,KAAK,EAAE,MAAM;IAsBlC,MAAM,IAAI,IAAI;CAGf"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Decimal = exports.DecimalConstructor = void 0;
4
- const randint_1 = require("#root/math/utils/random/randint");
5
- const numberNode_1 = require("#root/tree/nodes/numbers/numberNode");
4
+ const randint_1 = require("../../../math/utils/random/randint");
5
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
6
6
  const integer_1 = require("../integer/integer");
7
7
  const nombre_1 = require("../nombre");
8
8
  class DecimalConstructor {
@@ -0,0 +1,2 @@
1
+ export declare const EPSILON: number;
2
+ //# sourceMappingURL=epsilon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"epsilon.d.ts","sourceRoot":"","sources":["../../../src/math/numbers/epsilon.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,QAAe,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Node } from '../../../tree/nodes/node';
2
+ import { Nombre, NumberType } from '../nombre';
3
+ export declare abstract class IntegerConstructor {
4
+ static random(nbOfDigits: number): number;
5
+ }
6
+ export declare class Integer implements Nombre {
7
+ value: number;
8
+ tex: string;
9
+ type: NumberType;
10
+ constructor(value: number, tex?: string);
11
+ toTree(): Node;
12
+ round(precision: number): Integer;
13
+ divide(nb: Nombre): Nombre;
14
+ }
15
+ //# sourceMappingURL=integer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/integer/integer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG/C,8BAAsB,kBAAkB;IACtC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM;CAGjC;AAED,qBAAa,OAAQ,YAAW,MAAM;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;gBAEL,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;IAMvC,MAAM,IAAI,IAAI;IAId,KAAK,CAAC,SAAS,EAAE,MAAM;IAiCvB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;CAW3B"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Integer = exports.IntegerConstructor = void 0;
4
- const randint_1 = require("#root/math/utils/random/randint");
5
- const numberNode_1 = require("#root/tree/nodes/numbers/numberNode");
4
+ const randint_1 = require("../../../math/utils/random/randint");
5
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
6
6
  const nombre_1 = require("../nombre");
7
7
  const rational_1 = require("../rationals/rational");
8
8
  class IntegerConstructor {
@@ -0,0 +1,14 @@
1
+ import { Node } from '../../../tree/nodes/node';
2
+ import { Nombre, NumberType } from '../nombre';
3
+ export declare class Power implements Nombre {
4
+ value: number;
5
+ tex: string;
6
+ type: NumberType;
7
+ operand: number;
8
+ power: number;
9
+ constructor(a: number, b: number);
10
+ simplify(): Node;
11
+ toDecimalWriting(): Nombre;
12
+ toTree(): Node;
13
+ }
14
+ //# sourceMappingURL=power.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"power.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/integer/power.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAG7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG/C,qBAAa,KAAM,YAAW,MAAM;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;gBACF,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAOhC,QAAQ,IAAI,IAAI;IAQhB,gBAAgB,IAAI,MAAM;IAkB1B,MAAM,IAAI,IAAI;CAGf"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Power = void 0;
4
- const numberNode_1 = require("#root/tree/nodes/numbers/numberNode");
5
- const powerNode_1 = require("#root/tree/nodes/operators/powerNode");
4
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
5
+ const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
6
6
  const nombre_1 = require("../nombre");
7
7
  const integer_1 = require("./integer");
8
8
  class Power {
@@ -0,0 +1,14 @@
1
+ import { Node } from '../../tree/nodes/node';
2
+ export declare enum NumberType {
3
+ Integer = 0,
4
+ Decimal = 1,
5
+ Rational = 2,
6
+ Real = 3
7
+ }
8
+ export interface Nombre {
9
+ value: number;
10
+ tex: string;
11
+ type: NumberType;
12
+ toTree: () => Node;
13
+ }
14
+ //# sourceMappingURL=nombre.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nombre.d.ts","sourceRoot":"","sources":["../../../src/math/numbers/nombre.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,oBAAY,UAAU;IACpB,OAAO,IAAA;IACP,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,IAAI,IAAA;CACL;AACD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB"}
@@ -0,0 +1,26 @@
1
+ import { Node } from '../../../tree/nodes/node';
2
+ import { Nombre, NumberType } from '../nombre';
3
+ export declare abstract class RationalConstructor {
4
+ /**
5
+ * @param maxGcd max number by which the fraction is simplifiable
6
+ */
7
+ static randomSimplifiable(maxGcd?: number): Rational;
8
+ static randomIrreductible(max?: number): Rational;
9
+ }
10
+ export declare class Rational implements Nombre {
11
+ num: number;
12
+ denum: number;
13
+ tex: string;
14
+ value: number;
15
+ isSimplified: boolean;
16
+ type: NumberType;
17
+ constructor(numerator: number, denumerator: number);
18
+ toTex(): string;
19
+ add(nb: Nombre): Nombre;
20
+ multiply(nb: Nombre): Nombre;
21
+ divide(nb: Nombre): Nombre;
22
+ opposite(): Rational;
23
+ toTree(): Node;
24
+ simplify(): Nombre;
25
+ }
26
+ //# sourceMappingURL=rational.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rational.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/rationals/rational.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAO7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,8BAAsB,mBAAmB;IACvC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAM,GAAE,MAAW;IAW7C,MAAM,CAAC,kBAAkB,CAAC,GAAG,GAAE,MAAW;CAO3C;AAED,qBAAa,QAAS,YAAW,MAAM;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;gBAEL,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAUlD,KAAK;IAIL,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAgBvB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAgB5B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAgB1B,QAAQ,IAAI,QAAQ;IAIpB,MAAM,IAAI,IAAI;IAId,QAAQ,IAAI,MAAM;CAMnB"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Rational = exports.RationalConstructor = void 0;
4
- const coprimesOf_1 = require("#root/math/utils/arithmetic/coprimesOf");
5
- const gcd_1 = require("#root/math/utils/arithmetic/gcd");
6
- const lcd_1 = require("#root/math/utils/arithmetic/lcd");
7
- const randint_1 = require("#root/math/utils/random/randint");
8
- const numberNode_1 = require("#root/tree/nodes/numbers/numberNode");
9
- const fractionNode_1 = require("#root/tree/nodes/operators/fractionNode");
10
- const random_1 = require("#root/utils/random");
11
- const shuffle_1 = require("#root/utils/shuffle");
4
+ const coprimesOf_1 = require("../../../math/utils/arithmetic/coprimesOf");
5
+ const gcd_1 = require("../../../math/utils/arithmetic/gcd");
6
+ const lcd_1 = require("../../../math/utils/arithmetic/lcd");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
9
+ const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
10
+ const random_1 = require("../../../utils/random");
11
+ const shuffle_1 = require("../../../utils/shuffle");
12
12
  const integer_1 = require("../integer/integer");
13
13
  const nombre_1 = require("../nombre");
14
14
  class RationalConstructor {
@@ -0,0 +1,10 @@
1
+ import { Node } from '../../../tree/nodes/node';
2
+ import { Nombre, NumberType } from '../nombre';
3
+ export declare class Real implements Nombre {
4
+ value: number;
5
+ tex: string;
6
+ type: NumberType;
7
+ constructor(value: number, tex: string);
8
+ toTree(): Node;
9
+ }
10
+ //# sourceMappingURL=real.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"real.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/reals/real.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,qBAAa,IAAK,YAAW,MAAM;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;gBACL,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAKtC,MAAM,IAAI,IAAI;CAGf"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Real = void 0;
4
- const numberNode_1 = require("#root/tree/nodes/numbers/numberNode");
4
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
5
5
  const nombre_1 = require("../nombre");
6
6
  class Real {
7
7
  constructor(value, tex) {
@@ -0,0 +1,19 @@
1
+ import { Node } from '../../../tree/nodes/node';
2
+ import { Real } from './real';
3
+ export declare abstract class SquareRootConstructor {
4
+ /**
5
+ * @returns simplifiable square root type sqrt(c)=a*sqrt(b)
6
+ */
7
+ static randomSimplifiable({ allowPerfectSquare, maxSquare }: {
8
+ allowPerfectSquare?: boolean | undefined;
9
+ maxSquare?: number | undefined;
10
+ }): SquareRoot;
11
+ }
12
+ export declare class SquareRoot extends Real {
13
+ operand: number;
14
+ constructor(operand: number);
15
+ simplify(): Real;
16
+ toTex(): string;
17
+ toTree(): Node;
18
+ }
19
+ //# sourceMappingURL=squareRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"squareRoot.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/reals/squareRoot.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAG7C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,8BAAsB,qBAAqB;IACzC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,EAAE,kBAA0B,EAAE,SAAc,EAAE;;;KAAA,GAAG,UAAU;CAStF;AAED,qBAAa,UAAW,SAAQ,IAAI;IAClC,OAAO,EAAE,MAAM,CAAC;gBACJ,OAAO,EAAE,MAAM;IAK3B,QAAQ,IAAI,IAAI;IA+BhB,KAAK,IAAI,MAAM;IAIf,MAAM,IAAI,IAAI;CAGf"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SquareRoot = exports.SquareRootConstructor = void 0;
4
- const isSquare_1 = require("#root/math/utils/arithmetic/isSquare");
5
- const primeFactors_1 = require("#root/math/utils/arithmetic/primeFactors");
6
- const randint_1 = require("#root/math/utils/random/randint");
7
- const sqrtNode_1 = require("#root/tree/nodes/functions/sqrtNode");
8
- const numberNode_1 = require("#root/tree/nodes/numbers/numberNode");
9
- const multiplyNode_1 = require("#root/tree/nodes/operators/multiplyNode");
4
+ const isSquare_1 = require("../../../math/utils/arithmetic/isSquare");
5
+ const primeFactors_1 = require("../../../math/utils/arithmetic/primeFactors");
6
+ const randint_1 = require("../../../math/utils/random/randint");
7
+ const sqrtNode_1 = require("../../../tree/nodes/functions/sqrtNode");
8
+ const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
9
+ const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
10
10
  const real_1 = require("./real");
11
11
  class SquareRootConstructor {
12
12
  /**
@@ -0,0 +1,16 @@
1
+ import { Nombre } from '../numbers/nombre';
2
+ import { MathSet } from '../sets/mathSet';
3
+ import { Polynomial } from './polynomial';
4
+ export declare abstract class AffineConstructor {
5
+ static random(domainA?: MathSet, domainB?: MathSet): Affine;
6
+ static differentRandoms(nb: number, domainA?: MathSet, domainB?: MathSet): Affine[];
7
+ }
8
+ export declare class Affine extends Polynomial {
9
+ a: number;
10
+ b: number;
11
+ variable: string;
12
+ constructor(a: number, b: number, variable?: string);
13
+ getRoot(): Nombre;
14
+ toString(): string;
15
+ }
16
+ //# sourceMappingURL=affine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"affine.d.ts","sourceRoot":"","sources":["../../../src/math/polynomials/affine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,8BAAsB,iBAAiB;IACrC,MAAM,CAAC,MAAM,CACX,OAAO,GAAE,OAAmF,EAC5F,OAAO,GAAE,OAAqC,GAC7C,MAAM;IAMT,MAAM,CAAC,gBAAgB,CACrB,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,OAAmF,EAC5F,OAAO,GAAE,OAAqC,GAC7C,MAAM,EAAE;CAWZ;AAED,qBAAa,MAAO,SAAQ,UAAU;IACpC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;gBAEL,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAY;IAOxD,OAAO,IAAI,MAAM;IAIjB,QAAQ,IAAI,MAAM;CAGnB"}
@@ -0,0 +1,25 @@
1
+ import { Node } from '../../tree/nodes/node';
2
+ export declare class Polynomial {
3
+ degree: number;
4
+ variable: string;
5
+ /**
6
+ * coefficients[i] est le coeff de x^i
7
+ */
8
+ coefficients: number[];
9
+ /**
10
+ *
11
+ * @param coefficients coefficients[i] est le coeff de x^i
12
+ * @param variable
13
+ */
14
+ constructor(coefficients: number[], variable?: string);
15
+ equals(P: Polynomial): boolean;
16
+ getRoots(): void;
17
+ add(P: Polynomial): Polynomial;
18
+ times(nb: number): Polynomial;
19
+ multiply(Q: Polynomial): Polynomial;
20
+ opposite(): Polynomial;
21
+ toTree(): Node;
22
+ toTex(): string;
23
+ toString(): string;
24
+ }
25
+ //# sourceMappingURL=polynomial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polynomial.d.ts","sourceRoot":"","sources":["../../../src/math/polynomials/polynomial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAS7C,qBAAa,UAAU;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB;;;;OAIG;gBACS,YAAY,EAAE,MAAM,EAAE,EAAE,QAAQ,GAAE,MAAY;IAS1D,MAAM,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO;IAG9B,QAAQ;IACR,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU;IAc9B,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU;IAM7B,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU;IAkBnC,QAAQ,IAAI,UAAU;IAOtB,MAAM,IAAI,IAAI;IAmCd,KAAK,IAAI,MAAM;IAkBf,QAAQ,IAAI,MAAM;CAGnB"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=arithmeticSequence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arithmeticSequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/arithmeticSequence.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare abstract class GeometricSequenceConstructor {
2
+ static random(): void;
3
+ }
4
+ //# sourceMappingURL=geometricSequence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometricSequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/geometricSequence.ts"],"names":[],"mappings":"AAEA,8BAAsB,4BAA4B;IAC9C,MAAM,CAAC,MAAM;CAGhB"}
@@ -0,0 +1,23 @@
1
+ import { Node } from '../../tree/nodes/node';
2
+ import { Integer } from '../numbers/integer/integer';
3
+ declare enum SequenceType {
4
+ arithmetic = 0,
5
+ geometric = 1,
6
+ other = 2
7
+ }
8
+ export declare class Sequence {
9
+ type: SequenceType;
10
+ firstRank: Integer;
11
+ firstTerm: Node;
12
+ recurrenceFormula?: string;
13
+ explicitFormula?: string;
14
+ constructor({ type, recurrenceFormula, explicitFormula, firstRank, firstTerm, }: {
15
+ type: SequenceType;
16
+ recurrenceFormula?: string;
17
+ explicitFormula?: string;
18
+ firstRank: Integer;
19
+ firstTerm: Node;
20
+ });
21
+ }
22
+ export {};
23
+ //# sourceMappingURL=sequence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/sequence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,aAAK,YAAY;IACf,UAAU,IAAA;IACV,SAAS,IAAA;IACT,KAAK,IAAA;CACN;AAED,qBAAa,QAAQ;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,OAAO,CAAkB;IACpC,SAAS,EAAE,IAAI,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;gBAEb,EACV,IAAI,EACJ,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,SAAS,GACV,EAAE;QACD,IAAI,EAAE,YAAY,CAAC;QACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,EAAE,IAAI,CAAC;KACjB;CAOF"}
@@ -1,16 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Sequence = void 0;
4
+ const integer_1 = require("../numbers/integer/integer");
4
5
  var SequenceType;
5
6
  (function (SequenceType) {
6
7
  SequenceType[SequenceType["arithmetic"] = 0] = "arithmetic";
7
8
  SequenceType[SequenceType["geometric"] = 1] = "geometric";
9
+ SequenceType[SequenceType["other"] = 2] = "other";
8
10
  })(SequenceType || (SequenceType = {}));
9
11
  class Sequence {
10
- constructor(type, firstTerm, reason) {
12
+ constructor({ type, recurrenceFormula, explicitFormula, firstRank, firstTerm, }) {
13
+ this.firstRank = new integer_1.Integer(0);
11
14
  this.type = type;
12
15
  this.firstTerm = firstTerm;
13
- this.reason = reason;
16
+ this.recurrenceFormula = recurrenceFormula;
17
+ this.explicitFormula = explicitFormula;
18
+ this.firstRank = firstRank;
14
19
  }
15
20
  }
16
21
  exports.Sequence = Sequence;
@@ -0,0 +1,11 @@
1
+ import { Nombre } from '../numbers/nombre';
2
+ import { MathSetInterface } from './mathSetInterface';
3
+ export declare class DiscreteSet implements MathSetInterface {
4
+ elements: Nombre[];
5
+ tex: string;
6
+ constructor(elements: Nombre[]);
7
+ toTex(): string;
8
+ includes(el: Nombre): boolean;
9
+ getRandomElement(): Nombre;
10
+ }
11
+ //# sourceMappingURL=discreteSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discreteSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/discreteSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,WAAY,YAAW,gBAAgB;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;gBACA,QAAQ,EAAE,MAAM,EAAE;IAW9B,KAAK,IAAI,MAAM;IAIf,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI7B,gBAAgB,IAAI,MAAM;CAG3B"}