math-exercises 3.0.56 → 3.0.58
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/math/calcul/operations/operationsPriorities.d.ts +2 -0
- package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPriorities.js +46 -36
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/choseOperationToSolveEquation.js +65 -13
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -4
- package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts +16 -0
- package/lib/exercises/math/calculLitteral/factorisation/facto1.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/facto1.js +184 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +43 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +23 -0
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +23 -0
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +49 -0
- package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +68 -12
- package/lib/exercises/math/conversion/hoursToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/conversion/hoursToDecimal.js +73 -15
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +55 -6
- package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/massConversion.js +72 -16
- package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeConversion.js +72 -12
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts +8 -0
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/convexityQuadrinomials.js +102 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts +7 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/convexityTrinomials.js +52 -0
- package/lib/exercises/math/derivation/convexity/index.d.ts +4 -0
- package/lib/exercises/math/derivation/convexity/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/index.js +3 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts +7 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.d.ts.map +1 -0
- package/lib/exercises/math/derivation/convexity/inflexionPointQuadrinomials.js +134 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +79 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +85 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +86 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +76 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts +6 -0
- package/lib/exercises/math/derivation/derivative/exp/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/index.js +5 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +84 -0
- package/lib/exercises/math/derivation/derivative/index.d.ts +6 -27
- package/lib/exercises/math/derivation/derivative/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/index.js +6 -27
- package/lib/exercises/math/derivation/derivative/ln/index.d.ts +4 -0
- package/lib/exercises/math/derivation/derivative/ln/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/index.js +3 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeOne.js +81 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeThree.js +103 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/ln/lnDerivativeTwo.js +77 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/constanteDerivative.js +71 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts +11 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/firstDegreeDerivative.js +88 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/index.js +7 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDegreeDerivative.js +115 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfThirdDegreeFunction.js +80 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/secondDerivativeOfTrinom.js +67 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts +10 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/thirdDegreeDerivative.js +134 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts +11 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/polynomial/usualderivative.js +97 -0
- package/lib/exercises/math/derivation/derivative/power/index.d.ts +3 -0
- package/lib/exercises/math/derivation/derivative/power/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/index.js +2 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/powerCompositionDerivation.js +122 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/power/powerFunctionDerivative.js +118 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts +3 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/index.js +3 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/rootFunctionDerivative.js +115 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +77 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/sqrt/sqrtProductDerivative.js +85 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosCompositionDerivation.js +81 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/cosSecondDegreeDerivative.js +103 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +5 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.js +4 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCompositionDerivation.js +70 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts +7 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinSecondDegreeDerivative.js +91 -0
- package/lib/exercises/math/derivation/derivativeNumberCalcul.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumberCalcul.js +4 -2
- package/lib/exercises/math/derivation/index.d.ts +2 -0
- package/lib/exercises/math/derivation/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/index.js +2 -0
- package/lib/exercises/math/derivation/variations/index.d.ts +2 -0
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/index.js +1 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts +11 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/thirdDegreeFunctionVariation.js +168 -0
- package/lib/exercises/math/equaDiff/equaDiffAyPlusB.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffAyPlusB.js +39 -22
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +7 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +38 -15
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +29 -8
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts +8 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +86 -0
- package/lib/exercises/math/equaDiff/index.d.ts +1 -1
- package/lib/exercises/math/equaDiff/index.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/index.js +1 -1
- package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/signFunction.js +23 -11
- package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +3 -0
- package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expFactorization.js +3 -0
- package/lib/exercises/math/functions/exponential/expSimplifiying.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expSimplifiying.js +83 -45
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +12 -5
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildRhombus.js +63 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +68 -29
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationsIntersection.js +56 -4
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +71 -25
- package/lib/exercises/math/limits/polynomLimit.d.ts +1 -1
- package/lib/exercises/math/limits/polynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimit.js +28 -9
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.js +29 -10
- package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculateNegativePower.js +59 -16
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +55 -11
- package/lib/exercises/math/powers/index.d.ts +1 -0
- package/lib/exercises/math/powers/index.d.ts.map +1 -1
- package/lib/exercises/math/powers/index.js +1 -0
- package/lib/exercises/math/powers/powersDivision.d.ts +5 -2
- package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersDivision.js +68 -53
- package/lib/exercises/math/powers/powersMixOperations.d.ts +1 -0
- package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersMixOperations.js +88 -17
- package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts +10 -0
- package/lib/exercises/math/powers/powersOfTenMixOperations.d.ts.map +1 -0
- package/lib/exercises/math/powers/powersOfTenMixOperations.js +129 -0
- package/lib/exercises/math/powers/powersOfTenToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersOfTenToDecimal.js +32 -3
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +1 -0
- package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/scientificToDecimal.js +50 -10
- package/lib/exercises/math/primitive/klogUPrimitive.js +1 -1
- package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +42 -11
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.js +8 -20
- package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/etendueList.js +4 -6
- package/lib/exercises/math/probaStat/stats1var/interquartilesList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/interquartilesList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/interquartilesTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/interquartilesTable.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -9
- package/lib/exercises/math/probaStat/stats1var/median.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/median.js +19 -14
- package/lib/exercises/math/probaStat/stats1var/medianList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/medianList.js +3 -0
- package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartiles.js +16 -11
- package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartilesList.js +18 -14
- package/lib/exercises/math/probaStat/stats1var/standardDeviationList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/varianceList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/varianceList.js +4 -4
- package/lib/exercises/math/probaStat/stats1var/varianceTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/varianceTable.js +4 -4
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +40 -2
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +32 -0
- package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometry.js +67 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +89 -0
- package/lib/exercises/pc/index.d.ts +5 -5
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +5 -5
- package/lib/index.d.ts +56 -45
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/angle.d.ts.map +1 -1
- package/lib/math/geometry/angle.js +0 -5
- package/lib/math/geometry/vector.d.ts +1 -0
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +19 -0
- 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 +2 -0
- package/lib/math/systems/generalSystem.d.ts +6 -1
- package/lib/math/systems/generalSystem.d.ts.map +1 -1
- package/lib/math/systems/generalSystem.js +137 -0
- package/lib/math/utils/arithmetic/lcm.js +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +4 -34
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.d.ts +7 -1
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +17 -9
- package/lib/tree/nodes/functions/logNode.js +2 -4
- package/lib/tree/nodes/operators/addNode.js +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +35 -11
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +4 -3
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +5 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +3 -1
- package/lib/tree/parsers/latexParser.js +6 -2
- package/package.json +1 -1
|
@@ -5,7 +5,10 @@ import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js
|
|
|
5
5
|
import { Line, LineConstructor } from "../../../../math/geometry/line.js";
|
|
6
6
|
import { Point, PointConstructor, } from "../../../../math/geometry/point.js";
|
|
7
7
|
import { Vector, VectorConstructor, } from "../../../../math/geometry/vector.js";
|
|
8
|
+
import { gcd } from "../../../../math/utils/arithmetic/gcd.js";
|
|
8
9
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
10
|
+
import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
|
|
11
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
9
12
|
const getCartesianEquation = (identifiers) => {
|
|
10
13
|
const { pointIds, vectorIds } = identifiers;
|
|
11
14
|
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
@@ -20,11 +23,61 @@ $$
|
|
|
20
23
|
${getCartesianEquation(identifiers).toTex()}
|
|
21
24
|
$$`;
|
|
22
25
|
};
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
const getHint = (identifiers) => {
|
|
27
|
+
const u = new Vector("u", opposite("b"), "a".toTree());
|
|
28
|
+
return `On peut commencer par chercher les coordonnées d'un point appartenant à la droite. Pour cela, on peut remplacer par exemple $x$ par $0$ et en déduire l'ordonnée $y$ du point d'abscisse $0$ de la droite.
|
|
29
|
+
|
|
30
|
+
Ensuite, on détermine les coordonnées d'un vecteur directeur de la droite. Une droite admettant une équation cartésienne de la forme :
|
|
31
|
+
|
|
32
|
+
$$
|
|
33
|
+
ax+by+c=0
|
|
34
|
+
$$
|
|
35
|
+
|
|
36
|
+
admet le vecteur $${u.toTexWithCoords()}$ comme vecteur directeur.
|
|
37
|
+
`;
|
|
38
|
+
};
|
|
39
|
+
const getCorrection = (identifiers) => {
|
|
40
|
+
const equa = getCartesianEquation(identifiers);
|
|
41
|
+
const detailed = equa.toDetailedEvaluation({ x: (0).toTree() });
|
|
42
|
+
const detailedSimp = detailed.simplify({
|
|
43
|
+
towardsDistribute: true,
|
|
44
|
+
forbidFactorize: true,
|
|
45
|
+
});
|
|
46
|
+
const y = detailedSimp.isolate("y");
|
|
47
|
+
const { pointIds, vectorIds } = identifiers;
|
|
48
|
+
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
49
|
+
const u = new Vector("u", opposite("b"), "a".toTree());
|
|
50
|
+
const vector = VectorConstructor.fromIdentifiers(vectorIds);
|
|
51
|
+
return `On remplace $x$ par $0$ dans l'équation de la droite pour déterminer l'ordonnée $y$ du point d'abscisse $0$ de la droite :
|
|
52
|
+
|
|
53
|
+
${alignTex([[detailed.toTex()], [detailedSimp.toTex()], [y.toTex()]])}
|
|
54
|
+
|
|
55
|
+
Le point $${point.toTexWithCoords()}$ appartient donc à la droite $d$ : on peut le placer sur le graphique.
|
|
56
|
+
|
|
57
|
+
Puis, on détermine les coordonnées d'un vecteur directeur de $d$. On sait qu'une droite admettant une équation cartésienne de la forme :
|
|
58
|
+
|
|
59
|
+
$$
|
|
60
|
+
ax+by+c=0
|
|
61
|
+
$$
|
|
62
|
+
|
|
63
|
+
admet le vecteur $${u.toTexWithCoords()}$ comme vecteur directeur.
|
|
64
|
+
|
|
65
|
+
Ici, un vecteur directeur de $d$ est donc $${vector.toTexWithCoords()}$.
|
|
66
|
+
|
|
67
|
+
Pour tracer la droite $d$, on peut donc partir du point $A$, puis tracer le vecteur $${vector.toTex()}$. Cela nous donne un deuxième point $B$. On relie alors les points $A$ et $B$ pour obtenir la droite $d$.`;
|
|
68
|
+
};
|
|
25
69
|
const getGGBAnswer = (identifiers) => {
|
|
70
|
+
const { pointIds, vectorIds } = identifiers;
|
|
71
|
+
const point = PointConstructor.fromIdentifiers(pointIds);
|
|
72
|
+
const vector = VectorConstructor.fromIdentifiers(vectorIds);
|
|
73
|
+
const B = vector.getEndPoint(point, "B");
|
|
26
74
|
const equa = getCartesianEquation(identifiers).toMathString();
|
|
27
|
-
return [
|
|
75
|
+
return [
|
|
76
|
+
...point.toGGBCommand(),
|
|
77
|
+
...B.toGGBCommand(),
|
|
78
|
+
`d = Line(A,B)`,
|
|
79
|
+
`SetFixed(d, true)`,
|
|
80
|
+
];
|
|
28
81
|
};
|
|
29
82
|
const getStudentGGBOptions = (identifiers) => {
|
|
30
83
|
// throw new Error("vea devrait accepter arrondis");
|
|
@@ -72,24 +125,16 @@ const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
|
|
|
72
125
|
return line.includes(point, 0.5) && line.includes(B, 0.5);
|
|
73
126
|
};
|
|
74
127
|
const getDrawLineFromCartesianEquationQuestion = () => {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
// "B",
|
|
86
|
-
// add(A.x, randint(-3, 4, [0])),
|
|
87
|
-
// add(A.y, randint(-3, 4, [0])),
|
|
88
|
-
// );
|
|
89
|
-
// }
|
|
90
|
-
const x = randint(-3, 4);
|
|
91
|
-
const y = randint(-3, 4, x === 0 ? [0] : undefined);
|
|
92
|
-
const vec = new Vector("u", x.toTree(), y.toTree());
|
|
128
|
+
let a;
|
|
129
|
+
let b;
|
|
130
|
+
let c;
|
|
131
|
+
do {
|
|
132
|
+
a = randint(-9, 10, [0]);
|
|
133
|
+
b = randint(-9, 10, [0]);
|
|
134
|
+
c = randint(-4, 5, [0]) * b; //pour que (0;y)=> y entier
|
|
135
|
+
} while (gcd(a, b, c) !== 1 || (a <= 0 && b <= 0 && c <= 0));
|
|
136
|
+
const A = new Point("A", (0).toTree(), -c / b);
|
|
137
|
+
const vec = new Vector("u", (-b).toTree(), a.toTree());
|
|
93
138
|
const identifiers = {
|
|
94
139
|
pointIds: A.toIdentifiers(),
|
|
95
140
|
vectorIds: vec.toIdentifiers(),
|
|
@@ -102,8 +147,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
102
147
|
instruction: getInstruction(identifiers),
|
|
103
148
|
studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
104
149
|
identifiers,
|
|
105
|
-
|
|
106
|
-
|
|
150
|
+
hint: getHint(identifiers),
|
|
151
|
+
correction: getCorrection(identifiers),
|
|
107
152
|
};
|
|
108
153
|
};
|
|
109
154
|
export const drawLineFromCartesianEquation = {
|
|
@@ -114,11 +159,12 @@ export const drawLineFromCartesianEquation = {
|
|
|
114
159
|
ggbTimer: 60,
|
|
115
160
|
isGGBAnswerValid,
|
|
116
161
|
subject: "Mathématiques",
|
|
117
|
-
|
|
162
|
+
getHint,
|
|
118
163
|
getInstruction,
|
|
119
|
-
|
|
164
|
+
getCorrection,
|
|
120
165
|
getGGBAnswer,
|
|
121
166
|
getStudentGGBOptions,
|
|
122
167
|
answerType: "GGB",
|
|
123
168
|
getQuestionFromIdentifiers,
|
|
169
|
+
hasHintAndCorrection: true,
|
|
124
170
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polynomLimit.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/limits/polynomLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"polynomLimit.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/limits/polynomLimit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,EAAE,EAAE,UAAU,GAAG,UAAU,CAAC;CAC7B,CAAC;AA6DF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
|
|
@@ -1,24 +1,42 @@
|
|
|
1
1
|
import { addValidProp, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
-
import { PolynomialConstructor, } from "../../../math/polynomials/polynomial.js";
|
|
3
|
+
import { Polynomial, PolynomialConstructor, } from "../../../math/polynomials/polynomial.js";
|
|
4
4
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
5
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
6
6
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { coeffs, to } = identifiers;
|
|
9
|
+
const poly = new Polynomial(coeffs);
|
|
10
|
+
return `Déterminer la limite en $${to}$ de la fonction $f$ définie par :
|
|
11
|
+
|
|
12
|
+
$$
|
|
13
|
+
f(x) = ${poly.toTree().toTex()}
|
|
14
|
+
$$`;
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const { coeffs, to } = identifiers;
|
|
18
|
+
const poly = new Polynomial(coeffs);
|
|
10
19
|
const answer = poly.getLimit(to);
|
|
20
|
+
return answer;
|
|
21
|
+
};
|
|
22
|
+
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
23
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
24
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
11
25
|
const question = {
|
|
12
|
-
answer:
|
|
13
|
-
instruction:
|
|
14
|
-
.toTree()
|
|
15
|
-
.toTex()}$.`,
|
|
26
|
+
answer: getAnswer(identifiers),
|
|
27
|
+
instruction: getInstruction(identifiers),
|
|
16
28
|
keys: ["infty"],
|
|
17
29
|
answerFormat: "tex",
|
|
18
|
-
identifiers
|
|
30
|
+
identifiers,
|
|
19
31
|
};
|
|
20
32
|
return question;
|
|
21
33
|
};
|
|
34
|
+
const getPolynomLimitQuestion = () => {
|
|
35
|
+
const poly = PolynomialConstructor.random(4);
|
|
36
|
+
const to = coinFlip() ? "+\\infty" : "-\\infty";
|
|
37
|
+
const identifiers = { coeffs: poly.coefficients, to };
|
|
38
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
39
|
+
};
|
|
22
40
|
const getPropositions = (n, { answer, coeffs }) => {
|
|
23
41
|
const propositions = [];
|
|
24
42
|
addValidProp(propositions, answer);
|
|
@@ -48,4 +66,5 @@ export const polynomLimit = {
|
|
|
48
66
|
getPropositions,
|
|
49
67
|
isAnswerValid,
|
|
50
68
|
subject: "Mathématiques",
|
|
69
|
+
getQuestionFromIdentifiers,
|
|
51
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polynomLimitNoFI.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/limits/polynomLimitNoFI.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"polynomLimitNoFI.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/limits/polynomLimitNoFI.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,EAAE,EAAE,UAAU,GAAG,UAAU,CAAC;CAC7B,CAAC;AAgEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -1,25 +1,43 @@
|
|
|
1
1
|
import { addValidProp, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
-
import { PolynomialConstructor } from "../../../math/polynomials/polynomial.js";
|
|
3
|
+
import { Polynomial, PolynomialConstructor, } from "../../../math/polynomials/polynomial.js";
|
|
4
4
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
5
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
6
6
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { coeffs, to } = identifiers;
|
|
9
|
+
const poly = new Polynomial(coeffs);
|
|
10
|
+
return `Déterminer la limite en $${to}$ de la fonction $f$ définie par :
|
|
11
|
+
|
|
12
|
+
$$
|
|
13
|
+
f(x) = ${poly.toTree().toTex()}
|
|
14
|
+
$$`;
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const { coeffs, to } = identifiers;
|
|
18
|
+
const poly = new Polynomial(coeffs);
|
|
11
19
|
const answer = poly.getLimit(to);
|
|
20
|
+
return answer;
|
|
21
|
+
};
|
|
22
|
+
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
23
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
24
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
12
25
|
const question = {
|
|
13
|
-
answer:
|
|
14
|
-
instruction:
|
|
15
|
-
.toTree()
|
|
16
|
-
.toTex()}$.`,
|
|
26
|
+
answer: getAnswer(identifiers),
|
|
27
|
+
instruction: getInstruction(identifiers),
|
|
17
28
|
keys: ["infty"],
|
|
18
29
|
answerFormat: "tex",
|
|
19
|
-
identifiers
|
|
30
|
+
identifiers,
|
|
20
31
|
};
|
|
21
32
|
return question;
|
|
22
33
|
};
|
|
34
|
+
const getSequencePolynomNoFILimitQuestion = () => {
|
|
35
|
+
const length = randint(2, 5);
|
|
36
|
+
const to = coinFlip() ? "+\\infty" : "-\\infty";
|
|
37
|
+
const poly = PolynomialConstructor.randomNoFI(4, to, length);
|
|
38
|
+
const identifiers = { coeffs: poly.coefficients, to };
|
|
39
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
40
|
+
};
|
|
23
41
|
const getPropositions = (n, { answer, coeffs }) => {
|
|
24
42
|
const propositions = [];
|
|
25
43
|
addValidProp(propositions, answer);
|
|
@@ -48,4 +66,5 @@ export const polynomLimitNoFI = {
|
|
|
48
66
|
getPropositions,
|
|
49
67
|
isAnswerValid,
|
|
50
68
|
subject: "Mathématiques",
|
|
69
|
+
getQuestionFromIdentifiers,
|
|
51
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateNegativePower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/calculateNegativePower.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"calculateNegativePower.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/calculateNegativePower.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAmHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -1,28 +1,65 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
-
import { Power } from "../../../math/numbers/integer/power.js";
|
|
4
3
|
import { Rational } from "../../../math/numbers/rationals/rational.js";
|
|
5
4
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
6
|
-
import { NumberNode } from "../../../tree/nodes/numbers/numberNode.js";
|
|
7
|
-
import {
|
|
5
|
+
import { isNumberNode, NumberNode, } from "../../../tree/nodes/numbers/numberNode.js";
|
|
6
|
+
import { frac, isFractionNode, } from "../../../tree/nodes/operators/fractionNode.js";
|
|
8
7
|
import { PowerNode } from "../../../tree/nodes/operators/powerNode.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { parseAlgebraic } from "../../../tree/parsers/latexParser.js";
|
|
9
|
+
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { int, power } = identifiers;
|
|
12
12
|
const statement = new PowerNode(new NumberNode(int), new NumberNode(power)).toTex();
|
|
13
|
+
return `Calculer et donner le résultat sous la forme d'une fraction ou d'un entier :
|
|
14
|
+
|
|
15
|
+
$$
|
|
16
|
+
${statement}
|
|
17
|
+
$$`;
|
|
18
|
+
};
|
|
19
|
+
const getAnswer = (identifiers) => {
|
|
20
|
+
const { int, power } = identifiers;
|
|
13
21
|
const answer = new Rational(1, int ** Math.abs(power))
|
|
14
22
|
.simplify()
|
|
15
23
|
.toTree()
|
|
16
24
|
.toTex();
|
|
25
|
+
return answer;
|
|
26
|
+
};
|
|
27
|
+
const getHint = (identifiers) => {
|
|
28
|
+
const { int, power } = identifiers;
|
|
29
|
+
return `Pour tous nombre $a$ et tout nombre $x$ positif, on a :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
a^{-x} = \\frac{1}{a^x}
|
|
33
|
+
$$`;
|
|
34
|
+
};
|
|
35
|
+
const getCorrection = (identifiers) => {
|
|
36
|
+
const { int, power } = identifiers;
|
|
37
|
+
const statement = new PowerNode(new NumberNode(int), new NumberNode(power)).toTex();
|
|
38
|
+
const fraction = frac(1, new PowerNode(int.toTree(), Math.abs(power).toTree()));
|
|
39
|
+
return `Puisque $a^{-x} = \\frac{1}{a^x}$, on a :
|
|
40
|
+
|
|
41
|
+
$$
|
|
42
|
+
${statement} = ${fraction.toSimplificationTex()}
|
|
43
|
+
$$`;
|
|
44
|
+
};
|
|
45
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
17
46
|
const question = {
|
|
18
|
-
answer,
|
|
19
|
-
instruction:
|
|
47
|
+
answer: getAnswer(identifiers),
|
|
48
|
+
instruction: getInstruction(identifiers),
|
|
20
49
|
keys: [],
|
|
21
50
|
answerFormat: "tex",
|
|
22
|
-
identifiers
|
|
51
|
+
identifiers,
|
|
52
|
+
hint: getHint(identifiers),
|
|
53
|
+
correction: getCorrection(identifiers),
|
|
23
54
|
};
|
|
24
55
|
return question;
|
|
25
56
|
};
|
|
57
|
+
const getCalculatePowerQuestion = () => {
|
|
58
|
+
const int = randint(1, 11);
|
|
59
|
+
const power = randint(-5, 0);
|
|
60
|
+
const identifiers = { int, power };
|
|
61
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
62
|
+
};
|
|
26
63
|
const getPropositions = (n, { answer, int, power }) => {
|
|
27
64
|
const propositions = [];
|
|
28
65
|
addValidProp(propositions, answer);
|
|
@@ -46,13 +83,17 @@ const getPropositions = (n, { answer, int, power }) => {
|
|
|
46
83
|
}
|
|
47
84
|
return shuffleProps(propositions, n);
|
|
48
85
|
};
|
|
49
|
-
const isAnswerValid = (ans, { int, power }) => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
86
|
+
const isAnswerValid = (ans, { answer, int, power }) => {
|
|
87
|
+
try {
|
|
88
|
+
const parsed = parseAlgebraic(ans);
|
|
89
|
+
if (!isNumberNode(parsed) && !isFractionNode(parsed)) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return parsed.simplify({ calculatePowers: true }).toTex() === answer;
|
|
93
|
+
}
|
|
94
|
+
catch (err) {
|
|
95
|
+
return handleVEAError(err);
|
|
96
|
+
}
|
|
56
97
|
};
|
|
57
98
|
export const calculateNegativePower = {
|
|
58
99
|
id: "calculateNegativePower",
|
|
@@ -65,4 +106,6 @@ export const calculateNegativePower = {
|
|
|
65
106
|
getPropositions,
|
|
66
107
|
isAnswerValid,
|
|
67
108
|
subject: "Mathématiques",
|
|
109
|
+
getQuestionFromIdentifiers,
|
|
110
|
+
hasHintAndCorrection: true,
|
|
68
111
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimalToScientific.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/decimalToScientific.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decimalToScientific.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/decimalToScientific.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,QAAQ,EAeT,MAAM,mBAAmB,CAAC;AAG3B,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAqGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -5,8 +5,59 @@ import { NumberNode } from "../../../tree/nodes/numbers/numberNode.js";
|
|
|
5
5
|
import { MultiplyNode } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
6
6
|
import { PowerNode } from "../../../tree/nodes/operators/powerNode.js";
|
|
7
7
|
import { probaFlip } from "../../../utils/alea/probaFlip.js";
|
|
8
|
+
import { pluralize } from "../../../utils/strings/pluralize.js";
|
|
8
9
|
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../exercise.js";
|
|
9
10
|
import { getDistinctQuestions } from "../../utils/getDistinctQuestions.js";
|
|
11
|
+
const getInstruction = (identifiers) => {
|
|
12
|
+
const { decimal } = identifiers;
|
|
13
|
+
return `Donner l'écriture scientifique du nombre suivant :
|
|
14
|
+
|
|
15
|
+
$$
|
|
16
|
+
${decimal.frenchify()}
|
|
17
|
+
$$`;
|
|
18
|
+
};
|
|
19
|
+
const getAnswer = (identifiers) => {
|
|
20
|
+
const { decimal } = identifiers;
|
|
21
|
+
const dec = new Decimal(decimal);
|
|
22
|
+
const answer = dec.toScientificNotation().toTex();
|
|
23
|
+
return answer;
|
|
24
|
+
};
|
|
25
|
+
const getHint = (identifiers) => {
|
|
26
|
+
return `Pour écrire un nombre en notation scientifique, il faut qu'il soit sous la forme :
|
|
27
|
+
|
|
28
|
+
$$
|
|
29
|
+
a\\times 10^n
|
|
30
|
+
$$
|
|
31
|
+
|
|
32
|
+
où $a$ est un nombre compris entre $1$ et $10$ (exclus). Repère où placer la virgule pour que $a$ soit correct, puis compte combien de fois il faut déplacer la virgule.`;
|
|
33
|
+
};
|
|
34
|
+
const getCorrection = (identifiers) => {
|
|
35
|
+
const { decimal } = identifiers;
|
|
36
|
+
const isZero = decimal < 1;
|
|
37
|
+
const order = isZero ? "droite" : "gauche";
|
|
38
|
+
const dec = new Decimal(decimal);
|
|
39
|
+
const absExp = Math.abs(dec.tenthExponentBelow);
|
|
40
|
+
return `On déplace la virgule après le premier chiffre non nul :
|
|
41
|
+
|
|
42
|
+
$$
|
|
43
|
+
${decimal.frenchify()} = ${getAnswer(identifiers)}
|
|
44
|
+
$$
|
|
45
|
+
|
|
46
|
+
On a déplacé la virgule de $${absExp}$ ${pluralize("rang", absExp)} vers la ${order}, donc l'exposant est $${dec.tenthExponentBelow}$.`;
|
|
47
|
+
};
|
|
48
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
49
|
+
const question = {
|
|
50
|
+
instruction: getInstruction(identifiers),
|
|
51
|
+
startStatement: identifiers.decimal.frenchify(),
|
|
52
|
+
answer: getAnswer(identifiers),
|
|
53
|
+
keys: [],
|
|
54
|
+
answerFormat: "tex",
|
|
55
|
+
identifiers,
|
|
56
|
+
hint: getHint(identifiers),
|
|
57
|
+
correction: getCorrection(identifiers),
|
|
58
|
+
};
|
|
59
|
+
return question;
|
|
60
|
+
};
|
|
10
61
|
const getDecimalToScientificQuestion = () => {
|
|
11
62
|
const isZero = probaFlip(0.2);
|
|
12
63
|
let intPart, dec;
|
|
@@ -17,17 +68,8 @@ const getDecimalToScientificQuestion = () => {
|
|
|
17
68
|
intPart = IntegerConstructor.random(randint(2, 5));
|
|
18
69
|
dec = DecimalConstructor.fromParts(intPart.toString(), DecimalConstructor.randomFracPart(randint(1, 3)));
|
|
19
70
|
}
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const question = {
|
|
23
|
-
instruction: `Donner l'écriture scientifique de : $${decTex}$`,
|
|
24
|
-
startStatement: decTex,
|
|
25
|
-
answer: answer,
|
|
26
|
-
keys: [],
|
|
27
|
-
answerFormat: "tex",
|
|
28
|
-
identifiers: { decimal: dec.value },
|
|
29
|
-
};
|
|
30
|
-
return question;
|
|
71
|
+
const identifiers = { decimal: dec.value };
|
|
72
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
31
73
|
};
|
|
32
74
|
const getPropositions = (n, { answer, decimal }) => {
|
|
33
75
|
const propositions = [];
|
|
@@ -55,4 +97,6 @@ export const decimalToScientific = {
|
|
|
55
97
|
getPropositions,
|
|
56
98
|
isAnswerValid,
|
|
57
99
|
subject: "Mathématiques",
|
|
100
|
+
hasHintAndCorrection: true,
|
|
101
|
+
getQuestionFromIdentifiers,
|
|
58
102
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC"}
|
|
@@ -7,7 +7,10 @@ type Identifiers = {
|
|
|
7
7
|
b: number;
|
|
8
8
|
c: number;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type Options = {
|
|
11
|
+
useOnlyPowersOfTen: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const powersDivision: Exercise<Identifiers, Options>;
|
|
14
|
+
export declare const powersOfTenDivision: Exercise<Identifiers, Options>;
|
|
12
15
|
export {};
|
|
13
16
|
//# sourceMappingURL=powersDivision.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powersDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersDivision.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"powersDivision.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/powers/powersDivision.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,OAAO,EACL,QAAQ,EAcT,MAAM,mBAAmB,CAAC;AAK3B,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AA6HF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBzD,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiB9D,CAAC"}
|