math-exercises 3.0.106 → 3.0.108
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/exercise.d.ts +1 -6
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSub.d.ts +1 -1
- package/lib/exercises/math/calcul/addAndSub.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSub.js +18 -4
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +8 -3
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +0 -2
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +0 -2
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +6 -4
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistri.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistri.js +0 -2
- package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +4 -4
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistri.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistri.js +0 -2
- package/lib/exercises/math/calculLitteral/equation/equa1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa1.js +0 -2
- package/lib/exercises/math/calculLitteral/equation/equa2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa2.js +0 -2
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +0 -2
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +0 -2
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +0 -2
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +0 -2
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +0 -2
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +0 -2
- package/lib/exercises/math/derivation/derivative/productDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/productDerivative.js +0 -2
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +3 -0
- package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +2 -0
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.js +3 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +0 -2
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildMediatriceWithCompass.js +0 -2
- package/lib/exercises/math/geometry/triangles/traceMedianInTriangle.js +0 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfCube.js +0 -2
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.js +0 -2
- package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -1
- package/lib/exercises/math/percent/htToTTC.js +0 -2
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +0 -2
- package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -1
- package/lib/exercises/math/percent/ttcToHT.js +0 -2
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +0 -2
- package/lib/exercises/math/primitive/exponentialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.js +0 -2
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.js +0 -2
- package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageList.js +0 -2
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +0 -2
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +6 -4
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +0 -2
- package/lib/exercises/math/sets/setBelonging.d.ts.map +1 -1
- package/lib/exercises/math/sets/setBelonging.js +0 -2
- package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/arcValue.js +0 -2
- package/lib/exercises/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/remarkableValues.js +0 -2
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.js +0 -2
- package/lib/exercises/pc/math/isolateVariables.d.ts.map +1 -1
- package/lib/exercises/pc/math/isolateVariables.js +0 -1
- package/lib/exercises/pc/mole/concentrationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mole/concentrationReading.js +0 -1
- package/lib/exercises/pc/motion/recognizeFreeFall.js +0 -2
- package/lib/index.d.ts +1 -1
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.js +25 -29
- package/lib/math/utils/random/randfloat.d.ts +7 -1
- package/lib/math/utils/random/randfloat.d.ts.map +1 -1
- package/lib/math/utils/random/randfloat.js +2 -1
- package/lib/math/utils/random/randfrac.d.ts +9 -0
- package/lib/math/utils/random/randfrac.d.ts.map +1 -0
- package/lib/math/utils/random/randfrac.js +19 -0
- package/lib/math/utils/random/randint.d.ts +7 -1
- package/lib/math/utils/random/randint.d.ts.map +1 -1
- package/lib/math/utils/random/randint.js +2 -1
- package/lib/playground.d.ts +1 -1
- package/lib/playground.js +1 -1
- package/lib/tree/nodes/algebraicNode.d.ts +1 -1
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.d.ts +1 -1
- package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/expNode.js +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -1
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sqrtNode.js +1 -3
- package/lib/tree/nodes/operators/addNode.d.ts +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 +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +3 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +44 -38
- package/lib/tree/nodes/operators/powerNode.d.ts +1 -1
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +1 -1
- package/lib/tree/nodes/randomReal.d.ts +15 -0
- package/lib/tree/nodes/randomReal.d.ts.map +1 -0
- package/lib/tree/nodes/randomReal.js +32 -0
- package/lib/tree/parsers/latexParser.js +5 -4
- package/package.json +1 -1
|
@@ -118,7 +118,7 @@ export class AddNode {
|
|
|
118
118
|
// toMathjs() {
|
|
119
119
|
// return add(this.leftChild.toMathjs(), this.rightChild.toMathjs());
|
|
120
120
|
// }
|
|
121
|
-
simplify(opts) {
|
|
121
|
+
simplify(opts, log = false) {
|
|
122
122
|
const leftSimplified = this.leftChild.simplify(opts);
|
|
123
123
|
const rightSimplified = this.rightChild.simplify(opts);
|
|
124
124
|
const copy = new AddNode(leftSimplified, rightSimplified, this.opts);
|
|
@@ -29,7 +29,7 @@ export declare class FractionNode implements OperatorNode {
|
|
|
29
29
|
isDecimal(): boolean;
|
|
30
30
|
toTex(texOpts?: ToTexOptions): string;
|
|
31
31
|
evaluate(vars?: Record<string, number>): number;
|
|
32
|
-
simplify(opts?: SimplifyOptions): AlgebraicNode;
|
|
32
|
+
simplify(opts?: SimplifyOptions, log?: boolean): AlgebraicNode;
|
|
33
33
|
equals(node: AlgebraicNode): boolean;
|
|
34
34
|
toDetailedEvaluation(vars: Record<string, AlgebraicNode>): FractionNode;
|
|
35
35
|
toSimplificationTex(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fract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I,uBAAuB;IAQxC,UAAU;IAGV,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IA+BpC,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE;IAG5C,SAAS;IAUT,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM;IA8BrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAMtC,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,GAAG,UAAQ,GAAG,aAAa;IA0M5D,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAOpC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAOxD,mBAAmB;IAQnB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa;CAGxD"}
|
|
@@ -131,9 +131,11 @@ export class FractionNode {
|
|
|
131
131
|
// toMathjs() {
|
|
132
132
|
// return fraction(this.leftChild.toMathjs(), this.rightChild.toMathjs());
|
|
133
133
|
// }
|
|
134
|
-
simplify(opts) {
|
|
134
|
+
simplify(opts, log = false) {
|
|
135
|
+
log && console.log(`simplifying ${this.toTex()}`);
|
|
135
136
|
const simplifiedNum = this.leftChild.simplify(opts);
|
|
136
137
|
const simplifiedDenum = this.rightChild.simplify(opts);
|
|
138
|
+
// console.log(simplifiedNum.toTex(), simplifiedDenum.toTex());
|
|
137
139
|
const copy = new FractionNode(simplifiedNum, simplifiedDenum, this.opts);
|
|
138
140
|
if (isNumberNode(simplifiedNum) && simplifiedNum.value === 0) {
|
|
139
141
|
return new NumberNode(0);
|
|
@@ -32,7 +32,7 @@ export declare class MultiplyNode implements CommutativeOperatorNode {
|
|
|
32
32
|
evaluate(vars?: Record<string, number>): number;
|
|
33
33
|
copy(): MultiplyNode;
|
|
34
34
|
canonicalOrder(): void;
|
|
35
|
-
simplify(opts?: SimplifyOptions): AlgebraicNode;
|
|
35
|
+
simplify(opts?: SimplifyOptions, log?: boolean): AlgebraicNode;
|
|
36
36
|
toSimplificationTex(opts?: SimplifyOptions): string;
|
|
37
37
|
equals(node: AlgebraicNode): boolean;
|
|
38
38
|
toDetailedEvaluation(vars: Record<string, AlgebraicNode>): MultiplyNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiplyNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/multiplyNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,WAAW,EAGZ,MAAM,mBAAmB,CAAC;AAiB3B,OAAO,EACL,aAAa,EACb,eAAe,EAEhB,MAAM,qBAAqB,CAAC;AAe7B,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,YAAY,CAEzD;AAED,eAAO,MAAM,QAAQ,MAChB,aAAa,GAAG,MAAM,GAAG,MAAM,KAC/B,aAAa,GAAG,MAAM,GAAG,MAAM,SAC3B,WAAW,iBAOnB,CAAC;AACF,eAAO,MAAM,iBAAiB,QAAS,aAAa,EAAE,SAYrD,CAAC;AACF,qBAAa,YAAa,YAAW,uBAAuB;IAC1D,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,EAAE,EAAE,WAAW,CAAC;IAChB,SAAS,EAAE,aAAa,CAAC;IACzB,UAAU,EAAE,aAAa,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEjB,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,aAAa,EACzB,IAAI,CAAC,EAAE,WAAW;IAUpB,OAAO,qBAGL;IAEF,WAAW,UAAW,eAAe,kBAUnC;IAEF,UAAU,qBAER;IACF,YAAY,IAAI,MAAM;IAItB,KAAK,CAAC,OAAO,CA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AE,WAAW;IAUpB,OAAO,qBAGL;IAEF,WAAW,UAAW,eAAe,kBAUnC;IAEF,UAAU,qBAER;IACF,YAAY,IAAI,MAAM;IAItB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM;IAgFrC,SAAS;IAkDT,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE;IAyFrD,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE;IAG5C,aAAa;;;;;;;;;IAYb,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAItC,IAAI;IAGJ,cAAc;IACd,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,GAAG,UAAQ,GAAG,aAAa;IAiK5D,mBAAmB,CAAC,IAAI,CAAC,EAAE,eAAe;IAM1C,MAAM,CAAC,IAAI,EAAE,aAAa;IAU1B,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAQxD,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa;CAMxD"}
|
|
@@ -10,7 +10,7 @@ import { NumberNode, isNumberNode } from "../numbers/numberNode.js";
|
|
|
10
10
|
import { isInt } from "../../../utils/isInt.js";
|
|
11
11
|
import { isVariableNode } from "../variables/variableNode.js";
|
|
12
12
|
import { SqrtNode, isSqrtNode } from "../functions/sqrtNode.js";
|
|
13
|
-
import { isOppositeNode, } from "../functions/oppositeNode.js";
|
|
13
|
+
import { isOppositeNode, opposite, } from "../functions/oppositeNode.js";
|
|
14
14
|
import { FractionNode, isFractionNode } from "./fractionNode.js";
|
|
15
15
|
import { isFunctionNode } from "../functions/functionNode.js";
|
|
16
16
|
import { AddNode, add, isAddNode } from "./addNode.js";
|
|
@@ -264,9 +264,10 @@ export class MultiplyNode {
|
|
|
264
264
|
return new MultiplyNode(this.leftChild, this.rightChild, this.opts);
|
|
265
265
|
}
|
|
266
266
|
canonicalOrder() { }
|
|
267
|
-
simplify(opts) {
|
|
268
|
-
|
|
269
|
-
const
|
|
267
|
+
simplify(opts, log = false) {
|
|
268
|
+
log && console.log(`simplifying ${this.toTex()}`);
|
|
269
|
+
const leftSimplified = this.leftChild.simplify(opts, log);
|
|
270
|
+
const rightSimplified = this.rightChild.simplify(opts, log);
|
|
270
271
|
const copy = new MultiplyNode(leftSimplified, rightSimplified, this.opts);
|
|
271
272
|
/**get externals nodes (= extremités du sous arbre non multiplicatif)
|
|
272
273
|
* les opposites sont supprimés et on ajoute *-1 à la fin si leur nb est impair
|
|
@@ -332,7 +333,7 @@ export class MultiplyNode {
|
|
|
332
333
|
const denumNode = denums.length === 1
|
|
333
334
|
? denums[0]
|
|
334
335
|
: operatorComposition(MultiplyNode, denums);
|
|
335
|
-
return new FractionNode(numNode, denumNode).simplify(opts);
|
|
336
|
+
return new FractionNode(numNode, denumNode).simplify(opts, log);
|
|
336
337
|
}
|
|
337
338
|
const simplifyExternalNodes = (a, b) => {
|
|
338
339
|
if (isVariableNode(a) && isVariableNode(b)) {
|
|
@@ -344,44 +345,26 @@ export class MultiplyNode {
|
|
|
344
345
|
return new NumberNode(round(a.value * b.value, 10));
|
|
345
346
|
}
|
|
346
347
|
if (isSqrtNode(a) && isSqrtNode(b)) {
|
|
347
|
-
return new SqrtNode(new MultiplyNode(a.child, b.child)).simplify(opts);
|
|
348
|
+
return new SqrtNode(new MultiplyNode(a.child, b.child)).simplify(opts, log);
|
|
348
349
|
}
|
|
349
350
|
if (isNumberNode(a) &&
|
|
350
351
|
(isPowerNode(b) || isSquareNode(b)) &&
|
|
351
352
|
isNumberNode(b.leftChild) &&
|
|
352
353
|
a.value === b.leftChild.value) {
|
|
353
|
-
return new PowerNode(b.leftChild, new AddNode(b.rightChild, (1).toTree())).simplify(opts);
|
|
354
|
+
return new PowerNode(b.leftChild, new AddNode(b.rightChild, (1).toTree())).simplify(opts, log);
|
|
354
355
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
return new FractionNode(multiply(a.leftChild, b), a.rightChild).simplify(opts);
|
|
360
|
-
}
|
|
361
|
-
const aFractionNode = isFractionNode(a) && a.isNumeric
|
|
362
|
-
? a
|
|
363
|
-
: isOppositeNode(a) && isFractionNode(a.child) && a.child.isNumeric
|
|
364
|
-
? a.child
|
|
365
|
-
: null;
|
|
366
|
-
const bFractionNode = isFractionNode(b) && b.isNumeric
|
|
367
|
-
? b
|
|
368
|
-
: isOppositeNode(b) && isFractionNode(b.child) && b.child.isNumeric
|
|
369
|
-
? b.child
|
|
370
|
-
: null;
|
|
371
|
-
if (aFractionNode && bFractionNode) {
|
|
372
|
-
if (isFractionNode(b) && b.isNumeric) {
|
|
373
|
-
return new FractionNode(multiply(aFractionNode.leftChild, bFractionNode.leftChild), multiply(aFractionNode.rightChild, bFractionNode.rightChild)).simplify(opts);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
let powerSimplified = powerSimplify(a, b, opts);
|
|
356
|
+
let fracSimplified = fractionSimplify(a, b, opts, log);
|
|
357
|
+
if (fracSimplified)
|
|
358
|
+
return fracSimplified;
|
|
359
|
+
let powerSimplified = powerSimplify(a, b, opts, log);
|
|
377
360
|
if (powerSimplified)
|
|
378
361
|
return powerSimplified;
|
|
379
362
|
if (opts?.towardsDistribute && (isAddNode(a) || isSubstractNode(a))) {
|
|
380
|
-
return add(multiply(a.leftChild, b), multiply(a.rightChild, b)).simplify(opts);
|
|
363
|
+
return add(multiply(a.leftChild, b), multiply(a.rightChild, b)).simplify(opts, log);
|
|
381
364
|
}
|
|
382
365
|
else if (opts?.towardsDistribute &&
|
|
383
366
|
(isAddNode(b) || isSubstractNode(b))) {
|
|
384
|
-
return add(multiply(a, b.leftChild), multiply(a, b.rightChild)).simplify(opts);
|
|
367
|
+
return add(multiply(a, b.leftChild), multiply(a, b.rightChild)).simplify(opts, log);
|
|
385
368
|
}
|
|
386
369
|
//! j'aime po
|
|
387
370
|
//! doit etre à la fin
|
|
@@ -452,29 +435,52 @@ export class MultiplyNode {
|
|
|
452
435
|
return add(multiply(this.leftChild.derivative(varName), this.rightChild), multiply(this.leftChild, this.rightChild.derivative(varName)));
|
|
453
436
|
}
|
|
454
437
|
}
|
|
455
|
-
const
|
|
438
|
+
const fractionSimplify = (a, b, opts, log = false) => {
|
|
439
|
+
if (isNumberNode(a) && isFractionNode(b) && b.isNumeric) {
|
|
440
|
+
return new FractionNode(multiply(a, b.leftChild), b.rightChild).simplify(opts, log);
|
|
441
|
+
}
|
|
442
|
+
if (isNumberNode(b) && isFractionNode(a) && a.isNumeric) {
|
|
443
|
+
return new FractionNode(multiply(a.leftChild, b), a.rightChild).simplify(opts, log);
|
|
444
|
+
}
|
|
445
|
+
const aFractionNode = isFractionNode(a) && a.isNumeric
|
|
446
|
+
? a
|
|
447
|
+
: isOppositeNode(a) && isFractionNode(a.child) && a.child.isNumeric
|
|
448
|
+
? new FractionNode(opposite(a.child.leftChild), a.child.rightChild)
|
|
449
|
+
: null;
|
|
450
|
+
const bFractionNode = isFractionNode(b) && b.isNumeric
|
|
451
|
+
? b
|
|
452
|
+
: isOppositeNode(b) && isFractionNode(b.child) && b.child.isNumeric
|
|
453
|
+
? new FractionNode(opposite(b.child.leftChild), b.child.rightChild)
|
|
454
|
+
: null;
|
|
455
|
+
if (aFractionNode && bFractionNode) {
|
|
456
|
+
if (isFractionNode(b) && b.isNumeric) {
|
|
457
|
+
return new FractionNode(multiply(aFractionNode.leftChild, bFractionNode.leftChild), multiply(aFractionNode.rightChild, bFractionNode.rightChild)).simplify(opts, log);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
const powerSimplify = (a, b, opts, log = false) => {
|
|
456
462
|
if ((isPowerNode(a) || isSquareNode(a)) &&
|
|
457
463
|
(isPowerNode(b) || isSquareNode(b))) {
|
|
458
464
|
if (a.leftChild.toTex() === b.leftChild.toTex())
|
|
459
|
-
return new PowerNode(a.leftChild, new AddNode(a.rightChild, b.rightChild).simplify(opts)).simplify(opts);
|
|
465
|
+
return new PowerNode(a.leftChild, new AddNode(a.rightChild, b.rightChild).simplify(opts, log)).simplify(opts, log);
|
|
460
466
|
}
|
|
461
467
|
if (isVariableNode(a)) {
|
|
462
468
|
if (isVariableNode(b) && b.toTex() === a.toTex() && opts?.keepPowers)
|
|
463
|
-
return new PowerNode(a, new NumberNode(2)).simplify(opts);
|
|
469
|
+
return new PowerNode(a, new NumberNode(2)).simplify(opts, log);
|
|
464
470
|
if ((isPowerNode(b) || isSquareNode(b)) &&
|
|
465
471
|
b.leftChild.toTex() === a.toTex()) {
|
|
466
|
-
return new PowerNode(a, new AddNode(new NumberNode(1), b.rightChild).simplify(opts)).simplify(opts);
|
|
472
|
+
return new PowerNode(a, new AddNode(new NumberNode(1), b.rightChild).simplify(opts, log)).simplify(opts, log);
|
|
467
473
|
}
|
|
468
474
|
}
|
|
469
475
|
if (isVariableNode(b)) {
|
|
470
476
|
if (isVariableNode(a) && a.toTex() === b.toTex() && opts?.keepPowers)
|
|
471
|
-
return new PowerNode(b, new NumberNode(2)).simplify(opts);
|
|
477
|
+
return new PowerNode(b, new NumberNode(2)).simplify(opts, log);
|
|
472
478
|
if ((isPowerNode(a) || isSquareNode(a)) &&
|
|
473
479
|
a.leftChild.toTex() === b.toTex()) {
|
|
474
|
-
return new PowerNode(b, new AddNode(new NumberNode(1), a.rightChild).simplify(opts)).simplify(opts);
|
|
480
|
+
return new PowerNode(b, new AddNode(new NumberNode(1), a.rightChild).simplify(opts, log)).simplify(opts, log);
|
|
475
481
|
}
|
|
476
482
|
}
|
|
477
483
|
if (isExpNode(a) && isExpNode(b)) {
|
|
478
|
-
return new ExpNode(add(a.child, b.child)).simplify(opts);
|
|
484
|
+
return new ExpNode(add(a.child, b.child)).simplify(opts, log);
|
|
479
485
|
}
|
|
480
486
|
};
|
|
@@ -28,7 +28,7 @@ export declare class PowerNode implements OperatorNode {
|
|
|
28
28
|
toTex(opts?: ToTexOptions): string;
|
|
29
29
|
evaluate(vars?: Record<string, number>): number;
|
|
30
30
|
toDetailedEvaluation(vars: Record<string, AlgebraicNode>): PowerNode;
|
|
31
|
-
simplify(opts?: SimplifyOptions): AlgebraicNode;
|
|
31
|
+
simplify(opts?: SimplifyOptions, log?: boolean): AlgebraicNode;
|
|
32
32
|
equals(node: AlgebraicNode): boolean;
|
|
33
33
|
derivative(varName?: string | undefined): AlgebraicNode;
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/powerNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAG9E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKrE,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,SAAS,CAEnD;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AACD,eAAO,MAAM,MAAM,MAAO,aAAa,GAAG,MAAM,GAAG,MAAM,eAKxD,CAAC;AAEF,eAAO,MAAM,KAAK,MACb,aAAa,GAAG,MAAM,GAAG,MAAM,KAC/B,aAAa,GAAG,MAAM,GAAG,MAAM,SAC3B,WAAW,cAOnB,CAAC;AAEF,qBAAa,SAAU,YAAW,YAAY;IAC5C,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,EAAE,EAAE,WAAW,CAAC;IAChB,SAAS,EAAE,aAAa,CAAC;IACzB,UAAU,EAAE,aAAa,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEjB,SAAS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aAAa,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEjB,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,aAAa,EACzB,IAAI,CAAC,EAAE,WAAW;IAUpB,YAAY,IAAI,MAAM;IAGtB,aAAa;;;;;;;;;IAOb,iBAAiB;IAqBjB,cAAc,IAAI,MAAM,EAAE;IAI1B,KAAK,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM;IAuBlC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAMtC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAOxD,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,GAAG,UAAQ,GAAG,aAAa;IA6D5D,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAOpC,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa;CAcxD;AAED,qBAAa,UAAW,SAAQ,SAAS;gBAC3B,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;CAIrD"}
|
|
@@ -101,7 +101,7 @@ export class PowerNode {
|
|
|
101
101
|
toDetailedEvaluation(vars) {
|
|
102
102
|
return new PowerNode(this.leftChild.toDetailedEvaluation(vars), this.rightChild.toDetailedEvaluation(vars));
|
|
103
103
|
}
|
|
104
|
-
simplify(opts) {
|
|
104
|
+
simplify(opts, log = false) {
|
|
105
105
|
const leftSimplified = this.leftChild.simplify(opts);
|
|
106
106
|
const rightSimplified = this.rightChild.simplify(opts);
|
|
107
107
|
const copy = new PowerNode(leftSimplified, rightSimplified, this.opts);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RandfloatProps } from "../../math/utils/random/randfloat.js";
|
|
2
|
+
import { RandintProps } from "../../math/utils/random/randint.js";
|
|
3
|
+
export declare enum RealType {
|
|
4
|
+
Integer = 0,
|
|
5
|
+
Decimal = 1,
|
|
6
|
+
Rational = 2,
|
|
7
|
+
Irrational = 3
|
|
8
|
+
}
|
|
9
|
+
type RandomGeneratorOptions = {
|
|
10
|
+
int?: RandintProps;
|
|
11
|
+
dec?: RandfloatProps;
|
|
12
|
+
};
|
|
13
|
+
export declare const randomReal: (props: RandomGeneratorOptions) => number;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=randomReal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"randomReal.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/randomReal.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,cAAc,EACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAW,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAE3E,oBAAY,QAAQ;IAClB,OAAO,IAAA;IACP,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,UAAU,IAAA;CACX;AAED,KAAK,sBAAsB,GAAG;IAC5B,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,GAAG,CAAC,EAAE,cAAc,CAAC;CACtB,CAAC;AAMF,eAAO,MAAM,UAAU,UAAW,sBAAsB,WA0BvD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { randfloat, } from "../../math/utils/random/randfloat.js";
|
|
2
|
+
import { randint } from "../../math/utils/random/randint.js";
|
|
3
|
+
export var RealType;
|
|
4
|
+
(function (RealType) {
|
|
5
|
+
RealType[RealType["Integer"] = 0] = "Integer";
|
|
6
|
+
RealType[RealType["Decimal"] = 1] = "Decimal";
|
|
7
|
+
RealType[RealType["Rational"] = 2] = "Rational";
|
|
8
|
+
RealType[RealType["Irrational"] = 3] = "Irrational";
|
|
9
|
+
})(RealType || (RealType = {}));
|
|
10
|
+
export const randomReal = (props) => {
|
|
11
|
+
//!should be done in a type
|
|
12
|
+
const [type, opts] = Object.entries(props)[0];
|
|
13
|
+
if (Object.keys(props).length !== 1)
|
|
14
|
+
throw new Error("misused randomReal");
|
|
15
|
+
switch (type) {
|
|
16
|
+
case "int": {
|
|
17
|
+
return randint(...opts.int);
|
|
18
|
+
}
|
|
19
|
+
case "dec": {
|
|
20
|
+
return randfloat(...opts.dec);
|
|
21
|
+
}
|
|
22
|
+
// case "ratio": {
|
|
23
|
+
// }
|
|
24
|
+
// case "irratio": {
|
|
25
|
+
// //pi, e , sqrt
|
|
26
|
+
// }
|
|
27
|
+
// case RealType.Rational:
|
|
28
|
+
// return sign * Math.random();
|
|
29
|
+
// case RealType.Irrational:
|
|
30
|
+
// return sign * Math.random();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -8,7 +8,7 @@ import { SinNode } from "../nodes/functions/sinNode.js";
|
|
|
8
8
|
import { SqrtNode } from "../nodes/functions/sqrtNode.js";
|
|
9
9
|
import { InequationNode } from "../nodes/inequations/inequationNode.js";
|
|
10
10
|
import { MinusInfinityNode, PlusInfinityNode, } from "../nodes/numbers/infiniteNode.js";
|
|
11
|
-
import { NumberNode
|
|
11
|
+
import { NumberNode } from "../nodes/numbers/numberNode.js";
|
|
12
12
|
import { PiNode } from "../nodes/numbers/piNode.js";
|
|
13
13
|
import { AddNode } from "../nodes/operators/addNode.js";
|
|
14
14
|
import { BinomialCoefficientNode } from "../nodes/operators/binomialCoefficientNode.js";
|
|
@@ -432,13 +432,14 @@ const buildTreeForSameDepthTokens = (tokens) => {
|
|
|
432
432
|
const token = tempTokens[i];
|
|
433
433
|
if (!currentAdd) {
|
|
434
434
|
if (typeof token === "string") {
|
|
435
|
-
//ici on accepte +
|
|
435
|
+
//ici on accepte +"node" (mais seulement en début de tree)
|
|
436
436
|
//donc +3 + X est ok
|
|
437
437
|
//mais pas x \\times +3
|
|
438
438
|
if (token === "+" &&
|
|
439
439
|
!!tempTokens[i + 1] &&
|
|
440
|
-
typeof tempTokens[i + 1] !== "string"
|
|
441
|
-
|
|
440
|
+
typeof tempTokens[i + 1] !== "string"
|
|
441
|
+
// && isNumberNode(tempTokens[i + 1] as AlgebraicNode
|
|
442
|
+
) {
|
|
442
443
|
currentAdd = tempTokens[i + 1];
|
|
443
444
|
i++;
|
|
444
445
|
}
|