math-exercises 2.2.26 → 2.2.28

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 (476) hide show
  1. package/lib/exercises/exercise.d.ts +2 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/exercise.js +1 -1
  4. package/lib/exercises/math/calcul/addAndSub.js +1 -1
  5. package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
  6. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -1
  7. package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +1 -1
  8. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +1 -1
  9. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
  10. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +1 -1
  11. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +1 -1
  12. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +1 -1
  13. package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +1 -1
  14. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +1 -1
  16. package/lib/exercises/math/calcul/fractions/fractionsProduct.js +1 -1
  17. package/lib/exercises/math/calcul/fractions/fractionsSum.js +1 -1
  18. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +1 -1
  19. package/lib/exercises/math/calcul/fractions/simplifyFraction.js +1 -1
  20. package/lib/exercises/math/calcul/index.js +1 -0
  21. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +2 -2
  22. package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.js +2 -2
  23. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +2 -2
  24. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +2 -2
  25. package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +2 -2
  26. package/lib/exercises/math/calcul/operations/expressionNature.js +1 -1
  27. package/lib/exercises/math/calcul/operations/operationsPriorities.js +2 -2
  28. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +1 -1
  29. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +1 -1
  30. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +2 -2
  31. package/lib/exercises/math/calcul/ordering/decimalOrdering.js +1 -1
  32. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +1 -1
  33. package/lib/exercises/math/calcul/ordering/framing.js +2 -2
  34. package/lib/exercises/math/calcul/ordering/integerOrdering.js +2 -2
  35. package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +1 -1
  36. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +1 -1
  37. package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +1 -1
  38. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
  39. package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
  40. package/lib/exercises/math/calcul/rounding/rounding.js +5 -6
  41. package/lib/exercises/math/calcul/writing/index.d.ts +2 -0
  42. package/lib/exercises/math/calcul/writing/index.d.ts.map +1 -0
  43. package/lib/exercises/math/calcul/writing/index.js +17 -0
  44. package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts +7 -0
  45. package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts.map +1 -0
  46. package/lib/exercises/math/calcul/writing/numberToFrenchWriting.js +67 -0
  47. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -1
  48. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +1 -1
  49. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +1 -1
  50. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +1 -1
  51. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +1 -1
  52. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +1 -1
  55. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +3 -3
  56. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +1 -1
  57. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +1 -1
  58. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +1 -1
  59. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +1 -1
  60. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +1 -1
  61. package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +1 -1
  62. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
  63. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +1 -1
  64. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +1 -1
  65. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -2
  66. package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +1 -1
  67. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -2
  68. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -2
  69. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -2
  70. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -2
  71. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +1 -1
  72. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +1 -1
  73. package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +2 -2
  74. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +1 -1
  75. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
  76. package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +1 -1
  77. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
  78. package/lib/exercises/math/combinatory/anagrams.js +1 -1
  79. package/lib/exercises/math/complex/addComplex.js +1 -1
  80. package/lib/exercises/math/complex/argumentFromAlgebraicComplex.js +1 -1
  81. package/lib/exercises/math/complex/conjugateComplex.ts.js +1 -1
  82. package/lib/exercises/math/complex/conjugateDivideComplex.js +1 -1
  83. package/lib/exercises/math/complex/conjugateMultiplyComplex.js +1 -1
  84. package/lib/exercises/math/complex/divideComplex.js +1 -1
  85. package/lib/exercises/math/complex/inverseComplex.js +1 -1
  86. package/lib/exercises/math/complex/linearCombinaisonComplex.js +1 -1
  87. package/lib/exercises/math/complex/mutiplyComplex.js +1 -1
  88. package/lib/exercises/math/complex/reAndIm.js +2 -2
  89. package/lib/exercises/math/conversion/aeraConversion.js +1 -1
  90. package/lib/exercises/math/conversion/capacityConversion.js +1 -1
  91. package/lib/exercises/math/conversion/hoursToDecimal.js +1 -1
  92. package/lib/exercises/math/conversion/lengthConversion.js +1 -1
  93. package/lib/exercises/math/conversion/massConversion.js +1 -1
  94. package/lib/exercises/math/conversion/volumeCapacityConversion.js +2 -2
  95. package/lib/exercises/math/conversion/volumeConversion.js +1 -1
  96. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
  97. package/lib/exercises/math/derivation/derivative/lnDerivativeTwo.js +1 -1
  98. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +1 -1
  99. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +1 -1
  100. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -2
  101. package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +1 -1
  102. package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +1 -1
  103. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +2 -2
  104. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -1
  105. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +1 -1
  106. package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +2 -2
  107. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +1 -1
  108. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +1 -1
  109. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
  110. package/lib/exercises/math/functions/affines/leadingCoefficient.js +1 -1
  111. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +1 -1
  112. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +1 -1
  113. package/lib/exercises/math/functions/affines/signFunction.js +2 -2
  114. package/lib/exercises/math/functions/basics/graphicEquation.js +1 -1
  115. package/lib/exercises/math/functions/basics/graphicInequation.js +1 -1
  116. package/lib/exercises/math/functions/basics/imageFunction.js +2 -2
  117. package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -2
  118. package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
  119. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +2 -2
  120. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +3 -3
  121. package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +2 -2
  122. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -2
  123. package/lib/exercises/math/functions/cube/cubicEquation.js +1 -1
  124. package/lib/exercises/math/functions/exponential/expEquation.js +1 -1
  125. package/lib/exercises/math/functions/exponential/expSimplifiying.js +1 -1
  126. package/lib/exercises/math/functions/integral/integralExpU.js +1 -1
  127. package/lib/exercises/math/functions/integral/integralFractions.js +1 -1
  128. package/lib/exercises/math/functions/logarithm/log10Simplifying.js +1 -1
  129. package/lib/exercises/math/functions/logarithm/logEquation.js +1 -1
  130. package/lib/exercises/math/functions/logarithm/logSimplifiying.js +2 -2
  131. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +3 -3
  132. package/lib/exercises/math/functions/parity/parityFromGraph.js +3 -3
  133. package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +1 -1
  134. package/lib/exercises/math/functions/trinoms/alphaBetaFromDevForm.js +2 -2
  135. package/lib/exercises/math/functions/trinoms/alphaBetaInCanonicalForm.js +2 -2
  136. package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.js +1 -1
  137. package/lib/exercises/math/functions/trinoms/deltaTrinom.js +1 -1
  138. package/lib/exercises/math/functions/trinoms/extremumFromCanonicalForm.js +1 -1
  139. package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +2 -2
  140. package/lib/exercises/math/functions/trinoms/factorizedFormFromRoots.js +1 -1
  141. package/lib/exercises/math/functions/trinoms/niceRootsFromDevForm.js +1 -1
  142. package/lib/exercises/math/functions/trinoms/rootsFromDevForm.js +1 -1
  143. package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +1 -1
  144. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
  145. package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +2 -2
  146. package/lib/exercises/math/geometry/areas/circleArea.js +2 -2
  147. package/lib/exercises/math/geometry/areas/rectangleArea.js +1 -1
  148. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
  149. package/lib/exercises/math/geometry/areas/squareArea.js +1 -1
  150. package/lib/exercises/math/geometry/areas/triangleArea.js +1 -1
  151. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +1 -1
  152. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
  153. package/lib/exercises/math/geometry/cartesian/index.d.ts +4 -0
  154. package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
  155. package/lib/exercises/math/geometry/cartesian/index.js +4 -0
  156. package/lib/exercises/math/geometry/cartesian/midpoint.js +1 -1
  157. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
  158. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts +13 -0
  159. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts.map +1 -0
  160. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.js +133 -0
  161. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +13 -0
  162. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -0
  163. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +132 -0
  164. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +1 -1
  165. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts +13 -0
  166. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -0
  167. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +152 -0
  168. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts +13 -0
  169. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -0
  170. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +153 -0
  171. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
  172. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
  173. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +2 -2
  174. package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +1 -1
  175. package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +1 -1
  176. package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
  177. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +2 -2
  178. package/lib/exercises/math/geometry/thales/thales.js +1 -1
  179. package/lib/exercises/math/geometry/thales/thalesCalcul.js +2 -2
  180. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +2 -2
  181. package/lib/exercises/math/geometry/vectors/chasles.js +2 -2
  182. package/lib/exercises/math/geometry/vectors/colinearity.js +2 -2
  183. package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
  184. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -2
  185. package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.js +1 -1
  186. package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +2 -2
  187. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +2 -2
  188. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +1 -1
  189. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
  190. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +1 -1
  191. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +1 -1
  192. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +1 -1
  193. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +1 -1
  194. package/lib/exercises/math/limits/limitReading.js +1 -1
  195. package/lib/exercises/math/limits/polynomLimit.js +2 -2
  196. package/lib/exercises/math/limits/polynomLimitNoFI.js +2 -2
  197. package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.js +1 -1
  198. package/lib/exercises/math/limits/rationalFracLimit.js +2 -2
  199. package/lib/exercises/math/limits/sequencePolynomLimit.js +1 -1
  200. package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +1 -1
  201. package/lib/exercises/math/limits/sequencePolynomProductLimit.js +1 -1
  202. package/lib/exercises/math/limits/sequenceRationalFracLimit.js +1 -1
  203. package/lib/exercises/math/percent/applyPercent.js +2 -2
  204. package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
  205. package/lib/exercises/math/percent/cmToEvolution.js +1 -1
  206. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts +8 -0
  207. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts.map +1 -0
  208. package/lib/exercises/math/percent/evolutionRateFromValues.js +71 -0
  209. package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts +8 -0
  210. package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts.map +1 -0
  211. package/lib/exercises/math/percent/findStartValueAfterEvolution.js +65 -0
  212. package/lib/exercises/math/percent/findTVA.js +2 -2
  213. package/lib/exercises/math/percent/globalPercent.js +1 -1
  214. package/lib/exercises/math/percent/htToTTC.js +2 -2
  215. package/lib/exercises/math/percent/index.d.ts +4 -0
  216. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  217. package/lib/exercises/math/percent/index.js +4 -0
  218. package/lib/exercises/math/percent/isTableProportional.js +1 -1
  219. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  220. package/lib/exercises/math/percent/percentToDecimal.js +70 -27
  221. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts +9 -0
  222. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -0
  223. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +93 -0
  224. package/lib/exercises/math/percent/reciprocalPercentage.js +2 -2
  225. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts +9 -0
  226. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -0
  227. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +85 -0
  228. package/lib/exercises/math/percent/ttcToHT.js +2 -2
  229. package/lib/exercises/math/powers/decimalToScientific.js +1 -1
  230. package/lib/exercises/math/powers/powersDivision.js +1 -1
  231. package/lib/exercises/math/powers/powersOfTenToDecimal.js +1 -1
  232. package/lib/exercises/math/powers/powersProduct.js +1 -1
  233. package/lib/exercises/math/primitive/constantPrimitive.js +1 -1
  234. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
  235. package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -1
  236. package/lib/exercises/math/primitive/sinCosPrimitive.js +2 -2
  237. package/lib/exercises/math/primitive/sinUCosUPrimitive.js +2 -2
  238. package/lib/exercises/math/probaStat/cardBasicProbas.js +2 -2
  239. package/lib/exercises/math/probaStat/conditionalProbability.js +1 -1
  240. package/lib/exercises/math/probaStat/diceBasicProbas.js +2 -2
  241. package/lib/exercises/math/probaStat/independancy.js +2 -2
  242. package/lib/exercises/math/probaStat/issuesCountingForCards.js +3 -3
  243. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +1 -1
  244. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
  245. package/lib/exercises/math/probaStat/probabilityTree.js +1 -1
  246. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +1 -1
  247. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  248. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -1
  249. package/lib/exercises/math/probaStat/stats1var/median.js +1 -1
  250. package/lib/exercises/math/probaStat/stats1var/quartiles.js +1 -1
  251. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
  252. package/lib/exercises/math/python/pyForLoop1Exercise.js +2 -2
  253. package/lib/exercises/math/python/pyNestedForLoopExercise.js +1 -1
  254. package/lib/exercises/math/python/pyWhileLoop1Exercise.js +1 -1
  255. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
  256. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +1 -1
  257. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +1 -1
  258. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +1 -1
  259. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +1 -1
  260. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +1 -1
  261. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +1 -1
  262. package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.js +1 -1
  263. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -1
  264. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +1 -1
  265. package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.js +1 -1
  266. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +2 -2
  267. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +2 -2
  268. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
  269. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +1 -1
  270. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +1 -1
  271. package/lib/exercises/math/sequences/geometric/geometricFindReason.js +1 -1
  272. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +1 -1
  273. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +1 -1
  274. package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +1 -1
  275. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +1 -1
  276. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -1
  277. package/lib/exercises/math/sequences/sequencePlot.js +1 -1
  278. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +1 -1
  279. package/lib/exercises/math/sets/intervals/intervalToInequality.js +1 -1
  280. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +1 -1
  281. package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
  282. package/lib/exercises/math/sets/setBelonging.js +2 -2
  283. package/lib/exercises/math/squareRoots/simpifySquareRoot.js +1 -1
  284. package/lib/exercises/math/squareRoots/squareRootEquation.js +1 -1
  285. package/lib/exercises/math/squareRoots/squareRootIdentities.js +2 -2
  286. package/lib/exercises/math/squareRoots/squareRootsSum.js +1 -1
  287. package/lib/exercises/math/trigonometry/arcLength.d.ts +10 -0
  288. package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -0
  289. package/lib/exercises/math/trigonometry/arcLength.js +92 -0
  290. package/lib/exercises/math/trigonometry/associatePoint.js +1 -1
  291. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts +7 -0
  292. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -0
  293. package/lib/exercises/math/trigonometry/basicEquationCos.js +94 -0
  294. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts +7 -0
  295. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -0
  296. package/lib/exercises/math/trigonometry/basicEquationSin.js +106 -0
  297. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts +7 -0
  298. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -0
  299. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +85 -0
  300. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -1
  301. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts +9 -0
  302. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -0
  303. package/lib/exercises/math/trigonometry/degreeToRadians.js +125 -0
  304. package/lib/exercises/math/trigonometry/index.d.ts +6 -0
  305. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  306. package/lib/exercises/math/trigonometry/index.js +6 -0
  307. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts +9 -0
  308. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -0
  309. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +91 -0
  310. package/lib/exercises/math/trigonometry/mainRemarkableValues.js +2 -2
  311. package/lib/exercises/math/trigonometry/remarkableValues.js +3 -3
  312. package/lib/exercises/math/trigonometry/trigonometry.js +1 -1
  313. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +1 -1
  314. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
  315. package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -2
  316. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  317. package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +2 -2
  318. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +1 -1
  319. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
  320. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
  321. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
  322. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
  323. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +2 -2
  324. package/lib/exercises/pc/chemicalEquations.js +1 -1
  325. package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +1 -1
  326. package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
  327. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
  328. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -1
  329. package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
  330. package/lib/exercises/pc/delution.js +1 -1
  331. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -1
  332. package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +1 -1
  333. package/lib/exercises/pc/electricity/calculateVoltage.js +1 -1
  334. package/lib/exercises/pc/electricity/electricEnergyFromPower.js +1 -1
  335. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +2 -2
  336. package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +1 -1
  337. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
  338. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +2 -2
  339. package/lib/exercises/pc/fluids/mariotte.js +1 -1
  340. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -1
  341. package/lib/exercises/pc/forces/forceWork.js +1 -1
  342. package/lib/exercises/pc/forces/massWeight.js +1 -1
  343. package/lib/exercises/pc/forces/pressingForce.js +1 -1
  344. package/lib/exercises/pc/formulaFromComposition.js +1 -1
  345. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +2 -2
  346. package/lib/exercises/pc/kineticEnergy.js +1 -1
  347. package/lib/exercises/pc/math/isolateVariables.js +1 -1
  348. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +1 -1
  349. package/lib/exercises/pc/molarQuantity.js +1 -1
  350. package/lib/exercises/pc/mole/molarMass.js +1 -1
  351. package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +1 -1
  352. package/lib/exercises/pc/moleculeFormula.js +1 -1
  353. package/lib/exercises/pc/moleculeNomenclature.js +1 -1
  354. package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
  355. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +1 -1
  356. package/lib/exercises/pc/motion/motionReference.js +1 -1
  357. package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
  358. package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
  359. package/lib/exercises/pc/pH.js +1 -1
  360. package/lib/exercises/pc/perceivedFrequency.js +1 -1
  361. package/lib/exercises/pc/potentialEnergy.js +1 -1
  362. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
  363. package/lib/exercises/pc/snellDescartes.js +1 -1
  364. package/lib/exercises/pc/sound/findPeriodFromGraph.js +1 -1
  365. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +1 -1
  366. package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
  367. package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -1
  368. package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -1
  369. package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -1
  370. package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -1
  371. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  372. package/lib/exercises/utils/getDistinctQuestions.js +11 -5
  373. package/lib/geogebra/colors.js +1 -1
  374. package/lib/geogebra/geogebraConstructor.js +1 -1
  375. package/lib/geogebra/parsers/ggbPointToCoords.d.ts +5 -0
  376. package/lib/geogebra/parsers/ggbPointToCoords.d.ts.map +1 -0
  377. package/lib/geogebra/parsers/ggbPointToCoords.js +12 -0
  378. package/lib/geogebra/parsers/parseGGBPoints.d.ts +2 -0
  379. package/lib/geogebra/parsers/parseGGBPoints.d.ts.map +1 -0
  380. package/lib/geogebra/parsers/parseGGBPoints.js +10 -0
  381. package/lib/index.d.ts +61 -0
  382. package/lib/index.d.ts.map +1 -1
  383. package/lib/math/geometry/line.d.ts.map +1 -1
  384. package/lib/math/geometry/line.js +0 -1
  385. package/lib/math/inequations/inequation.js +1 -1
  386. package/lib/math/numbers/decimals/decimal.d.ts +1 -0
  387. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  388. package/lib/math/numbers/decimals/decimal.js +10 -0
  389. package/lib/math/numbers/integer/integer.d.ts +2 -0
  390. package/lib/math/numbers/integer/integer.d.ts.map +1 -1
  391. package/lib/math/numbers/integer/integer.js +10 -1
  392. package/lib/math/numbers/nombre.js +1 -1
  393. package/lib/math/numbers/rationals/rational.js +3 -3
  394. package/lib/math/numbers/reals/real.js +2 -2
  395. package/lib/math/polynomials/polynomial.js +1 -1
  396. package/lib/math/polynomials/trinom.js +1 -1
  397. package/lib/math/sequences/geometricSequence.d.ts +2 -2
  398. package/lib/math/sequences/geometricSequence.d.ts.map +1 -1
  399. package/lib/math/sequences/geometricSequence.js +13 -11
  400. package/lib/math/sets/discreteSet.d.ts +2 -2
  401. package/lib/math/sets/discreteSet.d.ts.map +1 -1
  402. package/lib/math/sets/discreteSet.js +4 -4
  403. package/lib/math/sets/intervals/intervals.js +1 -1
  404. package/lib/math/trigonometry/remarkableValue.js +1 -1
  405. package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
  406. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
  407. package/lib/math/trigonometry/remarkableValues.js +72 -1
  408. package/lib/math/utils/random/randTupleInt.js +1 -1
  409. package/lib/playground.d.ts.map +1 -1
  410. package/lib/playground.js +1 -10
  411. package/lib/tree/nodes/equations/multiEqualNode.js +2 -2
  412. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  413. package/lib/tree/nodes/geometry/degree.js +3 -2
  414. package/lib/tree/nodes/geometry/pointNode.js +1 -1
  415. package/lib/tree/nodes/inequations/inequationNode.js +1 -1
  416. package/lib/tree/nodes/operators/addNode.js +3 -3
  417. package/lib/tree/nodes/operators/divideNode.js +1 -1
  418. package/lib/tree/nodes/operators/multiplyNode.js +3 -3
  419. package/lib/tree/nodes/operators/substractNode.js +1 -1
  420. package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
  421. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  422. package/lib/tree/nodes/sets/discreteSetNode.js +8 -2
  423. package/lib/tree/nodes/sets/intervalNode.js +1 -1
  424. package/lib/tree/nodes/sets/unionIntervalNode.js +2 -2
  425. package/lib/tree/parsers/euroParser.d.ts +2 -0
  426. package/lib/tree/parsers/euroParser.d.ts.map +1 -0
  427. package/lib/tree/parsers/euroParser.js +12 -0
  428. package/lib/tree/parsers/percentParser.d.ts +1 -0
  429. package/lib/tree/parsers/percentParser.d.ts.map +1 -1
  430. package/lib/tree/parsers/percentParser.js +11 -0
  431. package/lib/utils/alea/coinFlip.d.ts +2 -0
  432. package/lib/utils/alea/coinFlip.d.ts.map +1 -0
  433. package/lib/utils/alea/coinFlip.js +7 -0
  434. package/lib/utils/alea/diceFlip.d.ts +2 -0
  435. package/lib/utils/alea/diceFlip.d.ts.map +1 -0
  436. package/lib/utils/alea/diceFlip.js +8 -0
  437. package/lib/utils/alea/probaFlip.d.ts +7 -0
  438. package/lib/utils/alea/probaFlip.d.ts.map +1 -0
  439. package/lib/utils/alea/probaFlip.js +12 -0
  440. package/lib/utils/alea/probaLawFlip.d.ts +7 -0
  441. package/lib/utils/alea/probaLawFlip.d.ts.map +1 -0
  442. package/lib/utils/alea/probaLawFlip.js +24 -0
  443. package/lib/utils/alea/random.d.ts +2 -0
  444. package/lib/utils/alea/random.d.ts.map +1 -0
  445. package/lib/utils/alea/random.js +7 -0
  446. package/lib/utils/alea/randomEnumValue.d.ts +2 -0
  447. package/lib/utils/alea/randomEnumValue.d.ts.map +1 -0
  448. package/lib/utils/alea/randomEnumValue.js +9 -0
  449. package/lib/utils/alea/shuffle.d.ts +2 -0
  450. package/lib/utils/alea/shuffle.d.ts.map +1 -0
  451. package/lib/utils/alea/shuffle.js +15 -0
  452. package/lib/utils/arrays/arrayEqual.d.ts +2 -0
  453. package/lib/utils/arrays/arrayEqual.d.ts.map +1 -0
  454. package/lib/utils/arrays/arrayEqual.js +13 -0
  455. package/lib/utils/arrays/arrayHasSameElement.d.ts +2 -0
  456. package/lib/utils/arrays/arrayHasSameElement.d.ts.map +1 -0
  457. package/lib/utils/arrays/arrayHasSameElement.js +8 -0
  458. package/lib/utils/arrays/cartesianProducts.d.ts +13 -0
  459. package/lib/utils/arrays/cartesianProducts.d.ts.map +1 -0
  460. package/lib/utils/arrays/cartesianProducts.js +64 -0
  461. package/lib/utils/arrays/enumToArray.d.ts +8 -0
  462. package/lib/utils/arrays/enumToArray.d.ts.map +1 -0
  463. package/lib/utils/arrays/enumToArray.js +16 -0
  464. package/lib/utils/arrays/permutations.d.ts +2 -0
  465. package/lib/utils/arrays/permutations.d.ts.map +1 -0
  466. package/lib/utils/arrays/permutations.js +21 -0
  467. package/lib/utils/latex/alignTex.d.ts +1 -1
  468. package/lib/utils/latex/alignTex.d.ts.map +1 -1
  469. package/lib/utils/latex/alignTex.js +3 -3
  470. package/lib/utils/strings/frenchNumbers.d.ts +6 -0
  471. package/lib/utils/strings/frenchNumbers.d.ts.map +1 -0
  472. package/lib/utils/strings/frenchNumbers.js +50 -0
  473. package/lib/utils/strings/numberToFrenchWord.d.ts +2 -0
  474. package/lib/utils/strings/numberToFrenchWord.d.ts.map +1 -0
  475. package/lib/utils/strings/numberToFrenchWord.js +81 -0
  476. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ /**
2
+ * exp [[1,2],[3],[4,5]] donnera [[1,3,4], [1,3,5], [2,3,4],[2,3,5]]
3
+ * @param arr
4
+ * @returns
5
+ */
6
+ export declare function getCartesiansProducts<T>(arr: T[][]): T[][];
7
+ /**
8
+ * exp [[1], [[5, 5], 6], [7, [8, 9]]] -> [1,5,5,7] [1,5,5,8,9] [1,6,7] [1,6,8,9]
9
+ * @param arr
10
+ * @returns
11
+ */
12
+ export declare function getFlatCartesianProducts<T>(arr: (T | T[])[][]): T[][];
13
+ //# sourceMappingURL=cartesianProducts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartesianProducts.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/cartesianProducts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,SAkBlD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,SA8B7D"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFlatCartesianProducts = exports.getCartesiansProducts = void 0;
4
+ /**
5
+ * exp [[1,2],[3],[4,5]] donnera [[1,3,4], [1,3,5], [2,3,4],[2,3,5]]
6
+ * @param arr
7
+ * @returns
8
+ */
9
+ function getCartesiansProducts(arr) {
10
+ const res = [];
11
+ for (let i = 0; i < arr.length; i++) {
12
+ const currentRes = [...res];
13
+ for (let j = 0; j < arr[i].length; j++) {
14
+ if (i === 0)
15
+ res.push([arr[i][j]]);
16
+ else {
17
+ if (j === 0) {
18
+ currentRes.forEach((el) => el.push(arr[i][j]));
19
+ }
20
+ else {
21
+ currentRes.forEach((el) => res.push([...el.slice(0, el.length - 1), arr[i][j]]));
22
+ }
23
+ }
24
+ }
25
+ }
26
+ return res;
27
+ }
28
+ exports.getCartesiansProducts = getCartesiansProducts;
29
+ /**
30
+ * exp [[1], [[5, 5], 6], [7, [8, 9]]] -> [1,5,5,7] [1,5,5,8,9] [1,6,7] [1,6,8,9]
31
+ * @param arr
32
+ * @returns
33
+ */
34
+ function getFlatCartesianProducts(arr) {
35
+ const res = [];
36
+ for (let i = 0; i < arr.length; i++) {
37
+ const currentRes = [...res];
38
+ for (let j = 0; j < arr[i].length; j++) {
39
+ const isArray = Array.isArray(arr[i][j]);
40
+ const eltToArray = isArray
41
+ ? arr[i][j]
42
+ : [arr[i][j]];
43
+ if (i === 0)
44
+ res.push([...eltToArray]);
45
+ else {
46
+ if (j === 0) {
47
+ res.forEach((el) => el.push(...eltToArray));
48
+ }
49
+ else {
50
+ const isPrevArray = Array.isArray(arr[i][0]);
51
+ const prevEltToArray = isPrevArray
52
+ ? arr[i][0]
53
+ : [arr[i][0]];
54
+ currentRes.forEach((el) => res.push([
55
+ ...el.slice(0, el.length - prevEltToArray.length),
56
+ ...eltToArray,
57
+ ]));
58
+ }
59
+ }
60
+ }
61
+ }
62
+ return res;
63
+ }
64
+ exports.getFlatCartesianProducts = getFlatCartesianProducts;
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * @param e
4
+ * @returns
5
+ * ! probably doesn't work if enum contains numbers
6
+ */
7
+ export declare const enumToArray: (e: any) => string;
8
+ //# sourceMappingURL=enumToArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enumToArray.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/enumToArray.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,MAAO,GAAG,WAKjC,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enumToArray = void 0;
4
+ /**
5
+ *
6
+ * @param e
7
+ * @returns
8
+ * ! probably doesn't work if enum contains numbers
9
+ */
10
+ const enumToArray = (e) => {
11
+ const colors = Object.keys(e).filter((item) => {
12
+ return isNaN(Number(item));
13
+ });
14
+ return colors.join('\n');
15
+ };
16
+ exports.enumToArray = enumToArray;
@@ -0,0 +1,2 @@
1
+ export declare function permute<T>(arr: T[]): T[][];
2
+ //# sourceMappingURL=permutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permutations.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/permutations.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,SAclC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.permute = void 0;
4
+ function permute(arr) {
5
+ const result = [];
6
+ if (arr.length === 0)
7
+ return [];
8
+ if (arr.length === 1)
9
+ return [arr];
10
+ for (let i = 0; i < arr.length; i++) {
11
+ const currentNum = arr[i];
12
+ const remainingNums = arr.slice(0, i).concat(arr.slice(i + 1));
13
+ const remainingNumsPermuted = permute(remainingNums);
14
+ for (let j = 0; j < remainingNumsPermuted.length; j++) {
15
+ const permutedArray = [currentNum].concat(remainingNumsPermuted[j]);
16
+ result.push(permutedArray);
17
+ }
18
+ }
19
+ return result;
20
+ }
21
+ exports.permute = permute;
@@ -1,2 +1,2 @@
1
- export declare function alignTex(arr: string[][] | string): string;
1
+ export declare function alignTex(arr: string[][] | string, noLatexSigns?: boolean): string;
2
2
  //# sourceMappingURL=alignTex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alignTex.d.ts","sourceRoot":"","sources":["../../../src/utils/latex/alignTex.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,UAehD"}
1
+ {"version":3,"file":"alignTex.d.ts","sourceRoot":"","sources":["../../../src/utils/latex/alignTex.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,YAAY,UAAQ,UAetE"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.alignTex = void 0;
4
- function alignTex(arr) {
4
+ function alignTex(arr, noLatexSigns = false) {
5
5
  let alignements = "r";
6
6
  if (typeof arr !== "string" && arr[0].length > 2) {
7
7
  for (let i = 0; i < arr[0].length - 2; i++) {
@@ -9,12 +9,12 @@ function alignTex(arr) {
9
9
  }
10
10
  }
11
11
  alignements += "l";
12
- const aligned = `$$
12
+ const aligned = `${!noLatexSigns ? "$$" : ""}
13
13
  \\def\\arraystretch{1.8}
14
14
  \\begin{array}{${alignements}}
15
15
  ${typeof arr === "string" ? arr : arr.map((el) => el.join("&")).join(` \\\\`)}
16
16
  \\end{array}
17
- $$`;
17
+ ${!noLatexSigns ? "$$" : ""}`;
18
18
  return aligned;
19
19
  }
20
20
  exports.alignTex = alignTex;
@@ -0,0 +1,6 @@
1
+ export declare const frenchUnits: string[];
2
+ export declare const frenchTeens: string[];
3
+ export declare const frenchTens: string[];
4
+ export declare const frenchTenPowers: string[];
5
+ export declare const tenthThreePowers: string[];
6
+ //# sourceMappingURL=frenchNumbers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frenchNumbers.d.ts","sourceRoot":"","sources":["../../../src/utils/strings/frenchNumbers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,UAWvB,CAAC;AAEF,eAAO,MAAM,WAAW,UAWvB,CAAC;AAEF,eAAO,MAAM,UAAU,UAUtB,CAAC;AAEF,eAAO,MAAM,eAAe,UAU3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAmC,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tenthThreePowers = exports.frenchTenPowers = exports.frenchTens = exports.frenchTeens = exports.frenchUnits = void 0;
4
+ exports.frenchUnits = [
5
+ "zéro",
6
+ "un",
7
+ "deux",
8
+ "trois",
9
+ "quatre",
10
+ "cinq",
11
+ "six",
12
+ "sept",
13
+ "huit",
14
+ "neuf",
15
+ ];
16
+ exports.frenchTeens = [
17
+ "dix",
18
+ "onze",
19
+ "douze",
20
+ "treize",
21
+ "quatorze",
22
+ "quinze",
23
+ "seize",
24
+ "dix-sept",
25
+ "dix-huit",
26
+ "dix-neuf",
27
+ ];
28
+ exports.frenchTens = [
29
+ "dix",
30
+ "vingt",
31
+ "trente",
32
+ "quarante",
33
+ "cinquante",
34
+ "soixante",
35
+ "soixante-dix",
36
+ "quatre-vingts",
37
+ "quatre-vingt-dix",
38
+ ];
39
+ exports.frenchTenPowers = [
40
+ "dix",
41
+ "cent",
42
+ "mille",
43
+ "dix-mille",
44
+ "cent-mille",
45
+ "million",
46
+ "dix-millions",
47
+ "cent-millions",
48
+ "milliard",
49
+ ];
50
+ exports.tenthThreePowers = ["mille", "million", "milliard"];
@@ -0,0 +1,2 @@
1
+ export declare const numberToFrenchWord: (number: number) => string;
2
+ //# sourceMappingURL=numberToFrenchWord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numberToFrenchWord.d.ts","sourceRoot":"","sources":["../../../src/utils/strings/numberToFrenchWord.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,kBAAkB,WAAY,MAAM,WA0ChD,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.numberToFrenchWord = void 0;
4
+ const frenchNumbers_1 = require("./frenchNumbers");
5
+ const tensToFrench = (number) => {
6
+ if (number < 10)
7
+ return frenchNumbers_1.frenchUnits[number];
8
+ if (number < 20)
9
+ return frenchNumbers_1.frenchTeens[number - 10];
10
+ const tens = Math.floor(number / 10);
11
+ const ones = number % 10;
12
+ const units = tens === 7 || tens === 9 ? frenchNumbers_1.frenchTeens : frenchNumbers_1.frenchUnits;
13
+ let tenString = frenchNumbers_1.frenchTens[tens - 1];
14
+ if (!ones)
15
+ return tenString;
16
+ if (tens === 7 || tens === 9)
17
+ tenString = frenchNumbers_1.frenchTens[tens - 2];
18
+ if (tens === 8 || tens === 9)
19
+ tenString = tenString.replace("s", "");
20
+ if (ones === 1 && tens !== 8 && tens !== 9)
21
+ return tenString + "-et-" + units[ones];
22
+ return tenString + "-" + units[ones];
23
+ };
24
+ const hundredsToFrench = (number) => {
25
+ if (number === 100)
26
+ return "cent";
27
+ const hundreds = Math.floor(number / 100);
28
+ const tens = number % 100;
29
+ if (hundreds === 0)
30
+ return tensToFrench(number);
31
+ if (tens === 0)
32
+ return frenchNumbers_1.frenchUnits[hundreds] + "-cent";
33
+ if (hundreds === 1)
34
+ return "cent-" + tensToFrench(tens);
35
+ return frenchNumbers_1.frenchUnits[hundreds] + "-cent-" + tensToFrench(tens);
36
+ };
37
+ const numberToFrenchWord = (number) => {
38
+ // return hundredsToFrench(number);
39
+ if (Math.floor(number) !== number)
40
+ throw Error("decimal writing to french not implemented");
41
+ const nbStr = number.toString();
42
+ let toHundreds = [];
43
+ let j = 0;
44
+ let currentHundreds = [];
45
+ const length = nbStr.length;
46
+ const partsNumber = Math.floor((length - 1) / 3) + 1;
47
+ for (let i = nbStr.length - 1; i >= 0; i--) {
48
+ if (j === 3) {
49
+ toHundreds.push(Number(currentHundreds.reverse().reduce((a, b) => a + b)));
50
+ currentHundreds = [];
51
+ j = 0;
52
+ }
53
+ j++;
54
+ currentHundreds.push(nbStr[i]);
55
+ }
56
+ toHundreds.push(Number(currentHundreds.reverse().reduce((a, b) => a + b)));
57
+ // toHundreds.reverse();
58
+ let res = "";
59
+ for (let i = toHundreds.length - 1; i > -1; i--) {
60
+ const tenthPower = i * 3;
61
+ const hundreds = hundredsToFrench(toHundreds[i]);
62
+ if (i === 0) {
63
+ if (res?.length && hundreds !== "zéro")
64
+ res += "-" + hundreds;
65
+ if (!res?.length)
66
+ res += hundreds;
67
+ continue;
68
+ }
69
+ if (hundreds === "zéro")
70
+ continue;
71
+ const thousandWord = frenchNumbers_1.tenthThreePowers[i - 1];
72
+ if (hundreds === "un" && tenthPower === 3) {
73
+ res += (res ? "-" : "") + "mille";
74
+ }
75
+ else {
76
+ res += (res ? "-" : "") + hundreds + "-" + thousandWord;
77
+ }
78
+ }
79
+ return res;
80
+ };
81
+ exports.numberToFrenchWord = numberToFrenchWord;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "2.2.26",
3
+ "version": "2.2.28",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [