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.
- package/lib/exercises/exercise.d.ts +2 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercise.js +1 -1
- package/lib/exercises/math/calcul/addAndSub.js +1 -1
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsDivision.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsProduct.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +2 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.js +2 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +2 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +2 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +2 -2
- package/lib/exercises/math/calcul/operations/expressionNature.js +1 -1
- package/lib/exercises/math/calcul/operations/operationsPriorities.js +2 -2
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +2 -2
- package/lib/exercises/math/calcul/ordering/decimalOrdering.js +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +1 -1
- package/lib/exercises/math/calcul/ordering/framing.js +2 -2
- package/lib/exercises/math/calcul/ordering/integerOrdering.js +2 -2
- package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +1 -1
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.js +5 -6
- package/lib/exercises/math/calcul/writing/index.d.ts +2 -0
- package/lib/exercises/math/calcul/writing/index.d.ts.map +1 -0
- package/lib/exercises/math/calcul/writing/index.js +17 -0
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts +7 -0
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts.map +1 -0
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.js +67 -0
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +3 -3
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -2
- package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -2
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -2
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -2
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -2
- package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +2 -2
- package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
- package/lib/exercises/math/combinatory/anagrams.js +1 -1
- package/lib/exercises/math/complex/addComplex.js +1 -1
- package/lib/exercises/math/complex/argumentFromAlgebraicComplex.js +1 -1
- package/lib/exercises/math/complex/conjugateComplex.ts.js +1 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.js +1 -1
- package/lib/exercises/math/complex/conjugateMultiplyComplex.js +1 -1
- package/lib/exercises/math/complex/divideComplex.js +1 -1
- package/lib/exercises/math/complex/inverseComplex.js +1 -1
- package/lib/exercises/math/complex/linearCombinaisonComplex.js +1 -1
- package/lib/exercises/math/complex/mutiplyComplex.js +1 -1
- package/lib/exercises/math/complex/reAndIm.js +2 -2
- package/lib/exercises/math/conversion/aeraConversion.js +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +1 -1
- package/lib/exercises/math/conversion/hoursToDecimal.js +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +1 -1
- package/lib/exercises/math/conversion/massConversion.js +1 -1
- package/lib/exercises/math/conversion/volumeCapacityConversion.js +2 -2
- package/lib/exercises/math/conversion/volumeConversion.js +1 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeTwo.js +1 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -2
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +2 -2
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +1 -1
- package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +2 -2
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +1 -1
- package/lib/exercises/math/functions/affines/signFunction.js +2 -2
- package/lib/exercises/math/functions/basics/graphicEquation.js +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +1 -1
- package/lib/exercises/math/functions/basics/imageFunction.js +2 -2
- package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -2
- package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +2 -2
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +3 -3
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +2 -2
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -2
- package/lib/exercises/math/functions/cube/cubicEquation.js +1 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +1 -1
- package/lib/exercises/math/functions/exponential/expSimplifiying.js +1 -1
- package/lib/exercises/math/functions/integral/integralExpU.js +1 -1
- package/lib/exercises/math/functions/integral/integralFractions.js +1 -1
- package/lib/exercises/math/functions/logarithm/log10Simplifying.js +1 -1
- package/lib/exercises/math/functions/logarithm/logEquation.js +1 -1
- package/lib/exercises/math/functions/logarithm/logSimplifiying.js +2 -2
- package/lib/exercises/math/functions/parity/parityFromAlgebra.js +3 -3
- package/lib/exercises/math/functions/parity/parityFromGraph.js +3 -3
- package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +1 -1
- package/lib/exercises/math/functions/trinoms/alphaBetaFromDevForm.js +2 -2
- package/lib/exercises/math/functions/trinoms/alphaBetaInCanonicalForm.js +2 -2
- package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/deltaTrinom.js +1 -1
- package/lib/exercises/math/functions/trinoms/extremumFromCanonicalForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +2 -2
- package/lib/exercises/math/functions/trinoms/factorizedFormFromRoots.js +1 -1
- package/lib/exercises/math/functions/trinoms/niceRootsFromDevForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/rootsFromDevForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
- package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +2 -2
- package/lib/exercises/math/geometry/areas/circleArea.js +2 -2
- package/lib/exercises/math/geometry/areas/rectangleArea.js +1 -1
- package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
- package/lib/exercises/math/geometry/areas/squareArea.js +1 -1
- package/lib/exercises/math/geometry/areas/triangleArea.js +1 -1
- package/lib/exercises/math/geometry/areas/triangleAreaV2.js +1 -1
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
- package/lib/exercises/math/geometry/cartesian/index.d.ts +4 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/index.js +4 -0
- package/lib/exercises/math/geometry/cartesian/midpoint.js +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts +13 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.js +133 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +13 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +132 -0
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts +13 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +152 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts +13 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +153 -0
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.js +2 -2
- package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +1 -1
- package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +1 -1
- package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +2 -2
- package/lib/exercises/math/geometry/thales/thales.js +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +2 -2
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +2 -2
- package/lib/exercises/math/geometry/vectors/chasles.js +2 -2
- package/lib/exercises/math/geometry/vectors/colinearity.js +2 -2
- package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -2
- package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.js +1 -1
- package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +2 -2
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +1 -1
- package/lib/exercises/math/limits/limitReading.js +1 -1
- package/lib/exercises/math/limits/polynomLimit.js +2 -2
- package/lib/exercises/math/limits/polynomLimitNoFI.js +2 -2
- package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.js +1 -1
- package/lib/exercises/math/limits/rationalFracLimit.js +2 -2
- package/lib/exercises/math/limits/sequencePolynomLimit.js +1 -1
- package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +1 -1
- package/lib/exercises/math/limits/sequencePolynomProductLimit.js +1 -1
- package/lib/exercises/math/limits/sequenceRationalFracLimit.js +1 -1
- package/lib/exercises/math/percent/applyPercent.js +2 -2
- package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
- package/lib/exercises/math/percent/cmToEvolution.js +1 -1
- package/lib/exercises/math/percent/evolutionRateFromValues.d.ts +8 -0
- package/lib/exercises/math/percent/evolutionRateFromValues.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutionRateFromValues.js +71 -0
- package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts +8 -0
- package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/findStartValueAfterEvolution.js +65 -0
- package/lib/exercises/math/percent/findTVA.js +2 -2
- package/lib/exercises/math/percent/globalPercent.js +1 -1
- package/lib/exercises/math/percent/htToTTC.js +2 -2
- package/lib/exercises/math/percent/index.d.ts +4 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +4 -0
- package/lib/exercises/math/percent/isTableProportional.js +1 -1
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +70 -27
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts +9 -0
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -0
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +93 -0
- package/lib/exercises/math/percent/reciprocalPercentage.js +2 -2
- package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts +9 -0
- package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -0
- package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +85 -0
- package/lib/exercises/math/percent/ttcToHT.js +2 -2
- package/lib/exercises/math/powers/decimalToScientific.js +1 -1
- package/lib/exercises/math/powers/powersDivision.js +1 -1
- package/lib/exercises/math/powers/powersOfTenToDecimal.js +1 -1
- package/lib/exercises/math/powers/powersProduct.js +1 -1
- package/lib/exercises/math/primitive/constantPrimitive.js +1 -1
- package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.js +2 -2
- package/lib/exercises/math/primitive/sinUCosUPrimitive.js +2 -2
- package/lib/exercises/math/probaStat/cardBasicProbas.js +2 -2
- package/lib/exercises/math/probaStat/conditionalProbability.js +1 -1
- package/lib/exercises/math/probaStat/diceBasicProbas.js +2 -2
- package/lib/exercises/math/probaStat/independancy.js +2 -2
- package/lib/exercises/math/probaStat/issuesCountingForCards.js +3 -3
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
- package/lib/exercises/math/probaStat/probabilityTree.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -1
- package/lib/exercises/math/probaStat/stats1var/median.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartiles.js +1 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
- package/lib/exercises/math/python/pyForLoop1Exercise.js +2 -2
- package/lib/exercises/math/python/pyNestedForLoopExercise.js +1 -1
- package/lib/exercises/math/python/pyWhileLoop1Exercise.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +2 -2
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +2 -2
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindReason.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/sequencePlot.js +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +1 -1
- package/lib/exercises/math/sets/intervals/intervalToInequality.js +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +1 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
- package/lib/exercises/math/sets/setBelonging.js +2 -2
- package/lib/exercises/math/squareRoots/simpifySquareRoot.js +1 -1
- package/lib/exercises/math/squareRoots/squareRootEquation.js +1 -1
- package/lib/exercises/math/squareRoots/squareRootIdentities.js +2 -2
- package/lib/exercises/math/squareRoots/squareRootsSum.js +1 -1
- package/lib/exercises/math/trigonometry/arcLength.d.ts +10 -0
- package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/arcLength.js +92 -0
- package/lib/exercises/math/trigonometry/associatePoint.js +1 -1
- package/lib/exercises/math/trigonometry/basicEquationCos.d.ts +7 -0
- package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/basicEquationCos.js +94 -0
- package/lib/exercises/math/trigonometry/basicEquationSin.d.ts +7 -0
- package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/basicEquationSin.js +106 -0
- package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts +7 -0
- package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +85 -0
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -1
- package/lib/exercises/math/trigonometry/degreeToRadians.d.ts +9 -0
- package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/degreeToRadians.js +125 -0
- package/lib/exercises/math/trigonometry/index.d.ts +6 -0
- package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/index.js +6 -0
- package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts +9 -0
- package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/mainAngleMeasure.js +91 -0
- package/lib/exercises/math/trigonometry/mainRemarkableValues.js +2 -2
- package/lib/exercises/math/trigonometry/remarkableValues.js +3 -3
- package/lib/exercises/math/trigonometry/trigonometry.js +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -2
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +2 -2
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +2 -2
- package/lib/exercises/pc/chemicalEquations.js +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -1
- package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
- package/lib/exercises/pc/delution.js +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -1
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +1 -1
- package/lib/exercises/pc/electricity/calculateVoltage.js +1 -1
- package/lib/exercises/pc/electricity/electricEnergyFromPower.js +1 -1
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +2 -2
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +2 -2
- package/lib/exercises/pc/fluids/mariotte.js +1 -1
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -1
- package/lib/exercises/pc/forces/forceWork.js +1 -1
- package/lib/exercises/pc/forces/massWeight.js +1 -1
- package/lib/exercises/pc/forces/pressingForce.js +1 -1
- package/lib/exercises/pc/formulaFromComposition.js +1 -1
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +2 -2
- package/lib/exercises/pc/kineticEnergy.js +1 -1
- package/lib/exercises/pc/math/isolateVariables.js +1 -1
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +1 -1
- package/lib/exercises/pc/molarQuantity.js +1 -1
- package/lib/exercises/pc/mole/molarMass.js +1 -1
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +1 -1
- package/lib/exercises/pc/moleculeFormula.js +1 -1
- package/lib/exercises/pc/moleculeNomenclature.js +1 -1
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +1 -1
- package/lib/exercises/pc/motion/motionReference.js +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
- package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
- package/lib/exercises/pc/pH.js +1 -1
- package/lib/exercises/pc/perceivedFrequency.js +1 -1
- package/lib/exercises/pc/potentialEnergy.js +1 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
- package/lib/exercises/pc/snellDescartes.js +1 -1
- package/lib/exercises/pc/sound/findPeriodFromGraph.js +1 -1
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +1 -1
- package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
- package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -1
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -1
- package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -1
- package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
- package/lib/exercises/utils/getDistinctQuestions.js +11 -5
- package/lib/geogebra/colors.js +1 -1
- package/lib/geogebra/geogebraConstructor.js +1 -1
- package/lib/geogebra/parsers/ggbPointToCoords.d.ts +5 -0
- package/lib/geogebra/parsers/ggbPointToCoords.d.ts.map +1 -0
- package/lib/geogebra/parsers/ggbPointToCoords.js +12 -0
- package/lib/geogebra/parsers/parseGGBPoints.d.ts +2 -0
- package/lib/geogebra/parsers/parseGGBPoints.d.ts.map +1 -0
- package/lib/geogebra/parsers/parseGGBPoints.js +10 -0
- package/lib/index.d.ts +61 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +0 -1
- package/lib/math/inequations/inequation.js +1 -1
- package/lib/math/numbers/decimals/decimal.d.ts +1 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +10 -0
- package/lib/math/numbers/integer/integer.d.ts +2 -0
- package/lib/math/numbers/integer/integer.d.ts.map +1 -1
- package/lib/math/numbers/integer/integer.js +10 -1
- package/lib/math/numbers/nombre.js +1 -1
- package/lib/math/numbers/rationals/rational.js +3 -3
- package/lib/math/numbers/reals/real.js +2 -2
- package/lib/math/polynomials/polynomial.js +1 -1
- package/lib/math/polynomials/trinom.js +1 -1
- package/lib/math/sequences/geometricSequence.d.ts +2 -2
- package/lib/math/sequences/geometricSequence.d.ts.map +1 -1
- package/lib/math/sequences/geometricSequence.js +13 -11
- package/lib/math/sets/discreteSet.d.ts +2 -2
- package/lib/math/sets/discreteSet.d.ts.map +1 -1
- package/lib/math/sets/discreteSet.js +4 -4
- package/lib/math/sets/intervals/intervals.js +1 -1
- package/lib/math/trigonometry/remarkableValue.js +1 -1
- package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
- package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValues.js +72 -1
- package/lib/math/utils/random/randTupleInt.js +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +1 -10
- package/lib/tree/nodes/equations/multiEqualNode.js +2 -2
- package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/degree.js +3 -2
- package/lib/tree/nodes/geometry/pointNode.js +1 -1
- package/lib/tree/nodes/inequations/inequationNode.js +1 -1
- package/lib/tree/nodes/operators/addNode.js +3 -3
- package/lib/tree/nodes/operators/divideNode.js +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +3 -3
- package/lib/tree/nodes/operators/substractNode.js +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.js +8 -2
- package/lib/tree/nodes/sets/intervalNode.js +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.js +2 -2
- package/lib/tree/parsers/euroParser.d.ts +2 -0
- package/lib/tree/parsers/euroParser.d.ts.map +1 -0
- package/lib/tree/parsers/euroParser.js +12 -0
- package/lib/tree/parsers/percentParser.d.ts +1 -0
- package/lib/tree/parsers/percentParser.d.ts.map +1 -1
- package/lib/tree/parsers/percentParser.js +11 -0
- package/lib/utils/alea/coinFlip.d.ts +2 -0
- package/lib/utils/alea/coinFlip.d.ts.map +1 -0
- package/lib/utils/alea/coinFlip.js +7 -0
- package/lib/utils/alea/diceFlip.d.ts +2 -0
- package/lib/utils/alea/diceFlip.d.ts.map +1 -0
- package/lib/utils/alea/diceFlip.js +8 -0
- package/lib/utils/alea/probaFlip.d.ts +7 -0
- package/lib/utils/alea/probaFlip.d.ts.map +1 -0
- package/lib/utils/alea/probaFlip.js +12 -0
- package/lib/utils/alea/probaLawFlip.d.ts +7 -0
- package/lib/utils/alea/probaLawFlip.d.ts.map +1 -0
- package/lib/utils/alea/probaLawFlip.js +24 -0
- package/lib/utils/alea/random.d.ts +2 -0
- package/lib/utils/alea/random.d.ts.map +1 -0
- package/lib/utils/alea/random.js +7 -0
- package/lib/utils/alea/randomEnumValue.d.ts +2 -0
- package/lib/utils/alea/randomEnumValue.d.ts.map +1 -0
- package/lib/utils/alea/randomEnumValue.js +9 -0
- package/lib/utils/alea/shuffle.d.ts +2 -0
- package/lib/utils/alea/shuffle.d.ts.map +1 -0
- package/lib/utils/alea/shuffle.js +15 -0
- package/lib/utils/arrays/arrayEqual.d.ts +2 -0
- package/lib/utils/arrays/arrayEqual.d.ts.map +1 -0
- package/lib/utils/arrays/arrayEqual.js +13 -0
- package/lib/utils/arrays/arrayHasSameElement.d.ts +2 -0
- package/lib/utils/arrays/arrayHasSameElement.d.ts.map +1 -0
- package/lib/utils/arrays/arrayHasSameElement.js +8 -0
- package/lib/utils/arrays/cartesianProducts.d.ts +13 -0
- package/lib/utils/arrays/cartesianProducts.d.ts.map +1 -0
- package/lib/utils/arrays/cartesianProducts.js +64 -0
- package/lib/utils/arrays/enumToArray.d.ts +8 -0
- package/lib/utils/arrays/enumToArray.d.ts.map +1 -0
- package/lib/utils/arrays/enumToArray.js +16 -0
- package/lib/utils/arrays/permutations.d.ts +2 -0
- package/lib/utils/arrays/permutations.d.ts.map +1 -0
- package/lib/utils/arrays/permutations.js +21 -0
- package/lib/utils/latex/alignTex.d.ts +1 -1
- package/lib/utils/latex/alignTex.d.ts.map +1 -1
- package/lib/utils/latex/alignTex.js +3 -3
- package/lib/utils/strings/frenchNumbers.d.ts +6 -0
- package/lib/utils/strings/frenchNumbers.d.ts.map +1 -0
- package/lib/utils/strings/frenchNumbers.js +50 -0
- package/lib/utils/strings/numberToFrenchWord.d.ts +2 -0
- package/lib/utils/strings/numberToFrenchWord.d.ts.map +1 -0
- package/lib/utils/strings/numberToFrenchWord.js +81 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ exports.MotionReferenceExercise = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
7
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
8
8
|
const requiresApostropheBefore_1 = require("../../../utils/strings/requiresApostropheBefore");
|
|
9
9
|
const situations = [
|
|
10
10
|
{
|
|
@@ -5,7 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
7
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
-
const random_1 = require("../../../utils/random");
|
|
8
|
+
const random_1 = require("../../../utils/alea/random");
|
|
9
9
|
const getTypeOfAccelerationQuestion = () => {
|
|
10
10
|
const exo = generateExo();
|
|
11
11
|
const question = {
|
|
@@ -6,7 +6,7 @@ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQues
|
|
|
6
6
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
7
|
const affine_1 = require("../../../math/polynomials/affine");
|
|
8
8
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
-
const random_1 = require("../../../utils/random");
|
|
9
|
+
const random_1 = require("../../../utils/alea/random");
|
|
10
10
|
const getTypeOfMovementQuestion = () => {
|
|
11
11
|
const exo = generateExercise();
|
|
12
12
|
const ggb = exo.ggb;
|
package/lib/exercises/pc/pH.js
CHANGED
|
@@ -6,7 +6,7 @@ const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestio
|
|
|
6
6
|
const frenchify_1 = require("../../math/utils/latex/frenchify");
|
|
7
7
|
const randint_1 = require("../../math/utils/random/randint");
|
|
8
8
|
const round_1 = require("../../math/utils/round");
|
|
9
|
-
const shuffle_1 = require("../../utils/shuffle");
|
|
9
|
+
const shuffle_1 = require("../../utils/alea/shuffle");
|
|
10
10
|
const getpH = () => {
|
|
11
11
|
const randomNumber = (0, randint_1.randint)(1, 10);
|
|
12
12
|
const randomTenPower = (0, randint_1.randint)(2, 10);
|
|
@@ -6,7 +6,7 @@ const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestio
|
|
|
6
6
|
const frenchify_1 = require("../../math/utils/latex/frenchify");
|
|
7
7
|
const randint_1 = require("../../math/utils/random/randint");
|
|
8
8
|
const round_1 = require("../../math/utils/round");
|
|
9
|
-
const shuffle_1 = require("../../utils/shuffle");
|
|
9
|
+
const shuffle_1 = require("../../utils/alea/shuffle");
|
|
10
10
|
const soundSpeed = 340; // Vitesse du son dans l'air en m/s
|
|
11
11
|
const observerSpeed = 0; // La vitesse de l'observateur est supposée être nulle (observateur immobile)
|
|
12
12
|
const getPerceivedFrequency = () => {
|
|
@@ -10,7 +10,7 @@ const measure_1 = require("../../pc/measure/measure");
|
|
|
10
10
|
const distanceUnits_1 = require("../../pc/units/distanceUnits");
|
|
11
11
|
const energyUnit_1 = require("../../pc/units/energyUnit");
|
|
12
12
|
const massUnits_1 = require("../../pc/units/massUnits");
|
|
13
|
-
const shuffle_1 = require("../../utils/shuffle");
|
|
13
|
+
const shuffle_1 = require("../../utils/alea/shuffle");
|
|
14
14
|
const getPotentialEnergy = () => {
|
|
15
15
|
const mass = Math.floor(Math.random() * 10 + 1); // Masse de l'objet entre 1 et 11 kg
|
|
16
16
|
const massMeasure = new measure_1.Measure(mass, 0, massUnits_1.MassUnit.kg);
|
|
@@ -6,7 +6,7 @@ const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestio
|
|
|
6
6
|
const colors_1 = require("../../geogebra/colors");
|
|
7
7
|
const geogebraConstructor_1 = require("../../geogebra/geogebraConstructor");
|
|
8
8
|
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
-
const random_1 = require("../../utils/random");
|
|
9
|
+
const random_1 = require("../../utils/alea/random");
|
|
10
10
|
const IsAsking = {
|
|
11
11
|
RefractionAngle: "Angle de réfraction",
|
|
12
12
|
ReflectionAngle: "Angle de réflexion",
|
|
@@ -6,7 +6,7 @@ const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestio
|
|
|
6
6
|
const frenchify_1 = require("../../math/utils/latex/frenchify");
|
|
7
7
|
const randint_1 = require("../../math/utils/random/randint");
|
|
8
8
|
const round_1 = require("../../math/utils/round");
|
|
9
|
-
const shuffle_1 = require("../../utils/shuffle");
|
|
9
|
+
const shuffle_1 = require("../../utils/alea/shuffle");
|
|
10
10
|
const refractionIndex = [
|
|
11
11
|
{ Material: "l'air", Material2: "d'air", Material3: "de l'air", n: 1 },
|
|
12
12
|
{ Material: "l'eau", Material2: "d'eau", Material3: "de l'eau", n: 1.33 },
|
|
@@ -7,7 +7,7 @@ const colors_1 = require("../../../geogebra/colors");
|
|
|
7
7
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
8
8
|
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
9
9
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
10
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
11
11
|
const getFindPeriodFromGraphQuestion = () => {
|
|
12
12
|
const period = (0, randint_1.randint)(2, 5);
|
|
13
13
|
const yStart = (0, randint_1.randint)(0, 4);
|
|
@@ -7,7 +7,7 @@ const colors_1 = require("../../../geogebra/colors");
|
|
|
7
7
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
8
8
|
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
9
9
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
10
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
11
11
|
const isInt_1 = require("../../../utils/isInt");
|
|
12
12
|
const getFindPeriodOrFrequencyFromGraphQuestion = () => {
|
|
13
13
|
const period = (0, randint_1.randint)(2, 5);
|
|
@@ -4,7 +4,7 @@ exports.frequencyComparison = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
7
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
8
8
|
const getFrequencyComparisonQuestion = () => {
|
|
9
9
|
const soundAsked = (0, coinFlip_1.coinFlip)() ? 1 : 2;
|
|
10
10
|
const soundCompared = soundAsked === 1 ? 2 : 1;
|
|
@@ -7,7 +7,7 @@ const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
|
7
7
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
8
|
const waves_1 = require("../../../pc/constants/mechanics/waves");
|
|
9
9
|
const measure_1 = require("../../../pc/measure/measure");
|
|
10
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
11
11
|
const getLightDistanceConversionQuestion = () => {
|
|
12
12
|
const lightYear = (0, randfloat_1.randfloat)(10, 1000, 2);
|
|
13
13
|
const speed = waves_1.lightSpeed.measure;
|
|
@@ -5,7 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
7
7
|
const round_1 = require("../../../math/utils/round");
|
|
8
|
-
const random_1 = require("../../../utils/random");
|
|
8
|
+
const random_1 = require("../../../utils/alea/random");
|
|
9
9
|
// v = lambda / T
|
|
10
10
|
const getPeriodicWaveCelerityQuestion = () => {
|
|
11
11
|
const varAsked = (0, random_1.random)(["v", "T", "l"]);
|
|
@@ -7,7 +7,7 @@ const frenchify_1 = require("../../../math/utils/latex/frenchify");
|
|
|
7
7
|
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
8
|
const round_1 = require("../../../math/utils/round");
|
|
9
9
|
const gravitational_1 = require("../../../pc/constants/mechanics/gravitational");
|
|
10
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
11
11
|
const getWeightOnTheMoonQuestion = () => {
|
|
12
12
|
const originIsMoon = (0, coinFlip_1.coinFlip)();
|
|
13
13
|
const origin = originIsMoon ? "Lune" : "Terre";
|
|
@@ -7,5 +7,5 @@ export declare function equalTab<T>(array1: T[], array2: T[]): boolean;
|
|
|
7
7
|
* @param max included
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
|
-
export declare const getDistinctQuestions: (generator: () => Question<any>, nb: number, max?: number) => Question<any>[];
|
|
10
|
+
export declare const getDistinctQuestions: (generator: () => Question<any>, nb: number, max?: number, discriminator?: ((q1: Question<any>, q2: Question<any>) => boolean) | undefined) => Question<any>[];
|
|
11
11
|
//# sourceMappingURL=getDistinctQuestions.d.ts.map
|
|
@@ -1 +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,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAOnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,cACpB,MAAM,SAAS,GAAG,CAAC,MAC1B,MAAM,QACJ,MAAM,
|
|
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,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAOnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,cACpB,MAAM,SAAS,GAAG,CAAC,MAC1B,MAAM,QACJ,MAAM,wBACS,SAAS,GAAG,CAAC,MAAM,SAAS,GAAG,CAAC,KAAK,OAAO,kBAChE,SAAS,GAAG,CAAC,EAaf,CAAC"}
|
|
@@ -21,19 +21,25 @@ exports.equalTab = equalTab;
|
|
|
21
21
|
* @param max included
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
|
-
const getDistinctQuestions = (generator, nb, max) => {
|
|
24
|
+
const getDistinctQuestions = (generator, nb, max, discriminator) => {
|
|
25
25
|
const res = [];
|
|
26
26
|
const trueStop = max === undefined ? nb : Math.min(nb, max);
|
|
27
27
|
for (let i = 0; i < trueStop ?? nb; i++) {
|
|
28
28
|
let question;
|
|
29
29
|
do {
|
|
30
30
|
question = generator();
|
|
31
|
-
} while (res.some((q) => q
|
|
32
|
-
q.answer === question.answer &&
|
|
33
|
-
(!q.ggbOptions?.commands ||
|
|
34
|
-
equalTab(q.ggbOptions?.commands, question.ggbOptions?.commands))));
|
|
31
|
+
} while (res.some((q) => compare(q, question, discriminator)));
|
|
35
32
|
res.push(question);
|
|
36
33
|
}
|
|
37
34
|
return res;
|
|
38
35
|
};
|
|
39
36
|
exports.getDistinctQuestions = getDistinctQuestions;
|
|
37
|
+
const compare = (q1, q2, discriminator) => {
|
|
38
|
+
if (!!discriminator) {
|
|
39
|
+
return discriminator(q1, q2);
|
|
40
|
+
}
|
|
41
|
+
return (q1.instruction === q2.instruction &&
|
|
42
|
+
q1.answer === q2.answer &&
|
|
43
|
+
(!q1.ggbOptions?.commands ||
|
|
44
|
+
equalTab(q1.ggbOptions?.commands, q2.ggbOptions?.commands)));
|
|
45
|
+
};
|
package/lib/geogebra/colors.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.randomColor = exports.colors = exports.purples = exports.purpleDark = exports.purpleMain = exports.purpleLight = exports.blues = exports.blueExtraDark = exports.blueMain = exports.blueDark = exports.blueLight = exports.greens = exports.greenDark = exports.greenMain = exports.greenLight = exports.oranges = exports.orangeLight = exports.orange = exports.orangeDark = exports.reds = exports.pinkLight = exports.pinkMain = exports.pinkDark = exports.red = void 0;
|
|
4
|
-
const random_1 = require("../utils/random");
|
|
4
|
+
const random_1 = require("../utils/alea/random");
|
|
5
5
|
exports.red = "#FF3333";
|
|
6
6
|
exports.pinkDark = "#A10039";
|
|
7
7
|
exports.pinkMain = "#D83F63";
|
|
@@ -5,7 +5,7 @@ const toolBarConstructor_1 = require("../exercises/utils/geogebra/toolBarConstru
|
|
|
5
5
|
class GeogebraConstructor {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
this.customToolBar = options?.customToolBar ?? (0, toolBarConstructor_1.toolBarConstructor)({});
|
|
8
|
-
this.forbidShiftDragZoom = options?.forbidShiftDragZoom;
|
|
8
|
+
this.forbidShiftDragZoom = options?.forbidShiftDragZoom ?? false;
|
|
9
9
|
this.commands = options.commands;
|
|
10
10
|
this.is3D = options?.is3D;
|
|
11
11
|
this.gridDistance = options?.gridDistance ?? [1, 1];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ggbPointToCoords.d.ts","sourceRoot":"","sources":["../../../src/geogebra/parsers/ggbPointToCoords.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,UAAW,MAAM;;;CAO7C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ggbPointToCoords = void 0;
|
|
4
|
+
const ggbPointToCoords = (point) => {
|
|
5
|
+
const [x, y] = point
|
|
6
|
+
.replace("(", "")
|
|
7
|
+
.replace(")", "")
|
|
8
|
+
.split(",")
|
|
9
|
+
.map(parseFloat);
|
|
10
|
+
return { x, y };
|
|
11
|
+
};
|
|
12
|
+
exports.ggbPointToCoords = ggbPointToCoords;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseGGBPoints.d.ts","sourceRoot":"","sources":["../../../src/geogebra/parsers/parseGGBPoints.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,aAAc,MAAM,EAAE,aAIhD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseGGBPoints = void 0;
|
|
4
|
+
const deleteObjectNamesFromAnswer_1 = require("../deleteObjectNamesFromAnswer");
|
|
5
|
+
const parseGGBPoints = (commands) => {
|
|
6
|
+
const unnamed = (0, deleteObjectNamesFromAnswer_1.deleteObjectNamesFromAnswer)(commands);
|
|
7
|
+
const re = /\([^,]*,[^)]*\)/;
|
|
8
|
+
return unnamed.filter((cmd) => !!cmd.match(re)?.length);
|
|
9
|
+
};
|
|
10
|
+
exports.parseGGBPoints = parseGGBPoints;
|
package/lib/index.d.ts
CHANGED
|
@@ -833,6 +833,34 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
833
833
|
}> | import("./exercises/exercise").Exercise<{
|
|
834
834
|
x: number;
|
|
835
835
|
y: number;
|
|
836
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
837
|
+
abscissType: import("./math/numbers/nombre").NumberType;
|
|
838
|
+
axisUnit: number;
|
|
839
|
+
oneUnitTex: string;
|
|
840
|
+
absciss: number;
|
|
841
|
+
abscissTex: string;
|
|
842
|
+
coeff: number;
|
|
843
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
844
|
+
abscissType: import("./math/numbers/nombre").NumberType;
|
|
845
|
+
axisUnit: number;
|
|
846
|
+
oneUnitTex: string;
|
|
847
|
+
absciss: number;
|
|
848
|
+
abscissTex: string;
|
|
849
|
+
coeff: number;
|
|
850
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
851
|
+
abscissType: import("./math/numbers/nombre").NumberType;
|
|
852
|
+
axisUnit: number;
|
|
853
|
+
oneUnitTex: string;
|
|
854
|
+
absciss: number;
|
|
855
|
+
abscissTex: string;
|
|
856
|
+
coeff: number;
|
|
857
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
858
|
+
abscissType: import("./math/numbers/nombre").NumberType;
|
|
859
|
+
axisUnit: number;
|
|
860
|
+
oneUnitTex: string;
|
|
861
|
+
absciss: number;
|
|
862
|
+
abscissTex: string;
|
|
863
|
+
coeff: number;
|
|
836
864
|
}> | import("./exercises/exercise").Exercise<{
|
|
837
865
|
coin: boolean;
|
|
838
866
|
radius: number;
|
|
@@ -1068,6 +1096,20 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
1068
1096
|
ttc: number;
|
|
1069
1097
|
ht: number;
|
|
1070
1098
|
tva: number;
|
|
1099
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1100
|
+
vd: number;
|
|
1101
|
+
vf: number;
|
|
1102
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1103
|
+
vf: number;
|
|
1104
|
+
percentRate: number;
|
|
1105
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1106
|
+
contextType: number;
|
|
1107
|
+
total: number;
|
|
1108
|
+
populationPercent: number;
|
|
1109
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1110
|
+
subPopulationEffectif: number;
|
|
1111
|
+
subPopulationPercent: number;
|
|
1112
|
+
contextType: number;
|
|
1071
1113
|
}> | import("./exercises/exercise").Exercise<{
|
|
1072
1114
|
int: number;
|
|
1073
1115
|
power: number;
|
|
@@ -1409,6 +1451,25 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
1409
1451
|
}> | import("./exercises/exercise").Exercise<{
|
|
1410
1452
|
degree: number;
|
|
1411
1453
|
trigoFunct: string;
|
|
1454
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1455
|
+
degree: number;
|
|
1456
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1457
|
+
degree: number;
|
|
1458
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1459
|
+
degree: number;
|
|
1460
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1461
|
+
degree: number;
|
|
1462
|
+
multipleOf2PiToAdd: number;
|
|
1463
|
+
nodeIds: any;
|
|
1464
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1465
|
+
degree: number;
|
|
1466
|
+
radianNodeIds: any;
|
|
1467
|
+
isDegreeToRadian: boolean;
|
|
1468
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1469
|
+
radius: number;
|
|
1470
|
+
thetaInDegree: number | undefined;
|
|
1471
|
+
thetaInRadNodeIds: any;
|
|
1472
|
+
isThetaInDegree: boolean;
|
|
1412
1473
|
}> | import("./exercises/exercise").Exercise<{
|
|
1413
1474
|
exercise: {
|
|
1414
1475
|
a: number;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AU,EAAE,OAAO,CAAC;IACpB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7B,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;gBACJ,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM;IAoBvD,YAAY,CAAC,KAAK,EAAE,KAAK;IASzB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,GAAE,OAAe;IAenD,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM;IAa5B,WAAW,MAAO,MAAM,KAAK,KAAK,KAAG,SAAS,CAmB5C;IAEF,oBAAoB,IAAI,SAAS;IAuBjC,KAAK;IAGL,gBAAgB;IAIhB,aAAa,CACX,iBAAiB,EAAE,OAAO,EAC1B,EACE,OAAc,EACd,SAAiB,EACjB,yBAAgC,GACjC,GAAE,kBAAuB;CAoB7B"}
|
|
@@ -66,7 +66,6 @@ class Line {
|
|
|
66
66
|
return point.x.equals(this.pointA.x);
|
|
67
67
|
}
|
|
68
68
|
const evaluation = new substractNode_1.SubstractNode(point.y, new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(this.a, point.x), this.b)).evaluate({});
|
|
69
|
-
console.log("eval", evaluation);
|
|
70
69
|
if (allowApprox) {
|
|
71
70
|
return Math.abs(evaluation) < 0.0000001;
|
|
72
71
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InequationSymbol = exports.InequationSymbolConstructor = void 0;
|
|
4
|
-
const random_1 = require("../../utils/random");
|
|
4
|
+
const random_1 = require("../../utils/alea/random");
|
|
5
5
|
class InequationSymbolConstructor {
|
|
6
6
|
static random() {
|
|
7
7
|
return new InequationSymbol((0, random_1.random)(["<", ">", "\\le", "\\ge"]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/decimals/decimal.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,UAAyC,CAAC;AACxE,8BAAsB,kBAAkB;IACtC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,GAAE,MAAU,GAAG,MAAM;IAY1E,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO;IAMpE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAK/D,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO;CAMrD;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,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/decimals/decimal.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE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,6 +54,16 @@ class Decimal {
|
|
|
54
54
|
this.decimalPart = decimalPartString || "";
|
|
55
55
|
this.precision = this.decimalPart.length;
|
|
56
56
|
}
|
|
57
|
+
times(n) {
|
|
58
|
+
if (typeof n === "number")
|
|
59
|
+
return new Decimal((0, round_1.round)(this.value * n, 10));
|
|
60
|
+
throw Error("unimplemnented");
|
|
61
|
+
// if (n.type === NumberType.Real) {
|
|
62
|
+
// throw Error("decimal times real not implemented");
|
|
63
|
+
// }
|
|
64
|
+
// if (n.type === NumberType.Rational)
|
|
65
|
+
// throw Error("decimal times real not implemented");
|
|
66
|
+
}
|
|
57
67
|
equals(n) {
|
|
58
68
|
return this.value === n.value;
|
|
59
69
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NumberNode } from "../../../tree/nodes/numbers/numberNode";
|
|
2
|
+
import { Decimal } from "../decimals/decimal";
|
|
2
3
|
import { Nombre, NumberType } from "../nombre";
|
|
3
4
|
import { Rational } from "../rationals/rational";
|
|
4
5
|
export declare const integerDigitRanks: string[];
|
|
@@ -14,6 +15,7 @@ export declare class Integer implements Nombre {
|
|
|
14
15
|
constructor(value: number, tex?: string);
|
|
15
16
|
equals(n: Nombre): boolean;
|
|
16
17
|
toTree(): NumberNode;
|
|
18
|
+
times(n: number | Nombre): Integer | Decimal;
|
|
17
19
|
round(precision: number): Integer;
|
|
18
20
|
divide(nb: Nombre): Nombre;
|
|
19
21
|
multiply(nb: Nombre): Rational | Integer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/integer/integer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,eAAO,MAAM,iBAAiB,UAK7B,CAAC;AAC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;IAGnC,MAAM,CAAC,gBAAgB,CACrB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,EACV,QAAQ,CAAC,EAAE,MAAM,EAAE;CAYtB;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,CAAC,CAAC,EAAE,MAAM;IAGhB,MAAM;IAIN,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAMxB,KAAK,CAAC,SAAS,EAAE,MAAM;IAkCvB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAc1B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO;IAYxC,QAAQ;IAGR,GAAG,CAAC,EAAE,EAAE,MAAM;CAYf"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Integer = exports.IntegerConstructor = exports.integerDigitRanks = void 0;
|
|
4
4
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
5
5
|
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
6
|
-
const random_1 = require("../../../utils/random");
|
|
6
|
+
const random_1 = require("../../../utils/alea/random");
|
|
7
7
|
const nombre_1 = require("../nombre");
|
|
8
8
|
const rational_1 = require("../rationals/rational");
|
|
9
9
|
const primes_1 = require("./primes");
|
|
@@ -45,6 +45,15 @@ class Integer {
|
|
|
45
45
|
toTree() {
|
|
46
46
|
return new numberNode_1.NumberNode(this.value, this.tex);
|
|
47
47
|
}
|
|
48
|
+
times(n) {
|
|
49
|
+
if (typeof n === "number")
|
|
50
|
+
return new Integer(this.value * n);
|
|
51
|
+
if (n.type === nombre_1.NumberType.Integer)
|
|
52
|
+
return new Integer(this.value * n.value);
|
|
53
|
+
if (n.type === nombre_1.NumberType.Decimal)
|
|
54
|
+
return n.times(n);
|
|
55
|
+
throw Error("unimplemented");
|
|
56
|
+
}
|
|
48
57
|
round(precision) {
|
|
49
58
|
const intString = this.value + "";
|
|
50
59
|
if (precision >= intString.length || precision < 1)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NombreConstructor = exports.NumberType = void 0;
|
|
4
|
-
const random_1 = require("../../utils/random");
|
|
4
|
+
const random_1 = require("../../utils/alea/random");
|
|
5
5
|
const randint_1 = require("../utils/random/randint");
|
|
6
6
|
const decimal_1 = require("./decimals/decimal");
|
|
7
7
|
const integer_1 = require("./integer/integer");
|
|
@@ -8,9 +8,9 @@ const randint_1 = require("../../../math/utils/random/randint");
|
|
|
8
8
|
const oppositeNode_1 = require("../../../tree/nodes/functions/oppositeNode");
|
|
9
9
|
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
10
10
|
const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
|
|
11
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
12
|
-
const random_1 = require("../../../utils/random");
|
|
13
|
-
const shuffle_1 = require("../../../utils/shuffle");
|
|
11
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
12
|
+
const random_1 = require("../../../utils/alea/random");
|
|
13
|
+
const shuffle_1 = require("../../../utils/alea/shuffle");
|
|
14
14
|
const integer_1 = require("../integer/integer");
|
|
15
15
|
const nombre_1 = require("../nombre");
|
|
16
16
|
class RationalConstructor {
|
|
@@ -8,8 +8,8 @@ const sqrtNode_1 = require("../../../tree/nodes/functions/sqrtNode");
|
|
|
8
8
|
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
9
9
|
const piNode_1 = require("../../../tree/nodes/numbers/piNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
|
|
11
|
-
const diceFlip_1 = require("../../../utils/diceFlip");
|
|
12
|
-
const random_1 = require("../../../utils/random");
|
|
11
|
+
const diceFlip_1 = require("../../../utils/alea/diceFlip");
|
|
12
|
+
const random_1 = require("../../../utils/alea/random");
|
|
13
13
|
const integer_1 = require("../integer/integer");
|
|
14
14
|
const primes_1 = require("../integer/primes");
|
|
15
15
|
const nombre_1 = require("../nombre");
|
|
@@ -8,7 +8,7 @@ const oppositeNode_1 = require("../../tree/nodes/functions/oppositeNode");
|
|
|
8
8
|
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
9
9
|
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
10
10
|
const randint_1 = require("../../math/utils/random/randint");
|
|
11
|
-
const coinFlip_1 = require("../../utils/coinFlip");
|
|
11
|
+
const coinFlip_1 = require("../../utils/alea/coinFlip");
|
|
12
12
|
const rational_1 = require("../numbers/rationals/rational");
|
|
13
13
|
const infiniteNode_1 = require("../../tree/nodes/numbers/infiniteNode");
|
|
14
14
|
class PolynomialConstructor {
|
|
@@ -15,7 +15,7 @@ const polynomial_1 = require("./polynomial");
|
|
|
15
15
|
const oppositeNode_1 = require("../../tree/nodes/functions/oppositeNode");
|
|
16
16
|
const gcd_1 = require("../utils/arithmetic/gcd");
|
|
17
17
|
const randint_1 = require("../utils/random/randint");
|
|
18
|
-
const random_1 = require("../../utils/random");
|
|
18
|
+
const random_1 = require("../../utils/alea/random");
|
|
19
19
|
const colors_1 = require("../../geogebra/colors");
|
|
20
20
|
class TrinomConstructor {
|
|
21
21
|
static random(aOpts, bOpts, cOpts) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MultiplyNode } from
|
|
2
|
-
import { Nombre, NumberType } from
|
|
1
|
+
import { MultiplyNode } from "../../tree/nodes/operators/multiplyNode";
|
|
2
|
+
import { Nombre, NumberType } from "../numbers/nombre";
|
|
3
3
|
export declare abstract class GeometricSequenceConstructor {
|
|
4
4
|
static random(reasonType?: NumberType): GeometricSequence;
|
|
5
5
|
static randomWithLimit(reasonType?: NumberType): GeometricSequence;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricSequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/geometricSequence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAOvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIvD,8BAAsB,4BAA4B;IAChD,MAAM,CAAC,MAAM,CAAC,UAAU,GAAE,UAA+B;
|
|
1
|
+
{"version":3,"file":"geometricSequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/geometricSequence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAOvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIvD,8BAAsB,4BAA4B;IAChD,MAAM,CAAC,MAAM,CAAC,UAAU,GAAE,UAA+B;IAoBzD,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,UAAU;CA2B/C;AAED,qBAAa,iBAAiB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;gBAEH,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK7C,QAAQ;IAOR,MAAM;CASP"}
|
|
@@ -4,8 +4,8 @@ exports.GeometricSequence = exports.GeometricSequenceConstructor = void 0;
|
|
|
4
4
|
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
5
5
|
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
6
6
|
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
7
|
-
const coinFlip_1 = require("../../utils/coinFlip");
|
|
8
|
-
const random_1 = require("../../utils/random");
|
|
7
|
+
const coinFlip_1 = require("../../utils/alea/coinFlip");
|
|
8
|
+
const random_1 = require("../../utils/alea/random");
|
|
9
9
|
const decimal_1 = require("../numbers/decimals/decimal");
|
|
10
10
|
const integer_1 = require("../numbers/integer/integer");
|
|
11
11
|
const nombre_1 = require("../numbers/nombre");
|
|
@@ -14,7 +14,8 @@ const randint_1 = require("../utils/random/randint");
|
|
|
14
14
|
class GeometricSequenceConstructor {
|
|
15
15
|
static random(reasonType = nombre_1.NumberType.Integer) {
|
|
16
16
|
let reason;
|
|
17
|
-
const type = reasonType ??
|
|
17
|
+
const type = reasonType ??
|
|
18
|
+
(0, random_1.random)([nombre_1.NumberType.Decimal, nombre_1.NumberType.Integer, nombre_1.NumberType.Rational]);
|
|
18
19
|
switch (type) {
|
|
19
20
|
case nombre_1.NumberType.Decimal:
|
|
20
21
|
reason = decimal_1.DecimalConstructor.random(-9, 10);
|
|
@@ -26,18 +27,19 @@ class GeometricSequenceConstructor {
|
|
|
26
27
|
reason = rational_1.RationalConstructor.randomIrreductible();
|
|
27
28
|
break;
|
|
28
29
|
case nombre_1.NumberType.Real:
|
|
29
|
-
throw Error(
|
|
30
|
+
throw Error("real geometric reason not supported yet");
|
|
30
31
|
}
|
|
31
32
|
return new GeometricSequence(new integer_1.Integer((0, randint_1.randint)(-9, 10, [0, 1])), reason);
|
|
32
33
|
}
|
|
33
34
|
static randomWithLimit(reasonType) {
|
|
34
35
|
let reason;
|
|
35
|
-
const type = reasonType ??
|
|
36
|
+
const type = reasonType ??
|
|
37
|
+
(0, random_1.random)([nombre_1.NumberType.Decimal, nombre_1.NumberType.Integer, nombre_1.NumberType.Rational]);
|
|
36
38
|
switch (type) {
|
|
37
39
|
case nombre_1.NumberType.Decimal:
|
|
38
40
|
const precision = (0, randint_1.randint)(1, 4);
|
|
39
41
|
reason = (0, coinFlip_1.coinFlip)()
|
|
40
|
-
? decimal_1.DecimalConstructor.fromParts((0, coinFlip_1.coinFlip)() ?
|
|
42
|
+
? decimal_1.DecimalConstructor.fromParts((0, coinFlip_1.coinFlip)() ? "0" : "-0", decimal_1.DecimalConstructor.randomFracPart(precision))
|
|
41
43
|
: decimal_1.DecimalConstructor.random(1, 10);
|
|
42
44
|
break;
|
|
43
45
|
case nombre_1.NumberType.Integer:
|
|
@@ -47,7 +49,7 @@ class GeometricSequenceConstructor {
|
|
|
47
49
|
reason = rational_1.RationalConstructor.randomIrreductible();
|
|
48
50
|
break;
|
|
49
51
|
case nombre_1.NumberType.Real:
|
|
50
|
-
throw Error(
|
|
52
|
+
throw Error("real geometric reason not supported yet");
|
|
51
53
|
}
|
|
52
54
|
return new GeometricSequence(new integer_1.Integer((0, randint_1.randint)(-9, 10, [0, 1])), reason);
|
|
53
55
|
}
|
|
@@ -62,13 +64,13 @@ class GeometricSequence {
|
|
|
62
64
|
if (this.reason.value <= -1)
|
|
63
65
|
return null;
|
|
64
66
|
if (this.reason.value === 1)
|
|
65
|
-
return this.firstTerm +
|
|
67
|
+
return this.firstTerm + "";
|
|
66
68
|
if (this.reason.value > 1)
|
|
67
|
-
return this.firstTerm.value > 0 ?
|
|
68
|
-
return
|
|
69
|
+
return this.firstTerm.value > 0 ? "+\\infty" : "-\\infty";
|
|
70
|
+
return "0";
|
|
69
71
|
}
|
|
70
72
|
toTree() {
|
|
71
|
-
return new multiplyNode_1.MultiplyNode(this.firstTerm.toTree(), new powerNode_1.PowerNode(this.reason.toTree(), new variableNode_1.VariableNode(
|
|
73
|
+
return new multiplyNode_1.MultiplyNode(this.firstTerm.toTree(), new powerNode_1.PowerNode(this.reason.toTree(), new variableNode_1.VariableNode("n")), {
|
|
72
74
|
forceTimesSign: true,
|
|
73
75
|
});
|
|
74
76
|
}
|