@cortex-js/compute-engine 0.12.6 → 0.13.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.
Files changed (90) hide show
  1. package/dist/compute-engine.esm.js +358 -73
  2. package/dist/compute-engine.js +358 -73
  3. package/dist/compute-engine.min.esm.js +358 -73
  4. package/dist/compute-engine.min.js +358 -73
  5. package/dist/math-json.esm.js +2 -2
  6. package/dist/math-json.js +2 -2
  7. package/dist/math-json.min.esm.js +2 -2
  8. package/dist/math-json.min.js +2 -2
  9. package/dist/types/common/grapheme-splitter.d.ts +1 -1
  10. package/dist/types/common/signals.d.ts +1 -1
  11. package/dist/types/common/utils.d.ts +1 -1
  12. package/dist/types/compute-engine/assume.d.ts +1 -1
  13. package/dist/types/compute-engine/boxed-expression/abstract-boxed-expression.d.ts +2 -1
  14. package/dist/types/compute-engine/boxed-expression/box.d.ts +1 -1
  15. package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +1 -1
  16. package/dist/types/compute-engine/boxed-expression/boxed-domain.d.ts +1 -1
  17. package/dist/types/compute-engine/boxed-expression/boxed-function-definition.d.ts +1 -1
  18. package/dist/types/compute-engine/boxed-expression/boxed-function.d.ts +1 -1
  19. package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +1 -1
  20. package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +1 -1
  21. package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +1 -1
  22. package/dist/types/compute-engine/boxed-expression/boxed-symbol-definition.d.ts +1 -1
  23. package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +1 -1
  24. package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +1 -1
  25. package/dist/types/compute-engine/boxed-expression/order.d.ts +1 -1
  26. package/dist/types/compute-engine/boxed-expression/serialize.d.ts +1 -1
  27. package/dist/types/compute-engine/boxed-expression/utils.d.ts +1 -1
  28. package/dist/types/compute-engine/boxed-expression/validate.d.ts +1 -1
  29. package/dist/types/compute-engine/compile.d.ts +3 -0
  30. package/dist/types/compute-engine/compute-engine.d.ts +4 -2
  31. package/dist/types/compute-engine/cost-function.d.ts +1 -1
  32. package/dist/types/compute-engine/domain-utils.d.ts +1 -1
  33. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-algebra.d.ts +1 -1
  34. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-arithmetic.d.ts +1 -1
  35. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-calculus.d.ts +1 -1
  36. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-core.d.ts +1 -1
  37. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-inequalities.d.ts +1 -1
  38. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-logic.d.ts +1 -1
  39. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-other.d.ts +1 -1
  40. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-sets.d.ts +1 -1
  41. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-symbols.d.ts +1 -1
  42. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-trigonometry.d.ts +1 -1
  43. package/dist/types/compute-engine/latex-syntax/dictionary/definitions.d.ts +3 -3
  44. package/dist/types/compute-engine/latex-syntax/latex-syntax.d.ts +4 -1
  45. package/dist/types/compute-engine/latex-syntax/parse-identifier.d.ts +1 -1
  46. package/dist/types/compute-engine/latex-syntax/parse.d.ts +1 -1
  47. package/dist/types/compute-engine/latex-syntax/public.d.ts +1 -1
  48. package/dist/types/compute-engine/latex-syntax/serialize-number.d.ts +1 -1
  49. package/dist/types/compute-engine/latex-syntax/serializer-style.d.ts +1 -1
  50. package/dist/types/compute-engine/latex-syntax/serializer.d.ts +1 -1
  51. package/dist/types/compute-engine/latex-syntax/tokenizer.d.ts +1 -1
  52. package/dist/types/compute-engine/library/arithmetic-add.d.ts +2 -2
  53. package/dist/types/compute-engine/library/arithmetic-divide.d.ts +1 -1
  54. package/dist/types/compute-engine/library/arithmetic-multiply.d.ts +1 -1
  55. package/dist/types/compute-engine/library/arithmetic-power.d.ts +1 -1
  56. package/dist/types/compute-engine/library/arithmetic.d.ts +1 -1
  57. package/dist/types/compute-engine/library/calculus.d.ts +1 -1
  58. package/dist/types/compute-engine/library/collections.d.ts +1 -1
  59. package/dist/types/compute-engine/library/core.d.ts +1 -1
  60. package/dist/types/compute-engine/library/domains.d.ts +1 -1
  61. package/dist/types/compute-engine/library/library.d.ts +1 -1
  62. package/dist/types/compute-engine/library/logic.d.ts +1 -1
  63. package/dist/types/compute-engine/library/polynomials.d.ts +1 -1
  64. package/dist/types/compute-engine/library/random-expression.d.ts +1 -1
  65. package/dist/types/compute-engine/library/relational-operator.d.ts +1 -1
  66. package/dist/types/compute-engine/library/sets.d.ts +1 -1
  67. package/dist/types/compute-engine/library/trigonometry.d.ts +1 -1
  68. package/dist/types/compute-engine/library/utils.d.ts +1 -1
  69. package/dist/types/compute-engine/numerics/numeric-bigint.d.ts +1 -1
  70. package/dist/types/compute-engine/numerics/numeric-bignum.d.ts +1 -1
  71. package/dist/types/compute-engine/numerics/numeric-complex.d.ts +1 -1
  72. package/dist/types/compute-engine/numerics/numeric.d.ts +1 -1
  73. package/dist/types/compute-engine/numerics/primes.d.ts +1 -1
  74. package/dist/types/compute-engine/numerics/rationals.d.ts +1 -1
  75. package/dist/types/compute-engine/public.d.ts +3 -2
  76. package/dist/types/compute-engine/rules.d.ts +1 -1
  77. package/dist/types/compute-engine/simplify-rules.d.ts +1 -1
  78. package/dist/types/compute-engine/solve.d.ts +1 -1
  79. package/dist/types/compute-engine/symbolic/expand.d.ts +1 -1
  80. package/dist/types/compute-engine/symbolic/flatten.d.ts +1 -1
  81. package/dist/types/compute-engine/symbolic/negate.d.ts +1 -1
  82. package/dist/types/compute-engine/symbolic/polynomials.d.ts +1 -1
  83. package/dist/types/compute-engine/symbolic/product.d.ts +1 -1
  84. package/dist/types/compute-engine/symbolic/sum.d.ts +1 -1
  85. package/dist/types/compute-engine/symbolic/utils.d.ts +1 -1
  86. package/dist/types/compute-engine.d.ts +2 -2
  87. package/dist/types/math-json/math-json-format.d.ts +1 -1
  88. package/dist/types/math-json/utils.d.ts +3 -1
  89. package/dist/types/math-json.d.ts +2 -2
  90. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /** CortexJS Compute Engine 0.12.6 */
1
+ /** CortexJS Compute Engine 0.13.0 */
2
2
 
3
3
  // src/math-json/utils.ts
4
4
  function isSymbolObject(expr) {
@@ -239,7 +239,7 @@ function mapArgs(expr, fn) {
239
239
  }
240
240
 
241
241
  // src/math-json.ts
242
- var version = "0.12.6";
242
+ var version = "0.13.0";
243
243
  export {
244
244
  applyRecursively,
245
245
  dictionary as getDictionary,
@@ -1,4 +1,4 @@
1
- /** CortexJS MathJSON 0.12.6 */
1
+ /** CortexJS MathJSON 0.13.0 */
2
2
  (function(global,factory){typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'],factory):(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.MathJson = {}));})(this, (function (exports) { 'use strict';
3
3
  var MathJson = (() => {
4
4
  var __defProp = Object.defineProperty;
@@ -277,7 +277,7 @@ var MathJson = (() => {
277
277
  }
278
278
 
279
279
  // src/math-json.ts
280
- var version = "0.12.6";
280
+ var version = "0.13.0";
281
281
  return __toCommonJS(math_json_exports);
282
282
  })();
283
283
  Object.assign(exports, MathJson); Object.defineProperty(exports, '__esModule', { value: true });}));
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * Return a string or an array of graphemes.
4
4
  *
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export type SignalCode = RuntimeSignalCode | ('invalid-name' | 'expected-predicate' | 'expected-symbol' | 'operator-requires-one-operand' | 'postfix-operator-requires-one-operand' | 'prefix-operator-requires-one-operand' | 'unbalanced-symbols' | 'expected-argument' | 'unexpected-command' | 'cyclic-definition' | 'invalid-supersets' | 'expected-supersets' | 'unknown-domain' | 'duplicate-wikidata' | 'invalid-dictionary-entry' | 'syntax-error');
3
3
  export type SignalMessage = SignalCode | [SignalCode, ...any[]];
4
4
  export type SignalOrigin = {
@@ -1 +1 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * Add an assumption, in the form of a predicate, for example:
4
4
  *
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Complex } from 'complex.js';
3
3
  import { Expression } from '../../math-json/math-json-format';
4
4
  import { BoxedExpression, BoxedFunctionDefinition, BoxedRuleSet, BoxedSymbolDefinition, BoxedDomain, EvaluateOptions, IComputeEngine, LatexString, Metadata, NOptions, PatternMatchOptions, SemiBoxedExpression, SimplifyOptions, Substitution, RuntimeScope, DomainCompatibility, DomainLiteral, BoxedBaseDefinition, Rational, BoxedSubstitution } from '../public';
@@ -118,4 +118,5 @@ export declare abstract class AbstractBoxedExpression implements BoxedExpression
118
118
  simplify(_options?: SimplifyOptions): BoxedExpression;
119
119
  evaluate(options?: EvaluateOptions): BoxedExpression;
120
120
  N(_options?: NOptions): BoxedExpression;
121
+ compile(): ((args: Record<string, number>) => number) | undefined;
121
122
  }
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Decimal } from 'decimal.js';
3
3
  import { IComputeEngine, SemiBoxedExpression, BoxedExpression, Metadata, Rational } from '../public';
4
4
  import { MathJsonNumber } from '../../math-json/math-json-format';
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { BoxedExpression, IComputeEngine, EvaluateOptions, NOptions, BoxedRuleSet, SemiBoxedExpression, SimplifyOptions, ReplaceOptions, Substitution, Metadata, PatternMatchOptions, BoxedDomain, BoxedSubstitution } from '../public';
3
3
  import { AbstractBoxedExpression } from './abstract-boxed-expression';
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { BoxedDomain, BoxedExpression, BoxedSubstitution, DomainCompatibility, DomainConstructor, DomainExpression, DomainLiteral, IComputeEngine, Metadata, PatternMatchOptions } from '../public';
3
3
  import { AbstractBoxedExpression } from './abstract-boxed-expression';
4
4
  /**
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function makeFunctionDefinition(engine: IComputeEngine, name: string, def: FunctionDefinition | BoxedFunctionDefinition): BoxedFunctionDefinition;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Expression } from '../../math-json/math-json-format';
3
3
  import { BoxedExpression, BoxedFunctionDefinition, IComputeEngine, NOptions, BoxedRuleSet, SemiBoxedExpression, SimplifyOptions, Substitution, ReplaceOptions, Metadata, PatternMatchOptions, BoxedDomain, RuntimeScope, BoxedSubstitution, EvaluateOptions } from '../public';
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Complex } from 'complex.js';
3
3
  import { Expression } from '../../math-json/math-json-format';
4
4
  import { BoxedExpression, BoxedDomain, IComputeEngine, Metadata, NOptions, PatternMatchOptions, Rational, SimplifyOptions, BoxedSubstitution } from '../public';
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { AbstractBoxedExpression } from './abstract-boxed-expression';
3
3
  import { BoxedExpression, BoxedSubstitution, BoxedDomain, IComputeEngine, LatexString, Metadata, Pattern, PatternMatchOptions, SemiBoxedExpression, Substitution } from '../public';
4
4
  export declare class BoxedPattern extends AbstractBoxedExpression implements Pattern {
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { AbstractBoxedExpression } from './abstract-boxed-expression';
3
3
  import { BoxedExpression, BoxedDomain, IComputeEngine, Metadata, PatternMatchOptions, BoxedSubstitution } from '../public';
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * THEORY OF OPERATIONS
4
4
  *
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { AbstractBoxedExpression } from './abstract-boxed-expression';
3
3
  import { BoxedExpression, BoxedRuleSet, BoxedSymbolDefinition, IComputeEngine, EvaluateOptions, NOptions, ReplaceOptions, SimplifyOptions, Substitution, Metadata, PatternMatchOptions, BoxedDomain, RuntimeScope, BoxedFunctionDefinition, BoxedBaseDefinition, DomainExpression, BoxedSubstitution } from '../public';
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare class ExpressionMap<U> implements ExpressionMapInterface<U> {
3
3
  readonly _items: Map<BoxedExpression, U>;
4
4
  constructor(source?: ExpressionMapInterface<U> | readonly (readonly [BoxedExpression, U])[]);
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export type Order = 'lex' | 'dexlex' | 'grevlex' | 'elim';
3
3
  export declare const DEFAULT_COMPLEXITY = 100000;
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import Decimal from 'decimal.js';
3
3
  import { Expression } from '../../math-json/math-json-format';
4
4
  import { BoxedExpression, IComputeEngine, Metadata, Rational } from '../public';
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Expression } from '../../math-json/math-json-format';
3
3
  import { BoxedExpression, IComputeEngine } from '../public';
4
4
  export declare function isLatexString(s: unknown): s is string;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function validateArgumentCount(ce: IComputeEngine, ops: BoxedExpression[], count: number): BoxedExpression[];
3
3
  /**
4
4
  * Validation of arguments is normally done by checking the signature of the
@@ -0,0 +1,3 @@
1
+ /* 0.13.0 */
2
+ export declare function compileToJavascript(expr: BoxedExpression): ((_: Record<string, number>) => number) | undefined;
3
+ export declare function compile(expr: BoxedExpression, freeVars?: string[], prec?: number): string;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Complex } from 'complex.js';
3
3
  import { Expression, MathJsonNumber } from '../math-json/math-json-format';
4
4
  import type { LibraryCategory, LatexDictionary, LatexDictionaryEntry, LatexString, NumberFormattingOptions, ParseLatexOptions, SerializeLatexOptions } from './latex-syntax/public';
@@ -157,6 +157,8 @@ export declare class ComputeEngine implements IComputeEngine {
157
157
  tolerance?: number;
158
158
  defaultDomain?: string;
159
159
  });
160
+ get latexDictionary(): readonly LatexDictionaryEntry[];
161
+ set latexDictionary(dic: readonly LatexDictionaryEntry[]);
160
162
  /** After the configuration of the engine has changed, clear the caches
161
163
  * so that new values can be recalculated.
162
164
  *
@@ -218,7 +220,7 @@ export declare class ComputeEngine implements IComputeEngine {
218
220
  chop(n: Decimal): Decimal | 0;
219
221
  chop(n: Complex): Complex | 0;
220
222
  bignum(a: Decimal.Value | bigint): Decimal;
221
- complex(a: number | Complex, b?: number): Complex;
223
+ complex(a: number | Decimal | Complex, b?: number | Decimal): Complex;
222
224
  isBignum(a: unknown): a is Decimal;
223
225
  isComplex(a: unknown): a is Complex;
224
226
  private get latexSyntax();
@@ -1,3 +1,3 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function costFunction(expr: BoxedExpression): number;
3
3
  export declare const DEFAULT_COST_FUNCTION: typeof costFunction;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Decimal } from 'decimal.js';
3
3
  import { BoxedExpression, Rational } from './public';
4
4
  /** Quickly determine the numeric domain of a number or constant
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_ALGEBRA: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_ARITHMETIC: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_CALCULUS: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_CORE: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_INEQUALITIES: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_LOGIC: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_OTHERS: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_SETS: LatexDictionary;
@@ -1,3 +1,3 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const SYMBOLS: [string, string, number][];
3
3
  export declare const DEFINITIONS_SYMBOLS: LatexDictionary;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DEFINITIONS_TRIGONOMETRY: LatexDictionary;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { WarningSignal } from '../../../common/signals';
3
3
  export type CommonEntry = {
4
4
  name?: string;
@@ -56,13 +56,13 @@ export type IndexedLatexDictionaryEntry = IndexedExpressionEntry | IndexedFuncti
56
56
  export type IndexedLatexDictionary = {
57
57
  lookahead: number;
58
58
  name: Map<string, IndexedLatexDictionaryEntry>;
59
- expression: Map<string, IndexedExpressionEntry[]>;
60
- function: Map<string, IndexedFunctionEntry[]>;
59
+ expression: (Map<LatexString, IndexedExpressionEntry[]> | null)[];
61
60
  symbol: (Map<LatexString, IndexedSymbolEntry[]> | null)[];
62
61
  prefix: (Map<LatexString, IndexedPrefixEntry[]> | null)[];
63
62
  infix: (Map<LatexString, IndexedInfixEntry[]> | null)[];
64
63
  postfix: (Map<LatexString, IndexedPostfixEntry[]> | null)[];
65
64
  matchfix: IndexedMatchfixEntry[];
65
+ function: Map<string, IndexedFunctionEntry[]>;
66
66
  environment: Map<string, EnvironmentEntry>;
67
67
  };
68
68
  export declare function indexLatexDictionary(dic: readonly Partial<LatexDictionaryEntry>[], onError: (sig: WarningSignal) => void): IndexedLatexDictionary;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Serializer } from './serializer';
3
3
  import { Expression } from '../../math-json/math-json-format';
4
4
  import { WarningSignalHandler } from '../../common/signals';
@@ -9,12 +9,15 @@ export declare class LatexSyntax {
9
9
  readonly options: NumberFormattingOptions & ParseLatexOptions & SerializeLatexOptions;
10
10
  readonly computeEngine: IComputeEngine;
11
11
  private _dictionary;
12
+ private _dictionaryInput;
12
13
  private _serializer?;
13
14
  constructor(options: Partial<NumberFormattingOptions> & Partial<ParseLatexOptions> & Partial<SerializeLatexOptions> & {
14
15
  computeEngine: IComputeEngine;
15
16
  dictionary?: readonly LatexDictionaryEntry[];
16
17
  onError?: WarningSignalHandler;
17
18
  });
19
+ get dictionary(): readonly LatexDictionaryEntry[];
20
+ set dictionary(val: readonly LatexDictionaryEntry[]);
18
21
  updateOptions(opt: Partial<NumberFormattingOptions> & Partial<ParseLatexOptions> & Partial<SerializeLatexOptions>): void;
19
22
  static getDictionary(category?: LibraryCategory | 'all'): Readonly<LatexDictionary>;
20
23
  parse(latex: LatexString): Expression;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Parser } from './public';
3
3
  /** For error handling, if we have a identifier prefix, assume
4
4
  * the identifier is invalid (it would have been captured by
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { IndexedLatexDictionary, IndexedInfixEntry, IndexedPostfixEntry, IndexedPrefixEntry, IndexedSymbolEntry, IndexedExpressionEntry } from './dictionary/definitions';
3
3
  import { IComputeEngine } from '../public';
4
4
  import { Expression } from '../../math-json/math-json-format';
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { Expression } from '../../math-json/math-json-format';
3
3
  import type { IComputeEngine } from '../public';
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { NumberFormattingOptions } from './public';
3
3
  export declare function serializeNumber(expr: Expression | null, options: NumberFormattingOptions): string;
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function getApplyFunctionStyle(_expr: Expression, _level: number): 'paren' | 'leftright' | 'big' | 'none';
3
3
  export declare function getGroupStyle(_expr: Expression, _level: number): 'paren' | 'leftright' | 'big' | 'none';
4
4
  export declare function getRootStyle(_expr: Expression | null, level: number): 'radical' | 'quotient' | 'solidus';
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { WarningSignalHandler } from '../../common/signals';
3
3
  import { NumberFormattingOptions, LatexString, SerializeLatexOptions } from './public';
4
4
  import { IndexedLatexDictionary, IndexedSymbolEntry, IndexedFunctionEntry } from './dictionary/definitions';
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  * ## Reference
3
3
  * TeX source code:
4
4
  * {@link http://tug.org/texlive/devsrc/Build/source/texk/web2c/tex.web | Tex.web}
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /** The canonical form of `Add`:
3
3
  * - removes `0`
4
4
  * - capture complex numbers (a + ib or ai +b)
@@ -9,4 +9,4 @@ export declare function simplifyAdd(ce: IComputeEngine, args: BoxedExpression[])
9
9
  export declare function evalAdd(ce: IComputeEngine, ops: BoxedExpression[], mode?: 'N' | 'evaluate'): BoxedExpression;
10
10
  export declare function canonicalSummation(ce: IComputeEngine, body: BoxedExpression, range: BoxedExpression | undefined): BoxedExpression;
11
11
  export declare function evalSummation(ce: IComputeEngine, expr: BoxedExpression, range: BoxedExpression, mode: 'simplify' | 'N' | 'evaluate'): BoxedExpression | undefined;
12
- export declare function normalizeLimits(range: BoxedExpression): [string, number, number, boolean];
12
+ export declare function normalizeLimits(range: BoxedExpression): [index: string, lower: number, upper: number, isFinite: boolean];
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * Canonical form of 'Divide' (and 'Rational')
4
4
  * - remove denominator of 1
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /** The canonical form of `Multiply`:
3
3
  * - remove `1`
4
4
  * - combine literal integers and rationals
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  *
4
4
  */
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const ARITHMETIC_LIBRARY: IdTable[];
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const CALCULUS_LIBRARY: IdTable[];
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const COLLECTIONS_LIBRARY: IdTable;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const CORE_LIBRARY: IdTable[];
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const DOMAIN_CONSTRUCTORS: string[];
3
3
  export declare const DOMAIN_ALIAS: {
4
4
  NumericFunction: (string | string[])[];
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import { IComputeEngine, IdTable } from '../public';
3
3
  export declare function getStandardLibrary(categories: LibraryCategory[] | LibraryCategory | 'all'): Readonly<IdTable>[];
4
4
  export declare const LIBRARIES: {
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const LOGIC_LIBRARY: IdTable;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const POLYNOMIALS_LIBRARY: IdTable[];
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function randomExpression(level?: number): Expression;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const RELOP_LIBRARY: IdTable;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const SETS_LIBRARY: IdTable;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const TRIGONOMETRY_LIBRARY: IdTable[];
@@ -1,3 +1,3 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function isSymbolDefinition(def: BoxedSymbolDefinition | BoxedFunctionDefinition | SymbolDefinition | FunctionDefinition | undefined | null): def is BoxedSymbolDefinition;
3
3
  export declare function isFunctionDefinition(def: BoxedSymbolDefinition | BoxedFunctionDefinition | SymbolDefinition | FunctionDefinition | undefined | null): def is BoxedFunctionDefinition;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function bigint(a: Decimal | number | bigint | string): bigint;
3
3
  export declare function gcd(a: bigint, b: bigint): bigint;
4
4
  export declare function lcm(a: bigint, b: bigint): bigint;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.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;
@@ -1,3 +1,3 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function gamma(c: Complex): Complex;
3
3
  export declare function lngamma(c: Complex): Complex;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  import Decimal from 'decimal.js';
3
3
  import { BoxedExpression } from '../public';
4
4
  export declare const MACHINE_PRECISION_BITS = 53;
@@ -1,2 +1,2 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function isPrime(n: number): boolean | undefined;
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function isRational(x: any | null): x is Rational;
3
3
  export declare function isMachineRational(x: any | null): x is [number, number];
4
4
  export declare function isBigRational(x: any | null): x is [bigint, bigint];
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  * The most important classes are {@link ComputeEngine} and
3
3
  * {@link BoxedExpression}.
4
4
  *
@@ -10,7 +10,7 @@
10
10
  import type { Decimal } from 'decimal.js';
11
11
  import type { Complex } from 'complex.js';
12
12
  import type { Expression, MathJsonDictionary, MathJsonFunction, MathJsonNumber, MathJsonString, MathJsonSymbol } from '../math-json/math-json-format';
13
- import type { NumberFormattingOptions, ParseLatexOptions, SerializeLatexOptions } from './latex-syntax/public';
13
+ import type { LatexDictionaryEntry, NumberFormattingOptions, ParseLatexOptions, SerializeLatexOptions } from './latex-syntax/public';
14
14
  export * from './latex-syntax/public';
15
15
  export type Rational = [number, number] | [bigint, bigint];
16
16
  /**
@@ -1521,6 +1521,7 @@ export interface ComputeEngineStats {
1521
1521
  }
1522
1522
  /** @internal */
1523
1523
  export interface IComputeEngine {
1524
+ latexDictionary: readonly LatexDictionaryEntry[];
1524
1525
  /** @internal */
1525
1526
  readonly _ZERO: BoxedExpression;
1526
1527
  /** @internal */
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * Go through all the rules in the rule set, and for all the rules that match
4
4
  * return the rhs of the rule applied to `expr`.
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * A set of simplification rules.
4
4
  *
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare const UNIVARIATE_ROOTS: Rule[];
3
3
  /**
4
4
  * Expression is a function of a single variable (`x`) or an Equality
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  export declare function distribute(expr: BoxedExpression[]): BoxedExpression;
3
3
  /** Use the multinomial theorem (https://en.wikipedia.org/wiki/Multinomial_theorem) to expand the expression.
4
4
  * The expression must be a power of a sum of terms.
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * Flatten the arguments.
4
4
  * If `expr` was canonical, the result it canonical.
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * Distribute `Negate` (multiply by -1) if expr is a number literal, an
4
4
  * addition or multiplication or another `Negate`.
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * Coefficient of a univariate (single variable) polynomial.
4
4
  *
@@ -1,4 +1,4 @@
1
- /* 0.12.6 */
1
+ /* 0.13.0 */
2
2
  /**
3
3
  * Group terms in a product by common term.
4
4
  *