math-exercises 3.0.177 → 3.0.179
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/derivation/derivative/derivativeEquationSolving1.d.ts +14 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.js +283 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts +15 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.js +296 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +3 -3
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts +14 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.js +346 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts +15 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.js +435 -0
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts +13 -0
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.js +326 -0
- package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts +14 -0
- package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.js +181 -0
- package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts +10 -0
- package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.js +272 -0
- package/lib/exercises/math/derivation/problems/index.d.ts +5 -0
- package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/index.js +4 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts +8 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.js +171 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts +15 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +328 -0
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts +13 -0
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +275 -0
- package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts +8 -0
- package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts.map +1 -0
- package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.js +137 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts +10 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.js +478 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts +10 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.js +499 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts +10 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.js +240 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts +12 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.js +436 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts +12 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.js +219 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts +13 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.js +273 -0
- package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts +18 -0
- package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.js +295 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts +13 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +388 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts +9 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.js +308 -0
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts +14 -0
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +439 -0
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts +14 -0
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +547 -0
- package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts +15 -0
- package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.js +537 -0
- package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts +15 -0
- package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.js +639 -0
- package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts +14 -0
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.js +530 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts +10 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +451 -0
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts +11 -0
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +514 -0
- package/lib/exercises/math/functions/composition/index.d.ts +0 -1
- package/lib/exercises/math/functions/composition/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/composition/index.js +1 -1
- package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +0 -1
- package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/algebraic/index.js +1 -1
- package/lib/exercises/math/functions/trinoms/sign/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/sign/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts +8 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.js +226 -0
- package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.js +10 -10
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +8 -8
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +6 -6
- package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +8 -8
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +32 -17
- package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts +13 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.js +195 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts +9 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.js +220 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts +15 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/conditionalProbability.js +332 -0
- package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts +8 -0
- package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.js +222 -0
- package/lib/exercises/math/probaStat/conditional/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/conditional/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditional/index.js +4 -0
- package/lib/exercises/math/probaStat/index.d.ts +1 -2
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -2
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts +1 -0
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +26 -199
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/index.js +1 -0
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +6 -2
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +6 -5
- package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.js +4 -27
- package/lib/exercises/math/probaStat/twoEventsSituations.d.ts +29 -0
- package/lib/exercises/math/probaStat/twoEventsSituations.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/twoEventsSituations.js +145 -0
- package/lib/exercises/math/python/index.d.ts +1 -0
- package/lib/exercises/math/python/index.d.ts.map +1 -1
- package/lib/exercises/math/python/index.js +1 -0
- package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts.map +1 -1
- package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.js +11 -8
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +4 -3
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.js +3 -2
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +8 -6
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +6 -5
- package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +0 -2
- package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/index.js +2 -2
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.js +65 -14
- package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts +0 -1
- package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/sum/index.js +1 -1
- package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts +4 -1
- package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/explicitFormulaUsage.js +47 -7
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts +14 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +291 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.js +4 -3
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts +15 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +249 -0
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +2 -2
- package/lib/exercises/math/sequences/geometric/index.d.ts +3 -2
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +6 -2
- package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.js +3 -2
- package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.js +1 -1
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts +0 -1
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/index.js +1 -1
- package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.js +2 -2
- package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +2 -2
- package/lib/exercises/math/sequences/index.d.ts +1 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +1 -0
- package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts +5 -1
- package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/recurrenceFormulaUsage.js +89 -9
- package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.js +5 -9
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +1 -1
- package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/associatePoint.js +55 -6
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.js +5 -6
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.js +1 -3
- package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +2 -2
- package/lib/exercises/pc/snellDescartes.js +2 -2
- package/lib/exercises/vea/polynomialVEA.d.ts +2 -0
- package/lib/exercises/vea/polynomialVEA.d.ts.map +1 -0
- package/lib/exercises/vea/polynomialVEA.js +17 -0
- package/lib/exercises/vea/valueTableVEA.d.ts +8 -0
- package/lib/exercises/vea/valueTableVEA.d.ts.map +1 -0
- package/lib/exercises/vea/valueTableVEA.js +12 -0
- package/lib/index.d.ts +152 -41
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +9 -6
- package/lib/math/polynomials/affine.d.ts +1 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +5 -0
- package/lib/math/utils/arithmetic/primeFactors.js +1 -1
- package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComposition.js +18 -1
- package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts +19 -0
- package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts.map +1 -0
- package/lib/math/utils/polynomial/polynomialInterpolationUtils.js +53 -0
- package/lib/math/utils/polynomial/polynomialUtils.d.ts +37 -0
- package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -0
- package/lib/math/utils/polynomial/polynomialUtils.js +223 -0
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts +18 -4
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +434 -333
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +3 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +5 -0
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +58 -25
- package/lib/prototypesEnhancement.d.ts +1 -0
- package/lib/prototypesEnhancement.d.ts.map +1 -1
- package/lib/prototypesEnhancement.js +3 -0
- package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -1
- package/lib/tests/pdfs/mdCodeToLatex.js +8 -15
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +6 -3
- package/lib/tree/nodes/geometry/degree.js +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +1 -1
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +2 -1
- package/lib/tree/parsers/degreeParser.js +2 -2
- package/lib/tree/utilities/nodeUtils.d.ts +6 -0
- package/lib/tree/utilities/nodeUtils.d.ts.map +1 -0
- package/lib/tree/utilities/nodeUtils.js +24 -0
- package/lib/utils/strings/prependArticle.d.ts +2 -0
- package/lib/utils/strings/prependArticle.d.ts.map +1 -0
- package/lib/utils/strings/prependArticle.js +1 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1480,6 +1480,9 @@ declare const mathExercises: (Exercise<{
|
|
|
1480
1480
|
a: number;
|
|
1481
1481
|
b: number;
|
|
1482
1482
|
c: number;
|
|
1483
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1484
|
+
affineCoeffs: number[];
|
|
1485
|
+
trinomCoeffs: number[];
|
|
1483
1486
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1484
1487
|
param: string;
|
|
1485
1488
|
coeffs: number[];
|
|
@@ -1594,13 +1597,6 @@ declare const mathExercises: (Exercise<{
|
|
|
1594
1597
|
expBRounded: number;
|
|
1595
1598
|
precision: number;
|
|
1596
1599
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1597
|
-
nodeIdsA: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1598
|
-
nodeIdsB: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1599
|
-
nodeIdsAOpB: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1600
|
-
rand: number;
|
|
1601
|
-
}, {
|
|
1602
|
-
isUseExpNotation: boolean;
|
|
1603
|
-
}> | Exercise<{
|
|
1604
1600
|
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1605
1601
|
nodeIdsT: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1606
1602
|
x: number;
|
|
@@ -1835,8 +1831,6 @@ declare const mathExercises: (Exercise<{
|
|
|
1835
1831
|
isMinusInside: boolean;
|
|
1836
1832
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1837
1833
|
k: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1838
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1839
|
-
nodeIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
1840
1834
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1841
1835
|
isFindU: boolean;
|
|
1842
1836
|
nodeIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
@@ -2858,15 +2852,6 @@ declare const mathExercises: (Exercise<{
|
|
|
2858
2852
|
kIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2859
2853
|
uCoeffs: number[];
|
|
2860
2854
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2861
|
-
flip: number;
|
|
2862
|
-
pA?: number;
|
|
2863
|
-
pB?: number;
|
|
2864
|
-
pAB?: number;
|
|
2865
|
-
pA_B?: number;
|
|
2866
|
-
pB_A?: number;
|
|
2867
|
-
}, {
|
|
2868
|
-
probaType: string[];
|
|
2869
|
-
}> | Exercise<{
|
|
2870
2855
|
randomValues: number[];
|
|
2871
2856
|
randomEffectives: number[];
|
|
2872
2857
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
@@ -3011,6 +2996,7 @@ declare const mathExercises: (Exercise<{
|
|
|
3011
2996
|
allowedAnsType: string[];
|
|
3012
2997
|
}, {
|
|
3013
2998
|
allowedAnsType: string[];
|
|
2999
|
+
probaTypes: string[];
|
|
3014
3000
|
}> | Exercise<{
|
|
3015
3001
|
exerciseVars: {
|
|
3016
3002
|
n: number;
|
|
@@ -3202,6 +3188,25 @@ declare const mathExercises: (Exercise<{
|
|
|
3202
3188
|
situationIndex: number;
|
|
3203
3189
|
dictShuffle: Record<string, string>;
|
|
3204
3190
|
pType: string;
|
|
3191
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3192
|
+
flip: number;
|
|
3193
|
+
pA?: number;
|
|
3194
|
+
pB?: number;
|
|
3195
|
+
pAB?: number;
|
|
3196
|
+
pA_B?: number;
|
|
3197
|
+
pB_A?: number;
|
|
3198
|
+
}, {
|
|
3199
|
+
probaType: string[];
|
|
3200
|
+
}> | Exercise<{
|
|
3201
|
+
params: import("./exercises/math/probaStat/trees/probaTreeSituations.js").ProbaTreeSituationParams;
|
|
3202
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3203
|
+
situationIndex: number;
|
|
3204
|
+
aCapB: number;
|
|
3205
|
+
aCapBBarre: number;
|
|
3206
|
+
aBarreCapB: number;
|
|
3207
|
+
aBarreCapBBarre: number;
|
|
3208
|
+
knowing: "A" | "\\overline{A}" | "B" | "\\overline{B}";
|
|
3209
|
+
asked: "A" | "\\overline{A}" | "B" | "\\overline{B}";
|
|
3205
3210
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3206
3211
|
situationIndex: number;
|
|
3207
3212
|
values: number[];
|
|
@@ -3252,8 +3257,6 @@ declare const mathExercises: (Exercise<{
|
|
|
3252
3257
|
firstValue: number;
|
|
3253
3258
|
reason: number;
|
|
3254
3259
|
randValue: number;
|
|
3255
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3256
|
-
final: number;
|
|
3257
3260
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3258
3261
|
sequences: number[][];
|
|
3259
3262
|
answerIndex: number;
|
|
@@ -3270,13 +3273,6 @@ declare const mathExercises: (Exercise<{
|
|
|
3270
3273
|
sequence: number[];
|
|
3271
3274
|
}, {
|
|
3272
3275
|
firstTermRankOne?: boolean;
|
|
3273
|
-
}> | Exercise<{
|
|
3274
|
-
firstRank: number;
|
|
3275
|
-
firstValue: number;
|
|
3276
|
-
reason: number;
|
|
3277
|
-
nbTerms: number;
|
|
3278
|
-
}, {
|
|
3279
|
-
firstTermRank: string;
|
|
3280
3276
|
}> | Exercise<{
|
|
3281
3277
|
firstValue: number;
|
|
3282
3278
|
reason: number;
|
|
@@ -3286,12 +3282,6 @@ declare const mathExercises: (Exercise<{
|
|
|
3286
3282
|
rank2: number;
|
|
3287
3283
|
reason: number;
|
|
3288
3284
|
value1: number;
|
|
3289
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3290
|
-
rank1: number;
|
|
3291
|
-
value1: number;
|
|
3292
|
-
rank2: number;
|
|
3293
|
-
value2: number;
|
|
3294
|
-
rankAsked: number;
|
|
3295
3285
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3296
3286
|
firstRank: number;
|
|
3297
3287
|
firstTerm: number;
|
|
@@ -3306,6 +3296,51 @@ declare const mathExercises: (Exercise<{
|
|
|
3306
3296
|
b: number;
|
|
3307
3297
|
n: number;
|
|
3308
3298
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3299
|
+
rank1: number;
|
|
3300
|
+
value1: number;
|
|
3301
|
+
rank2: number;
|
|
3302
|
+
value2: number;
|
|
3303
|
+
rankAsked: number;
|
|
3304
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3305
|
+
rank1: number;
|
|
3306
|
+
value1: number;
|
|
3307
|
+
rank2: number;
|
|
3308
|
+
value2: number;
|
|
3309
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne> | Exercise<{
|
|
3310
|
+
situationIndex: number;
|
|
3311
|
+
initial: number;
|
|
3312
|
+
reason: number;
|
|
3313
|
+
superfluousData?: import("./math/utils/sequences/situations/seqArithmeticSituations.js").SituationArithmeticSuperfluousData;
|
|
3314
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsWithSuperfluousData.js").OptionIsWithSuperfluousData> | Exercise<{
|
|
3315
|
+
situationIndex: number;
|
|
3316
|
+
initial: number;
|
|
3317
|
+
reason: number;
|
|
3318
|
+
superfluousData?: import("./math/utils/sequences/situations/seqArithmeticSituations.js").SituationArithmeticSuperfluousData;
|
|
3319
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsWithSuperfluousData.js").OptionIsWithSuperfluousData> | Exercise<{
|
|
3320
|
+
situationIndex: number;
|
|
3321
|
+
initial: number;
|
|
3322
|
+
reason: number;
|
|
3323
|
+
superfluousData?: import("./math/utils/sequences/situations/seqArithmeticSituations.js").SituationArithmeticSuperfluousData;
|
|
3324
|
+
rankAsked: number;
|
|
3325
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsWithSuperfluousData.js").OptionIsWithSuperfluousData> | Exercise<{
|
|
3326
|
+
final: number;
|
|
3327
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3328
|
+
firstRank: number;
|
|
3329
|
+
firstValue: number;
|
|
3330
|
+
reason: number;
|
|
3331
|
+
nbTerms: number;
|
|
3332
|
+
}, {
|
|
3333
|
+
firstTermRank: string;
|
|
3334
|
+
}> | Exercise<{
|
|
3335
|
+
initial: number;
|
|
3336
|
+
reason: number;
|
|
3337
|
+
nbTerms: number;
|
|
3338
|
+
lowRankDots: number;
|
|
3339
|
+
highRankDots: number;
|
|
3340
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & {
|
|
3341
|
+
isGiveCount: boolean;
|
|
3342
|
+
isForceWriteSumWithPlusSymbol: boolean;
|
|
3343
|
+
}> | Exercise<{
|
|
3309
3344
|
firstRank: number;
|
|
3310
3345
|
firstTerm: number;
|
|
3311
3346
|
reason: number;
|
|
@@ -3326,9 +3361,6 @@ declare const mathExercises: (Exercise<{
|
|
|
3326
3361
|
value1: number;
|
|
3327
3362
|
reason: number;
|
|
3328
3363
|
rank1: number;
|
|
3329
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3330
|
-
raison: number;
|
|
3331
|
-
final: number;
|
|
3332
3364
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3333
3365
|
reason: number;
|
|
3334
3366
|
startRank: number;
|
|
@@ -3356,6 +3388,20 @@ declare const mathExercises: (Exercise<{
|
|
|
3356
3388
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3357
3389
|
sequence: number[];
|
|
3358
3390
|
reason: number;
|
|
3391
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3392
|
+
q: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3393
|
+
a: number;
|
|
3394
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3395
|
+
rank1: number;
|
|
3396
|
+
value1: number;
|
|
3397
|
+
rank2: number;
|
|
3398
|
+
value2: number;
|
|
3399
|
+
precisionInitial: number;
|
|
3400
|
+
precisionReason: number;
|
|
3401
|
+
rankAsked: number;
|
|
3402
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne> | Exercise<{
|
|
3403
|
+
raison: number;
|
|
3404
|
+
final: number;
|
|
3359
3405
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3360
3406
|
firstRank: number;
|
|
3361
3407
|
firstValue: number;
|
|
@@ -3365,18 +3411,39 @@ declare const mathExercises: (Exercise<{
|
|
|
3365
3411
|
positiveReason: boolean;
|
|
3366
3412
|
firstRankOne: boolean;
|
|
3367
3413
|
}> | Exercise<{
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3414
|
+
initial: number;
|
|
3415
|
+
reason: number;
|
|
3416
|
+
nbTerms: number;
|
|
3417
|
+
lowRankDots: number;
|
|
3418
|
+
highRankDots: number;
|
|
3419
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & {
|
|
3420
|
+
isGiveCount: boolean;
|
|
3421
|
+
}> | Exercise<{
|
|
3422
|
+
situationIndex: number;
|
|
3423
|
+
initial: number;
|
|
3424
|
+
reason: number;
|
|
3425
|
+
superfluousData?: import("./math/utils/sequences/situations/seqGeometricSituations.js").SituationGeometricSuperfluousData;
|
|
3426
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsWithSuperfluousData.js").OptionIsWithSuperfluousData> | Exercise<{
|
|
3427
|
+
situationIndex: number;
|
|
3428
|
+
initial: number;
|
|
3429
|
+
reason: number;
|
|
3430
|
+
superfluousData?: import("./math/utils/sequences/situations/seqGeometricSituations.js").SituationGeometricSuperfluousData;
|
|
3431
|
+
rankAsked: number;
|
|
3432
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsWithSuperfluousData.js").OptionIsWithSuperfluousData> | Exercise<{
|
|
3371
3433
|
rank: number;
|
|
3372
3434
|
coeffs: number[];
|
|
3373
|
-
},
|
|
3435
|
+
}, {
|
|
3436
|
+
functionType: string[];
|
|
3437
|
+
}> | Exercise<{
|
|
3374
3438
|
coeffs: number[];
|
|
3375
3439
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3376
3440
|
rank: number;
|
|
3377
3441
|
u0: number;
|
|
3378
3442
|
coeffs: number[];
|
|
3379
|
-
},
|
|
3443
|
+
}, {
|
|
3444
|
+
functionType: string[];
|
|
3445
|
+
askedRank: string[];
|
|
3446
|
+
}> | Exercise<{
|
|
3380
3447
|
termeid: number;
|
|
3381
3448
|
affine: number[];
|
|
3382
3449
|
termeAdd: number;
|
|
@@ -3402,6 +3469,13 @@ declare const mathExercises: (Exercise<{
|
|
|
3402
3469
|
askedTerm: number;
|
|
3403
3470
|
}, {
|
|
3404
3471
|
firstRank: string;
|
|
3472
|
+
}> | Exercise<{
|
|
3473
|
+
rank1: number;
|
|
3474
|
+
value1: number;
|
|
3475
|
+
coeffs: number[];
|
|
3476
|
+
rankAsked: number;
|
|
3477
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & {
|
|
3478
|
+
distanceOfRankAsked: string;
|
|
3405
3479
|
}> | Exercise<{
|
|
3406
3480
|
formulaIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3407
3481
|
}, {
|
|
@@ -3784,6 +3858,43 @@ declare const mathExercises: (Exercise<{
|
|
|
3784
3858
|
m: number;
|
|
3785
3859
|
p: number;
|
|
3786
3860
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3861
|
+
firstValue: number;
|
|
3862
|
+
rankAsked: number;
|
|
3863
|
+
coeffs: number[];
|
|
3864
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne> | Exercise<{
|
|
3865
|
+
firstValue: number;
|
|
3866
|
+
coeffs: number[];
|
|
3867
|
+
rankAsked: number;
|
|
3868
|
+
keyIncomplete: string;
|
|
3869
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne> | Exercise<{
|
|
3870
|
+
firstValue: number;
|
|
3871
|
+
lengthAsked: number;
|
|
3872
|
+
coeffs: number[];
|
|
3873
|
+
isUseFuncRecur: boolean;
|
|
3874
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne> | Exercise<{
|
|
3875
|
+
firstValue: number;
|
|
3876
|
+
lengthAsked: number;
|
|
3877
|
+
coeffs: number[];
|
|
3878
|
+
isAnswerAlternative: boolean;
|
|
3879
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsUsePythonDef.js").OptionIsUsePythonDef> | Exercise<{
|
|
3880
|
+
firstValue: number;
|
|
3881
|
+
coeffs: number[];
|
|
3882
|
+
rankAsked: number;
|
|
3883
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsUsePythonDef.js").OptionIsUsePythonDef & {
|
|
3884
|
+
typeAsked: string;
|
|
3885
|
+
}> | Exercise<{
|
|
3886
|
+
nAsked: number;
|
|
3887
|
+
cyRandModFour?: number;
|
|
3888
|
+
arrRandForStr: number[];
|
|
3889
|
+
}, import("./exercises/options/optionIsUsePythonDef.js").OptionIsUsePythonDef> | Exercise<{
|
|
3890
|
+
valueThreshold: number;
|
|
3891
|
+
valueLimit: number;
|
|
3892
|
+
nodeIdsDistanceMax: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3893
|
+
keyIncomplete: string;
|
|
3894
|
+
}, import("./exercises/options/optionFirstTermRankOne.js").OptionFirstTermRankOne & import("./exercises/options/optionIsUsePythonDef.js").OptionIsUsePythonDef & {
|
|
3895
|
+
isUsePythonList: boolean;
|
|
3896
|
+
typeSequence: string;
|
|
3897
|
+
}> | Exercise<{
|
|
3787
3898
|
p: number;
|
|
3788
3899
|
n: number;
|
|
3789
3900
|
wordingType: number;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"version":3,"file":"latexTester.d.ts","sourceRoot":"","sources":["../src/latexTester.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,6BAA2B,
|
|
1
|
+
{"version":3,"file":"latexTester.d.ts","sourceRoot":"","sources":["../src/latexTester.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,6BAA2B,YAgMrE,CAAC"}
|
package/lib/latexTester.js
CHANGED
|
@@ -19,12 +19,14 @@ export const latexTester = (latex, isDefaultInMathMode = false) => {
|
|
|
19
19
|
}
|
|
20
20
|
if (char === "$") {
|
|
21
21
|
if (isDefaultInMathMode)
|
|
22
|
-
throw new Error(
|
|
22
|
+
throw new Error(`Dollar in default math mode, ${latex}`);
|
|
23
23
|
if (inPython || inInlinePython)
|
|
24
24
|
throw new Error("Dollar in python mode");
|
|
25
25
|
if (nextChar === "$") {
|
|
26
|
-
if (inDollarMode)
|
|
27
|
-
|
|
26
|
+
if (inDollarMode) {
|
|
27
|
+
const strAround = `${prevChar}${char}${nextChar}${nextNextChar}`;
|
|
28
|
+
throw new Error(`Double dollar instead of single, around ${strAround}, ${latex}`);
|
|
29
|
+
}
|
|
28
30
|
inDoubleDollarMode = !inDoubleDollarMode;
|
|
29
31
|
if (inDoubleDollarMode &&
|
|
30
32
|
nextNextChar !== undefined &&
|
|
@@ -57,7 +59,8 @@ export const latexTester = (latex, isDefaultInMathMode = false) => {
|
|
|
57
59
|
char !== "\n" &&
|
|
58
60
|
char !== "\t") {
|
|
59
61
|
if (!inDollarMode && !inDoubleDollarMode) {
|
|
60
|
-
|
|
62
|
+
const strAround = `${prevChar}${char}${nextChar}${nextNextChar}`;
|
|
63
|
+
throw new Error(`Number not in math mode, ${char}, ${strAround}, ${latex}`);
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
//check si charactere spécial
|
|
@@ -230,6 +233,8 @@ const validCmds = [
|
|
|
230
233
|
"\\newline",
|
|
231
234
|
"\\lVert",
|
|
232
235
|
"\\rVert",
|
|
236
|
+
"\\lvert",
|
|
237
|
+
"\\rvert",
|
|
233
238
|
"\\hline",
|
|
234
239
|
"\\mathrm",
|
|
235
240
|
"\\overline",
|
|
@@ -265,6 +270,4 @@ const validCmds = [
|
|
|
265
270
|
"\\searrow",
|
|
266
271
|
"\\mapsto",
|
|
267
272
|
"\\color",
|
|
268
|
-
"\\lvert",
|
|
269
|
-
"\\rvert",
|
|
270
273
|
];
|
|
@@ -4,6 +4,7 @@ import { Polynomial } from "./polynomial.js";
|
|
|
4
4
|
import { Trinom } from "./trinom.js";
|
|
5
5
|
export declare abstract class AffineConstructor {
|
|
6
6
|
static fromCoeffs(coeffs: number[]): Affine;
|
|
7
|
+
static randomNiceRoot(): Affine;
|
|
7
8
|
static random(aOpts?: {
|
|
8
9
|
min?: number;
|
|
9
10
|
max?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affine.d.ts","sourceRoot":"","sources":["../../../src/math/polynomials/affine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,8BAAsB,iBAAiB;IACrC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM;IAG3C,MAAM,CAAC,MAAM,CACX,KAAK,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,EAC3D,KAAK,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,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ffs) {
|
|
10
10
|
return new Affine(coeffs[1], coeffs[0]);
|
|
11
11
|
}
|
|
12
|
+
static randomNiceRoot() {
|
|
13
|
+
const root = randint(-10, 10, [0]);
|
|
14
|
+
const a = randint(-10, 10, [0]);
|
|
15
|
+
return new Affine(a, -root * a);
|
|
16
|
+
}
|
|
12
17
|
static random(aOpts, bOpts, variable) {
|
|
13
18
|
const a = randint(aOpts?.min ?? -9, aOpts?.max ?? 10, aOpts?.excludes ?? [0]);
|
|
14
19
|
const b = randint(bOpts?.min ?? -9, bOpts?.max ?? 10, bOpts?.excludes ?? []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functionComposition.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionComposition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"functionComposition.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionComposition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAc3C,OAAO,EAEL,YAAY,EACb,MAAM,4CAA4C,CAAC;AAEpD,eAAO,MAAM,qBAAqB,GAChC,aAAa,aAAa,EAC1B,cAAc,aAAa,EAC3B,eAAc,YAA2C,kBAiB1D,CAAC;AAMF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,aAAa,wBA4ClD,CAAC;AAMF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,CAAC,WAAW,GAAG,YAAY,GAAG,OAAO,CAAC,EAAE,CAAC;CAChD,CAAC;AA+CF,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,aAAa,EAC1B,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,aAAa,EAC3B,iBAAiB,GAAE,MAAW,EAC9B,eAAe,GAAE,eAAoB,iBA0DtC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isEqualNode, } from "../../../tree/nodes/equations/equalNode.js";
|
|
1
2
|
import { isFunctionNode, } from "../../../tree/nodes/functions/functionNode.js";
|
|
2
3
|
import { NodeConstructor } from "../../../tree/nodes/nodeConstructor.js";
|
|
3
4
|
import { isOperatorNode, } from "../../../tree/nodes/operators/operatorNode.js";
|
|
@@ -11,7 +12,7 @@ export const nodeBySubstitutingVar = (nodeCarrier, nodeInjected, variableNode =
|
|
|
11
12
|
};
|
|
12
13
|
export const getAllNodePaths = (node) => {
|
|
13
14
|
const arrNodePaths = [];
|
|
14
|
-
if (isOperatorNode(node)) {
|
|
15
|
+
if (isOperatorNode(node) || isEqualNode(node)) {
|
|
15
16
|
getAllNodePaths(node.leftChild).forEach((nodePathWithNodes) => {
|
|
16
17
|
arrNodePaths.push({
|
|
17
18
|
arrNode: [node, ...nodePathWithNodes.arrNode],
|
|
@@ -64,6 +65,16 @@ function operatorNodeByReplacingRightChild(opNode, nodeRightChildNew) {
|
|
|
64
65
|
nodeIds.rightChild = nodeRightChildNew.toIdentifiers();
|
|
65
66
|
return NodeConstructor.fromIdentifiers(nodeIds);
|
|
66
67
|
}
|
|
68
|
+
function equalNodeByReplacingLeftChild(equalNode, nodeLeftChildNew) {
|
|
69
|
+
const nodeIds = equalNode.toIdentifiers();
|
|
70
|
+
nodeIds.leftChild = nodeLeftChildNew.toIdentifiers();
|
|
71
|
+
return NodeConstructor.fromIdentifiers(nodeIds);
|
|
72
|
+
}
|
|
73
|
+
function equalNodeByReplacingRightChild(equalNode, nodeRightChildNew) {
|
|
74
|
+
const nodeIds = equalNode.toIdentifiers();
|
|
75
|
+
nodeIds.rightChild = nodeRightChildNew.toIdentifiers();
|
|
76
|
+
return NodeConstructor.fromIdentifiers(nodeIds);
|
|
77
|
+
}
|
|
67
78
|
export function nodeByReplacingNodeAtPath(nodeCarrier, path, nodeInjected, simplifyUpToLevel = -1, simplifyOptions = {}) {
|
|
68
79
|
function getNodeForKey(node, key) {
|
|
69
80
|
if (key === "leftChild" || key === "rightChild") {
|
|
@@ -83,6 +94,12 @@ export function nodeByReplacingNodeAtPath(nodeCarrier, path, nodeInjected, simpl
|
|
|
83
94
|
else if (key === "rightChild" && isOperatorNode(node)) {
|
|
84
95
|
return operatorNodeByReplacingRightChild(node, nodeInjected);
|
|
85
96
|
}
|
|
97
|
+
else if (key === "leftChild" && isEqualNode(node)) {
|
|
98
|
+
return equalNodeByReplacingLeftChild(node, nodeInjected);
|
|
99
|
+
}
|
|
100
|
+
else if (key === "rightChild" && isEqualNode(node)) {
|
|
101
|
+
return equalNodeByReplacingRightChild(node, nodeInjected);
|
|
102
|
+
}
|
|
86
103
|
else if (key === "child" && isFunctionNode(node)) {
|
|
87
104
|
return functionNodeByReplacingChild(node, nodeInjected);
|
|
88
105
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AlgebraicNode } from "../../../tree/nodes/algebraicNode.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
export declare class PointOfFunction {
|
|
4
|
+
nodeAbscissa: AlgebraicNode;
|
|
5
|
+
nodeValue: AlgebraicNode;
|
|
6
|
+
nodeDerivative: AlgebraicNode;
|
|
7
|
+
constructor(nodeAbscissa: AlgebraicNode, nodeValue: AlgebraicNode, nodeDerivative: AlgebraicNode);
|
|
8
|
+
toIdentifiers(): PointOfFunctionIdentifiers;
|
|
9
|
+
}
|
|
10
|
+
export type PointOfFunctionIdentifiers = {
|
|
11
|
+
nodeIdsAbscissa: NodeIdentifiers;
|
|
12
|
+
nodeIdsValue: NodeIdentifiers;
|
|
13
|
+
nodeIdsDerivative: NodeIdentifiers;
|
|
14
|
+
};
|
|
15
|
+
export declare abstract class PointOfFunctionConstructor {
|
|
16
|
+
static fromIdentifiers(pofIds: PointOfFunctionIdentifiers): PointOfFunction;
|
|
17
|
+
}
|
|
18
|
+
export declare function createArrNodeCoeffCubic(pof1: PointOfFunction, pof2: PointOfFunction): import("../../../tree/nodes/operators/fractionNode.js").FractionNode[];
|
|
19
|
+
//# sourceMappingURL=polynomialInterpolationUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polynomialInterpolationUtils.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/polynomial/polynomialInterpolationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,qBAAa,eAAe;IAEjB,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,aAAa;IACxB,cAAc,EAAE,aAAa;gBAF7B,YAAY,EAAE,aAAa,EAC3B,SAAS,EAAE,aAAa,EACxB,cAAc,EAAE,aAAa;IAEtC,aAAa,IAKN,0BAA0B;CAElC;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,eAAe,CAAC;IAC9B,iBAAiB,EAAE,eAAe,CAAC;CACpC,CAAC;AAEF,8BAAsB,0BAA0B;IAC9C,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,0BAA0B;CAY1D;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,eAAe,uEA0FtB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { opposite } from "../../../tree/nodes/functions/oppositeNode.js";
|
|
2
|
+
import { NodeConstructor, } from "../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
import { add } from "../../../tree/nodes/operators/addNode.js";
|
|
4
|
+
import { frac } from "../../../tree/nodes/operators/fractionNode.js";
|
|
5
|
+
import { multiply } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
6
|
+
import { power } from "../../../tree/nodes/operators/powerNode.js";
|
|
7
|
+
import { substract } from "../../../tree/nodes/operators/substractNode.js";
|
|
8
|
+
export class PointOfFunction {
|
|
9
|
+
nodeAbscissa;
|
|
10
|
+
nodeValue;
|
|
11
|
+
nodeDerivative;
|
|
12
|
+
constructor(nodeAbscissa, nodeValue, nodeDerivative) {
|
|
13
|
+
this.nodeAbscissa = nodeAbscissa;
|
|
14
|
+
this.nodeValue = nodeValue;
|
|
15
|
+
this.nodeDerivative = nodeDerivative;
|
|
16
|
+
}
|
|
17
|
+
toIdentifiers() {
|
|
18
|
+
return {
|
|
19
|
+
nodeIdsAbscissa: this.nodeAbscissa.toIdentifiers(),
|
|
20
|
+
nodeIdsValue: this.nodeValue.toIdentifiers(),
|
|
21
|
+
nodeIdsDerivative: this.nodeDerivative.toIdentifiers(),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export class PointOfFunctionConstructor {
|
|
26
|
+
static fromIdentifiers(pofIds) {
|
|
27
|
+
const nodeAbscissa = NodeConstructor.fromIdentifiers(pofIds.nodeIdsAbscissa);
|
|
28
|
+
const nodeValue = NodeConstructor.fromIdentifiers(pofIds.nodeIdsValue);
|
|
29
|
+
const nodeDerivative = NodeConstructor.fromIdentifiers(pofIds.nodeIdsDerivative);
|
|
30
|
+
return new PointOfFunction(nodeAbscissa, nodeValue, nodeDerivative);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export function createArrNodeCoeffCubic(pof1, pof2) {
|
|
34
|
+
//
|
|
35
|
+
//pof1 = {x1,u1,v1}
|
|
36
|
+
//pof2 = {x2,u2,v2}
|
|
37
|
+
//
|
|
38
|
+
//f(x) = ax^3+bx^2+cx+d
|
|
39
|
+
//f'(x) = 2ax+b
|
|
40
|
+
//
|
|
41
|
+
//f(x1) = u1 <=> a(x1)^3+b(x1)^2+c(x1)+d = u1
|
|
42
|
+
//f(x2) = u2 <=> a(x2)^3+b(x2)^2+c(x2)+d = u2
|
|
43
|
+
//f'(x1) = v1 <=> 3a(x1)^2+2b(x1)+c = v1
|
|
44
|
+
//f'(x2) = v2 <=> 3a(x2)^2+2b(x2)+c = v2
|
|
45
|
+
//
|
|
46
|
+
const { nodeAbscissa: x1, nodeValue: u1, nodeDerivative: v1 } = pof1;
|
|
47
|
+
const { nodeAbscissa: x2, nodeValue: u2, nodeDerivative: v2 } = pof2;
|
|
48
|
+
const nodeA = frac(add(multiply(add(v1, v2), substract(x1, x2)), multiply(2, substract(u2, u1))), power(substract(x1, x2), 3));
|
|
49
|
+
const nodeB = frac(add(multiply(opposite(add(v1, multiply(2, v2))), power(x1, 2)), add(multiply(add(multiply(substract(v2, v1), x2), multiply(3, substract(u1, u2))), x1), multiply(2, multiply(x2, add(multiply(add(v1, frac(v2, 2)), x2), multiply(frac(3, 2), substract(u1, u2))))))), power(substract(x1, x2), 3));
|
|
50
|
+
const nodeC = frac(substract(add(multiply(v2, power(x1, 3)), multiply(2, multiply(add(v1, frac(v2, 2)), multiply(x2, power(x1, 2))))), add(multiply(x2, multiply(x1, add(multiply(add(v1, multiply(2, v2)), x2), multiply(6, substract(u1, u2))))), multiply(v1, power(x2, 3)))), power(substract(x1, x2), 3));
|
|
51
|
+
const nodeD = frac(substract(add(multiply(substract(u2, multiply(v2, x2)), power(x1, 3)), multiply(power(x2, 2), multiply(x1, add(multiply(v1, x2), multiply(3, u1))))), add(multiply(power(x1, 2), multiply(x2, add(multiply(substract(v1, v2), x2), multiply(3, u2)))), multiply(u1, power(x2, 3)))), power(substract(x1, x2), 3));
|
|
52
|
+
return [nodeD, nodeC, nodeB, nodeA];
|
|
53
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AlgebraicNode } from "../../../tree/nodes/algebraicNode.js";
|
|
2
|
+
import { VariableNode } from "../../../tree/nodes/variables/variableNode.js";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param nodeA
|
|
6
|
+
* @param arrNodeRoot
|
|
7
|
+
* @returns a(x - root1)...(x - rootn)
|
|
8
|
+
*/
|
|
9
|
+
export declare function createNodeFPolynomialFromRoots(nodeA: AlgebraicNode, arrNodeRoot: AlgebraicNode[]): AlgebraicNode;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param nodePolynomial
|
|
13
|
+
* @returns for example: [nodeCoeffC, nodeCoeffB, nodeCoeffA] if nodePolynomial is a trinom
|
|
14
|
+
*/
|
|
15
|
+
export declare function getArrNodeCoeffOfPolynomialNode(nodePolynomial: AlgebraicNode): AlgebraicNode[];
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param arrNodeCoeff
|
|
19
|
+
* @returns coeffN x^N + ... + coeff2 x^2 + coeff1 x^1 + coeff0
|
|
20
|
+
*/
|
|
21
|
+
export declare function createNodeFPolynomialFromCoeffs(arrNodeCoeff: AlgebraicNode[]): AlgebraicNode | import("../../../tree/nodes/operators/multiplyNode.js").MultiplyNode;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @param arrNodeCoeff
|
|
25
|
+
* @returns discriminator
|
|
26
|
+
*/
|
|
27
|
+
export declare function createNodeDiscriminator(arrNodeCoeff: AlgebraicNode[]): import("../../../tree/nodes/operators/substractNode.js").SubstractNode;
|
|
28
|
+
export declare const getTexSolveSecondDegreeEquation: (nodePolynomial: AlgebraicNode, opts?: {
|
|
29
|
+
nodeVar: VariableNode;
|
|
30
|
+
isShouldApprox: boolean;
|
|
31
|
+
}) => string;
|
|
32
|
+
export declare const getAnswerStuffSolveSecondDegreePolynomial: (nodePolynomial: AlgebraicNode) => {
|
|
33
|
+
nodePolynomial: AlgebraicNode;
|
|
34
|
+
arrNodeX: AlgebraicNode[];
|
|
35
|
+
};
|
|
36
|
+
export declare function createIntegratedPolynomialNode(nodePolynomial: AlgebraicNode, nodeC: AlgebraicNode): AlgebraicNode;
|
|
37
|
+
//# sourceMappingURL=polynomialUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polynomialUtils.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/polynomial/polynomialUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEd,MAAM,mCAAmC,CAAC;AAQ3C,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAM1E;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,aAAa,EAAE,iBAO7B;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,cAAc,EAAE,aAAa,mBAe5E;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,YAAY,EAAE,aAAa,EAAE,qFAgB5E;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,aAAa,EAAE,uEAGpE;AAaD,eAAO,MAAM,+BAA+B,GAC1C,gBAAgB,aAAa,EAC7B,OAAM;IAAE,OAAO,EAAE,YAAY,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAGrD,WAoGF,CAAC;AAEF,eAAO,MAAM,yCAAyC,GACpD,gBAAgB,aAAa;;;CA+C9B,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,cAAc,EAAE,aAAa,EAC7B,KAAK,EAAE,aAAa,iBAQrB"}
|