math-exercises 3.0.186 → 3.0.188
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/exp/expDerivativeProductFExp.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.js +22 -6
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.js +16 -8
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.d.ts +9 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.js +155 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumber/index.js +1 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.js +80 -29
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +30 -2
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +59 -16
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.js +0 -4
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +23 -9
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +5 -29
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +2 -7
- package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
- package/lib/exercises/math/functions/sign/affineSignTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/affineSignTable.js +1 -1
- package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts +1 -0
- package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/equationFromSignTable.js +60 -33
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts +6 -4
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.js +160 -63
- package/lib/exercises/math/functions/sign/readSignTable.d.ts +4 -1
- package/lib/exercises/math/functions/sign/readSignTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/readSignTable.js +32 -9
- package/lib/exercises/math/functions/sign/signTableFromGraph.d.ts +6 -4
- package/lib/exercises/math/functions/sign/signTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/signTableFromGraph.js +160 -57
- package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.d.ts +9 -0
- package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.js +135 -0
- package/lib/exercises/math/percent/evolutions/index.d.ts +1 -0
- package/lib/exercises/math/percent/evolutions/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/index.js +1 -0
- package/lib/exercises/math/powers/equationOnePlusTPowerN.d.ts +9 -0
- package/lib/exercises/math/powers/equationOnePlusTPowerN.d.ts.map +1 -0
- package/lib/exercises/math/powers/equationOnePlusTPowerN.js +118 -0
- package/lib/exercises/math/powers/estimateNthRoot.d.ts +13 -0
- package/lib/exercises/math/powers/estimateNthRoot.d.ts.map +1 -0
- package/lib/exercises/math/powers/estimateNthRoot.js +126 -0
- package/lib/exercises/math/powers/index.d.ts +3 -0
- package/lib/exercises/math/powers/index.d.ts.map +1 -1
- package/lib/exercises/math/powers/index.js +3 -0
- package/lib/exercises/math/powers/solveNthRootEquation.d.ts +9 -0
- package/lib/exercises/math/powers/solveNthRootEquation.d.ts.map +1 -0
- package/lib/exercises/math/powers/solveNthRootEquation.js +111 -0
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.js +2 -2
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +1 -1
- package/lib/exercises/vea/percentVEA.d.ts +6 -1
- package/lib/exercises/vea/percentVEA.d.ts.map +1 -1
- package/lib/exercises/vea/percentVEA.js +15 -1
- package/lib/index.d.ts +34 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +5 -8
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +1 -3
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +8 -10
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +8 -0
- package/lib/tree/nodes/sets/closure.d.ts +1 -0
- package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
- package/lib/tree/nodes/sets/closure.js +12 -0
- package/package.json +1 -1
|
@@ -69,6 +69,14 @@ export const questionTest = (exo, question) => {
|
|
|
69
69
|
throw new Error(`exo ${exo.id} has no initTable`);
|
|
70
70
|
if (!question.initTable.some((row) => row.some((cell) => cell === "")))
|
|
71
71
|
throw new Error(`exo ${exo.id} is answertype table but no input in table`);
|
|
72
|
+
const initTableRowsLengths = question.initTable.map((row) => row.length);
|
|
73
|
+
if (initTableRowsLengths.some((rowLength, i) => rowLength !== initTableRowsLengths[0]))
|
|
74
|
+
throw new Error(`exo ${exo.id} has different row lengths in initTable`);
|
|
75
|
+
const answerTableRowsLengths = question.answerTable.map((row) => row.length);
|
|
76
|
+
if (answerTableRowsLengths.some((rowLength, i) => rowLength !== answerTableRowsLengths[0]))
|
|
77
|
+
throw new Error(`exo ${exo.id} has different row lengths in answerTable`);
|
|
78
|
+
if (initTableRowsLengths.some((rowLength, i) => rowLength !== question.answerTable[i].length))
|
|
79
|
+
throw new Error(`exo ${exo.id} has different row lengths in answerTable and initTable`);
|
|
72
80
|
}
|
|
73
81
|
else if (exo.answerType === "treeDiagram") {
|
|
74
82
|
if (!question.initTreeTable?.length)
|
|
@@ -10,6 +10,7 @@ export declare abstract class Closure {
|
|
|
10
10
|
static leftReverse(closure: ClosureType): ClosureType;
|
|
11
11
|
static rightReverse(closure: ClosureType): ClosureType;
|
|
12
12
|
static switch(closure: ClosureType): ClosureType;
|
|
13
|
+
static fromBooleans(isLeftClosed: boolean, isRightClosed: boolean): ClosureType;
|
|
13
14
|
static fromBrackets(left: "[" | "]", right: "]" | "["): ClosureType;
|
|
14
15
|
static toBrackets(closure: ClosureType): string[];
|
|
15
16
|
static isLeftOpen(closure: ClosureType): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closure.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/closure.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACrB,EAAE,IAAA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O,EAAE,WAAW;IAYvC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW;IAYxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW;IAYlC,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO;IAOjE,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;IAQrD,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW;IAatC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW;IAUtC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAWvC,MAAM,CAAC,iBAAiB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGpD;IACF,MAAM,CAAC,kBAAkB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGrD;IACF,MAAM,CAAC,iBAAiB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGpD;IACF,MAAM,CAAC,kBAAkB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGrD;CACH"}
|
|
@@ -69,6 +69,18 @@ export class Closure {
|
|
|
69
69
|
return ClosureType.FO;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
static fromBooleans(isLeftClosed, isRightClosed) {
|
|
73
|
+
if (isLeftClosed) {
|
|
74
|
+
if (isRightClosed)
|
|
75
|
+
return ClosureType.FF;
|
|
76
|
+
else
|
|
77
|
+
return ClosureType.FO;
|
|
78
|
+
}
|
|
79
|
+
else if (isRightClosed)
|
|
80
|
+
return ClosureType.OF;
|
|
81
|
+
else
|
|
82
|
+
return ClosureType.OO;
|
|
83
|
+
}
|
|
72
84
|
static fromBrackets(left, right) {
|
|
73
85
|
if (left === "[")
|
|
74
86
|
if (right === "]")
|