@cortex-js/compute-engine 0.12.2 → 0.12.3
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/README.md +2 -2
- package/dist/compute-engine.esm.js +11 -12
- package/dist/compute-engine.min.esm.js +2 -2
- package/dist/compute-engine.min.js +2 -2
- package/dist/math-json.esm.js +2 -2
- package/dist/math-json.min.esm.js +2 -2
- package/dist/math-json.min.js +2 -2
- package/dist/types/common/grapheme-splitter.d.ts +1 -1
- package/dist/types/common/signals.d.ts +1 -1
- package/dist/types/common/utils.d.ts +1 -1
- package/dist/types/compute-engine/assume.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/abstract-boxed-expression.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/box.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-domain.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-function-definition.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-function.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-symbol-definition.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/order.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/serialize.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/utils.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/validate.d.ts +1 -1
- package/dist/types/compute-engine/compute-engine.d.ts +1 -1
- package/dist/types/compute-engine/cost-function.d.ts +1 -1
- package/dist/types/compute-engine/domain-utils.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-algebra.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-arithmetic.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-calculus.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-core.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-inequalities.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-logic.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-other.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-sets.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-symbols.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/latex-syntax.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/public.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serialize-number.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serializer-style.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serializer.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/tokenizer.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-add.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-divide.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-multiply.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-power.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic.d.ts +1 -1
- package/dist/types/compute-engine/library/calculus.d.ts +1 -1
- package/dist/types/compute-engine/library/collections.d.ts +1 -1
- package/dist/types/compute-engine/library/core.d.ts +1 -1
- package/dist/types/compute-engine/library/domains.d.ts +1 -1
- package/dist/types/compute-engine/library/library.d.ts +1 -1
- package/dist/types/compute-engine/library/logic.d.ts +1 -1
- package/dist/types/compute-engine/library/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/library/random-expression.d.ts +1 -1
- package/dist/types/compute-engine/library/relational-operator.d.ts +1 -1
- package/dist/types/compute-engine/library/sets.d.ts +1 -1
- package/dist/types/compute-engine/library/trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/library/utils.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-bigint.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-bignum.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-complex.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric.d.ts +1 -1
- package/dist/types/compute-engine/numerics/primes.d.ts +1 -1
- package/dist/types/compute-engine/numerics/rationals.d.ts +1 -1
- package/dist/types/compute-engine/public.d.ts +5 -2
- package/dist/types/compute-engine/rules.d.ts +1 -1
- package/dist/types/compute-engine/simplify-rules.d.ts +1 -1
- package/dist/types/compute-engine/solve.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/expand.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/flatten.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/negate.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/product.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/sum.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/utils.d.ts +1 -1
- package/dist/types/compute-engine.d.ts +2 -2
- package/dist/types/math-json/math-json-format.d.ts +1 -1
- package/dist/types/math-json/utils.d.ts +1 -1
- package/dist/types/math-json.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,8 +49,8 @@ console.log(evaluate(expr));
|
|
|
49
49
|
## Support the Project
|
|
50
50
|
|
|
51
51
|
- <span style='font-size:1.5em'>🌟</span> Star the GitHub repo (it really helps)
|
|
52
|
-
- <span style='font-size:1.5em'>💬</span>
|
|
53
|
-
[Gitter
|
|
52
|
+
- <span style='font-size:1.5em'>💬</span> Ask questions and give feedback on our
|
|
53
|
+
[Gitter Forum](https://cortexjs.io/gitter/)
|
|
54
54
|
- <span style='font-size:1.5em'>📨</span> Drop a line to arno@arno.org
|
|
55
55
|
|
|
56
56
|
## License
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS Compute Engine 0.12.
|
|
1
|
+
/** CortexJS Compute Engine 0.12.3 */
|
|
2
2
|
/** @internal */
|
|
3
3
|
function isSymbolEntry(entry) {
|
|
4
4
|
return !('kind' in entry) || entry.kind === 'symbol';
|
|
@@ -29,7 +29,7 @@ function isEnvironmentEntry(entry) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/*!
|
|
32
|
-
* decimal.js v10.4.
|
|
32
|
+
* decimal.js v10.4.3
|
|
33
33
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
34
34
|
* https://github.com/MikeMcl/decimal.js
|
|
35
35
|
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
@@ -7672,7 +7672,7 @@ const DEFINITIONS_ARITHMETIC = [
|
|
|
7672
7672
|
},
|
|
7673
7673
|
},
|
|
7674
7674
|
{
|
|
7675
|
-
trigger: ['\\
|
|
7675
|
+
trigger: ['\\degree'],
|
|
7676
7676
|
kind: 'postfix',
|
|
7677
7677
|
precedence: 880,
|
|
7678
7678
|
parse: (_parser, lhs) => ['Degrees', lhs],
|
|
@@ -8036,9 +8036,9 @@ const DEFINITIONS_ARITHMETIC = [
|
|
|
8036
8036
|
},
|
|
8037
8037
|
{
|
|
8038
8038
|
trigger: '\\prod',
|
|
8039
|
-
precedence:
|
|
8039
|
+
precedence: 390,
|
|
8040
8040
|
name: 'Product',
|
|
8041
|
-
parse: parseBigOp('Product'),
|
|
8041
|
+
parse: parseBigOp('Product', 390),
|
|
8042
8042
|
serialize: serializeBigOp('\\prod'),
|
|
8043
8043
|
},
|
|
8044
8044
|
// {
|
|
@@ -8072,9 +8072,9 @@ const DEFINITIONS_ARITHMETIC = [
|
|
|
8072
8072
|
},
|
|
8073
8073
|
{
|
|
8074
8074
|
trigger: '\\sum',
|
|
8075
|
-
precedence:
|
|
8075
|
+
precedence: 275,
|
|
8076
8076
|
name: 'Sum',
|
|
8077
|
-
parse: parseBigOp('Sum'),
|
|
8077
|
+
parse: parseBigOp('Sum', 275),
|
|
8078
8078
|
serialize: serializeBigOp('\\sum'),
|
|
8079
8079
|
},
|
|
8080
8080
|
{
|
|
@@ -8103,7 +8103,7 @@ const DEFINITIONS_ARITHMETIC = [
|
|
|
8103
8103
|
},
|
|
8104
8104
|
},
|
|
8105
8105
|
];
|
|
8106
|
-
function parseBigOp(name) {
|
|
8106
|
+
function parseBigOp(name, prec) {
|
|
8107
8107
|
return (parser) => {
|
|
8108
8108
|
// Look for sub and sup
|
|
8109
8109
|
parser.skipSpace();
|
|
@@ -8135,8 +8135,7 @@ function parseBigOp(name) {
|
|
|
8135
8135
|
// letter `i` should not be interpreted as a ImaginaryUnit
|
|
8136
8136
|
if (sym)
|
|
8137
8137
|
parser.computeEngine?.pushScope({ [sym]: { domain: 'Integer' } });
|
|
8138
|
-
|
|
8139
|
-
const fn = parser.matchExpression({ minPrec: 266 });
|
|
8138
|
+
const fn = parser.matchExpression({ minPrec: prec + 1 });
|
|
8140
8139
|
if (sym)
|
|
8141
8140
|
parser.computeEngine?.popScope();
|
|
8142
8141
|
if (!fn)
|
|
@@ -28349,10 +28348,10 @@ class ComputeEngine {
|
|
|
28349
28348
|
}
|
|
28350
28349
|
|
|
28351
28350
|
// This file is the root of the `compute-engine` package
|
|
28352
|
-
const version = '0.12.
|
|
28351
|
+
const version = '0.12.3';
|
|
28353
28352
|
globalThis[Symbol.for('io.cortexjs.compute-engine')] = {
|
|
28354
28353
|
ComputeEngine: ComputeEngine.prototype.constructor,
|
|
28355
|
-
version: '0.12.
|
|
28354
|
+
version: '0.12.3',
|
|
28356
28355
|
};
|
|
28357
28356
|
|
|
28358
28357
|
export { ComputeEngine, isEnvironmentEntry, isFunctionEntry, isInfixEntry, isMatchfixEntry, isPostfixEntry, isPrefixEntry, isSymbolEntry, version };
|