math-exercises 1.4.18 → 2.0.1
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/calcul/addAndSub.d.ts +7 -6
- package/lib/exercises/calcul/addAndSub.d.ts.map +1 -1
- package/lib/exercises/calcul/addAndSub.js +32 -49
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts +7 -6
- package/lib/exercises/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
- package/lib/exercises/calcul/addAndSubWithoutRelatives.js +28 -45
- package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts +13 -3
- package/lib/exercises/calcul/arithmetics/euclideanDivision.d.ts.map +1 -1
- package/lib/exercises/calcul/arithmetics/euclideanDivision.js +38 -49
- package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts +6 -3
- package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts.map +1 -1
- package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.js +39 -39
- package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts +10 -6
- package/lib/exercises/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/calcul/arithmetics/primeNumbers.js +75 -64
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +14 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +50 -54
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +12 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +41 -52
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +12 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +42 -60
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts +10 -3
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionToPercentToDecimal.js +55 -65
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +9 -3
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsDivision.js +36 -52
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +9 -3
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsProduct.js +34 -46
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts +9 -3
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/fractionsSum.js +34 -52
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +7 -3
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/calcul/fractions/simplifyFraction.js +26 -42
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.d.ts +8 -3
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalAddAndSub.js +31 -51
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.d.ts +7 -3
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalDivisions.js +32 -50
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.d.ts +7 -3
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalMultiplications.js +32 -47
- package/lib/exercises/calcul/mentalCaluls.ts/mentalPercentage.d.ts +8 -3
- package/lib/exercises/calcul/mentalCaluls.ts/mentalPercentage.d.ts.map +1 -1
- package/lib/exercises/calcul/mentalCaluls.ts/mentalPercentage.js +69 -84
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts +7 -3
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -1
- package/lib/exercises/calcul/operations/operationsPriorities.js +25 -43
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +7 -3
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.js +25 -43
- package/lib/exercises/calcul/proportionality/proportionalityTable.d.ts +7 -3
- package/lib/exercises/calcul/proportionality/proportionalityTable.d.ts.map +1 -1
- package/lib/exercises/calcul/proportionality/proportionalityTable.js +25 -43
- package/lib/exercises/calcul/rounding/rounding.d.ts +14 -10
- package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/calcul/rounding/rounding.js +52 -82
- package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +12 -3
- package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/allIdentities.js +34 -11
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +9 -3
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +37 -64
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +11 -3
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +35 -66
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +11 -3
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +36 -67
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +10 -3
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +33 -66
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +11 -3
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +38 -68
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts +9 -3
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationSimpleSquare.js +59 -132
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +9 -3
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +30 -54
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +9 -3
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +28 -49
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +10 -3
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +28 -48
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +11 -3
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +27 -47
- package/lib/exercises/calculLitteral/equation/expEquation.d.ts +7 -3
- package/lib/exercises/calculLitteral/equation/expEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/expEquation.js +27 -45
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts +9 -3
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/firstDegreeEquation.js +26 -48
- package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts +7 -3
- package/lib/exercises/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/fractionEquation.js +32 -50
- package/lib/exercises/calculLitteral/equation/logEquation.d.ts +7 -3
- package/lib/exercises/calculLitteral/equation/logEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/logEquation.js +27 -45
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts +7 -3
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/equation/multiplicationEquation.js +33 -52
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts +9 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq1.js +29 -51
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts +9 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq2.js +30 -58
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts +9 -3
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoIdRmq3.js +34 -66
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +9 -3
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +32 -65
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.d.ts +10 -3
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType0.js +28 -51
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.d.ts +10 -3
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType1.js +28 -50
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.d.ts +10 -3
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType2.js +28 -50
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.d.ts +10 -3
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/inequations/firstDegreeInequationsType3.js +28 -50
- package/lib/exercises/calculLitteral/simplifying/evaluateExpression.d.ts +7 -3
- package/lib/exercises/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/simplifying/evaluateExpression.js +28 -46
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts +8 -3
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/simplifying/expSimplifiying.js +44 -61
- package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts +8 -3
- package/lib/exercises/calculLitteral/simplifying/logSimplifiying.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/simplifying/logSimplifiying.js +29 -48
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts +9 -3
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
- package/lib/exercises/calculLitteral/simplifying/reduceExpression.js +29 -46
- package/lib/exercises/combinatory/anagrams.d.ts +8 -3
- package/lib/exercises/combinatory/anagrams.d.ts.map +1 -1
- package/lib/exercises/combinatory/anagrams.js +29 -49
- package/lib/exercises/combinatory/ballsCounting.d.ts +11 -3
- package/lib/exercises/combinatory/ballsCounting.d.ts.map +1 -1
- package/lib/exercises/combinatory/ballsCounting.js +55 -74
- package/lib/exercises/combinatory/diceCounting.d.ts +8 -3
- package/lib/exercises/combinatory/diceCounting.d.ts.map +1 -1
- package/lib/exercises/combinatory/diceCounting.js +64 -80
- package/lib/exercises/complex/addComplex.d.ts +11 -3
- package/lib/exercises/complex/addComplex.d.ts.map +1 -1
- package/lib/exercises/complex/addComplex.js +31 -52
- package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts +10 -0
- package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts.map +1 -0
- package/lib/exercises/complex/argumentFromAlgebraicComplex.js +37 -0
- package/lib/exercises/complex/conjugateComplex.ts.d.ts +9 -3
- package/lib/exercises/complex/conjugateComplex.ts.d.ts.map +1 -1
- package/lib/exercises/complex/conjugateComplex.ts.js +30 -59
- package/lib/exercises/complex/conjugateDivideComplex.d.ts +7 -3
- package/lib/exercises/complex/conjugateDivideComplex.d.ts.map +1 -1
- package/lib/exercises/complex/conjugateDivideComplex.js +26 -44
- package/lib/exercises/complex/conjugateMultiplyComplex.d.ts +9 -3
- package/lib/exercises/complex/conjugateMultiplyComplex.d.ts.map +1 -1
- package/lib/exercises/complex/conjugateMultiplyComplex.js +32 -52
- package/lib/exercises/complex/divideComplex.d.ts +7 -3
- package/lib/exercises/complex/divideComplex.d.ts.map +1 -1
- package/lib/exercises/complex/divideComplex.js +26 -44
- package/lib/exercises/complex/inverseComplex.d.ts +9 -3
- package/lib/exercises/complex/inverseComplex.d.ts.map +1 -1
- package/lib/exercises/complex/inverseComplex.js +30 -59
- package/lib/exercises/complex/linearCombinaisonComplex.d.ts +7 -3
- package/lib/exercises/complex/linearCombinaisonComplex.d.ts.map +1 -1
- package/lib/exercises/complex/linearCombinaisonComplex.js +28 -46
- package/lib/exercises/complex/moduloFromAlgebraicComplex.d.ts +10 -0
- package/lib/exercises/complex/moduloFromAlgebraicComplex.d.ts.map +1 -0
- package/lib/exercises/complex/moduloFromAlgebraicComplex.js +43 -0
- package/lib/exercises/complex/mutiplyComplex.d.ts +9 -3
- package/lib/exercises/complex/mutiplyComplex.d.ts.map +1 -1
- package/lib/exercises/complex/mutiplyComplex.js +30 -52
- package/lib/exercises/complex/reAndIm.d.ts +10 -3
- package/lib/exercises/complex/reAndIm.d.ts.map +1 -1
- package/lib/exercises/complex/reAndIm.js +28 -63
- package/lib/exercises/conversion/aeraConversion.d.ts +10 -3
- package/lib/exercises/conversion/aeraConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/aeraConversion.js +29 -46
- package/lib/exercises/conversion/capacityConversion.d.ts +10 -3
- package/lib/exercises/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/capacityConversion.js +28 -45
- package/lib/exercises/conversion/lengthConversion.d.ts +10 -3
- package/lib/exercises/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/lengthConversion.js +28 -44
- package/lib/exercises/conversion/massConversion.d.ts +10 -3
- package/lib/exercises/conversion/massConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/massConversion.js +28 -44
- package/lib/exercises/conversion/volumeCapacityConversion.d.ts +7 -3
- package/lib/exercises/conversion/volumeCapacityConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/volumeCapacityConversion.js +29 -45
- package/lib/exercises/conversion/volumeConversion.d.ts +10 -3
- package/lib/exercises/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/conversion/volumeConversion.js +29 -45
- package/lib/exercises/derivation/derivative/constanteDerivative.d.ts +10 -3
- package/lib/exercises/derivation/derivative/constanteDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/constanteDerivative.js +33 -50
- package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts +9 -3
- package/lib/exercises/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/expDerivativeOne.js +32 -36
- package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts +9 -3
- package/lib/exercises/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/expDerivativeThree.js +27 -34
- package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts +9 -3
- package/lib/exercises/derivation/derivative/expDerivativeTwo.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/expDerivativeTwo.js +30 -48
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts +11 -3
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/firstDegreeDerivative.js +31 -48
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts +8 -3
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/inverseFunctionDerivative.js +28 -47
- package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts +9 -3
- package/lib/exercises/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/lnDerivativeOne.js +31 -36
- package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts +9 -3
- package/lib/exercises/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/lnDerivativeThree.js +36 -53
- package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts +9 -3
- package/lib/exercises/derivation/derivative/lnDerivativeTwo.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/lnDerivativeTwo.js +30 -49
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts +9 -3
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/powerFunctionDerivative.js +30 -49
- package/lib/exercises/derivation/derivative/productDerivative.d.ts +9 -3
- package/lib/exercises/derivation/derivative/productDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/productDerivative.js +28 -45
- package/lib/exercises/derivation/derivative/quotientDerivative.d.ts +10 -3
- package/lib/exercises/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/quotientDerivative.js +28 -45
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts +8 -3
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/rootFunctionDerivative.js +34 -59
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts +10 -3
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/secondDegreeDerivative.js +37 -54
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts +10 -3
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/thirdDegreeDerivative.js +34 -52
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts +9 -3
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.js +31 -66
- package/lib/exercises/derivation/derivative/usualderivative.d.ts +12 -3
- package/lib/exercises/derivation/derivative/usualderivative.d.ts.map +1 -1
- package/lib/exercises/derivation/derivative/usualderivative.js +48 -19
- package/lib/exercises/derivation/derivativeNumberCalcul.d.ts +8 -0
- package/lib/exercises/derivation/derivativeNumberCalcul.d.ts.map +1 -0
- package/lib/exercises/derivation/derivativeNumberCalcul.js +42 -0
- package/lib/exercises/derivation/derivativeNumberReading.d.ts +9 -3
- package/lib/exercises/derivation/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/derivation/derivativeNumberReading.js +35 -47
- package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts +7 -3
- package/lib/exercises/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/equaDiff/equaDiffGeneralForme.js +28 -45
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts +7 -3
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.d.ts.map +1 -1
- package/lib/exercises/equaDiff/equaDiffGeneralFormeWithIC.js +36 -53
- package/lib/exercises/exercise.d.ts +12 -6
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercise.js +19 -1
- package/lib/exercises/exercises.d.ts +2 -2
- package/lib/exercises/exercises.d.ts.map +1 -1
- package/lib/exercises/exercises.js +8 -0
- package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts +9 -3
- package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts.map +1 -1
- package/lib/exercises/functions/absolute/absoluteValueEquations.js +36 -55
- package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts +9 -3
- package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
- package/lib/exercises/functions/absolute/absoluteValueInequations.js +27 -47
- package/lib/exercises/functions/affines/leadingCoefficient.d.ts +11 -3
- package/lib/exercises/functions/affines/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/functions/affines/leadingCoefficient.js +34 -46
- package/lib/exercises/functions/affines/leadingCoefficientCalculV1.d.ts +11 -3
- package/lib/exercises/functions/affines/leadingCoefficientCalculV1.d.ts.map +1 -1
- package/lib/exercises/functions/affines/leadingCoefficientCalculV1.js +27 -43
- package/lib/exercises/functions/affines/leadingCoefficientCalculV2.d.ts +11 -3
- package/lib/exercises/functions/affines/leadingCoefficientCalculV2.d.ts.map +1 -1
- package/lib/exercises/functions/affines/leadingCoefficientCalculV2.js +26 -43
- package/lib/exercises/functions/affines/signFunction.d.ts +7 -3
- package/lib/exercises/functions/affines/signFunction.d.ts.map +1 -1
- package/lib/exercises/functions/affines/signFunction.js +30 -48
- package/lib/exercises/functions/basics/imageFunction.d.ts +7 -3
- package/lib/exercises/functions/basics/imageFunction.d.ts.map +1 -1
- package/lib/exercises/functions/basics/imageFunction.js +28 -46
- package/lib/exercises/functions/basics/imageFunctionGeogebra.d.ts +7 -3
- package/lib/exercises/functions/basics/imageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/functions/basics/imageFunctionGeogebra.js +28 -45
- package/lib/exercises/functions/basics/inverseImageFunction.d.ts +7 -3
- package/lib/exercises/functions/basics/inverseImageFunction.d.ts.map +1 -1
- package/lib/exercises/functions/basics/inverseImageFunction.js +30 -46
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts +10 -3
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.js +36 -52
- package/lib/exercises/functions/cube/cubicEquation.d.ts +8 -3
- package/lib/exercises/functions/cube/cubicEquation.d.ts.map +1 -1
- package/lib/exercises/functions/cube/cubicEquation.js +26 -51
- package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.d.ts +12 -0
- package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.d.ts.map +1 -0
- package/lib/exercises/functions/rationalFraction/rationalFractionForbiddenValue.js +56 -0
- package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts +7 -3
- package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/alphaBetaFromDevForm.js +25 -45
- package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts +11 -3
- package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/alphaBetaInCanonicalForm.js +31 -66
- package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts +8 -3
- package/lib/exercises/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/canonicalFromDevForm.js +25 -42
- package/lib/exercises/functions/trinoms/deltaTrinom.d.ts +10 -3
- package/lib/exercises/functions/trinoms/deltaTrinom.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/deltaTrinom.js +28 -58
- package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts +10 -3
- package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/extremumFromCanonicalForm.js +31 -69
- package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts +8 -3
- package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/extremumTypeFromAlgebricForm.js +24 -45
- package/lib/exercises/functions/trinoms/niceRootsFromDevForm.d.ts +7 -3
- package/lib/exercises/functions/trinoms/niceRootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/niceRootsFromDevForm.js +26 -45
- package/lib/exercises/functions/trinoms/rootsFromDevForm.d.ts +7 -3
- package/lib/exercises/functions/trinoms/rootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/rootsFromDevForm.js +26 -45
- package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.d.ts +10 -3
- package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/rootsFromFactorizedForm.js +38 -75
- package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts +8 -3
- package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.d.ts.map +1 -1
- package/lib/exercises/functions/trinoms/variationsFromAlgebricForm.js +23 -44
- package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.d.ts +9 -3
- package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
- package/lib/exercises/geometry/cartesian/distanceBetweenTwoPoints.js +44 -59
- package/lib/exercises/geometry/cartesian/midpoint.d.ts +7 -3
- package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -1
- package/lib/exercises/geometry/cartesian/midpoint.js +30 -47
- package/lib/exercises/geometry/euclidean/circleArea.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/circleArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/circleArea.js +26 -43
- package/lib/exercises/geometry/euclidean/circleCircumference.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/circleCircumference.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/circleCircumference.js +26 -43
- package/lib/exercises/geometry/euclidean/pythagore.d.ts +10 -3
- package/lib/exercises/geometry/euclidean/pythagore.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/pythagore.js +33 -71
- package/lib/exercises/geometry/euclidean/pythagoreCalcul.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/pythagoreCalcul.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/pythagoreCalcul.js +30 -46
- package/lib/exercises/geometry/euclidean/rectangleArea.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/rectangleArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/rectangleArea.js +24 -40
- package/lib/exercises/geometry/euclidean/rectanglePerimeter.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/rectanglePerimeter.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/rectanglePerimeter.js +24 -40
- package/lib/exercises/geometry/euclidean/rightTriangleArea.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/rightTriangleArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/rightTriangleArea.js +27 -43
- package/lib/exercises/geometry/euclidean/squareArea.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/squareArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/squareArea.js +23 -39
- package/lib/exercises/geometry/euclidean/squarePerimeter.d.ts +8 -3
- package/lib/exercises/geometry/euclidean/squarePerimeter.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/squarePerimeter.js +23 -39
- package/lib/exercises/geometry/euclidean/thales.d.ts +8 -3
- package/lib/exercises/geometry/euclidean/thales.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/thales.js +41 -59
- package/lib/exercises/geometry/euclidean/thalesCalcul.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/thalesCalcul.js +27 -43
- package/lib/exercises/geometry/euclidean/triangleArea.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/triangleArea.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/triangleArea.js +27 -43
- package/lib/exercises/geometry/euclidean/triangleAreaV2.d.ts +8 -3
- package/lib/exercises/geometry/euclidean/triangleAreaV2.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/triangleAreaV2.js +44 -64
- package/lib/exercises/geometry/euclidean/trianglePerimeter.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/trianglePerimeter.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/trianglePerimeter.js +24 -40
- package/lib/exercises/geometry/euclidean/trigonometry.d.ts +10 -3
- package/lib/exercises/geometry/euclidean/trigonometry.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/trigonometry.js +46 -67
- package/lib/exercises/geometry/euclidean/trigonometryAngleCalcul.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/trigonometryAngleCalcul.js +27 -43
- package/lib/exercises/geometry/euclidean/trigonometrySideCalcul.d.ts +7 -3
- package/lib/exercises/geometry/euclidean/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/geometry/euclidean/trigonometrySideCalcul.js +27 -43
- package/lib/exercises/geometry/vectors/chasles.d.ts +8 -3
- package/lib/exercises/geometry/vectors/chasles.d.ts.map +1 -1
- package/lib/exercises/geometry/vectors/chasles.js +28 -46
- package/lib/exercises/geometry/vectors/coordinatesReading.d.ts +11 -3
- package/lib/exercises/geometry/vectors/coordinatesReading.d.ts.map +1 -1
- package/lib/exercises/geometry/vectors/coordinatesReading.js +29 -48
- package/lib/exercises/geometry/vectors/determinant.d.ts +9 -3
- package/lib/exercises/geometry/vectors/determinant.d.ts.map +1 -1
- package/lib/exercises/geometry/vectors/determinant.js +30 -52
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +7 -3
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +26 -43
- package/lib/exercises/geometry/vectors/scalarProductViaNorms.js +1 -1
- package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts +9 -3
- package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
- package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.js +27 -47
- package/lib/exercises/limits/polynomLimit.d.ts +8 -3
- package/lib/exercises/limits/polynomLimit.d.ts.map +1 -1
- package/lib/exercises/limits/polynomLimit.js +28 -47
- package/lib/exercises/limits/polynomLimitNoFI.d.ts +8 -3
- package/lib/exercises/limits/polynomLimitNoFI.d.ts.map +1 -1
- package/lib/exercises/limits/polynomLimitNoFI.js +28 -48
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts +8 -3
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
- package/lib/exercises/limits/rationalFracForbiddenValueLimit.js +28 -48
- package/lib/exercises/limits/rationalFracLimit.d.ts +8 -3
- package/lib/exercises/limits/rationalFracLimit.d.ts.map +1 -1
- package/lib/exercises/limits/rationalFracLimit.js +28 -48
- package/lib/exercises/limits/sequenceGeometricLimit.d.ts +9 -3
- package/lib/exercises/limits/sequenceGeometricLimit.d.ts.map +1 -1
- package/lib/exercises/limits/sequenceGeometricLimit.js +26 -33
- package/lib/exercises/limits/sequencePolynomLimit.d.ts +8 -3
- package/lib/exercises/limits/sequencePolynomLimit.d.ts.map +1 -1
- package/lib/exercises/limits/sequencePolynomLimit.js +28 -47
- package/lib/exercises/limits/sequencePolynomNoFILimit.d.ts +8 -3
- package/lib/exercises/limits/sequencePolynomNoFILimit.d.ts.map +1 -1
- package/lib/exercises/limits/sequencePolynomNoFILimit.js +28 -48
- package/lib/exercises/limits/sequencePolynomProductLimit.d.ts +8 -3
- package/lib/exercises/limits/sequencePolynomProductLimit.d.ts.map +1 -1
- package/lib/exercises/limits/sequencePolynomProductLimit.js +28 -48
- package/lib/exercises/limits/sequenceRationalFracLimit.d.ts +8 -3
- package/lib/exercises/limits/sequenceRationalFracLimit.d.ts.map +1 -1
- package/lib/exercises/limits/sequenceRationalFracLimit.js +28 -48
- package/lib/exercises/limits/sequenceSimpleElementsSumLimit.d.ts +8 -3
- package/lib/exercises/limits/sequenceSimpleElementsSumLimit.d.ts.map +1 -1
- package/lib/exercises/limits/sequenceSimpleElementsSumLimit.js +27 -47
- package/lib/exercises/percent/applyPercent.d.ts +7 -3
- package/lib/exercises/percent/applyPercent.d.ts.map +1 -1
- package/lib/exercises/percent/applyPercent.js +32 -49
- package/lib/exercises/percent/averageEvolutionRate.d.ts +7 -3
- package/lib/exercises/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/percent/averageEvolutionRate.js +31 -48
- package/lib/exercises/percent/evolutionToCM.d.ts +9 -3
- package/lib/exercises/percent/evolutionToCM.d.ts.map +1 -1
- package/lib/exercises/percent/evolutionToCM.js +34 -53
- package/lib/exercises/percent/globalPercent.d.ts +7 -3
- package/lib/exercises/percent/globalPercent.d.ts.map +1 -1
- package/lib/exercises/percent/globalPercent.js +30 -48
- package/lib/exercises/percent/reciprocalPercentage.d.ts +7 -3
- package/lib/exercises/percent/reciprocalPercentage.d.ts.map +1 -1
- package/lib/exercises/percent/reciprocalPercentage.js +32 -49
- package/lib/exercises/powers/calculateNegativePower.d.ts +9 -3
- package/lib/exercises/powers/calculateNegativePower.d.ts.map +1 -1
- package/lib/exercises/powers/calculateNegativePower.js +38 -57
- package/lib/exercises/powers/calculatePower.d.ts +9 -3
- package/lib/exercises/powers/calculatePower.d.ts.map +1 -1
- package/lib/exercises/powers/calculatePower.js +43 -62
- package/lib/exercises/powers/decimalToScientific.d.ts +8 -3
- package/lib/exercises/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/powers/decimalToScientific.js +34 -54
- package/lib/exercises/powers/powerDefinition.d.ts +9 -3
- package/lib/exercises/powers/powerDefinition.d.ts.map +1 -1
- package/lib/exercises/powers/powerDefinition.js +27 -46
- package/lib/exercises/powers/powersDivision.d.ts +11 -4
- package/lib/exercises/powers/powersDivision.d.ts.map +1 -1
- package/lib/exercises/powers/powersDivision.js +33 -50
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts +8 -3
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -1
- package/lib/exercises/powers/powersOfTenToDecimal.js +30 -46
- package/lib/exercises/powers/powersPower.d.ts +11 -4
- package/lib/exercises/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/powers/powersPower.js +40 -58
- package/lib/exercises/powers/powersProduct.d.ts +11 -4
- package/lib/exercises/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/powers/powersProduct.js +34 -50
- package/lib/exercises/powers/scientificToDecimal.d.ts +9 -3
- package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/powers/scientificToDecimal.js +30 -48
- package/lib/exercises/primitve/constantPrimitive.d.ts +9 -3
- package/lib/exercises/primitve/constantPrimitive.d.ts.map +1 -1
- package/lib/exercises/primitve/constantPrimitive.js +29 -44
- package/lib/exercises/primitve/exponentialPrimitive.d.ts +12 -3
- package/lib/exercises/primitve/exponentialPrimitive.d.ts.map +1 -1
- package/lib/exercises/primitve/exponentialPrimitive.js +64 -72
- package/lib/exercises/primitve/logarithmePrimitive.d.ts +10 -3
- package/lib/exercises/primitve/logarithmePrimitive.d.ts.map +1 -1
- package/lib/exercises/primitve/logarithmePrimitive.js +41 -55
- package/lib/exercises/primitve/polynomialPrimitive.d.ts +10 -3
- package/lib/exercises/primitve/polynomialPrimitive.d.ts.map +1 -1
- package/lib/exercises/primitve/polynomialPrimitive.js +30 -45
- package/lib/exercises/primitve/sinCosPrimitive.d.ts +12 -3
- package/lib/exercises/primitve/sinCosPrimitive.d.ts.map +1 -1
- package/lib/exercises/primitve/sinCosPrimitive.js +54 -68
- package/lib/exercises/primitve/usualPrimitives.d.ts +12 -3
- package/lib/exercises/primitve/usualPrimitives.d.ts.map +1 -1
- package/lib/exercises/primitve/usualPrimitives.js +55 -21
- package/lib/exercises/probaStat/averageWithTable.d.ts +7 -3
- package/lib/exercises/probaStat/averageWithTable.d.ts.map +1 -1
- package/lib/exercises/probaStat/averageWithTable.js +28 -44
- package/lib/exercises/probaStat/ballsBasicProbas.d.ts +9 -3
- package/lib/exercises/probaStat/ballsBasicProbas.d.ts.map +1 -1
- package/lib/exercises/probaStat/ballsBasicProbas.js +30 -49
- package/lib/exercises/probaStat/cardBasicProbas.d.ts +8 -3
- package/lib/exercises/probaStat/cardBasicProbas.d.ts.map +1 -1
- package/lib/exercises/probaStat/cardBasicProbas.js +36 -55
- package/lib/exercises/probaStat/conditionalProbability.d.ts +7 -3
- package/lib/exercises/probaStat/conditionalProbability.d.ts.map +1 -1
- package/lib/exercises/probaStat/conditionalProbability.js +25 -43
- package/lib/exercises/probaStat/diceBasicProbas.d.ts +10 -3
- package/lib/exercises/probaStat/diceBasicProbas.d.ts.map +1 -1
- package/lib/exercises/probaStat/diceBasicProbas.js +36 -55
- package/lib/exercises/probaStat/marginalAndConditionalFrequency.d.ts +11 -3
- package/lib/exercises/probaStat/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/probaStat/marginalAndConditionalFrequency.js +47 -59
- package/lib/exercises/probaStat/median.d.ts +8 -3
- package/lib/exercises/probaStat/median.d.ts.map +1 -1
- package/lib/exercises/probaStat/median.js +30 -47
- package/lib/exercises/probaStat/medianList.d.ts +8 -3
- package/lib/exercises/probaStat/medianList.d.ts.map +1 -1
- package/lib/exercises/probaStat/medianList.js +27 -46
- package/lib/exercises/probaStat/probabilityTree.d.ts +16 -3
- package/lib/exercises/probaStat/probabilityTree.d.ts.map +1 -1
- package/lib/exercises/probaStat/probabilityTree.js +50 -58
- package/lib/exercises/probaStat/quartiles.d.ts +8 -3
- package/lib/exercises/probaStat/quartiles.d.ts.map +1 -1
- package/lib/exercises/probaStat/quartiles.js +30 -47
- package/lib/exercises/probaStat/quartilesList.d.ts +8 -3
- package/lib/exercises/probaStat/quartilesList.d.ts.map +1 -1
- package/lib/exercises/probaStat/quartilesList.js +36 -56
- package/lib/exercises/probaStat/stats2var/averagePoint.d.ts +8 -0
- package/lib/exercises/probaStat/stats2var/averagePoint.d.ts.map +1 -0
- package/lib/exercises/probaStat/stats2var/averagePoint.js +55 -0
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts +10 -3
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +27 -44
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts +9 -3
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticFindExplicitFormula.js +26 -44
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts +7 -3
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticFindReason.js +27 -44
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts +7 -3
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticReasonUsage.js +27 -44
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts +7 -3
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +27 -44
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts +10 -3
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/arithmeticThresholdFind.js +27 -44
- package/lib/exercises/sequences/arithmetic/firstIntegersSum.d.ts +8 -3
- package/lib/exercises/sequences/arithmetic/firstIntegersSum.d.ts.map +1 -1
- package/lib/exercises/sequences/arithmetic/firstIntegersSum.js +26 -53
- package/lib/exercises/sequences/explicitFormulaUsage.d.ts +9 -21
- package/lib/exercises/sequences/explicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/explicitFormulaUsage.js +29 -65
- package/lib/exercises/sequences/genericSequenceVariations.d.ts +8 -3
- package/lib/exercises/sequences/genericSequenceVariations.d.ts.map +1 -1
- package/lib/exercises/sequences/genericSequenceVariations.js +27 -34
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +10 -3
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +27 -44
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +9 -3
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +28 -51
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +9 -3
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricFindReason.js +29 -51
- package/lib/exercises/sequences/geometric/geometricFirstTermsSum.d.ts +9 -3
- package/lib/exercises/sequences/geometric/geometricFirstTermsSum.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricFirstTermsSum.js +27 -55
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +9 -3
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricReasonUsage.js +29 -51
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +9 -3
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -50
- package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts +10 -3
- package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/recurrenceFormulaUsage.js +28 -46
- package/lib/exercises/sets/intervals/inequalityToInterval.d.ts +9 -3
- package/lib/exercises/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/sets/intervals/inequalityToInterval.js +67 -105
- package/lib/exercises/sets/intervals/intervalBelonging.d.ts +0 -3
- package/lib/exercises/sets/intervals/intervalBelonging.d.ts.map +1 -1
- package/lib/exercises/sets/intervals/intervalBelonging.js +64 -68
- package/lib/exercises/sets/intervals/intervalsIntersection.d.ts +9 -3
- package/lib/exercises/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/sets/intervals/intervalsIntersection.js +28 -51
- package/lib/exercises/sets/intervals/intervalsUnion.d.ts +9 -3
- package/lib/exercises/sets/intervals/intervalsUnion.d.ts.map +1 -1
- package/lib/exercises/sets/intervals/intervalsUnion.js +28 -50
- package/lib/exercises/sets/setBelonging.d.ts +7 -3
- package/lib/exercises/sets/setBelonging.d.ts.map +1 -1
- package/lib/exercises/sets/setBelonging.js +27 -45
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +7 -3
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -1
- package/lib/exercises/squareRoots/simpifySquareRoot.js +32 -48
- package/lib/exercises/squareRoots/squareRootEquation.d.ts +8 -3
- package/lib/exercises/squareRoots/squareRootEquation.d.ts.map +1 -1
- package/lib/exercises/squareRoots/squareRootEquation.js +28 -56
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +7 -3
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -1
- package/lib/exercises/trigonometry/mainRemarkableValues.js +36 -45
- package/lib/exercises/trigonometry/remarkableValues.d.ts +7 -3
- package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/exercises/trigonometry/remarkableValues.js +38 -50
- package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -1
- package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/math/complex/complex.d.ts +7 -2
- package/lib/math/complex/complex.d.ts.map +1 -1
- package/lib/math/complex/complex.js +41 -7
- package/lib/math/numbers/nombre.d.ts +6 -1
- package/lib/math/numbers/nombre.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.d.ts +6 -1
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +3 -3
- package/lib/math/numbers/reals/real.d.ts +3 -3
- package/lib/math/numbers/reals/real.d.ts.map +1 -1
- package/lib/math/numbers/reals/real.js +8 -5
- package/lib/math/sequences/geometricSequence.d.ts.map +1 -1
- package/lib/math/sequences/geometricSequence.js +3 -1
- package/lib/math/utils/latex/frenchify.d.ts +2 -0
- package/lib/math/utils/latex/frenchify.d.ts.map +1 -0
- package/lib/math/utils/latex/frenchify.js +7 -0
- package/lib/server.js +21 -1
- package/lib/tree/nodes/complex/complexNode.d.ts +2 -0
- package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
- package/lib/tree/nodes/complex/complexNode.js +24 -0
- package/lib/tree/nodes/functions/cosNode.d.ts +2 -0
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +11 -0
- package/lib/tree/nodes/functions/expNode.d.ts +8 -1
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +17 -1
- package/lib/tree/nodes/functions/logNode.d.ts +2 -0
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +11 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts +2 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/oppositeNode.js +11 -0
- package/lib/tree/nodes/functions/sinNode.d.ts +2 -0
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +11 -0
- package/lib/tree/nodes/functions/sqrtNode.d.ts +2 -0
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +11 -0
- package/lib/tree/nodes/node.d.ts +2 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/constantNode.d.ts +2 -0
- package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/constantNode.js +6 -0
- package/lib/tree/nodes/numbers/numberNode.d.ts +2 -0
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +11 -0
- package/lib/tree/nodes/operators/addNode.d.ts +2 -0
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +19 -1
- package/lib/tree/nodes/operators/divideNode.d.ts +2 -0
- package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/divideNode.js +32 -15
- package/lib/tree/nodes/operators/equalNode.d.ts +8 -1
- package/lib/tree/nodes/operators/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/equalNode.js +20 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts +8 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +29 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts +8 -2
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +22 -4
- package/lib/tree/nodes/operators/powerNode.d.ts +8 -1
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +27 -1
- package/lib/tree/nodes/operators/substractNode.d.ts +2 -0
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +14 -0
- package/lib/tree/nodes/variables/variableNode.d.ts +2 -0
- package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
- package/lib/tree/nodes/variables/variableNode.js +6 -0
- package/lib/utils/average.d.ts +2 -0
- package/lib/utils/average.d.ts.map +1 -0
- package/lib/utils/average.js +9 -0
- package/lib/utils/coinFlip.d.ts +1 -1
- package/package.json +2 -1
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Complex = exports.ComplexConstructor = void 0;
|
|
4
4
|
const complexNode_1 = require("../../tree/nodes/complex/complexNode");
|
|
5
|
+
const oppositeNode_1 = require("../../tree/nodes/functions/oppositeNode");
|
|
6
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
7
|
+
const piNode_1 = require("../../tree/nodes/numbers/piNode");
|
|
5
8
|
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
9
|
+
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
6
10
|
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
7
11
|
const variableNode_1 = require("../../tree/nodes/variables/variableNode");
|
|
8
12
|
const rational_1 = require("../numbers/rationals/rational");
|
|
13
|
+
const real_1 = require("../numbers/reals/real");
|
|
9
14
|
const randint_1 = require("../utils/random/randint");
|
|
10
15
|
class ComplexConstructor {
|
|
11
16
|
static random() {
|
|
@@ -39,22 +44,22 @@ class Complex {
|
|
|
39
44
|
const conj = this.conjugate();
|
|
40
45
|
const invRe = new rational_1.Rational(conj.re, moduleSq).simplify().toTree();
|
|
41
46
|
const invIm = new rational_1.Rational(conj.im, moduleSq).simplify().toTree();
|
|
42
|
-
return new addNode_1.AddNode(invRe, new multiplyNode_1.MultiplyNode(invIm, new variableNode_1.VariableNode(
|
|
47
|
+
return new addNode_1.AddNode(invRe, new multiplyNode_1.MultiplyNode(invIm, new variableNode_1.VariableNode("i")));
|
|
43
48
|
}
|
|
44
49
|
divideNode(z) {
|
|
45
50
|
const moduleSq = z.moduleSquared();
|
|
46
51
|
const newRe = new rational_1.Rational(this.re * z.re + this.im * z.im, moduleSq).simplify().toTree();
|
|
47
52
|
const newIm = new rational_1.Rational(this.im * z.re - z.im * this.re, moduleSq).simplify().toTree();
|
|
48
53
|
let imNode;
|
|
49
|
-
if (newIm.toTex() ===
|
|
54
|
+
if (newIm.toTex() === "0")
|
|
50
55
|
return newRe;
|
|
51
|
-
if (newIm.toTex() ===
|
|
52
|
-
imNode = new variableNode_1.VariableNode(
|
|
56
|
+
if (newIm.toTex() === "1")
|
|
57
|
+
imNode = new variableNode_1.VariableNode("i");
|
|
53
58
|
else
|
|
54
|
-
imNode = new multiplyNode_1.MultiplyNode(newIm, new variableNode_1.VariableNode(
|
|
55
|
-
if (newRe.toTex() ===
|
|
59
|
+
imNode = new multiplyNode_1.MultiplyNode(newIm, new variableNode_1.VariableNode("i"));
|
|
60
|
+
if (newRe.toTex() === "0")
|
|
56
61
|
return imNode;
|
|
57
|
-
return new addNode_1.AddNode(newRe, new multiplyNode_1.MultiplyNode(newIm, new variableNode_1.VariableNode(
|
|
62
|
+
return new addNode_1.AddNode(newRe, new multiplyNode_1.MultiplyNode(newIm, new variableNode_1.VariableNode("i")));
|
|
58
63
|
}
|
|
59
64
|
multiply(z) {
|
|
60
65
|
return new Complex(this.re * z.re - this.im * z.im, this.re * z.im + this.im * z.re);
|
|
@@ -65,6 +70,35 @@ class Complex {
|
|
|
65
70
|
conjugate() {
|
|
66
71
|
return new Complex(this.re, -this.im);
|
|
67
72
|
}
|
|
73
|
+
toArgumentTree() {
|
|
74
|
+
if (this.re === 0 && this.im === 0)
|
|
75
|
+
throw Error("0 n'a pas d'argument");
|
|
76
|
+
if (this.re === 0) {
|
|
77
|
+
const piOver2 = new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(2));
|
|
78
|
+
if (this.im > 0)
|
|
79
|
+
return piOver2;
|
|
80
|
+
else
|
|
81
|
+
return new oppositeNode_1.OppositeNode(piOver2);
|
|
82
|
+
}
|
|
83
|
+
if (this.im === 0) {
|
|
84
|
+
if (this.re > 0)
|
|
85
|
+
return new numberNode_1.NumberNode(0);
|
|
86
|
+
else
|
|
87
|
+
return piNode_1.PiNode;
|
|
88
|
+
}
|
|
89
|
+
if (this.re > 0) {
|
|
90
|
+
//arctan(b/a)
|
|
91
|
+
}
|
|
92
|
+
if (this.im > 0) {
|
|
93
|
+
//arctan(b/a)+pi
|
|
94
|
+
}
|
|
95
|
+
if (this.im < 0) {
|
|
96
|
+
//arctan(b/a)-pi
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
toModuleTree() {
|
|
100
|
+
return new real_1.SquareRoot(this.re ** 2 + this.im ** 2).simplify().toTree();
|
|
101
|
+
}
|
|
68
102
|
toTree() {
|
|
69
103
|
return new complexNode_1.ComplexNode(this.re, this.im);
|
|
70
104
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Node } from '../../tree/nodes/node';
|
|
2
|
+
import { FractionNodeOptions } from '../../tree/nodes/operators/fractionNode';
|
|
2
3
|
import { Integer } from './integer/integer';
|
|
3
4
|
export declare enum NumberType {
|
|
4
5
|
Integer = 0,
|
|
@@ -6,13 +7,17 @@ export declare enum NumberType {
|
|
|
6
7
|
Rational = 2,
|
|
7
8
|
Real = 3
|
|
8
9
|
}
|
|
10
|
+
type ToTreeOpts = {
|
|
11
|
+
FractionNodeOpts?: FractionNodeOptions;
|
|
12
|
+
};
|
|
9
13
|
export interface Nombre {
|
|
10
14
|
value: number;
|
|
11
15
|
tex: string;
|
|
12
16
|
type: NumberType;
|
|
13
|
-
toTree: () => Node;
|
|
17
|
+
toTree: (opts?: ToTreeOpts) => Node;
|
|
14
18
|
}
|
|
15
19
|
export declare abstract class NombreConstructor {
|
|
16
20
|
static random(): import("./decimals/decimal").Decimal | Integer | import("./rationals/rational").Rational | import("./reals/real").Real;
|
|
17
21
|
}
|
|
22
|
+
export {};
|
|
18
23
|
//# sourceMappingURL=nombre.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nombre.d.ts","sourceRoot":"","sources":["../../../src/math/numbers/nombre.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"nombre.d.ts","sourceRoot":"","sources":["../../../src/math/numbers/nombre.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAI9E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C,oBAAY,UAAU;IACpB,OAAO,IAAA;IACP,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,IAAI,IAAA;CACL;AAED,KAAK,UAAU,GAAG;IAChB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;CACxC,CAAC;AACF,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC;AAED,8BAAsB,iBAAiB;IACrC,MAAM,CAAC,MAAM;CAad"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Node } from '../../../tree/nodes/node';
|
|
2
|
+
import { FractionNodeOptions } from '../../../tree/nodes/operators/fractionNode';
|
|
2
3
|
import { Nombre, NumberType } from '../nombre';
|
|
4
|
+
type ToTreeOpts = {
|
|
5
|
+
FractionNodeOpts?: FractionNodeOptions;
|
|
6
|
+
};
|
|
3
7
|
export declare abstract class RationalConstructor {
|
|
4
8
|
/**
|
|
5
9
|
* @param maxGcd max number by which the fraction is simplifiable
|
|
@@ -21,7 +25,8 @@ export declare class Rational implements Nombre {
|
|
|
21
25
|
multiply(nb: Nombre): Nombre;
|
|
22
26
|
divide(nb: Nombre): Nombre;
|
|
23
27
|
opposite(): Rational;
|
|
24
|
-
toTree(): Node;
|
|
28
|
+
toTree(opts?: ToTreeOpts): Node;
|
|
25
29
|
simplify(): Nombre;
|
|
26
30
|
}
|
|
31
|
+
export {};
|
|
27
32
|
//# sourceMappingURL=rational.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rational.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/rationals/rational.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"rational.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/rationals/rational.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAM5F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,KAAK,UAAU,GAAG;IAChB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;CACxC,CAAC;AACF,8BAAsB,mBAAmB;IACvC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAM,GAAE,MAAW;IAW7C,MAAM,CAAC,kBAAkB,CAAC,GAAG,GAAE,MAAW;IAO1C,MAAM,CAAC,0BAA0B,CAAC,GAAG,GAAE,MAAW;CAQnD;AAED,qBAAa,QAAS,YAAW,MAAM;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;gBAEL,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAUlD,KAAK;IAIL,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAgBvB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAgB5B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAgB1B,QAAQ,IAAI,QAAQ;IAIpB,MAAM,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI;IAQ/B,QAAQ,IAAI,MAAM;CAMnB"}
|
|
@@ -110,10 +110,10 @@ class Rational {
|
|
|
110
110
|
opposite() {
|
|
111
111
|
return new Rational(-this.num, this.denum);
|
|
112
112
|
}
|
|
113
|
-
toTree() {
|
|
113
|
+
toTree(opts) {
|
|
114
114
|
if (this.num < 0)
|
|
115
|
-
return new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-this.num), new numberNode_1.NumberNode(this.denum)));
|
|
116
|
-
return new fractionNode_1.FractionNode(new numberNode_1.NumberNode(this.num), new numberNode_1.NumberNode(this.denum));
|
|
115
|
+
return new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(-this.num), new numberNode_1.NumberNode(this.denum), opts?.FractionNodeOpts));
|
|
116
|
+
return new fractionNode_1.FractionNode(new numberNode_1.NumberNode(this.num), new numberNode_1.NumberNode(this.denum), opts?.FractionNodeOpts);
|
|
117
117
|
}
|
|
118
118
|
simplify() {
|
|
119
119
|
const sign = (this.num > 0 && this.denum > 0) || (this.num < 0 && this.denum < 0) ? 1 : -1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node } from
|
|
2
|
-
import { Nombre, NumberType } from
|
|
1
|
+
import { Node } from "../../../tree/nodes/node";
|
|
2
|
+
import { Nombre, NumberType } from "../nombre";
|
|
3
3
|
export declare abstract class RealConstructor {
|
|
4
4
|
static random(): Real;
|
|
5
5
|
}
|
|
@@ -24,7 +24,7 @@ export declare class SquareRoot extends Real {
|
|
|
24
24
|
operand: number;
|
|
25
25
|
constructor(operand: number);
|
|
26
26
|
getSimplifiedCoeffs(): [number, number];
|
|
27
|
-
simplify():
|
|
27
|
+
simplify(): Nombre;
|
|
28
28
|
toTex(): string;
|
|
29
29
|
toTree(): Node;
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"real.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/reals/real.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAQ7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,8BAAsB,eAAe;IACnC,MAAM,CAAC,MAAM;CAUd;AACD,qBAAa,IAAK,YAAW,MAAM;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;gBACL,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAKtC,MAAM,IAAI,IAAI;CAIf;AAED,8BAAsB,qBAAqB;IACzC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,EAAE,kBAA0B,EAAE,SAAc,EAAE;;;KAAA,GAAG,UAAU;IASrF,MAAM,CAAC,kBAAkB,CAAC,GAAG,GAAE,MAAW,GAAG,UAAU;CAIxD;AAED,qBAAa,UAAW,SAAQ,IAAI;IAClC,OAAO,EAAE,MAAM,CAAC;gBACJ,OAAO,EAAE,MAAM;IAK3B,mBAAmB,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAevC,QAAQ,IAAI,
|
|
1
|
+
{"version":3,"file":"real.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/reals/real.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAQ7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,8BAAsB,eAAe;IACnC,MAAM,CAAC,MAAM;CAUd;AACD,qBAAa,IAAK,YAAW,MAAM;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;gBACL,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAKtC,MAAM,IAAI,IAAI;CAIf;AAED,8BAAsB,qBAAqB;IACzC;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,EAAE,kBAA0B,EAAE,SAAc,EAAE;;;KAAA,GAAG,UAAU;IASrF,MAAM,CAAC,kBAAkB,CAAC,GAAG,GAAE,MAAW,GAAG,UAAU;CAIxD;AAED,qBAAa,UAAW,SAAQ,IAAI;IAClC,OAAO,EAAE,MAAM,CAAC;gBACJ,OAAO,EAAE,MAAM;IAK3B,mBAAmB,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAevC,QAAQ,IAAI,MAAM;IAqBlB,KAAK,IAAI,MAAM;IAIf,MAAM,IAAI,IAAI;CAGf"}
|
|
@@ -10,6 +10,7 @@ const piNode_1 = require("../../../tree/nodes/numbers/piNode");
|
|
|
10
10
|
const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
|
|
11
11
|
const diceFlip_1 = require("../../../utils/diceFlip");
|
|
12
12
|
const random_1 = require("../../../utils/random");
|
|
13
|
+
const integer_1 = require("../integer/integer");
|
|
13
14
|
const primes_1 = require("../integer/primes");
|
|
14
15
|
const nombre_1 = require("../nombre");
|
|
15
16
|
class RealConstructor {
|
|
@@ -17,11 +18,11 @@ class RealConstructor {
|
|
|
17
18
|
const dice = (0, diceFlip_1.diceFlip)(2);
|
|
18
19
|
switch (dice) {
|
|
19
20
|
case 0:
|
|
20
|
-
return new Real(Math.PI,
|
|
21
|
+
return new Real(Math.PI, "\\pi");
|
|
21
22
|
case 1:
|
|
22
23
|
return SquareRootConstructor.randomIrreductible();
|
|
23
24
|
}
|
|
24
|
-
return new Real(Math.PI,
|
|
25
|
+
return new Real(Math.PI, "\\pi");
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
exports.RealConstructor = RealConstructor;
|
|
@@ -32,7 +33,7 @@ class Real {
|
|
|
32
33
|
this.type = nombre_1.NumberType.Real;
|
|
33
34
|
}
|
|
34
35
|
toTree() {
|
|
35
|
-
if (this.tex ===
|
|
36
|
+
if (this.tex === "\\pi")
|
|
36
37
|
return piNode_1.PiNode;
|
|
37
38
|
return new numberNode_1.NumberNode(this.value);
|
|
38
39
|
}
|
|
@@ -78,10 +79,12 @@ class SquareRoot extends Real {
|
|
|
78
79
|
return [outsideSqrt, insideSqrt];
|
|
79
80
|
}
|
|
80
81
|
simplify() {
|
|
82
|
+
if (this.operand === 0)
|
|
83
|
+
return new integer_1.Integer(0);
|
|
81
84
|
const [outsideSqrt, insideSqrt] = this.getSimplifiedCoeffs();
|
|
82
85
|
const simplified = insideSqrt !== 1
|
|
83
|
-
? new Real(outsideSqrt * Math.sqrt(insideSqrt), `${outsideSqrt === 1 ?
|
|
84
|
-
: new Real(outsideSqrt, outsideSqrt +
|
|
86
|
+
? new Real(outsideSqrt * Math.sqrt(insideSqrt), `${outsideSqrt === 1 ? "" : `${outsideSqrt}`}\\sqrt{${insideSqrt}}`)
|
|
87
|
+
: new Real(outsideSqrt, outsideSqrt + "");
|
|
85
88
|
simplified.toTree = () => {
|
|
86
89
|
return insideSqrt !== 1
|
|
87
90
|
? outsideSqrt === 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricSequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/geometricSequence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAOvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIvD,8BAAsB,4BAA4B;IAChD,MAAM,CAAC,MAAM,CAAC,UAAU,GAAE,UAA+B;IAkBzD,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,UAAU;CAsB/C;AAED,qBAAa,iBAAiB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;gBAEH,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK7C,QAAQ;IAMR,MAAM;
|
|
1
|
+
{"version":3,"file":"geometricSequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/geometricSequence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAOvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIvD,8BAAsB,4BAA4B;IAChD,MAAM,CAAC,MAAM,CAAC,UAAU,GAAE,UAA+B;IAkBzD,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,UAAU;CAsB/C;AAED,qBAAa,iBAAiB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;gBAEH,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK7C,QAAQ;IAMR,MAAM;CAKP"}
|
|
@@ -68,7 +68,9 @@ class GeometricSequence {
|
|
|
68
68
|
return '0';
|
|
69
69
|
}
|
|
70
70
|
toTree() {
|
|
71
|
-
return new multiplyNode_1.MultiplyNode(this.firstTerm.toTree(), new powerNode_1.PowerNode(this.reason.toTree(), new variableNode_1.VariableNode('n')),
|
|
71
|
+
return new multiplyNode_1.MultiplyNode(this.firstTerm.toTree(), new powerNode_1.PowerNode(this.reason.toTree(), new variableNode_1.VariableNode('n')), {
|
|
72
|
+
forceTimesSign: true,
|
|
73
|
+
});
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
exports.GeometricSequence = GeometricSequence;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frenchify.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/latex/frenchify.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAO,MAAM,WAElC,CAAC"}
|
package/lib/server.js
CHANGED
|
@@ -5,8 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const exercises_1 = require("./exercises/exercises");
|
|
7
7
|
const express_1 = __importDefault(require("express"));
|
|
8
|
+
const body_parser_1 = __importDefault(require("body-parser"));
|
|
8
9
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
9
10
|
const cors_1 = __importDefault(require("cors"));
|
|
11
|
+
const jsonParser = body_parser_1.default.json();
|
|
10
12
|
const allExercises = [...exercises_1.exercises];
|
|
11
13
|
const runServer = () => {
|
|
12
14
|
dotenv_1.default.config();
|
|
@@ -37,7 +39,7 @@ const runServer = () => {
|
|
|
37
39
|
res.send('Exo not found');
|
|
38
40
|
const questions = exo?.generator(10);
|
|
39
41
|
const populatedQuestions = questions?.map((q) => {
|
|
40
|
-
return { ...q, propositions:
|
|
42
|
+
return { ...q, propositions: exo.getPropositions?.(4, q.qcmGeneratorProps) };
|
|
41
43
|
});
|
|
42
44
|
res.json({
|
|
43
45
|
exercise: exo,
|
|
@@ -46,6 +48,24 @@ const runServer = () => {
|
|
|
46
48
|
prevId: allExercises[(exoIndex - 1 + allExercises.length) % allExercises.length].id,
|
|
47
49
|
});
|
|
48
50
|
});
|
|
51
|
+
app.post('/vea', jsonParser, (req, res) => {
|
|
52
|
+
const exoId = req.query.exoId;
|
|
53
|
+
const { ans, veaProps } = req.body;
|
|
54
|
+
const exoIndex = allExercises.findIndex((exo) => exo.id == exoId);
|
|
55
|
+
const exo = allExercises[exoIndex];
|
|
56
|
+
if (!exo) {
|
|
57
|
+
res.send('Exo not found');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!exo.isAnswerValid) {
|
|
61
|
+
res.send('No VEA implemented');
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const result = exo.isAnswerValid(ans, veaProps) ?? false;
|
|
65
|
+
res.json({
|
|
66
|
+
result,
|
|
67
|
+
});
|
|
68
|
+
});
|
|
49
69
|
app.listen('5000', () => {
|
|
50
70
|
console.log(`[server]: Server is running at http://localhost:5000`);
|
|
51
71
|
});
|
|
@@ -7,6 +7,8 @@ export declare class ComplexNode implements Node {
|
|
|
7
7
|
im: number;
|
|
8
8
|
type: NodeType;
|
|
9
9
|
constructor(re: number, im: number, tex?: string, mathString?: string);
|
|
10
|
+
toEquivalentNodes(): Node[];
|
|
11
|
+
toAllValidTexs(): string[];
|
|
10
12
|
toMathString(): string;
|
|
11
13
|
toTex(): string;
|
|
12
14
|
toMathjs(): import("mathjs").Complex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complexNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/complex/complexNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"complexNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/complex/complexNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAOrD,qBAAa,WAAY,YAAW,IAAI;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAmB;gBAErB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAwBrE,iBAAiB,IAAI,IAAI,EAAE;IAqB3B,cAAc,IAAI,MAAM,EAAE;IAG1B,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,SAAS;CAGV"}
|
|
@@ -4,6 +4,11 @@ exports.ComplexNode = void 0;
|
|
|
4
4
|
const mathjs_1 = require("mathjs");
|
|
5
5
|
const node_1 = require("../node");
|
|
6
6
|
const complex_1 = require("../../../math/complex/complex");
|
|
7
|
+
const numberNode_1 = require("../numbers/numberNode");
|
|
8
|
+
const variableNode_1 = require("../variables/variableNode");
|
|
9
|
+
const oppositeNode_1 = require("../functions/oppositeNode");
|
|
10
|
+
const multiplyNode_1 = require("../operators/multiplyNode");
|
|
11
|
+
const addNode_1 = require("../operators/addNode");
|
|
7
12
|
class ComplexNode {
|
|
8
13
|
constructor(re, im, tex, mathString) {
|
|
9
14
|
this.type = node_1.NodeType.number;
|
|
@@ -27,6 +32,25 @@ class ComplexNode {
|
|
|
27
32
|
this.tex = tex || formatedTex;
|
|
28
33
|
this.mathString = mathString || this.tex;
|
|
29
34
|
}
|
|
35
|
+
toEquivalentNodes() {
|
|
36
|
+
const res = [];
|
|
37
|
+
if (this.im === 0) {
|
|
38
|
+
return [new numberNode_1.NumberNode(this.re)];
|
|
39
|
+
}
|
|
40
|
+
if (this.re === 0) {
|
|
41
|
+
if (this.im === 1) {
|
|
42
|
+
return [new variableNode_1.VariableNode('i')];
|
|
43
|
+
}
|
|
44
|
+
if (this.im === -1) {
|
|
45
|
+
return [new oppositeNode_1.OppositeNode(new variableNode_1.VariableNode('i'))];
|
|
46
|
+
}
|
|
47
|
+
return new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(this.im), new variableNode_1.VariableNode('i')).toEquivalentNodes();
|
|
48
|
+
}
|
|
49
|
+
return new addNode_1.AddNode(new numberNode_1.NumberNode(this.re), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(this.im), new variableNode_1.VariableNode('i'))).toEquivalentNodes();
|
|
50
|
+
}
|
|
51
|
+
toAllValidTexs() {
|
|
52
|
+
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
53
|
+
}
|
|
30
54
|
toMathString() {
|
|
31
55
|
return `${this.mathString ? this.mathString : this.tex}`;
|
|
32
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/cosNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,KAAK,EAAE,IAAI;IAIvB,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,QAAQ;IAIR,QAAQ,IAAI,IAAI;CAGjB"}
|
|
1
|
+
{"version":3,"file":"cosNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/cosNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,KAAK,EAAE,IAAI;IAIvB,YAAY,IAAI,MAAM;IAItB,iBAAiB,IAAI,IAAI,EAAE;IAS3B,cAAc,IAAI,MAAM,EAAE;IAI1B,KAAK,IAAI,MAAM;IAIf,QAAQ;IAIR,QAAQ,IAAI,IAAI;CAGjB"}
|
|
@@ -12,6 +12,17 @@ class CosNode extends functionNode_1.FunctionNode {
|
|
|
12
12
|
toMathString() {
|
|
13
13
|
return `cos(${this.child.toMathString()})`;
|
|
14
14
|
}
|
|
15
|
+
toEquivalentNodes() {
|
|
16
|
+
const res = [];
|
|
17
|
+
const childNodes = this.child.toEquivalentNodes();
|
|
18
|
+
childNodes.forEach((childNode) => {
|
|
19
|
+
res.push(new CosNode(childNode));
|
|
20
|
+
});
|
|
21
|
+
return res;
|
|
22
|
+
}
|
|
23
|
+
toAllValidTexs() {
|
|
24
|
+
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
25
|
+
}
|
|
15
26
|
toTex() {
|
|
16
27
|
return `\\cos\\left(${this.child.toTex()}\\right)`;
|
|
17
28
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { Node, NodeType } from '../node';
|
|
2
2
|
import { FunctionNode } from './functionNode';
|
|
3
|
+
type ExpNodeOptions = {
|
|
4
|
+
useExpNotation: boolean;
|
|
5
|
+
};
|
|
3
6
|
export declare class ExpNode extends FunctionNode implements Node {
|
|
7
|
+
opts?: ExpNodeOptions;
|
|
4
8
|
type: NodeType;
|
|
5
|
-
constructor(child: Node);
|
|
9
|
+
constructor(child: Node, opts?: ExpNodeOptions);
|
|
6
10
|
toMathString(): string;
|
|
7
11
|
toTex(): string;
|
|
8
12
|
toMathjs(): number;
|
|
13
|
+
toEquivalentNodes(): Node[];
|
|
14
|
+
toAllValidTexs(): string[];
|
|
9
15
|
simplify(): Node;
|
|
10
16
|
}
|
|
17
|
+
export {};
|
|
11
18
|
//# sourceMappingURL=expNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/expNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,KAAK,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"expNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/expNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,KAAK,cAAc,GAAG;IACpB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AACF,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;IACvD,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,cAAc;IAK9C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IASf,QAAQ;IAIR,iBAAiB,IAAI,IAAI,EAAE;IAU3B,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,IAAI,IAAI;CAGjB"}
|
|
@@ -5,15 +5,19 @@ const mathjs_1 = require("mathjs");
|
|
|
5
5
|
const node_1 = require("../node");
|
|
6
6
|
const functionNode_1 = require("./functionNode");
|
|
7
7
|
class ExpNode extends functionNode_1.FunctionNode {
|
|
8
|
-
constructor(child) {
|
|
8
|
+
constructor(child, opts) {
|
|
9
9
|
super(functionNode_1.FunctionsIds.exp, child, '\\exp');
|
|
10
10
|
this.type = node_1.NodeType.function;
|
|
11
|
+
this.opts = opts;
|
|
11
12
|
}
|
|
12
13
|
toMathString() {
|
|
13
14
|
return `e^(${this.child.toMathString()})`;
|
|
14
15
|
}
|
|
15
16
|
toTex() {
|
|
16
17
|
const tex = this.child.toTex();
|
|
18
|
+
if (this.opts?.useExpNotation) {
|
|
19
|
+
return `exp\\left(${this.child.toTex}\\right)`;
|
|
20
|
+
}
|
|
17
21
|
const needBraces = tex.length > 1;
|
|
18
22
|
if (needBraces)
|
|
19
23
|
return `e^{${this.child.toTex()}}`;
|
|
@@ -22,6 +26,18 @@ class ExpNode extends functionNode_1.FunctionNode {
|
|
|
22
26
|
toMathjs() {
|
|
23
27
|
return (0, mathjs_1.exp)(this.child.toMathjs());
|
|
24
28
|
}
|
|
29
|
+
toEquivalentNodes() {
|
|
30
|
+
const res = [];
|
|
31
|
+
const childNodes = this.child.toEquivalentNodes();
|
|
32
|
+
childNodes.forEach((childNode) => {
|
|
33
|
+
res.push(new ExpNode(childNode));
|
|
34
|
+
res.push(new ExpNode(childNode, { useExpNotation: true }));
|
|
35
|
+
});
|
|
36
|
+
return res;
|
|
37
|
+
}
|
|
38
|
+
toAllValidTexs() {
|
|
39
|
+
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
40
|
+
}
|
|
25
41
|
simplify() {
|
|
26
42
|
return this;
|
|
27
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/logNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,KAAK,EAAE,IAAI;IAIvB,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAGf,QAAQ;
|
|
1
|
+
{"version":3,"file":"logNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/logNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,KAAK,EAAE,IAAI;IAIvB,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAIR,iBAAiB,IAAI,IAAI,EAAE;IAS3B,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,IAAI,IAAI;CAGjB"}
|
|
@@ -18,6 +18,17 @@ class LogNode extends functionNode_1.FunctionNode {
|
|
|
18
18
|
toMathjs() {
|
|
19
19
|
return (0, mathjs_1.log)(this.child.toMathjs());
|
|
20
20
|
}
|
|
21
|
+
toEquivalentNodes() {
|
|
22
|
+
const res = [];
|
|
23
|
+
const childNodes = this.child.toEquivalentNodes();
|
|
24
|
+
childNodes.forEach((childNode) => {
|
|
25
|
+
res.push(new LogNode(childNode));
|
|
26
|
+
});
|
|
27
|
+
return res;
|
|
28
|
+
}
|
|
29
|
+
toAllValidTexs() {
|
|
30
|
+
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
31
|
+
}
|
|
21
32
|
simplify() {
|
|
22
33
|
return this;
|
|
23
34
|
}
|
|
@@ -4,6 +4,8 @@ export declare class OppositeNode extends FunctionNode implements Node {
|
|
|
4
4
|
constructor(child: Node);
|
|
5
5
|
toMathString(): string;
|
|
6
6
|
toTex(): string;
|
|
7
|
+
toEquivalentNodes(): Node[];
|
|
8
|
+
toAllValidTexs(): string[];
|
|
7
9
|
toMathjs(): number;
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=oppositeNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oppositeNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/oppositeNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAG5D,qBAAa,YAAa,SAAQ,YAAa,YAAW,IAAI;gBAChD,KAAK,EAAE,IAAI;IAGvB,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAcf,QAAQ;CAGT"}
|
|
1
|
+
{"version":3,"file":"oppositeNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/oppositeNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAG5D,qBAAa,YAAa,SAAQ,YAAa,YAAW,IAAI;gBAChD,KAAK,EAAE,IAAI;IAGvB,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAcf,iBAAiB,IAAI,IAAI,EAAE;IAS3B,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ;CAGT"}
|
|
@@ -26,6 +26,17 @@ class OppositeNode extends functionNode_1.FunctionNode {
|
|
|
26
26
|
childTex = `(${childTex})`;
|
|
27
27
|
return `-${childTex}`;
|
|
28
28
|
}
|
|
29
|
+
toEquivalentNodes() {
|
|
30
|
+
const res = [];
|
|
31
|
+
const childNodes = this.child.toEquivalentNodes();
|
|
32
|
+
childNodes.forEach((childNode) => {
|
|
33
|
+
res.push(new OppositeNode(childNode));
|
|
34
|
+
});
|
|
35
|
+
return res;
|
|
36
|
+
}
|
|
37
|
+
toAllValidTexs() {
|
|
38
|
+
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
39
|
+
}
|
|
29
40
|
toMathjs() {
|
|
30
41
|
return (0, mathjs_1.unaryMinus)(this.child.toMathjs());
|
|
31
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sinNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sinNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,KAAK,EAAE,IAAI;IAIvB,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,QAAQ,IAAI,IAAI;CAGjB"}
|
|
1
|
+
{"version":3,"file":"sinNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sinNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;IACvD,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,KAAK,EAAE,IAAI;IAIvB,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,iBAAiB,IAAI,IAAI,EAAE;IAS3B,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,IAAI,IAAI;CAGjB"}
|
|
@@ -18,6 +18,17 @@ class SinNode extends functionNode_1.FunctionNode {
|
|
|
18
18
|
toMathjs() {
|
|
19
19
|
return (0, mathjs_1.sin)(this.child.toMathjs());
|
|
20
20
|
}
|
|
21
|
+
toEquivalentNodes() {
|
|
22
|
+
const res = [];
|
|
23
|
+
const childNodes = this.child.toEquivalentNodes();
|
|
24
|
+
childNodes.forEach((childNode) => {
|
|
25
|
+
res.push(new SinNode(childNode));
|
|
26
|
+
});
|
|
27
|
+
return res;
|
|
28
|
+
}
|
|
29
|
+
toAllValidTexs() {
|
|
30
|
+
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
31
|
+
}
|
|
21
32
|
simplify() {
|
|
22
33
|
return this;
|
|
23
34
|
}
|
|
@@ -6,5 +6,7 @@ export declare class SqrtNode extends FunctionNode implements Node {
|
|
|
6
6
|
toMathString(): string;
|
|
7
7
|
toMathjs(): number | import("mathjs").Complex;
|
|
8
8
|
toTex(): string;
|
|
9
|
+
toEquivalentNodes(): Node[];
|
|
10
|
+
toAllValidTexs(): string[];
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=sqrtNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqrtNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sqrtNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,QAAS,SAAQ,YAAa,YAAW,IAAI;IACxD,IAAI,EAAE,QAAQ,CAAqB;gBACvB,KAAK,EAAE,IAAI;IAGvB,YAAY,IAAI,MAAM;IAGtB,QAAQ;IAGR,KAAK,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"sqrtNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sqrtNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,QAAS,SAAQ,YAAa,YAAW,IAAI;IACxD,IAAI,EAAE,QAAQ,CAAqB;gBACvB,KAAK,EAAE,IAAI;IAGvB,YAAY,IAAI,MAAM;IAGtB,QAAQ;IAGR,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,IAAI,EAAE;IAS3B,cAAc,IAAI,MAAM,EAAE;CAG3B"}
|
|
@@ -18,5 +18,16 @@ class SqrtNode extends functionNode_1.FunctionNode {
|
|
|
18
18
|
toTex() {
|
|
19
19
|
return `\\sqrt{${this.child.toTex()}}`;
|
|
20
20
|
}
|
|
21
|
+
toEquivalentNodes() {
|
|
22
|
+
const res = [];
|
|
23
|
+
const childNodes = this.child.toEquivalentNodes();
|
|
24
|
+
childNodes.forEach((childNode) => {
|
|
25
|
+
res.push(new SqrtNode(childNode));
|
|
26
|
+
});
|
|
27
|
+
return res;
|
|
28
|
+
}
|
|
29
|
+
toAllValidTexs() {
|
|
30
|
+
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
31
|
+
}
|
|
21
32
|
}
|
|
22
33
|
exports.SqrtNode = SqrtNode;
|
package/lib/tree/nodes/node.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/node.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;CACT;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/node.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;CACT;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAC;IAEf,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,EAAE,CAAC;IAChC,cAAc,EAAE,MAAM,MAAM,EAAE,CAAC;IAC/B,KAAK,EAAE,MAAM,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,CAAC;CAErB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constantNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/numbers/constantNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,YAAa,YAAW,IAAI;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAK3C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;
|
|
1
|
+
{"version":3,"file":"constantNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/numbers/constantNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,YAAa,YAAW,IAAI;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAK3C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,cAAc;IAGd,iBAAiB;CAGlB"}
|