math-exercises 2.2.27 → 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/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.js +1 -1
- 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 +12 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +151 -91
- 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.js +2 -2
- 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/integer/integer.js +1 -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 -31
- 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/package.json +1 -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAEvF,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAoB,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,8BAAsB,eAAe;IACnC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM;CAK5B;AACD,qBAAa,IAAI;IACf,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7B,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;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;
|
|
1
|
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAEvF,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAoB,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,8BAAsB,eAAe;IACnC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM;CAK5B;AACD,qBAAa,IAAI;IACf,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7B,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;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"]));
|
|
@@ -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");
|
|
@@ -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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Nombre } from
|
|
2
|
-
import { MathSetInterface } from
|
|
1
|
+
import { Nombre } from "../numbers/nombre";
|
|
2
|
+
import { MathSetInterface } from "./mathSetInterface";
|
|
3
3
|
export declare class DiscreteSet implements MathSetInterface {
|
|
4
4
|
elements: Nombre[];
|
|
5
5
|
tex: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discreteSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/discreteSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,WAAY,YAAW,gBAAgB;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;gBACA,QAAQ,EAAE,MAAM,EAAE;IAW9B,KAAK,IAAI,MAAM;IAIf,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"discreteSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/discreteSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,WAAY,YAAW,gBAAgB;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;gBACA,QAAQ,EAAE,MAAM,EAAE;IAW9B,KAAK,IAAI,MAAM;IAIf,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAM7B,gBAAgB,IAAI,MAAM;CAG3B"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DiscreteSet = void 0;
|
|
4
|
-
const random_1 = require("../../utils/random");
|
|
4
|
+
const random_1 = require("../../utils/alea/random");
|
|
5
5
|
class DiscreteSet {
|
|
6
6
|
constructor(elements) {
|
|
7
7
|
this.elements = Array.from(new Set(elements));
|
|
8
|
-
let tex =
|
|
8
|
+
let tex = "\\{";
|
|
9
9
|
this.elements.forEach((el, index) => {
|
|
10
10
|
tex += el.tex;
|
|
11
11
|
if (index < this.elements.length - 1)
|
|
12
|
-
tex +=
|
|
12
|
+
tex += ";";
|
|
13
13
|
else
|
|
14
|
-
tex +=
|
|
14
|
+
tex += "\\}";
|
|
15
15
|
});
|
|
16
16
|
this.tex = tex;
|
|
17
17
|
}
|
|
@@ -6,7 +6,7 @@ const infiniteNode_1 = require("../../../tree/nodes/numbers/infiniteNode");
|
|
|
6
6
|
const closure_1 = require("../../../tree/nodes/sets/closure");
|
|
7
7
|
const discreteSetNode_1 = require("../../../tree/nodes/sets/discreteSetNode");
|
|
8
8
|
const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
|
|
9
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
10
10
|
const mathSet_1 = require("../mathSet");
|
|
11
11
|
class IntervalConstructor {
|
|
12
12
|
static random() {
|
|
@@ -5,7 +5,7 @@ const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
|
5
5
|
const piNode_1 = require("../../tree/nodes/numbers/piNode");
|
|
6
6
|
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
7
7
|
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
8
|
-
const random_1 = require("../../utils/random");
|
|
8
|
+
const random_1 = require("../../utils/alea/random");
|
|
9
9
|
const randint_1 = require("../utils/random/randint");
|
|
10
10
|
const remarkableValues_1 = require("./remarkableValues");
|
|
11
11
|
class RemarkableValueConstructor {
|
|
@@ -7,5 +7,8 @@ export interface RemarkableValue {
|
|
|
7
7
|
tan: AlgebraicNode;
|
|
8
8
|
point: string;
|
|
9
9
|
}
|
|
10
|
+
export declare const negativeMainTrigovalues: RemarkableValue[];
|
|
10
11
|
export declare const remarkableTrigoValues: RemarkableValue[];
|
|
12
|
+
export declare const mainTrigoValues: RemarkableValue[];
|
|
13
|
+
export declare const mainPositiveTrigovalues: RemarkableValue[];
|
|
11
14
|
//# sourceMappingURL=remarkableValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQ/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,aAAa,CAAC;IACnB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,qBAAqB,EAAE,eAAe,EA2LlD,CAAC"}
|
|
1
|
+
{"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQ/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,aAAa,CAAC;IACnB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAoGpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAAe,EA2LlD,CAAC;AAEF,eAAO,MAAM,eAAe,mBAG3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAAoC,CAAC"}
|
|
@@ -1,12 +1,78 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.remarkableTrigoValues = void 0;
|
|
3
|
+
exports.mainPositiveTrigovalues = exports.mainTrigoValues = exports.remarkableTrigoValues = exports.negativeMainTrigovalues = void 0;
|
|
4
4
|
const oppositeNode_1 = require("../../tree/nodes/functions/oppositeNode");
|
|
5
5
|
const sqrtNode_1 = require("../../tree/nodes/functions/sqrtNode");
|
|
6
6
|
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
7
7
|
const piNode_1 = require("../../tree/nodes/numbers/piNode");
|
|
8
8
|
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
9
9
|
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
exports.negativeMainTrigovalues = [
|
|
11
|
+
{
|
|
12
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(5), piNode_1.PiNode), new numberNode_1.NumberNode(6))),
|
|
13
|
+
degree: 210,
|
|
14
|
+
cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
|
|
15
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
|
|
16
|
+
tan: new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3))),
|
|
17
|
+
point: "H",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(3), piNode_1.PiNode), new numberNode_1.NumberNode(4))),
|
|
21
|
+
degree: 225,
|
|
22
|
+
cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
|
|
23
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
|
|
24
|
+
tan: new numberNode_1.NumberNode(1),
|
|
25
|
+
point: "K",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(2), piNode_1.PiNode), new numberNode_1.NumberNode(3))),
|
|
29
|
+
degree: 240,
|
|
30
|
+
cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
|
|
31
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
|
|
32
|
+
tan: new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)),
|
|
33
|
+
point: "L",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(2))),
|
|
37
|
+
degree: 270,
|
|
38
|
+
cos: new numberNode_1.NumberNode(0),
|
|
39
|
+
sin: new numberNode_1.NumberNode(-1),
|
|
40
|
+
tan: new numberNode_1.NumberNode(Infinity),
|
|
41
|
+
point: "M",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(3))),
|
|
45
|
+
degree: 300,
|
|
46
|
+
cos: new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2)),
|
|
47
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
|
|
48
|
+
tan: new oppositeNode_1.OppositeNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3))),
|
|
49
|
+
point: "N",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(4))),
|
|
53
|
+
degree: 315,
|
|
54
|
+
cos: new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2)),
|
|
55
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
|
|
56
|
+
tan: new oppositeNode_1.OppositeNode(new numberNode_1.NumberNode(1)),
|
|
57
|
+
point: "P",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(6))),
|
|
61
|
+
degree: 330,
|
|
62
|
+
cos: new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2)),
|
|
63
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
|
|
64
|
+
tan: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)))),
|
|
65
|
+
point: "Q",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
angle: new numberNode_1.NumberNode(0),
|
|
69
|
+
degree: 0,
|
|
70
|
+
cos: new numberNode_1.NumberNode(1),
|
|
71
|
+
sin: new numberNode_1.NumberNode(0),
|
|
72
|
+
tan: new numberNode_1.NumberNode(0),
|
|
73
|
+
point: "I",
|
|
74
|
+
},
|
|
75
|
+
];
|
|
10
76
|
exports.remarkableTrigoValues = [
|
|
11
77
|
{
|
|
12
78
|
angle: new numberNode_1.NumberNode(0),
|
|
@@ -137,3 +203,8 @@ exports.remarkableTrigoValues = [
|
|
|
137
203
|
point: "Q",
|
|
138
204
|
},
|
|
139
205
|
];
|
|
206
|
+
exports.mainTrigoValues = [
|
|
207
|
+
...exports.negativeMainTrigovalues,
|
|
208
|
+
...exports.remarkableTrigoValues.slice(1).slice(0, 8),
|
|
209
|
+
];
|
|
210
|
+
exports.mainPositiveTrigovalues = exports.remarkableTrigoValues.slice(0, 9);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.distinctRandTupleInt = exports.randTupleInt = void 0;
|
|
4
|
-
const arrayEqual_1 = require("../../../utils/arrayEqual");
|
|
4
|
+
const arrayEqual_1 = require("../../../utils/arrays/arrayEqual");
|
|
5
5
|
const randint_1 = require("./randint");
|
|
6
6
|
/**
|
|
7
7
|
* @param size tuple length
|
package/lib/playground.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,UAAU,YAEtB,CAAC"}
|