math-exercises 3.0.97 → 3.0.98
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/calculLitteral/inequations/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/index.js +2 -0
- package/lib/exercises/math/calculLitteral/inequations/inverseInequality.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/inverseInequality.js +83 -5
- package/lib/exercises/math/calculLitteral/inequations/inverseInequalityWithGraph.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/inequations/inverseInequalityWithGraph.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/inverseInequalityWithGraph.js +220 -0
- package/lib/exercises/math/conversion/hoursToDecimal.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +1 -1
- package/lib/exercises/math/functions/basics/findZeroesProductQuotient.js +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +37 -5
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +1 -1
- package/lib/exercises/math/functions/basics/isPointOnFunction.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/isPointOnFunction.js +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +34 -0
- package/lib/exercises/math/functions/basics/valueTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/valueTableFromGraph.js +1 -1
- package/lib/exercises/math/functions/inverse/index.d.ts +1 -0
- package/lib/exercises/math/functions/inverse/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/inverse/index.js +1 -0
- package/lib/exercises/math/functions/inverse/solveInverseEquation.d.ts +8 -0
- package/lib/exercises/math/functions/inverse/solveInverseEquation.d.ts.map +1 -0
- package/lib/exercises/math/functions/inverse/solveInverseEquation.js +147 -0
- package/lib/exercises/math/functions/sign/affineProductSignTable.js +1 -1
- package/lib/exercises/math/functions/sign/affineProductSignTableThirdLine.d.ts +9 -0
- package/lib/exercises/math/functions/sign/affineProductSignTableThirdLine.d.ts.map +1 -0
- package/lib/exercises/math/functions/sign/affineProductSignTableThirdLine.js +201 -0
- package/lib/exercises/math/functions/sign/affineSignTable.js +1 -1
- package/lib/exercises/math/functions/sign/index.d.ts +1 -0
- package/lib/exercises/math/functions/sign/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/index.js +1 -0
- package/lib/exercises/math/functions/square/index.d.ts +2 -0
- package/lib/exercises/math/functions/square/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/square/index.js +2 -1
- package/lib/exercises/math/functions/square/squareFunctionInequationWithGraph.d.ts +9 -0
- package/lib/exercises/math/functions/square/squareFunctionInequationWithGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/square/squareFunctionInequationWithGraph.js +151 -0
- package/lib/exercises/math/functions/square/squareImageIntervalWithGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/square/squareImageIntervalWithGraph.js +19 -3
- package/lib/exercises/math/functions/variations/index.d.ts +4 -0
- package/lib/exercises/math/functions/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/index.js +4 -0
- package/lib/exercises/math/functions/variations/readExtremaOnGraph.d.ts +14 -0
- package/lib/exercises/math/functions/variations/readExtremaOnGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/readExtremaOnGraph.js +215 -0
- package/lib/exercises/math/functions/variations/readVarOnGraph.d.ts +9 -0
- package/lib/exercises/math/functions/variations/readVarOnGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/readVarOnGraph.js +128 -0
- package/lib/exercises/math/functions/variations/readVarOnGraph2.d.ts +9 -0
- package/lib/exercises/math/functions/variations/readVarOnGraph2.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/readVarOnGraph2.js +172 -0
- package/lib/exercises/math/functions/variations/varTableExtremaReading.d.ts +4 -1
- package/lib/exercises/math/functions/variations/varTableExtremaReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/varTableExtremaReading.js +108 -42
- package/lib/exercises/math/functions/variations/varTableFromSentences.d.ts +7 -0
- package/lib/exercises/math/functions/variations/varTableFromSentences.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/varTableFromSentences.js +167 -137
- package/lib/exercises/math/geometry/areas/triangleArea.js +1 -1
- package/lib/exercises/math/probaStat/basicStats/calculateFrequency.js +1 -1
- package/lib/exercises/math/probaStat/binomial/binomialInequation.js +2 -2
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
- package/lib/geogebra/colors.d.ts +0 -1
- package/lib/geogebra/colors.d.ts.map +1 -1
- package/lib/geogebra/colors.js +2 -2
- package/lib/index.d.ts +42 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/math/inequations/inequation.d.ts +1 -0
- package/lib/math/inequations/inequation.d.ts.map +1 -1
- package/lib/math/inequations/inequation.js +12 -0
- package/lib/tree/nodes/operators/addNode.js +0 -1
- package/lib/tree/nodes/sets/intervalNode.d.ts +1 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +3 -0
- package/lib/tree/parsers/intervalParser.d.ts +2 -0
- package/lib/tree/parsers/intervalParser.d.ts.map +1 -1
- package/lib/tree/parsers/intervalParser.js +2 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -463,6 +463,9 @@ declare const mathExercises: (Exercise<{
|
|
|
463
463
|
}> | Exercise<{
|
|
464
464
|
k: number;
|
|
465
465
|
inequationSymbol: import("./math/inequations/inequation.js").InegalitySymbols;
|
|
466
|
+
}, {}> | Exercise<{
|
|
467
|
+
k: number;
|
|
468
|
+
inequationSymbol: import("./math/inequations/inequation.js").InegalitySymbols;
|
|
466
469
|
}, {}> | Exercise<{
|
|
467
470
|
a: number;
|
|
468
471
|
lt: boolean;
|
|
@@ -485,6 +488,9 @@ declare const mathExercises: (Exercise<{
|
|
|
485
488
|
right: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
486
489
|
inequalitySign: boolean;
|
|
487
490
|
isStrict: boolean;
|
|
491
|
+
}, {}> | Exercise<{
|
|
492
|
+
k: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
493
|
+
inequationSymbol: import("./math/inequations/inequation.js").InegalitySymbols;
|
|
488
494
|
}, {}> | Exercise<{
|
|
489
495
|
rand: boolean;
|
|
490
496
|
poly1: number[];
|
|
@@ -1090,6 +1096,14 @@ declare const mathExercises: (Exercise<{
|
|
|
1090
1096
|
}, {}> | Exercise<{
|
|
1091
1097
|
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1092
1098
|
b: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1099
|
+
}, {}> | Exercise<{
|
|
1100
|
+
a: number;
|
|
1101
|
+
b: number;
|
|
1102
|
+
closure: import("./tree/nodes/sets/closure.js").ClosureType;
|
|
1103
|
+
type: number;
|
|
1104
|
+
}, {}> | Exercise<{
|
|
1105
|
+
k: number;
|
|
1106
|
+
inequationSymbol: import("./math/inequations/inequation.js").InegalitySymbols;
|
|
1093
1107
|
}, {}> | Exercise<{
|
|
1094
1108
|
lowerBound: number;
|
|
1095
1109
|
upperBound: number;
|
|
@@ -1171,13 +1185,19 @@ declare const mathExercises: (Exercise<{
|
|
|
1171
1185
|
x2: number;
|
|
1172
1186
|
x3: number;
|
|
1173
1187
|
lineAsked: number;
|
|
1188
|
+
}, {}> | Exercise<{
|
|
1189
|
+
affine1Coeffs: number[];
|
|
1190
|
+
affine2Coeffs: number[];
|
|
1191
|
+
initTable: string[][];
|
|
1174
1192
|
}, {}> | Exercise<{
|
|
1175
1193
|
xValues: number[];
|
|
1176
1194
|
yValues: number[];
|
|
1177
1195
|
isAskingX: boolean;
|
|
1178
1196
|
isAskingMin: boolean;
|
|
1179
1197
|
intervalXIndexes: number[];
|
|
1180
|
-
}, {
|
|
1198
|
+
}, {
|
|
1199
|
+
extremumType: string;
|
|
1200
|
+
}> | Exercise<{
|
|
1181
1201
|
type: number;
|
|
1182
1202
|
coeffs: number[];
|
|
1183
1203
|
initTable: string[][];
|
|
@@ -1193,6 +1213,25 @@ declare const mathExercises: (Exercise<{
|
|
|
1193
1213
|
initTable: string[][];
|
|
1194
1214
|
lineAsked: number;
|
|
1195
1215
|
}, {}> | Exercise<{
|
|
1216
|
+
vars: string[];
|
|
1217
|
+
xs: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
1218
|
+
}, {}> | Exercise<{
|
|
1219
|
+
type: number;
|
|
1220
|
+
coeffs: number[];
|
|
1221
|
+
intervalAskedIndex: number;
|
|
1222
|
+
}, {}> | Exercise<{
|
|
1223
|
+
type: number;
|
|
1224
|
+
coeffs: number[];
|
|
1225
|
+
askingIncreasing: boolean;
|
|
1226
|
+
}, {}> | Exercise<{
|
|
1227
|
+
askingMax: boolean;
|
|
1228
|
+
askingX: boolean;
|
|
1229
|
+
splinePoints: number[][];
|
|
1230
|
+
intervalBounds: number[];
|
|
1231
|
+
}, {
|
|
1232
|
+
coordAsked: string;
|
|
1233
|
+
extremumType: string;
|
|
1234
|
+
}> | Exercise<{
|
|
1196
1235
|
a: number;
|
|
1197
1236
|
b: number;
|
|
1198
1237
|
}, {}> | Exercise<{
|
|
@@ -1210,6 +1249,8 @@ declare const mathExercises: (Exercise<{
|
|
|
1210
1249
|
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1211
1250
|
b: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1212
1251
|
isMinusInside: boolean;
|
|
1252
|
+
}, {}> | Exercise<{
|
|
1253
|
+
k: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1213
1254
|
}, {}> | Exercise<{
|
|
1214
1255
|
coin: boolean;
|
|
1215
1256
|
radius: 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;AAE/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;AAE/D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -2,6 +2,7 @@ export type InegalitySymbols = "<" | ">" | "\\le" | "\\ge";
|
|
|
2
2
|
export declare abstract class InequationSymbolConstructor {
|
|
3
3
|
static random(): InequationSymbol;
|
|
4
4
|
static randomSymbol(): InegalitySymbols;
|
|
5
|
+
static reverse(i: InegalitySymbols): "<" | ">" | "\\le" | "\\ge";
|
|
5
6
|
}
|
|
6
7
|
export declare class InequationSymbol {
|
|
7
8
|
isStrict: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inequation.d.ts","sourceRoot":"","sources":["../../../src/math/inequations/inequation.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,gBAAgB,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D,8BAAsB,2BAA2B;IAC/C,MAAM,CAAC,MAAM;IAGb,MAAM,CAAC,YAAY;
|
|
1
|
+
{"version":3,"file":"inequation.d.ts","sourceRoot":"","sources":["../../../src/math/inequations/inequation.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,gBAAgB,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D,8BAAsB,2BAA2B;IAC/C,MAAM,CAAC,MAAM;IAGb,MAAM,CAAC,YAAY;IAGnB,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,gBAAgB;CAYnC;AACD,qBAAa,gBAAgB;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,gBAAgB,CAAC;gBACb,MAAM,EAAE,gBAAgB;IAKpC,QAAQ,QAAO,gBAAgB,CAW7B;IACF,UAAU,yBAER;IACF,mBAAmB,yBAEjB;IACF,iBAAiB,QAAO,gBAAgB,CAWtC;IACF,MAAM,uDAoBJ;CACH"}
|
|
@@ -6,6 +6,18 @@ export class InequationSymbolConstructor {
|
|
|
6
6
|
static randomSymbol() {
|
|
7
7
|
return random(["<", ">", "\\le", "\\ge"]);
|
|
8
8
|
}
|
|
9
|
+
static reverse(i) {
|
|
10
|
+
switch (i) {
|
|
11
|
+
case "<":
|
|
12
|
+
return ">";
|
|
13
|
+
case ">":
|
|
14
|
+
return "<";
|
|
15
|
+
case "\\ge":
|
|
16
|
+
return "\\le";
|
|
17
|
+
case "\\le":
|
|
18
|
+
return "\\ge";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
9
21
|
}
|
|
10
22
|
export class InequationSymbol {
|
|
11
23
|
isStrict;
|
|
@@ -304,7 +304,6 @@ const addSort = (a, b) => {
|
|
|
304
304
|
return Number(a.isNumeric) - Number(b.isNumeric);
|
|
305
305
|
}
|
|
306
306
|
if (isMonom(a) && isMonom(b)) {
|
|
307
|
-
console.log("passed", a.toTex(), b.toTex());
|
|
308
307
|
const parsedA = parseToMonomNode(a);
|
|
309
308
|
const parsedB = parseToMonomNode(b);
|
|
310
309
|
if (parsedA && parsedB) {
|
|
@@ -53,6 +53,7 @@ export declare class IntervalNode implements SetNode {
|
|
|
53
53
|
isDisjoint(otherInt: IntervalNode): void;
|
|
54
54
|
intersection(otherInt: IntervalNode): DiscreteSetNode | IntervalNode;
|
|
55
55
|
toClosedForm(): IntervalNode;
|
|
56
|
+
toClosure(c: ClosureType): IntervalNode;
|
|
56
57
|
union(otherInt: IntervalNode): IntervalNode | UnionIntervalNode;
|
|
57
58
|
}
|
|
58
59
|
//# sourceMappingURL=intervalNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/intervalNode.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,eAAe,EAAkB,MAAM,uBAAuB,CAAC;AAOxE,OAAO,EAAW,WAAW,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,eAAe,EAAY,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,YAAY,CAEzD;AAED,8BAAsB,uBAAuB;IAC3C,MAAM,CAAC,MAAM;IA2Cb,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM;IAYlC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,uBAAuB;CAQpD;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,EA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AC,QAAQ,EAAE,YAAY;IA0DnC,YAAY;IAIZ,SAAS,CAAC,CAAC,EAAE,WAAW;IAGxB,KAAK,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,GAAG,iBAAiB;CAkDhE"}
|
|
@@ -281,6 +281,9 @@ export class IntervalNode {
|
|
|
281
281
|
toClosedForm() {
|
|
282
282
|
return new IntervalNode(this.a, this.b, ClosureType.FF, this.opts);
|
|
283
283
|
}
|
|
284
|
+
toClosure(c) {
|
|
285
|
+
return new IntervalNode(this.a, this.b, c, this.opts);
|
|
286
|
+
}
|
|
284
287
|
union(otherInt) {
|
|
285
288
|
const [thisA, thisB] = [this.a.evaluate(), this.b.evaluate()];
|
|
286
289
|
const [otherA, otherB] = [otherInt.a.evaluate(), otherInt.b.evaluate()];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ClosureType } from "../nodes/sets/closure.js";
|
|
1
2
|
import { IntervalNode } from "../nodes/sets/intervalNode.js";
|
|
2
3
|
type Opts = {
|
|
3
4
|
allowCommaInsteadOfSemicolon?: boolean;
|
|
4
5
|
allowNoBrackets?: boolean;
|
|
6
|
+
expectedClosure?: ClosureType;
|
|
5
7
|
};
|
|
6
8
|
export declare const intervalParser: (ans: string, opts?: Opts) => false | IntervalNode;
|
|
7
9
|
export {};
|
|
@@ -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":"AACA,OAAO,EAAW,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,KAAK,IAAI,GAAG;IACV,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,WAAW,CAAC;CAC/B,CAAC;AACF,eAAO,MAAM,cAAc,QAAS,MAAM,SAAS,IAAI,yBAkDtD,CAAC"}
|
|
@@ -33,7 +33,8 @@ export const intervalParser = (ans, opts) => {
|
|
|
33
33
|
const bParsed = parseAlgebraic(bornes[1]);
|
|
34
34
|
if (!bParsed)
|
|
35
35
|
return false;
|
|
36
|
-
return new IntervalNode(aParsed, bParsed,
|
|
36
|
+
return new IntervalNode(aParsed, bParsed, opts?.expectedClosure ??
|
|
37
|
+
Closure.fromBrackets(leftBracket, rightBracket));
|
|
37
38
|
}
|
|
38
39
|
catch (err) {
|
|
39
40
|
return handleVEAError(err);
|