math-expression-compiler 4.5.0 → 4.6.0
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/dist/index.d.ts +1 -28
- package/dist/index.js +34 -243
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -140,8 +140,6 @@ export declare enum MathExpressionBinaryOperatorSymbol {
|
|
|
140
140
|
GreaterThanOrEqual = ">=",
|
|
141
141
|
LessThan = "<",
|
|
142
142
|
LessThanOrEqual = "<=",
|
|
143
|
-
Mod = "mod",
|
|
144
|
-
Modulo = "%",
|
|
145
143
|
Multiply = "*",
|
|
146
144
|
NotEqual = "!=",
|
|
147
145
|
Or = "or",
|
|
@@ -155,8 +153,6 @@ export declare enum MathExpressionGrammarRule {
|
|
|
155
153
|
Assignment = "Assignment",
|
|
156
154
|
Binary = "Binary",
|
|
157
155
|
Conditional = "Conditional",
|
|
158
|
-
DivisionBeforeProduct = "DivisionBeforeProduct",
|
|
159
|
-
ImplicitProduct = "ImplicitProduct",
|
|
160
156
|
LeftHand = "LeftHand",
|
|
161
157
|
Nullish = "Nullish",
|
|
162
158
|
Percentage = "Percentage",
|
|
@@ -249,11 +245,8 @@ export declare const checkIsNearlyEqual: (left: number, right: number) => boolea
|
|
|
249
245
|
export declare const checkIsPrime: (value: number) => boolean;
|
|
250
246
|
export declare const checkIsSmaller: (left: number, right: number) => boolean;
|
|
251
247
|
export declare const compareNumbers: (left: number, right: number) => number;
|
|
252
|
-
export declare const computeBellNumber: (index: number) => null | number;
|
|
253
|
-
export declare const computeBernoulliNumber: (index: number) => number;
|
|
254
248
|
export declare const computeBitwiseAnd: (left: number, right: number) => number;
|
|
255
249
|
export declare const computeBitwiseOr: (left: number, right: number) => number;
|
|
256
|
-
export declare const computeCatalan: (index: number) => null | number;
|
|
257
250
|
export declare const computeCombinations: (available: number, chosen: number) => number;
|
|
258
251
|
export declare const computeComparison: (left: number, right: number) => number;
|
|
259
252
|
export declare const computeCompositions: (total: number, parts: number) => null | number;
|
|
@@ -262,20 +255,17 @@ export declare const computeDeterminant: (values: readonly number[]) => null | n
|
|
|
262
255
|
export declare const computeDistance: (point: number[], other: number[]) => null | number;
|
|
263
256
|
export declare const computeDotProduct: (left: readonly number[], right: readonly number[]) => null | number;
|
|
264
257
|
export declare const computeErf: (value: number) => number;
|
|
265
|
-
export declare const computeErfInverse: (value: number) => number;
|
|
266
258
|
export declare const computeExtreme: (values: readonly number[], initial: number, checkIsPreferred: (value: number, extreme: number) => boolean) => number;
|
|
267
259
|
export declare const computeFactorial: (value: number) => null | number;
|
|
268
260
|
export declare const computeGamma: (value: number) => number;
|
|
269
261
|
export declare const computeGreatestCommonDivisor: (left: number, right: number) => number;
|
|
270
262
|
export declare const computeHypotenuse: (values: readonly number[]) => number;
|
|
271
|
-
export declare const computeInitialGuess: (value: number) => number;
|
|
272
263
|
export declare const computeIntegerGreatestCommonDivisor: (values: readonly number[]) => null | number;
|
|
273
264
|
export declare const computeInverseCoth: (value: number) => number;
|
|
274
265
|
export declare const computeKullbackLeibler: (distribution: readonly number[], reference: readonly number[]) => null | number;
|
|
275
266
|
export declare const computeLeastCommonMultiple: (left: number, right: number) => null | number;
|
|
276
267
|
export declare const computeListComparison: (left: number[], right: number[]) => number;
|
|
277
268
|
export declare const computeLogarithm: (value: number, base?: number) => number;
|
|
278
|
-
export declare const computeLogGamma: (value: number) => number;
|
|
279
269
|
export declare const computeLogGammaOfPositive: (value: number) => {
|
|
280
270
|
logGamma: number;
|
|
281
271
|
product: number;
|
|
@@ -293,36 +283,23 @@ export declare const computePartitionSelect: (values: number[], index: number) =
|
|
|
293
283
|
export declare const computePermutations: (available: number, chosen: number) => null | number;
|
|
294
284
|
export declare const computePointToLine2D: (point: number[], line: number[]) => number;
|
|
295
285
|
export declare const computePointToLine3D: (point: number[], line: number[]) => number;
|
|
296
|
-
export declare const computePolynomial: (leading: number, coefficients: readonly number[], variable: number) => number;
|
|
297
286
|
export declare const computeProduct: (values: readonly MathExpressionValue[]) => null | number;
|
|
298
287
|
export declare const computeProductOfRange: (first: number, last: number) => number;
|
|
299
288
|
export declare const computeQuantile: (values: number[], probability: number, isSorted: boolean) => null | number;
|
|
300
|
-
export declare const computeStirlingColumn: (count: number, parts: number) => number;
|
|
301
|
-
export declare const computeStirlingDiagonal: (count: number, index: number) => number;
|
|
302
289
|
export declare const computeStirlingLogGamma: (value: number) => number;
|
|
303
|
-
export declare const computeStirlingSecondKind: (count: number, parts: number) => null | number;
|
|
304
290
|
export declare const computeSum: (values: readonly number[]) => number;
|
|
305
|
-
export declare const computeSummedZeta: (value: number) => number;
|
|
306
291
|
export declare const computeTruthyCount: (values: readonly number[]) => number;
|
|
307
292
|
export declare const computeVariance: (values: readonly number[]) => number;
|
|
308
293
|
export declare const computeVectorNorm: (values: readonly number[], power: number) => null | number;
|
|
309
|
-
export declare const computeZeta: (value: number) => number;
|
|
310
294
|
export declare const MATH_EXPRESSION_RELATIVE_TOLERANCE = 1e-12;
|
|
311
295
|
export declare const MATH_EXPRESSION_ABSOLUTE_TOLERANCE = 1e-15;
|
|
312
296
|
export declare const SQRT_PI: number;
|
|
313
|
-
export declare const BERNOULLI_CLOSED_FORM_INDEX = 54;
|
|
314
297
|
export declare const MAXIMUM_DIGITS = 15;
|
|
315
|
-
export declare const MAXIMUM_STIRLING_WORK = 4e6;
|
|
316
298
|
export declare const MILLER_RABIN_BASES: readonly bigint[];
|
|
317
|
-
export declare const REFINEMENT_STEPS = 4;
|
|
318
|
-
export declare const LOW_TAIL_COEFFICIENTS: readonly number[];
|
|
319
|
-
export declare const HIGH_TAIL_COEFFICIENTS: readonly number[];
|
|
320
299
|
export declare const OVERFLOW_ARGUMENT = 171.35;
|
|
321
300
|
export declare const LAST_FACTORIAL_ARGUMENT = 171;
|
|
322
301
|
export declare const STIRLING_THRESHOLD = 15;
|
|
323
302
|
export declare const STIRLING_TERMS: readonly number[];
|
|
324
|
-
export declare const EULER_MACLAURIN_COEFFICIENTS: readonly number[];
|
|
325
|
-
export declare const SUMMATION_LIMIT = 10;
|
|
326
303
|
export declare const MathExpressionFunctionMap: Record<string, MathExpressionSignature[]>;
|
|
327
304
|
export declare const multiplyPair: (left: MathExpressionValue, right: MathExpressionValue) => MathExpressionValue | null;
|
|
328
305
|
export declare const roundToDigits: (rounder: (value: number) => number, value: number, digits: number) => null | number;
|
|
@@ -353,11 +330,10 @@ export declare const createVariadicSignatures: (minArity: number, compute: MathE
|
|
|
353
330
|
export declare const getMathExpressionNames: (node: MathExpressionNode) => string[];
|
|
354
331
|
export declare const walkNode: (node: MathExpressionNode, bound: Set<string>, free: Set<string>) => void;
|
|
355
332
|
export declare const checkCanMathExpressionNest: (state: MathExpressionParserState) => boolean;
|
|
333
|
+
export declare const checkIsFactorStart: (state: MathExpressionParserState, last: MathExpressionNode) => boolean;
|
|
356
334
|
export declare const checkIsNameToken: (state: MathExpressionParserState) => boolean;
|
|
357
335
|
export declare const checkIsOperatorOperand: (node: MathExpressionNode) => boolean;
|
|
358
|
-
export declare const checkIsSignedNumber: (node: MathExpressionNode) => boolean;
|
|
359
336
|
export declare const checkIsToken: (state: MathExpressionParserState, token: string) => boolean;
|
|
360
|
-
export declare const checkIsUnaryStart: (state: MathExpressionParserState) => boolean;
|
|
361
337
|
export declare const computeNumberLiteral: (token: string) => null | number;
|
|
362
338
|
export declare const MAX_MATH_EXPRESSION_DEPTH = 64;
|
|
363
339
|
export declare const PLACEHOLDER: MathExpressionNode;
|
|
@@ -373,7 +349,6 @@ export declare const getMathExpressionSignatureError: (name: string, signatures:
|
|
|
373
349
|
export declare const getMathExpressionToken: (state: MathExpressionParserState) => void;
|
|
374
350
|
export declare const MathExpressionBinaryOperatorMap: {
|
|
375
351
|
readonly "*": MathExpressionBinaryFunctionOperator;
|
|
376
|
-
readonly "/": MathExpressionBinaryFunctionOperator;
|
|
377
352
|
readonly [token: string]: MathExpressionBinaryOperator;
|
|
378
353
|
};
|
|
379
354
|
export declare const MathExpressionOperatorMap: {
|
|
@@ -392,8 +367,6 @@ export declare const parseSequence: (state: MathExpressionParserState, closing:
|
|
|
392
367
|
export declare const parseAssignment: MathExpressionRuleParser;
|
|
393
368
|
export declare const parseBinary: MathExpressionRuleParser;
|
|
394
369
|
export declare const parseConditional: MathExpressionRuleParser;
|
|
395
|
-
export declare const parseDivisionBeforeProduct: MathExpressionRuleParser;
|
|
396
|
-
export declare const parseImplicitProduct: MathExpressionRuleParser;
|
|
397
370
|
export declare const parseLeftHand: MathExpressionRuleParser;
|
|
398
371
|
export declare const parseNullish: MathExpressionRuleParser;
|
|
399
372
|
export declare const parsePercentage: MathExpressionRuleParser;
|
package/dist/index.js
CHANGED
|
@@ -36,8 +36,6 @@ let MathExpressionBinaryOperatorSymbol = /* @__PURE__ */ function(MathExpression
|
|
|
36
36
|
MathExpressionBinaryOperatorSymbol["GreaterThanOrEqual"] = ">=";
|
|
37
37
|
MathExpressionBinaryOperatorSymbol["LessThan"] = "<";
|
|
38
38
|
MathExpressionBinaryOperatorSymbol["LessThanOrEqual"] = "<=";
|
|
39
|
-
MathExpressionBinaryOperatorSymbol["Mod"] = "mod";
|
|
40
|
-
MathExpressionBinaryOperatorSymbol["Modulo"] = "%";
|
|
41
39
|
MathExpressionBinaryOperatorSymbol["Multiply"] = "*";
|
|
42
40
|
MathExpressionBinaryOperatorSymbol["NotEqual"] = "!=";
|
|
43
41
|
MathExpressionBinaryOperatorSymbol["Or"] = "or";
|
|
@@ -53,8 +51,6 @@ let MathExpressionGrammarRule = /* @__PURE__ */ function(MathExpressionGrammarRu
|
|
|
53
51
|
MathExpressionGrammarRule["Assignment"] = "Assignment";
|
|
54
52
|
MathExpressionGrammarRule["Binary"] = "Binary";
|
|
55
53
|
MathExpressionGrammarRule["Conditional"] = "Conditional";
|
|
56
|
-
MathExpressionGrammarRule["DivisionBeforeProduct"] = "DivisionBeforeProduct";
|
|
57
|
-
MathExpressionGrammarRule["ImplicitProduct"] = "ImplicitProduct";
|
|
58
54
|
MathExpressionGrammarRule["LeftHand"] = "LeftHand";
|
|
59
55
|
MathExpressionGrammarRule["Nullish"] = "Nullish";
|
|
60
56
|
MathExpressionGrammarRule["Percentage"] = "Percentage";
|
|
@@ -185,9 +181,7 @@ const compileAssignment = (node, context) => {
|
|
|
185
181
|
const MATH_EXPRESSION_RELATIVE_TOLERANCE = 1e-12;
|
|
186
182
|
const MATH_EXPRESSION_ABSOLUTE_TOLERANCE = 1e-15;
|
|
187
183
|
const SQRT_PI = Math.sqrt(Math.PI);
|
|
188
|
-
const BERNOULLI_CLOSED_FORM_INDEX = 54;
|
|
189
184
|
const MAXIMUM_DIGITS = 15;
|
|
190
|
-
const MAXIMUM_STIRLING_WORK = 4e6;
|
|
191
185
|
const MILLER_RABIN_BASES = [
|
|
192
186
|
2n,
|
|
193
187
|
3n,
|
|
@@ -202,27 +196,6 @@ const MILLER_RABIN_BASES = [
|
|
|
202
196
|
31n,
|
|
203
197
|
37n
|
|
204
198
|
];
|
|
205
|
-
const REFINEMENT_STEPS = 4;
|
|
206
|
-
const LOW_TAIL_COEFFICIENTS = [
|
|
207
|
-
3.43273939e-7,
|
|
208
|
-
-35233877e-13,
|
|
209
|
-
-439150654e-14,
|
|
210
|
-
.00021858087,
|
|
211
|
-
-.00125372503,
|
|
212
|
-
-.00417768164,
|
|
213
|
-
.246640727,
|
|
214
|
-
1.50140941
|
|
215
|
-
];
|
|
216
|
-
const HIGH_TAIL_COEFFICIENTS = [
|
|
217
|
-
.000100950558,
|
|
218
|
-
.00134934322,
|
|
219
|
-
-.00367342844,
|
|
220
|
-
.00573950773,
|
|
221
|
-
-.0076224613,
|
|
222
|
-
.00943887047,
|
|
223
|
-
1.00167406,
|
|
224
|
-
2.83297682
|
|
225
|
-
];
|
|
226
199
|
const OVERFLOW_ARGUMENT = 171.35;
|
|
227
200
|
const LAST_FACTORIAL_ARGUMENT = 171;
|
|
228
201
|
const STIRLING_THRESHOLD = 15;
|
|
@@ -235,17 +208,6 @@ const STIRLING_TERMS = [
|
|
|
235
208
|
-691 / 360360,
|
|
236
209
|
1 / 156
|
|
237
210
|
];
|
|
238
|
-
const EULER_MACLAURIN_COEFFICIENTS = [
|
|
239
|
-
1 / 12,
|
|
240
|
-
-1 / 720,
|
|
241
|
-
1 / 30240,
|
|
242
|
-
-1 / 1209600,
|
|
243
|
-
1 / 47900160,
|
|
244
|
-
-691 / 1307674368e3,
|
|
245
|
-
1 / 74724249600,
|
|
246
|
-
-3617 / 0x25e8dffc150000
|
|
247
|
-
];
|
|
248
|
-
const SUMMATION_LIMIT = 10;
|
|
249
211
|
// src/services/function/checkIsNearlyEqual.ts
|
|
250
212
|
const checkIsNearlyEqual = (left, right) => {
|
|
251
213
|
if (Number.isNaN(left) || Number.isNaN(right)) return false;
|
|
@@ -297,39 +259,6 @@ const checkIsPrime = (value) => {
|
|
|
297
259
|
};
|
|
298
260
|
// src/services/function/checkIsSmaller.ts
|
|
299
261
|
const checkIsSmaller = (left, right) => left < right && !checkIsNearlyEqual(left, right);
|
|
300
|
-
// src/services/function/computeBellNumber.ts
|
|
301
|
-
const computeBellNumber = (index) => {
|
|
302
|
-
if (!Number.isInteger(index) || index < 0) return null;
|
|
303
|
-
let row = [1];
|
|
304
|
-
for (let step = 1; step <= index; step++) {
|
|
305
|
-
const next = [row.at(-1) ?? 0];
|
|
306
|
-
for (const above of row) next.push((next.at(-1) ?? 0) + above);
|
|
307
|
-
if (next[0] === Number.POSITIVE_INFINITY) return Number.POSITIVE_INFINITY;
|
|
308
|
-
row = next;
|
|
309
|
-
}
|
|
310
|
-
return row[0] ?? NaN;
|
|
311
|
-
};
|
|
312
|
-
// src/services/function/computeBernoulliNumber.ts
|
|
313
|
-
const computeBernoulliNumber = (index) => {
|
|
314
|
-
if (index === 1) return -.5;
|
|
315
|
-
if (index > 1 && index % 2 === 1) return 0;
|
|
316
|
-
if (index >= 54) {
|
|
317
|
-
let product = 1;
|
|
318
|
-
for (let factor = 1; factor <= index && Number.isFinite(product); factor++) product *= factor / (2 * Math.PI);
|
|
319
|
-
return index / 2 % 2 === 1 ? 2 * product : -2 * product;
|
|
320
|
-
}
|
|
321
|
-
const numbers = [1];
|
|
322
|
-
for (let current = 1; current <= index; current++) {
|
|
323
|
-
let sum = 0;
|
|
324
|
-
let binomial = 1;
|
|
325
|
-
for (let previous = 0; previous < current; previous++) {
|
|
326
|
-
sum += binomial * (numbers[previous] ?? 0);
|
|
327
|
-
binomial = binomial * (current + 1 - previous) / (previous + 1);
|
|
328
|
-
}
|
|
329
|
-
numbers.push(-sum / (current + 1));
|
|
330
|
-
}
|
|
331
|
-
return numbers[index] ?? NaN;
|
|
332
|
-
};
|
|
333
262
|
// src/services/function/computeBitwiseAnd.ts
|
|
334
263
|
const computeBitwiseAnd = (left, right) => left & right;
|
|
335
264
|
// src/services/function/computeBitwiseOr.ts
|
|
@@ -344,11 +273,6 @@ const computeCombinations = (available, chosen) => {
|
|
|
344
273
|
}
|
|
345
274
|
return Math.round(result);
|
|
346
275
|
};
|
|
347
|
-
// src/services/function/computeCatalan.ts
|
|
348
|
-
const computeCatalan = (index) => {
|
|
349
|
-
if (!Number.isInteger(index) || index < 0) return null;
|
|
350
|
-
return Math.round(computeCombinations(2 * index, index) / (index + 1));
|
|
351
|
-
};
|
|
352
276
|
// src/services/function/computeComparison.ts
|
|
353
277
|
const computeComparison = (left, right) => {
|
|
354
278
|
if (checkIsNearlyEqual(left, right)) return 0;
|
|
@@ -431,30 +355,6 @@ const computeErf = (value) => {
|
|
|
431
355
|
for (let index = CONTINUED_FRACTION_DEPTH; index >= 1; index--) fraction = magnitude + index / 2 / fraction;
|
|
432
356
|
return sign * (1 - Math.exp(-magnitude * magnitude) / SQRT_PI / fraction);
|
|
433
357
|
};
|
|
434
|
-
// src/services/function/computePolynomial.ts
|
|
435
|
-
const computePolynomial = (leading, coefficients, variable) => {
|
|
436
|
-
let polynomial = leading;
|
|
437
|
-
for (const coefficient of coefficients) polynomial = coefficient + polynomial * variable;
|
|
438
|
-
return polynomial;
|
|
439
|
-
};
|
|
440
|
-
// src/services/function/computeInitialGuess.ts
|
|
441
|
-
const computeInitialGuess = (value) => {
|
|
442
|
-
const weight = -Math.log((1 - value) * (1 + value));
|
|
443
|
-
if (weight < 5) return computePolynomial(2.81022636e-8, LOW_TAIL_COEFFICIENTS, weight - 2.5) * value;
|
|
444
|
-
return computePolynomial(-.000200214257, HIGH_TAIL_COEFFICIENTS, Math.sqrt(weight) - 3) * value;
|
|
445
|
-
};
|
|
446
|
-
// src/services/function/computeErfInverse.ts
|
|
447
|
-
const computeErfInverse = (value) => {
|
|
448
|
-
if (Number.isNaN(value) || value < -1 || value > 1) return NaN;
|
|
449
|
-
if (value === 1) return Number.POSITIVE_INFINITY;
|
|
450
|
-
if (value === -1) return Number.NEGATIVE_INFINITY;
|
|
451
|
-
let estimate = computeInitialGuess(value);
|
|
452
|
-
for (let step = 0; step < 4; step++) {
|
|
453
|
-
const slope = 2 / SQRT_PI * Math.exp(-estimate * estimate);
|
|
454
|
-
estimate -= (computeErf(estimate) - value) / slope;
|
|
455
|
-
}
|
|
456
|
-
return estimate;
|
|
457
|
-
};
|
|
458
358
|
// src/services/function/computeStirlingLogGamma.ts
|
|
459
359
|
const computeStirlingLogGamma = (value) => {
|
|
460
360
|
const inverse = 1 / value;
|
|
@@ -563,14 +463,6 @@ const computeListComparison = (left, right) => {
|
|
|
563
463
|
};
|
|
564
464
|
// src/services/function/computeLogarithm.ts
|
|
565
465
|
const computeLogarithm = (value, base) => base === void 0 ? Math.log(value) : Math.log(value) / Math.log(base);
|
|
566
|
-
// src/services/function/computeLogGamma.ts
|
|
567
|
-
const computeLogGamma = (value) => {
|
|
568
|
-
if (Number.isNaN(value) || value < 0) return NaN;
|
|
569
|
-
if ([0, Number.POSITIVE_INFINITY].includes(value)) return Number.POSITIVE_INFINITY;
|
|
570
|
-
if ([1, 2].includes(value)) return 0;
|
|
571
|
-
const { logGamma, product } = computeLogGammaOfPositive(value);
|
|
572
|
-
return logGamma - Math.log(product);
|
|
573
|
-
};
|
|
574
466
|
// src/services/function/computeMean.ts
|
|
575
467
|
const computeMean = (values) => computeSum(values) / values.length;
|
|
576
468
|
// src/services/function/compareNumbers.ts
|
|
@@ -691,30 +583,6 @@ const computeQuantile = (values, probability, isSorted) => {
|
|
|
691
583
|
const fraction = index % 1;
|
|
692
584
|
return (ordered[integerPart] ?? NaN) * (1 - fraction) + (ordered[integerPart + 1] ?? NaN) * fraction;
|
|
693
585
|
};
|
|
694
|
-
// src/services/function/computeStirlingColumn.ts
|
|
695
|
-
const computeStirlingColumn = (count, parts) => {
|
|
696
|
-
const column = Array.from({ length: parts + 1 }, (_element, index) => index === 0 ? 1 : 0);
|
|
697
|
-
for (let step = 1; step <= count; step++) {
|
|
698
|
-
for (let part = parts; part >= 1; part--) column[part] = part * (column[part] ?? 0) + (column[part - 1] ?? 0);
|
|
699
|
-
column[0] = 0;
|
|
700
|
-
}
|
|
701
|
-
return column[parts] ?? 0;
|
|
702
|
-
};
|
|
703
|
-
// src/services/function/computeStirlingDiagonal.ts
|
|
704
|
-
const computeStirlingDiagonal = (count, index) => {
|
|
705
|
-
const diagonal = Array.from({ length: index + 1 }, (_element, position) => position === 0 ? 1 : 0);
|
|
706
|
-
for (let step = 1; step <= count; step++) for (let position = Math.min(step, index); position >= 1; position--) diagonal[position] = (step - position) * (diagonal[position - 1] ?? 0) + (diagonal[position] ?? 0);
|
|
707
|
-
return diagonal[index] ?? 0;
|
|
708
|
-
};
|
|
709
|
-
// src/services/function/computeStirlingSecondKind.ts
|
|
710
|
-
const computeStirlingSecondKind = (count, parts) => {
|
|
711
|
-
if (!Number.isInteger(count) || !Number.isInteger(parts) || count < 0 || parts < 0 || parts > count) return null;
|
|
712
|
-
if (parts === 0) return count === 0 ? 1 : 0;
|
|
713
|
-
if (parts === count) return 1;
|
|
714
|
-
const band = Math.min(parts, count - parts);
|
|
715
|
-
if (count * band > 4e6) return null;
|
|
716
|
-
return band === parts ? computeStirlingColumn(count, parts) : computeStirlingDiagonal(count, count - parts);
|
|
717
|
-
};
|
|
718
586
|
// src/services/shared/checkIsTruthy.ts
|
|
719
587
|
const checkIsTruthy = (value) => value !== 0 && !Number.isNaN(value);
|
|
720
588
|
// src/services/function/computeTruthyCount.ts
|
|
@@ -746,34 +614,6 @@ const computeVectorNorm = (values, power) => {
|
|
|
746
614
|
if (checkIsNearlyEqual(power, 0)) return Number.POSITIVE_INFINITY;
|
|
747
615
|
return computeSum(magnitudes.map((magnitude) => magnitude ** power)) ** (1 / power);
|
|
748
616
|
};
|
|
749
|
-
// src/services/function/computeSummedZeta.ts
|
|
750
|
-
const computeSummedZeta = (value) => {
|
|
751
|
-
let total = 0;
|
|
752
|
-
for (let integer = 1; integer < 10; integer++) total += integer ** -value;
|
|
753
|
-
total += 10 ** (1 - value) / (value - 1) + .5 * 10 ** -value;
|
|
754
|
-
let rising = value;
|
|
755
|
-
for (let index = 1; index <= EULER_MACLAURIN_COEFFICIENTS.length; index++) {
|
|
756
|
-
const coefficient = EULER_MACLAURIN_COEFFICIENTS[index - 1] ?? 0;
|
|
757
|
-
total += coefficient * rising * 10 ** (-value - 2 * index + 1);
|
|
758
|
-
rising *= (value + 2 * index - 1) * (value + 2 * index);
|
|
759
|
-
}
|
|
760
|
-
return total;
|
|
761
|
-
};
|
|
762
|
-
// src/services/function/computeZeta.ts
|
|
763
|
-
const computeZeta = (value) => {
|
|
764
|
-
if (value === Number.POSITIVE_INFINITY) return 1;
|
|
765
|
-
if (!Number.isFinite(value)) return NaN;
|
|
766
|
-
if (value === 1) return NaN;
|
|
767
|
-
if (value === 0) return -.5;
|
|
768
|
-
if (value > 0) return computeSummedZeta(value);
|
|
769
|
-
if (Number.isInteger(value) && value % 2 === 0) return 0;
|
|
770
|
-
if (1 - value >= 171.35) {
|
|
771
|
-
const sine = Math.sin(Math.PI * value / 2);
|
|
772
|
-
const logMagnitude = value * Math.LN2 + (value - 1) * Math.log(Math.PI) + Math.log(Math.abs(sine)) + computeLogGamma(1 - value) + Math.log(computeSummedZeta(1 - value));
|
|
773
|
-
return Math.sign(sine) * Math.exp(logMagnitude);
|
|
774
|
-
}
|
|
775
|
-
return 2 ** value * Math.PI ** (value - 1) * Math.sin(Math.PI * value / 2) * computeGamma(1 - value) * computeSummedZeta(1 - value);
|
|
776
|
-
};
|
|
777
617
|
// src/services/function/signature/createNumericCompute.ts
|
|
778
618
|
const createNumericCompute = (compute) => (values) => compute(values.flat());
|
|
779
619
|
// src/services/function/signature/createSignature.ts
|
|
@@ -880,14 +720,11 @@ const MathExpressionFunctionMap = {
|
|
|
880
720
|
atan: createUnarySignatures(Math.atan),
|
|
881
721
|
atan2: createBinarySignatures((left, right) => Math.atan2(left, right)),
|
|
882
722
|
atanh: createUnarySignatures(Math.atanh),
|
|
883
|
-
bellNumbers: createUnarySignatures(computeBellNumber),
|
|
884
|
-
bernoulli: createUnarySignatures((value) => Number.isInteger(value) && value >= 0 ? computeBernoulliNumber(value) : null),
|
|
885
723
|
bitAnd: createVariadicSignatures(2, createBitwiseFold(0, computeBitwiseAnd), createBitwisePair(0, computeBitwiseAnd)),
|
|
886
724
|
bitNot: createIntegerUnarySignatures((value) => ~value),
|
|
887
725
|
bitOr: createVariadicSignatures(2, createBitwiseFold(-1, computeBitwiseOr), createBitwisePair(-1, computeBitwiseOr)),
|
|
888
726
|
bitXor: createIntegerBinarySignatures((left, right) => left ^ right),
|
|
889
727
|
boolean: createRangedSignatures(0, 1, (values) => values.length === 0 ? 0 : toNumber(checkIsTruthy(values[0] ?? 0))),
|
|
890
|
-
catalan: createUnarySignatures(computeCatalan),
|
|
891
728
|
cbrt: createUnarySignatures(Math.cbrt),
|
|
892
729
|
ceil: createDigitSignatures(Math.ceil),
|
|
893
730
|
clone: createUnarySignatures((value) => value),
|
|
@@ -923,7 +760,6 @@ const MathExpressionFunctionMap = {
|
|
|
923
760
|
equal: createBinarySignatures((left, right) => toNumber(checkIsNearlyEqual(left, right))),
|
|
924
761
|
equalScalar: createBinarySignatures((left, right) => toNumber(checkIsNearlyEqual(left, right))),
|
|
925
762
|
erf: createUnarySignatures(computeErf),
|
|
926
|
-
erfinv: createUnarySignatures(computeErfInverse),
|
|
927
763
|
exp: createUnarySignatures(Math.exp),
|
|
928
764
|
expm1: createUnarySignatures(Math.expm1),
|
|
929
765
|
fix: createDigitSignatures(Math.trunc),
|
|
@@ -950,7 +786,6 @@ const MathExpressionFunctionMap = {
|
|
|
950
786
|
return rest.reduce((total, value) => total === null ? null : computeLeastCommonMultiple(total, value), first);
|
|
951
787
|
}),
|
|
952
788
|
leftShift: createIntegerBinarySignatures((left, right) => left << right),
|
|
953
|
-
lgamma: createUnarySignatures(computeLogGamma),
|
|
954
789
|
log: createRangedSignatures(1, 2, (values) => computeLogarithm(values[0] ?? NaN, values[1])),
|
|
955
790
|
log1p: createRangedSignatures(1, 2, (values) => {
|
|
956
791
|
const [value = NaN, base] = values;
|
|
@@ -1013,7 +848,6 @@ const MathExpressionFunctionMap = {
|
|
|
1013
848
|
square: createUnarySignatures((value) => value * value),
|
|
1014
849
|
squeeze: createIdentitySignatures(),
|
|
1015
850
|
std: createSpreadSignatures(1, createNonEmptyCompute((values) => Math.sqrt(computeVariance(values)))),
|
|
1016
|
-
stirlingS2: createBinarySignatures(computeStirlingSecondKind),
|
|
1017
851
|
subtract: createBinarySignatures((left, right) => left - right),
|
|
1018
852
|
subtractScalar: createBinarySignatures((left, right) => left - right),
|
|
1019
853
|
sum: createSpreadSignatures(1, computeSum),
|
|
@@ -1023,8 +857,7 @@ const MathExpressionFunctionMap = {
|
|
|
1023
857
|
transpose: createIdentitySignatures(),
|
|
1024
858
|
unequal: createBinarySignatures((left, right) => toNumber(!checkIsNearlyEqual(left, right))),
|
|
1025
859
|
variance: createSpreadSignatures(1, createNonEmptyCompute(computeVariance)),
|
|
1026
|
-
xor: createVariadicSignatures(1, (values) => toNumber(computeTruthyCount(values) % 2 === 1), (left, right) => toNumber(checkIsTruthy(left) !== checkIsTruthy(right)))
|
|
1027
|
-
zeta: createUnarySignatures(computeZeta)
|
|
860
|
+
xor: createVariadicSignatures(1, (values) => toNumber(computeTruthyCount(values) % 2 === 1), (left, right) => toNumber(checkIsTruthy(left) !== checkIsTruthy(right)))
|
|
1028
861
|
};
|
|
1029
862
|
// src/services/shared/getOwnValue.ts
|
|
1030
863
|
const getOwnValue = (record, key) => Object.hasOwn(record, key) ? record[key] : void 0;
|
|
@@ -1410,36 +1243,21 @@ const checkCanMathExpressionNest = (state) => {
|
|
|
1410
1243
|
failMathExpression(state, `Formula nests deeper than 64 levels`);
|
|
1411
1244
|
return false;
|
|
1412
1245
|
};
|
|
1413
|
-
// src/services/parser/checkIsNameToken.ts
|
|
1414
|
-
const checkIsNameToken = (state) => state.tokenType === "symbol" || state.tokenType === "delimiter" && getMathExpressionSignatures(state.token) !== void 0;
|
|
1415
1246
|
// src/services/parser/checkIsOperatorOperand.ts
|
|
1416
1247
|
const checkIsOperatorOperand = (node) => {
|
|
1417
1248
|
if (node.type === "unary") return node.name !== "factorial";
|
|
1418
1249
|
return node.type === "binary" || node.type === "comparison" || node.type === "logical";
|
|
1419
1250
|
};
|
|
1420
|
-
// src/services/parser/checkIsSignedNumber.ts
|
|
1421
|
-
const checkIsSignedNumber = (node) => {
|
|
1422
|
-
if (node.type === "number") return true;
|
|
1423
|
-
return node.type === "unary" && (node.name === "unaryMinus" || node.name === "unaryPlus") && node.operand.type === "number";
|
|
1424
|
-
};
|
|
1425
1251
|
// src/services/parser/checkIsToken.ts
|
|
1426
1252
|
const checkIsToken = (state, token) => state.token === token;
|
|
1427
|
-
// src/services/parser/
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
"^": "pow"
|
|
1433
|
-
},
|
|
1434
|
-
["Unary"]: {
|
|
1435
|
-
"+": "unaryPlus",
|
|
1436
|
-
"-": "unaryMinus",
|
|
1437
|
-
not: "not",
|
|
1438
|
-
"~": "bitNot"
|
|
1439
|
-
}
|
|
1253
|
+
// src/services/parser/checkIsFactorStart.ts
|
|
1254
|
+
const checkIsFactorStart = (state, last) => {
|
|
1255
|
+
if (last.type === "percentage") return false;
|
|
1256
|
+
if (state.tokenType === "symbol" || checkIsToken(state, "(")) return true;
|
|
1257
|
+
return state.tokenType === "number" && last.type !== "number" && !checkIsOperatorOperand(last);
|
|
1440
1258
|
};
|
|
1441
|
-
// src/services/parser/
|
|
1442
|
-
const
|
|
1259
|
+
// src/services/parser/checkIsNameToken.ts
|
|
1260
|
+
const checkIsNameToken = (state) => state.tokenType === "symbol" || state.tokenType === "delimiter" && getMathExpressionSignatures(state.token) !== void 0;
|
|
1443
1261
|
// src/services/parser/token/MathExpressionRadixMap.ts
|
|
1444
1262
|
const MathExpressionRadixMap = {
|
|
1445
1263
|
["b"]: {
|
|
@@ -1534,6 +1352,7 @@ const DELIMITERS_OF_TWO = /* @__PURE__ */ new Set([
|
|
|
1534
1352
|
const DELIMITERS_OF_ONE = /* @__PURE__ */ new Set([
|
|
1535
1353
|
...SYMBOLIC_BINARY_SYMBOLS_OF_ONE,
|
|
1536
1354
|
"!",
|
|
1355
|
+
"%",
|
|
1537
1356
|
"'",
|
|
1538
1357
|
"(",
|
|
1539
1358
|
")",
|
|
@@ -1551,9 +1370,9 @@ const FIRST_CHARACTERS_OF_TWO = new Set(Array.from(DELIMITERS_OF_TWO, (delimiter
|
|
|
1551
1370
|
const NAMED_DELIMITERS = /* @__PURE__ */ new Set([
|
|
1552
1371
|
"in",
|
|
1553
1372
|
"and",
|
|
1554
|
-
"mod",
|
|
1555
1373
|
"or",
|
|
1556
1374
|
"xor",
|
|
1375
|
+
"mod",
|
|
1557
1376
|
"not",
|
|
1558
1377
|
"to"
|
|
1559
1378
|
]);
|
|
@@ -1771,16 +1590,6 @@ const MathExpressionBinaryOperatorMap = {
|
|
|
1771
1590
|
power: 7,
|
|
1772
1591
|
type: "comparison"
|
|
1773
1592
|
},
|
|
1774
|
-
["mod"]: {
|
|
1775
|
-
name: "mod",
|
|
1776
|
-
power: 10,
|
|
1777
|
-
type: "binary"
|
|
1778
|
-
},
|
|
1779
|
-
["%"]: {
|
|
1780
|
-
name: "mod",
|
|
1781
|
-
power: 10,
|
|
1782
|
-
type: "binary"
|
|
1783
|
-
},
|
|
1784
1593
|
["*"]: {
|
|
1785
1594
|
name: "multiply",
|
|
1786
1595
|
power: 10,
|
|
@@ -1822,6 +1631,20 @@ const MathExpressionBinaryOperatorMap = {
|
|
|
1822
1631
|
type: "binary"
|
|
1823
1632
|
}
|
|
1824
1633
|
};
|
|
1634
|
+
// src/services/parser/MathExpressionOperatorMap.ts
|
|
1635
|
+
const MathExpressionOperatorMap = {
|
|
1636
|
+
["Nullish"]: { "??": "nullish" },
|
|
1637
|
+
["Power"]: {
|
|
1638
|
+
".^": "dotPow",
|
|
1639
|
+
"^": "pow"
|
|
1640
|
+
},
|
|
1641
|
+
["Unary"]: {
|
|
1642
|
+
"+": "unaryPlus",
|
|
1643
|
+
"-": "unaryMinus",
|
|
1644
|
+
not: "not",
|
|
1645
|
+
"~": "bitNot"
|
|
1646
|
+
}
|
|
1647
|
+
};
|
|
1825
1648
|
// src/services/parser/rule/parseAssignment.ts
|
|
1826
1649
|
const parseAssignment = (state, parse) => {
|
|
1827
1650
|
if (!checkCanMathExpressionNest(state)) return PLACEHOLDER;
|
|
@@ -1842,13 +1665,15 @@ const parseAssignment = (state, parse) => {
|
|
|
1842
1665
|
};
|
|
1843
1666
|
// src/services/parser/parseBinaryOperators.ts
|
|
1844
1667
|
const parseBinaryOperators = (state, parse, minimumPower) => {
|
|
1845
|
-
let node = parse(state, "
|
|
1846
|
-
let
|
|
1847
|
-
while (state.error === null
|
|
1848
|
-
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1851
|
-
|
|
1668
|
+
let node = parse(state, "Percentage");
|
|
1669
|
+
let last = node;
|
|
1670
|
+
while (state.error === null) {
|
|
1671
|
+
const isImplicit = checkIsFactorStart(state, last);
|
|
1672
|
+
const operator = isImplicit ? MathExpressionBinaryOperatorMap["*"] : getOwnValue(MathExpressionBinaryOperatorMap, state.token);
|
|
1673
|
+
if (operator === void 0 || operator.power < minimumPower) break;
|
|
1674
|
+
if (!isImplicit) getMathExpressionToken(state);
|
|
1675
|
+
last = parseBinaryOperators(state, parse, operator.power + 1);
|
|
1676
|
+
node = createBinaryOperation(node, operator, last);
|
|
1852
1677
|
}
|
|
1853
1678
|
return node;
|
|
1854
1679
|
};
|
|
@@ -1877,33 +1702,6 @@ const parseConditional = (state, parse) => {
|
|
|
1877
1702
|
whenTrue
|
|
1878
1703
|
};
|
|
1879
1704
|
};
|
|
1880
|
-
// src/services/parser/rule/parseDivisionBeforeProduct.ts
|
|
1881
|
-
const parseDivisionBeforeProduct = (state, parse) => {
|
|
1882
|
-
const dividend = parse(state, "Percentage");
|
|
1883
|
-
if (state.error !== null || !checkIsToken(state, "/") || !checkIsSignedNumber(dividend)) return dividend;
|
|
1884
|
-
const snapshot = { ...state };
|
|
1885
|
-
getMathExpressionToken(state);
|
|
1886
|
-
const isNumber = state.tokenType === "number";
|
|
1887
|
-
if (isNumber) getMathExpressionToken(state);
|
|
1888
|
-
if (isNumber && state.error === null && (state.tokenType === "symbol" || checkIsToken(state, "("))) {
|
|
1889
|
-
Object.assign(state, snapshot);
|
|
1890
|
-
getMathExpressionToken(state);
|
|
1891
|
-
return createBinaryNode(dividend, MathExpressionBinaryOperatorMap["/"].name, parse(state, "Percentage"));
|
|
1892
|
-
}
|
|
1893
|
-
Object.assign(state, snapshot);
|
|
1894
|
-
return dividend;
|
|
1895
|
-
};
|
|
1896
|
-
// src/services/parser/rule/parseImplicitProduct.ts
|
|
1897
|
-
const parseImplicitProduct = (state, parse) => {
|
|
1898
|
-
let node = parse(state, "DivisionBeforeProduct");
|
|
1899
|
-
let last = node;
|
|
1900
|
-
while (state.error === null) {
|
|
1901
|
-
if (!(state.tokenType === "symbol" || checkIsToken(state, "(") || state.tokenType === "number" && last.type !== "number" && !checkIsOperatorOperand(last))) break;
|
|
1902
|
-
last = parse(state, "DivisionBeforeProduct");
|
|
1903
|
-
node = createBinaryNode(node, MathExpressionBinaryOperatorMap["*"].name, last);
|
|
1904
|
-
}
|
|
1905
|
-
return node;
|
|
1906
|
-
};
|
|
1907
1705
|
// src/services/parser/rule/parseLeftHand.ts
|
|
1908
1706
|
const parseLeftHand = (state, parse) => {
|
|
1909
1707
|
let node = parse(state, "Symbol");
|
|
@@ -1935,12 +1733,7 @@ const parseNullish = (state, parse) => {
|
|
|
1935
1733
|
const parsePercentage = (state, parse) => {
|
|
1936
1734
|
const node = parse(state, "Unary");
|
|
1937
1735
|
if (state.error !== null || !checkIsToken(state, "%")) return node;
|
|
1938
|
-
const snapshot = { ...state };
|
|
1939
1736
|
getMathExpressionToken(state);
|
|
1940
|
-
if (state.error === null && !checkIsToken(state, "+") && !checkIsToken(state, "-") && checkIsUnaryStart(state)) {
|
|
1941
|
-
Object.assign(state, snapshot);
|
|
1942
|
-
return node;
|
|
1943
|
-
}
|
|
1944
1737
|
return {
|
|
1945
1738
|
operand: node,
|
|
1946
1739
|
type: "percentage"
|
|
@@ -2065,8 +1858,6 @@ const MathExpressionRuleParserMap = {
|
|
|
2065
1858
|
["Assignment"]: parseAssignment,
|
|
2066
1859
|
["Binary"]: parseBinary,
|
|
2067
1860
|
["Conditional"]: parseConditional,
|
|
2068
|
-
["DivisionBeforeProduct"]: parseDivisionBeforeProduct,
|
|
2069
|
-
["ImplicitProduct"]: parseImplicitProduct,
|
|
2070
1861
|
["LeftHand"]: parseLeftHand,
|
|
2071
1862
|
["Nullish"]: parseNullish,
|
|
2072
1863
|
["Percentage"]: parsePercentage,
|
|
@@ -2092,4 +1883,4 @@ const parseMathExpression = (formula) => {
|
|
|
2092
1883
|
if (state.error === null && !checkIsToken(state, "")) failMathExpression(state, state.tokenType === "delimiter" ? `Unexpected operator ${state.token}` : `Unexpected part "${state.token}"`);
|
|
2093
1884
|
return state.error === null ? ok(node) : err(state.error);
|
|
2094
1885
|
};
|
|
2095
|
-
export { ADDITIVE_NAMES,
|
|
1886
|
+
export { ADDITIVE_NAMES, DECIMAL_MARK_OPERATOR_FOLLOWERS, DELIMITERS_OF_ONE, DELIMITERS_OF_THREE, DELIMITERS_OF_TWO, FIRST_CHARACTERS_OF_THREE, FIRST_CHARACTERS_OF_TWO, LAST_FACTORIAL_ARGUMENT, MATH_EXPRESSION_ABSOLUTE_TOLERANCE, MATH_EXPRESSION_RELATIVE_TOLERANCE, MAXIMUM_DIGITS, MAX_MATH_EXPRESSION_DEPTH, MILLER_RABIN_BASES, MathExpressionBinaryOperatorMap, MathExpressionBinaryOperatorSymbol, MathExpressionBitwiseAbsorption, MathExpressionBitwiseAbsorptionMap, MathExpressionConstantMap, MathExpressionError, MathExpressionFunctionMap, MathExpressionFunctionName, MathExpressionGrammarRule, MathExpressionLogicalOperator, MathExpressionNodeCompileMap, MathExpressionNodeType, MathExpressionOperatorMap, MathExpressionParameterType, MathExpressionRadix, MathExpressionRadixMap, MathExpressionRuleParserMap, MathExpressionTokenType, NAMED_DELIMITERS, NO_LOCALS, NO_VALUES, OVERFLOW_ARGUMENT, PLACEHOLDER, SQRT_PI, STIRLING_TERMS, STIRLING_THRESHOLD, WORD_CHARACTER_REGEX, WORD_START_REGEX, checkCanMathExpressionNest, checkIsDecimalMark, checkIsDigitCharacter, checkIsFactorStart, checkIsLarger, checkIsMatching, checkIsMatchingKind, checkIsMillerRabinPassing, checkIsNameToken, checkIsNearlyEqual, checkIsOperatorOperand, checkIsPercentageExpression, checkIsPrime, checkIsSmaller, checkIsToken, checkIsTruthy, checkIsWordCharacter, checkIsWordStartCharacter, collectMathExpressionAssignedNames, compareNumbers, compileArgument, compileAssignment, compileBinary, compileCall, compileComparison, compileConditional, compileGroup, compileList, compileListNode, compileLogical, compileMathExpression, compileMathExpressionNode, compileName, compileNumber, compilePercentage, compileUnary, computeBitwiseAnd, computeBitwiseOr, computeCombinations, computeComparison, computeCompositions, computeCorrelation, computeDeterminant, computeDistance, computeDotProduct, computeErf, computeExtreme, computeFactorial, computeGamma, computeGreatestCommonDivisor, computeHypotenuse, computeIntegerGreatestCommonDivisor, computeInverseCoth, computeKullbackLeibler, computeLeastCommonMultiple, computeListComparison, computeLogGammaOfPositive, computeLogarithm, computeMean, computeMedian, computeMedianAbsoluteDeviation, computeModularInverse, computeModularPower, computeModulo, computeMultinomial, computeNorm, computeNthRoot, computeNumberLiteral, computePartitionSelect, computePermutations, computePointToLine2D, computePointToLine3D, computeProduct, computeProductOfRange, computeQuantile, computeStirlingLogGamma, computeSum, computeTruthyCount, computeVariance, computeVectorNorm, createBinaryNode, createBinaryOperation, createBinarySignatures, createBitwiseFold, createBitwisePair, createDigitSignatures, createExtremeSignatures, createIdentitySignatures, createIntegerBinarySignatures, createIntegerUnarySignatures, createListFirstCompute, createListPairCompute, createListPairSignature, createListSignature, createLogicalNode, createNonEmptyCompute, createNumberSignature, createNumericCompute, createOrderedListSignatures, createRangedSignatures, createSignature, createSingletonListSignature, createSpreadSignatures, createUnarySignatures, createVariadicSignatures, failExponent, failMathExpression, failMathExpressionAt, getArgumentCountText, getMathExpressionArityMessage, getMathExpressionCharacter, getMathExpressionChildren, getMathExpressionColumn, getMathExpressionConstant, getMathExpressionNames, getMathExpressionOuterValue, getMathExpressionParameterType, getMathExpressionScalarCompute, getMathExpressionSignatureError, getMathExpressionSignatures, getMathExpressionToken, getOwnValue, getParameterType, matchMathExpressionSignature, multiplyPair, parseArgument, parseAssignment, parseBinary, parseBinaryOperators, parseCall, parseConditional, parseLeftHand, parseList, parseMathExpression, parseMathExpressionRule, parseNullish, parsePercentage, parsePower, parseSequence, parseSymbol, parseUnary, readMathExpressionDelimiter, readMathExpressionNumber, readMathExpressionWord, readRadixNumber, roundToDigits, scaleList, shiftDecimalPlaces, skipMathExpressionSpaces, takeExponent, takeMathExpressionMatching, toNumber, walkNode };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "math-expression-compiler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Math expressions compiled once into a function of plain numbers — mathjs's numeric language, checked against its recorded answers with every deliberate difference listed",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript"
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"typecheck": "tsrs --fast"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@esposter/shared": "4.
|
|
43
|
+
"@esposter/shared": "4.6.0",
|
|
44
44
|
"neverthrow": "^8.2.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@esposter/configuration": "4.
|
|
48
|
-
"@esposter/shared-node": "4.
|
|
49
|
-
"tsdown": "^0.23.
|
|
47
|
+
"@esposter/configuration": "4.6.0",
|
|
48
|
+
"@esposter/shared-node": "4.6.0",
|
|
49
|
+
"tsdown": "^0.23.7"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "0ceea3ffbe12ca69413ea5db2d3cfad197a63cba"
|
|
52
52
|
}
|