math-exercises 2.2.94 → 2.2.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calcul/fractions/fractionSquare.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionSquare.js +2 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.js +2 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +2 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +2 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +2 -1
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +2 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +0 -4
- package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +2 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +2 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +2 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +2 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +2 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +2 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -1
- package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +2 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +2 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeFour.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeFour.js +2 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeThree.js +2 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +2 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.js +2 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +2 -1
- package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/sqrtCompositionDerivation.js +2 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +2 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -1
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +2 -1
- package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueInequationsSup.js +2 -1
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +2 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +2 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +2 -1
- package/lib/exercises/math/functions/affines/signFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/signFunction.js +2 -1
- package/lib/exercises/math/functions/basics/graphicEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicEquation.js +2 -1
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +2 -1
- package/lib/exercises/math/functions/basics/graphicInequationAffine.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequationAffine.js +2 -1
- package/lib/exercises/math/functions/basics/imageFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/imageFunction.js +2 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -1
- package/lib/exercises/math/functions/exponential/expEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +2 -1
- package/lib/exercises/math/functions/logarithm/logPowerEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logPowerEquation.js +2 -1
- package/lib/exercises/math/functions/sign/affineProductSign.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/affineProductSign.js +2 -1
- package/lib/exercises/math/functions/square/squareImageInterval.d.ts.map +1 -1
- package/lib/exercises/math/functions/square/squareImageInterval.js +2 -1
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +2 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +2 -1
- package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.js +2 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +2 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +2 -1
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +2 -1
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +2 -1
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +2 -1
- package/lib/exercises/math/matrices/matrixInversibilityDomain.d.ts.map +1 -1
- package/lib/exercises/math/matrices/matrixInversibilityDomain.js +2 -1
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -1
- package/lib/exercises/math/percent/percentWritings.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentWritings.js +10 -1
- package/lib/exercises/math/powers/powersMixOperations.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersMixOperations.js +2 -1
- package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probabilityTree.js +2 -1
- package/lib/exercises/math/sampling/confidenceInterval.d.ts.map +1 -1
- package/lib/exercises/math/sampling/confidenceInterval.js +2 -1
- package/lib/exercises/math/sampling/fluctuationInterval.d.ts.map +1 -1
- package/lib/exercises/math/sampling/fluctuationInterval.js +2 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +2 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +2 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +2 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.js +2 -1
- package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/degreeToRadians.js +2 -1
- package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/mainAngleMeasure.js +2 -1
- package/lib/exercises/vea/equationVEA.d.ts.map +1 -1
- package/lib/exercises/vea/equationVEA.js +2 -1
- package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
- package/lib/exercises/vea/rationalVEA.js +2 -1
- package/lib/exercises/vea/sqrtVEA.d.ts.map +1 -1
- package/lib/exercises/vea/sqrtVEA.js +2 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +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/parsers/affineParser.d.ts.map +1 -1
- package/lib/tree/parsers/affineParser.js +2 -1
- package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -1
- package/lib/tree/parsers/discreteSetParser.js +2 -1
- package/lib/tree/parsers/equationSolutionParser.d.ts.map +1 -1
- package/lib/tree/parsers/equationSolutionParser.js +2 -1
- package/lib/tree/parsers/inequationParser.d.ts.map +1 -1
- package/lib/tree/parsers/inequationParser.js +2 -1
- package/lib/tree/parsers/intervalParser.d.ts.map +1 -1
- package/lib/tree/parsers/intervalParser.js +3 -2
- package/lib/tree/parsers/latexParser.js +3 -3
- package/lib/tree/parsers/monomParser.d.ts.map +1 -1
- package/lib/tree/parsers/monomParser.js +2 -1
- package/lib/tree/parsers/polynomialParser.d.ts.map +1 -1
- package/lib/tree/parsers/polynomialParser.js +2 -1
- package/lib/tree/parsers/powerParser.d.ts.map +1 -1
- package/lib/tree/parsers/powerParser.js +2 -1
- package/lib/tree/parsers/sqrtParser.d.ts.map +1 -1
- package/lib/tree/parsers/sqrtParser.js +2 -1
- package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
- package/lib/tree/parsers/trinomParser.js +2 -1
- package/lib/tree/parsers/unionIntervalParser.d.ts.map +1 -1
- package/lib/tree/parsers/unionIntervalParser.js +2 -1
- package/lib/utils/alea/random.js +1 -1
- package/lib/utils/errors/handleVEAError.d.ts +2 -0
- package/lib/utils/errors/handleVEAError.d.ts.map +1 -0
- package/lib/utils/errors/handleVEAError.js +9 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.equationSolutionParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const algebraicNode_1 = require("../nodes/algebraicNode");
|
|
5
6
|
const equalNode_1 = require("../nodes/equations/equalNode");
|
|
6
7
|
const variableNode_1 = require("../nodes/variables/variableNode");
|
|
@@ -34,7 +35,7 @@ const equationSolutionParser = (str, variable = "x") => {
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
catch (err) {
|
|
37
|
-
return
|
|
38
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
38
39
|
}
|
|
39
40
|
};
|
|
40
41
|
exports.equationSolutionParser = equationSolutionParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inequationParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/inequationParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inequationParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/inequationParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAGrE,KAAK,IAAI,GAAG;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAS,MAAM,SAAS,IAAI,2BAyBxD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.inequationParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const inequationNode_1 = require("../nodes/inequations/inequationNode");
|
|
5
6
|
const latexParser_1 = require("./latexParser");
|
|
6
7
|
const inequationParser = (ans, opts) => {
|
|
@@ -24,7 +25,7 @@ const inequationParser = (ans, opts) => {
|
|
|
24
25
|
return new inequationNode_1.InequationNode([...children], ineqType[0]);
|
|
25
26
|
}
|
|
26
27
|
catch (err) {
|
|
27
|
-
return
|
|
28
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
exports.inequationParser = inequationParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/intervalParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"intervalParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/intervalParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,KAAK,IAAI,GAAG;IACV,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,cAAc,QAAS,MAAM,SAAS,IAAI,yBA8CtD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.intervalParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const closure_1 = require("../nodes/sets/closure");
|
|
5
6
|
const intervalNode_1 = require("../nodes/sets/intervalNode");
|
|
6
7
|
const latexParser_1 = require("./latexParser");
|
|
@@ -37,8 +38,8 @@ const intervalParser = (ans, opts) => {
|
|
|
37
38
|
return false;
|
|
38
39
|
return new intervalNode_1.IntervalNode(aParsed, bParsed, closure_1.Closure.fromBrackets(leftBracket, rightBracket));
|
|
39
40
|
}
|
|
40
|
-
catch (
|
|
41
|
-
return
|
|
41
|
+
catch (err) {
|
|
42
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
45
|
exports.intervalParser = intervalParser;
|
|
@@ -45,7 +45,7 @@ const isDyck = (tokens) => {
|
|
|
45
45
|
while (brackets.length) {
|
|
46
46
|
counter++;
|
|
47
47
|
if (counter > 1000)
|
|
48
|
-
throw Error("Too many iterations");
|
|
48
|
+
throw Error("should-throw Too many iterations");
|
|
49
49
|
const rightIndex = brackets.findIndex((el) => el == ")");
|
|
50
50
|
if (rightIndex === -1 || rightIndex === 0)
|
|
51
51
|
return false;
|
|
@@ -214,14 +214,14 @@ const buildTree = (tokens) => {
|
|
|
214
214
|
while (true) {
|
|
215
215
|
counter++;
|
|
216
216
|
if (counter > 1000)
|
|
217
|
-
throw Error("Too many iterations");
|
|
217
|
+
throw Error("should-throw Too many iterations");
|
|
218
218
|
if (maxDepth === 0) {
|
|
219
219
|
const tree = buildTreeForSameDepthTokens(depthedTokens.map((el) => el.token));
|
|
220
220
|
return tree;
|
|
221
221
|
}
|
|
222
222
|
for (let i = 0; i < depthedTokens.length; i++) {
|
|
223
223
|
if (i > 1000)
|
|
224
|
-
throw Error("Too many iterations");
|
|
224
|
+
throw Error("should-throw Too many iterations");
|
|
225
225
|
const token = depthedTokens[i];
|
|
226
226
|
//? on commence par les tokens de depth max
|
|
227
227
|
if (token.depth < maxDepth)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/monomParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"monomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/monomParser.ts"],"names":[],"mappings":"AAIA,KAAK,IAAI,GAAG;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,eAAO,MAAM,WAAW,QACjB,MAAM,uCACyB,IAAI,2DAiBzC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.monomParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const monomNode_1 = require("../nodes/polynomials/monomNode");
|
|
5
6
|
const latexParser_1 = require("./latexParser");
|
|
6
7
|
const monomParser = (str, { variable, maxDegree, minDegree } = {
|
|
@@ -18,7 +19,7 @@ const monomParser = (str, { variable, maxDegree, minDegree } = {
|
|
|
18
19
|
// } else return false;
|
|
19
20
|
}
|
|
20
21
|
catch (err) {
|
|
21
|
-
return
|
|
22
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
exports.monomParser = monomParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polynomialParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/polynomialParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"polynomialParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/polynomialParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAWvD,eAAO,MAAM,gBAAgB,QAAS,MAAM,8OAmC3C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.polynomialParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const oppositeNode_1 = require("../nodes/functions/oppositeNode");
|
|
5
6
|
const addNode_1 = require("../nodes/operators/addNode");
|
|
6
7
|
const substractNode_1 = require("../nodes/operators/substractNode");
|
|
@@ -45,7 +46,7 @@ const polynomialParser = (ans) => {
|
|
|
45
46
|
return false;
|
|
46
47
|
}
|
|
47
48
|
catch (err) {
|
|
48
|
-
return
|
|
49
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
exports.polynomialParser = polynomialParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/powerParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"powerParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/powerParser.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW,QAAS,MAAM,uKAgBtC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.powerParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const sqrtNode_1 = require("../nodes/functions/sqrtNode");
|
|
5
6
|
const numberNode_1 = require("../nodes/numbers/numberNode");
|
|
6
7
|
const fractionNode_1 = require("../nodes/operators/fractionNode");
|
|
@@ -21,7 +22,7 @@ const powerParser = (ans) => {
|
|
|
21
22
|
return false;
|
|
22
23
|
}
|
|
23
24
|
catch (err) {
|
|
24
|
-
return
|
|
25
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
28
|
exports.powerParser = powerParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqrtParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/sqrtParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sqrtParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/sqrtParser.ts"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,uUAuCrC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sqrtParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const oppositeNode_1 = require("../nodes/functions/oppositeNode");
|
|
5
6
|
const sqrtNode_1 = require("../nodes/functions/sqrtNode");
|
|
6
7
|
const numberNode_1 = require("../nodes/numbers/numberNode");
|
|
@@ -46,7 +47,7 @@ const sqrtParser = (ans) => {
|
|
|
46
47
|
return false;
|
|
47
48
|
}
|
|
48
49
|
catch (err) {
|
|
49
|
-
return
|
|
50
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
exports.sqrtParser = sqrtParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trinomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/trinomParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"trinomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/trinomParser.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY,QAAS,MAAM,aAAY,MAAM,uEAgCzD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.trinomParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const addNode_1 = require("../nodes/operators/addNode");
|
|
5
6
|
const substractNode_1 = require("../nodes/operators/substractNode");
|
|
6
7
|
const monomNode_1 = require("../nodes/polynomials/monomNode");
|
|
@@ -37,7 +38,7 @@ const trinomParser = (ans, variable = "x") => {
|
|
|
37
38
|
// return false;
|
|
38
39
|
}
|
|
39
40
|
catch (err) {
|
|
40
|
-
return
|
|
41
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
exports.trinomParser = trinomParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unionIntervalParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/unionIntervalParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unionIntervalParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/unionIntervalParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIpE,KAAK,IAAI,GAAG;IACV,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,mBAAmB,QAAS,MAAM,SAAS,IAAI,6CAmB3D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.unionIntervalParser = void 0;
|
|
4
|
+
const handleVEAError_1 = require("../../utils/errors/handleVEAError");
|
|
4
5
|
const unionIntervalNode_1 = require("../nodes/sets/unionIntervalNode");
|
|
5
6
|
const intervalParser_1 = require("./intervalParser");
|
|
6
7
|
const unionIntervalParser = (ans, opts) => {
|
|
@@ -22,7 +23,7 @@ const unionIntervalParser = (ans, opts) => {
|
|
|
22
23
|
}));
|
|
23
24
|
}
|
|
24
25
|
catch (err) {
|
|
25
|
-
return
|
|
26
|
+
return (0, handleVEAError_1.handleVEAError)(err);
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
exports.unionIntervalParser = unionIntervalParser;
|
package/lib/utils/alea/random.js
CHANGED
|
@@ -14,7 +14,7 @@ function randomMany(array, count, excludes) {
|
|
|
14
14
|
let i = 0;
|
|
15
15
|
while (res.length < count) {
|
|
16
16
|
if (i > 10000)
|
|
17
|
-
throw new Error("randomMany malformed");
|
|
17
|
+
throw new Error("should-throw randomMany malformed");
|
|
18
18
|
i++;
|
|
19
19
|
res.push(random(array, [...res, ...(excludes ?? [])]));
|
|
20
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleVEAError.d.ts","sourceRoot":"","sources":["../../../src/utils/errors/handleVEAError.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAS,GAAG,KAAG,KAGzC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleVEAError = void 0;
|
|
4
|
+
const handleVEAError = (err) => {
|
|
5
|
+
if (err.message.includes("should-throw"))
|
|
6
|
+
throw err;
|
|
7
|
+
return false;
|
|
8
|
+
};
|
|
9
|
+
exports.handleVEAError = handleVEAError;
|