@cortex-js/compute-engine 0.55.4 → 0.55.5
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/compile.esm.js +100 -13
- package/dist/compile.min.esm.js +101 -49
- package/dist/compile.min.umd.cjs +101 -49
- package/dist/compile.umd.cjs +100 -13
- package/dist/compute-engine.esm.js +102 -14
- package/dist/compute-engine.min.esm.js +114 -62
- package/dist/compute-engine.min.umd.cjs +114 -62
- package/dist/compute-engine.umd.cjs +102 -14
- package/dist/core.esm.js +100 -13
- package/dist/core.min.esm.js +113 -61
- package/dist/core.min.umd.cjs +113 -61
- package/dist/core.umd.cjs +100 -13
- package/dist/interval.esm.js +2 -2
- package/dist/interval.min.esm.js +2 -2
- package/dist/interval.min.umd.cjs +2 -2
- package/dist/interval.umd.cjs +2 -2
- package/dist/latex-syntax.esm.js +2 -2
- package/dist/latex-syntax.min.esm.js +2 -2
- package/dist/latex-syntax.min.umd.cjs +2 -2
- package/dist/latex-syntax.umd.cjs +2 -2
- package/dist/math-json.esm.js +2 -2
- package/dist/math-json.min.esm.js +2 -2
- package/dist/math-json.min.umd.cjs +2 -2
- package/dist/math-json.umd.cjs +2 -2
- package/dist/numerics.esm.js +2 -2
- package/dist/numerics.min.esm.js +2 -2
- package/dist/numerics.min.umd.cjs +2 -2
- package/dist/numerics.umd.cjs +2 -2
- package/dist/types/big-decimal/big-decimal.d.ts +1 -1
- package/dist/types/big-decimal/index.d.ts +1 -1
- package/dist/types/big-decimal/transcendentals.d.ts +1 -1
- package/dist/types/big-decimal/utils.d.ts +1 -1
- package/dist/types/common/ansi-codes.d.ts +1 -1
- package/dist/types/common/configuration-change.d.ts +1 -1
- package/dist/types/common/fuzzy-string-match.d.ts +1 -1
- package/dist/types/common/grapheme-splitter.d.ts +1 -1
- package/dist/types/common/interruptible.d.ts +1 -1
- package/dist/types/common/one-of.d.ts +1 -1
- package/dist/types/common/signals.d.ts +1 -1
- package/dist/types/common/type/ast-nodes.d.ts +1 -1
- package/dist/types/common/type/boxed-type.d.ts +1 -1
- package/dist/types/common/type/lexer.d.ts +1 -1
- package/dist/types/common/type/parse.d.ts +1 -1
- package/dist/types/common/type/parser.d.ts +1 -1
- package/dist/types/common/type/primitive.d.ts +1 -1
- package/dist/types/common/type/reduce.d.ts +1 -1
- package/dist/types/common/type/serialize.d.ts +1 -1
- package/dist/types/common/type/subtype.d.ts +1 -1
- package/dist/types/common/type/type-builder.d.ts +1 -1
- package/dist/types/common/type/types.d.ts +1 -1
- package/dist/types/common/type/utils.d.ts +1 -1
- package/dist/types/common/utils.d.ts +1 -1
- package/dist/types/compile.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/apply.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/arithmetic-add.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/arithmetic-mul-div.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/arithmetic-power.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/ascii-math.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-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-operator-definition.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.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-tensor.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-value-definition.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/cache.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/canonical-utils.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/canonical.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/compare.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/constants.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/expand.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/factor.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/flatten.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/hold.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/inequality-bounds.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/init-lazy-refs.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/invisible-operator.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/match.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/negate.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/numerics.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/order.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/pattern-utils.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/polynomial-degree.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/predicates.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/rules.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/serialize.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/sgn.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/simplify.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/solve-linear-system.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/solve.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/stochastic-equal.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/type-guards.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/collection-utils.d.ts +1 -1
- package/dist/types/compute-engine/compilation/base-compiler.d.ts +1 -1
- package/dist/types/compute-engine/compilation/compile-expression.d.ts +3 -2
- package/dist/types/compute-engine/compilation/constant-folding.d.ts +1 -1
- package/dist/types/compute-engine/compilation/fractal-orbit.d.ts +9 -3
- package/dist/types/compute-engine/compilation/glsl-target.d.ts +1 -1
- package/dist/types/compute-engine/compilation/gpu-target.d.ts +12 -5
- package/dist/types/compute-engine/compilation/interval-javascript-target.d.ts +1 -1
- package/dist/types/compute-engine/compilation/javascript-target.d.ts +1 -1
- package/dist/types/compute-engine/compilation/python-target.d.ts +1 -1
- package/dist/types/compute-engine/compilation/types.d.ts +22 -3
- package/dist/types/compute-engine/compilation/wgsl-target.d.ts +1 -1
- package/dist/types/compute-engine/cost-function.d.ts +1 -1
- package/dist/types/compute-engine/engine-assumptions.d.ts +1 -1
- package/dist/types/compute-engine/engine-cache.d.ts +1 -1
- package/dist/types/compute-engine/engine-common-symbols.d.ts +1 -1
- package/dist/types/compute-engine/engine-compilation-targets.d.ts +1 -1
- package/dist/types/compute-engine/engine-configuration-lifecycle.d.ts +1 -1
- package/dist/types/compute-engine/engine-declarations.d.ts +1 -1
- package/dist/types/compute-engine/engine-expression-entrypoints.d.ts +1 -1
- package/dist/types/compute-engine/engine-extension-contracts.d.ts +1 -1
- package/dist/types/compute-engine/engine-library-bootstrap.d.ts +1 -1
- package/dist/types/compute-engine/engine-numeric-configuration.d.ts +1 -1
- package/dist/types/compute-engine/engine-runtime-state.d.ts +1 -1
- package/dist/types/compute-engine/engine-scope.d.ts +1 -1
- package/dist/types/compute-engine/engine-sequences.d.ts +1 -1
- package/dist/types/compute-engine/engine-simplification-rules.d.ts +1 -1
- package/dist/types/compute-engine/engine-startup-coordinator.d.ts +1 -1
- package/dist/types/compute-engine/engine-type-resolver.d.ts +1 -1
- package/dist/types/compute-engine/engine-validation-entrypoints.d.ts +1 -1
- package/dist/types/compute-engine/free-functions.d.ts +1 -1
- package/dist/types/compute-engine/function-utils.d.ts +1 -1
- package/dist/types/compute-engine/global-types.d.ts +1 -1
- package/dist/types/compute-engine/index.d.ts +3 -2
- package/dist/types/compute-engine/interval/arithmetic.d.ts +1 -1
- package/dist/types/compute-engine/interval/comparison.d.ts +1 -1
- package/dist/types/compute-engine/interval/elementary.d.ts +1 -1
- package/dist/types/compute-engine/interval/index.d.ts +1 -1
- package/dist/types/compute-engine/interval/trigonometric.d.ts +1 -1
- package/dist/types/compute-engine/interval/types.d.ts +1 -1
- package/dist/types/compute-engine/interval/util.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/default-dictionary.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-complex.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-linear-algebra.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-relational-operators.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-statistics.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-units.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/indexed-types.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-number.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse-symbol.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serialize-dms.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/latex-syntax/types.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/utils.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/colors.d.ts +1 -1
- package/dist/types/compute-engine/library/combinatorics.d.ts +1 -1
- package/dist/types/compute-engine/library/complex.d.ts +1 -1
- package/dist/types/compute-engine/library/control-structures.d.ts +1 -1
- package/dist/types/compute-engine/library/core.d.ts +1 -1
- package/dist/types/compute-engine/library/fractals.d.ts +1 -1
- package/dist/types/compute-engine/library/library.d.ts +1 -1
- package/dist/types/compute-engine/library/linear-algebra.d.ts +1 -1
- package/dist/types/compute-engine/library/logic-analysis.d.ts +1 -1
- package/dist/types/compute-engine/library/logic.d.ts +1 -1
- package/dist/types/compute-engine/library/number-theory.d.ts +1 -1
- package/dist/types/compute-engine/library/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/library/quantity-arithmetic.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/statistics.d.ts +1 -1
- package/dist/types/compute-engine/library/trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/library/type-handlers.d.ts +1 -1
- package/dist/types/compute-engine/library/unit-data.d.ts +1 -1
- package/dist/types/compute-engine/library/units.d.ts +1 -1
- package/dist/types/compute-engine/library/utils.d.ts +1 -1
- package/dist/types/compute-engine/numeric-value/big-numeric-value.d.ts +1 -1
- package/dist/types/compute-engine/numeric-value/exact-numeric-value.d.ts +1 -1
- package/dist/types/compute-engine/numeric-value/machine-numeric-value.d.ts +1 -1
- package/dist/types/compute-engine/numeric-value/types.d.ts +1 -1
- package/dist/types/compute-engine/numerics/bigint.d.ts +1 -1
- package/dist/types/compute-engine/numerics/expression.d.ts +1 -1
- package/dist/types/compute-engine/numerics/interval.d.ts +1 -1
- package/dist/types/compute-engine/numerics/linear-algebra.d.ts +1 -1
- package/dist/types/compute-engine/numerics/monte-carlo.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/numerics/richardson.d.ts +1 -1
- package/dist/types/compute-engine/numerics/special-functions.d.ts +1 -1
- package/dist/types/compute-engine/numerics/statistics.d.ts +1 -1
- package/dist/types/compute-engine/numerics/strings.d.ts +1 -1
- package/dist/types/compute-engine/numerics/types.d.ts +1 -1
- package/dist/types/compute-engine/numerics/unit-data.d.ts +1 -1
- package/dist/types/compute-engine/oeis.d.ts +1 -1
- package/dist/types/compute-engine/sequence.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/antiderivative.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/derivative.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/distribute.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/fu-cost.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/fu-transforms.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/fu.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/logic-utils.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-abs.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-divide.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-factorial.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-hyperbolic.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-infinity.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-log.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-logic.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-power.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-product.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-rules.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-sum.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-trig.d.ts +1 -1
- package/dist/types/compute-engine/tensor/tensor-fields.d.ts +1 -1
- package/dist/types/compute-engine/tensor/tensors.d.ts +1 -1
- package/dist/types/compute-engine/types-definitions.d.ts +1 -1
- package/dist/types/compute-engine/types-engine.d.ts +1 -1
- package/dist/types/compute-engine/types-evaluation.d.ts +1 -1
- package/dist/types/compute-engine/types-expression.d.ts +1 -1
- package/dist/types/compute-engine/types-kernel-evaluation.d.ts +1 -1
- package/dist/types/compute-engine/types-kernel-serialization.d.ts +1 -1
- package/dist/types/compute-engine/types-serialization.d.ts +1 -1
- package/dist/types/compute-engine/types.d.ts +1 -1
- package/dist/types/compute-engine.d.ts +3 -2
- package/dist/types/core.d.ts +1 -1
- package/dist/types/interval.d.ts +1 -1
- package/dist/types/latex-syntax.d.ts +2 -2
- package/dist/types/math-json/symbols.d.ts +1 -1
- package/dist/types/math-json/types.d.ts +1 -1
- package/dist/types/math-json/utils.d.ts +1 -1
- package/dist/types/math-json.d.ts +2 -2
- package/dist/types/numerics.d.ts +1 -1
- package/package.json +1 -1
package/dist/core.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** ComputeEngineCore 0.55.
|
|
1
|
+
/** ComputeEngineCore 0.55.5 */
|
|
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.ComputeEngineCore = {}));})(this, (function (exports) { 'use strict';
|
|
3
3
|
var ComputeEngineCore = (() => {
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -54810,7 +54810,8 @@ Error in definition of "${name}"`,
|
|
|
54810
54810
|
vars: options?.vars,
|
|
54811
54811
|
imports: options?.imports,
|
|
54812
54812
|
preamble: options?.preamble,
|
|
54813
|
-
realOnly: options?.realOnly
|
|
54813
|
+
realOnly: options?.realOnly,
|
|
54814
|
+
hints: options?.hints
|
|
54814
54815
|
});
|
|
54815
54816
|
} catch (e) {
|
|
54816
54817
|
if (options?.fallback ?? true) {
|
|
@@ -61311,12 +61312,22 @@ Error in definition of "${name}"`,
|
|
|
61311
61312
|
}
|
|
61312
61313
|
|
|
61313
61314
|
// src/compute-engine/compilation/fractal-orbit.ts
|
|
61315
|
+
function toBigDecimal(v) {
|
|
61316
|
+
if (typeof v === "object" && "hi" in v)
|
|
61317
|
+
return new BigDecimal(v.hi).add(new BigDecimal(v.lo));
|
|
61318
|
+
return new BigDecimal(v);
|
|
61319
|
+
}
|
|
61320
|
+
function hpToNumber(v) {
|
|
61321
|
+
if (typeof v === "number") return v;
|
|
61322
|
+
if (typeof v === "string") return Number(v);
|
|
61323
|
+
return v.hi + v.lo;
|
|
61324
|
+
}
|
|
61314
61325
|
function computeReferenceOrbit(center, maxIter, precision) {
|
|
61315
61326
|
const prevPrecision = BigDecimal.precision;
|
|
61316
61327
|
BigDecimal.precision = precision;
|
|
61317
61328
|
try {
|
|
61318
|
-
const cr =
|
|
61319
|
-
const ci =
|
|
61329
|
+
const cr = toBigDecimal(center[0]);
|
|
61330
|
+
const ci = toBigDecimal(center[1]);
|
|
61320
61331
|
let zr = BigDecimal.ZERO;
|
|
61321
61332
|
let zi = BigDecimal.ZERO;
|
|
61322
61333
|
const ESCAPE = new BigDecimal(256);
|
|
@@ -61924,12 +61935,12 @@ Error in definition of "${name}"`,
|
|
|
61924
61935
|
const iterCode = compileIntArg(maxIter, compile3, target);
|
|
61925
61936
|
const strategy = selectFractalStrategy(target);
|
|
61926
61937
|
if (strategy === "double") {
|
|
61927
|
-
const
|
|
61928
|
-
return `_fractal_mandelbrot_dp(
|
|
61938
|
+
const dpCoord = target?.language === "wgsl" ? "_dp_coord(v_uv)" : "_dp_coord()";
|
|
61939
|
+
return `_fractal_mandelbrot_dp(${dpCoord}, ${iterCode})`;
|
|
61929
61940
|
}
|
|
61930
61941
|
if (strategy === "perturbation") {
|
|
61931
|
-
const
|
|
61932
|
-
return `_fractal_mandelbrot_pt(${
|
|
61942
|
+
const ptDelta = target?.language === "wgsl" ? "_pt_delta(v_uv)" : "_pt_delta()";
|
|
61943
|
+
return `_fractal_mandelbrot_pt(${ptDelta}, ${iterCode})`;
|
|
61933
61944
|
}
|
|
61934
61945
|
return `_fractal_mandelbrot(${compile3(c)}, ${iterCode})`;
|
|
61935
61946
|
},
|
|
@@ -61939,14 +61950,14 @@ Error in definition of "${name}"`,
|
|
|
61939
61950
|
const iterCode = compileIntArg(maxIter, compile3, target);
|
|
61940
61951
|
const strategy = selectFractalStrategy(target);
|
|
61941
61952
|
if (strategy === "double") {
|
|
61942
|
-
const
|
|
61953
|
+
const dpCoord = target?.language === "wgsl" ? "_dp_coord(v_uv)" : "_dp_coord()";
|
|
61943
61954
|
const cCode = compile3(c);
|
|
61944
|
-
return `_fractal_julia_dp(
|
|
61955
|
+
return `_fractal_julia_dp(${dpCoord}, vec4(${cCode}, vec2(0.0)), ${iterCode})`;
|
|
61945
61956
|
}
|
|
61946
61957
|
if (strategy === "perturbation") {
|
|
61947
|
-
const
|
|
61958
|
+
const ptDelta = target?.language === "wgsl" ? "_pt_delta(v_uv)" : "_pt_delta()";
|
|
61948
61959
|
const cCode = compile3(c);
|
|
61949
|
-
return `_fractal_julia_pt(${
|
|
61960
|
+
return `_fractal_julia_pt(${ptDelta}, ${cCode}, ${iterCode})`;
|
|
61950
61961
|
}
|
|
61951
61962
|
return `_fractal_julia(${compile3(z)}, ${compile3(c)}, ${iterCode})`;
|
|
61952
61963
|
},
|
|
@@ -62661,6 +62672,23 @@ fn ds_cmp(a: vec2f, b: vec2f) -> f32 {
|
|
|
62661
62672
|
}
|
|
62662
62673
|
`;
|
|
62663
62674
|
var GPU_FRACTAL_DP_PREAMBLE_GLSL = `
|
|
62675
|
+
uniform float _dp_cx_hi;
|
|
62676
|
+
uniform float _dp_cx_lo;
|
|
62677
|
+
uniform float _dp_cy_hi;
|
|
62678
|
+
uniform float _dp_cy_lo;
|
|
62679
|
+
uniform float _dp_w;
|
|
62680
|
+
uniform float _dp_h;
|
|
62681
|
+
|
|
62682
|
+
vec4 _dp_coord() {
|
|
62683
|
+
// Per-pixel offset from center \u2014 small, so float-precise
|
|
62684
|
+
float dx = (v_uv.x - 0.5) * _dp_w;
|
|
62685
|
+
float dy = (v_uv.y - 0.5) * _dp_h;
|
|
62686
|
+
// Combine center (hi+lo) + delta with emulated double precision
|
|
62687
|
+
vec2 cre = ds_add(vec2(_dp_cx_hi, _dp_cx_lo), ds_from(dx));
|
|
62688
|
+
vec2 cim = ds_add(vec2(_dp_cy_hi, _dp_cy_lo), ds_from(dy));
|
|
62689
|
+
return vec4(cre.x, cim.x, cre.y, cim.y);
|
|
62690
|
+
}
|
|
62691
|
+
|
|
62664
62692
|
float _fractal_mandelbrot_dp(vec4 c, int maxIter) {
|
|
62665
62693
|
// c = (re_hi, im_hi, re_lo, im_lo)
|
|
62666
62694
|
vec2 cr = vec2(c.x, c.z); // real part as ds
|
|
@@ -62701,6 +62729,21 @@ float _fractal_julia_dp(vec4 z_in, vec4 c, int maxIter) {
|
|
|
62701
62729
|
}
|
|
62702
62730
|
`;
|
|
62703
62731
|
var GPU_FRACTAL_DP_PREAMBLE_WGSL = `
|
|
62732
|
+
@group(0) @binding(10) var<uniform> _dp_cx_hi: f32;
|
|
62733
|
+
@group(0) @binding(11) var<uniform> _dp_cx_lo: f32;
|
|
62734
|
+
@group(0) @binding(12) var<uniform> _dp_cy_hi: f32;
|
|
62735
|
+
@group(0) @binding(13) var<uniform> _dp_cy_lo: f32;
|
|
62736
|
+
@group(0) @binding(14) var<uniform> _dp_w: f32;
|
|
62737
|
+
@group(0) @binding(15) var<uniform> _dp_h: f32;
|
|
62738
|
+
|
|
62739
|
+
fn _dp_coord(uv: vec2f) -> vec4f {
|
|
62740
|
+
let dx = (uv.x - 0.5) * _dp_w;
|
|
62741
|
+
let dy = (uv.y - 0.5) * _dp_h;
|
|
62742
|
+
let cre = ds_add(vec2f(_dp_cx_hi, _dp_cx_lo), ds_from(dx));
|
|
62743
|
+
let cim = ds_add(vec2f(_dp_cy_hi, _dp_cy_lo), ds_from(dy));
|
|
62744
|
+
return vec4f(cre.x, cim.x, cre.y, cim.y);
|
|
62745
|
+
}
|
|
62746
|
+
|
|
62704
62747
|
fn _fractal_mandelbrot_dp(c: vec4f, maxIter: i32) -> f32 {
|
|
62705
62748
|
let cr = vec2f(c.x, c.z);
|
|
62706
62749
|
let ci = vec2f(c.y, c.w);
|
|
@@ -62786,6 +62829,16 @@ fn _fractal_julia(z_in: vec2f, c: vec2f, maxIter: i32) -> f32 {
|
|
|
62786
62829
|
uniform sampler2D _refOrbit;
|
|
62787
62830
|
uniform int _refOrbitLen;
|
|
62788
62831
|
uniform int _refOrbitTexWidth;
|
|
62832
|
+
uniform float _pt_offset_x;
|
|
62833
|
+
uniform float _pt_offset_y;
|
|
62834
|
+
uniform float _pt_w;
|
|
62835
|
+
uniform float _pt_h;
|
|
62836
|
+
|
|
62837
|
+
vec2 _pt_delta() {
|
|
62838
|
+
float dx = _pt_offset_x + (v_uv.x - 0.5) * _pt_w;
|
|
62839
|
+
float dy = _pt_offset_y + (v_uv.y - 0.5) * _pt_h;
|
|
62840
|
+
return vec2(dx, dy);
|
|
62841
|
+
}
|
|
62789
62842
|
|
|
62790
62843
|
vec2 _pt_fetch_orbit(int i) {
|
|
62791
62844
|
int y = i / _refOrbitTexWidth;
|
|
@@ -62877,6 +62930,16 @@ float _fractal_julia_pt(vec2 z_delta, vec2 delta_c, int maxIter) {
|
|
|
62877
62930
|
@group(0) @binding(1) var _refOrbit: texture_2d<f32>;
|
|
62878
62931
|
var<uniform> _refOrbitLen: i32;
|
|
62879
62932
|
var<uniform> _refOrbitTexWidth: i32;
|
|
62933
|
+
var<uniform> _pt_offset_x: f32;
|
|
62934
|
+
var<uniform> _pt_offset_y: f32;
|
|
62935
|
+
var<uniform> _pt_w: f32;
|
|
62936
|
+
var<uniform> _pt_h: f32;
|
|
62937
|
+
|
|
62938
|
+
fn _pt_delta(uv: vec2f) -> vec2f {
|
|
62939
|
+
let dx = _pt_offset_x + (uv.x - 0.5) * _pt_w;
|
|
62940
|
+
let dy = _pt_offset_y + (uv.y - 0.5) * _pt_h;
|
|
62941
|
+
return vec2f(dx, dy);
|
|
62942
|
+
}
|
|
62880
62943
|
|
|
62881
62944
|
fn _pt_fetch_orbit(i: i32) -> vec2f {
|
|
62882
62945
|
let y = i / _refOrbitTexWidth;
|
|
@@ -63474,8 +63537,32 @@ fn _gpu_apca(bg: vec3f, fg: vec3f) -> f32 {
|
|
|
63474
63537
|
break;
|
|
63475
63538
|
}
|
|
63476
63539
|
}
|
|
63540
|
+
if ((code.includes("_fractal_mandelbrot_dp") || code.includes("_fractal_julia_dp")) && options.hints?.viewport) {
|
|
63541
|
+
const cx = hpToNumber(options.hints.viewport.center[0]);
|
|
63542
|
+
const cy = hpToNumber(options.hints.viewport.center[1]);
|
|
63543
|
+
const size = options.hints.viewport.radius * 2;
|
|
63544
|
+
const cx_hi = Math.fround(cx);
|
|
63545
|
+
const cy_hi = Math.fround(cy);
|
|
63546
|
+
result.uniforms = {
|
|
63547
|
+
...result.uniforms,
|
|
63548
|
+
_dp_cx_hi: cx_hi,
|
|
63549
|
+
_dp_cx_lo: cx - cx_hi,
|
|
63550
|
+
_dp_cy_hi: cy_hi,
|
|
63551
|
+
_dp_cy_lo: cy - cy_hi,
|
|
63552
|
+
_dp_w: size,
|
|
63553
|
+
_dp_h: size
|
|
63554
|
+
};
|
|
63555
|
+
}
|
|
63477
63556
|
if ((code.includes("_fractal_mandelbrot_pt") || code.includes("_fractal_julia_pt")) && options.hints?.viewport) {
|
|
63478
63557
|
const viewport = options.hints.viewport;
|
|
63558
|
+
const size = viewport.radius * 2;
|
|
63559
|
+
result.uniforms = {
|
|
63560
|
+
...result.uniforms,
|
|
63561
|
+
_pt_offset_x: 0,
|
|
63562
|
+
_pt_offset_y: 0,
|
|
63563
|
+
_pt_w: size,
|
|
63564
|
+
_pt_h: size
|
|
63565
|
+
};
|
|
63479
63566
|
const digits = Math.max(50, Math.ceil(-Math.log10(viewport.radius)) + 10);
|
|
63480
63567
|
const maxIter = 1e3;
|
|
63481
63568
|
const orbit = computeReferenceOrbit(
|
|
@@ -68482,7 +68569,7 @@ ${workgroupAttr}fn main(${paramStr})${returnStr} {
|
|
|
68482
68569
|
_setDefaultEngineFactory(() => new ComputeEngine());
|
|
68483
68570
|
|
|
68484
68571
|
// src/core.ts
|
|
68485
|
-
var version = "0.55.
|
|
68572
|
+
var version = "0.55.5";
|
|
68486
68573
|
return __toCommonJS(core_exports);
|
|
68487
68574
|
})();
|
|
68488
68575
|
/*! Bundled license information:
|
package/dist/interval.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Compute Engine 0.55.
|
|
1
|
+
/** Compute Engine 0.55.5 */
|
|
2
2
|
|
|
3
3
|
// src/compute-engine/interval/util.ts
|
|
4
4
|
function ok(value) {
|
|
@@ -13329,7 +13329,7 @@ var IntervalArithmetic = {
|
|
|
13329
13329
|
};
|
|
13330
13330
|
|
|
13331
13331
|
// src/interval.ts
|
|
13332
|
-
var version = "0.55.
|
|
13332
|
+
var version = "0.55.5";
|
|
13333
13333
|
export {
|
|
13334
13334
|
IntervalArithmetic,
|
|
13335
13335
|
_mul,
|