@cortex-js/compute-engine 0.50.1 → 0.51.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 (235) hide show
  1. package/dist/compute-engine.esm.js +6910 -389
  2. package/dist/compute-engine.min.esm.js +484 -67
  3. package/dist/compute-engine.min.umd.js +484 -67
  4. package/dist/compute-engine.umd.js +6910 -389
  5. package/dist/math-json.esm.js +2 -2
  6. package/dist/math-json.min.esm.js +2 -2
  7. package/dist/math-json.min.umd.js +2 -2
  8. package/dist/math-json.umd.js +2 -2
  9. package/dist/types/color/categorical.d.ts +9 -0
  10. package/dist/types/color/contrast.d.ts +16 -0
  11. package/dist/types/color/conversion.d.ts +13 -0
  12. package/dist/types/color/diverging-palettes.d.ts +15 -0
  13. package/dist/types/color/index.d.ts +4 -0
  14. package/dist/types/color/manipulation.d.ts +95 -0
  15. package/dist/types/color/palette.d.ts +38 -0
  16. package/dist/types/color/sequential.d.ts +21 -0
  17. package/dist/types/color/types.d.ts +19 -0
  18. package/dist/types/common/ansi-codes.d.ts +1 -1
  19. package/dist/types/common/configuration-change.d.ts +1 -1
  20. package/dist/types/common/fuzzy-string-match.d.ts +1 -1
  21. package/dist/types/common/grapheme-splitter.d.ts +1 -1
  22. package/dist/types/common/interruptible.d.ts +1 -1
  23. package/dist/types/common/one-of.d.ts +1 -1
  24. package/dist/types/common/signals.d.ts +1 -1
  25. package/dist/types/common/type/ast-nodes.d.ts +1 -1
  26. package/dist/types/common/type/boxed-type.d.ts +1 -1
  27. package/dist/types/common/type/lexer.d.ts +1 -1
  28. package/dist/types/common/type/parse.d.ts +1 -1
  29. package/dist/types/common/type/parser.d.ts +1 -1
  30. package/dist/types/common/type/primitive.d.ts +1 -1
  31. package/dist/types/common/type/reduce.d.ts +1 -1
  32. package/dist/types/common/type/serialize.d.ts +1 -1
  33. package/dist/types/common/type/subtype.d.ts +1 -1
  34. package/dist/types/common/type/type-builder.d.ts +1 -1
  35. package/dist/types/common/type/types.d.ts +1 -1
  36. package/dist/types/common/type/utils.d.ts +1 -1
  37. package/dist/types/common/utils.d.ts +1 -1
  38. package/dist/types/compute-engine/assume.d.ts +1 -1
  39. package/dist/types/compute-engine/boxed-expression/abstract-boxed-expression.d.ts +1 -1
  40. package/dist/types/compute-engine/boxed-expression/apply.d.ts +1 -1
  41. package/dist/types/compute-engine/boxed-expression/arithmetic-add.d.ts +1 -1
  42. package/dist/types/compute-engine/boxed-expression/arithmetic-mul-div.d.ts +1 -1
  43. package/dist/types/compute-engine/boxed-expression/arithmetic-power.d.ts +1 -1
  44. package/dist/types/compute-engine/boxed-expression/ascii-math.d.ts +1 -1
  45. package/dist/types/compute-engine/boxed-expression/box.d.ts +1 -1
  46. package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +1 -1
  47. package/dist/types/compute-engine/boxed-expression/boxed-function.d.ts +1 -1
  48. package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +1 -1
  49. package/dist/types/compute-engine/boxed-expression/boxed-operator-definition.d.ts +1 -1
  50. package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +1 -1
  51. package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +1 -1
  52. package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +1 -1
  53. package/dist/types/compute-engine/boxed-expression/boxed-tensor.d.ts +1 -1
  54. package/dist/types/compute-engine/boxed-expression/boxed-value-definition.d.ts +1 -1
  55. package/dist/types/compute-engine/boxed-expression/cache.d.ts +1 -1
  56. package/dist/types/compute-engine/boxed-expression/canonical-utils.d.ts +1 -1
  57. package/dist/types/compute-engine/boxed-expression/canonical.d.ts +1 -1
  58. package/dist/types/compute-engine/boxed-expression/compare.d.ts +1 -1
  59. package/dist/types/compute-engine/boxed-expression/constants.d.ts +1 -1
  60. package/dist/types/compute-engine/boxed-expression/expand.d.ts +1 -1
  61. package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +1 -1
  62. package/dist/types/compute-engine/boxed-expression/factor.d.ts +1 -1
  63. package/dist/types/compute-engine/boxed-expression/flatten.d.ts +1 -1
  64. package/dist/types/compute-engine/boxed-expression/hold.d.ts +1 -1
  65. package/dist/types/compute-engine/boxed-expression/inequality-bounds.d.ts +1 -1
  66. package/dist/types/compute-engine/boxed-expression/init-lazy-refs.d.ts +1 -1
  67. package/dist/types/compute-engine/boxed-expression/invisible-operator.d.ts +1 -1
  68. package/dist/types/compute-engine/boxed-expression/match.d.ts +1 -1
  69. package/dist/types/compute-engine/boxed-expression/negate.d.ts +1 -1
  70. package/dist/types/compute-engine/boxed-expression/numerics.d.ts +1 -1
  71. package/dist/types/compute-engine/boxed-expression/order.d.ts +1 -1
  72. package/dist/types/compute-engine/boxed-expression/pattern-utils.d.ts +1 -1
  73. package/dist/types/compute-engine/boxed-expression/polynomial-degree.d.ts +1 -1
  74. package/dist/types/compute-engine/boxed-expression/polynomials.d.ts +1 -1
  75. package/dist/types/compute-engine/boxed-expression/predicates.d.ts +1 -1
  76. package/dist/types/compute-engine/boxed-expression/product.d.ts +1 -1
  77. package/dist/types/compute-engine/boxed-expression/rules.d.ts +1 -1
  78. package/dist/types/compute-engine/boxed-expression/serialize.d.ts +1 -1
  79. package/dist/types/compute-engine/boxed-expression/sgn.d.ts +1 -1
  80. package/dist/types/compute-engine/boxed-expression/simplify.d.ts +1 -1
  81. package/dist/types/compute-engine/boxed-expression/solve-linear-system.d.ts +1 -1
  82. package/dist/types/compute-engine/boxed-expression/solve.d.ts +1 -1
  83. package/dist/types/compute-engine/boxed-expression/trigonometry.d.ts +1 -1
  84. package/dist/types/compute-engine/boxed-expression/type-guards.d.ts +1 -1
  85. package/dist/types/compute-engine/boxed-expression/utils.d.ts +1 -1
  86. package/dist/types/compute-engine/boxed-expression/validate.d.ts +1 -1
  87. package/dist/types/compute-engine/collection-utils.d.ts +1 -1
  88. package/dist/types/compute-engine/compilation/base-compiler.d.ts +12 -1
  89. package/dist/types/compute-engine/compilation/compile-expression.d.ts +1 -1
  90. package/dist/types/compute-engine/compilation/glsl-target.d.ts +1 -1
  91. package/dist/types/compute-engine/compilation/gpu-target.d.ts +40 -1
  92. package/dist/types/compute-engine/compilation/interval-glsl-target.d.ts +1 -1
  93. package/dist/types/compute-engine/compilation/interval-javascript-target.d.ts +1 -1
  94. package/dist/types/compute-engine/compilation/interval-wgsl-target.d.ts +1 -1
  95. package/dist/types/compute-engine/compilation/javascript-target.d.ts +283 -3
  96. package/dist/types/compute-engine/compilation/python-target.d.ts +1 -1
  97. package/dist/types/compute-engine/compilation/types.d.ts +11 -2
  98. package/dist/types/compute-engine/compilation/wgsl-target.d.ts +1 -1
  99. package/dist/types/compute-engine/cost-function.d.ts +1 -1
  100. package/dist/types/compute-engine/engine-assumptions.d.ts +1 -1
  101. package/dist/types/compute-engine/engine-cache.d.ts +1 -1
  102. package/dist/types/compute-engine/engine-common-symbols.d.ts +1 -1
  103. package/dist/types/compute-engine/engine-compilation-targets.d.ts +1 -1
  104. package/dist/types/compute-engine/engine-configuration-lifecycle.d.ts +1 -1
  105. package/dist/types/compute-engine/engine-declarations.d.ts +1 -1
  106. package/dist/types/compute-engine/engine-expression-entrypoints.d.ts +1 -1
  107. package/dist/types/compute-engine/engine-extension-contracts.d.ts +1 -1
  108. package/dist/types/compute-engine/engine-latex-dictionary-state.d.ts +1 -1
  109. package/dist/types/compute-engine/engine-library-bootstrap.d.ts +1 -1
  110. package/dist/types/compute-engine/engine-numeric-configuration.d.ts +1 -1
  111. package/dist/types/compute-engine/engine-parse-entrypoint.d.ts +1 -1
  112. package/dist/types/compute-engine/engine-runtime-state.d.ts +1 -1
  113. package/dist/types/compute-engine/engine-scope.d.ts +1 -1
  114. package/dist/types/compute-engine/engine-sequences.d.ts +1 -1
  115. package/dist/types/compute-engine/engine-simplification-rules.d.ts +1 -1
  116. package/dist/types/compute-engine/engine-startup-coordinator.d.ts +1 -1
  117. package/dist/types/compute-engine/engine-type-resolver.d.ts +1 -1
  118. package/dist/types/compute-engine/engine-validation-entrypoints.d.ts +1 -1
  119. package/dist/types/compute-engine/free-functions.d.ts +14 -9
  120. package/dist/types/compute-engine/function-utils.d.ts +1 -1
  121. package/dist/types/compute-engine/global-types.d.ts +1 -1
  122. package/dist/types/compute-engine/index.d.ts +2 -2
  123. package/dist/types/compute-engine/interval/arithmetic.d.ts +1 -1
  124. package/dist/types/compute-engine/interval/comparison.d.ts +1 -1
  125. package/dist/types/compute-engine/interval/elementary.d.ts +9 -1
  126. package/dist/types/compute-engine/interval/index.d.ts +1 -1
  127. package/dist/types/compute-engine/interval/trigonometric.d.ts +1 -1
  128. package/dist/types/compute-engine/interval/types.d.ts +1 -1
  129. package/dist/types/compute-engine/interval/util.d.ts +1 -1
  130. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-algebra.d.ts +1 -1
  131. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-arithmetic.d.ts +1 -1
  132. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-calculus.d.ts +1 -1
  133. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-complex.d.ts +1 -1
  134. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-core.d.ts +1 -1
  135. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-linear-algebra.d.ts +1 -1
  136. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-logic.d.ts +1 -1
  137. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-other.d.ts +1 -1
  138. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-relational-operators.d.ts +1 -1
  139. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-sets.d.ts +1 -1
  140. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-statistics.d.ts +1 -1
  141. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-symbols.d.ts +1 -1
  142. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-trigonometry.d.ts +1 -1
  143. package/dist/types/compute-engine/latex-syntax/dictionary/definitions-units.d.ts +23 -0
  144. package/dist/types/compute-engine/latex-syntax/dictionary/definitions.d.ts +1 -1
  145. package/dist/types/compute-engine/latex-syntax/dictionary/indexed-types.d.ts +1 -1
  146. package/dist/types/compute-engine/latex-syntax/parse-number.d.ts +1 -1
  147. package/dist/types/compute-engine/latex-syntax/parse-symbol.d.ts +1 -1
  148. package/dist/types/compute-engine/latex-syntax/parse.d.ts +1 -1
  149. package/dist/types/compute-engine/latex-syntax/serialize-number.d.ts +1 -1
  150. package/dist/types/compute-engine/latex-syntax/serializer-style.d.ts +1 -1
  151. package/dist/types/compute-engine/latex-syntax/serializer.d.ts +1 -1
  152. package/dist/types/compute-engine/latex-syntax/tokenizer.d.ts +1 -1
  153. package/dist/types/compute-engine/latex-syntax/types.d.ts +2 -2
  154. package/dist/types/compute-engine/latex-syntax/utils.d.ts +1 -1
  155. package/dist/types/compute-engine/library/arithmetic.d.ts +1 -1
  156. package/dist/types/compute-engine/library/calculus.d.ts +1 -1
  157. package/dist/types/compute-engine/library/collections.d.ts +1 -1
  158. package/dist/types/compute-engine/library/colors.d.ts +2 -0
  159. package/dist/types/compute-engine/library/combinatorics.d.ts +1 -1
  160. package/dist/types/compute-engine/library/complex.d.ts +1 -1
  161. package/dist/types/compute-engine/library/control-structures.d.ts +1 -1
  162. package/dist/types/compute-engine/library/core.d.ts +1 -1
  163. package/dist/types/compute-engine/library/library.d.ts +1 -1
  164. package/dist/types/compute-engine/library/linear-algebra.d.ts +1 -1
  165. package/dist/types/compute-engine/library/logic-analysis.d.ts +1 -1
  166. package/dist/types/compute-engine/library/logic.d.ts +1 -1
  167. package/dist/types/compute-engine/library/number-theory.d.ts +1 -1
  168. package/dist/types/compute-engine/library/polynomials.d.ts +1 -1
  169. package/dist/types/compute-engine/library/quantity-arithmetic.d.ts +37 -0
  170. package/dist/types/compute-engine/library/random-expression.d.ts +1 -1
  171. package/dist/types/compute-engine/library/relational-operator.d.ts +1 -1
  172. package/dist/types/compute-engine/library/sets.d.ts +1 -1
  173. package/dist/types/compute-engine/library/statistics.d.ts +1 -1
  174. package/dist/types/compute-engine/library/trigonometry.d.ts +1 -1
  175. package/dist/types/compute-engine/library/type-handlers.d.ts +1 -1
  176. package/dist/types/compute-engine/library/unit-data.d.ts +8 -0
  177. package/dist/types/compute-engine/library/units.d.ts +9 -0
  178. package/dist/types/compute-engine/library/utils.d.ts +1 -1
  179. package/dist/types/compute-engine/numeric-value/big-numeric-value.d.ts +1 -1
  180. package/dist/types/compute-engine/numeric-value/exact-numeric-value.d.ts +1 -1
  181. package/dist/types/compute-engine/numeric-value/machine-numeric-value.d.ts +1 -1
  182. package/dist/types/compute-engine/numeric-value/types.d.ts +1 -1
  183. package/dist/types/compute-engine/numerics/bigint.d.ts +1 -1
  184. package/dist/types/compute-engine/numerics/expression.d.ts +1 -1
  185. package/dist/types/compute-engine/numerics/interval.d.ts +1 -1
  186. package/dist/types/compute-engine/numerics/monte-carlo.d.ts +1 -1
  187. package/dist/types/compute-engine/numerics/numeric-bigint.d.ts +1 -1
  188. package/dist/types/compute-engine/numerics/numeric-bignum.d.ts +1 -1
  189. package/dist/types/compute-engine/numerics/numeric-complex.d.ts +1 -1
  190. package/dist/types/compute-engine/numerics/numeric.d.ts +1 -1
  191. package/dist/types/compute-engine/numerics/primes.d.ts +1 -1
  192. package/dist/types/compute-engine/numerics/rationals.d.ts +1 -1
  193. package/dist/types/compute-engine/numerics/richardson.d.ts +1 -1
  194. package/dist/types/compute-engine/numerics/special-functions.d.ts +1 -1
  195. package/dist/types/compute-engine/numerics/statistics.d.ts +1 -1
  196. package/dist/types/compute-engine/numerics/strings.d.ts +1 -1
  197. package/dist/types/compute-engine/numerics/types.d.ts +1 -1
  198. package/dist/types/compute-engine/numerics/unit-data.d.ts +128 -0
  199. package/dist/types/compute-engine/oeis.d.ts +1 -1
  200. package/dist/types/compute-engine/sequence.d.ts +1 -1
  201. package/dist/types/compute-engine/symbolic/antiderivative.d.ts +1 -1
  202. package/dist/types/compute-engine/symbolic/derivative.d.ts +1 -1
  203. package/dist/types/compute-engine/symbolic/distribute.d.ts +1 -1
  204. package/dist/types/compute-engine/symbolic/fu-cost.d.ts +1 -1
  205. package/dist/types/compute-engine/symbolic/fu-transforms.d.ts +1 -1
  206. package/dist/types/compute-engine/symbolic/fu.d.ts +1 -1
  207. package/dist/types/compute-engine/symbolic/logic-utils.d.ts +1 -1
  208. package/dist/types/compute-engine/symbolic/simplify-abs.d.ts +1 -1
  209. package/dist/types/compute-engine/symbolic/simplify-divide.d.ts +4 -2
  210. package/dist/types/compute-engine/symbolic/simplify-factorial.d.ts +33 -0
  211. package/dist/types/compute-engine/symbolic/simplify-hyperbolic.d.ts +1 -1
  212. package/dist/types/compute-engine/symbolic/simplify-infinity.d.ts +1 -1
  213. package/dist/types/compute-engine/symbolic/simplify-log.d.ts +1 -1
  214. package/dist/types/compute-engine/symbolic/simplify-logic.d.ts +1 -1
  215. package/dist/types/compute-engine/symbolic/simplify-power.d.ts +1 -1
  216. package/dist/types/compute-engine/symbolic/simplify-product.d.ts +1 -1
  217. package/dist/types/compute-engine/symbolic/simplify-rules.d.ts +1 -1
  218. package/dist/types/compute-engine/symbolic/simplify-sum.d.ts +1 -1
  219. package/dist/types/compute-engine/symbolic/simplify-trig.d.ts +1 -1
  220. package/dist/types/compute-engine/tensor/tensor-fields.d.ts +1 -1
  221. package/dist/types/compute-engine/tensor/tensors.d.ts +1 -1
  222. package/dist/types/compute-engine/types-definitions.d.ts +1 -1
  223. package/dist/types/compute-engine/types-engine.d.ts +1 -1
  224. package/dist/types/compute-engine/types-evaluation.d.ts +1 -1
  225. package/dist/types/compute-engine/types-expression.d.ts +1 -1
  226. package/dist/types/compute-engine/types-kernel-evaluation.d.ts +1 -1
  227. package/dist/types/compute-engine/types-kernel-serialization.d.ts +1 -1
  228. package/dist/types/compute-engine/types-serialization.d.ts +1 -1
  229. package/dist/types/compute-engine/types.d.ts +1 -1
  230. package/dist/types/compute-engine.d.ts +2 -2
  231. package/dist/types/math-json/symbols.d.ts +1 -1
  232. package/dist/types/math-json/types.d.ts +1 -1
  233. package/dist/types/math-json/utils.d.ts +1 -1
  234. package/dist/types/math-json.d.ts +2 -2
  235. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export declare class ExpressionMap<U> implements ExpressionMapInterface<U> {
3
3
  readonly _items: Map<Expression, U>;
4
4
  constructor(source?: ExpressionMapInterface<U> | readonly (readonly [Expression, U])[]);
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /** Combine rational expressions into a single fraction */
3
3
  export declare function together(op: Expression): Expression;
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /**
3
3
  *
4
4
  * Optionally make all the arguments canonical (default).
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /** Apply the function `f` to each operand of the expression `expr`,
3
3
  * account for the 'lazy' property of the operator definition:
4
4
  *
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /**
3
3
  * Get inequality bounds for a symbol from the assumption database.
4
4
  *
@@ -1 +1 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export declare function canonicalInvisibleOperator(ops: ReadonlyArray<Expression>, { engine: ce }: {
3
3
  engine: ComputeEngine;
4
4
  }): Expression | null;
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /**
3
3
  * The function attempts to match a subject expression to a
4
4
  * [pattern](/compute-engine/guides/patterns-and-rules/).
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export declare function canonicalNegate(expr: Expression): Expression;
3
3
  /**
4
4
  * Distribute `Negate` (multiply by -1) if expr is a number literal, an
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import { Decimal } from 'decimal.js';
3
3
  import type { Rational } from '../numerics/types';
4
4
  import type { Expression, ExpressionInput } from '../global-types';
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export type Order = 'lex' | 'dexlex' | 'grevlex' | 'elim';
3
3
  import { DEFAULT_COMPLEXITY } from './constants';
4
4
  export { DEFAULT_COMPLEXITY };
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  * Leaf module for wildcard pattern utility functions.
3
3
  *
4
4
  * These are extracted from boxed-patterns.ts to break circular dependencies:
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /**
3
3
  * The total degree of an expression is the sum of the
4
4
  * positive integer degrees of the factors in the expression:
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export { totalDegree, maxDegree, lex, revlex } from './polynomial-degree';
3
3
  /**
4
4
  * Coefficient of a univariate (single variable) polynomial.
@@ -1,2 +1,2 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export declare function isPrime(expr: Expression): boolean | undefined;
@@ -1 +1 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export declare const ConditionParent: {
3
3
  boolean: string;
4
4
  string: string;
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import type { IComputeEngine as ComputeEngine, Expression, JsonSerializationOptions } from '../global-types';
3
3
  import type { Product as _ProductClass } from './product';
4
4
  /** @internal */
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export declare function sgn(expr: Expression): Sign | undefined;
3
3
  /**
4
4
  * Sign `s` is > 0.
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  type InternalSimplifyOptions = SimplifyOptions & {
3
3
  useVariations: boolean;
4
4
  };
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /**
3
3
  * Solve a system of linear equations.
4
4
  *
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  export declare const UNIVARIATE_ROOTS: Rule[];
3
3
  /**
4
4
  * MathJsonExpression is a function of a single variable (`x`) or an Equality
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /** Assuming x in an expression in radians, convert to current angular unit. */
3
3
  export declare function radiansToAngle(x: Expression | undefined): Expression | undefined;
4
4
  export declare function evalTrig(name: string, op: Expression | undefined): Expression | undefined;
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /** Preferred guard for runtime expressions. */
3
3
  export declare function isExpression(x: unknown): x is Expression;
4
4
  export declare function isNumber(expr: Expression | null | undefined): expr is Expression & NumberLiteralInterface;
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import { Type } from '../../common/type/types';
3
3
  import { NumericValue } from '../numeric-value/types';
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import type { Expression, IComputeEngine as ComputeEngine } from '../global-types';
3
3
  /**
4
4
  * Check that the number of arguments is as expected.
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  /** If a collection has fewer than this many elements, eagerly evaluate it.
3
3
  *
4
4
  * For example, evaluate the Union of two sets with 10 elements each will
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import type { CompileTarget, TargetSource } from './types';
3
3
  /**
4
4
  * Base compiler class containing language-agnostic compilation logic
@@ -20,6 +20,17 @@ export declare class BaseCompiler {
20
20
  * Compile loop constructs (Sum/Product)
21
21
  */
22
22
  private static compileLoop;
23
+ /**
24
+ * Determine at compile time whether an expression produces a complex value.
25
+ *
26
+ * Rules:
27
+ * - Numbers: complex if im !== 0
28
+ * - Symbols: ImaginaryUnit is complex; others use expr.isReal
29
+ * (undefined is treated as real -- assume-real policy)
30
+ * - Functions: Abs, Arg, Re, Im always return real.
31
+ * All others: complex if any operand is complex.
32
+ */
33
+ static isComplexValued(expr: Expression): boolean;
23
34
  /**
24
35
  * Generate a temporary variable name
25
36
  */
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import type { Expression, JSSource } from '../global-types';
3
3
  import type { CompileTarget, CompilationResult } from './types';
4
4
  type CompileExpressionOptions = {
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import type { CompiledFunctions } from './types';
3
3
  import { GPUShaderTarget } from './gpu-target';
4
4
  /**
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import type { CompileTarget, CompiledOperators, CompiledFunctions, LanguageTarget, CompilationOptions, CompilationResult } from './types';
3
3
  /**
4
4
  * GPU shader operators shared by GLSL and WGSL.
@@ -13,8 +13,47 @@ export declare const GPU_OPERATORS: CompiledOperators;
13
13
  * Both languages share identical built-in math functions. Language-specific
14
14
  * functions (inversesqrt naming, mod, vector constructors) are provided
15
15
  * by subclass overrides.
16
+ *
17
+ * Complex numbers are represented as vec2(re, im). Functions that can
18
+ * operate on complex values check `BaseCompiler.isComplexValued()` and
19
+ * dispatch to `_gpu_c*` helper functions from the complex preamble.
16
20
  */
17
21
  export declare const GPU_FUNCTIONS: CompiledFunctions<Expression>;
22
+ /**
23
+ * Compile a Matrix expression to GPU-native types when possible.
24
+ *
25
+ * Handles two optimizations:
26
+ * - Column vectors (Nx1): flatten to vecN instead of nested single-element arrays
27
+ * - Square matrices (NxN, N=2,3,4): use native matN types with column-major transposition
28
+ *
29
+ * Falls back to compiling the nested List structure for other shapes.
30
+ */
31
+ export declare function compileGPUMatrix(args: ReadonlyArray<Expression>, compile: (expr: Expression) => string, vecFn: (n: number) => string, matFn: (n: number) => string, arrayFn: (n: number) => string): string;
32
+ /**
33
+ * GPU gamma function using Lanczos approximation (g=7, n=9 coefficients).
34
+ *
35
+ * Uses reflection formula for z < 0.5 and Lanczos for z >= 0.5.
36
+ * Valid for both GLSL and WGSL (uses standard math builtins).
37
+ */
38
+ export declare const GPU_GAMMA_PREAMBLE = "\nfloat _gpu_gamma(float z) {\n const float PI = 3.14159265358979;\n if (z < 0.5) {\n return PI / (sin(PI * z) * _gpu_gamma(1.0 - z));\n }\n z -= 1.0;\n float x = 0.99999999999980993;\n x += 676.5203681218851 / (z + 1.0);\n x += -1259.1392167224028 / (z + 2.0);\n x += 771.32342877765313 / (z + 3.0);\n x += -176.61502916214059 / (z + 4.0);\n x += 12.507343278686905 / (z + 5.0);\n x += -0.13857109526572012 / (z + 6.0);\n x += 9.9843695780195716e-6 / (z + 7.0);\n x += 1.5056327351493116e-7 / (z + 8.0);\n float t = z + 7.5;\n return sqrt(2.0 * PI) * pow(t, z + 0.5) * exp(-t) * x;\n}\n\nfloat _gpu_gammaln(float z) {\n // Stirling asymptotic expansion for ln(Gamma(z)), z > 0\n float z3 = z * z * z;\n return z * log(z) - z - 0.5 * log(z)\n + 0.5 * log(2.0 * 3.14159265358979)\n + 1.0 / (12.0 * z)\n - 1.0 / (360.0 * z3)\n + 1.0 / (1260.0 * z3 * z * z);\n}\n";
39
+ /**
40
+ * GPU error function using Abramowitz & Stegun approximation.
41
+ * Maximum error: |epsilon(x)| <= 1.5e-7.
42
+ */
43
+ export declare const GPU_ERF_PREAMBLE = "\nfloat _gpu_erf(float x) {\n float ax = abs(x);\n float t = 1.0 / (1.0 + 0.3275911 * ax);\n float y = ((((1.061405429 * t - 1.453152027) * t + 1.421413741) * t - 0.284496736) * t + 0.254829592) * t;\n float result = 1.0 - y * exp(-ax * ax);\n return x < 0.0 ? -result : result;\n}\n\nfloat _gpu_erfinv(float x) {\n float pi = 3.14159265358979;\n float x2 = x * x;\n float x3 = x * x2;\n float x5 = x3 * x2;\n float x7 = x5 * x2;\n float x9 = x7 * x2;\n return sqrt(pi) * 0.5 * (x + (pi / 12.0) * x3 + (7.0 * pi * pi / 480.0) * x5 + (127.0 * pi * pi * pi / 40320.0) * x7 + (4369.0 * pi * pi * pi * pi / 5806080.0) * x9);\n}\n";
44
+ /**
45
+ * GPU color space conversion preamble (GLSL syntax).
46
+ *
47
+ * Provides sRGB ↔ OKLab ↔ OKLCh conversions, color mixing in OKLCh
48
+ * with shorter-arc hue interpolation, and APCA contrast calculation.
49
+ *
50
+ * WGSL targets must adapt syntax (vec3f, atan2→atan2, etc.).
51
+ */
52
+ export declare const GPU_COLOR_PREAMBLE_GLSL = "\nfloat _gpu_srgb_to_linear(float c) {\n if (c <= 0.04045) return c / 12.92;\n return pow((c + 0.055) / 1.055, 2.4);\n}\n\nfloat _gpu_linear_to_srgb(float c) {\n if (c <= 0.0031308) return 12.92 * c;\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\n\nvec3 _gpu_srgb_to_oklab(vec3 rgb) {\n float r = _gpu_srgb_to_linear(rgb.x);\n float g = _gpu_srgb_to_linear(rgb.y);\n float b = _gpu_srgb_to_linear(rgb.z);\n float l_ = pow(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b, 1.0 / 3.0);\n float m_ = pow(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b, 1.0 / 3.0);\n float s_ = pow(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b, 1.0 / 3.0);\n return vec3(\n 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_,\n 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_,\n 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_\n );\n}\n\nvec3 _gpu_oklab_to_srgb(vec3 lab) {\n float l_ = lab.x + 0.3963377774 * lab.y + 0.2158037573 * lab.z;\n float m_ = lab.x - 0.1055613458 * lab.y - 0.0638541728 * lab.z;\n float s_ = lab.x - 0.0894841775 * lab.y - 1.291485548 * lab.z;\n float l = l_ * l_ * l_;\n float m = m_ * m_ * m_;\n float s = s_ * s_ * s_;\n float r = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;\n float g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;\n float b = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;\n return clamp(vec3(_gpu_linear_to_srgb(r), _gpu_linear_to_srgb(g), _gpu_linear_to_srgb(b)), 0.0, 1.0);\n}\n\nvec3 _gpu_oklab_to_oklch(vec3 lab) {\n float C = length(lab.yz);\n float H = atan(lab.z, lab.y);\n return vec3(lab.x, C, H);\n}\n\nvec3 _gpu_oklch_to_oklab(vec3 lch) {\n return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\nvec3 _gpu_color_mix(vec3 rgb1, vec3 rgb2, float t) {\n vec3 lch1 = _gpu_oklab_to_oklch(_gpu_srgb_to_oklab(rgb1));\n vec3 lch2 = _gpu_oklab_to_oklch(_gpu_srgb_to_oklab(rgb2));\n float L = mix(lch1.x, lch2.x, t);\n float C = mix(lch1.y, lch2.y, t);\n float dh = lch2.z - lch1.z;\n const float PI = 3.14159265359;\n if (dh > PI) dh -= 2.0 * PI;\n if (dh < -PI) dh += 2.0 * PI;\n float H = lch1.z + dh * t;\n return _gpu_oklab_to_srgb(_gpu_oklch_to_oklab(vec3(L, C, H)));\n}\n\nfloat _gpu_apca(vec3 bg, vec3 fg) {\n float bgR = _gpu_srgb_to_linear(bg.x);\n float bgG = _gpu_srgb_to_linear(bg.y);\n float bgB = _gpu_srgb_to_linear(bg.z);\n float fgR = _gpu_srgb_to_linear(fg.x);\n float fgG = _gpu_srgb_to_linear(fg.y);\n float fgB = _gpu_srgb_to_linear(fg.z);\n float bgY = 0.2126729 * bgR + 0.7151522 * bgG + 0.0721750 * bgB;\n float fgY = 0.2126729 * fgR + 0.7151522 * fgG + 0.0721750 * fgB;\n float bgC = pow(bgY, 0.56);\n float fgC = pow(fgY, 0.57);\n float contrast = (bgC > fgC)\n ? (bgC - fgC) * 1.14\n : (bgC - fgC) * 1.14;\n return contrast * 100.0;\n}\n";
53
+ /**
54
+ * GPU color space conversion preamble (WGSL syntax).
55
+ */
56
+ export declare const GPU_COLOR_PREAMBLE_WGSL = "\nfn _gpu_srgb_to_linear(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\n\nfn _gpu_linear_to_srgb(c: f32) -> f32 {\n if (c <= 0.0031308) { return 12.92 * c; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\n\nfn _gpu_srgb_to_oklab(rgb: vec3f) -> vec3f {\n let r = _gpu_srgb_to_linear(rgb.x);\n let g = _gpu_srgb_to_linear(rgb.y);\n let b = _gpu_srgb_to_linear(rgb.z);\n let l_ = pow(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b, 1.0 / 3.0);\n let m_ = pow(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b, 1.0 / 3.0);\n let s_ = pow(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b, 1.0 / 3.0);\n return vec3f(\n 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_,\n 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_,\n 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_\n );\n}\n\nfn _gpu_oklab_to_srgb(lab: vec3f) -> vec3f {\n let l_ = lab.x + 0.3963377774 * lab.y + 0.2158037573 * lab.z;\n let m_ = lab.x - 0.1055613458 * lab.y - 0.0638541728 * lab.z;\n let s_ = lab.x - 0.0894841775 * lab.y - 1.291485548 * lab.z;\n let l = l_ * l_ * l_;\n let m = m_ * m_ * m_;\n let s = s_ * s_ * s_;\n let r = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;\n let g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;\n let b = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;\n return clamp(vec3f(_gpu_linear_to_srgb(r), _gpu_linear_to_srgb(g), _gpu_linear_to_srgb(b)), vec3f(0.0), vec3f(1.0));\n}\n\nfn _gpu_oklab_to_oklch(lab: vec3f) -> vec3f {\n let C = length(lab.yz);\n let H = atan2(lab.z, lab.y);\n return vec3f(lab.x, C, H);\n}\n\nfn _gpu_oklch_to_oklab(lch: vec3f) -> vec3f {\n return vec3f(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\nfn _gpu_color_mix(rgb1: vec3f, rgb2: vec3f, t: f32) -> vec3f {\n let lch1 = _gpu_oklab_to_oklch(_gpu_srgb_to_oklab(rgb1));\n let lch2 = _gpu_oklab_to_oklch(_gpu_srgb_to_oklab(rgb2));\n let L = mix(lch1.x, lch2.x, t);\n let C = mix(lch1.y, lch2.y, t);\n let PI = 3.14159265359;\n var dh = lch2.z - lch1.z;\n if (dh > PI) { dh -= 2.0 * PI; }\n if (dh < -PI) { dh += 2.0 * PI; }\n let H = lch1.z + dh * t;\n return _gpu_oklab_to_srgb(_gpu_oklch_to_oklab(vec3f(L, C, H)));\n}\n\nfn _gpu_apca(bg: vec3f, fg: vec3f) -> f32 {\n let bgR = _gpu_srgb_to_linear(bg.x);\n let bgG = _gpu_srgb_to_linear(bg.y);\n let bgB = _gpu_srgb_to_linear(bg.z);\n let fgR = _gpu_srgb_to_linear(fg.x);\n let fgG = _gpu_srgb_to_linear(fg.y);\n let fgB = _gpu_srgb_to_linear(fg.z);\n let bgY = 0.2126729 * bgR + 0.7151522 * bgG + 0.0721750 * bgB;\n let fgY = 0.2126729 * fgR + 0.7151522 * fgG + 0.0721750 * fgB;\n let bgC = pow(bgY, 0.56);\n let fgC = pow(fgY, 0.57);\n let contrast = (bgC - fgC) * 1.14;\n return contrast * 100.0;\n}\n";
18
57
  /**
19
58
  * Abstract base class for GPU shader compilation targets.
20
59
  *
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  * GLSL interval arithmetic compilation target
3
3
  *
4
4
  * Compiles mathematical expressions to GLSL code using interval arithmetic
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  * JavaScript interval arithmetic compilation target
3
3
  *
4
4
  * Compiles mathematical expressions to JavaScript code using interval arithmetic
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  * WGSL interval arithmetic compilation target
3
3
  *
4
4
  * Compiles mathematical expressions to WGSL code using interval arithmetic
@@ -1,6 +1,7 @@
1
- /* 0.50.1 */
2
- import { chop, factorial, gcd, lcm, limit } from '../numerics/numeric';
3
- import { gamma, gammaln } from '../numerics/special-functions';
1
+ /* 0.51.0 */
2
+ import { chop, factorial, factorial2, gcd, lcm, limit } from '../numerics/numeric';
3
+ import { gamma, gammaln, erf, erfc, erfInv, beta, digamma, trigamma, polygamma, zeta, lambertW, besselJ, besselY, besselI, besselK, airyAi, airyBi } from '../numerics/special-functions';
4
+ import { choose } from '../boxed-expression/expand';
4
5
  import { interquartileRange, kurtosis, mean, median, mode, populationStandardDeviation, populationVariance, quartiles, skewness, standardDeviation, variance } from '../numerics/statistics';
5
6
  import type { CompileTarget, CompiledOperators, CompiledFunctions, LanguageTarget, CompilationOptions, CompilationResult } from './types';
6
7
  /**
@@ -8,8 +9,18 @@ import type { CompileTarget, CompiledOperators, CompiledFunctions, LanguageTarge
8
9
  */
9
10
  export declare class ComputeEngineFunction extends Function {
10
11
  SYS: {
12
+ color(input: string): number[];
13
+ colorToString(input: string | number[], format?: string): string;
14
+ colorMix(input1: string | number[], input2: string | number[], ratio?: number): number[];
15
+ colorContrast(bg: string | number[], fg: string | number[]): number;
16
+ contrastingColor(bg: string | number[], fg1?: string | number[], fg2?: string | number[]): number[];
17
+ colorToColorspace(input: string | number[], space: string): number[];
18
+ colormap(name: string, arg?: number): number[] | number[][];
19
+ _interpolatePalette(colors: [number, number, number][], t: number): number[];
20
+ colorFromColorspace(components: number[], space: string): number[];
11
21
  chop: typeof chop;
12
22
  factorial: typeof factorial;
23
+ factorial2: typeof factorial2;
13
24
  gamma: typeof gamma;
14
25
  gcd: typeof gcd;
15
26
  integrate: (f: any, a: any, b: any) => number;
@@ -27,6 +38,133 @@ export declare class ComputeEngineFunction extends Function {
27
38
  mode: typeof mode;
28
39
  quartiles: typeof quartiles;
29
40
  interquartileRange: typeof interquartileRange;
41
+ erf: typeof erf;
42
+ erfc: typeof erfc;
43
+ erfInv: typeof erfInv;
44
+ beta: typeof beta;
45
+ digamma: typeof digamma;
46
+ trigamma: typeof trigamma;
47
+ polygamma: typeof polygamma;
48
+ zeta: typeof zeta;
49
+ lambertW: typeof lambertW;
50
+ besselJ: typeof besselJ;
51
+ besselY: typeof besselY;
52
+ besselI: typeof besselI;
53
+ besselK: typeof besselK;
54
+ airyAi: typeof airyAi;
55
+ airyBi: typeof airyBi;
56
+ binomial: typeof choose;
57
+ fibonacci: typeof fibonacci;
58
+ csin: (z: any) => {
59
+ re: number;
60
+ im: number;
61
+ };
62
+ ccos: (z: any) => {
63
+ re: number;
64
+ im: number;
65
+ };
66
+ ctan: (z: any) => {
67
+ re: number;
68
+ im: number;
69
+ };
70
+ casin: (z: any) => {
71
+ re: number;
72
+ im: number;
73
+ };
74
+ cacos: (z: any) => {
75
+ re: number;
76
+ im: number;
77
+ };
78
+ catan: (z: any) => {
79
+ re: number;
80
+ im: number;
81
+ };
82
+ csinh: (z: any) => {
83
+ re: number;
84
+ im: number;
85
+ };
86
+ ccosh: (z: any) => {
87
+ re: number;
88
+ im: number;
89
+ };
90
+ ctanh: (z: any) => {
91
+ re: number;
92
+ im: number;
93
+ };
94
+ csqrt: (z: any) => {
95
+ re: number;
96
+ im: number;
97
+ };
98
+ cexp: (z: any) => {
99
+ re: number;
100
+ im: number;
101
+ };
102
+ cln: (z: any) => {
103
+ re: number;
104
+ im: number;
105
+ };
106
+ cpow: (z: any, w: any) => {
107
+ re: number;
108
+ im: number;
109
+ };
110
+ ccot: (z: any) => {
111
+ re: number;
112
+ im: number;
113
+ };
114
+ csec: (z: any) => {
115
+ re: number;
116
+ im: number;
117
+ };
118
+ ccsc: (z: any) => {
119
+ re: number;
120
+ im: number;
121
+ };
122
+ ccoth: (z: any) => {
123
+ re: number;
124
+ im: number;
125
+ };
126
+ csech: (z: any) => {
127
+ re: number;
128
+ im: number;
129
+ };
130
+ ccsch: (z: any) => {
131
+ re: number;
132
+ im: number;
133
+ };
134
+ cacot: (z: any) => {
135
+ re: number;
136
+ im: number;
137
+ };
138
+ casec: (z: any) => {
139
+ re: number;
140
+ im: number;
141
+ };
142
+ cacsc: (z: any) => {
143
+ re: number;
144
+ im: number;
145
+ };
146
+ cacoth: (z: any) => {
147
+ re: number;
148
+ im: number;
149
+ };
150
+ casech: (z: any) => {
151
+ re: number;
152
+ im: number;
153
+ };
154
+ cacsch: (z: any) => {
155
+ re: number;
156
+ im: number;
157
+ };
158
+ cabs: (z: any) => any;
159
+ carg: (z: any) => any;
160
+ cconj: (z: any) => {
161
+ re: number;
162
+ im: number;
163
+ };
164
+ cneg: (z: any) => {
165
+ re: number;
166
+ im: number;
167
+ };
30
168
  };
31
169
  constructor(body: string, preamble?: string);
32
170
  }
@@ -35,8 +173,18 @@ export declare class ComputeEngineFunction extends Function {
35
173
  */
36
174
  export declare class ComputeEngineFunctionLiteral extends Function {
37
175
  SYS: {
176
+ color(input: string): number[];
177
+ colorToString(input: string | number[], format?: string): string;
178
+ colorMix(input1: string | number[], input2: string | number[], ratio?: number): number[];
179
+ colorContrast(bg: string | number[], fg: string | number[]): number;
180
+ contrastingColor(bg: string | number[], fg1?: string | number[], fg2?: string | number[]): number[];
181
+ colorToColorspace(input: string | number[], space: string): number[];
182
+ colormap(name: string, arg?: number): number[] | number[][];
183
+ _interpolatePalette(colors: [number, number, number][], t: number): number[];
184
+ colorFromColorspace(components: number[], space: string): number[];
38
185
  chop: typeof chop;
39
186
  factorial: typeof factorial;
187
+ factorial2: typeof factorial2;
40
188
  gamma: typeof gamma;
41
189
  gcd: typeof gcd;
42
190
  integrate: (f: any, a: any, b: any) => number;
@@ -54,6 +202,133 @@ export declare class ComputeEngineFunctionLiteral extends Function {
54
202
  mode: typeof mode;
55
203
  quartiles: typeof quartiles;
56
204
  interquartileRange: typeof interquartileRange;
205
+ erf: typeof erf;
206
+ erfc: typeof erfc;
207
+ erfInv: typeof erfInv;
208
+ beta: typeof beta;
209
+ digamma: typeof digamma;
210
+ trigamma: typeof trigamma;
211
+ polygamma: typeof polygamma;
212
+ zeta: typeof zeta;
213
+ lambertW: typeof lambertW;
214
+ besselJ: typeof besselJ;
215
+ besselY: typeof besselY;
216
+ besselI: typeof besselI;
217
+ besselK: typeof besselK;
218
+ airyAi: typeof airyAi;
219
+ airyBi: typeof airyBi;
220
+ binomial: typeof choose;
221
+ fibonacci: typeof fibonacci;
222
+ csin: (z: any) => {
223
+ re: number;
224
+ im: number;
225
+ };
226
+ ccos: (z: any) => {
227
+ re: number;
228
+ im: number;
229
+ };
230
+ ctan: (z: any) => {
231
+ re: number;
232
+ im: number;
233
+ };
234
+ casin: (z: any) => {
235
+ re: number;
236
+ im: number;
237
+ };
238
+ cacos: (z: any) => {
239
+ re: number;
240
+ im: number;
241
+ };
242
+ catan: (z: any) => {
243
+ re: number;
244
+ im: number;
245
+ };
246
+ csinh: (z: any) => {
247
+ re: number;
248
+ im: number;
249
+ };
250
+ ccosh: (z: any) => {
251
+ re: number;
252
+ im: number;
253
+ };
254
+ ctanh: (z: any) => {
255
+ re: number;
256
+ im: number;
257
+ };
258
+ csqrt: (z: any) => {
259
+ re: number;
260
+ im: number;
261
+ };
262
+ cexp: (z: any) => {
263
+ re: number;
264
+ im: number;
265
+ };
266
+ cln: (z: any) => {
267
+ re: number;
268
+ im: number;
269
+ };
270
+ cpow: (z: any, w: any) => {
271
+ re: number;
272
+ im: number;
273
+ };
274
+ ccot: (z: any) => {
275
+ re: number;
276
+ im: number;
277
+ };
278
+ csec: (z: any) => {
279
+ re: number;
280
+ im: number;
281
+ };
282
+ ccsc: (z: any) => {
283
+ re: number;
284
+ im: number;
285
+ };
286
+ ccoth: (z: any) => {
287
+ re: number;
288
+ im: number;
289
+ };
290
+ csech: (z: any) => {
291
+ re: number;
292
+ im: number;
293
+ };
294
+ ccsch: (z: any) => {
295
+ re: number;
296
+ im: number;
297
+ };
298
+ cacot: (z: any) => {
299
+ re: number;
300
+ im: number;
301
+ };
302
+ casec: (z: any) => {
303
+ re: number;
304
+ im: number;
305
+ };
306
+ cacsc: (z: any) => {
307
+ re: number;
308
+ im: number;
309
+ };
310
+ cacoth: (z: any) => {
311
+ re: number;
312
+ im: number;
313
+ };
314
+ casech: (z: any) => {
315
+ re: number;
316
+ im: number;
317
+ };
318
+ cacsch: (z: any) => {
319
+ re: number;
320
+ im: number;
321
+ };
322
+ cabs: (z: any) => any;
323
+ carg: (z: any) => any;
324
+ cconj: (z: any) => {
325
+ re: number;
326
+ im: number;
327
+ };
328
+ cneg: (z: any) => {
329
+ re: number;
330
+ im: number;
331
+ };
57
332
  };
58
333
  constructor(body: string, args: string[]);
59
334
  }
@@ -66,3 +341,8 @@ export declare class JavaScriptTarget implements LanguageTarget<Expression> {
66
341
  createTarget(options?: Partial<CompileTarget<Expression>>): CompileTarget<Expression>;
67
342
  compile(expr: Expression, options?: CompilationOptions<Expression>): CompilationResult;
68
343
  }
344
+ /**
345
+ * Compute the nth Fibonacci number using iterative doubling.
346
+ */
347
+ declare function fibonacci(n: number): number;
348
+ export {};
@@ -1,4 +1,4 @@
1
- /* 0.50.1 */
1
+ /* 0.51.0 */
2
2
  import type { CompileTarget, CompiledOperators, CompiledFunctions, LanguageTarget, CompilationOptions, CompilationResult } from './types';
3
3
  /**
4
4
  * Python/NumPy language target implementation