math-exercises 2.2.63 → 2.2.64

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.
@@ -1 +1 @@
1
- {"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAiBlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAyPF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAmBlE,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
1
+ {"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAwBlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA+PF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAmBlE,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
@@ -64,8 +64,13 @@ const getAnswerTree = ({ xA, yA, yPrimeA }) => {
64
64
  const pente = new multiplyNode_1.MultiplyNode(yPrimeTree, "x".toTree());
65
65
  //f(a)-f'(a)a
66
66
  const b = new substractNode_1.SubstractNode(yA.toTree(), new multiplyNode_1.MultiplyNode(yPrimeTree, xA.toTree())).simplify();
67
- const ansTree = new addNode_1.AddNode(pente, b).simplify({
67
+ // const yPrimeTree = frac(-3, 2);
68
+ // const pente = multiply(yPrimeTree, "x");
69
+ // //f(a)-f'(a)a
70
+ // const b = substract((-2).toTree(), multiply(yPrimeTree, -3)).simplify();
71
+ const ansTree = (0, addNode_1.add)(pente, b).simplify({
68
72
  forceDistributeFractions: true,
73
+ forbidFactorize: true,
69
74
  });
70
75
  return ansTree;
71
76
  };
@@ -22,7 +22,7 @@ const getPropositions = (n, { answer }) => {
22
22
  const bounds = isTowardsLeft
23
23
  ? [infiniteNode_1.MinusInfinityNode, k]
24
24
  : [k, infiniteNode_1.PlusInfinityNode];
25
- const closure = closure_1.Closure.fromBrackets(isTowardsLeft ? "]" : "[", (0, random_1.random)(["]", "["]));
25
+ const closure = closure_1.Closure.fromBrackets(isTowardsLeft ? "]" : (0, random_1.random)(["]", "["]), isTowardsLeft ? (0, random_1.random)(["]", "["]) : "[");
26
26
  (0, exercise_1.tryToAddWrongProp)(propositions, new intervalNode_1.IntervalNode(bounds[0], bounds[1], closure).toTex());
27
27
  }
28
28
  return (0, exercise_1.shuffleProps)(propositions, n);
@@ -92,7 +92,7 @@ const getPropositions = (n, { answer, a, b, type, closure }) => {
92
92
  };
93
93
  const isAnswerValid = (ans, { answer, a, b, closure, type }) => {
94
94
  const interval = getAnswer(a, b, type, closure);
95
- const texs = interval.toAllValidTexs();
95
+ const texs = interval.toAllValidTexs({ allowCommaInInterval: true });
96
96
  return texs.includes(ans);
97
97
  };
98
98
  exports.squareImageInterval = {
@@ -80,7 +80,7 @@ const getFindSecondRootQuestion = (ops) => {
80
80
  // const firstRoot = coinFlip()
81
81
  // ? randint(-10, 10).toTree()
82
82
  // : RationalConstructor.randomIrreductibleWithSign(5).toTree();
83
- const firstRoot = (0, randint_1.randint)(-10, 10);
83
+ const firstRoot = (0, randint_1.randint)(-10, 10, [0]);
84
84
  // const secondRoot = doWhile(
85
85
  // () =>
86
86
  // coinFlip()
@@ -1 +1 @@
1
- {"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0EF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC"}
1
+ {"version":3,"file":"averageList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0EF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.averageList = void 0;
4
4
  const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const numberVEA_1 = require("../../../../exercises/vea/numberVEA");
6
7
  const randfloat_1 = require("../../../../math/utils/random/randfloat");
7
8
  const randint_1 = require("../../../../math/utils/random/randint");
8
9
  const round_1 = require("../../../../math/utils/round");
@@ -62,7 +63,7 @@ const getPropositions = (n, { answer, sortedValues }) => {
62
63
  return (0, exercise_1.shuffleProps)(propositions, n);
63
64
  };
64
65
  const isAnswerValid = (ans, { answer }) => {
65
- return ans === answer;
66
+ return (0, numberVEA_1.numberVEA)(ans, answer);
66
67
  };
67
68
  exports.averageList = {
68
69
  id: "averageList",