@cortex-js/compute-engine 0.6.0 → 0.7.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/compute-engine.esm.js +15779 -12531
- package/dist/compute-engine.min.esm.js +2 -2
- package/dist/compute-engine.min.js +2 -2
- package/dist/math-json.esm.js +62 -43
- 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/compute-engine/assume.d.ts +2 -2
- package/dist/types/compute-engine/boxed-expression/abstract-boxed-expression.d.ts +22 -10
- package/dist/types/compute-engine/boxed-expression/box.d.ts +2 -14
- package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +4 -4
- package/dist/types/compute-engine/boxed-expression/boxed-domain.d.ts +36 -19
- 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 +14 -13
- package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +3 -3
- package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +5 -5
- package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +3 -3
- package/dist/types/compute-engine/boxed-expression/boxed-symbol-definition.d.ts +9 -6
- package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +24 -10
- 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 +23 -6
- package/dist/types/compute-engine/compute-engine.d.ts +74 -50
- 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 -3
- 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 +8 -7
- package/dist/types/compute-engine/latex-syntax/latex-syntax.d.ts +3 -3
- package/dist/types/compute-engine/latex-syntax/parse.d.ts +87 -62
- package/dist/types/compute-engine/latex-syntax/public.d.ts +65 -46
- 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 +6 -4
- package/dist/types/compute-engine/latex-syntax/tokenizer.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-add.d.ts +11 -0
- package/dist/types/compute-engine/library/arithmetic-divide.d.ts +15 -0
- package/dist/types/compute-engine/library/arithmetic-multiply.d.ts +19 -0
- package/dist/types/compute-engine/{dictionary → library}/arithmetic-power.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic.d.ts +2 -0
- package/dist/types/compute-engine/library/calculus.d.ts +2 -0
- package/dist/types/compute-engine/library/collections.d.ts +2 -0
- package/dist/types/compute-engine/library/core.d.ts +2 -0
- package/dist/types/compute-engine/library/domains.d.ts +15 -0
- package/dist/types/compute-engine/library/library.d.ts +17 -0
- package/dist/types/compute-engine/library/logic.d.ts +2 -0
- package/dist/types/compute-engine/library/polynomials.d.ts +2 -0
- package/dist/types/compute-engine/library/relational-operator.d.ts +2 -0
- package/dist/types/compute-engine/library/sets.d.ts +2 -0
- package/dist/types/compute-engine/library/trigonometry.d.ts +2 -0
- package/dist/types/compute-engine/numerics/numeric-complex.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-decimal.d.ts +5 -1
- package/dist/types/compute-engine/numerics/numeric.d.ts +4 -2
- package/dist/types/compute-engine/numerics/primes.d.ts +1 -1
- package/dist/types/compute-engine/public.d.ts +237 -187
- 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/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 +2 -2
- 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 +27 -23
- package/dist/types/math-json/utils.d.ts +22 -16
- package/dist/types/math-json.d.ts +3 -3
- package/package.json +20 -20
- package/dist/types/compute-engine/dictionary/arithmetic-add.d.ts +0 -11
- package/dist/types/compute-engine/dictionary/arithmetic-divide.d.ts +0 -9
- package/dist/types/compute-engine/dictionary/arithmetic-multiply.d.ts +0 -17
- package/dist/types/compute-engine/dictionary/arithmetic.d.ts +0 -2
- package/dist/types/compute-engine/dictionary/collections.d.ts +0 -2
- package/dist/types/compute-engine/dictionary/core.d.ts +0 -2
- package/dist/types/compute-engine/dictionary/dictionary.d.ts +0 -26
- package/dist/types/compute-engine/dictionary/logic.d.ts +0 -2
- package/dist/types/compute-engine/dictionary/polynomials.d.ts +0 -2
- package/dist/types/compute-engine/dictionary/relational-operator.d.ts +0 -2
- package/dist/types/compute-engine/dictionary/sets.d.ts +0 -2
- package/dist/types/compute-engine/dictionary/trigonometry.d.ts +0 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* 0.7.0 */
|
|
2
|
+
import { IComputeEngine, SymbolTable } from '../public';
|
|
3
|
+
export declare function getStandardLibrary(categories: LibraryCategory[] | LibraryCategory | 'all'): Readonly<SymbolTable>[];
|
|
4
|
+
export declare const LIBRARIES: {
|
|
5
|
+
[category in LibraryCategory]?: Readonly<SymbolTable> | Readonly<SymbolTable>[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Set the symbol table of the current context (`engine.context`) to `table`
|
|
9
|
+
*
|
|
10
|
+
* `table` can be an array of symbol tables, in order to deal with circular
|
|
11
|
+
* dependencies: it is possible to partition a library into multiple
|
|
12
|
+
* symbol tables, to control the order in which they are processed and
|
|
13
|
+
* avoid having expressions in the definition of an entry reference a symbol
|
|
14
|
+
* or function name that has not yet been added to the symbol table.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare function setCurrentContextSymbolTable(engine: IComputeEngine, table: SymbolTable): void;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.7.0 */
|
|
2
2
|
import { IComputeEngine } from '../public';
|
|
3
3
|
export declare function gcd(a: Decimal, b: Decimal): Decimal;
|
|
4
4
|
export declare function lcm(a: Decimal, b: Decimal): Decimal;
|
|
5
|
+
export declare function reducedRational([a, b]: [Decimal, Decimal]): [
|
|
6
|
+
Decimal,
|
|
7
|
+
Decimal
|
|
8
|
+
];
|
|
5
9
|
export declare function factorial(ce: IComputeEngine, n: Decimal): Decimal;
|
|
6
10
|
export declare function lngamma(ce: IComputeEngine, z: Decimal): Decimal;
|
|
7
11
|
export declare function gamma(ce: IComputeEngine, z: Decimal): Decimal;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.7.0 */
|
|
2
2
|
export declare const MACHINE_PRECISION: number;
|
|
3
3
|
export declare const MACHINE_TOLERANCE_BITS = 7;
|
|
4
4
|
export declare const MACHINE_TOLERANCE: number;
|
|
5
5
|
export declare const NUMERIC_TOLERANCE: number;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const SMALL_INTEGER = 1000000;
|
|
7
|
+
export declare const MAX_ITERATION = 1000000;
|
|
8
|
+
export declare const MAX_SYMBOLIC_TERMS = 200;
|
|
7
9
|
/**
|
|
8
10
|
* Returns the smallest floating-point number greater than x.
|
|
9
11
|
* Denormalized values may not be supported.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.7.0 */
|
|
2
2
|
export declare function isPrime(n: number): boolean | undefined;
|