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
|
@@ -8,7 +8,7 @@ import { firstDegreeInequationResolutionTex } from "../../../../tree/nodes/inequ
|
|
|
8
8
|
import { MinusInfinityNode, PlusInfinityNode, } from "../../../../tree/nodes/numbers/infiniteNode.js";
|
|
9
9
|
import { ClosureType } from "../../../../tree/nodes/sets/closure.js";
|
|
10
10
|
import { IntervalNode } from "../../../../tree/nodes/sets/intervalNode.js";
|
|
11
|
-
import {
|
|
11
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
12
12
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
13
13
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
14
14
|
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
@@ -51,10 +51,11 @@ $$
|
|
|
51
51
|
|
|
52
52
|
Sur quel intervalle $f$ est-elle ${identifiers.askingPositive ? "positive" : "négative"} ?`;
|
|
53
53
|
};
|
|
54
|
-
const
|
|
54
|
+
const getAnswerNode = (identifiers) => {
|
|
55
|
+
const { a, b, askingPositive } = identifiers;
|
|
55
56
|
const root = new Rational(-b, a).simplify().toTree();
|
|
56
|
-
const toRightInfInterval = new IntervalNode(root, PlusInfinityNode, ClosureType.FO)
|
|
57
|
-
const toLeftInfInteral = new IntervalNode(MinusInfinityNode, root, ClosureType.OF)
|
|
57
|
+
const toRightInfInterval = new IntervalNode(root, PlusInfinityNode, ClosureType.FO);
|
|
58
|
+
const toLeftInfInteral = new IntervalNode(MinusInfinityNode, root, ClosureType.OF);
|
|
58
59
|
if (askingPositive) {
|
|
59
60
|
return a > 0 ? toRightInfInterval : toLeftInfInteral;
|
|
60
61
|
}
|
|
@@ -62,6 +63,9 @@ const getAnswer = ({ a, b, askingPositive }) => {
|
|
|
62
63
|
return a > 0 ? toLeftInfInteral : toRightInfInterval;
|
|
63
64
|
}
|
|
64
65
|
};
|
|
66
|
+
const getAnswer = (identifiers) => {
|
|
67
|
+
return getAnswerNode(identifiers).toTex();
|
|
68
|
+
};
|
|
65
69
|
const getSignFunction = () => {
|
|
66
70
|
const a = randint(-9, 10, [0]);
|
|
67
71
|
const b = randint(-9, 10);
|
|
@@ -92,15 +96,23 @@ const getPropositions = (n, { answer }) => {
|
|
|
92
96
|
}
|
|
93
97
|
return shuffle(propositions);
|
|
94
98
|
};
|
|
95
|
-
const isAnswerValid = (ans, { answer,
|
|
99
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
96
100
|
try {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
//? on accepte les réponses peu importe le sens des crochets, meme pour l'infini
|
|
102
|
+
const formated = ans
|
|
103
|
+
.replaceAll("]", "")
|
|
104
|
+
.replaceAll("[", "")
|
|
105
|
+
.replaceAll("\\ ", "");
|
|
106
|
+
const splitted = formated.includes(";")
|
|
107
|
+
? formated.split(";")
|
|
108
|
+
: formated.split(",");
|
|
109
|
+
if (splitted.length !== 2)
|
|
102
110
|
return false;
|
|
103
|
-
|
|
111
|
+
const a = parseAlgebraic(splitted[0]);
|
|
112
|
+
const b = parseAlgebraic(splitted[1]);
|
|
113
|
+
const intAnswer = getAnswerNode(identifiers);
|
|
114
|
+
return (a.simplify().toTex() === intAnswer.a.toTex() &&
|
|
115
|
+
b.simplify().toTex() === intAnswer.b.toTex());
|
|
104
116
|
}
|
|
105
117
|
catch (err) {
|
|
106
118
|
return handleVEAError(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"expEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAkBrC,cAAc;AACd,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiGF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAgB7C,CAAC"}
|
|
@@ -45,6 +45,9 @@ const getExpEquation = () => {
|
|
|
45
45
|
const a = randint(-9, 20, [0]);
|
|
46
46
|
const k = a > 0 ? randint(1, 20) : randint(-20, 0);
|
|
47
47
|
const identifiers = { a, k };
|
|
48
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
49
|
+
};
|
|
50
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
48
51
|
const question = {
|
|
49
52
|
instruction: getInstruction(identifiers),
|
|
50
53
|
answer: getAnswer(identifiers),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expFactorization.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expFactorization.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"expFactorization.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expFactorization.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IAEV,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAkKF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAiBlD,CAAC"}
|
|
@@ -120,6 +120,9 @@ const getExpFactorizationQuestion = () => {
|
|
|
120
120
|
f,
|
|
121
121
|
uA,
|
|
122
122
|
};
|
|
123
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
124
|
+
};
|
|
125
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
123
126
|
const question = {
|
|
124
127
|
answer: getAnswer(identifiers),
|
|
125
128
|
instruction: getInstruction(identifiers),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expSimplifiying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expSimplifiying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"expSimplifiying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/exponential/expSimplifiying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAmKF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAYjD,CAAC"}
|
|
@@ -2,56 +2,92 @@ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { Polynomial, PolynomialConstructor, } from "../../../../math/polynomials/polynomial.js";
|
|
4
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
-
import { ExpNode } from "../../../../tree/nodes/functions/expNode.js";
|
|
6
|
-
import {
|
|
5
|
+
import { ExpNode, isExpNode } from "../../../../tree/nodes/functions/expNode.js";
|
|
6
|
+
import { isNumberNode, } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
7
7
|
import { FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
8
8
|
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
9
10
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
11
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
12
|
+
const getStatementNode = (identifiers) => {
|
|
13
|
+
const { random, a, uCoeffs, vCoeffs } = identifiers;
|
|
14
|
+
const u = new Polynomial(uCoeffs);
|
|
15
|
+
const v = new Polynomial(vCoeffs);
|
|
16
|
+
let expression;
|
|
17
|
+
switch (random) {
|
|
18
|
+
case 1:
|
|
19
|
+
//e^u*e^a / e^v
|
|
20
|
+
expression = new FractionNode(new MultiplyNode(new ExpNode(u.toTree()), new ExpNode(a.toTree())), new ExpNode(v.toTree()));
|
|
21
|
+
break;
|
|
22
|
+
case 2:
|
|
23
|
+
//e^u * e^v
|
|
24
|
+
expression = new MultiplyNode(new ExpNode(u.toTree()), new ExpNode(v.toTree())).shuffle();
|
|
25
|
+
break;
|
|
26
|
+
case 3:
|
|
27
|
+
default:
|
|
28
|
+
//e^u / e^v
|
|
29
|
+
expression = new FractionNode(new ExpNode(u.toTree()), new ExpNode(v.toTree()));
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
return expression;
|
|
33
|
+
};
|
|
34
|
+
const getInstruction = (identifiers) => {
|
|
35
|
+
return `Écrire sous la forme d'une seule exponentielle :
|
|
36
|
+
|
|
37
|
+
$$
|
|
38
|
+
${getStatementNode(identifiers).toTex()}
|
|
39
|
+
$$`;
|
|
40
|
+
};
|
|
41
|
+
const getAnswer = (identifiers) => {
|
|
42
|
+
const statement = getStatementNode(identifiers);
|
|
43
|
+
return statement
|
|
44
|
+
.simplify({
|
|
45
|
+
towardsDistribute: true,
|
|
46
|
+
forbidFactorize: true,
|
|
47
|
+
})
|
|
48
|
+
.toTex();
|
|
49
|
+
};
|
|
50
|
+
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
51
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
52
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
53
|
+
const question = {
|
|
54
|
+
instruction: getInstruction(identifiers),
|
|
55
|
+
answer: getAnswer(identifiers),
|
|
56
|
+
keys: ["x", "epower", "exp"],
|
|
57
|
+
answerFormat: "tex",
|
|
58
|
+
identifiers,
|
|
59
|
+
};
|
|
60
|
+
return question;
|
|
61
|
+
};
|
|
10
62
|
const getExpSimplifiying = () => {
|
|
11
63
|
const random = randint(1, 4);
|
|
12
64
|
let a;
|
|
13
65
|
let u, v;
|
|
14
|
-
let expression;
|
|
15
|
-
let answer;
|
|
16
66
|
switch (random) {
|
|
17
67
|
case 1:
|
|
18
68
|
//e^u*e^a / e^v
|
|
19
69
|
a = randint(-9, 10, [0]);
|
|
20
70
|
u = new Polynomial([0, randint(-9, 10, [0])]);
|
|
21
71
|
v = new Polynomial([randint(-9, 10), randint(-9, 10, [0])]);
|
|
22
|
-
expression = new FractionNode(new MultiplyNode(new ExpNode(u.toTree()), new ExpNode(new NumberNode(a))), new ExpNode(v.toTree()));
|
|
23
|
-
answer = new ExpNode(u.add(a).add(v.opposite()).toTree()).toTex();
|
|
24
72
|
break;
|
|
25
73
|
case 2:
|
|
26
74
|
//e^u * e^v
|
|
27
75
|
u = new Polynomial([randint(-9, 10), randint(-9, 10, [0])]);
|
|
28
76
|
v = new Polynomial([randint(-9, 10), randint(-9, 10, [0])]);
|
|
29
|
-
expression = new MultiplyNode(new ExpNode(u.toTree()), new ExpNode(v.toTree())).shuffle();
|
|
30
|
-
answer = new ExpNode(u.add(v).toTree()).toTex();
|
|
31
77
|
break;
|
|
32
78
|
case 3:
|
|
79
|
+
default:
|
|
33
80
|
//e^u / e^v
|
|
34
81
|
u = new Polynomial([randint(-9, 10), randint(-9, 10, [0])]);
|
|
35
82
|
v = new Polynomial([randint(-9, 10), randint(-9, 10, [0])]);
|
|
36
|
-
expression = new FractionNode(new ExpNode(u.toTree()), new ExpNode(v.toTree()));
|
|
37
|
-
answer = new ExpNode(u.add(v.opposite()).toTree()).toTex();
|
|
38
|
-
break;
|
|
39
|
-
default:
|
|
40
|
-
throw Error("something wrong happened");
|
|
41
83
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
identifiers: {
|
|
48
|
-
random,
|
|
49
|
-
a,
|
|
50
|
-
uCoeffs: u.coefficients,
|
|
51
|
-
vCoeffs: v.coefficients,
|
|
52
|
-
},
|
|
84
|
+
const identifiers = {
|
|
85
|
+
random,
|
|
86
|
+
a,
|
|
87
|
+
uCoeffs: u.coefficients,
|
|
88
|
+
vCoeffs: v.coefficients,
|
|
53
89
|
};
|
|
54
|
-
return
|
|
90
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
55
91
|
};
|
|
56
92
|
const getPropositions = (n, { answer, random, a, uCoeffs, vCoeffs }) => {
|
|
57
93
|
const propositions = [];
|
|
@@ -77,32 +113,33 @@ const getPropositions = (n, { answer, random, a, uCoeffs, vCoeffs }) => {
|
|
|
77
113
|
}
|
|
78
114
|
return shuffle(propositions);
|
|
79
115
|
};
|
|
80
|
-
const isAnswerValid = (ans, {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
116
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
117
|
+
try {
|
|
118
|
+
const parsed = parseAlgebraic(ans);
|
|
119
|
+
const statement = getStatementNode(identifiers);
|
|
120
|
+
if (!isExpNode(parsed) && !isNumberNode(parsed))
|
|
121
|
+
return false;
|
|
122
|
+
return (parsed
|
|
123
|
+
.simplify({
|
|
124
|
+
towardsDistribute: true,
|
|
125
|
+
forbidFactorize: true,
|
|
126
|
+
})
|
|
127
|
+
.toTex() ===
|
|
128
|
+
statement
|
|
129
|
+
.simplify({
|
|
130
|
+
towardsDistribute: true,
|
|
131
|
+
forbidFactorize: true,
|
|
132
|
+
})
|
|
133
|
+
.toTex());
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
return handleVEAError(err);
|
|
96
137
|
}
|
|
97
|
-
const texs = answer.toAllValidTexs();
|
|
98
|
-
return texs.includes(ans);
|
|
99
138
|
};
|
|
100
139
|
export const expSimplifiying = {
|
|
101
140
|
id: "expSimplifiying",
|
|
102
141
|
connector: "\\iff",
|
|
103
142
|
label: "Simplifier des expressions avec l'exponentielle",
|
|
104
|
-
levels: ["1reSpé", "TermSpé", "MathComp"],
|
|
105
|
-
sections: ["Exponentielle"],
|
|
106
143
|
isSingleStep: false,
|
|
107
144
|
generator: (nb) => getDistinctQuestions(getExpSimplifiying, nb),
|
|
108
145
|
qcmTimer: 60,
|
|
@@ -110,4 +147,5 @@ export const expSimplifiying = {
|
|
|
110
147
|
getPropositions,
|
|
111
148
|
isAnswerValid,
|
|
112
149
|
subject: "Mathématiques",
|
|
150
|
+
getQuestionFromIdentifiers,
|
|
113
151
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianEquationOfLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/cartesianEquationOfLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAqBrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"cartesianEquationOfLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/cartesianEquationOfLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAqBrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAiOF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { EqualNode } from "../../../../tree/nodes/equations/equalNode.js";
|
|
|
9
9
|
import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
|
|
10
10
|
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
11
11
|
import { add, AddNode } from "../../../../tree/nodes/operators/addNode.js";
|
|
12
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
12
13
|
import { multiply, MultiplyNode, } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
13
14
|
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
14
15
|
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
@@ -33,14 +34,20 @@ const getCorrection = (identifiers) => {
|
|
|
33
34
|
const A = new Point("A", aX, aY);
|
|
34
35
|
const B = new Point("B", bX, bY);
|
|
35
36
|
const vec = VectorConstructor.fromPoints(A, B);
|
|
36
|
-
const
|
|
37
|
+
const simpVec = vec.toPrimeColinear("u");
|
|
38
|
+
const coeff = frac(vec.x, simpVec.x).simplify();
|
|
39
|
+
const partial = add(multiply(simpVec.y, "x"), multiply(opposite(simpVec.x), "y")).simplify({
|
|
37
40
|
forbidFactorize: true,
|
|
38
41
|
});
|
|
39
42
|
const partialEv = partial.toDetailedEvaluation({ x: A.x, y: A.y });
|
|
40
43
|
const partialEvSimp = partialEv.simplify();
|
|
41
44
|
const c = opposite(partialEvSimp).simplify();
|
|
42
45
|
return `On lit graphiquement que la droite passe par les points $${A.toTexWithCoords()}$ et $${B.toTexWithCoords()}$. On en déduit qu'un vecteur directeur de $d$ est $${vec.toTexWithCoords()}$.
|
|
43
|
-
|
|
46
|
+
|
|
47
|
+
${coeff.toTex() !== "1"
|
|
48
|
+
? `Puisque tout vecteur colinéaire à $${vec.toTex()}$ est alors aussi un vecteur directeur de $d$, on peut diviser les coordonnées de $${vec.toTex()}$ par $${coeff.toTex()}$ pour obtenir un vecteur directeur plus simple : $${simpVec.toTexWithCoords()}$.`
|
|
49
|
+
: ""}
|
|
50
|
+
|
|
44
51
|
Une équation cartésienne de $d$ est donc de la forme :
|
|
45
52
|
|
|
46
53
|
$$
|
|
@@ -97,8 +104,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
97
104
|
keys: ["x", "y", "equal"],
|
|
98
105
|
answerFormat: "tex",
|
|
99
106
|
identifiers,
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
hint: getHint(identifiers),
|
|
108
|
+
correction: getCorrection(identifiers),
|
|
102
109
|
};
|
|
103
110
|
return question;
|
|
104
111
|
};
|
|
@@ -179,6 +186,6 @@ export const cartesianEquationOfLine = {
|
|
|
179
186
|
isAnswerValid,
|
|
180
187
|
hasGeogebra: true,
|
|
181
188
|
subject: "Mathématiques",
|
|
182
|
-
|
|
189
|
+
hasHintAndCorrection: true,
|
|
183
190
|
getQuestionFromIdentifiers,
|
|
184
191
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildRhombus.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidianConstructions/buildRhombus.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// import {
|
|
2
|
+
// Exercise,
|
|
3
|
+
// Question,
|
|
4
|
+
// QuestionGenerator,
|
|
5
|
+
// GGBVEA,
|
|
6
|
+
// GetHint,
|
|
7
|
+
// GetCorrection,
|
|
8
|
+
// GetInstruction,
|
|
9
|
+
// GetStudentGGBOptions,
|
|
10
|
+
// GetGGBAnswer,
|
|
11
|
+
// GetQuestionFromIdentifiers
|
|
12
|
+
// } from '../../../../exercises/exercise.js';
|
|
13
|
+
// import { getDistinctQuestions } from '../../../../exercises/utils/getDistinctQuestions.js';
|
|
14
|
+
export {};
|
|
15
|
+
// type Identifiers = {
|
|
16
|
+
// side: number;
|
|
17
|
+
// diagonalSide: number;
|
|
18
|
+
// };
|
|
19
|
+
// const getInstruction : GetInstruction<Identifiers> = (identifiers)=>{
|
|
20
|
+
// const {side, diagonalSide} = identifiers
|
|
21
|
+
// return `Construire un losange $ABCD$ de $${side}$ de côté et tel que $AC = ${diagonalSide}$. `
|
|
22
|
+
// }
|
|
23
|
+
// const getHint : GetHint<Identifiers> = (identifiers)=>{
|
|
24
|
+
// }
|
|
25
|
+
// const getCorrection : GetCorrection<Identifiers> = (identifiers)=>{
|
|
26
|
+
// }
|
|
27
|
+
// const getGGBAnswer: GetGGBAnswer<Identifiers> = (identifiers)=>{
|
|
28
|
+
// }
|
|
29
|
+
// const getStudentGGBOptions: GetStudentGGBOptions<Identifiers> = (identifiers)=>{
|
|
30
|
+
// }
|
|
31
|
+
// const isGGBAnswerValid: GGBVEA<Identifiers> = (ans, {ggbAnswer}) => {
|
|
32
|
+
// throw Error("GGBVea not implemented")
|
|
33
|
+
// }
|
|
34
|
+
// const getBuildRhombusQuestion: QuestionGenerator<Identifiers> = ()=>{
|
|
35
|
+
// const identifiers: Identifiers = {}
|
|
36
|
+
// return getQuestionFromIdentifiers(identifiers);
|
|
37
|
+
// }
|
|
38
|
+
// const getQuestionFromIdentifiers: GetQuestionFromIdentifiers<Identifiers> = (identifiers)=>{
|
|
39
|
+
// return {
|
|
40
|
+
// ggbAnswer: getGGBAnswer(identifiers),
|
|
41
|
+
// instruction: getInstruction(identifiers),
|
|
42
|
+
// studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
43
|
+
// identifiers,
|
|
44
|
+
// hint: getHint(identifiers),
|
|
45
|
+
// correction: getCorrection(identifiers)
|
|
46
|
+
// }
|
|
47
|
+
// }
|
|
48
|
+
// export const buildRhombus: Exercise<Identifiers> = {
|
|
49
|
+
// id: 'buildRhombus',
|
|
50
|
+
// label: undefined,
|
|
51
|
+
// isSingleStep: true,
|
|
52
|
+
// generator: (nb, opts) => getDistinctQuestions(()=>getBuildRhombusQuestion(opts), nb),
|
|
53
|
+
// ggbTimer: 60,
|
|
54
|
+
// isGGBAnswerValid,
|
|
55
|
+
// subject: "Mathématiques",
|
|
56
|
+
// getHint,
|
|
57
|
+
// getInstruction,
|
|
58
|
+
// getCorrection,
|
|
59
|
+
// getGGBAnswer,
|
|
60
|
+
// getStudentGGBOptions,
|
|
61
|
+
// answerType: "GGB",
|
|
62
|
+
// getQuestionFromIdentifiers
|
|
63
|
+
// };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianEquationToReduced.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/cartesianEquationToReduced.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"cartesianEquationToReduced.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/cartesianEquationToReduced.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AA+OF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAkB5D,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
|
|
|
3
3
|
import { RationalConstructor } from "../../../../math/numbers/rationals/rational.js";
|
|
4
4
|
import { gcd } from "../../../../math/utils/arithmetic/gcd.js";
|
|
5
5
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
+
import { EqualNode } from "../../../../tree/nodes/equations/equalNode.js";
|
|
6
7
|
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
7
8
|
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
8
9
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
@@ -11,6 +12,8 @@ import { monom } from "../../../../tree/nodes/polynomials/monomNode.js";
|
|
|
11
12
|
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
12
13
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
13
14
|
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
15
|
+
import { isInt } from "../../../../utils/isInt.js";
|
|
16
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
14
17
|
//ax+by+c = 0 into y = ... (et inversement)
|
|
15
18
|
const getCartesianEquation = (identifiers) => {
|
|
16
19
|
const { a, b, c, toReduced } = identifiers;
|
|
@@ -69,30 +72,66 @@ ${toReduced
|
|
|
69
72
|
? `Quelle est l'équation réduite de $d$ ?`
|
|
70
73
|
: `Donner une équation cartésienne de $d$.`}`;
|
|
71
74
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
75
|
+
const getHint = (identifiers) => {
|
|
76
|
+
if (identifiers.toReduced)
|
|
77
|
+
return `Pour déterminer l'équation réduite de $d$, il faut isoler la variable $y$ à gauche de l'équation, afin d'obtenir une équation de la forme :
|
|
78
|
+
|
|
79
|
+
$$
|
|
80
|
+
y = ax+b
|
|
81
|
+
$$`;
|
|
82
|
+
return `Pour déterminer une équation cartésienne de $d$, il faut transformer son équation réduite en une équation de la forme :
|
|
83
|
+
|
|
84
|
+
$$
|
|
85
|
+
ax+by+c = 0
|
|
86
|
+
$$`;
|
|
87
|
+
};
|
|
88
|
+
const getCorrection = (identifiers) => {
|
|
89
|
+
const { a, b, c, toReduced } = identifiers;
|
|
90
|
+
const cartesian = new EqualNode(getCartesianEquation(identifiers), (0).toTree());
|
|
91
|
+
if (toReduced) {
|
|
92
|
+
const steps = [];
|
|
93
|
+
const res = cartesian.isolate("y", { steps });
|
|
94
|
+
const resSimp = res.rightChild.simplify({
|
|
95
|
+
towardsDistribute: true,
|
|
96
|
+
forceDistributeFractions: true,
|
|
97
|
+
forbidFactorize: true,
|
|
98
|
+
});
|
|
99
|
+
if (res.rightChild.toTex() !== resSimp.toTex())
|
|
100
|
+
steps.push(new EqualNode("y".toTree(), resSimp).toTex());
|
|
101
|
+
return `On isole $y$ à gauche de l'équation :
|
|
102
|
+
|
|
103
|
+
${alignTex(steps.map((e) => [e]))}`;
|
|
104
|
+
}
|
|
105
|
+
const m = -a / b;
|
|
106
|
+
const p = -c / b;
|
|
107
|
+
const hasFracs = !isInt(m) || !isInt(p);
|
|
108
|
+
const coeff = hasFracs ? b : undefined;
|
|
109
|
+
const reduced = getReducedEquation(identifiers);
|
|
110
|
+
const equa = new EqualNode(substract("y", reduced), (0).toTree());
|
|
111
|
+
const equaSimp = equa.simplify({
|
|
112
|
+
towardsDistribute: true,
|
|
113
|
+
forbidFactorize: true,
|
|
114
|
+
forceDistributeFractions: true,
|
|
115
|
+
});
|
|
116
|
+
const equaTex = equa.toTex();
|
|
117
|
+
const equaSimpTex = equaSimp.toTex();
|
|
118
|
+
const equaSteps = [[equaTex]];
|
|
119
|
+
if (equaTex !== equaSimpTex)
|
|
120
|
+
equaSteps.push([equaSimpTex]);
|
|
121
|
+
return `On regroupe tous les termes à gauche :
|
|
122
|
+
|
|
123
|
+
${alignTex(equaSteps)}
|
|
124
|
+
|
|
125
|
+
${hasFracs
|
|
126
|
+
? `On multiple les deux côtés par $${coeff}$ pour supprimer les fractions :
|
|
127
|
+
|
|
128
|
+
$$
|
|
129
|
+
${cartesian.toTex()}
|
|
130
|
+
$$`
|
|
131
|
+
: ""}
|
|
132
|
+
|
|
133
|
+
`;
|
|
134
|
+
};
|
|
96
135
|
const getKeys = (identifiers) => {
|
|
97
136
|
return ["x", "y", "equal"];
|
|
98
137
|
};
|
|
@@ -167,8 +206,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
167
206
|
keys: getKeys(identifiers),
|
|
168
207
|
answerFormat: "tex",
|
|
169
208
|
identifiers,
|
|
170
|
-
|
|
171
|
-
|
|
209
|
+
hint: getHint(identifiers),
|
|
210
|
+
correction: getCorrection(identifiers),
|
|
172
211
|
};
|
|
173
212
|
};
|
|
174
213
|
export const cartesianEquationToReduced = {
|
|
@@ -182,9 +221,9 @@ export const cartesianEquationToReduced = {
|
|
|
182
221
|
isAnswerValid,
|
|
183
222
|
subject: "Mathématiques",
|
|
184
223
|
getInstruction,
|
|
185
|
-
|
|
186
|
-
|
|
224
|
+
getHint,
|
|
225
|
+
getCorrection,
|
|
187
226
|
getAnswer,
|
|
188
227
|
getQuestionFromIdentifiers,
|
|
189
|
-
|
|
228
|
+
hasHintAndCorrection: true,
|
|
190
229
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianEquationsIntersection.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/cartesianEquationsIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"cartesianEquationsIntersection.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/cartesianEquationsIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAWrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,gBAAgB,EAAE,eAAe,EAAE,CAAC;CACrC,CAAC;AA0KF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAqBhE,CAAC"}
|
|
@@ -56,8 +56,59 @@ $$
|
|
|
56
56
|
|
|
57
57
|
Déterminer les coordonnées du point d'intersection de $d_1$ et $d_2$.`;
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const getHint = (identifiers) => {
|
|
60
|
+
const { cartesianCoeffs1, cartesianCoeffs2 } = identifiers;
|
|
61
|
+
const coeffs1 = cartesianCoeffs1.map((c) => reifyAlgebraic(c));
|
|
62
|
+
const coeffs2 = cartesianCoeffs2.map((c) => reifyAlgebraic(c));
|
|
63
|
+
const equa1 = getEquation(coeffs1).toTex();
|
|
64
|
+
const equa2 = getEquation(coeffs2).toTex();
|
|
65
|
+
return `Le point d'intersection de $d_1$ et $d_2$, s'il existe, est le point dont les coordonnées $(x;y)$ est une solution du système :
|
|
66
|
+
|
|
67
|
+
$$
|
|
68
|
+
\\left\\{\\begin{matrix}
|
|
69
|
+
${equa1} \\\\
|
|
70
|
+
${equa2}
|
|
71
|
+
\\end{matrix}\\right.
|
|
72
|
+
$$`;
|
|
73
|
+
};
|
|
74
|
+
const getCorrection = (identifiers) => {
|
|
75
|
+
const { cartesianCoeffs1, cartesianCoeffs2 } = identifiers;
|
|
76
|
+
const coeffs1 = cartesianCoeffs1.map((c) => reifyAlgebraic(c));
|
|
77
|
+
const coeffs2 = cartesianCoeffs2.map((c) => reifyAlgebraic(c));
|
|
78
|
+
let equa1 = getEquation(coeffs1);
|
|
79
|
+
let equa2 = getEquation(coeffs2);
|
|
80
|
+
let corr = `On doit résoudre le système :
|
|
81
|
+
|
|
82
|
+
$$
|
|
83
|
+
\\left\\{\\begin{matrix}
|
|
84
|
+
${equa1.toTex()} \\\\
|
|
85
|
+
${equa2.toTex()}
|
|
86
|
+
\\end{matrix}\\right.
|
|
87
|
+
$$`;
|
|
88
|
+
coeffs1[2] = opposite(coeffs1[2].simplify());
|
|
89
|
+
coeffs2[2] = opposite(coeffs2[2].simplify());
|
|
90
|
+
const sys = new GeneralSystem([coeffs1, coeffs2]);
|
|
91
|
+
[equa1, equa2] = sys.getEqualNodes();
|
|
92
|
+
corr += `
|
|
93
|
+
|
|
94
|
+
c'est à dire :
|
|
95
|
+
|
|
96
|
+
$$
|
|
97
|
+
${sys.toTex()}
|
|
98
|
+
$$
|
|
99
|
+
|
|
100
|
+
`;
|
|
101
|
+
corr += sys.toCorrectionTex();
|
|
102
|
+
corr += `
|
|
103
|
+
|
|
104
|
+
Le point d'intersection de $d_1$ et $d_2$ a donc pour coordonnées :
|
|
105
|
+
|
|
106
|
+
$$
|
|
107
|
+
${getAnswer(identifiers)}
|
|
108
|
+
$$
|
|
109
|
+
`;
|
|
110
|
+
return corr;
|
|
111
|
+
};
|
|
61
112
|
const getKeys = (identifiers) => {
|
|
62
113
|
return ["semicolon"];
|
|
63
114
|
};
|
|
@@ -93,8 +144,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
93
144
|
keys: getKeys(identifiers),
|
|
94
145
|
answerFormat: "tex",
|
|
95
146
|
identifiers,
|
|
96
|
-
|
|
97
|
-
|
|
147
|
+
hint: getHint(identifiers),
|
|
148
|
+
correction: getCorrection(identifiers),
|
|
98
149
|
};
|
|
99
150
|
};
|
|
100
151
|
export const cartesianEquationsIntersection = {
|
|
@@ -112,4 +163,5 @@ export const cartesianEquationsIntersection = {
|
|
|
112
163
|
// getCorrection,
|
|
113
164
|
getAnswer,
|
|
114
165
|
getQuestionFromIdentifiers,
|
|
166
|
+
hasHintAndCorrection: true,
|
|
115
167
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawLineFromCartesianEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/drawLineFromCartesianEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"drawLineFromCartesianEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/drawLineFromCartesianEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAMvC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,SAAS,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AA4KF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
|