<!-- https://epsil.dev/compute-engine/changelog/ -->

# Compute Engine Changelog

import ChangeLog from '@site/src/components/ChangeLog';

<ChangeLog>
## Coming Soon

### Resolved Issues

- **With the integration rules loaded, more antiderivatives with an
  incomplete gamma or a hypergeometric function have the integrand as their
  derivative when an exponent is a fraction with an odd denominator.**
  `\int x^me^x\,dx` gave `\frac{\Gamma(m+1,-x)x^m}{(-x)^m}`. At `m = \frac13`
  and `x = 0.3` its derivative was `-0.452 - 0.783i` where the integrand is
  `0.904`: `(-x)^m` is the real cube root there, and the gamma function needs
  the principal value. The answer is now
  `\frac{\Gamma(m+1,-x)x^m}{\exp(m\ln(-x))}`.
  `\int\frac{\sqrt[3]{a+bx}}{(c+dx)^{2/3}}\,dx`, wrong for `bc < ad`, is
  corrected the same way. The other powers of an answer keep their form.
  `expr.explain('Integrate')` shows the change as the step
  `integrate.principal-powers`.

## 0.205.1 _2026-11-29_

### Improvements

- **A test of a tuple type on a parameter of type `any` compiles to JavaScript
  when the argument proves it.** With
  `function tested(b: any) -> real { if b is tuple<real, real> { b[1] } else { 0 } }`,
  `(t: real) => tested((t, 1))` declined ("neither proves nor excludes
  tuple\<real, real>"); it now compiles and gives `2` at `t = 2`, as the
  interpreter does. An argument whose type does not prove the test, such as
  `(t, sqrt(t - 5))`, still declines.
- **A boolean given to a parameter of type `any` compiles to JavaScript.**
  With `function one(v: any) -> real { if v is boolean { 1 } else { 2 } }`,
  `(t: real) => one(t > 1)` declined ("the parameter v of one is not a
  scalar (any)"), as did a boolean value of a dictionary read in
  `for k in keys(opts) { … one(opts[k]) … }`; a string, a color, a list or
  `nothing` there compiled. It now compiles and gives `1` at `t = 2`, as the
  interpreter does.
- **`N` of a dictionary of tuples and lists compiles to JavaScript.**
  `N(options, 15)` of `{bounds -> ((0, 0), (t, 1)), grid -> true}` declined;
  it now gives the dictionary, as the interpreter does. Before, only a
  dictionary of numbers, strings and booleans compiled.
- **`length(listFrom(parts))` of a rest parameter compiles to JavaScript.**
  With `function variadic(...parts) -> real { length(listFrom(parts)) }`,
  `(t: real) => variadic(t, 2, 3)` declined ("a scalar where a list is
  required"); it now gives `3`.
- **A compiled function can assign a variable of type `color`.** For
  `let tint = rgb(0, 0, 0)`, the function `(t: real) => do { tint = rgb255(t / 16, 10, 20); 0 }` compiles to JavaScript; it declined with "an
  assignment of tint, of type color". After `run(40)`, `tint` is
  `Rgb(0.0098…, 0.039…, 0.078…)`, the color that the interpreter writes, with
  machine numbers. A write of a value that can be the color read at the start
  of the call (`if (t > 1) { tint = rgb255(t, 10, 20) }`) still declines.
- **`PrimeFactors`, `FactorInteger` and the functions that use a prime
  factorization (`Totient`, `Divisors`, …) factor integers of up to 60
  digits whose prime factors are all large.**
  `["PrimeFactors", {num: "210000000024964400000672351479"}]` threw a
  `CancellationError` (`iteration-limit-exceeded`) after about 1.3 s; it now
  gives `[300000000012371, 700000000054349]` in about 0.05 s. A 40-digit
  product of two 20-digit primes takes about 0.2 s, a 50-digit one about
  1.5 s, a 60-digit one about 13 s. An integer whose two largest prime
  factors both have more than about 15 digits, and which has more than 60
  digits, still throws, after about 3 s with no time limit.
- **The sine or cosine of a quadratic has an antiderivative when the sign of
  its leading coefficient is known.** Only
  `\int\sin(ax^2)\,dx` and `\int\cos(ax^2)\,dx` with a number `a` had one.
  Now `\int\sin(ax^2+bx+c)\,dx` and `\int\cos(ax^2+bx+c)\,dx` give a closed
  form with `FresnelS` and `FresnelC` of `\sqrt{2|a|/\pi}\,(x+\frac{b}{2a})`:
  `\int\sin(x^2+1)\,dx` is
  `\sqrt{\frac{\pi}{2}}\left(\cos(1)\,\mathrm{FresnelS}(\sqrt{2/\pi}\,x)+\sin(1)\,\mathrm{FresnelC}(\sqrt{2/\pi}\,x)\right)`.
  The coefficients may be symbolic when the sign of `a` is known, as for the
  integral of `e^{ax^2+bx+c}`: `\int\sin(kx^2+x)\,dx` has a closed form for
  `k` declared positive, and stays unevaluated for a `k` of unknown sign.

### Behavior Changes

- **`ArrayFrom(a)` of a mutable array copies a cell that the host wrote
  outside the cell type.** Since 0.205.0 the copy takes the storage of `a`
  when the cells already fit the new cell type, so a cell that the host wrote
  directly in the storage (200 in the bytes of an `array<integer<0..100>>`)
  is copied as it is. Before 0.205.0 it gave an `incompatible-type` error. A
  copy into a narrower cell type still checks each cell.
- **`ArrayFrom(a)` gives `array-allocation-refused` when `ce.arrayAllocation`
  changes the count of `a`.** The function of the host permits a count; when
  it changes the source (a `Swap` of `a` with a longer array), no array is
  made. Before 0.205.0 the copy had the cells read before the call.
- **A color string can be a CSS color name.** `Color("navy")`,
  `Color("crimson")` and `Color("rebeccapurple")` are colors; they were
  `incompatible-type` errors. The names come from `@arnog/colors` 0.8.0, which
  maps each CSS name to a color of its palette, so a value can differ from
  the CSS one (`navy` is `#0652ab`, not `#000080`). Four names that were
  already accepted have a new value: `yellow` (`#ffc02b` is now `#f3f648`),
  `lime` (`#63b215`, now `#7bed0b`), `cyan` (`#13a7ec`, now `#00f0f0`) and
  `magenta` (`#eb4799`, now `#fb5cfb`). The palette shades (`red-500`) are
  unchanged.

### Resolved Issues

- **With the integration rules loaded, more antiderivatives have the
  integrand as their derivative.** `\int(dx)^m\arctan(cx^n)\,dx` gave an
  answer with `\arctan(cx)`, the antiderivative for `n = 1`; the answer now
  has `\arctan(cx^n)`. `\int\frac{(ex)^m(A+Bx^2)}{(a+bx^2)(c+dx^2)}\,dx` had
  a factor `\frac{1}{A^2}` where `\frac{1}{e^2}` is right. Some integrals of
  `\cot(d+ex)^m` over a trinomial in `\tan(d+ex)` gave the negative of the
  antiderivative, and some with `(d+ex)^q\arctan(cx)` or with square roots of
  linear factors had a wrong sign or a complex value.
- **With the integration rules loaded, an integrand with a written-out zero
  coefficient no longer prints `Assertion failed`.** Integrating
  `\frac{1}{-3\sin(0x)-3}` printed it on the console and stayed unevaluated;
  it now gives `-\frac{x}{3}`. Integrands with `\tan(0x)` printed it too.
- **The antiderivative of the sine or cosine of a quadratic is no longer
  wrong.** `\int\sin(a+bx+cx^2)\,dx` gave `-\frac{\cos(cx^2+bx+a)}{b}`, as if
  the argument were linear, and `\int\cos(3x^2+x)\,dx` gave `\sin(3x^2+x)`.
  The first now stays unevaluated, because the sign of `c` is not known; the
  second gives a closed form with `FresnelS` and `FresnelC`. A linear
  argument (`\int\sin(2x+1)\,dx`) still gives its closed form.
- **A product with the square root of an odd power keeps its value for a
  negative base.** `x\sqrt{x^3}` simplified to `x^{5/2}`, which has the
  opposite sign for every `x < 0` (at `x = -2`, `-5.66i` against `5.66i`);
  it now stays as it is. `\frac{x}{\sqrt{x^3}}` and `x^2\sqrt{x^3}` changed
  the same way. With the integration rules loaded, `\int\frac{1}{x\sqrt{4x^3}}\,dx`
  gave `-\frac{1}{3x^{3/2}}`, wrong for `x < 0`; it now gives
  `-\frac{1}{3\sqrt{x^3}}`. A fold that keeps the value is still made:
  `x\sqrt{x^5}` is `x^{7/2}` and `x(x^3)^{2/3}` is `x^3`.
- **A negative fractional power of a power, a quotient or a product keeps its
  value for a negative base.** `(1/x)^{-1/4}` was `\sqrt[4]{x}` and
  `(x^3)^{-1/4}` was `x^{-3/4}`: at `x = -2` the first gave `0.84 + 0.84i`
  instead of `0.84 - 0.84i`, the second `-0.42 - 0.42i` instead of
  `0.42 - 0.42i`. `(x^2)^{-1/4}` was `\frac{1}{\sqrt{x}}`, and
  `(xy)^{-1/4}` was split into the roots of `x` and `y`. They now stay
  `\frac{1}{\sqrt[4]{\ldots}}`. A rewrite that keeps the value is still made:
  `(x^3)^{-1/3}` is `\frac{1}{x}`.
- **An odd root of a value declared `complex` is its principal value.** With
  `z` and `w` declared `complex`, `\sqrt[3]{z^3}` simplified to `z`,
  `z(z^3)^{2/3}` to `z^3`, `(zw)^{-1/3}` to `\frac{1}{\sqrt[3]{z}\sqrt[3]{w}}`
  and `(-z)^{-1/3}` to `-\frac{1}{\sqrt[3]{z}}`: these rewrites read an odd
  root as the real root, which is right only for a real radicand. At
  `z = -1 + i`, `\sqrt[3]{z^3}` is `1.366 + 0.366i`, not `-1 + i`. They now
  stay as written. For an unconstrained symbol they are still made, as the
  generic-real convention says: `\sqrt[3]{x^3}` is `x`.
- **With the integration rules loaded, an integral of a product of three
  square roots of linear factors no longer gives the negative of the
  antiderivative.** `\int\frac{\sqrt{c+dx}}{\sqrt{a+bx}\sqrt{g+hx}}\,dx` had
  the wrong sign when `bg < ah`: at `a = 0.7`, `b = 1.3`, `c = 2.3`,
  `d = 1.1`, `g = 0.9`, `h = 1.9` and `x = 0.21`, its derivative was
  `-1.415` where the integrand is `1.415`. `\sqrt{c+dx}\sqrt{a+bx}\sqrt{g+hx}`
  and `\frac{\sqrt{a+bx}\sqrt{g+hx}}{\sqrt{c+dx}}` were wrong the same way.
- **A call of `AddTo` on a cell of an array that a constant list holds is no
  longer reported.** With `const m = [arrayFrom([1, 2])]`, `epsil check`
  reported `AddTo(m[1][2], 1)` as an assignment to the constant `m`, although
  the program stores 3 in the array and `m[1][2] += 1` was not reported. Both
  are now stores of a cell. `AddTo(c[1][2], 1)` with `const c = [[1, 2]]` is
  still reported.
- **The run of a compiled function value that leaves out a parameter with a
  default value reads the inputs object.** For `(x, y = 2) => x + y + k`
  compiled with `inputs: { k: "real" }`, `run(1, { k: 10 })` read the object
  as `y` and gave `NaN`; it now gives `13`.
- **A fetch that `ce.arrayAllocation` leaves pending during `ArrayFrom(a)` is
  no longer reported as `array-allocation-refused`.** When the function of
  the host marks `a` stale and the fetch fails, the error of the fetch is
  reported.

### Performance

- **Compiled code that reads no cell of an array no longer runs its pending
  fetch.** A function `(t) => do { draw(board); 0 }` whose host function
  `draw` marks the cells of `board` stale (`markStale()`) called the fetch
  after each call of `draw`; it now calls none, and the fetch runs at the next
  access of the cells. Code that reads or stores a cell fetches as before.
- **The simplification of an indefinite integral's result has a step budget
  of its own (CE-2014).** With the integration rules loaded,
  `ce.expr(['Integrate', f, 'x']).evaluate()` for
  `f = (a + b sin(e+fx))^m (c + d sin(e+fx)) (A + C sin²(e+fx))` found the
  antiderivative in about 1 s, then took about 400 s to simplify it; two
  similar integrands took about 12 minutes and more than 20 minutes. They now
  take about 9 s. A result whose simplification needs more than 50,000 steps
  (see `ce.withStepBudget()`) is returned unsimplified; it is the same
  antiderivative, written at more length. On the answers of the rules for
  the 1,280 integrands of casbench's benches F and H, this applies to 16 of
  663.

## 0.205.0 _2026-11-29_

### New Features

- **A color has fields.** `Field(c, "r")`, written `c.r` in Epsil, reads a
  channel of a color, whatever color space it was written in: `r`, `g`, `b`
  are the sRGB channels (0 to 1), `l`, `c`, `h` the OKLCh channels, `alpha`
  the opacity (1 for a color with no alpha) and `hex` the string of
  `ColorToString`. `rgb(1, 0.5, 0).r` was an `incompatible-type` error; it is
  now `1`, `hsl(0, 1, 0.5).r` is `1`, `rgb(1, 0, 0).l` is `0.6279…` and
  `rgb(1, 0.5, 0).hex` is `"#ff8000"`. A field of the space of the color is
  the channel as written (`rgb(1/3, 0, 0).r` is `1/3`), a color outside the
  sRGB gamut gives its channels as they are (`oklch(0.7, 0.4, 30).r` is
  `1.3196…`), and the hue of a gray is 0. A name that is not a field is an
  `unknown-field` error.

- **Two colors can be compared.** `Equal` and `NotEqual` of two colors are
  now decided: two colors are equal when each sRGB channel and the alpha
  differ by at most 1e-6, whatever color spaces they are written in.
  `rgb(1, 0, 0) == hsl(0, 1, 0.5)` and `rgb(1, 0, 0) == rgb(0, 1, 0)` stayed
  unevaluated, as did an `If` on them; they are now `True` and `False`. A
  color with a `NaN` channel is equal to no color. The new
  `ColorMatches(c, d, tolerance)`, `c.matches(d, tolerance)` in Epsil, is the
  same test with a tolerance that the caller gives:
  `rgb(1, 0, 0).matches(rgb(0.96, 0, 0), 0.05)` is `True`. `ColorDelta` stays
  the perceptual distance.

- **`ColorUpdate(c, channels)` gives a copy of a color with some channels
  replaced,** `c.update({…})` in Epsil. The keys of the dictionary are `r`,
  `g`, `b` (the result is an `Rgb` color) or `l`, `c`, `h` (an `Oklch`
  color), with `alpha` in either case or alone:
  `rgb(1, 0, 0).update({alpha -> 0.5})` is `Rgb(1, 0, 0, 0.5)`, and
  `rgb(1, 0, 0).update({l -> 0.8})` is `Oklch(0.8, 0.2577…, 29.23…)`. Keys of
  the two models together are an `expected-value` error.

- **`Rgb255(r, g, b, alpha?)` is an sRGB color with channels from 0 to
  255.** It is `Rgb(r/255, g/255, b/255, alpha)`; the alpha stays from 0 to 1.
  `Rgb255(255, 128, 0)` is `Rgb(1, 128/255, 0)`, and
  `ColorToString(Rgb255(255, 128, 0))` is `"#ff8000"`.

- **An `array<color>` stores each color in four bytes.** A cell holds the
  bytes R, G, B and A of sRGB in one `Uint8Array`, the layout of an
  `ImageData`, so a raster of colors is the pixels of a canvas with no
  conversion. A store converts the color to sRGB and stores each channel and
  the alpha as `floor(255 v + 0.5)`, clipped to 0 to 255 (0 for `NaN`); no
  channel is gamut mapped. A read gives `Rgb(r/255, g/255, b/255, a/255)`,
  with no alpha when its byte is 255, and `Rgb(NaN, NaN, NaN)` for an index
  that names no cell. After `a[1] = oklch(0.7, 0.1, 30)`, `a[1]` is
  `Rgb(0.8352…, 0.5254…, 0.4745…)`, `a[1].hex` is `"#d58679"`, the `hex` of
  the color stored, and `a[1].matches(oklch(0.7, 0.1, 30), 1/255)` is `True`.
  `a[i] == c` holds when each channel of `c` is a multiple of 1/255
  (`rgb255(255, 128, 0)`, `color("white")`).
  `ArrayFrom(colors, "color")` makes such an array from a list of colors.

- **`ce.array(bytes, "color")` adopts a `Uint8Array` of four bytes for each
  cell,** with no copy, as for a tuple cell of four bytes: the host, the
  interpreter and compiled code read and write the same bytes. A length that
  is not a multiple of 4 throws a `TypeError`.

- **Compiled JavaScript reads and writes the cells of an `array<color>`,
  and GLSL reads them.** The code stores the bytes that the interpreter
  stores. A channel of a cell (`px[i].r`) is one read of a byte and one
  division, with no color object; a cell stored unchanged copies its four
  bytes; a test of a cell against a constant color whose channels are
  multiples of 1/255 (`px[i] == color("white")`) compares the four bytes; a
  constant color stored is four byte constants. An invert pass takes 1.4 to
  1.7 times the same pass over tuples of four bytes. A store of a color that can be of two color spaces at run time
  declines: convert each arm with `AsRgb`. On GLSL a cell is a `vec4` of the
  sRGB channels and the alpha, read from an `RGBA8UI` texture or, with
  `storage: { A: 'sampler2D' }`, from a normalized `RGBA8` texture with no
  arithmetic.

### Behavior Changes

- **A sum of two lists whose declared lengths differ is an
  `incompatible-dimensions` error when the sum is built** (CE-1915). With
  `p: list<real^2>` and `q: list<real^3>`, `p + q` was a valid expression of
  type `vector<real^2> | vector<real^3>`, and only its evaluation gave
  `Error("incompatible-dimensions", "2 vs 3")`. The sum is now that error
  when it is built, of type `error`, and the Epsil function
  `function f(p: list<real^2>, q: list<real^3>) { p + q }` gets the
  diagnostic `incompatible-dimensions` before it runs. The same holds for a
  difference, a scalar multiple (`p - 2q`), list literals (`[1, 2] + [1, 2, 3]`,
  `[] + [1, 2]`) and matrices (`[[1, 2, 3], [4, 5, 6]] + [[1, 2], [3, 4]]` is
  `Error("incompatible-dimensions", "2x2 vs 2x3")`). A list whose length is
  not stated (`list<real>`), or whose type was only inferred, is still checked
  when the sum is evaluated.

- **A name in parentheses in the subscript of a sum or a product is a lower
  bound with no index.** `\sum_{(n)} n` and `\prod_{(k)}^{5} k` read `n` and
  `k` as the index; they now read it as a lower bound with no index, the
  spelling that the serializer uses for `Limits(Nothing, n, Nothing)`. To
  name the index, write it with no parentheses: `\sum_{n} n`.

- **The standard library declares the parameters that map over a
  collection as `broadcastable<T>`.** It no longer sets the `broadcastable`
  flag on those definitions: the Epsil hover and signature help show the
  signature of `Sin` as `(broadcastable<complex | quantity>) -> number`, and
  that of `And` as `(broadcastable<boolean>+) -> boolean`. The type of the
  symbol (`ce.box('Sin').type`) is unchanged. Values, the types of calls and
  their error texts do not change, and the `broadcastable` property of a
  boxed definition is still `true` for these operators. An operator that you
  declare with an `evaluate` handler still sets `broadcastable: true` to
  map. `Add`, the relational
  operators, `String`, `Remainder`, `Conjugate`, `Chop` and `Symbol` keep the
  flag for now.

- **The cells of an `array<color>` are four bytes; they were expressions.**
  A color stored in a cell is converted to sRGB and rounded to 8 bits for
  each channel and for the alpha, so the cell no longer reads as the color
  written: after `a[1] = oklch(0.7, 0.1, 30)`, `a[1]` was that `Oklch`
  color and is now an `Rgb` color one rounding away from it. Declare
  `array<any>` to keep each color as written.

- **`Color` of a string answers in the color space of the string.** It
  answered an `Oklch` color for every string. It now answers an `Rgb` color
  for a hex code, an `rgb()` spelling or a color name, an `Hsl` color for an
  `hsl()` spelling, and an `Oklch` or `Oklab` color for an `oklch()` or
  `oklab()` spelling. `Color("#ff8000")` was
  `Oklch(0.7319…, 0.1858…, 52.98…)`; it is now `Rgb(1, 0.50196…, 0)`, whose
  green channel is exactly 128/255. The color is the same; a program that
  reads the head or the operands of the result must convert it first, with
  `AsOklch`. Compiled code holds the same color in the same space.

- **A compiled color has the color space of the interpreter's value.**
  Compiled JavaScript gave every color as an object in OKLCh; it now gives
  it in the space of the expression. The result of `Rgb(x, y, 0.2)` was
  `{space: 'oklch', c0: 0.7066, c1: 0.1265, c2: 84.3}`; it is now
  `{space: 'rgb', c0: x, c1: y, c2: 0.2}`, the object that the interpreter
  fallback gave. On GLSL a color is a `vec4` (three channels of its space and
  the alpha) where it was an OKLCh `vec3`, and the compile result names the
  space of a color result in the new field `resultColorSpace`. An `If` or a
  `Which` whose arms are colors of two spaces gives an OKLCh color, as
  before. A host that read `c0`, `c1`, `c2` as OKLCh reads `space` first, or
  wraps the expression in `AsOklch`.

- **The last digits of some color conversions change.** The conversions
  among sRGB, OKLab and OKLCh now compute on the scale of 0 to 1, where an
  sRGB channel went through the scale of 0 to 255 and back. About 2% of the
  results of a test corpus change, by a relative difference of at most
  3.3e-15.
  `AsRgb(Oklch(0.7, 0.15, 30))` was
  `Rgb(0.9285976515499296, 0.4631929689711924, 0.3942510749698917)`; it is
  now `Rgb(0.9285976515499293, 0.4631929689711925, 0.39425107496989165)`.
  Exact values and `NaN` results do not change.

- **The absolute value of a numeric indexed collection is typed so that it
  holds the norm of a point** (CE-1840). With
  `u: indexed_collection<number>`, `Abs(u)` was typed
  `list<real<0..> | signed_infinity>`, but for `u := (1, 2)` it gives the
  norm of the point, `√5`, which is not a list. It is now typed
  `list<real<0..> | signed_infinity> | nan | real<0..> | signed_infinity`.
  `Hypot(u, 3)` is now typed `list<number> | number` for the same reason.

### Improvements

- **A record of the program restyled in a loop compiles to JavaScript**
  (CE-1953). With `let c = R([0, 1], nothing)`, a value of a declared record
  type, a function whose local `let out: R = c` a loop writes with
  `R(out.geom, "blue")` declined, so an animation that restyles a figure
  made before it ran interpreted at each frame. The local took the integer
  list `[0, 1]` of `c`, and the loop wrote a list of reals there. The local
  now holds reals at such a field, as it did for a figure made in the frame
  or for a named tuple.

- **`ArrayFrom(a)` of a mutable array copies its storage when the cells
  already fit the new cell type.** A copy of an array of 1,048,576 `Pixel`
  cells (`arrayFrom(a, "Pixel")`) took about 1.5 s, because each cell was
  read as a tuple and stored again; it now takes about 1 ms. The copy is
  made this way when the two cell types are the same tuple of four bytes,
  are both `color`, or are numeric cells of one storage where the cell type
  of `a` is in the new cell type. Every other copy still checks each cell.

- **A function compiled to JavaScript takes inputs, and holds the value of
  a variable of the block that made it.** `compile()` of a function with a
  name in the `inputs` option declined (`success: false`); it now compiles,
  and `run()` takes the values of the inputs in an object after the
  arguments: with `f` the function `x ↦ x + k`,
  `compile(f, { inputs: { k: 'real' } }).run(1, { k: 10 })` is `11`. A
  function that was made in a block and that reads a variable of the block
  also declined when it was compiled after the block. It now compiles, with
  the value of the variable in the code, when the block assigns the variable
  only where it declares it: in Epsil, after `let t = 3` and
  `let f = do { let k = 2 * t; (x) => x + k }`, `compile(f).run(1)` is `7`
  from compiled code. A variable that the block assigns again and the
  variable of a loop still decline; give them in `inputs`.

- **Compiled color code allocates nothing inside a function and is
  faster.** The conversions among sRGB, OKLab and OKLCh, `ColorMix` and
  `ColorDelta` compile to arithmetic on the channels, with no object for a
  color that is made and read in one function, and a conversion of a
  constant is computed when the code is compiled. On JavaScript,
  `ColorDelta(Rgb(x, y, 0.2), AsOklch(Oklab(x, 0.1, y)))` went from about
  830 ns to about 120 ns for each call, and one OKLCh channel of an `Rgb`
  color from about 350 ns to about 70 ns. `AsOklab`, `AsRgb`, `AsHsv` and
  `AsHsl` now compile anywhere in a GLSL program (they compiled only as its
  result), and `ColorToString` compiles for every color whose space is
  known when the code is compiled.

- **The fields of a color, `ColorMatches`, `==`, `ColorUpdate`, `Rgb255` and
  an alpha compile.** On JavaScript and GLSL, `Field(c, "r")` and the other
  fields of a color (`hex` on JavaScript only), `ColorMatches`, `Equal` and
  `NotEqual` of two colors, `ColorUpdate` with a dictionary literal and
  `Rgb255` compile, and a color can have an alpha: `Rgb(r, g, b, a)` and a
  color string with an alpha compiled to a decline. A field, a comparison or
  an update of a color made in the same function makes no object:
  `(x, y) ↦ Rgb(x, y, 0).l` and `(x, y) ↦ Rgb(x, y, 0) == Hsl(0, 1, 0.5)`
  compile to arithmetic on `x` and `y`. `ColorToColorspace` of a color whose
  alpha is not known when the code is compiled declines, because its result
  has three or four elements.

- **A color can be an input of compiled code, a parameter of a compiled
  function and an argument of a function of the host.** A name declared
  `color` with no value, or named in `inputs: { tint: 'color' }`, is an input.
  On JavaScript the host passes the object `{space, c0, c1, c2, alpha}` in any
  of the five spaces, the form of a result, so a result can be passed back:
  `run({ x: 0.5, tint: { space: 'hsl', c0: 30, c1: 1, c2: 0.5 } })`. On GLSL
  the input is a `vec4` of the sRGB channels and the alpha, which the host
  reads from the fields `r`, `g`, `b` and `alpha`. A parameter declared
  `color`, or with no type, takes a color of any space, and a color given to a
  function that the host declared is the color the interpreter passes: with a
  host function `probe`, `probe(Rgb(t, 0, 0))` calls it with `Rgb(t, 0, 0)`.
  Each was a decline.
  `AsHsv`, `AsHsl`, `ColorToString`, `GamutMap`, the field `hex` and a call of
  the host decline on an input, whose color space is the host's choice;
  `AsRgb(tint).hex` compiles.


- **`ColorDelta` is computed in OKLab directly and is faster.** Each color
  was converted to OKLCh and back to OKLab before the distance was taken.
  The channels of an `Oklab` color are now read as written, an `Oklch` color
  is converted once, and any other color is converted from its sRGB
  channels. In compiled JavaScript,
  `ColorDelta(Rgb(x, y, 0.2), Oklab(x, 0.1, y))` went from about 110 ns to
  about 50 ns for each call. The last digits of a result can change: the
  interpreter and compiled code change together.

- **A color that crosses a call in compiled JavaScript costs less.** The
  color object of a result, of an argument and of the result of a function
  that the code does not inline is made with a check of its channels that
  allocates nothing. A loop that mixes each of 64,000 cells with a color
  input took 15.4 ms and takes 8.0 ms; through a user function that the code
  does not inline, 25.9 ms and 11.2 ms. The object is unchanged.

- **`LaguerreL(n, a, x)` is the generalized Laguerre polynomial Lₙ⁽ᵃ⁾(x)**
  (#668, contributed by [enumeratio](https://github.com/enumeratio)), as in
  Mathematica's `LaguerreL[n, λ, x]` and mpmath's `laguerre(n, a, x)`. It was
  an `unexpected-argument` error. A literal degree gives the expanded
  polynomial (`LaguerreL(2, a, x)` is `a²/2 + x²/2 − a·x + 3a/2 − 2x + 1`),
  an exact rational `a` and `x` the exact value (`LaguerreL(3, 1/2, 2)` is
  `−43/48`), and a float, or `N()`, the three-term recurrence
  (DLMF 18.9.13). `LaguerreL(n, 0, x)` is `LaguerreL(n, x)`. For `a < −1`
  the recurrence cancels (`L₅₀⁽⁻³⁰·⁵⁾(0.1)` had a relative error of 10⁷ in
  doubles), and the value is the explicit sum (DLMF 18.5.12) with guard
  digits, or the call stays unevaluated. JavaScript compiles it (the explicit
  sum for `a < −1`, within 1e-14); GLSL and interval-js decline, as the
  recurrence there is not reliable in single precision.

- **JavaScript compiles six more forms that a combinatorics corpus uses
  (#638).** Each gave the decline in parentheses and now gives the
  interpreter's value:
  - an empty list that nothing types, such as `First(Tuple(List(), n))`
    ("an empty list"). It is an empty list of integers; a join with a list of
    strings or points still declines;
  - `IndexOf(P, Mod(i, Length(P)) + 1)` of `P: list<integer>` inside a `Map`
    over a `Range` ("IndexOf of a value that the interpreter may hold
    exactly"). The needle is an integer, although its static type is `real`;
  - a list of rank 2 such as `[[1, 2], [3, 4]]` as the argument of a
    parameter of type `list<list<integer>>` ("…, a list of lists of two
    lengths not stated, that is not a list of lists of run-time length");
  - `At(T, k)` of `T: tuple<list<integer>, list<integer>>` at a `k` known
    only at run time ("At of a tuple whose parts have different lanes at an
    index that is not a constant"). Out of range the row is absent:
    `Length(At(T, k))` is `NaN` and `IsMissing(At(T, k))` is `True`. The row
    as the result of the program still declines;
  - a `Fold` or a `Reduce` from a tuple of a number and a list, such as
    `Fold((a, b) ↦ (a[1] + b, Append(a[2], b)), (0, P), Range(1, n))`
    ("Reduce from a value that is not a real number, a Boolean, or a flat list
    or tuple of them"). A step that changes the lane of a part declines;
  - a row at an index known only at run time as an element of a list of
    rows, such as `List(At(L, IndexWhere(L, …)), [1])` or
    `Map(i ↦ L[i], Range(1, n))` ("a row at an index known at run time as an
    element of a list"). Where the row is absent, it is an empty row in
    compiled code, where the interpreter keeps `Missing`: a new caveat of
    compiled code. The row as the result, or carried by a loop, still
    declines.

- **A long list of numbers compiles faster.** A `List` of at least 128 number
  literals is now one value of the compiler, not one constant per element.
  The compilation of `T[⌊99x⌋ + 99⌊99y⌋] − 3`, with `T` a list of 9,801
  numbers, took about 80 ms on JavaScript and 68 ms on GLSL; it now takes
  about 23 ms and 21 ms. The cost of each element went from about 6 µs to
  under 1 µs. The compiled code is the same. A list of more than 50,000
  numbers, which declined ("more than 50000 nodes to lower"), now compiles
  on JavaScript and on GLSL.

### Bug Fixes

- **The type of a call of a custom operator with a JavaScript `evaluate`
  handler and a `broadcastable<T>` parameter agrees with its value**
  (CE-1966). Such an operator receives a list argument whole, unless its
  definition sets `broadcastable: true`, but the type of the call was the
  type of a mapped call. With `k` declared
  `(a: broadcastable<value>) -> value`, `k([1, 2])` was typed
  `list<value^2>` and evaluated to the single value of the handler; it is
  now typed `value`. Set `broadcastable: true` to map the call over the list.

- **A test or a count over a reversed sorted list that cannot be sorted stays
  unevaluated** (CE-1938). With `x` declared `real`, `Sort([3, x, 1])` cannot
  order its elements and stays unevaluated, and a `Reverse` over it has no
  elements to read. With `r = Reverse(Sort([3, x, 1]))`, `Any(r, k ↦ k > 2)`
  gave `False`, `Count(r, a ↦ a > 2)` and `Count(Take(r, 2), 3)` gave `0`.
  They now stay unevaluated, as for the sorted list without `Reverse`. The
  same holds for a `Map` over such a list, with or without `Reverse`:
  `Any(Map(k ↦ 2k, Sort([3, x, 1])), k ↦ k > 2)` gave `False`.

- **An Epsil type error at a variable operand of a sum underlines the variable,
  also when the statement holds another sum or a subtraction** (CE-1932). In the
  body `let y = nr(t - 1); figureDraw(y + 1)`, with `nr` declared `-> nothing`,
  the error "expected `number`, got `nothing` at `y`" underlined the whole
  function statement, because `t - 1` is a sum too. It now underlines the `y` of
  `y + 1`, as it did with `nr(t)`. When two sums of the statement have the
  operand `y`, the statement is still underlined.

- **The Epsil static check no longer reports a type error for a call that maps a
  list** (CE-1929). With `let f = (p, x: real) => p[1] + x`, the call
  `f([1, 2], [10, 20])` gives `[11, 21]`, because the call maps over the list at
  `x`, but the check reported `incompatible-type` at `[10, 20]`. The check now
  admits the list where the call maps it. A value that does not fit is still
  reported: `f([1, 2], "a")` is an `incompatible-type` error.

- **An Epsil body that is only an equation of an element or a field of a
  variable gets the warning `equation-not-assignment`** (CE-1864). In
  `let a = [1, 2]; match 1 { 1 => a[1] = 2 }; a`, the case body compares `a[1]`
  with `2` and `a` stays `[1, 2]`, with no diagnostic. The program now gets the
  warning, as `a = 2` in the same place did. The same holds for a field
  (`p.x = 2`), a nested place (`p.pixels[i] = 9`) and the other bodies of the
  warning: a branch of a conditional expression and a function. Write
  `do { a[1] = 2 }` to store the element. The value of the program does not
  change.

- **In a function body, the Epsil editor completion and signature help see a
  variable declared further down.** With `let h = () => mea` above
  `let mean = (x) => x + 4`, the completion of `mea` offered `mean` as the
  library function, and with no library function of that name it did not
  offer the variable at all, although `mean` in the body names the variable.
  It now offers the variable `mean`. In the same way, with
  `let mean: (real) -> real = (x) -> x + 4` further down, the signature help of
  a call `mean(` in a function body shows `mean(real) -> real`, not the
  signature of the library function. A read outside a function body
  (`let h = mea` above the `let`) still names the library function.

- **The Epsil guide states where a pipe puts the piped value when the call
  leaves out `_`** (CE-1974). The guide said "the first slot its type fits". The
  piped value goes in the last slot that its type fits, with each written
  argument in a slot that fits it: `3 |> fill(2)` is `fill(2, 3)`, which is
  `[2, 2, 2]`. The behavior does not change.

- **The limit of an inverse function, a composition or a derivative given by
  its name is a number** (CE-1951). `["Limit", ["InverseFunction", "Sin"], 0]`
  and `["Limit", ["Composition", "Sin", "Cos"], 0]` evaluated to the function
  name `"Sin"`, and `["Limit", ["Derivative", "Sin", 1], 0]` had the numeric
  value `NaN`. The exact limit now stays unevaluated, and the numeric value
  is the limit of the function: `0`, `0.8414…` (sin 1) and `1`. A numeric
  limit samples such a function with its numeric value, and a sample that is
  not real is `NaN`: the limit of `["InverseFunction", "Sin"]` at `Infinity`
  is `NaN`, not the real part `1.5707…`. The LaTeX form of a limit whose
  function is not a function literal is a call of `Limit`, which reads back as
  the same expression: `\mathrm{Limit}(\sin^{-1}, 0)`, where it was
  `\lim_{\to0}\sin`, and `\mathrm{Limit}(\sin, 0)` for `["Limit", "Sin", 0]`,
  where it was `\lim_{\to0}`, which lost the function.

- **A `+=` to a constant is reported before an Epsil program runs.** With
  `const c = 1`, the assignment `c = c + 1` is reported by the static check
  (`epsil check`, the editor) as `constant-assignment`, but `c += 1` was
  reported only when the program ran, as a `runtime-error`. The static check
  now reports `c += 1` and `c[1] += 1` the same way, and the run does not
  report it a second time. A `+=` to a cell of an array that a constant holds
  (`const a = arrayFrom([1, 2])`, then `a[1] += 1`) stays valid.

- **A written list of two bounds is a range also when a bound is a variable.**
  In an `Element` clause, the list `["List", a, b]` of two integers is the range
  from `a` to `b`. With `n` assigned `3`,
  `["Set", "k", ["Condition", ["Element", "k", ["List", 1, "n"]]]]` gave
  `["Set", 1, 3]`, while the list `["List", 1, 3]` gave `["Set", 1, 2, 3]`. A
  bound that is not an integer literal is now evaluated, as the bound of a
  `Range` is: the set is `["Set", 1, 2, 3]`, and the sum of `k` over the same
  list is `6`, not `4`.

- **In a scope with a user function named `Exp` or `Negate`, a power of a call
  of that function is a power of its value** (CE-1936). After
  `ce.declare('Exp', 'function')` and
  `ce.assign('Exp', ce.expr(['Function', ['Add', 'a', 100], 'a']))`,
  `ce.expr(['Exp', 'x']).pow(2)` gave `e^(2x)`, which is `7.389…` at `x = 1`. It
  now gives `10201`. A square of a call of a user function `Negate` gave `x^2`,
  which is `1` at `x = 1`; it now gives `10201` too.

- **A sum whose index has the name of a variable in its bound is computed.** In
  an Epsil program, `let n = 3` followed by the statement `sum(n, n in 1..n)`
  gave the unevaluated `Sum(n, Element(n, Range(1, n)))`, while
  `let r = sum(n, n in 1..n)` gave `6`. The bound read the index, which has no
  value, and not the variable `n`. The statement now gives `6`, as do
  `product(n, n in 1..n)` and `Sum(n, Limits(n, 1, n))`.

- **The numeric value of `GCD` and `LCM` of a list that a variable holds is
  exact for large integers.** With `L` assigned `[2^100, 6^50]`,
  `GCD(L).N()` and `LCM(L).N()` gave `NaN`, while `GCD([2^100, 6^50]).N()`
  gave `2^50`. The elements are now read from the exact value of `L`:
  `GCD(L).N()` is `1125899906842624` and `LCM(L).N()` is `2^100·3^50`. This
  applies also to a lazy collection such as `Reverse(L)` and to a list
  parameter of a user function.

- **The LaTeX of a sum with a power in its lower bound and an upper bound
  reads back.** `Sum(x, Limits(k, a^2, 5))` was written `{\sum_{k=a^2}}^5x`,
  which reads as an error. It is now written `\sum_{k=a^2}^5x`.

- **The LaTeX of a sum with no index and a lower bound that is a name reads
  back as the same sum.** `Sum(x, Limits(Nothing, a, 5))` was written
  `\sum_{a}^5x`, which reads back with the index `a` and no lower bound. The
  bound is now written in parentheses, `\sum_{(a)}^5x`, and the parser reads
  a name in parentheses in the subscript as a lower bound with no index. A
  name with no parentheses, `\sum_{a}^5x`, is still the index.

- **The differences of an empty list are the empty list.** `Differences([])`
  was an `incompatible-type` error, while `Differences([1])` gave `[]`. It now
  gives `[]`. A source whose elements are not numbers, such as a string, is
  still refused.

- **A `Limit` with a negative direction other than -1 is the limit from
  below.** `Limit(Abs(x)/x, 0, -2)` gave `1`, the limit from above, while
  `NLimit(Abs(x)/x, 0, -2)` gave `-1`. `Limit` now reads the sign of the
  direction, as `NLimit` does: the value is `-1`.

- **The report of the inputs of compiled JavaScript gives `array` for a list
  of lists.** For an input declared `list<list<real>>`,
  `freeSymbolTypes.g.lowered` was `rows`, a value that the reference of
  `FreeSymbolType.lowered` does not list. It is now `array`, as for a
  `list<real>` or a `matrix<real^2x3>`: the host gives an array of arrays.

- **A congruence with a side that is not an integer stays unevaluated.**
  `Congruent(Sqrt(2), 0, 3)` and `Congruent(1/2, 2, 3)` gave `False`, because
  each side was rounded to an integer, and `Congruent(2.5, 0.5, 2)` gave `True`.
  A side or a modulus that is not an integer now leaves the call unevaluated,
  with `evaluate()` and with `simplify()`.

- **The numeric inverse of a matrix of real numbers that is close to a
  singular matrix is the inverse of that matrix.** For `d = 2⁻⁴⁴`,
  `Inverse([[1, 1, 0], [1, 1 + d, 1], [0, d, 2]]).N()` and `Inverse` in
  compiled JavaScript gave `[-1, 1, 0]` as the last row, the inverse of the
  matrix with a 0 in place of the `d` of row 2; it is now `[1, -1, 1]`. A
  small entry of the elimination keeps its value, and it is not a pivot
  when it is a rounding residue. A singular matrix still has no inverse, as
  before.

- **The signature of `CanonicalForm` admits a form given as a string.** It
  was `(any, symbol*) -> any`, but the examples and the calls give a form as a
  string: `canonicalForm(Hold(1 + x), "Order")`. It is now
  `(any, (string | symbol)*) -> any`, and the documentation of the parameter
  has the sample `"Order"`. The value of a call does not change.

- **`c.update(…)` and `c.matches(…)` reach a color when the receiver has no
  type and a protocol declares a function of that name.** With
  `protocol Drawable { function update(self: Self, opts: dictionary) -> Self }`
  declared for the types of a program, `v => v.update({alpha -> 0.5})` called
  with a color gave `protocol-implementation-missing`, and
  `v => v.matches(rgb(1, 0, 0), 0.1)` was refused when the function was read.
  Such a call is now decided when it runs: the member of a color for a
  color, the protocol function for another value. Its type is `unknown`
  where it was the result type of the protocol function, and the count of
  its arguments is checked when it runs. A receiver of a declared type and a
  call with no dot are not changed.

- **A compiled function that reads a variable of the block that made it no
  longer takes the value of another variable of the same name.** In Epsil,
  after `let k = 6` and `let f = do { let k = 2; (x) => x + k }`,
  `compile(f).run(1)` was `7`, from compiled code that held the outer `k`;
  it is now `3`, as `f(1)` is. When the block assigns its `k` again, or `k`
  is the variable of a loop, the function now declines and `run()` gives the
  interpreter's value, where it gave a value computed with the outer
  variable.
- **A non-integer degree leaves `ChebyshevT`, `ChebyshevU`, `LegendreP`,
  `HermiteH` and `LaguerreL` unevaluated,** as documented (CE-1592, #668,
  contributed by [enumeratio](https://github.com/enumeratio)).
  `HermiteH(2.5, x)` was
  `Error(ErrorCode('incompatible-type', 'integer', '2.5'), 2.5)`, and so
  were `HermiteH(5/2, x)` and `HermiteH(π, x)`; they are now the call, for
  `evaluate()`, `N()` and the parse route. Compiled code is NaN there, as for a
  negative degree of `HermiteH`.
- **The Epsil editor functions describe a call of a library function as that
  function when a protocol has a member of the same name.** With a protocol
  of an earlier program of the engine
  that declares `function fill(self: Self, c: any) -> integer` and a type
  `Grid` that conforms to it, a program calls the member for a first argument
  that is a `Grid` and the library function `fill` otherwise. The editor
  functions described every call by the member: `epsilSignatureHelp()` at the
  end of `fill(7, ` gave `fill(self: integer, c: any) -> integer`,
  `epsilHover()` gave the member, and `epsilCompletions()` listed `fill` with
  the signature of the member. `fill(7, ` now gives
  `fill(value: any, integer+) -> list`, `fill(g, ` with `g` a `Grid` gives
  `fill(self: Grid, c: any) -> integer`, and `fill(`, where no first argument
  tells, gives the library signature followed by the member's. The hover is
  the member where the first argument is known to conform and the library
  function elsewhere, and the completion list keeps the library function;
  the member is listed after `g.`. When two protocols declare a function of
  one name, signature help gives the signature of the protocol of the first
  argument, or one signature per protocol (CE-1959).
- **A function can pass a parameter that has no type to a protocol member
  that takes a point, a set, a dictionary or a function.** With a protocol
  member `function move(self: Self, v: tuple<real, real>) -> Self` and a type
  `U` that conforms, the Epsil definition
  `function f(c) { U("a", 1).move(c) }` was an `incompatible-type` error
  (``expected `tuple<real, real>`, got `unknown` ``), and `f((1, 2))` stayed
  unevaluated, although the same call of a function with that parameter type
  was accepted. The definition is now accepted and `f((1, 2))` gives the
  value of the member. The value is checked when the call is evaluated:
  `f("zz")` is an `incompatible-type` error. The bare call
  `move(U("a", 1), c)`, a function literal `(c) => U("a", 1).move(c)` and a
  parameter declared `any` behave the same way. A symbol with no value is
  passed to the member as it is, as it is to a function and to a member with
  a `real` parameter: `U("a", 1).move(q)`, with no value for `q`, was the
  same error, and now calls the member with `q`. For a member that takes a
  list, declare the parameter of the function `any` or with the list type: a
  parameter with no type maps the function over a list argument (CE-1957).
- **Compiled JavaScript passes a record that holds an empty list, or the
  result of `Filter`, to a function of the host.** With
  `type E = record{kind: string, bad: list<string>}` and its constructor
  function
  `function E(kind: string, bad: list<string>) -> E { {kind -> kind, bad -> bad} }`,
  a compiled callback that calls a function of the host as `show(E("c", []))`
  or `show(E("c", filter(xs, s => s != "x")))` declined ("a list or a tuple
  that the interpreter can hold as a lazy collection") and ran in the
  interpreter. Both now compile, and the host receives the value that the
  interpreter already gave: the record with `["List"]`, and with the `List`
  of the kept elements. A `Range`, a `Reverse` or another lazy list of a
  length known when the code is compiled, at most `ce.maxCollectionSize`,
  given to the constructor function (`show(E("c", reverse(["x", "y"])))`),
  compiles too. One difference: when the `Filter` keeps more than
  `ce.maxCollectionSize` elements (10,000 by default), the interpreter keeps
  it as a lazy collection in the record, and the compiled code passes the
  list (CE-1958).
- **A value piped into a protocol member of its type is the receiver of the
  member.** With a protocol member
  `function tint(self: Self, c: integer) -> integer` and a type `Grid` that
  conforms, the Epsil pipe `Grid(1, []) |> tint(2)` put the piped value last
  and gave a `protocol-implementation-missing` error for the integer `2`. It
  is now `tint(Grid(1, []), 2)`, the call that `Grid(1, []).tint(2)` makes,
  and the pipe has the type of that call. A member with the name of a
  library function no longer changes a pipe into that function: with a
  member `take(self: Self, n: integer)`, `[1, 2, 3] |> take(2)` was an
  `incompatible-type` error and is `[1, 2]` again, and `s |> take(2)` calls
  the member for a value `s` of a conforming type. A piped value whose type
  is not known (a parameter with no declared type) is the receiver of a
  member that has no library function of its name, and is placed as the
  library function places it otherwise. `epsilSignatureHelp()` marks the
  parameter `self` as filled by the piped value (`implicit: 'pipe'`) where
  the piped value is the receiver: after `g |> tint(` with `g` a `Grid`, it
  gives `tint(self: Grid, c: integer) -> integer` with the active parameter
  `c` (CE-1960).
- **The static check of Epsil offers the exchange of the arguments of a
  library function when a protocol has a member of the same name.** With a
  protocol member `function map(self: Self, f: any) -> integer`,
  `map(1..5, k => k^2)` gave the `incompatible-type` error on the whole call,
  with no note "arguments 1 and 2 look exchanged" and no fixit. The error is
  now on `1..5`, with the note and the fixit that gives
  `map(k => k^2, 1..5)`, as it is without the member (CE-1964).

## 0.204.5 _2026-11-28_

### Improvements

- **JavaScript compiles a value of a declared record type whose fields are
  lists of strings or unions with `nothing`.** With
  `type R = record{__tag: string, kind: string, bad: list<string>, fill: string | nothing}` and its constructor function `R(kind, bad, fill) -> R`,
  `R("c", ["x"], "red")` declined ("the parameter fill of R is not a scalar"),
  and so did `R("c", [], nothing)` ("an empty list", "Nothing as a value").
  These compile now and give the interpreter's value, as the same fields of
  a named tuple do. That includes an `if` whose arms give one value with
  `fill -> "red"` and one with `fill -> nothing`. A parameter declared with a
  union such as `string | nothing` takes the type of its argument, `[]` at a
  parameter of type `list<string>` is the empty list of strings, and a list
  of strings can be passed to a user function. Tycho's drawing prelude with
  `Figure` as a record compiles the same 46 of 50 figure cases as with the
  named tuple (CE-1949).
- **A definite integral with no closed form is searched once per engine
  state, not once per compile.** Before it compiles an integral numerically,
  `compile()` searches for an antiderivative. A search that ended without a
  closed form ran again at each compile of the same integral: for each
  target, and for each later compile. In the Tycho document
  `neyret/jejjp1xikd`, the row `s(x) / \int_{-1}^{1} s(x)\,dx` took about
  700 ms on JavaScript and 550 ms on interval-js. The second target now
  compiles in a few milliseconds, to the same code. A new assignment or
  assumption, or a narrower declared type of a symbol of the integral,
  starts a new search (CE-1944).
- **JavaScript compiles `DictionaryFrom` of a list of pairs whose keys are
  known when the code is compiled.** `dictionaryFrom([("a", t), ("b", true)])` declined ("the operator DictionaryFrom is not supported by the
  compiler"). It now gives `{ a: t, b: true }`. A later pair with the same key
  replaces the value, as in the interpreter. The list can also be a local
  declared `let pairs = []` that grows by `pairs = [...pairs, (k, v)]`, in
  straight-line code or in a `for k in keys(d)` loop over a dictionary
  literal. This is how Tycho's drawing prelude merges the options of a
  canvas, so an animation that calls `canvas.update({content -> …})` in each
  frame now runs compiled (CE-1925).

### Behavior Changes

- **A set over a symbol whose value is a list of two integers holds the two
  integers.** With `S := [1, 5]`, `\{k \mid k \in S\}` evaluated to
  `\{1, 2, 3, 4, 5\}`, as if `S` were the written range `[1, 5]`. It is now
  `\{1, 5\}`, and `3 \in \{k \mid k \in S\}` is `False`. A written
  `\{k \mid k \in [1, 5]\}` is still the range `\{1, 2, 3, 4, 5\}` (CE-1937).

### Resolved Issues

- **The limit of a function defined by cases with a branch that is the bare
  variable is the limit of that function.** `Limit(If(x < 0, x, 5), 0, -1)`
  evaluated to `False`, the limit of the condition `x < 0`, and
  `\lim_{x\to1}` of `If(x = 1, 5, x)` printed as `\lim_{5\to1}x=1`. The first
  operand of `Limit(f, a)` is now the body of the limit also when its type is
  not known: the limit from below is `0`, the limit from above `5`, the
  two-sided limit stays unevaluated, and `Limit(If(x = 1, 5, x), 1)` is `1`.
  `NLimit`, `ND` and `NIntegrate` read such an operand the same way; before,
  they gave `NaN` or stayed unevaluated (CE-1926).
- **A set built from the elements of a computed list holds the elements of
  the list.** `\{k \mid k \in \operatorname{Sort}([5,1])\}` evaluated to
  `\{1, 2, 3, 4, 5\}`: the sorted list `[1, 5]` was read as a range, as a
  written `[1, 5]` is. It is now `\{1, 5\}`. A set over
  `\operatorname{Take}([1,5,7],2)` or `\operatorname{Reverse}([1,5])` stayed
  unevaluated; it is now `\{1, 5\}` too (CE-1937).
- **An `evaluateMod` handler of a host operator that does not state its
  purity runs at each occurrence.** Before, a memoized evaluation could reuse
  its answer: with `evaluate` and `evaluateMod` handlers that both return an
  incrementing counter, `["List", ["Mod", ["Counter"], 10], ["Mod", ["Counter"], 10], ["Mod", ["Counter"], 10]]` evaluated to `[1,2,2]`; it is
  now `[1,2,3]`.
- **The compiled quotient `(a - Mod(a, c)) / c` asks the `compile` handler of
  an extended `Mod`.** With `ce.declare('Mod', { evaluate, compile }, { extend: true })` for a centered residue, the `bigint` mode compiled
  `(n - Mod(n, 3)) / 3` to a floor division and gave `0` at `n = 2`, where the
  interpreter gives `1`. The call is now lowered through the handler (or
  declines), and the same holds for `Floor`, `Ceil`, `Round` and `Truncate`
  of a product with an extended `Multiply`.

## 0.204.4 _2026-11-28_

### Improvements

- **An extension that replaces `evaluate` can keep the compiled lowering of
  the operator** (#527, contributed by
  [enumeratio](https://github.com/enumeratio)).
  `ce.declare(name, patch, { extend: true })` takes a `compile` field:
  `'inherit'` says that the new `evaluate` agrees with every call that the
  library lowering compiles, and a handler receives the `compile` handler of
  the extended definition as `context.inherited` and answers `undefined` to
  keep the library lowering of that call. `Beta` extended with an `evaluate`
  that gives 0 at its poles and `compile: 'inherit'` compiles to the same
  `_SYS.ir.beta(_.s, _.a)` as before, on `javascript` and `glsl`; without the
  field it called the handler as a host function. A handler that lowers the
  two-operand `Zeta(s, a)` as `HurwitzZeta(s, a)` and returns
  `context.inherited(…)` for `Zeta(s)` keeps `_SYS.ir.zeta(_.s)`. A patch that
  replaces `evaluate` and states no `compile` declines as before, and so does
  `'inherit'` on an operator that extends no library definition and has no
  `compile` handler. Any other
  value of `compile` throws. `D` and the canonical folds still treat such an
  operator as a user definition.
- **An operator can answer `Mod` without forming its value: the `evaluateMod`
  handler** (#527, contributed by
  [enumeratio](https://github.com/enumeratio)). `evaluateMod(ops, modulus, context)` on an operator definition returns the residue in `[0, modulus)`
  of an application of the operator, or `undefined` to decline. `Mod(x, m)`
  calls it, before `x` is evaluated, when `m` is an exact integer `>= 2`, the
  call is not under `.N()` and the operator of `x` has the handler;
  `PowerMod(a, e, m)` calls it for its base, then raises the residue to the
  exact non-negative `e` by square-and-multiply; `Mod(x, n, d)` reaches it
  through `d + Mod(x - d, n)`, with `x - d` built without evaluating `x`.
  `context.mod(y)` is the residue of an operand, through its own handler when
  it has one, so handlers nest, and it never evaluates an operand that has
  one. `Add`, `Multiply`, `Negate`, `Subtract` and `Power` (exact
  positive integer exponent) have a handler built on `context.mod`. For
  a declared `Huge(n)` whose `evaluate` throws and whose handler answers,
  `Mod(Huge(10^9), 7)` is `1` where it threw, and `Mod(2 * Huge(5) + 3, 97)`
  is `53`. A rational (`Mod(1/3, 7)` is `1/3`), a float operand, `.N()`, a
  modulus below 2, a non-integer modulus or a list modulus keep their
  values. The handler is read by the interpreter only: compiled code is
  unchanged. A patch that replaces `evaluate` through
  `ce.declare(name, …, { extend: true })` drops the old `evaluateMod`, unless
  it gives its own.
- **The agent cards are package exports** (CE-1948).
  `@cortex-js/compute-engine/for-agents.md` is the Epsil card and
  `@cortex-js/compute-engine/compute-engine-for-agents.md` the Compute Engine
  card, so a host that puts a card in a prompt reads it with
  `require.resolve` or `import.meta.resolve` instead of an internal path of the
  package. The Epsil card has a new section, "Order of Preference": a library
  function, then broadcasting, then a pipeline, then a loop, which functions
  broadcast over a list or a range, and loops rewritten as library calls
  (`nthPrime(1..100) |> sum`). Its one loop example, the Collatz path, is a
  loop that the other forms cannot replace.
- **JavaScript compiles a figure with options, then transformed.** With
  Tycho's drawing prelude, `polygon(pts, {fill -> "red"}).rotate(t)` and
  `circle(c, r, {fill -> "red"}).rotate(t)` declined ("the parameter x of
  figureBox is not a scalar (any)"): the loop that sets the options wrote
  the figure to a local, and the local lost the value of its `kind` field,
  so the `match` on the kind compiled every arm. A record local now keeps
  the value of a string field that every write copies
  (`out = U(out.kind, …)`); a write of another value still compiles, and
  the field is then read at run time.
- **A compiled integral computes the part of its integrand that does not
  depend on the variable once.** In
  `\int_x^\infty \frac{e^{-y/2} y^{k/2-1}}{\Gamma(k/2)\, 2^{k/2}}\,dy`, the
  denominator was computed at each node of the quadrature on JavaScript
  (CE-1942); it is now computed once per call, also when it is the body
  of a small user function (interval-js already did this, except for that
  body). That integral takes about 0.54 ms per call in place of 1.78 ms,
  with the same values. The same holds for a numeric derivative and the
  comparison of a `Sort`.
- **`Sign` of a complex compiles on GLSL**, as `z/|z|`, and `0` at `0`.
- **Shorter JavaScript and GLSL code**: `x * 1` and `x / 1` are `x`,
  `-c + x` is written `x - c` and `1 + (-0.4) * y` is written
  `1 - 0.4 * y`, a list of a constant length is built without a check of
  its length, and a GLSL loop of constant bounds has no `clamp`. The
  values are the same, bit for bit.
- **A seeded random list compiles on interval-js** (CE-1947). With
  `h := WithRandomSeed(660536, RandomChoice([0, 1), 400))`, the Desmos
  `h=random(400)`, a sum that reads `h[i+1]` declined on interval-js ("a
  list whose length is not one number"). The value of `h` is now the
  interpreter's, a list of point intervals, as on JavaScript; so is
  `2·WithRandomSeed(…) - 1`, the Desmos `2random(7)-1`, on both targets.
- **Seeded draws written in place are computed once** (CE-1943).
  `At(WithRandomSeed(628117, RandomChoice([0, 1), 6561)), …)`, the Desmos
  `random(9^4)[8θ]`, drew its 6,561 numbers again at each call of the
  compiled function, on JavaScript and interval-js; the code now holds the
  interpreter's list, and a call takes about 0.24 µs in place of 24 µs.
  GLSL declines as before.
- **`f'(x)` compiles on JavaScript when the derivative has no closed form**
  (CE-1945). `Apply(Derivative(f, 1), x)` of a user function `f` whose
  derivative exceeds the engine's size limit declined; it is now the
  numeric derivative of the call `f(t)` at `x`, as `D(f(x), x)` already
  compiled, and gives the interpreter's numeric value. Higher orders, a
  partial closed form (one that keeps a derivative head), GLSL and
  interval-js still decline.

### Resolved Issues

- **`Gamma(s, z)` at a real `z < 0` is computed in big decimals at the engine
  precision.** Since #612 it stayed unevaluated above 15 digits. The value is on
  the principal branch: for a positive integer `s`, `(s − 1)! e⁻ᶻ Σ zᵏ/k!`
  (DLMF 8.4.8), real and exactly 0 at its roots (`Gamma(2, -1)`); for a
  non-positive integer `s`, `−Ei(−z) − iπ` and the downward recurrence (DLMF
  8.4.15); otherwise `Γ(s) − γ(s, z)` (DLMF 8.7.1), with the digits lost to
  cancellation added to the working precision. `N(Gamma(1/2, -2.5))` at 30
  digits is `1.77245385090551602729816748334 − 9.87350823887727804137255293439i`.
  An order past 10 000 or a `z` past the work budget stays unevaluated.
  Measured against mpmath, every part has at least 29.4 correct digits at 30
  and 49.4 at 50. `Gamma(a, z0, z1)` with negative points answers too.
  (#666, contributed by [enumeratio](https://github.com/enumeratio))
- **The spread copies a value of a declared record type** (CE-1913). With
  `type Fig = record{kind: string, size: integer}`, a constructor function
  `Fig` and `f = Fig(…)`, `{...f, kind -> "x"}` was an `incompatible-type`
  error. It is now a plain
  record with the fields of `f` and the new `kind`. It is not a `Fig`: give
  it to the constructor, `Fig({...f, kind -> "x"})`, to get one: such a
  spread literal has a record type when the fields of each part are known,
  so the constructor accepts the copy. A spread literal with no part of a
  declared record type keeps the type `dictionary`.
- **A protocol member with the default `{}` can be implemented.** An
  implementation that repeated the default of
  `function f(self: Self, opts: dictionary = {}) -> integer` was refused
  ("argument 2 declares a default value; the requirement declares \{\}"), and
  the type then implemented no member of the protocol. The implementation
  now matches.
- **A sum or a product with an `Element` clause and a long range stops at
  the time limit** (CE-1934). In
  `["Sum", ["Multiply", "j", "k"], ["Element", "k", ["List", 1, 2]], ["Limits", "j", 1, 1e8]]`, the range was turned into a list of its
  10⁸ terms before the first term, and the process ran out of memory, also
  inside `ce.withTimeLimit()`. The terms of the range are now made one at a
  time, and the evaluation throws a `CancellationError` at the time limit,
  as the same sum with only `Limits` clauses does.

## 0.204.3 _2026-11-28_

### Breaking Changes

- **Hosts now declare the `Segment`, `GeometricVector` and `Sphere`
  drawing operators.** The standard library and the LaTeX dictionary no
  longer register them, as for `Polygon` in 0.204.1.
  `\operatorname{segment}(A, B)` now parses to a call of an undeclared
  function `segment`, and `\operatorname{vector}(A, B)` and
  `\operatorname{sphere}(O, r)` likewise. A host that draws these
  operators declares them, with a `compile` handler when it compiles them,
  and adds their LaTeX entries. `Triangle` stays in the library.

### Improvements

- **A list local declared with its type that no statement changes
  compiles.** In `(t: real) => do { let b: list<real> = [1]; length(b) + t }`, the declaration declined ("a local of type
  list\<real>"), also for `let b: list<string> = []`. It now compiles as the
  same local with no stated type: JavaScript gives the interpreter's value,
  `2` at `t = 1`, and GLSL and the interval mode compile it where they
  compile the local with no stated type. A value that is not of the stated
  type (`let b: list<integer> = [1.5]`) still declines, as the interpreter
  gives an error there.
- **JavaScript compiles a call of a protocol method in a function that
  assigns a variable of the engine.** With a method
  `function touch(self: Box) -> nothing { hostTouch(self.cells) }`, the
  frame callback `(t: integer) => do { gen = gen + 1; box.touch(); gen }`
  declined ("a write of the variable gen of the engine where a local or a
  parameter hides it"), where the same call through a plain function
  compiled. It now compiles and gives the interpreter's values, also for a
  method that reads or assigns `gen` itself. This is the shape of a frame
  callback that counts its frames and calls a raster method such as
  `board.compute(next)`.
- **JavaScript compiles a list of numbers and a string at a parameter
  declared `list`.** With `type T = tuple<k: string, geom: list>` and
  `function wrap(geom: list) { T("x", geom) }`, `wrap([t, 2, "a"])`
  declined ("the parameter geom of wrap is not a scalar (list)"), and so
  did Tycho's `label(p, text)`, which passes `[x, y, text]` to
  `figureOf(kind: string, geom: list)`. It now gives
  `{ k: "x", geom: [3, 2, "a"] }` at `t = 3`. A parameter declared `list`
  also takes a list of records. A function `g(geom: list) { geom }` now
  returns `[3, 2]` for `g([t, 2])`, where its result declined, and a
  parameter of type `any` that holds `[t, 2, "a"]` fills a field declared
  `list`. A list type whose elements do not admit the elements still
  declines (`list<real>` given `[t, "a"]`), as the interpreter gives an
  error there.
- **JavaScript compiles the figure constructors of a drawing prelude:
  an empty list in a record, a record local that a loop replaces, and a
  loop over the keys of a dictionary.** Three shapes declined:
  `T("c", [t], [])` of a field `bad: list<string>` ("List(): an empty
  list"), `let out: U = f; for k in 1..2 { out = U(out.kind, out.n + 1) }`
  ("a local of type U"), and `for k in keys(opts) { s = s + g(opts[k]) }`
  of `opts: dictionary` ("the operator Keys is not supported by the
  compiler"). Each now compiles and gives the interpreter's value. The loop
  over the keys of a dictionary literal runs a pass per key, `{->}` none;
  `k in ["range", "smooth"]` of a string compiles too. A write of a field
  of a record local (`out.n = 4`) and a write of a record whose fields have
  other types than the first value still decline (CE-1918, CE-1919,
  CE-1920).
- **JavaScript compiles the options of the figures of a drawing prelude.**
  With Tycho's `type Figure = tuple<…, fillPaint: string | color | nothing, …>`, `circle((cos(t), sin(t)), 0.2, {fill -> "red", opacity -> t / 4})`
  declined ("arms of two types"; "a local written with two types"): a
  filled and an unfilled figure were two record types. A field declared
  with a union type now holds a string, a boolean, `Nothing`, a number or a
  list of numbers whatever the record, so a loop that sets the options one
  by one, and an `if` whose arms give a filled and an unfilled circle,
  compile and give the interpreter's value. The code only copies such a
  field: `if t > 0 { c } else { c.fill("red") }.fillPaint` still declines.
  Also compiled now: `N(nothing)`, `N({grid -> true}, 15)`, a `nothing`
  argument of a user function, `length(g) < 2` of a list of a known length,
  `"content" in keys(opts)` of a dictionary literal, `x is dictionary`,
  `last(parts) is dictionary` of a list of figures, a function of no stated
  result type that returns a list of figures, and `v is list<real>` of a
  list literal such as `[5, 4]` given to a parameter of type `any`
  (`circle(…, {dash -> [5, 4]})`, CE-1923). `group(a, b)`, `group([a, b])`
  and `canvas([…], {grid -> true})` compile.

- **JavaScript compiles a list of records.** With
  `type P = tuple<k: integer, x: real>`, `[P(k, t * k) for k in 1..3]`
  declined ("a record made in a build, a filter or a random frame"). It now
  gives `[{ k: 1, x: 2 }, { k: 2, x: 4 }, { k: 3, x: 6 }]` at `t = 2`. A
  filter of records and a literal list of records of one type compile too,
  also of figures whose list fields have different lengths
  (`[circle(1, 2), poly(g)]`). The program reads the list with `figs[i]`,
  `length(figs)`, a loop or a `map` over it, passes it to a function and
  returns it; `area(figs)` of `function area(f: Fig)` maps over the list,
  as the interpreter does, and a host function receives a literal list of
  records. A record can hold a list of records in a field.
  `isMissing(figs[i])`, `figs[i] ?? f0` and `figs[i]?!` decline where `i`
  can be out of range, and so does a list of lists of records.
  The tagged result of a host's `compile` handler (a dictionary with a
  string `__tag`) is now an ordinary record that the program can read
  (`At(HostPath(Take(coords, n)), "coordinates")`); one with a field of
  rank 2 whose inner length is known only when the code runs (`HostPath(M)`
  of `M: matrix<real>`) now declines, as in any record.
- **JavaScript compiles a call of a function literal bound to a name that
  leaves out an argument with a default.** With
  `let withOpts = (n: integer, opts: dictionary = {->}) => n + 1`,
  `withOpts(t)` declined ("the parameter opts of withOpts is not a scalar"),
  and with `let k = (n: integer, m: integer = 2) => n + m`, `k(t)` declined
  ("k with 1 arguments"), where the same parameters of a `function`
  declaration compiled. Both now compile: `k(3)` gives 5. A default that is
  a constant of the program still declines (CE-1911).
- **JavaScript compiles a record whose list field has a run-time length.**
  With `type T = tuple<kind: string, geom: list<real>>` and `g` declared
  `list<real>`, `T("a", g)` declined ("a record with a field of a run-time
  length"), and so did a method that stores such a list in a record
  (`circle((0, 0), 1).dash([t, 2])`). It now compiles: the record is a
  parameter and a result of a function, a local, an arm of an `if` or a
  `match` and the `self` of a method, and a function that reads `r.geom`
  reads its length when the code runs. `if t > 1 { T("a", [1, 2]) } else { T("b", [1, 2, 3]) }` compiles too. `f.geom + h.geom` of two fields of
  different lengths throws `incompatible-dimensions`, as the interpreter's
  error. A field whose inner length is known only when the code runs (a
  matrix of run-time size) still declines.
- **JavaScript compiles a parameter of a declared record type, and a
  nominal tuple type with its own constructor function.** With
  `type Fig = record{…}` and its constructor function,
  `function g(f: Fig) { f.geom[1] }` declined ("the parameter f of g is not
  a scalar (Fig)"); it now compiles. With `type V2 = tuple<x: real, y: real>`
  and `function V2(r: real) { (r, 2 * r) }`, `V2(t)` declined ("a call of
  the function V2 of the host"); it now gives `{ x: 1, y: 2 }` at `t = 1`.
- **JavaScript compiles values of a declared record type.** With
  `type Fig = record{__tag: string, kind: string, geom: tuple<real, real>}`
  and its constructor function
  `function Fig(kind: string, x: real, y: real) { {__tag -> "Figure", kind -> kind, geom -> (x, y)} }`,
  a call `Fig("dot", t, 0)` declined ("a call of the function Fig of the
  host"). It now compiles: `run({ t: 2 })` gives
  `{ __tag: "Figure", kind: "dot", geom: [2, 0] }`, and a host function
  receives `Fig(Dictionary(…))`, the interpreter's value. The raw payload
  `Fig({…})` compiles too. A dictionary with a key of the value `Nothing`
  (`{a -> t, alpha -> nothing}`) declined ("Nothing as a value"); it now
  gives `{ a: 2, alpha: null }` (CE-1914).
- **A compiled record with names is an object while the code runs.** A
  value of a named tuple type or a dictionary was an array of its fields,
  converted to an object at the result. It is now an object of its fields
  in declaration order, read by name, and a named tuple input is read with
  no copy. The result of `run()` is unchanged. A field named `__proto__`
  now declines in a named tuple and a declared record type, as it did in a
  dictionary.

### Resolved Issues

- **The test that a value is an element of a sorted list, and the GCD and
  the LCM of a sorted list, are found when an element is a variable**
  (CE-1824). With `x` declared `real` and `n` declared `integer`,
  `Element(1, Sort([3, x, 1]))`, `GCD(Sort([6, n, 4]))` and
  `LCM(Sort([6, n, 4]))` stayed unevaluated. They now give `True`,
  `GCD(2, n)` and `LCM(12, n)`, as for the list without `Sort`.
  `NotElement` gives `False` for the same list.

- **The sum, the product, the maximum, the minimum and the count of a value
  of a reversed sorted list are found when an element is a variable**
  (CE-1821). With `x` declared `real`, `Sum(Reverse(Sort([3, x, 1])))` and
  `Max(Reverse(Sort([3, x, 1])))` stayed unevaluated, and
  `Count(Reverse(Sort([3, x, 1])), 3)` gave `0`. They now give `x + 4`,
  `Max(3, x)` and `1`, as for the sorted list without `Reverse`.
  `Reduce` with the reducer `Add`, `Multiply`, `Max` or `Min` reads the same
  elements: `Reduce(Reverse(Sort([3, x, 1])), Add, 0)` gives `x + 4`. A
  function named `Sort` or `Max` that the program defines is not read as
  the library operator: `Sum(Sort([1, 2]))` with a user `Sort` that does not
  evaluate gave `3`, and now stays unevaluated.

- **The count of a list given to a function that the program names `Sort` is
  the count of the list that the function returns** (CE-1939). With a user
  `Sort` that returns `[1]`, `Count(Sort([1, 2]))` and `Length(Sort([1, 2]))`
  gave `2`, and `Contains(Sort([1, 2]), 2)` gave `True`: the call was removed
  as if it were the library `Sort`. They now give `1`, `1` and `False`.
  `IsEmpty` and a user `Reverse`, `RandomShuffle` or `Unique` take the same
  path.

- **A sum or a product over a sorted, reversed or shortened list is
  evaluated** (CE-1820). `Sum(k^2, Element(k, Sort([3, 2, 1])))` stayed
  unevaluated, and so did the same sum over `Reverse([3, 2, 1])` or
  `Take([3, 2, 1], 2)`: only a written list, set, range or interval was
  read. A pure call whose value is a finite collection is now evaluated, and
  its elements are the values of the index: these sums give `14`, `14` and
  `13`. `ForAll` and `Exists` read such a collection too. A computed list
  of two integers is a list: `Sum(k, Element(k, Take([1, 5, 7], 2)))` is
  `6`, where a written `[1, 5]` is the range from 1 to 5.
- **The inverse of a matrix that has an infinite entry stays unevaluated**
  (CE-1823). `Inverse([[1.5, +oo, 1], [1, 1, 1], [4, 3, 2]])` gave
  `[[4, -3, -0.5], [-8, 4, 2], [4, 0, -1.5]]` with `evaluate()` and `.N()`,
  and the same matrix with a complex or a `~oo` entry gave a matrix of NaN
  and 0. Such a matrix has no inverse: the call now stays unevaluated, as
  for order 2. In compiled JavaScript, the inverse is a matrix of NaN.
- **A product with an exact rational, such as a quotient by an exact
  integer, of a number made at a higher precision keeps the digits of a
  double after the precision is set to `'machine'`** (CE-1789). After
  `ce.precision = 30; const a = ce.box({ num: '0.3' }); ce.precision = 'machine'`, `ce.box(['Divide', a, 7]).N()` gave `0.0428571428571429`, two
  digits fewer than `0.3 / 7`, `0.04285714285714286`. The same applied to
  `Multiply(a, 3/7)` and to a complex value. They now give a double, as
  `Divide(a, 0.7)` did.
- **`Gamma(s, z)` ends for a very large negative integer order** (CE-1795).
  At machine precision, `ce.box(['Gamma', -1e300, 0.5]).N()` did not end:
  for an integer `s ≤ 0` and `0 < z < 1`, the evaluation ran `−s` steps of a
  recurrence. Past 4096 steps it now uses the continued fraction, as for a
  non-integer order, and gives `+Infinity` here. `Gamma(-5000, 0.999)` is
  `0.010955744553847`.

- **A series of an inverse trigonometric or hyperbolic function, of
  `GammaLn`, `LogGamma`, `PolyLog`, `ExpIntegralEi`, `CosIntegral`,
  `CoshIntegral`, `LogIntegral`, `EllipticK` or `EllipticE`, whose complex
  argument is on the cut of the function at the point, is no longer
  computed** (CE-1794). The argument crosses the cut there, so the function
  has a jump, and a series does not hold on both sides.
  `Series(Arcsin(2 + i·x), x, 0, 3)` gave `arcsin(2) + √3/3·x + …`, which is
  wrong by about `2.63i` for `x > 0`, and the constant term of
  `Series(GammaLn(-1/2 + i·x), x, 0, 3)` was `ln(2√π)`, the value on the
  real axis, which is wrong by `±πi` on both sides. Such a `Series` now stays
  unevaluated, as the series of a root or a logarithm of such an argument
  does. An argument that is real for every real `x` keeps its series:
  `Series(Arcsin(2 + x), x, 0, 3)`.

- **In a scope with a user function named `Power` or `Root`, the reciprocal
  of a power with a symbolic exponent stays a power** (CE-1793). The
  reciprocal of the library call `y^x` was a call of the user function: with
  `Power` defined as `(a, b) ↦ a + b + 100`, it gave `101` at `x = 2`,
  `y = 3`. It now gives `1/9`. The same applies to the reciprocal of
  `Root(y, x)`.

- **In a scope with a user function named `Sqrt` or `Root`, a power of a call
  of that function is a power of its value** (CE-1792). After
  `ce.declare('Sqrt', 'function')` and
  `ce.assign('Sqrt', ce.expr(['Function', ['Add', 'a', 100], 'a']))`,
  `ce.expr(['Sqrt', 'x']).pow(2)` gave `x`, and the product of the call with
  itself gave `1` at `x = 1`. It now gives `10201`. The same applies to a
  power of a call of a user function `Root`.

- **At machine precision, an integer that a function computes gives the
  value of the same integer written as a number** (CE-1790). In
  `ce.box(['Power', 1.1, ['Add', 4, 5]]).evaluate()`, the exponent `9`
  computed by `Add` took the big-decimal kernel, which gave `2.357947691`,
  where `1.1^9` gives `2.357947691000002`, the value of `Math.pow()` and of
  compiled code. `Remainder` and `Mod` had the same difference:
  `Remainder(2 + 3, 0.7)` gave `0.1` and `Remainder(5, 0.7)` gives
  `0.10000000000000031`. An exact integer up to 10^6 in magnitude now
  takes the double kernel, as the number literal does, also when a double
  cannot hold the result: `0.1^{200 + 200}` is now `0`, as `0.1^{400}`
  and `Math.pow(0.1, 400)` are (it was `1e-400`). A larger exact
  integer keeps its lane: `Remainder(-825977087020874, 0.7)` is still
  `-0.1`.

- **A numerical integral of a lone symbol that holds a number gives a
  number** (CE-1788). With `c := 5`, `NIntegrate(c, 0, 2)` gave `NaN`,
  because `c` was read as the name of a function. It now gives `10`: the
  symbol is the body of a constant function, as for `ND` and `NLimit`.
  `NIntegrate(Pi, 0, 2)` gives about `6.2832` (2π). The value is read at
  evaluation, so a later assignment to `c` changes the result.

- **The count of a reversed, rotated, sorted or shuffled string that is not
  evaluated yet is no longer larger than the string has** (CE-1770). The
  characters of such a string are grouped again: with `m` the combining
  acute accent U+0301, `ce.box(['Reverse', { str: m + 'a' }])` evaluates to
  `"a" + m`, one character, but its `count` was `2`. The `count` of
  `Reverse`, `RotateLeft` and `RotateRight` of a string is now the count of
  the source only when the reordered string has the same count, and
  `undefined` otherwise; `Reverse("héllo").count` is still `5`. The `count`
  of `Sort` and `RandomShuffle` of a string is `undefined` before the
  evaluation. A view over such a string, such as `Reverse(Reverse(m + "a"))`,
  now evaluates over its value: `"a" + m`, where it gave `m + "a"`.
  `Rest(Unique("cab"))` gives `"ab"` (it gave `""`), and
  `Join(Take(Unique("abc"), 2), "z")` gives `"abz"` (it gave `"z"`).

- **In a scope with a user function named `Divide`, an exact radical
  number keeps its value under `subs()`** (CE-1785). After
  `ce.declare('Divide', 'function')` and
  `ce.assign('Divide', ce.expr(['Function', 1000, 'u', 'v']))`,
  `ce.expr(['Multiply', 'x', ['Power', ['Sqrt', 2], -1]]).subs({ x: 2 }).evaluate()`
  gave `2000`: the number `√2/2` was rebuilt as a call of the user
  function. It now gives `√2`. The same applies to a number made before a
  user function named `Sqrt`, `Multiply`, `Negate`, `Rational`, `Complex` or
  `Add` is declared. `subs()` of a number literal now returns the number,
  not its structural form.

- **In Epsil, an error in a function that an operand of `Range` or `Union`
  calls no longer underlines another operand** (CE-1786). With
  `function g(x) { Ln(x) + 1 }` and `let y = 5`, both
  `let v = Range(y + 1, g("a"))` and
  `let v = Union(Set(y + 1), Set(g("a")))` underlined `y`. The first now
  underlines `g("a")`, as does `let v = Range(1, y + g("a"))`; the same
  applies to `Linspace`. The second underlines the whole statement, as do
  the same statements with `Intersection`, `SetMinus` and
  `SymmetricDifference`.

- **A sum or a product with an `Element` clause and a range of very large
  integers gives an error instead of stopping the process** (CE-1768). The
  evaluation of `["Sum", ["Multiply", "j", "k"], ["Element", "k", ["List", 1, 2]], ["Limits", "j", ["Power", 2, 60], ["Add", ["Power", 2, 60], 2]]]`
  ran out of memory. It now gives the `out-of-range` error ("a bound with
  magnitude at most 9007199254740991") that the same sum with only the
  `Limits` clause gives.
- **A function definition whose body holds an error is refused with that
  error** (CE-1748). With a host function `draw` of result `nothing`, the
  Epsil definition `function rec(t: real) -> nothing { if t > 0 { let y = rec(t - 1); draw(y + 1) } else { draw(0) } }` was refused with
  "expected `(t: real) -> nothing`, got `unknown`" and the explanation that
  the initializer is not a function. It is now refused with the error of
  its body, "expected `number`, got `nothing` at `y`", as when `rec` calls a
  function defined before it. A declaration of a function signature no
  longer says that a function literal is not a function when its body
  holds an error inside an `if`.
- **In Epsil, the message of an error in a unary minus in the second
  operand of a subtraction names the subtraction** (CE-1783). With `w`
  holding `"s"`, the runtime error of `1 - (2 - -ln(w))` said "in Ln
  argument 1, in Negate argument 1, in Add argument 1", and that of
  `1 - (2 + -ln(w))` said "in Ln argument 1, in Add argument 1": they name
  a sum at an operand that the program does not have. They now say "in Ln
  argument 1, in Negate argument 1, in Subtract argument 2" and "in Ln
  argument 1, in Subtract argument 2".
- **A convergent infinite sum whose first term is 0 has a numeric value.**
  At machine precision, `.N()` of `\sum_{n=0}^\infty n 2^{-n}` stayed
  unevaluated, while the same sum from `n=1` gave 2. It now gives 2 to
  machine precision, also for `\sum_{n=0}^\infty n 2^{-|n|}` at the default
  precision. A series whose partial sums alternate, such as
  `\sum_{k=0}^\infty (-1)^k`, still stays unevaluated.
- **In Epsil, an error that a tuple or a set holds no longer underlines
  another operand of the call around it.** With `let w: any = "s"`,
  `let y = 2` and `let x = y + ln(w)`, `let v = Tuple(x, 1) + ln(y)` and
  `let v = set(x) + ln(y)` underlined the `y` of `ln(y)`: the frames of the
  error were recorded by the statement of `x`. So did `let v = t + ln(y)`
  with `let t = Tuple(x, 1)`. When the value of a statement holds the error
  in a list, a tuple or a set, and a part of the statement outside the
  underline reads a variable that holds an error or calls a function of the
  program, the whole statement is now underlined.

- **A sum or product with no index keeps an arithmetic lower bound.**
  `\sum_{a+1}^5 x` parsed as `["Sum", "x"]`, with no bounds, so the LaTeX of
  `["Sum", "x", ["Limits", "Nothing", ["Add", "a", 1], 5]]` did not read
  back as the same sum. It now parses as that sum, as `\sum_1^5 x` keeps
  its number bounds. The bound is an arithmetic expression of names and
  numbers that holds at least one number (`a+1`, `2a`). A subscript with no
  index that is a relation or a predicate (`\sum_{d\mid n} d`), or a product
  of names (`\sum_{ij} a_{ij}`), is still not a bound. After an
  `Element` clause, such a range is written as a nested operator,
  `\sum_{k\in S}\sum_{a+1}^5 x`, because `\sum_{k\in S, a+1}^5 x` reads
  `a+1` as the condition of `k\in S`.

- **A pipe into a call by a qualified name has the type of the call.** With
  `xs` of type `list<integer>`, `["Pipe", "xs", ["Apply", ["Module", "Take"], 2]]` (Epsil `xs |> std::take(2)`) was typed `unknown`; it is now
  `list<integer>`, as `["Pipe", "xs", ["Take", 2]]` is. So in `xs |> std::sum() |> std::take(1)` the error of the last stage is now reported
  before the run. In Epsil signature help, `xs |> std::take(▮` now marks
  the parameter that the piped value fills also when the program has a
  function `take`.

- **An empty `\placeholder{}` or `\smash{}` before an infix operator no
  longer splits the expression.** `a\placeholder{}-b` and `a\smash{}-b`
  parsed as the sequence of `a` and `-b`; they now parse as `a-b`, as
  `a\phantom{x}-b` does. `a\placeholder{}\,-b` is also `a-b`, where it was
  the product of `a` and a space minus `b`.
- **A function literal applied in place maps a list at a parameter declared
  as a scalar, as the same function held by a name does.** With
  `lit = ["Function", ["Add", "k", "x"], "k", ["Typed", "x", "'real'"]]`,
  `["Apply", lit, ["List", 1, 2], ["List", 10, 20]]` was an
  `incompatible-type` error; it is now `["List", 11, 22]`. The call of a
  name declared `function` that holds the literal, and the Epsil call
  `((k, x: real) => k + x)([1, 2], [10, 20])`, map the same way and no
  longer report `incompatible-type`.

- **A number read from a dictionary literal no longer passes a type test that
  the interpreter refuses.** With `function hr(v: any) -> real { if v is real { 1 } else { 2 } }` and `function lk(opts: dictionary) -> real { hr(opts["n"]) }`, compiled JavaScript gave `1` for `lk({n -> sqrt(t - 5)})`
  at `t = 3`, where the interpreter gives `2`: `sqrt(-2)` is not a real. The
  test is now decided only when the static type of the value in the literal
  proves the type, and the compilation declines otherwise (CE-1924).

- **The limit of a function defined by cases at the boundary of a condition
  is the limit of the branch on that side.** `Limit(If(x < 0, 1, 2), 0, -1)`
  was 2, the value at the point; it is now 1, and the limit from above is
  2. The two-sided limit `Limit(Which(x < 0, 1, True, 2), 0)` was 2; it now
  stays unevaluated, as the two sides differ. When the two sides agree, the
  limit is their value: `Limit(If(x^2 > 0, 1, 2), 0)` is 1, where it was 2.
  `Boole` is read the same way: `Limit(x + Boole(x = 0), 0)` is 0, where
  it was 1.

## 0.204.2 _2026-11-27_

### Improvements

- **JavaScript compiles a call that gives a function to a function of the
  host.** With `inc = (i: integer) => i + 1` and a protocol method
  `apply(self: Box, f: any) -> nothing { hostApply(self.cells, f) }`,
  `(t: integer) => box.apply(inc)` declined ("the value of inc, which reads i
  of another binding"), also inside a loop or an `if`. It now compiles: the
  host receives the function, as from the interpreter, and a variable that the
  function reads is read when the host calls it. The function can be a name,
  a user function or a function literal, given directly or through a
  parameter of no stated type or of type `any`. A literal that reads a
  parameter of the compiled function still declines (CE-1911).
- **JavaScript compiles a function with a `dictionary` parameter.** With
  `withOpts(n: integer, opts: dictionary = {->})`, `withOpts(t)` and
  `withOpts(t, {smooth -> true})` declined ("the parameter opts of withOpts
  is not a scalar"). They now compile, and the function can pass the
  dictionary on to a function of the host (CE-1911).

- **JavaScript compiles definite integrals of short, fixed-length numeric
  lists.** A literal list or a supported call that maps over a fixed-length
  list gives one integral per element. For example, integrating
  `[x, 2x, x^2]` from 0 to 2 gives `[2, 4, 8/3]` to quadrature precision.
- **JavaScript compiles a definite integral whose integrand is a list of a
  length known only when the program runs.** With `E` declared
  `list<real>`, `\int_0^1 \frac{x}{\mathrm{ElementMax}(E, x)}\,dx` declined
  ("a list where a scalar is required"). It now runs one quadrature per
  element of `E`, and gives the interpreter's value: `[0.75, 0.25]` for
  `E = [0.5, 2]`. Nested integrals and a restriction (`\keyword{where}`)
  compile the same way. Lists of different lengths throw (CE-1910).
- **JavaScript and interval-js compile a function that reads an element of
  a list argument of a run-time length.** With `m(M, i, j) := M[i+3(j-1)]`
  and `A` declared `list<real>`, `\sum_{n=1}^3 m(A, 2, n)` declined ("the
  parameter M of m is not a scalar"). It now compiles, and gives the
  interpreter's value: 15 for `A = [1.5, 2, 3, 4, 5, 6, 7, 8, 9.25]`
  (`A[2] + A[5] + A[8]`). A list of a stated length compiled already
  (CE-1908).
- **Compiled code applies a function literal to a list of points.** With
  `p` and `q` declared `list<real>`,
  `Apply(v ↦ PointList(v.x + 1, 2 v.y), PointList(p, q))` declined ("a list
  or a tuple argument of Apply"). It now compiles and gives the interpreter's
  value: the points `(2, 6)` and `(3, 8)` for `p = [1, 2]` and `q = [3, 4]`.
  The interpreter binds such an argument whole when the body reads the
  parameter as a list or a point, and so does the compiled code.
  A parameter that a document gets as `collection<any> | tuple` (the type
  inferred for a parameter read as a point) compiles in the same way: it
  declined as a declared union (CE-1909).

### Performance

- **Compiled interval code runs about 20% faster.** Each interval operation
  no longer allocates an argument list to check its operands for a
  discontinuity or a domain clip. For example, `1000x + \sin(x)^5 - 7 - y + 3\cos(u)` takes 0.62 µs per evaluation instead of 0.81 µs.
- **JavaScript and GLSL emit a subtraction for the addition of a negation
  or of a negative literal.** `1 - x` compiles to `(1 - _.x)` instead of
  `((-_.x) + 1)`, `x - y` to `(_.x - _.y)` instead of `(_.x + (-_.y))`, and
  `x - 7` to `(_.x - 7)` instead of `(_.x + (-7))`. The values are the same.
- **JavaScript and interval-js return a final function call directly.**
  An expression such as `f(x)` can emit the call without a temporary or an
  immediately invoked function.
- **JavaScript can reuse a literal-seeded random list.** Two reads of the
  same seeded `RandomChoice` in one expression can share the list even
  when the draw count depends on an input.

### Resolved Issues

- **Compiled JavaScript passes a value of a named tuple type with a list of
  strings in a field to a function of the host.** A Tycho figure has the
  field `badOptions: list<string>`, empty in most figures. A compiled timer
  callback that calls `draw(stage)` with a variable that holds such a
  figure declined ("a list or a tuple that the interpreter can hold as a
  lazy collection", then "a list of strings other than a literal") and ran
  in the interpreter. It now compiles, and the host receives the
  interpreter's value, with `["List"]` or `["List", "'a'"]` in that field.
  A result of such a type with a nonempty list of strings in a field
  compiles too (CE-1906).

## 0.204.1 _2026-11-27_

### Breaking Changes

- **Hosts now declare the `Polygon` drawing operator.** The standard
  library and LaTeX dictionary no longer register it. A host can use an
  operator's `compile` handler to specify its JavaScript result and register
  its LaTeX syntax where needed.

### New Features

- **Compiled JavaScript reduces a matrix.** `Sum`, `Product`, `Max` and
  `Min` of a matrix, of a stated or of a run-time size, declined ("a term
  that is not a number") and ran in the interpreter. They now compile with
  the interpreter's value: with `A: matrix<real>` at
  `A = [[1, 2, 3], [4, 5, 6]]`, `Sum(A)` gives `[5, 7, 9]` (the sums of the
  columns, as the interpreter adds the rows element by element),
  `Product(A)` gives `[4, 10, 18]`, `Max(A)` gives 6 and `Min(A)` gives 1;
  `Sum(Sum(A))` gives 21. Of a list of no row the interpreter's `Sum` is
  the number 0 and not a list, so `Sum` and `Product` compile for a matrix
  that has a row (an input or a parameter of a matrix type, a matrix of a
  stated number of rows) and decline for a table of a run-time number of
  rows (`Sum(Tabulate(f, n, 3))`), a `Filter` of the rows and an input of
  type `list<list<real^3>>`. `Mean`, `Median` and `Variance` of a matrix
  are errors of the static type, as before.

- **A compiled function literal reads an untyped parameter as a matrix when
  the body requires one.** A parameter of a root function literal of no
  declared type that the body reads as a matrix declined ("the parameter A
  of no declared type, read as matrix"). It is now a matrix of real numbers
  of run-time size on JavaScript: `A ↦ Determinant(A)` gives -2 for
  `[[1, 2], [3, 4]]`, and throws a `RangeError` for a matrix that is not
  square. Uses that do not settle a matrix (`A ↦ Trace(A)`,
  `A ↦ MatrixMultiply(A, A)`, `A ↦ Transpose(A)`) decline as before:
  declare the parameter, as `(A: matrix<real>) ↦ Trace(A)`.

- **JavaScript compiles host-declared tagged results.** A `compile` handler
  can return a dictionary with a literal `__tag` and fields of runtime
  length. Lists and comprehensions return one object per member, in order.

- **GLSL reads a named tuple input whose fields hold arrays.** With
  `type Raster = tuple<width: integer, height: integer, pixels: array<Pixel>>`
  and `board: Raster` (declared with no value, or named by `inputs`, a
  constant too: its cells change after the compilation),
  `board.width`, `board.pixels[i]`, `length(board.pixels)` and a function or
  a protocol method that takes a `Raster` compile on `glsl`. Each number
  field is a uniform (`board_width`), each array field a sampler and its
  count (`board_pixels`, `board_pixels_count`), and
  `freeSymbolTypes.board.fields` names them:

  ```js
  r.freeSymbolTypes.board.fields.pixels;
  // { name: 'board_pixels', lowered: 'highp usampler2D', count: 'board_pixels_count' }
  ```

  `storage: { 'board.pixels': 'sampler2D' }` reads that field from a
  normalized texture. A new raster is a new binding of the same uniforms. A
  store to the raster, the whole raster as a result, and `Equal` of two
  rasters decline.

- **A host that keeps the cells of an array elsewhere marks the array stale,
  and the engine fetches the cells at their next use.** `array.markStale(fetch)`
  counts as a store (the `version` increases and the results that read the
  array are computed again) and writes no cell; `array.stale` is `true` until
  the fetch runs. At the next read, store, `Swap`, `ListFrom`, slice or
  serialization of the cells, at the next read of `cells`, and in compiled
  JavaScript when `run()` starts and after each call of a function of the
  host, the engine calls `fetch(array)` once. The fetch writes the latest cells
  through `cells`, or gives new storage with `swapCells()`. A `swapCells()`
  while the array is stale gives the cells and calls no fetch. An array that is
  never marked costs one test of a field at each access.

  ```ts
  // The GPU computed the next generation of the board in a texture.
  board.markStale((a) => readTexture(texture, a.cells as Uint8Array));
  board.cells[0]; // the fetch runs here, once
  ```

### Improvements

- **`epsilProgramSites()` takes the type and protocol names of the host.**
  The options `typeNames` and `protocolNames` are added to the names that
  the engine declares, as in `epsilCompletions()`. A host that runs the
  program on another engine passes them, so that a statement such as
  `let c: Figure = circle(k)` keeps its sites when only that engine
  declares `Figure`. Without them, the statement is a parse error and has
  no sites (CE-1907).

- **In Epsil, a library spelling at the head of a call pattern names the
  library operator.** In `match sin(1) { sin(a) => a }`, the pattern
  `sin(a)` matches and gives `1`; it matched only a call of an operator named
  `sin`, and the case fell through. A set pattern is now `set(a, b)`, the
  spelling of the expression, and the fixit of a brace set pattern writes it.
  A function of the program with the same name shadows the spelling, as in an
  expression, and the verbatim form (`` `sin`(a) ``) names the raw symbol.

### Resolved Issues

- **Compiled JavaScript passes a list variable inside a list argument to a
  function of the host.** With `let v = [1, 2]`, a compiled callback that
  calls `show([v])`, or a rest-parameter function such as
  `function draw(...args) -> nothing { show(listFrom(args)) }` called as
  `draw(v)`, declined ("a list or a tuple that the interpreter can hold as
  a lazy collection") and ran in the interpreter. It now compiles, and the
  host receives `["List", ["List", 1, 2]]`, as from the interpreter. A
  variable that holds a range (`let w = 1..3`; `show([w])`) still declines:
  the interpreter passes the range itself (CE-1906).

- **`compile()` applies `inputs` to free names read through an assigned
  expression.** A polynomial whose coefficients come from a stored list
  `C = [c_1, c_2, c_3]` can use input types for those coefficients without
  declaring them on the engine (CE-1905).

- **An operand of `Integrate` or `CircularIntegrate` that is not a limit is
  an error** (CE-1384).
  `integrate(x, (x, 0, 1, 2))`, a limit with a step, and `integrate(x, x in 0..1)`, where `0..1` is the discrete range \{0, 1\}, gave the indefinite
  integral `1/2 * x^2`. They now give an `incompatible-type` error, as a set
  or a number in a limit position does.

## 0.203.0 _2026-11-27_

### Breaking Changes

- **In Epsil, braces make a dictionary and never a set.** A set is written with
  its constructor `set(…)`: `{1, 2}` is now the error `brace-set-literal`, with
  a fixit to `set(1, 2)`. `{}` is now the empty dictionary everywhere (it was
  the empty set, except as a default value); `{->}` is still accepted. A brace
  literal is a dictionary from its first character, so an editor knows that
  the word after `{` is a key.

  | Before                     | Now                              |
  | -------------------------- | -------------------------------- |
  | `{1, 2, 3}`                | `set(1, 2, 3)`                   |
  | `{}` (the empty set)       | `set()`                          |
  | `{...a, ...b}` (a set)     | `set(...a, ...b)`                |
  | `{x^2 for x in xs}`        | `setFrom([x^2 for x in xs])`     |
  | `{->, ...d1, ...d2}`       | `{...d1, ...d2}` (both accepted) |
  | the pattern `{a, b}`       | the pattern `Set(a, b)`          |

  Epsil prints a set as `set(1, 2)` and the empty dictionary as `{}`. A LaTeX
  island (`$\{1, 2\}$`) still gives a set. A brace of spreads alone,
  `{...a, ...b}`, is now a dictionary merge with no diagnostic: where `a` and
  `b` are sets or lists, it is an `incompatible-type` error when it runs; write
  `set(...a, ...b)`.

- **A set is no longer an iterator of `Sum`, `Product`, `Integrate` and
  `Table`.** The Mathematica spelling `["Sum", "k", ["Set", "k", 1, 10]]` (in
  LaTeX, `\mathrm{Sum}(k, \{k, 1, 10\})`) read the set as the ordered triple
  `(k, 1, 10)`; a set has no order. It is now an error, for `Integrate` too,
  where it gives an `incompatible-type` error instead of an integral. Write
  the iterator as `k in 1..10` (`["Element", "k", ["Range", 1, 10]]`) or as
  the tuple `(k, 1, 10)`. The order pair of a higher derivative,
  `["D", f, ["Set", "x", 2]]`, is not changed; in Epsil, write `D(f, x, x)`.

### New Features

- **Document hosts can promote inferred types within one `prepare()` call.**
  Pass `{ typePolicy }` as the fourth argument to propose row types from the
  current document. For a list argument, a scalar formal maps the function
  over the list and a compatible list formal binds the whole list. The revision
  reports accepted annotations in `promotedContracts`.

- **`table` takes an index over a collection, as `sum` and `product` do.**
  `table(k^2, k in 1..5)` is `[1, 4, 9, 16, 25]`, where it was an
  `incompatible-type` error; `table(i * j, i in 1..3, j in 1..i)` is
  `[[1], [2, 4], [3, 6, 9]]`. The collection can be a list or a set
  (`table(k % 2, k in set(1, 2, 3))` is `[1, 0, 1]`: a table is a list), and
  an `in` iterator and an iterator tuple can be mixed. Such a table compiles to
  JavaScript.

- **An indexing set of `sum`, `product` and `table` takes a condition in
  Epsil.** `sum(k, k in 1..10 if isPrime(k))` is `17` and
  `table(k^2, k in 1..10 if k > 7)` is `[64, 81, 100]`, where the `if` was a
  `conditional-else-expected` error. The condition is written as in a
  comprehension clause, and the clause prints back the same way.

### Improvements

- **`runAsync()` chooses the worker pool by estimated cost.** It learns from
  completed loops, accounting for worker startup and kernel loading
  separately from warm calls. Pass `{ minPasses: 20000 }` to use an explicit
  cutoff. `onLoop` reports the reason for automatic dispatch.

- **JavaScript compiles numeric parallel comprehensions.** For example,
  `[k^2 parallel for k in 1..n]` builds a list in domain order. When a
  worker pool is available and the comprehension qualifies, `runAsync()`
  builds the slices on workers and joins them in the same order.

- **JavaScript compilation reports why a `parallel for` stays serial.**
  Read `parallelLoopFallbacks` for compile-time reasons such as
  `'accumulator-dependency'` and `'unsupported-position'`.

- **GLSL and interval compilation accept sequential `parallel for` loops.**
  A scalar reduction such as `parallel for k in 1..4 { s += k * x }`
  compiles with the target's usual support for `for` loops.

- **Compiled expressions accept named numeric tuples as inputs.** With
  `type Point = tuple<x: real, y: real>` and `p: Point`, JavaScript reads
  `p.x` from `run({ p: { x: 3, y: 4 } })`. GLSL reads the same point from
  a `vec2` uniform in declared field order.

- **GLSL compiles reductions over bounded comprehensions and reads from
  computed lists.** `Min([Sin(i) for i in 2 * Range(0, Ceil(t/4))])` compiles
  with `t: real<0..5>`. `At(Map(Sin, L), i)` of a fixed-length real list
  can compute just the element at `i`.

- **GLSL compiles bounded recurrences with one predecessor.** A function
  with a base case at zero and a step such as
  `r(k - 1, x) + Sin(r(k - 1, x))` compiles for a call with provably bounded
  integer depth. The shader uses a loop with a fixed-shape state.

- **`{key: value}` in Epsil is an error with a fixit to `{key -> value}`.**
  `{"a": 1}`, the spelling of JSON and Python, gave three unrelated errors; it
  now gives the error `dictionary-arrow-expected`, whose fixit replaces the
  `:` by `->`, and the entry is read as `"a" -> 1`.

- **Epsil completion at a dictionary key and value.** At a key of a dictionary
  literal (`plot(x^2, {▮`), completion offers the keys that the expected
  record type or the `@key` documentation of the parameter gives, and nothing
  else: no library function, constant or keyword. At the value of a key, the
  type of the key ranks the items, also when it comes from a `@key` tag
  (`{grid -> ▮` puts `true` and `false` first), and the strings of a union of
  string literals come first, also for a record field.

### Behavior Changes

- **Compiled matrix results require rows of equal width.** A function declared
  to return `matrix<real>` declines if filtering each row can leave different
  widths. A result declared as `list<list<real>>` can still have ragged rows.

- **Existing arrays keep their declared tuple layout.** Redefining `Pixel`
  with `g` before `r` leaves the red channel of arrays built with the original
  layout in its original slot. A swap or compiled argument requires a
  compatible layout.

- **Compiled worker calls reject at the caller's deadline.** A delayed
  `runAsync()` worker result produces the deadline's `CancellationError`
  during the worker replacement grace period.

- **Epsil navigation and rename follow the local that shadows an outer name.**
  A read before the inner declaration goes to that declaration and still
  reports `read-before-declaration`.

- **Conjugate transpose with equal axes conjugates every entry.** For example,
  `ConjugateTranspose([[1 + 2i, 3]], 1, 1)` gives `[[1 - 2i, 3]]`.

- **Transpose waits for explicit axes and preserves Boolean cells.**
  `Transpose(A, axis, 2)` and `ConjugateTranspose(A, axis, 2)` stay unevaluated
  while `axis` has no value. `Transpose([[True, False]])` gives
  `[[True], [False]]`.

- **Transpose infers the shape of a list of fixed-width rows.** For
  `P: list<list<real^2>>`, `Transpose(P)` and `ConjugateTranspose(P)` have type
  `matrix<real^(2x?)>`. Filtering the transpose of `[[1, 2]]` for rows whose
  sum exceeds `6` now counts `0` rows instead of `2`.

- **Epsil preserves callback effects when a function shadows a library constant.**
  A recursive helper named `i` can forward a callback that writes to the
  enclosing scope without widening its caller's effects to `any`.

- **JavaScript compiles polygon results.** A `Polygon` returns
  `{ __tag: "Polygon", geom: [x0, y0, x1, y1, …] }`. Lists and
  comprehensions of polygons return those records in source order, including
  polygons whose vertex counts vary at run time.

- **Whole-collection calls inside local initializers keep list arguments whole.**
  With `function f(xs) { let m = mean(xs); m }`, `f([1, 3])` now returns `2`.

- **Epsil warns when comparing a nominal tuple value with a plain tuple.**
  For an array of `Pixel` values, `px[i] == (255, 255, 255, 255)` compares
  unequal. Use `px[i] == Pixel(255, 255, 255, 255)` to compare the fields.

- **JavaScript compilation preserves empty list fields in nested records.**
  A callback returning a captured `Group([Leaf([1], [])])` now compiles
  when the empty field is declared `list<real>`. The result keeps the
  empty array at that field.

- **Epsil navigation and rename resolve later declarations in function bodies.**
  In `let h = () => mean(3)` above `let mean = (x) => x + 4`, hover and
  go-to-definition find the local variable, and renaming it updates the call.

- **Named calls use the parameters of a function that shadows a library operator.**
  After `function Max(a: number, b: number) { a - b }`, calling
  `Max(b: 1, a: 5)` gives `4`.

- **Reads of structural pixel cells keep their field names.** For an array
  whose cell type is an alias of `tuple<r: Byte, g: Byte, b: Byte, a: Byte>`,
  `img[2].g` now reads the same byte as `img[2][2]`, where it previously gave
  an `incompatible-type` error. The names are kept when the pixel is saved
  in a variable.

- **The inverse of a singular complex decimal matrix stays unevaluated when
  rounding affects a zero entry** (CE-1862). `Inverse([[0.1i, 0.3i, 0], [0.3i, 0.9i, 0], [0, 1, 1]])` used to give entries of magnitude up to
  `5.4e16`. It now stays unevaluated with both `evaluate()` and `N()`.

- **Epsil reports `dictionary-entry-expected` at an unfinished dictionary
  entry.** `plot(sin(x), {` and `{a -> 1,` now expect a dictionary entry.
  `f(1,` and the empty value in `{a -> ▮` still report
  `expression-expected`.

- **Epsil dictionary type aliases document their keys.** With
  `type alias Style = dictionary` and a `/// @key color: string -- Line color`
  comment, completion can offer `color` inside a tuple or list argument.
  Signature help shows the key's documentation at its name and value.

- **Epsil program sites resolve match captures to the names the arm reads.**
  In `match 5 { _k => k }`, `epsilProgramSites` now reports `k` as local
  to the arm. Rest captures such as `..._t` and wildcard call heads such as
  `_f(x)` also get local definition sites.

- **Compiled JavaScript publishes executed assignments before calling the
  host.** With `s = Pi`, a host callback before `s = n` now sees the exact
  value of `s`. If an `ArrayFrom` creation hook replaces an array binding,
  subsequent reads in the function see the replacement.

- **Compiled JavaScript checks which engine owns an array.** Passing an
  array from a second engine to a compiled store throws a `TypeError`
  before changing its cells, including with `entryChecks: false`.

- **Interpreter fallback honors explicit compiler inputs.** An override
  such as `inputs: { a: 'real' }` stays in `freeSymbols` and reaches each
  binding of `a` read by the expression and the functions it calls.
  Assigned Boolean inputs on the interval target accept `'false'` and
  `'true'` on fallback too.

### Resolved Issues

- **The linear algebra guide now shows how to compute a scalar reciprocal**
  (CE-1887). `ce.expr(['Divide', 1, 4]).N()` gives `0.25`.

- **Document type promotion preserves formulas that would acquire an error
  type.** (CE-1886) With `f(p)=p` and an open `Q`, `Field(f(Q), "width")` stays
  symbolic when a type policy proposes `real` for `p`. The promotion used to
  make the field read evaluate to `incompatible-type`.

- **A `Declare` boxed in the structural form evaluates its attributes
  dictionary again** (CE-1876, a regression of 0.202.0). With the attributes
  as a function-form `Dictionary`, the form that `parseEpsil("let n: real = 2")`
  emits, `["Declare", "m", "'real'", ["Dictionary", ["KeyValuePair", "value", 3]]]` boxed with `form: "structural"` evaluated to `Nothing` and left `m`
  with no value, and a key that is not an attribute did not give the error
  `invalid-declaration-attribute`. The statement now evaluates to `3` and sets
  `m` to `3`, as in the canonical form.

- **Prepared document field helpers have distinct names across revisions of
  an engine.** A cached call of the helper for `A = x + 1` can no longer
  resolve to the generated helper for `B = x + 10` after rows are reordered.
  `PreparedDocumentDefinition.fieldHelper` gives the callable's opaque name,
  with arguments in `fieldParameters` order. Use it in its own revision's
  scope.

- **Compiled JavaScript compares the length of the mask of a selection at
  each position with its list arms.** With `L, N: list<real>`,
  `If(N > 0, L, 0)` at `N = [1, -1, 1]`, `L = [1, 2]` gave
  `[1, 0, undefined]` and `Which(N > 0, 1, L > 0, 2, True, 0)` gave
  `[1, 2, 1]`, where the interpreter gives the error
  `incompatible-dimensions`; both now throw
  `RangeError: incompatible-dimensions: lists of lengths 3 and 2`. The
  length of the first condition is compared once, before the selection,
  with each list arm and each later list condition whose length the
  compiler does not prove equal to it. `If(L > 0, L, 0)` compares nothing,
  and an `If` with no else still reads the shorter of the two lists, as
  the interpreter. The comparison runs also where no position selects the
  arm, where the interpreter gives a value. GLSL, the interval target and
  the `bigint` mode compare no length.

### Performance

- **Compiled JavaScript emits a single-return body as its expression.**
  For `x: real`, the code for `x + 1` is `(_.x + 1)`.

- **Compiled JavaScript can combine an indexed gather and element-wise
  arithmetic in one loop.** A pure expression such as `Cos(2π S[J] / L)`
  can build only the result array.

- **Interval multiplication uses two endpoint products when one operand
  is a point.** The specialization keeps outward rounding and the convention
  that zero times infinity is zero.

- **Compiled JavaScript reuses a shared matrix in a later element-wise
  computation.** With `B = Sin(M + A)`, both `(B, B + Q)` and
  `MatrixMultiply(B, B + Q)` compute the sine once per element of `B`.

- **The IR compiler emits smaller JavaScript loops and GLSL expressions.**
  JavaScript uses a single counted loop for eligible constant ranges of up to
  1024 iterations. GLSL uses native arithmetic for eligible short numeric
  vectors and skips list-index guards when literal loop bounds prove the read
  is in range.

- **Epsil skips mutable array cells when checking statement results for
  unknown calls.** A top-level binding such as `let board = hostArray()`
  no longer serializes every cell for diagnostics, including when a tuple
  holds the array. Calls written in the source still receive diagnostics.

- **Compiled JavaScript computes a nested operation on the elements of
  matrices of run-time size in one pass.** With `A, B: matrix<real>`,
  `2A + B` built the matrix `2A`, then the sum; it now computes
  `2·A[i][j] + B[i][j]` at each element and allocates only the result. So
  do `(A + B)·2 − C` and `Sin(A) + B`. The values are not changed.

- **GLSL compiles scalar reductions over a filtered list of stated length.**
  For `A: list<real^24>`, `Sum(Filter(A, x => x > threshold))` previously
  declined. It now scans the input and sums the elements that pass the
  predicate.

- **Compiled reductions share scans and reuse accumulators.** Independent
  scalar sums with the same bounds can share a loop on JavaScript and GLSL.
  On JavaScript, a list-valued sum such as `Sum(A + k, k = 1..n)` with
  `A: list<real^24>` can update one result array across iterations.

## 0.202.0 _2026-11-26_

### Breaking Changes

- **A custom function receives a list where an argument is a finite lazy
  collection** (CE-1807). A function declared with `ce.declare()` and an
  `evaluate` handler that is not `lazy` now receives the `List` of the
  elements of an argument that evaluates to a finite `Range`, `Linspace`,
  `Reverse`, `Map`, `Filter`, `Take` or comprehension, up to
  `ce.maxCollectionSize` elements (10,000 by default). With
  `hostSum: (indexed_collection<real>) -> real`, `hostSum(1..3)` passed
  `Range(1, 3, 1)` and now passes `List(1, 2, 3)`;
  `hostSum(map(x => x * 2, [1, 2]))` passed the `Map` and now passes
  `List(2, 4)`, with the callback called once for each element before the
  handler. An endless collection, a set, a dictionary, a library function
  and a user function are not changed. A handler that needs the collection
  as written declares the function `lazy: true`, and receives its operands
  unevaluated, as before. Compiled JavaScript passes the same `List`, so
  these calls (`hostSum(1..3)`, `hostSum(reverse([1, 2]))`,
  `hostSum(map(x => x * 2, [1, 2]))`, `hostSum([1, 2] + 1)`, and a list
  constant) now compile, where they declined.

### New Features

- **Mutable arrays: the type `array<T>`, `ArrayFrom` and a store to a cell.**
  An array is a sequence of cells that a program reads and writes in place.
  It has identity: two names can hold one array, a store through one shows
  through the other, and `==` is true only for the same array. A store costs
  the same for every length (measured: 20,000 interpreted stores take 350 ms
  on an array of 100 cells and 356 ms on one of 1,000,000 cells).

  ```epsil
  let a = arrayFrom(repeat(0, 5), "integer<0..255>")
  a[2] = 7
  a[2] += 1
  let b = a
  b[1] = 9
  listFrom(a)       // [9, 8, 0, 0, 0]
  ```

  - `ArrayFrom(xs)` and `ArrayFrom(xs, type)` (`arrayFrom`) make an array
    from a finite collection or from another array. `type` is a string that
    names the cell type. The cell type selects the storage: a typed array of
    JavaScript for a bounded integer type (`integer<0..255>` is a
    `Uint8Array`), for `real` (a `Float64Array`, so `1/3` is stored as
    `0.3333333333333333`) and for a tuple of four bytes; evaluated
    expressions for every other type. Without `type`, a list of numbers gives
    an `array<number>`, whose cells are expressions.
  - `a[i]` reads a cell, `a[m..n]` and `a[[i, j]]` give a list of cells,
    `length(a)` the count and `listFrom(a)` a list of the cells now. The
    index is that of a list: from 1, a negative index counts from the end,
    and a read out of range is `NaN`.
  - `a[i] = v` and `a[i] += v` store to a cell, also through a field
    (`p.pixels[i] = v`, and `p.pixels[i] += v`, which Epsil refused with
    `add-to-target`) and through a list of arrays (`m[i][j] = v`). A store
    out of range is the error `out-of-range`, and a value outside the cell
    type is `incompatible-type`. A constant that holds an array accepts a
    store. A store has the effect `state`.
  - `Swap(a, b)` (`swap`) exchanges the cells of two arrays of one cell type,
    with no copy.
  - **An array of machine cells compiles on JavaScript.** A compiled
    function reads and stores the cells of the engine's array, with no copy
    when `run()` starts or returns: the interpreter, the code and the host
    share one typed array. The result lists in `arrays` the names that hold
    an array; the code reads the array of each one at each call. A compiled
    loop of 64,000 stores takes 0.09 ms (measured on an M5 Max).

    ```js
    executeEpsil(ce, `let screen = arrayFrom(repeat(0, 64000), "integer<0..255>")
    let frame = (t: integer) => do {
      for k in 1..64000 { screen[k] = (k + t) % 256 }
      hostDraw(screen)
    }`);
    const result = compile(ce.box('frame').evaluate());
    result.arrays;          // ['screen']
    result.run(1);          // hostDraw receives the engine's array
    ```

    A compiled read gives `NaN` out of range, as the interpreter does. A
    compiled store makes no range test: out of range it writes nothing,
    where the interpreter gives `out-of-range`, and a value outside the cell
    type is written as JavaScript writes it in the typed array. An array of
    expression cells, an array as the result of the code, a read or a store
    in a callback (`map(k => a[k], 1..n)`) and `interval-js` decline. Such
    code is not `shippable`.
  - **A compiled function that assigns a variable can call the host.** For a
    variable that is a number, a boolean or an array, the code writes its
    value to the engine before each call of a function of the host and reads
    it again after the call, so the host function sees the new value and can
    assign another one. A name that holds an array can be assigned
    (`board = next`, `(cur, next) := (next, cur)`); it is in `assigns`, not
    in `arrays`. A name that holds an array and that the code only reads is
    read again after each call of the host, so an array that the host
    function assigns to it is seen. A call that throws keeps the values
    written at the last call of the host before the throw.

    ```js
    executeEpsil(ce, `let s = 0
    let f = (t: real) => do { s = s + t; hostDraw(s) }`);
    const result = compile(ce.box('f').evaluate());
    result.assigns;         // ['s']
    result.run(1);          // hostDraw reads s in the engine: 1
    result.run(2);          // 3
    ```

    A list variable in such a function declines, as before, and so does a
    call of the host in a `Sum` or a callback of `Map`, and a recursive
    function that calls the host.
  - **A GLSL program reads an array input.** `At(A, i)` and `Length(A)`
    compile on `glsl` when `A` is an input of an array type of machine
    cells: a name declared `array<T>` with no value, or a name of the option
    `inputs`. The host binds two uniforms: a sampler named `A`, with one
    cell per texel, row by row from texel (0, 0), and an `int` named
    `A_count`, the count of the cells. The sampler is `highp usampler2D` for
    unsigned integer cells and for tuple cells of four bytes (`R8UI`,
    `R16UI`, `R32UI`, `RGBA8UI`), `highp isampler2D` for signed integer
    cells and `highp sampler2D` for `real` cells (`R32F`). With
    `storage: { A: 'sampler2D' }`, cells of a `Uint8Array` are read from a
    normalized texture (`R8`, `RGBA8`). `freeSymbolTypes.A.lowered` is the
    sampler type, and the new field `freeSymbolTypes.A.count` is the name of
    the count uniform. A read gives NaN (a `vec4` of NaN for a tuple cell)
    for an index that is 0, not an integer or out of range.

    ```js
    ce.declare('A', 'array<integer<0..255>>');
    ce.declare('i', 'integer');
    const r = compile(ce.box(['At', 'A', 'i']), { to: 'glsl' });
    r.code;
    // float v2 = (i == floor(i) && i != 0.0 && abs(i) <= float(A_count) ? _gpu_ir_cell_u(A, i > 0.0 ? int(i) - 1 : A_count + int(i)) : uintBitsToFloat(0x7fc00000u));
    // return v2;
    r.freeSymbolTypes.A;
    // { type: 'array<integer<0..255>>', lowered: 'highp usampler2D',
    //   provenance: 'declared', count: 'A_count' }
    ```

    A store, `Swap`, `ArrayFrom`, `ListFrom`, a name whose value is an
    array, an array result, and integer cells whose range is outside
    -16,777,216 to 16,777,216 decline on GLSL.
  - **A pixel of a nominal type is a `vec4` on GLSL.** A value of a nominal
    type that is a tuple cell of four bytes
    (`type Pixel = tuple<r: Byte, g: Byte, b: Byte, a: Byte>`) compiles on
    `glsl`: the read of a whole cell `src[i]`, the constructor
    `Pixel(r, g, b, a)`, a parameter and the result of a user function, a
    local, the arms of an `If`, and `==` and `!=` of two such values, the
    comparison of the four bytes. The same pixel function compiles on both
    targets: with `src` declared `array<Pixel>`,
    `invert(src[i])` of `function invert(p: Pixel) -> Pixel { … }` is a
    function `vec4 _fn_ir_u0_invert(vec4 v3)` and
    `src[i] == Pixel(255, 255, 255, 255)` a `bool`. A comparison with an
    unnamed tuple (`src[i] == (255, 255, 255, 255)`, which the interpreter
    gives as `False`), the discharges, an input declared `Pixel`, a list of
    pixels and other nominal tuple types still decline on GLSL.
  - **A nominal tuple type of two to four numbers is a vector on GLSL.** A
    value of a nominal tuple type whose two to four fields are each a real or
    an integer (`type P2 = tuple<x: real, y: real>`,
    `type C3 = tuple<r: real, g: real, b: real>`) is a `vec2`, a `vec3` or a
    `vec4`, with the same uses as a pixel: the constructor, a field read, a
    parameter and the result of a user function, a local, the arms of an
    `If`, the result of the program, and `==` and `!=` of two values of one
    type. With `function mid(a: P2, b: P2) -> P2 { … }`,
    `mid(P2(x, y), P2(y, x))` compiles to
    `vec2 _fn_ir_u0_mid(vec2 v4, vec2 v5)` and `P2(x, y) == P2(y, x)` to
    `((x == y) && (y == x))`. Two nominal types of the same fields stay two
    types: their comparison declines, as does a comparison with an unnamed
    tuple. A record with a field that is not a number, of one field or of
    more than four declines with its cause.
  - The cell type is invariant: an `array<integer>` is not an
    `array<number>`. An array is not a collection: `Sum(a)`, `Map(a, f)` and
    `a + 1` are refused, and a program takes `listFrom(a)`.
  - A host reads and writes the cells with no copy. On an array value
    (`isMutableArray(x)`), `cells` is the storage by reference (a typed array
    for machine cells), `count` the number of cells, `cellType` the cell type
    and `version` a number that increases at each store. A host that wrote
    through `cells` calls `noteStore()`. `swapCells(storage)` gives the array
    another typed array of the same kind and length as its cells and returns
    the one it had, so a frame computed in a second buffer is exchanged with
    no copy.

    ```ts
    const pixels = ce.array(new Uint8Array(4 * width * height));
    ce.assign('screen', pixels);
    // ... the program stores to screen[i]
    if (pixels.version !== shown) upload(pixels.cells);
    ```

    `ce.array(storage, cellType?)` adopts a typed array as the cells of a new
    array, with no pass over them. It refuses a `Uint8ClampedArray` (pass
    `new Uint8Array(data.buffer, data.byteOffset, data.byteLength)`), a
    `Float32Array`, a view of a `SharedArrayBuffer` and a view of a resizable
    buffer.
  - `ce.arrayAllocation`, a function `(count, bytesPerCell) => boolean`, is
    called before the engine allocates the cells of a new array; when it
    returns `false`, the construction is the error
    `array-allocation-refused`. With no function, the engine refuses more
    than 2 GiB for one array. `ce.arrayCreated`, a function `(array) => void`, is called with each array that `ArrayFrom` made.
  - `toMathJson({ objects })` takes a function from an object or an array to
    the MathJSON written in its place: a host that sends a value to another
    thread writes a reference of its own, and no cell is read. `.json` of an
    array is `["Object", ["List", …cells], "'array<T>'"]`. A display (`print`,
    `toString()`, `.latex`) writes an array of more than 16 cells as its type
    and count, `array<integer<0..255>> of 64000`.
  - The MathJSON of an element write of a name whose type does not prove a
    list (an untyped parameter, a name typed `any`) has the canonical form
    `Assign(At(a, i), v)`; a name whose type proves a list keeps
    `Assign(a, ReplaceAt(a, i, v))`. `Assign(At(L, i), v)` is now accepted as
    the element write of a list variable.
  - `s.px[2] = 9`, with `px` a list field of an object, is the error
    `immutable-value-assignment` (CE-1797): it was "expected `symbol`, got
    `integer`".
  - `array` is now the name of a primitive type, and an array type has the
    new kind `'array'` in a type read by its `kind`.

- **The Epsil editor functions document each parameter, and the keys of an
  options dictionary** (CE-1812). A parameter of `epsilSignatureHelp()` has
  a `documentation`, a `sample` (one line of Epsil, which an editor can show
  as faint text in an empty argument) and, for a parameter that takes a
  dictionary of options, its `keys`, each with a `type`, a `documentation`,
  a `sample` and a `default`. The result has `activeKey`, the key whose name
  or value holds the offset (`plot(s, {grid -> ▮` gives `"grid"`), and each
  signature has the `description` of the callee. In such a dictionary,
  `epsilCompletions()` lists the documented keys that it does not write yet
  (`grid -> `, with the sample in the field of the snippet), and in the value
  of a key typed `"light" | "dark"`, those strings first. A named-argument
  item (`count: `) has the `documentation` and the `sample` of its
  parameter. The documentation comes from the new `parameters` property of
  an operator definition, keyed by parameter name or, as a list, by
  position (for a parameter with no name: `parameters: [{ description: "The angle, in radians.", sample: "pi / 4" }]`), or from tag lines in the
  `///` comment of a function. A positional and a named argument show the
  documentation of the same parameter:

  ```epsil
  /// Draws a plot.
  /// @param series the function to plot
  /// @sample series x => x^2
  /// @key options.grid: boolean -- whether to draw a grid
  /// @default options.grid false
  /// @example plot(x => sin(x), {grid -> true})
  function plot(series, options = {}) { series }
  ```

  The tag lines (`@param`, `@key`, `@sample`, `@default`, `@example`) are
  left out of the `description` and `documentation` that hover, completion
  and signature help give, and of `epsil doc`. The signature help of a
  function of the source now has the first line of its `///` comment as
  `documentation`, and its hover gives one paragraph per element of
  `description`.

- **The editor functions give the examples of a function in the Epsil
  spelling** (CE-1813). `epsilHover()`, `epsilSignatureHelp()` and the
  library items of `epsilCompletions()` have `examples`: the `examples` of
  the definition, written with the Epsil names (`join([1, 2], [3, 4])`,
  where the definition writes `Join([1, 2], [3, 4])`), and the `@example`
  tags of a `///` comment. The code in the text of a description is spelled
  the same way (CE-1836): the description in the hover of `join` shows
  `join([1, 2], 3)` where it showed `Join([1, 2], 3)`, and so do `epsil doc`
  and the reference pages. Code that does not parse as Epsil is left as written.

- **The functions of the standard library document their parameters, and
  many of their parameters have names.** The signature help and the
  completion of a call of the 572 library functions that have an Epsil
  spelling show a description and a sample of each parameter, and the
  reference pages list them. Functions that had no example have one. A call
  may pass a named parameter by name, in any order:
  `insert(xs: [1, 2, 4], index: 3, element: 3)` gives `[1, 2, 3, 4]`, and
  `powerMod(base: 2, exponent: 10, modulus: 1000)` gives `24`. A name was
  added where it tells which argument is which; the same role has the same
  name across the library (`xs` for a collection, `count`, `index`,
  `element`, `variable`, `tolerance`, `lower` and `upper`, `start` and
  `end`). The type string of these signatures shows the names: `Filter` is
  `(xs: collection<T>, predicate: (T) any -> boolean) -> collection where T`.
  A function of one parameter, a rest parameter and a symmetric function
  are documented by position, with no name.

- **`evaluateAt` takes its upper bound as optional in its signature**, as
  its evaluation already did: `evaluateAt(f: x => x^2, lower: 2)` gives `4`,
  where it gave `missing: no value for parameter upper`.

- **`epsilProgramSites()` gives the sites of the names of an Epsil program,
  each with the binding it resolves to** (CE-1628, CE-1255.2). It is exported
  from `@cortex-js/compute-engine/epsil` and reads the source without running
  it. A host that runs a program in a scope of its own, such as a notebook
  cell over the scope of its section, reads from it which names come from
  outside the program. Each site has its range, its `role` (`definition`,
  `read`, `write`, `read-write`, `reference`), whether it is `deferred` (in a
  function body) and its binding, whose `kind` is `program`, `local`,
  `external`, `library` or `unresolved`. `externalWrites` names the outer
  bindings that the program writes, and `statements` gives, for each
  top-level statement, the top-level bindings that it reads, defines and
  writes. The resolution follows the interpreter: with an outer `k`, the
  `k` of `function g() { k }` followed by `let k = 7` is the `k` of the
  program, and the initializer of `let k = k + 1` reads the outer `k`.

  ```ts
  ce.declare("k", "integer");
  ce.pushScope();
  const source = "let k = k + 1\nfor k in 1..3 { k }";
  const { bindings, sites } = epsilProgramSites(ce, source);
  sites.map((s) => `${s.start} ${s.role} ${bindings[s.binding].kind}`);
  // ➔ ["4 definition program", "8 read external",
  //    "18 definition local", "30 read local"]
  ```

### Improvements

- **A dictionary with a list or a tuple value compiles as the argument of a
  custom function** (CE-1802). With `figureDraw` declared with `ce.declare()`
  and an `evaluate` handler, `(t) => figureDraw({p -> (t, 1)})` declined with
  "an argument that holds a list or a tuple … that the code does not know as
  a List or a Tuple literal", so it ran interpreted. It now compiles to
  JavaScript, and the function receives the same dictionary as in the
  interpreter, here `{p -> (2, 1)}` at `t = 2`. So do a list value
  (`{dash -> [t, 4, 2]}`), a tuple of tuples and a dictionary in a
  dictionary. A value that can be a lazy collection (`{p -> Range(1, 3)}`)
  still declines.

- **A function that reads a variable whose value is the empty list compiles
  to JavaScript** (CE-1808). With `let x: list<string> = []`, the function
  `f(t: real) = length(x) + t` declined with "an empty list" and now
  compiles; so do a read of `fig[2]` with `let fig = ("circle", [])`, and a
  read of a variable with no stated type, `let pts = []`. The element type
  is the declared one (integers, reals, booleans or strings), and integers
  when none is stated. An empty list of points and GLSL still decline.

- **Compiled JavaScript reads a `Map` or a `Filter` where it is, with no
  array** (CE-1806). Where one reader reads a view whose callback has no
  effect and cannot fail, the code builds no list: `first(map(x => x * 2, L))`
  and `map(x => x * 2, L)[k]` compute one element, with the range check of
  `At`; `Sum`, `Product`, `Min`, `Max`, `Mean`, `Reduce` and `All` of a `Map`
  run one loop; `Length`, `Sum`, `Product`, `Mean`, `Max`, `Min`, `Reduce` and
  `All` of a `Filter` run one loop over the source; `First` of a `Filter`, `Find` and `Any` stop at the
  first element kept. With `L` a list of 10^6 reals, `sum(map(x => x * 2, L))`
  takes about 0.4 ms instead of 1.6 ms,
  `sum(filter(map(x => x * 2, L), c => c > 2))` one loop instead of three, and
  `first(map(x => x * 2, L))` no longer builds the list. The values are the
  same. A view stays a list as the result, as an argument of a function of the
  host, where it is read twice, and where its callback has an effect.

- **Compiled JavaScript reads a view whose length is a count known at run time
  where it is** (CE-1806). With `n`, `a` and `b` integers, `sum(map(f, 1..n))`,
  `Max(Tabulate(x ↦ x², n))`, `Sum(Repeat(x, n))`,
  `sum(filter(1..n, c => c > 2))` and the gather `Sum(At(L, Range(a, b)))` now
  run one loop and build no list; the gather built two lists and ran three
  loops. The values are the same, and where the code reads the count, a count
  of 2^32 or more throws the same `RangeError` as the list did.

- **Compiled JavaScript builds a list of lists whose rows have run-time
  lengths** (CE-1736, #638). With `g: list<list<integer>>`,
  `Map(r ↦ 2r, g)`, `Filter(g, r ↦ Length(r) > 1)` and
  `Map(i ↦ Range(1, i), Range(1, n))` declined with "a list of lists of
  run-time length", so the program fell back to the interpreter. They now
  compile: as the result, `run()` returns an array of arrays (at
  `g = [[1, 2, 3], [4]]`, `Map(r ↦ 2r, g)` gives `[[2, 4, 6], [8]]`), and
  `Length`, `Count`, `Map`, `At(At(v, i), j)`, `Flatten`, `Reduce` and
  `Fold` read the value as they read such an input. A local, an `If` or a
  `Coalesce` can hold it, and a user function can return it, so with
  `step(g: list<list<integer>>) = map(r ↦ map(x ↦ x + 1, r), g)`,
  `step(step(g))` compiles. A `Loop`, a `Reduce` or a `Fold` can carry
  it: at `g = [[1, 2, 3], [4]]`, `let t = g` followed by three passes of
  `t = step(t)` gives `[[4, 5, 6], [7]]`. A list literal of such rows,
  `Join`, `ListJoin` and `Append` make one, and so does a `Fold` from `[]`:
  `Fold((a, i) ↦ Join(a, [Range(1, i)]), [], Range(1, n))` at `n = 3` gives
  `[[1], [1, 2], [1, 2, 3]]`. `Transpose`, `MatrixMultiply` and `Trace`
  read such a list when the program settles that its rows have one length:
  with `T = Map(i ↦ Map(j ↦ i + j, Range(1, n)), Range(1, n))`,
  `MatrixMultiply(T, T)` at `n = 2` gives `[[13, 18], [18, 25]]`, and
  inner lengths that are not provably equal are compared at run time (next
  entry). The matrix operators of a `list<list<…>>` input or of a value
  whose rows can have different lengths, `Determinant` and `Inverse` of
  such a list, elements that are not real or integer numbers, GLSL, the
  interval target and the `bigint` mode still decline.

- **Compiled JavaScript reads an input of a matrix type of run-time size.**
  An input declared `matrix`, `matrix<real>` or `matrix<integer>`, a typed
  parameter of a function literal or of `Apply`, and a parameter of a user
  function of such a type declined with "the input M of type matrix\<real>",
  so the program fell back to the interpreter. They now compile on
  JavaScript: the host passes an array of arrays, and the compiled code
  takes the length of the first row as the length of every row, as the type
  states. With `M: matrix<real>` at `M = [[1, 2, 3], [4, 5, 6]]`,
  `Transpose(M)` gives `[[1, 4], [2, 5], [3, 6]]`,
  `MatrixMultiply(M, Transpose(M))` gives `[[14, 32], [32, 77]]` and
  `Map(r ↦ Sum(r), M)` gives `[6, 15]`. Where `MatrixMultiply` or `Trace`
  reads two lengths that the compiler does not prove equal, the compiled
  code compares them once at run time and throws a `RangeError` where they
  differ, as the interpreter gives an error there: with `A: matrix<real>`
  at `A = [[1, 0], [0, 1]]`, `MatrixMultiply(M, A)` throws
  `RangeError: incompatible-dimensions: lists of lengths 3 and 2`,
  and `Trace(M)` throws `RangeError: expected-square-matrix: …`. The
  comparison runs when an element of the result is read. This also
  holds for a list of rows of a run-time count, and for a stated length
  beside a run-time one (`MatrixMultiply(K, v)` with `K: matrix<real^2x3>`
  and `v: list<real>`), which gave an unspecified value before.
  `Shape(M)` gives `(2, 3)` and `Rank(M)` gives 2; they also compile for a
  table that the program builds, of a run-time number of rows. A parameter
  of a matrix type takes a matrix of stated size, a literal and a build of a
  constant row length: with `tr := m ↦ Transpose(m)` declared
  `(matrix<real>) -> list<list<real>>`, `tr([[1, 2], [3, 4]])` gives
  `[[1, 3], [2, 4]]`. An `Apply` whose body is a list of rows gives it whole:
  `Apply((m: matrix<real>) ↦ Transpose(m), M)` gives
  `[[1, 4], [2, 5], [3, 6]]`. `Determinant`, `Inverse`, `MatrixPower` and
  `Diagonal` of a matrix of run-time size compile too: at
  `M = [[1, 2], [3, 4]]`, `Determinant(M)` gives -2 and `Inverse(M)` gives
  `[[-2, 1], [1.5, -0.5]]`, and for a matrix that is not square
  `Determinant(M)` throws
  `RangeError: expected-square-matrix: a matrix of 2 rows and 3 columns`.
  Arithmetic and the functions of a number apply to each element of such a
  matrix, as for a matrix of stated size (CE-1834): with `A, B: matrix<real>`
  at `A = [[1, 2], [3, 4]]` and `B = [[0, 1], [1, 0]]`, `A + B` gives
  `[[1, 3], [4, 4]]`, `2A + 1` gives `[[3, 5], [7, 9]]` and
  `Transpose(A) + B` gives `[[1, 4], [3, 4]]`; the result is read by the
  matrix operators (`Determinant(A + B)` gives -8). Two matrices whose
  sizes the compiler does not prove equal are compared once at run time:
  at `B = [[1, 2, 3]]`, `A + B` throws
  `RangeError: incompatible-dimensions: lists of lengths 2 and 1`,
  where the interpreter gives the error `incompatible-dimensions`.
  The transpose of a list of rows of a stated length compiles too, where
  it declined ("Transpose of a matrix whose number of rows is known at run
  time only"): with `P: list<list<real^2>>` at `P = [[1, 2], [3, 4], [5, 6]]`,
  `Transpose(P)` gives `[[1, 3, 5], [2, 4, 6]]`.
  A `list<list<real>>` argument and a call result at a parameter of a
  matrix type, `RowReduce` of a matrix of run-time size, a row of the
  result of such an operation as the value (`(A + B)[1]`), matrices of complex
  numbers or of booleans, a matrix of one stated dimension
  (`matrix<real^2x?>`), GLSL, the interval target and the `bigint` mode
  decline.

- **Compiled JavaScript compares the lengths of two lists of run-time
  length.** With `L, M: list<real>`, a user function of scalar parameters
  called with both lists, `h(L, M)`, declined with "list arguments of h
  whose lengths are not one value", so the program fell back to the
  interpreter; and at `L = [1, 2]`, `M = [1, 2, 3]`, where the interpreter
  gives the error `incompatible-dimensions`, `L + M` gave `[2, 4]`,
  `Sum((L − M)^2)` gave `0`, `Mean(L·M)` gave `2.5` and `Dot(L, M)` gave
  `5`. The compiled code now compares the two lengths once, before the loop
  of the operation, and throws
  `RangeError: incompatible-dimensions: lists of lengths 2 and 3` where
  they differ: an element-wise operation of two lists (`L + M`, `L < M`,
  `L + [1, 2, 3]`, `And` of two lists of booleans, `Rgb(L, M, 0.5)`),
  `Dot(L, M)` and `h(L, M)`, which now compiles. At equal lengths the
  values are the interpreter's: at `M = [3, 4]`, `L + M` gives `[4, 6]`.
  Later operations on the same lists read the first comparison:
  `(L + M)·(L − M)` compares once. Lengths that the compiler proves equal
  (`L + L`, `Dot(L, L)`, `h(L, L)`) compare nothing, and their code is
  unchanged. Lists of points, GLSL, the interval target and the `bigint`
  mode compare no length.

### Behavior Changes

- **`Slice` reads a bound of 0 as a position before the first element, not
  as a position counted from the end** (CE-1843). Only a negative bound
  counts from the end, and the result is the part of `start` to `end` that
  is in the collection. `Slice([10, 20, 30, 40, 50], 0, 2)` was `[]` and is
  now `[10, 20]`; `Slice("abcde", 0, 2)` was `""` and is now `"ab"`. An end
  of 0, or an end before the first element, gives an empty result:
  `Slice([10, 20, 30, 40, 50], 1, 0)` was the whole list and
  `Slice([10, 20, 30, 40, 50], 1, -9)` was `[10]`; both are now `[]`. Write
  an end of `-1` for the last element. Compiled code gives the same values.

- **`Dimension` of a `Kernel` is the dimension of the kernel: the number of
  vectors of its basis** (CE-1849). It was the number of cells of the basis.
  `Dimension(Kernel([[1, 2], [2, 4]]))` was 2 and is now 1, for the basis
  `[[-2, 1]]`. This applies to a
  `Kernel` written as the argument (`\dim(\ker M)`). A variable that holds
  the basis of a kernel is a matrix, and `Dimension` still gives its number
  of elements: use `Length` for the number of basis vectors.

### Resolved Issues

- **The negation of a value whose type is an alias of a range has the
  reflected range** (CE-1873). With `type alias Byte = integer<0..255>` and
  `b: Byte`, the type of `-b` was `Byte` and the type of `255 - b` was
  `integer<255..510>`, so `Pixel(255 - p.r, 255 - p.g, 255 - p.b, p.a)` did
  not compile ("does not prove Byte"). The type of `-b` is now
  `integer<-255..0>` and the type of `255 - b` is `integer<0..255>`, as for
  `b: integer<0..255>`. An alias keeps its name when its negation is its
  definition: `-m` for `m` of an alias of `real` is still of that alias.

- **A call of `Complex` that names its arguments gives the complex number**
  (CE-1689). `Complex(imaginary: 2, real: 1)`, and `complex(real: 1, imaginary: 2)` or `complex(1, imaginary: 2)` in Epsil, gave an
  `argument-order-invalid` or `argument-names-unavailable` error. They now
  give `1 + 2i`, as `Complex(1, 2)` does. A name that is not `real` or
  `imaginary` is still an `argument-name-unknown` error. The Epsil
  completion offers the names `real` and `imaginary` in a call of `complex`.

- **The numeric value of a `Limit` with no direction is the two-sided
  limit** (CE-1852). `Limit(Abs(x)/x, 0).N()` gave `1`, the limit from
  above, and `Limit(Floor(x), 2).N()` gave `2`. Both now give `NaN`: the
  limits from above and from below differ. A side on which the function has
  no real value is not counted, so `Limit(x * Ln(x), 0).N()` is still `0`.
  A limit with a direction and a limit at `±Infinity` are not changed, and
  `NLimit` with no direction is still the limit from above. `NLimit` with
  the direction `0` now compares the two sides with a relative tolerance
  when the limit is large.

- **`IsSatisfiable`, `IsTautology`, `TruthTable`, `PrimeImplicants`,
  `PrimeImplicates`, `MinimalDNF` and `MinimalCNF` stay unevaluated for a
  formula that holds a comparison** (CE-1850). These functions tried `True`
  and `False` for each symbol, also for a symbol that is a number:
  `IsSatisfiable(x > 0)` gave `False`, and `IsTautology(x > 0 || x <= 0)`
  gave `False`. Both now stay unevaluated, and so does a formula with any
  operand other than `True`, `False`, a symbol and the connectives `And`,
  `Or`, `Not`, `Implies`, `Equivalent`, `Xor`, `Nand` and `Nor` (a
  quantifier, a function call). The operand is evaluated first, so a
  comparison with a known value is still analyzed:
  `IsSatisfiable(P && 1 < 2)` is `True`.

- **A function that is declared with a signature and has no body refuses a
  list whose elements cannot fit a parameter** (CE-1839). With
  `ce.declare('k', '(real, string) -> real')`,
  `ce.box(['k', 1, ['List', 1, 2]])` was valid, with the type
  `vector<real^2>`. It now has an `incompatible-type` error at the list and
  the type `error`, as `k(1, 2)` has. A list with an element that can fit is
  still mapped: `k(1, ["a", "b"])` has the type `vector<real^2>`. A function
  with a body is not changed: its application reports an error for each
  element that does not fit.

- **In Epsil, a function that uses a variable declared below it reads the
  variable when a library function has the same name** (CE-1826). In
  `let h = () => mean(3)`, `let mean = (x) => x + 4`, `h()`, the body of
  `h` called the library function `Mean`, and the program gave `3`. A `let`
  or a `const` binds its name in its whole block, as it did for a name that
  the library does not have, so the body now calls the variable, and the
  program gives `7`. A recursive `let mean = (n) => … mean(n - 1)` now calls
  itself, where it called the library function. A statement above the `let`
  that reads the name (`let a = mean`, then `let mean = 7`) read the library
  function and is now an error (`read-before-declaration`), as for any other
  name. The
  initializer still reads the library: `let mean = mean(xs)` is not changed.
  `epsilProgramSites()` reports such a name as the `program` binding.

- **The Epsil editor functions give whole paragraphs for the description of
  a library function** (CE-1811). For `findRoot`, `limit`, `map`, `solve` and
  about twenty other names, each element of the `description` of
  `epsilCompletions()`, `epsilHover()` and `epsilSignatureHelp()` was one
  line of a wrapped paragraph, and the `documentation` stopped in the middle
  of a sentence: for `solve`, "Solve(equation, unknown): the list of
  solutions of an equation for the". Each element is now a paragraph, and
  the `documentation` is the first paragraph. `epsil doc solve` prints the
  same paragraphs.

- **A list that holds a `Tabulate` of random numbers holds the numbers**
  (CE-1809). A `Tabulate` whose function has an effect (a random draw, a
  call of an impure function) stayed unevaluated as an element of a list or
  a tuple: in Epsil, `[tabulate(i => random(), 3)]` gave
  `[Tabulate(i ↦ Random(), 3)]` and now gives a list of three numbers, as
  `[map(x => random(), [1, 2, 3])]` does. The function is called once for
  each element, in order. A custom function that is not `lazy` now receives
  the `List` of the elements of such an argument too. A `Tabulate` of more
  than `ce.maxCollectionSize` elements stays as it is, and so does one
  whose dimension has an effect.

- **A loop whose variable has the name of a variable of its collection
  runs** (CE-1827). The collection of a clause of `Loop`, `Comprehension`,
  `ParallelLoop` and `ParallelComprehension` is read before the clause binds
  its variable, so a name in it is the variable around the loop, as in the
  bound of `Sum(n, Limits(n, 1, n))`. In Epsil, with `let n = 3`,
  `[n for n in 1..n]` stayed unevaluated and now gives `[1, 2, 3]`, and
  `for n in 1..n { s += n }` ran no pass and now runs three. The names of a
  destructuring pattern follow the same rule: with `p = 10` and `q = 20`,
  `[p + q for (p, q) in [(1, p), (q, 5)]]` gave `[p + 1, q + 5]` and now
  gives `[11, 25]`. The `freeVariables` of
  `Comprehension(n, Element(n, Range(1, n)))` are now `["n"]`, and
  `subs({n: 3})` replaces the `n` of the range. The collection of a later
  clause still reads the variables of the earlier clauses, and a quantifier
  (`ForAll`, `Exists`) is not changed. Compiled JavaScript already read the
  outer variable; `Comprehension(PointX(P) + 1, Element(P, P))` declined and
  now compiles.

- **`minimalDNF` and `minimalCNF` give the fewest terms** (CE-1858). After
  the terms that every cover needs, the remaining terms were chosen
  greedily, which could give more than needed:
  `MinimalDNF(Or(And(a, c), And(Not(a), Not(b), d), And(Not(a), b, Not(c)), And(Not(a), b, Not(d)), And(b, Not(c), d)))`
  gave 5 terms and now gives 4,
  `a && c || !a && !b && d || !a && b && !d || b && !c && d`. A search for
  the smallest cover now follows the greedy one, within a budget: for a
  large expression it can stop early, and the result is then never larger
  than before.

- **A compiled function literal whose untyped parameter can be a list
  declines** (CE-1837). A parameter of no declared type of a function
  literal compiled to JavaScript was read as a number, also where the body
  gives it a type that admits a list: `v ↦ Norm(v)` gave `NaN` for
  `[3, 4]`, with `success: true`, where the interpreter applies the function
  to each element and gives `[3, 4]`. Such a parameter is now refused as an
  input of no type is: the diagnostic has the code `'untyped-input'`, the
  name of the parameter is in `unsupported`, and with the fallback the
  result is the interpreter's. `A ↦ Transpose(A)` and `v ↦ Norm(v)`
  decline; `x ↦ Sin(x)` and `(x, y) ↦ x + y`, whose uses give the parameter
  a number type, compile as before. Declare the parameter to compile it:
  `(A: matrix<real>) ↦ Transpose(A)` gives `[[1, 3], [2, 4]]` for
  `[[1, 2], [3, 4]]`.

- **A named call of `Slice` selects its arm** (CE-1838). In Epsil,
  `slice([1, 2, 3, 4, 5], start: 2, end: 4)` gave an `unexpected-argument`
  error, and now gives `[2, 3, 4]`, as the positional call does;
  `slice("abcde", start: 2, end: 4)` gives `"bcd"` and
  `slice([1, 2, 3, 4, 5], span: 2..4)` gives `[2, 3, 4]`. A named call of
  any overload set whose arms have a type variable (`where T: …`) failed the
  same way when the names ruled out some of its arms.

- **An element-wise operation on a numeric indexed collection is typed so
  that it holds a point** (CE-1583). With `u: indexed_collection<number>`,
  `u / 5`, `Sin(u)` and `Mod(u / 5, 1)` were typed `list<…>`, but for
  `u := (1, 2)` they give a point: `u / 5` is `(0.2, 0.4)`. They are now
  typed `indexed_collection<…>`, which holds a list and a point. A point
  divided by `NaN` is now the `NaN` point, as a point multiplied by `NaN`
  is: `(1, 2) / NaN` was `NaN` and is now `(NaN, NaN)`.

- **The linear-algebra operators evaluate an operand that is a lazy
  collection** (CE-1451). `Dot`, `MatrixMultiply`, `Trace`, `Determinant`,
  `Norm` and the other matrix operators left their application unevaluated
  when an operand was a `Reverse`, `Rest`, `Take`, `Range` or `Map`:
  `Dot(Reverse([1, 3, 4]), [1, 3, 4])` gave
  `MatrixMultiply(Reverse([1, 3, 4]), [1, 3, 4])` and now gives `17`, and
  with `T = Map(i ↦ Map(j ↦ i + j, Range(1, 3)), Range(1, 2))`,
  `MatrixMultiply(T, Transpose(T))` now gives `[[29, 38], [38, 50]]`. An
  infinite collection, or one of more than 100,000 elements, still leaves
  the application unevaluated. A lazy table whose rows have different
  lengths, or have no end, gives an `incompatible-type` error, as the same
  table written as a list does.

- **A function that returns a pair, applied to a value whose type says
  nothing about its depth, is typed with a type that holds a ragged result**
  (CE-1290, CE-1514). With `P := a ↦ (a, a)` and `L: list<unknown>`,
  `P(L[1])` was typed `broadcastable<tuple<unknown, unknown>>`, a point or a
  tensor of points, while for `L := [[1, (1, 2), [2, 3]]]` its value is the
  ragged `[(1, 1), ((1, 2), (1, 2)), [(2, 2), (3, 3)]]`. It is now typed
  `list<list<any> | tuple<unknown, unknown>> | tuple<unknown, unknown>`. The
  same holds for such a function applied to a symbol declared `any`.

- **A loop that writes the elements of a list of more than 10,000 elements
  gives its value** (CE-1796). With
  `let fb: list<integer> = [0 for k in 1..20000]`, the loop
  `for k in 1..2000 { fb[k] = k % 256 }` ended with the error
  `Maximum call stack size exceeded`, and `fb[2000]` now gives `208`. Each
  write made a lazy view over the view of the write before; the views are
  listed into one list at each 32 writes, as they were for a shorter list.
  The loop is also faster: 2000 writes to a list of 5,000 elements took
  about 2.1 seconds and take about 1.1 seconds. A variable that holds a
  range of more than 10,000 elements (`let xs: list<integer> = 1..20000`)
  still gives the error; start from a list (`[k for k in 1..20000]`).

- **The constructor of a named tuple type with a field of tuple type checks
  a list given at another field** (CE-1745). With
  `type F = tuple<m: tuple<real, real>, q: string>`, `F((1, 0), [1, 2])`
  gave the value `F((1, 0), [1, 2])` with no error, and now gives an
  `incompatible-type` error at the second argument, as `F((1, 0), 5)` does.
  A user function with a point parameter still maps a list at a number
  parameter: with `function k(p: tuple<real, real>, s: real) { s + 1 }`,
  `k((1, 0), [1, 2])` gives `[2, 3]`.

- **A derivative, an integral or a limit with no variable written, of a
  formula that reads a variable that holds a formula, is computed with the
  variable of that formula** (CE-1787). After
  `ce.assign('G', ce.parse('\\sin(x)'))`, `ND(2G, 1)` gave `2` (the
  derivative with respect to `G`) and now gives `2cos(1) ≈ 1.0806`;
  `\int_0^1 G + x` gave `x + 1/2` and now gives `3/2 − cos(1)`; `\int G + x`
  gave `G^2/2 + G·x` and now gives `x^2/2 − cos(x)`; `D(G^2)` gave `2G` and
  now gives `2sin(x)cos(x)`. A variable that holds a formula is not chosen
  as the variable: the variable is chosen from the symbols of its formula
  and the other symbols of the expression. This applies to `D`, `Series`,
  `Integrate`, `Limit`, `NLimit`, `ND` and `NIntegrate`, when the formula is
  assigned before the expression is parsed or boxed. The integral of a
  function literal with a limit that names no variable reads such a formula
  too: `Integrate(Function(G + a, x), Limits(Nothing, 0, 1))` gave
  `a + sin(x)` and now gives `a + 1 − cos(1)`.

- **The numeric inverse of a singular matrix with complex entries stays
  unevaluated** (CE-1803).
  `Inverse([[3 + i, 2, 1], [1, 1, 1], [4 + i, 3, 2]]).N()` gave entries of
  about `5e15`, because rounding left a small nonzero pivot in place of 0. It
  now stays unevaluated, as `evaluate()` does. The same holds for `evaluate()`
  of a matrix with entries such as `0.9 + 0.3i`, for `PseudoInverse(…).N()`
  and for `MatrixPower` with a negative exponent. The inverse of a matrix of
  complex machine numbers now uses partial pivoting, and a pivot is zero when
  it is very small relative to the entries, so a regular matrix that is very
  ill-conditioned also stays unevaluated. A matrix of complex machine numbers
  with an infinite or `NaN` entry stays unevaluated too.

- **The inverse of a singular matrix with exact and decimal entries stays
  unevaluated** (CE-1822).
  `Inverse([[1/3, 2.5, 1], [1, 1, 1], [4/3, 3.5, 2]])` gave entries of about
  `3.5e20` with `evaluate()` and with `N()`, because rounding at the
  precision of the engine left a small nonzero pivot in place of 0. It now
  stays unevaluated. The same holds for a matrix with `i` next to a decimal
  entry, for `PseudoInverse` and for `MatrixPower` with a negative exponent.
  The inverse of a matrix of numbers with an inexact entry that is not a
  matrix of machine numbers now uses partial pivoting, and a pivot is zero
  when it is very small relative to the entries at the precision of the
  engine, so a regular matrix that is very ill-conditioned also stays
  unevaluated. The last digits of the inverse of a regular matrix can
  change.

- **The sum, the product, the maximum, the minimum and the count of a value
  of a sorted list are found when an element is a variable** (CE-1804). With
  `x` declared `real`, `Sum(Sort([3, x, 1]))`, `Max(Sort([3, x, 1]))` and
  `Count(Sort([3, x, 1]), 1)` stayed unevaluated. They now give `x + 4`,
  `Max(3, x)` and `1`, also when a symbol holds the sorted list.

- **The Epsil syntax highlighting styles a `\` at the end of an unclosed
  single-line string as invalid** (CE-1782). For `let s = "C:\`,
  `epsilHighlightTokens` gave the last `\` the style `escape`, and the parser
  reports `invalid-escape-sequence` for it. The style is now `invalid`, also
  when spaces follow the `\`. In a `"""` string, a `\` that ends a line is a
  line continuation and stays `escape`.

- **An Epsil string that holds an incomplete `\u` escape ends at its closing
  quote** (CE-1781). In `let s = "a\u12" + 1`, the escape took in the `"`, so
  the string ran on to the end of the line: the parser reported
  `string-literal-closing-delimiter-expected` and the `+ 1` was text of the
  string. The escape now ends before the first character that is not a hex
  digit, in the `\u{…}` form too, so the string closes and only
  `invalid-unicode-codepoint-string` is reported. That diagnostic now quotes
  the escape as written (`\u12`, `\u{12`), where it quoted the characters
  after `\u` (`12"`). The syntax highlighting of the editor styles the same
  range as invalid.

- **A `Declare` with a dictionary as its last operand, and a key that is not
  an attribute, is an error at the declaration** (CE-1805). A dictionary in
  that position is the attributes of the declaration (`type`, `value`,
  `constant`, `holdUntil`), not its value, and another key was ignored. So
  `["Block", ["Declare", "d", "'unknown'", {dict: {a: 3}}], "d"]` gave
  `read-before-initialization` for `d`, with nothing that named the cause. It
  now gives the error `invalid-declaration-attribute` with the key (`a`), in a
  block and at the top level, and compiled code declines. To declare a
  dictionary value, give it as the `value` attribute
  (`["Declare", "d", {dict: {value: {dict: {a: 3}}}}]`, which the Epsil
  `let d = {"a" -> 3}` emits) or add an attributes dictionary after it
  (`["Declare", "d", "'unknown'", {dict: {a: 3}}, {dict: {}}]`).

- **A Document row that states a type that does not parse is an error of
  that row** (CE-1799). This holds for a type in `formalTypes`, for the
  `resultType` of a function row and for the `valueType` of a value row.
  `prepare()` of the row `g(q)=q` with `formalTypes: { q: 'Nope' }` and
  `resultType: 'real'` threw `Failed to parse type "(Nope) any -> real"`, and
  no row of the document was prepared; when the host gave the body of the row
  as MathJSON and no `resultType`, `q` was read as `unknown` with no message.
  The row now has the error `invalid-type-annotation` in `rowErrors`, and the
  other rows are prepared. Each type is parsed alone, so a type that is valid
  only inside a signature, such as `real+` or `x: real`, is an error too.

- **An Epsil program no longer warns about a call, in the body of a lambda,
  of a function that the program defines** (CE-1778). When a library or an
  earlier function has a near name (`draw`),
  `let redraw = () => 1; let f = () => redraw(); f()` gave the warning
  `unknown-function` ("Unknown function "redraw"; did you mean "draw"?") and
  now gives none. The value, `1`, is not changed. A call of a function that
  nothing defines (`let f = () => redraw()` alone) still gives the warning.

- **A `Sum` or `Product` keeps a clause of one value that an `Element` clause
  reads** (CE-1801). The canonical form drops a clause such as
  `Limits(i, 2, 2)` when nothing reads its index. The test read the bounds of
  the other `Limits` clauses, but not the collection or the condition of an
  `Element` clause. So
  `["Sum", "j", ["Limits", "i", 2, 2], ["Element", "j", ["Range", 1, "i"]]]`
  lost its first clause and stayed unevaluated, with `i` free. It now keeps
  both clauses and gives `3`, in either order of the clauses.

### Performance

- **A loop that writes the elements of a long list is faster** (CE-1831).
  After each write, the next read of the variable went through every element
  of the list. With `let fb: list<integer> = [0 for k in 1..20000]`, the loop
  `for k in 1..2000 { fb[k] = k % 256 }` took about 2.3 seconds and takes
  about 0.9 seconds; with 20,000 writes, it took about 42 seconds and takes
  about 6.5 seconds. The value is the same.
- **A chain of variables that each hold the previous one no longer takes a
  time that multiplies with each variable** (CE-1830). The type of a variable
  that holds another variable was computed several times at each level of the
  chain. With `A0 := sin(x)` and `A1 := A0`, `A2 := A1`, and so on, the
  assignments of seven variables took about 16 seconds, and nine did not
  finish in 60 seconds; 40 variables now take about 15 milliseconds.

## 0.201.5 _2026-11-25_

### Improvements

- **Functions that call one another in a cycle get their result types
  together** (CE-1518). When each function of the cycle is declared
  `function` or with a signature whose result is `unknown`, the engine finds
  the cycle from the calls in the function literals and types the members
  by one fixpoint iteration. With three such heads (`a_2` calls `c_2` and
  `b_2`, `b_2` calls `c_2`, `c_2` calls `a_2`), reading the type of
  `b_2(m)` first took about 13 s and ran about 18,000 signature
  derivations; it now takes about 10 ms, and assigning the heads declared
  `(unknown) -> unknown` takes about 35 ms instead of 350 ms. The type no
  longer depends on which head is read first: the same heads declared
  `(unknown) -> unknown` gave `b_2(m)` the type `any` when it was read
  first, and now give `number` in every order. Two documented losses are
  gone: with `f := n ↦ If(n = 0, "a", g(n − 1))` and
  `g := n ↦ If(n = 0, 2, f(n − 1))` assigned in the order `g`, `f`, the type
  of `g(m)` was `number` although `g(1)` is `"a"` (CE-1091); it is now
  `integer | string`. With `F := n ↦ If(n = 0, x > 0, G(n − 1))` and
  `G := n ↦ F(n)` declared `function`, `F(m)` was `unknown`; it is now
  `boolean`.

- **An Epsil chain can be broken before its dots** (CE-1775). A line whose
  first token is the `.` of a field clause now continues the expression of
  the line before, after any indentation, at the top level, inside brackets
  and in a `match` case body. `b.grow(2)` followed by `  .grow(3)` on the
  next line was an `unexpected-symbol` error (`closing-bracket-expected`
  inside parentheses); it is now `b.grow(2).grow(3)`. No statement starts
  with `.`, so no valid program changes meaning. A `.` after a space on the
  same line (`p .x`) is still an error.

- **A row of a list of fixed-length rows compiles on JavaScript as the
  result** (CE-1540). With `P: list<list<real^2>>`, `compile(P[i])` declined
  with "an index that can be out of range … of lists". It now gives the row,
  `[1, 2]` for `P = [[1, 2], [3, 4]]` and `i = 1`, and `undefined` where the
  index is out of range (the interpreter gives `Missing`). The same holds for
  the body of a function literal, `(Q: list<list<real^2>>, k: integer) ↦ Q[k]`,
  and for `First(P)` and `Last(P)`. Any other use of the row (`P[i] + P[j]`,
  `Length(P[i])`, `IsMissing(P[i])`) still declines, as do GLSL, the interval
  mode and the bigint mode.

- **A dictionary literal compiles on JavaScript** (CE-1771). A function
  whose body holds `{w -> t, fill -> "red"}` declined with "not a number, a
  symbol or a function", so a Tycho animation that styles a figure with an
  options dictionary, `t => draw(circle((t, 0), 1, {fill -> "red"}))`, ran
  interpreted. The literal is now a record of its values: `d.w` and `d["w"]`
  read a key, a parameter of type `any` takes the dictionary, a function of
  the host receives it as the interpreter's dictionary, and as the result of
  the code `run()` gives an object of the keys (`{ w: 2, fill: "red" }`). A
  read of a key that the literal does not have, an index that is not a
  constant key (`d[1]`), and other operations on the dictionary (`Length`,
  `Keys`, arithmetic) still decline. GLSL and the interval mode still
  decline a dictionary.

- **A compiled callback can call a helper that updates its state**
  (CE-1776). A function literal compiled to JavaScript that calls
  `function moveBall(dt: real) scope { ballX = ballX + dt; ballX }`, where
  `ballX` is a declared variable of the engine, declined with "a write to a
  name that is not a local", and a helper that only read such a variable
  declined too. Both now compile: the helper receives the current value of
  each variable it uses, the call writes back the new values in the order of
  the program, and `assigns` lists the variable, so `run()` writes it to the
  engine. `tick = (dt: real) => moveBall(dt)` gives `2.5`, then `5.5`, as
  the interpreter does, also when the call or the write is in a `for` or
  `while` loop. A helper that reads the variable can also be given by name
  to `map`, `filter` or `reduce` (`map(getX, L)`). A call of such a helper
  in a `Sum` or a `Map` callback, a lazy collection that reads the variable
  only through such a helper (`map(getX, [1, 2])`, which the interpreter
  computes at each read), a
  call that maps over a list, a recursive helper and a helper that assigns a
  list variable still decline.

- **The Desmos list members `.mean`, `.median`, `.stdev`, `.sort` and
  `.unique` parse** (CE-1651). `a=[1,2,3].\operatorname{mean}` gave a
  `Sequence` with an `unexpected-operator` error, so a row defined that way
  was not an equation. It now gives `["Equal", "a", ["Mean", ["List", 1, 2, 3]]]`. The members map to `Mean`, `Median`, `StandardDeviation` (the sample
  standard deviation, as in Desmos), `Sort` and `Unique`. With the
  `dotNotation` serialization option, a one-operand call of these operators
  serializes back to the member form: `L.\operatorname{mean}`.

### Resolved Issues

- **An expression kept from a boxed expression no longer keeps the
  discarded functions boxed with it** (CE-1645). With
  `p = ce.box(['Tuple', ['Function', ['Add', 'a', 'other'], 'a'], ['Function', ['Add', 'b', 'kept'], 'b']])`, keeping only the symbol `kept`
  of the second function kept the parameter `a` of the first function and
  its definition in memory once the type of the first body was read. They
  are now collected, as before version 0.196.0.

- **The message of a dot-call of a function that is not a protocol member
  quotes the receiver as written** (CE-1688). With `let xs = [3, 1, 2]`, the
  `dot-call-not-a-protocol-function` message of `sort(xs).reverse()` ended
  with "at `Sort("xs")`". It now ends with "at `sort(xs)`". The same holds
  for `protocol-call-ambiguous`. The `Error` expression of such a call has
  the receiver expression as its site, not its text.

- **A function held in a `let` of a function body can be called by name**
  (CE-1681). In `function m() { let h = (x, y) => x - y; h(y: 2, x: 10) }`,
  the call gave the error `argument-names-unavailable`, but the same two
  statements at the top level of a program gave `8`. The call in the body now
  gives `8` too. When an assignment of the body writes `h`, `h` can hold a
  function with other parameter names, and a call by name is still an error:
  declare the type of `h` as a signature with parameter names.

- **A `for` loop over a number, a boolean or a function is an error**
  (CE-1682). With `let n = 5`, `for i in n { t = t + i }` ran no iteration
  and reported nothing, so a program that meant `for i in 1..n` gave a wrong
  result with no error. `checkEpsil()` now reports `incompatible-type`
  ("expected `collection`, got `number`") for the domain of a loop or a
  comprehension whose type cannot be a collection. At run time, a loop whose
  domain has such a value (a variable of type `any` that holds `5`) stops on
  the `incompatible-type` error, the error that a comprehension gives.

- **The Jacobian matrix of a list that a function returns is correct inside
  a function with a parameter of the name of that list** (CE-1639). With
  `g := [uv, u + v]`, `F := t ↦ g` and `h := g ↦ JacobianMatrix(F(1), [u, v])`,
  `h(7)` gave `[0, 0]`: the `g` of the body of `F` was read as the parameter
  `g` of `h`. It now gives `[[v, u], [1, 1]]`.

- **A debugger can stop a program inside the function of a `map` that a list
  literal spreads** (CE-1638). In
  `[...map(v => do { let w = v; w }, ys), 9]`, an exception that the debug
  statement hook threw at `let w = v` (the way a debugger ends a run) was
  discarded, and the program continued to its next statement. The exception
  now ends the run of `executeEpsil()` and `executeEpsilAsync()`, as it does
  when the `map` is the value of the program.

- **The set difference of a text or a list holds each element once**
  (CE-1623). With `s` assigned `"hello"`, `SetMinus(s).evaluate()` held the
  character `l` twice, and only a second evaluation removed the copy. With `L`
  assigned `[1, 1, 2]`, `SetMinus(L)` gave `Set(1, 1, 2)`. Each element is now
  kept once at the first evaluation: `SetMinus(L)` is `Set(1, 2)`.

- **The length of a sorted list that a symbol holds is found at the first
  evaluation** (CE-1622). With `x` declared `real` and `d` assigned
  `Sort([3, x, 1])`, `Length(d).evaluate()` gave `Length([3, x, 1])`, and only
  a second evaluation gave `3`. It now gives `3` at once. `IsEmpty(d)` and
  `Contains(d, 1)` give `False` and `True` at once too.

- **An index written in another base reads back as an index** (CE-1613).
  `Subscript(x, BaseForm(42, 2))` was written `x_{101010_{2}}`, which reads
  back as the symbol `x_101010_2`. It is now written `x_{{101010_{2}}}`, which
  reads back as `Subscript(x, BaseForm(42, 2))`.

- **The `references`, `defines` and `unknowns` of a `Program` follow the
  order of its statements** (CE-1576). A `Program` that declares the
  recursive function
  `f := m ↦ If(m ≤ 0, 1, f(m − 1))` and then calls `f(2)` had the references
  `['f']` and no defines, so a dependency graph took its own function for an
  input. It now has no references and the defines `['f']`. A name that a
  statement of the program writes (`Assign`, `Declare`, `DefineFunction`) is
  in `defines`, and it is a reference only when a statement reads it before
  the first write: `Program(Assign(a, a + 1), a)` still references `a`.

- **`LogGamma` and `GammaLn` of a long exact rational next to a zero of
  ln|Γ| at a negative argument have all their digits** (CE-1573). At 30
  digits, the real part of
  `LogGamma(-245702473822080062302945414765117954323659791/10^44).N()` was
  `1.51560344802165732168532430667e-20`, wrong from the 19th digit; it is now
  `1.51560344802165732168564106779e-20`. The value is far below the rounding
  error of the operand, and the computation now reads the exact operand again
  at the higher precision of its retry. `GammaLn` at a negative argument now
  checks this cancellation too, and stays unevaluated when the digits are
  not reached.

- **The numeric inverse of a singular matrix stays unevaluated** (CE-1542).
  `Inverse([[3, 2, 1], [1, 1, 1], [4, 3, 2]]).N()` gave entries of about
  `4.5e15`, because rounding left a small nonzero pivot in place of 0. It now
  stays unevaluated, as `evaluate()` does. The same holds for `evaluate()` of
  a matrix with entries such as `1.5`, for `PseudoInverse(…).N()` and for
  `MatrixPower` with a negative exponent. The numeric inverse now uses
  partial pivoting, and it is the same as the inverse in compiled JavaScript.
  A pivot is zero when it is very small relative to the entries, so a regular
  matrix as ill-conditioned as the Hilbert matrix of order 11 with
  machine-number entries also stays unevaluated.

- **`1^M` with a matrix or a list `M` keeps the shape of `M`** (CE-1495).
  The canonical form of `1^b` was `1` for every finite exponent, also when
  `b` is a collection by its type, so `1^M` with `M` declared `matrix<2x2>`
  evaluated to the scalar `1`. In the function `x ↦ (\det(x), 1^x)` applied
  to `[[1, 2], [3, 4]]`, the second component was `1`, not `[[1, 1], [1, 1]]`.
  A power of `1` by an exponent that is a collection by its type now stays a
  power, and its value is a collection of ones of the shape of the exponent.
  `1^x` with `x` undeclared, or with `x` declared as a number, is still `1`.

- **The type of a parameter read by index does not depend on the order of its
  uses** (CE-1493). With `function other(q) { q[1] + q[5] }` and a function
  `touches(p, q)` that reads `p[1]` to `p[3]`, the body
  `other(c) > 0 && touches(c, p)` typed `c` as
  `tuple<number, unknown, unknown, unknown, number>`, and
  `touches(c, p) && other(c) > 0` as
  `tuple<number, number, number, unknown, number>`. Both orders now give the
  second type. In the same way, `c[5] > 0 && touches(c, p)` typed `c` as
  `dictionary<any> | indexed_collection<any>`; it is now
  `tuple<number, number, number>`, as with the call first. As for every type
  that index reads give, the length is not a contract: the interpreter
  accepts a longer tuple.

- **A grid variable updated from its own cells holds the next grid**
  (CE-1746). After `g = map(i => map(j => 1 - g[i][j], Range(1, n)), Range(1, n))`, the rows of `g` were lazy `Map`s that read `g`, so they read
  the new `g`, that is, themselves: a read of `g` gave a recursion error or
  `NaN`. An assignment now lists a lazy collection that is an element of a
  listed collection and reads a variable, as it already did for the outer
  collection, so `g` holds a list of lists computed with the old `g`.

- **A double sum or product whose index is named `i` is correct when the inner
  clause comes first** (CE-1762).
  `["Sum", ["Multiply", "i", "j"], ["Element", "j", ["Range", 1, "i"]], ["Limits", "i", 1, 3]]`
  was `6` instead of `25`: the `i` of the first clause was the imaginary unit.
  With `["Limits", "j", 1, "i"]` in place of the `Element` clause, the sum
  stayed unevaluated. Now each clause of a `Sum` or a `Product` sees the index
  of every clause, as the evaluation already nested the clauses by their
  dependencies, whatever their order. So a later index is no longer a free
  variable of an earlier clause, and `subs()` no longer replaces it there:
  `Sum(x, Limits(y, 1, x), Limits(x, 1, 3)).freeVariables` is `[]`, not `["x"]`.
  The bounds of a clause still read the enclosing binding of its own index. A
  custom binder gets the same rule with the new `unordered: true` option of the
  `clause` operand role.

- **The norm of a range that ends at the length of a filtered list is correct**
  (CE-1754). With `L = Map(k ↦ 2k, Range(1, 40))`, `P = Filter(L, k ↦ Keep(k))`
  for a host predicate `Keep`, and `c = Norm(Range(1, Length(P)))`, `c` was `1`
  instead of `2√310`. With the predicate `k ↦ k < 2.5`, the type of the formula
  threw `Filter predicate must return "True" or "False"`. The computation of the
  type read the value of `P` and applied the predicate with `k` unbound, and the
  result of that walk was kept and used by the evaluation. Now, in a type
  computation, a variable has no value unless it holds a function, a `Filter` by
  a function literal or a user function has no count, and the elements that a
  walk of a lazy collection computes are not kept.

- **The completion at the collection of an Epsil `for` no longer offers the
  loop variable** (CE-1687). In `let xs = [1, 2]` followed by `for i in ▮ {}`,
  `epsilCompletions()` offered `xs` and `i`, but `i` is not defined in its
  own collection. It now offers `xs` only, and with `let i = [1]` it offers
  the outer `i`, which the collection reads. The same holds for the
  collection of a comprehension clause (`[i for i in ▮]`), which also does not
  see the later clauses.

- **A recursive Epsil function written with `match` gives its value**
  (CE-1731). `function fac(n) { match n { == 0 => n + 1; _ => n * fac(n - 1) } }`
  gave an `incompatible-type` error for `fac(3)`. It now gives `6`. A call of a
  function whose result type is `unknown` and whose body is a `match` was
  typed `nothing`, so `f(3) + 1` was an error. The static type of a `match`
  is also correct now. A case that is not a literal makes it `unknown`, and so
  does a `match` with no case that takes every value. Before,
  `function half(s: string, t: real) { match s { == "a" => t / 2; _ => 0 } }`
  had the type `(s: string, t: real) -> integer`, and `half("a", 3)` is `3/2`.
  Compiled code no longer has its own guards for a `match`: `x is T` and
  `x ∈ S` of a value from a `match` now compile when the static type decides
  them.

- **The completion of an Epsil sum-type variant with no payload no longer
  adds a second `()`** (CE-1680). With `type light = red | green`, accepting
  `green` in `let a = gree()` gave `let a = green()()`, and after `|>`
  (`x |> gree`) it gave the call `green()`. Before `(` and after `|>`,
  `epsilCompletions()` now inserts the name alone, as it does for a function.

- **A Document row whose parameter has a type that the host declared by name
  is prepared** (CE-1658). After `ce.declareType('Pt', 'tuple<real, real>', { alias: true })`, `prepare()` of the row `g(q)=q+1` with
  `formalTypes: { q: 'Pt' }` threw `Failed to parse type "Pt"` when CE read
  the LaTeX body of the row, and no row of the document was prepared. The row
  is now read with `q` of type `Pt`. A formal type that does not parse, such
  as `tuple<`, is now an error of its row (`invalid-type-annotation`), not a
  throw.

- **The type of a function that inserts its argument into a list, or writes
  it over one element, includes the argument** (CE-1769). With
  `ins = (u, t) -> Insert(Range(1, u), 1, t)`, the type of `ins` was
  `(u: unknown, t: unknown) -> list<integer>`, but `ins(2, 0.5)` is
  `[0.5, 1, 2]`. The type is now `(u: unknown, t: unknown) -> list<unknown>`,
  and the same applies to `ReplaceAt(Range(1, u), 1, t)`. A parameter is no
  longer given the type of the other arguments of a generic operator, so
  `r = (t) -> Remainder(3, t)` is now typed `(t: unknown) -> number`, not
  `(t: unknown) -> integer | nan`: `r(0.7)` is `0.2`.

## 0.201.4 _2026-11-25_

### Improvements

- **A Document row with a range type, given as `real` by the `inputs`
  compilation option, is an input also when a function row reads it**
  (CE-1733). With the rows `k = \max(y_w, 0.01)` (type `real<0.01..>`) and
  `X(x, y) = kx/y`, `compile(X(x, y), { to: "glsl", vars: { k: "u_k", … }, inputs: { k: "real" } })` declined with "the name "k" of the `inputs` option
  has no declared type", while `kx` compiled. It now compiles and reads
  `u_k`. The body of `X` is typed with the given type for the compilation, as
  an occurrence of `k` in the expression is, so a value outside the range of
  the row, such as `k = -4`, gives the value of the formula for that `k`. A
  given numeric type that overlaps the type of the row (`real<-5..5>`) also
  compiles. A given type of another shape (`list<real>` for a `real` row)
  still declines.

- **`Zeta(z, a)` of a complex `z` and a real `a`, and `Digamma(z)` of a complex
  `z`, compile on JavaScript and GLSL** (CE-1732), so a domain coloring of
  `\zeta(z, a)` or of `\operatorname{Digamma}(z)` draws on the GPU. Both
  declined with "Zeta of complex, real" and "Digamma of complex", while
  `HurwitzZeta(z, a)` and `PolyGamma(0, z)` compiled. On JavaScript they give
  the interpreter's value. On GLSL `Digamma(z)` is `PolyGamma(0, z)`, and
  `Zeta(z, a)` is `HurwitzZeta(z, a)` for `a > 0`; for `a < 0` it adds the
  terms `|a + k|^(-z)` left of 0, as the interpreter does, with an error of
  about 1e-5 of the sizes of the terms, as `HurwitzZeta`. `Zeta(z, a)` of a
  complex `a` still declines.

- **An Epsil call with two arguments exchanged has a note and a fixit.**
  `map` takes its function first, `map(f, xs)`, and `filter`, `reduce` and
  most other operations take the collection first, `filter(xs, p)`. For
  `map([1, 2, 3], x => x^2)`, the diagnostic "expected `function`, got
  `vector<integer^3>`" now has the note "arguments 1 and 2 look exchanged" and
  a fixit that gives `map(x => x^2, [1, 2, 3])`. This applies to every call
  where the exchange of two arguments fits the signature, a function of the
  program included: `pw(2, "a")` for `function pw(s: string, n: integer)`. A
  call with a named argument has no such fixit. The descriptions of `Map`,
  `Filter`, `FlatMap` and `Fold`, and the collections reference, now say which
  argument comes first and why `Map` differs.

- **A function that passes a callback to a function that keeps it no longer
  needs a `scope` declaration** (CE-1773). In Epsil, with
  `function later(h) { register([h]) }` (where the host function `register`
  keeps the handler and calls it later),
  `function scene() { later(e => do { r = r + 1 }) }` was refused with
  "writes outside a function require a declared `scope` effect", although
  `scene` does not change `r`. It is now accepted: a callback given to a
  function defined in the program, or to a protocol method, counts as a write
  by the caller only when the body of that function visibly calls it. With
  `function callIt(g) { g(1) }`,
  `function f() { callIt(x => do { r = r + x }) }` is still refused, and so is
  `function f() { map(x => do { r = r + x }, [1, 2]) }`. The effects of a
  function are unchanged: `scene` still has the `scope` effect of its
  callback.

- **A search in a list by a condition that reads a name of the `vars`
  compilation option now compiles** (CE-1612). With
  `compile(expr, { vars: { T: '_.T' } })`, the expression
  `["CountIf", "L", ["Function", ["Greater", "t", "T"], "t"]]` was refused with
  "CountIf with an effect (the interpreter stops at the first element that
  decides)", although the same expression compiled without `vars`. It now
  compiles, and so do `Find`, `IndexWhere`, `Position`, `Any`, `All`,
  `TakeWhile`, `Reduce`, `Iterate`, `Zip`, a `Comprehension` with a condition and
  `ArgMin` of a `Map` whose function reads such a name. A condition that draws
  a random number is still refused.

### Resolved Issues

- **The type of the incomplete gamma function `Gamma(s, z)` is `real` only
  where its value is real** (CE-1619). For a negative `z`, `Γ(s, z)` is
  complex unless `s` is a positive integer: `Gamma(1/2, -1)`, whose value is
  `√π·erfc(i) ≈ 1.77 − 2.93i`, had the type `real` and now has the type
  `number`. The type stays `real` for a positive `z` (`Gamma(s, 2)`) or a
  positive integer `s` (`Gamma(2, z)` with `z: real`). When `z` can be `0`, the
  type also admits an infinity (`infinity | real`), because `Gamma(0, 0)` is
  `~oo`. The three-operand form `Gamma(s, z0, z1)` follows the same rules.

- **`evaluateAsync()` runs a host function that has only an `evaluateAsync`
  handler when its call is a value of a dictionary** (CE-1615). With such a
  function `g`, `ce.box(['Dictionary', ['Tuple', {str: 'a'}, ['g']]]) .evaluateAsync()` gave `{"a" -> g()}` and did not call `g`. It now gives
  the value of `g()`, as for an element of a list or a tuple. The values are
  evaluated in the order of the entries.

- **`LerchPhi(z, s, a)` at a very large order `s` ends** (CE-1527).
  `ce.box(['LerchPhi', 0.5, 1e300, 2]).N()` did not end. It now stays
  `LerchPhi(0.5, 1e300, 2)` within a few milliseconds, as other large orders
  that no route can vouch for do, and compiled `LerchPhi` gives `NaN`. The
  same fix applies to the complex upper incomplete gamma `Gamma(s, z)` at a
  very large negative integer order, which `LerchPhi` calls.

- **A `Series` of a logarithm whose argument crosses the negative real axis at
  the point no longer gives a series that is off by `2πi` on one side**
  (CE-1617). `Series(Ln(-1 - i*x), x, 0, 3)` was `ln(-1) + i*x + x^2/2 + …`,
  which is wrong by `2πi` for `x > 0`, where `-1 - i*x` is below the cut.
  `Series(Ln(-x - i), x, +oo, 3)` and `Series(Ln(-1 - i/x), x, +oo, 3)` were
  wrong by `2πi` for every large `x`. Each one now stays `Series(...)`, and so
  does `Log` of such an argument. A logarithm whose argument is real for every
  real `x` is unchanged: `Series(Ln(x - 1), x, 0, 3)` is
  `ln(-1) - x - x^2/2 - x^3/3 + O(x^4)`. Some series that hold also stay
  `Series(...)` now: `Ln(-1 + i/x)` at `+∞`, and an argument that is real
  only near the point, such as `Ln(Sqrt(x) - 1)` at `1/4` and `Ln(Ln(x))` at
  `1/2`.

- **A `Series` of a root whose base is not real for real `x` no longer has the
  wrong sign or the wrong value when the base is on the negative real axis at
  the point** (CE-1618). `Series(Sqrt(-1 - i*x^20), x, 0, 3)` was
  `i + O(x^4)`, but `Sqrt(-1 - i*x^20)` is near `-i` on both sides of 0.
  `Series(Root(x + i*x^20, 3), x, 0, 3)` was `Root(x, 3) + …`, which is the
  real root, wrong for `x < 0`. The term that is not real was past the
  computed terms. Each one now stays `Series(...)`, and so does
  `Sqrt(-1 - i*x)` at 0 and a power with an exponent that is not an integer
  of such a base. At a complex point, a base that is real for real `x` is not
  real along the point: `Series(Sqrt(x^2 + 1), x, 2i, 2)` was
  `sqrt(3)i + …` and `Series(Ln(x^2 + 1), x, 2i, 2)` was `ln(-3) + …`, both
  wrong on one side, and both now stay `Series(...)`. A root of a base that
  is real for every real `x` is unchanged at a real point:
  `Series(Sqrt(-1 - x), x, 0, 3)` is `i + i*x/2 + …`. Some series that hold
  also stay `Series(...)` now: `Sqrt(-1 + i/x)` and `Sqrt(1 - Sqrt(x))` at
  `+∞`, and `Sqrt(Sqrt(x) - 1)` at `1/4`.

- **At a high precision, the harmonic number of a complex number shows only
  the digits that are correct** (CE-1585). With `ce.precision = 50`,
  `HarmonicNumber(1+i)` evaluates to `1.1718659855240086 + 0.5766740474685813i`,
  where it showed 50 digits of the real part and only the first 16 were right.
  With a complex `n` or a complex order `r`, the value comes from machine
  kernels, and is now computed at machine precision.

- **The harmonic number of a very small number with a complex order is
  correct** (CE-1584). `HarmonicNumber(10^{-30}(1+i), 2+i)` evaluates to about
  `1.552e-30 + 3.173e-30i`, where it was `0`. A complex order `r` with
  `0 < |n| < 0.1` now takes the series in `n`, with complex coefficients, at
  machine precision, or the continuation `ζ(r) − ζ(r, 1 + n)` where the series
  is too long. When neither value keeps 10 digits in each part, the value stays
  unevaluated: this is the case for an order very close to the real axis, such
  as `HarmonicNumber(0.05, -3 + 10^{-9}i)`.

- **A power, a root, an angle and a logarithm with a base of a number made at
  a higher precision keep the digits of a double after the precision is set
  to `'machine'`** (CE-1761). After `ce.precision = 30; const a = ce.parse('0.3'); ce.precision = 'machine'`,
  `ce.expr(['Power', 2, a]).evaluate()` gave `1.23114441334492`, two digits
  fewer than `2 ** 0.3`, `1.2311444133449163`. The same applied to
  `Power(a, 0.5)`, `Root(a, 3)`, `Arctan2(a, 1)`, `Log(a, 2)` and the other
  functions of two arguments. They now give the digits of a double. A result
  that a double cannot hold, such as `Power(10^{-800}, 0.5)`, keeps its value
  (`1e-400`), where it was `0`.

- **An integral, a limit or a numerical derivative of a lone variable that
  holds a formula is computed with the variable of that formula** (CE-1772).
  After `ce.assign('G', ce.parse('\\sin(x)'))`, `\int_0^1 G` gave `0.5` (the
  integral of `G` with respect to `G`) and now gives `1 − cos(1) ≈ 0.4597`;
  `\int G` gave `G^2/2` and now gives `-cos(x)`. `Limit(G, 0)`, `NLimit(G, 0)`
  and `NIntegrate(G, 0, 1)` gave `NaN`, and `ND(G, 1)` stayed unevaluated; they
  now give `0`, `0`, `0.4597` and `cos(1) ≈ 0.5403`. The variable is chosen
  from the symbols of the formula, as for a formula written in place. A
  variable that names a function (`Sin`, `g(t) := t^2`), and a variable whose
  value is a constant (`c := 5`), keep their meaning.

- **In a scope with a user function named `Divide`, a reciprocal is the
  library quotient** (CE-1760). After `ce.declare('Divide', 'function')` and
  `ce.assign('Divide', ce.expr(['Function', 1000, 'u', 'v']))`,
  `ce.expr(['Power', 'y', -1]).subs({ y: 4 }).evaluate()` gave `1000`: the
  reciprocal `1/y` was a call of the user function. It now gives `1/4`. The
  same applies to `y^{-1/3}`, `Root(-8, 0.5)`, and to the `inv()`, `div()`,
  `pow()` and `root()` methods. In such a scope, the reciprocal serializes as
  a call of the library operator (`["Apply", ["Module", "Divide"], 1, "y"]`),
  so that it is not read as a call of the user function. A call
  `Divide(1, y)` that the program writes is still a call of the user
  function.

- **In a scope with a user function named `Power`, the product of a factor
  with itself is the library power** (CE-1759). After
  `ce.declare('Power', 'function')` and
  `ce.assign('Power', ce.expr(['Function', ['Add', 'a', 'b', 100], 'a', 'b']))`,
  `y.mul(y)` was a call of the user function, and gave `105` at `y = 3`. It
  now gives `9`. The same applies to the `pow()` method and to a product with
  a power factor (`y·y^2`, `x·2^{2/3}`). In such a scope, the power serializes
  as a call of the library operator (`["Apply", ["Module", "Power"], "y", 2]`).
  A call `Power(x, 3)` that the program writes is still a call of the user
  function, and `pow()` of it is a power of its value.

- **A product of three or more numbers at machine precision no longer loses
  digits through a tiny or huge intermediate product** (CE-1757). At machine
  precision, `N(10^{200}·10^{-200}·10^{-123})` gave `9.88131291682493e-124`,
  because a partial product, `10^{-323}`, was below the smallest normal double.
  It now gives `1e-123`. When a partial product is outside the range of a
  normal double, the product is computed exactly and rounded once. Other
  products are unchanged.

- **In Epsil, an error in a function that an element of a list calls no
  longer underlines another element** (CE-1752). With
  `function g(x) { Ln(x) + 1 }` and `let y = 5`, each of
  `let v = [y + 1, g("a")] + u`, `let v = Sqrt([y + 1, g("a")])`,
  `m[1][2] = [y + 1, g("a")]` and `let v = [k(), y + 1, g("a")]` underlined
  `y`. When the element that holds the error is not known and another element
  of the list, tuple or set calls a function or reads a variable that holds
  an error, the whole statement is now underlined.

- **A `Filter` over a `Map` that calls a function with no definition no longer
  throws "Not canonical"** (CE-1753). With `g` not declared,
  `Length(Filter(Map(k ↦ g(k), 1..3), k ↦ k < 2.5))` threw "Not canonical",
  because the elements `g(1)`, `g(2)`, `g(3)` of the `Map` were not canonical.
  They are now canonical, and the `Filter` reports its predicate as it does for
  the list `[g(1), g(2), g(3)]`: "Filter predicate must return True or False".
  When `g` is defined, the length is 2.

- **In Epsil, the message of an error in a product or a sum that is the second
  operand of a subtraction names the subtraction** (CE-1749). With `w` holding
  `"s"`, the runtime error of `3 - 2*ln(w)` said "in Ln argument 1, in
  Multiply argument 2, in Add argument 1", and that of `1 - (2 + ln(w))` said
  "in Ln argument 1, in Negate argument 1, in Add argument 1": these name a sum
  or a negation that the program does not contain. They now say "in Ln
  argument 1, in Multiply argument 2, in Subtract argument 2" and "in Ln
  argument 1, in Subtract argument 2".

- **A fold of `LCM` or `GCD` at machine precision gives the right value**
  (CE-1774). At machine precision, or at precision 15,
  `N(Reduce(1..100, (u, v) => lcm(u, v), 1))` gave `3.12e101`; it now gives
  `6.972e40`, the least common multiple of 1 to 100. A machine number above 2^53
  has lost its last digits, so the GCD or LCM of two integers, one of them that
  large, is now `NaN`, in the interpreter for a float operand and in compiled
  JavaScript, and a fold that gives `NaN` is computed again exactly.
  `GCD(1e30, 0.5)` is still `0.5`. A float operand next to an exact integer
  above 2^53 also gives `NaN`: `\gcd(2^{60}, 4.0)` was 4 and is now `NaN`;
  `\gcd(2^{60}, 4)` gives the exact 4.

- **The length of a point written with `PointList` is a real number again**
  (CE-1767). Since 0.201.2, `Norm(PointList(3, 4))` was typed `+oo | nan | real`
  and `Abs(PointList(3, 4))` was typed `number`; both are `real`, as for
  `Tuple(3, 4)`. A function of the user named `PointList` is not read as a
  point.

- **In Epsil, an unclosed string that ends with a backslash ends at the end of
  its line** (CE-1579). In `let s = "C:\` (a Windows path without its closing
  quote) followed by a line break, the string took in the line break and the
  next line; it now ends before the line break. At the end of the code, the
  range of its error was one character past the end; it now ends at the end of
  the code. An incomplete `\u` escape (`"\u12`) also stops at the end of its
  line.

### Performance

- **The LaTeX of a product with a power to a symbolic exponent is faster to
  compute.** To write `Multiply(Abs(x), Power(2, Negate(n)))` as
  `\frac{|x|}{2^n}`, the serializer first tried to split the product into a
  numerator and a denominator, which built and typed new expressions and gave
  the same product back. It no longer tries when the exponent of a power is not
  an exact rational number (`2^{-n}`, `e^{-2x}`, `10^n`, `x^{1.5}`). For the
  1,000 members of `\sum_{n=0}^{3}\frac{1}{2^n}|\sin(2^nx+\frac{k}{1000})|`, `k`
  from 0 to 999, boxing each member and reading its `latex` takes about a third
  less time. The LaTeX does not change.

## 0.201.3 _2026-11-24_

### Performance

- **A product with a fraction as its coefficient is faster to evaluate.** To
  evaluate `Multiply(Power(2, -n), Abs(Sin(x)))` with `n = 3`, the engine wrote
  the product as the quotient `Divide(Abs(Sin(x)), 8)` and then back as
  `Multiply(1/8, Abs(Sin(x)))`. It now writes the product with no quotient when
  no factor has a negative exponent. For the 1,000 elements of
  `\sum_{n=0}^{3}\frac{1}{2^n}|\sin(2^nx+\frac{[0...999]}{1000})|`, reading the
  elements of `evaluate()` takes about 7% less time. The values do not change.

- **A `Which` in a function called at each element reads a list symbol in its
  selected value once, not at each call** (CE-1425). With `VS` a list of
  length `n`, `Map(j ↦ Which(At(CS, j), At(VS, j), True, NaN), Range(1, n))`
  evaluated the whole list `VS` again at each element, so its time grew with
  the square of `n`; it now grows with `n`, as the same selection written with
  `If` does. At `n = 1,600` it takes about 100 ms instead of about 490 ms. The
  values are the same.

### Resolved Issues

- **A read of one element of a tuple whose elements have different shapes
  no longer gives the tuple the type `never`** (CE-1492). In the Epsil
  function
  `function f(n: integer) { let t = 0.5; for g in [((1, 2), 2), ((3, 4), 3)] { t = t + g[2] }; t }`,
  the read `g[2]` in the sum required a number of every element of `g`,
  and its first element is a tuple. `f` was typed `(n: integer) -> never`
  and did not compile. A read at a literal index now requires a number of
  that element only: `f` is typed `(n: integer) -> number` and compiles,
  and `f(2)` is `5.5`.

- **`Iterate` over a variable with a declared signature uses the declared
  default of a parameter** (CE-1461). With `s` declared
  `(real, real = 5) -> real` and assigned `(u, v = 7) ↦ v - u`,
  `Take(Iterate(s, 1), 3)` gave `[6, 1, 6]`: it used the default of the
  function literal. It now gives `[4, 1, 4]`, as `s(1)`, `Map` and the
  compiled code do. An evaluated `Iterate(s, 1)` keeps the name `s` instead
  of the function literal, so its elements use the value that `s` holds
  when they are read, as for `Map`.

- **A `Series` at `0` of a root of a parameter times the variable no longer
  has terms divided by 0** (CE-1441). `Series(Sqrt(a x), x, 0, 3)` was
  `x·√a/0 − √a/0·x² + 3√a/0·x³ + O(x⁴)`. When the sign of `a` is not known,
  it now stays `Series(...)`, and so does `Series((a x)^(3/2), x, 0, 3)`.
  With `a > 0` assumed, it is `√a·√x`.

- **Under `.N()`, a function no longer reads an argument after a later
  argument changed a variable that the first argument uses** (CE-1439). With
  `x := 1` and `g := (y, w) => Floor(3y)`, `g(x/3, Block(x := 5, 1)).N()`
  gave `5`. When an argument is not pure, the function now reads an argument
  that uses a variable from its approximation, as `Floor` does for an operand
  that is not pure: the value is `0`, the floor of three times the float of
  `1/3`. When every argument is pure, a function whose body returns early
  reads such an argument exactly: with
  `r := y => Block(If(y > 0, Return(Floor(3y))), 7)`, `r(x/3).N()` is now
  `1`, not `0`.

- **A numerical derivative, integral or limit reads a variable that holds a
  formula** (CE-1434). With `G := sin(x)`, `ND(x => G, 1)` stayed unevaluated
  and `NIntegrate(x => G, 0, 1)` gave `NaN`; they now give `cos(1)` and
  `1 - cos(1)`, as `D` and `Integrate` already did. `NLimit` reads such a
  variable too: `NLimit(x => G / x, 0)` is `1`.

- **A `Random()` inside `Tan(Arctan(…))` or in the exponent of `e` draws one
  value, not two** (CE-1424). In a seeded frame,
  `WithRandomSeed(7, [Tan(Arctan(Random())), Random()])` gave the second and
  third values of the sequence; it now gives the first and second, as
  `[Random(), Random()]` does and as the compiled code does. The same holds
  for `Sin(Arcsin(…))` and the other pairs of a function and its inverse, and
  for `e^{n - Random()}` when `n` has a value.

- **A `Break()` or `Continue()` outside a loop is an error, and no longer
  stops the rest of an Epsil program** (CE-1408). `let s = 0; do { Break() }; s = 5; s` gave `Break()` and did not run the last two statements; it now
  gives `5`, with the `control-outside-loop` diagnostic at `Break()`, which
  the parser now reports for the call forms `Break()` and `Continue()` as it
  does for `break` and `continue`. A `Break` or `Continue` that reaches the
  end of a function body is the error `control-outside-loop` and no longer
  ends a loop of the caller: `fixedPoint(x => if x > 10 { Break(x) } else { x + 1 }, 0)` stayed unevaluated and is now that error. A `Break` or
  `Continue` in a case of a `match` still ends or continues the loop around
  the `match`.

- **Two regular expressions are equal when their patterns and their sets of
  flags are equal** (CE-1404). `RegExp("a.c") == RegExp("a.c", "i")` stayed
  unevaluated; it is now `False`. The order of the flags does not count, and
  a regular expression without `u` or `v` is read with `u`:
  `RegExp("a", "im") == RegExp("a", "mi")` and
  `RegExp("a") == RegExp("a", "u")` are `True`. A regular expression is now
  unequal to a string or a number: `RegExp("a") == "a"` is `False`.

- **The length of a reversed, sorted or shuffled string counts the
  characters of the result** (CE-1403). A combining mark that moves after a
  letter joins it, so the result can have fewer characters than the
  original string: `length(reverse("\u{301}a"))` was `2` and is now `1`, and
  `length(sort("\u{301}ba"))` was `3` and is now `2`. `Count`, `IsEmpty` and
  `Contains` of a reordered string, and of a string without duplicates
  (`Unique`), read the result in the same way. The reverse of a sorted
  string, and the first elements of one, are no longer the empty string:
  `Reverse(Sort("cab"))` is `"cba"` and `Take(Sort("cab"), 2)` is `"ab"`.

- **`Parse(s)` evaluates the parsed expression, and an operator that holds
  its argument reads the parsed expression** (CE-1402).
  `Evaluate(Parse("1011_2 \cdot 101_2"))` was the product of two `BaseForm`
  values; it is now `55`, as it already was through a variable
  (`let p = parse(…); p`). `Parse("x + x")` with `x = 3` is now `6`. `Solve`,
  `D`, `Integrate`, `Limit` and `Expand` read the parsed expression without
  evaluating it: `Solve(Parse("161_b + 134_b = 315_b"), b)` is `[0, 8]` and
  no longer stays unevaluated, and `D(Parse("y^2"), y)` is `2y`, not `0`.
  Because the parsed expression can read and write any variable, the effects
  of `Parse` are now `any`: a result that holds `Parse` is not memoized, and
  a `parallel for` loop or a parallel comprehension whose body calls `parse`
  gets the `parallel-effect` diagnostic.

- **The type of a function that appends its argument to a list includes the
  argument** (CE-1363). With `ap = (u, t) -> Append(Range(1, u), t)`, the
  type of `ap` was `(u: unknown, t: unknown) -> list<integer>`, but
  `ap(2, 0.5)` is `[1, 2, 0.5]`. The type is now
  `(u: unknown, t: unknown) -> list<unknown>`. The same correction applies to
  `ReplaceAt` with more than one position, such as
  `ReplaceAt([Range(1, 3)], 1, 1, g(u))`, now typed `list<list<unknown>>`.

- **Two functions that read different values of a local variable are no
  longer the same** (CE-1332). With
  `let f = (k) => do { let y = k; x => x + y }`, `f(1) == f(2)` was `True`,
  and `dedup([f(1), f(2)])` kept only one of the two functions. The two
  functions have the same body, but each reads the `y` of its own call. The
  comparison now stays unevaluated and `dedup` keeps both. Two functions
  whose bodies read the same values, such as `f(1)` and `f(1)` with
  `let f = (k) => (x => x + k)`, are still the same.

- **The sum and the difference of two tensors of rank 3 or more are
  computed** (CE-1329). `T - T`, with `T` the 2x2x2 tensor
  `[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]`, stayed the unevaluated sum
  `T + (-T)`; it is now the 2x2x2 tensor of zeros. The sum of two vectors or
  two matrices was already computed cell by cell; tensors of every rank now
  are too.

- **A sum or a product whose bounds are integers far above 2^53 gives the
  `out-of-range` error instead of a wrong number** (CE-1315).
  `Sum(j, Limits(j, 2^60, 2^60 + 3))` was `2^60`: the two bounds round to the
  same double, so the range was read as one term. A range with a bound above
  `Number.MAX_SAFE_INTEGER` now has one term only when both exact bounds are
  equal and are a double (`Sum(j, Limits(j, 2^60, 2^60))` is `2^60`); exact
  bounds in reverse order give an empty range (0 for a sum, 1 for a product).
  The error message gives the exact bounds.

- **A ragged list has the shape of the axes that its items have in common**
  (CE-1390). `Shape([[5, 2, 10, 18], [1, 2, 3]])` and `Shape([1, [2, 3]])`
  were `()` and their `Rank` was 0, the values of a scalar. They are now
  `(2)` and 1, as `Dimensions` in Wolfram; `Shape([[[1, 2], [3]], [[4, 5], [6]]])` is `(2, 2)`. A list with a cell that may be a list, such as a
  symbol `L` declared `list<number>` with no value, gives `Shape` and `Rank`
  no value instead of `()` and 0.

- **The float quantile of a binomial or Poisson distribution is right just
  above a jump of the CDF and in the tails** (CE-1453).
  `Quantile(BinomialDistribution(1, 1/2), 0.5000000000001)` was `0`; it is
  now `1`, since `CDF(0) = 1/2` is below `p`. Every `p` below `10^-12` gave
  `0`: `Quantile(BinomialDistribution(100, 1/2), 1e-29)` is now `1`. The
  search compared the CDF with `p − 10^-12`; it now uses a tolerance of
  `10^-14` relative to the tail that holds `p`. `Quantile(CDF(k))` still
  gives `k` back, also for a CDF value computed at a precision above machine.

- **A double integral with a singular point is faster** (CE-1288). The check
  for a pole that moves with another integration variable now skips each
  point of its grid where no divisor of the integrand has a zero near the
  range. `.N()` of `\int_0^1\int_0^1 \frac{1}{\sqrt{(x-0.5)^2+(y-0.5)^2}} + \frac{1}{\sqrt{(x-0.25)^2+(y-0.25)^2}}\,dy\,dx` takes about 1.5 s instead
  of 2.5 s, with the same value.

- **A selector accepts a tuple with a slot of type `unknown`** (CE-1265). With
  `w` declared `unknown`, `Rest((w, 1, 2))` was an `incompatible-type` error;
  it is now valid and evaluates to `[1, 2]`. The same holds for `Most`,
  `Take`, `Drop`, `Reverse` and `RotateRight`. A tuple whose other slots do
  not fit the element type is still refused.

- **The n-th root with a negative index is right for a zero, a very large or a
  very small radicand** (CE-1256). With `x` and `n` given the values 0 and -2,
  `Root(x, n)` evaluated to 0; it is now `~oo`, as `Power(0, -1/2)` is. At
  machine precision, `Root(1e300, -3)` with the values given by
  `ce.withValues()` was `1.3333333333333502e-100` and `Root(-1e-300, -3)` was
  `+oo`; they are now `1e-100` and `-1e100`.

- **The type of a declaration is not a name of the expression** (CE-1250).
  For `["Block", ["Declare", "t", "real", 1], ["Add", "t", 1]]`, `unknowns`
  and `freeVariables` were `["real"]` and `symbols` was `["real", "t"]`. They
  are now `[]` and `["t"]`, and `references` no longer lists `real`. The
  `type` entry of the attributes dictionary of a `Declare` is not listed
  either.

- **`:=` after `let` is an assignment, as `\coloneq` is** (CE-1239).
  `\mathrm{let} c := 5; c` parsed as `["Block", ["Declare", "c", "'unknown'", 5], ["Error", "'invalid-type'", "''"], "c"]`: the `:` was read as the start
  of a type. It now parses as `["Block", ["Declare", "c", "'unknown'", 5], "c"]`, as `\mathrm{let} c \coloneq 5; c` does.

- **A sum over all integers is as fast as a sum over half of them**
  (CE-1285). `Sum(2^(-Abs(n)), Limits(n, -oo, oo)).N()` took about 2 s,
  and each half took a few tens of milliseconds. The check that a sum over
  all integers converges absolutely walked 2¹⁵ terms every time. It now runs
  only when the terms have both signs, and it walks no further than it
  must. The sum takes about 30 ms. Also, a sum over all integers whose
  terms have one sign and fall as a power of `n` gets its value:
  `Sum(1/(n^2 + 1), Limits(n, -oo, oo)).N()` gives `3.1533480949372006`
  (π·coth π = 3.15334809493716…), where it stayed unevaluated.

- **The incomplete elliptic integrals of a complex amplitude below the real
  axis keep their digits when the parameter is very small** (CE-1356).
  `EllipticF(0.3 - 10i, 1e-30).N()` gave `0.3000000040807729 - 10.000000012871325i`. It now gives `0.3 - 10i`, as the amplitude above the
  axis already did. `EllipticE` had the same error.

## 0.201.2 _2026-11-24_

### Resolved Issues

- **The type of an expression follows a later use of a symbol made with
  `ce.symbol()`** (CE-1342). With `x = ce.symbol('x')` and
  `t = ce.function('Tuple', [x])`, the type of `t` stayed `tuple<unknown>`
  after `ce.function('Add', [x, 1])` gave `x` the type `number`. It is now
  `tuple<number>`, as with `x = ce.box('x')`.

- **A function that calls a name that held a number calls it once the name is
  a function** (CE-1333). After `f(t) := a(t+1)`, `ce.assign('a', 3)` and
  `a(x) := x^2`, `f(1)` gave `2a`: the body kept the product `a·(t+1)`
  that it read while `a` held a number. It now gives `4`, as a function
  defined after `a(x) := x^2` does. The same holds when `a` held a number,
  or was declared `real`, before `f` was defined. A new number given to `a`
  keeps the product, and `ce.withValues()` still accepts `a`.

- **The norm of an element of a list of points has the type of one number**
  (CE-1215). With `LQ: list<tuple<real, real>>`, the type of
  `Norm(At(LQ, -1))`, `Norm(First(LQ))`, `Abs(At(LQ, -1))` and
  `Hypot(At(LQ, -1), 1)` was `list<number>`, where the value is one number.
  The arguments of the call (`LQ`, `-1`) were read as the coordinates of the
  point. The type is now the type of the norm of a point
  (`Norm(P)` for `P: tuple<real, real>`), and a point whose coordinate is a
  list still has the type `list<number>`.

- **The LaTeX of an applied derivative of order 4 or more of a function that
  is not declared reads back as a derivative** (CE-1350). With `f` not
  declared, `ce.parse("f''''(x)").latex` is `f^{(4)}(x)`, which read back as
  `x f^4`. `f^{(n)}(x)` now reads as `["Apply", ["Derivative", "f", n], "x"]`
  when `f` is not declared or its type is unknown, as `f'(x)` already does,
  for any order `n`, a symbolic one included. Without an argument list, or
  with `f` declared a variable, `f^{(4)}` is still a power of `f`.

- **The tangent, the secant and their cofunctions and hyperbolic forms of a
  complex number with a large part give a number** (CE-1211).
  `Tanh(Complex(1000, 0.5)).N()` and `Tan(Complex(0.5, 1000)).N()` gave
  `NaN`, and `Coth(Complex(1000, 0.5)).N()` gave `0`: the computation
  divided by `cosh(2t)`, which overflows when the real part (hyperbolic
  functions) or the imaginary part (circular functions) is more than about
  355. They now give `1`, `i` and `1`. Compiled JavaScript, which gave
  `NaN` for `Tan`, `Cot`, `Sec`, `Csc`, `Tanh`, `Coth`, `Sech` and `Csch` of
  such a value, now gives the same values as the interpreter.

- **The logarithm of a complex number whose real part holds a square or a cube
  keeps its imaginary part** (CE-1208). `Ln(Complex(9, 9)).evaluate()` gave
  `2 Ln(3)` and `Log(Complex(4, 1)).evaluate()` gave `2 Log(2, 10)`: the
  rewrite `ln 9 = 2 ln 3` read only the real part of the argument. It now
  applies only to a real argument, and these logarithms stay exact and
  unevaluated, with the value of `N()`.

- **A sum or a product whose set of values names another index gives a
  number** (CE-1190). `Sum(i*j, Limits(i, 1, 3), Element(j, Range(1, i)))`
  stayed unevaluated. It now gives 25, the value of the same sum written with
  `Limits(j, 1, i)`. An `Element` clause whose set or condition names the
  index of another clause is evaluated inside the operator of that index, in
  any order of the clauses, as a `Limits` clause whose bounds name another
  index already was.

- **A user function whose parameter is a union with a point type accepts the
  point of `NaN` coordinates** (CE-1156). With `F` declared
  `(tuple<real, real> | string) -> unknown` and `F(p) := p`,
  `F((NaN, NaN))` and `F(At([(1, 2)], 5))`, a read past the end of a list of
  points, gave an `incompatible-type` error. They now give `(NaN, NaN)`, as
  for a parameter declared `tuple<real, real>`. The point must have the
  arity of a point arm of the union.

- **A number made at a higher precision keeps the digits of a double after
  the precision is set to `'machine'`** (CE-1138). After `ce.precision = 30; const a = ce.parse('0.3'); ce.precision = 'machine'`,
  `ce.expr(['Sqrt', a]).evaluate()` gave `0.547722557505166`, two digits
  fewer than the square root of the double `0.3`, `0.5477225575051661`. The
  square root, the logarithm, the exponential, a quotient, an integer power
  and the modulus of such a number are now computed from all its digits and
  give a machine number. The Frobenius norm of a matrix that holds such a
  number now equals the norm of the same values as a vector.

- **A negative power of a call of a user function named `Divide` is no longer
  read as a power of a quotient** (CE-1133). With `Divide` declared as the
  function `(u, v) ↦ 1000`, `ce.expr(['Power', ['Divide', 'x', 2], -2])` was
  rewritten as `4/x²`, which then called the user function and gave `1000` at
  `x = 4`. It now stays a power of the call and gives `1/1000000`. The
  exponent `-1` and `.pow()` gave the same kind of wrong value. In the scope
  of such a function, the reciprocal of a function call, such as
  `Power(Sin(x), -1)`, is now a quotient of the library `Divide`.

- **A function literal declared or assigned with a signature over residue
  classes in an inner scope now reads the variables of the scope where it was
  made** (CE-1131). With `k = 1`, `f = x ↦ k·x`, and an inner scope that
  declares another `k = 2`, `ce.declare('g', { signature: '(residue) -> residue', evaluate: f })` made `g(ResidueClass(2, 5))` give
  `ResidueClass(4, 5)`; it now gives `ResidueClass(2, 5)`, as
  `Apply(f, ResidueClass(2, 5))` does. An assignment of `f` to a symbol
  declared `(residue) -> residue` had the same wrong value.

- **A call of a user function named `Sqrt` is no longer read as a square
  root in a product or a sum** (CE-1122). With `Sqrt` declared as the function
  `u ↦ 1000`, `ce.box(['Multiply', 2, ['Sqrt', 4]])` gave `4` and now gives
  `2000`; `.mul()` and `.add()` with such a call gave the same wrong values.
  A product of the library `Sqrt` made in the scope of the user function now
  stays a call of the library `Sqrt`.

- **`NIntegrate` of a function whose parameter has a declared type now gives
  the right value when the integrand overflows at some samples.**
  `NIntegrate(Function(x^100 * Exp(-x), Typed(x, 'real')), 0, +oo)` gave a
  different wrong value at each call, about `10¹¹⁴`, and now gives
  `9.332621544394413e+157` (`100!`), as the same function with an untyped
  parameter does.

- **The LaTeX of a `Sum` or a `Product` with a range that has no upper bound
  before a range that has one now parses back with the same bounds**
  (CE-1161). `Sum(i*j, Limits(i, 1, Nothing), Limits(j, 1, 3))` was written
  `\sum_{i=1, j=1}^3ij`, which parses with the upper bound `3` on `i`. It is
  now written as nested operators, `\sum_{i=1}\sum_{j=1}^3ij`, which parses as
  a `Sum` of a `Sum` with the same meaning.

- **The numeric value of a product of a fraction, another number and a
  symbol now has the correct last digit** (CE-1747). The fraction was
  rounded before the product with the other number. At the default
  precision, `N((1/3)·√-2·x)` gave `0.471404520791031682933i·x` and now
  gives `0.471404520791031682934i·x`, the same coefficient as
  `N((1/3)·√-2)`; `N((1/3)·π·x)` had a wrong 20th digit.

- **A minus sign after an invisible box or a strut at the start of an
  expression is now a negation** (CE-1175). `\phantom{x}\,-b` parsed as
  `-b + Error(…)` and is now `-b`; `x = \phantom{x}-b` parsed as
  `-b + (x = Error("missing"))` and is now `x = -b`. `a\placeholder{}\,-1`
  was the product `-a` and is now `a - 1`.

- **The LaTeX of a held `Annotated` expression applies its string styles**
  (CE-1398). The Epsil expression
  `Latex(Hold(Annotated(pi, {"color" -> "blue"})))` gave
  `\mathrm{Hold}(\textcolor{'blue'}{\pi})` and now gives
  `\mathrm{Hold}(\textcolor{blue}{\pi})`. A `fontWeight`, `fontStyle`,
  `fontFamily` or `mathStyle` given as a string was ignored and now gives
  `\textbf{…}`, `\textit{…}`, `\texttt{…}`, `{\displaystyle …}` and the other
  style commands.

### Performance

- **A compiled formula whose functions call a small function in several sums
  now copies each of those calls,** so a call that every term makes with the
  same arguments is computed once. The size limit of the copies counted each
  copy before the constant arguments folded, so the last function compiled
  kept its calls: with `n(x, y, k) := e^{-5000(D(x, y, k) - F(x, y))}` and
  `H(x, y) := \sum_{k=1}^{16} \operatorname{mod}(0.567k, 1)\, n(x, y, k)`,
  each of the 16 calls of `n` in `H` computed `F(x, y)` again. A formula of
  this form compiled to JavaScript now makes 520 calls of `Math.sin` and
  `Math.cos` per point instead of 1,141, and runs about 2.5 times faster.
  The values are the same.

## 0.201.1 _2026-11-23_

### Performance

- **`Gamma`, `GammaLn` and `Beta` evaluate about five times faster at high
  precision**, for an argument other than an integer or a half-integer up to
  20,000. With `ce.precision = 200`, `Gamma(11/3).N()`
  took about 0.7 ms and takes about 0.14 ms; at `ce.precision = 1000` it took
  about 20 ms and takes about 3.6 ms. At 50 digits the gain is about three
  times. The digits are the same as before.

### Resolved Issues

- **A formula over a range that ends at the length of a computed list no
  longer computes the list when it is read** (CE-1723). The type of
  `q(0, Range(1, Length(P)))`, `Sin(Range(1, Length(P)))` or
  `Range(1, Length(P)) + 1` is now read from the type of the range. Before,
  it counted the range, which evaluated every element of `P`: the prepare of
  a Document with such a row took 1952 ms instead of 7 ms for a list of
  1029 points. With `P` a `Filter` of a list, boxing the formula could also
  throw `Filter predicate must return "True" or "False"`, or give a wrong
  value (`Sin(Range(1, Length(P)))` evaluated to `[Sin(1), 0]`).
- **The parse option `preserveLatex` no longer changes the meaning of a
  formula** (CE-1727). With the option, `\log_{2} 3` was `Log(3, 2)` and is
  now `Lb(3)`, `\mathbb{R}^{+}` was `PseudoInverse(RealNumbers)` and is now
  `PositiveNumbers`, and `\{a_n\}_{n=1}^{\infty}` was a power of a set and
  is now `IndexedSequence(a_n, n, 1, PositiveInfinity)`, as without the
  option. The LaTeX of each part is now added after the parse. More numbers
  and symbols get their `latex` (the index of a sum, the variable of an
  integral). A number or a symbol that the parser made, and whose value is
  also written nearby, can get the LaTeX of the written one (the base `10`
  of `\lg 10`); a value written with two spellings (`\sum_{\alpha=1}^3 α`)
  gets no `latex`.
- **`ReplaceAll` in a block keeps the value of a local variable of the
  block** (CE-1720). `ReplaceAll(Block(Declare(a, "integer"), Assign(a, 5), a + Sin(b)), Sin(_a) -> 1)` was `a + 1`; it is now `6`.
- **`\max_{x \in S} f` is the maximum of `f` over the elements of `S`**
  (CE-1728), and the same for `\min`, `\sup` and `\inf`.
  `\max_{x \in \{1,2,3\}} x^2` is `Max(Map(x ↦ x^2, {1, 2, 3}))` and
  evaluates to `9`; it was `Max(_, x ∈ {1, 2, 3}, x^2)`, with the subscript
  read as a symbol `_` and `x` free. As in `\sum`, the body stops before a
  `+`, and `a_n` in the body is `a` indexed by the bound variable:
  `\max_{n \in \{1,2\}} a_n` is `Max(a_1, a_2)`. Another subscript (a range
  `1 \le i \le n`, a condition, two variables) is an
  `expected-set-membership` error. The LaTeX of such an expression is
  `\max_{x\in S}f`.
- **In Epsil, the message of an error in the second operand of a subtraction
  names the subtraction** (CE-1717). With `w` holding `"s"`, the runtime error
  of `3 - ln(w)` said "in Ln argument 1, in Negate argument 1, in Add
  argument 1", which names a negation and a sum that the program does not
  contain. It now says "in Ln argument 1, in Subtract argument 2".
- **A breakpoint in the body of a function with no parameters stops the
  debugger** (CE-1725). In a debug run of `executeEpsilAsync()`, and with
  `applyEpsilAsync(ce, cb, [], { debug })`, the statements of
  `let cb = () => do { a = a + 1; a }` did not call `beforeStatement` when
  the program called `cb()`; with one parameter (`t => do { … }`) they did.
  For the same cause, `evaluateAsync()` of
  `["Apply", ["Function", ["Block", …]]]` did not evaluate an operator in the
  block that has only an `evaluateAsync` handler.
- **The derivative of the CDF of a gamma, chi-square, beta, F or t
  distribution is its density** (CE-1726). `D(CDF(GammaDistribution(2, 3), x), x)` was `Which(x <= 0, 0, True, -1/3 * Apply(Derivative( "GammaRegularized", 0, 1), 2, x/3))`; it is now
  `Which(x <= 0, 0, True, 1/9 * x * e^(-x/3))`. For the same cause,
  `D(GammaRegularized(a, x), x)` is `-x^(a - 1) e^(-x)/Gamma(a)` and
  `D(BetaRegularized(x, a, b), x)` is `x^(a - 1) (1 - x)^(b - 1)/Beta(a, b)`,
  also in the three- and four-operand forms. The partial derivatives in the
  parameters stay unevaluated.
- **In Epsil, more errors in an element of a list are underlined at that
  element** (CE-1719). With `function g(x) { Ln(x) + 1 }` and `let y = 5`,
  each of `let v = [y, z + 1, g("a")]`, `let v = [y + 1, ...w, g("a")]`,
  `m[1] = [y + 1, g("a")]` and `let v = [y + 1, g("a")] + 1` underlined `y`
  or `z`, and now underlines `g("a")`. A variable before the element counts
  for the number of values it holds, a spread for the elements of its list,
  and a call for the values its type allows. The list can be the value
  stored by an assignment to an element, or the operand of `+`, `-`, `*` or
  `/` with numbers.
- **A fraction times a complex number has a correct last digit at the
  default precision** (CE-1718). `N((1/3)·√-2)` gave `0.471…682933i`, where
  `N(√-2/3)` gives `0.471…682934i`, and `N((1/3)·e^i)` and
  `N((1/3)·1.5i)` (`0.4999…95i`) had the same error. The fraction is now
  applied as a product and a division with guard digits, as for a real
  number: `N((1/3)·1.5i)` is `0.5i`.
- **In Epsil, the message of an error inside a square root or a root that is
  divided names the division** (CE-1716). With `w` holding `"s"`, the runtime
  error of `sqrt(w)/2 + 1` said "in Sqrt argument 1, in Multiply argument 2,
  in Add argument 1". It now says "in Divide argument 1", as for `ln(w)/2 + 1`.
  `Root(w, 3)/2 + 1` had the same message.
- **With `jit = 'off'`, an integral of a function whose body is an integral with
  no closed form gets a value** (CE-624). With
  `g(y) := \int_0^1 e^{-x^2y}\cos(x)\,dx`, `\int_0^1 g(y)\,dy` stayed
  unevaluated under `.N()`, and `NIntegrate(y ↦ g(y), 0, 1)` was `NaN`; both are
  now `0.74079733663767`, the value of the compiled route. Each such sample
  computes the inner integral by quadrature in the interpreter, so the integral
  takes seconds or, for a hard inner integrand, minutes. An integrand that calls
  a function declared `pure: false` still stays unevaluated.

## 0.201.0 _2026-11-23_

### New Features

- **`Mod(m, n, d)` is the representative of `m` modulo `n` in `[d, d + n)`,**
  as in Mathematica's `Mod[m, n, d]` (#548, contributed by
  [enumeratio](https://github.com/enumeratio)). It was an
  `unexpected-argument` error. The signature is now `(real, real, real?)`
  and the value is `d + Mod(m − d, n)`, under `evaluate()` and `.N()`:
  `Mod(7, 3, 1)` is `1`, `Mod(9, 3, 1)` is `3` (a residue in `1..3`),
  `Mod(−1, 3, 1)` is `2` and `Mod(10, 4, −1)` is `2`. Exact rational and
  float operands keep their kind, and a symbolic operand leaves the call
  unevaluated. The JavaScript, GLSL and interval targets and the bigint mode
  decline the three-operand form, so a compiled program falls back to the
  interpreter; the enclosure, measurement, limit and derivative code leave it
  unevaluated, and the LaTeX form writes `\mathrm{Mod}(m, n, d)`. The
  two-operand `Mod` is unchanged.

- **`PiecewiseExpand(expr)` rewrites `Abs`, `Sign`, `Min`, `Max` and
  `Heaviside`, wherever they occur in `expr`, into one conditional value
  `Which(c1, v1, …, True, vd)`** (#516, contributed by
  [enumeratio](https://github.com/enumeratio)). `PiecewiseExpand(Max(x, y))`
  is `Which(0 <= x - y, x, True, y)`, `PiecewiseExpand(Heaviside(x))` is
  `Which(x < 0, 0, 0 < x, 1, True, 1/2)` (the value `Heaviside(0)` has) and
  `PiecewiseExpand(Sign(x))` is `Which(0 < x, 1, x < 0, -1, True, 0)`.
  `Abs` and `Sign` split only for an argument known to be real (declared
  `real`, or given a sign by `ce.assume()`), and `Min`, `Max` and
  `Heaviside` do not split an argument declared `complex` or `number`; such
  a call is left as it is. Nested occurrences combine their conditions:
  `PiecewiseExpand(Abs(x - Max(x, 1)))` is `Which(0 <= x - 1, 0, True, 1 - x)`.
  The assumptions of `ce.assume()` are read, never changed: with `x > 0`
  assumed, `PiecewiseExpand(Abs(x))` is `x`, and with `x > 3` assumed the
  constant of `Max(x, 2, y)` never wins. An expression with none of these
  functions is returned unchanged, as is one whose arms would pass 256.
  `Which`, `Sum` and the other operators that hold their operands are not
  entered.

- **`@cortex-js/compute-engine/runtime` exports `sysHelpers`,** the table of
  stateless helpers that the code of a JavaScript compilation result calls as
  `_SYS.<name>`. A host that lowers its own operators the same way reads them
  from the entry instead of from an engine internal: `sysHelpers.digamma(2.5)`
  is the value that `compile(ce.box(["Digamma", "x"])).run({ x: 2.5 })` gives,
  and a runtime from `createJavaScriptRuntime()` inherits the table. The
  engine-bound helpers (the random family, `integrate`, `tick`) stay members
  of a runtime. The names and signatures of the helpers follow the code of a
  compilation and may change in any release (#527, contributed by
  [enumeratio](https://github.com/enumeratio)).

- **An optional `combinatorics` library declares statistics over the engine's
  own lists.** `loadCombinatorics(ce, { areas })`, exported from
  `@cortex-js/compute-engine/combinatorics`, declares about 350 statistics of a
  permutation as its one-line list, such as `MajorIndex`, `Inversions` and
  `Denert`, and about 195 of an integer partition as its non-increasing parts,
  such as `LargestPart`, `DurfeeSquare` and `AddableCells`. A statistic is
  defined by an Epsil function literal, compiled ahead of time so the entry
  does not carry the Epsil text, and may carry a TypeScript kernel that a test
  holds equal to it. A list of integers outside the domain, such as
  `MajorIndex([1, 1])`, stays unevaluated; an argument that is not a list of
  integers (`MajorIndex([1.5])`) is a type error. All but a few heads carry
  the identifier of a [FindStat](https://www.findstat.org) statistic and equal
  its values on every permutation of length at most 5 and every partition of
  size at most 6 that FindStat tabulates; the others are held to their
  examples (#531, contributed by [enumeratio](https://github.com/enumeratio)).

### Improvements

- **A function literal that updates a list of lists variable of the engine
  compiles to JavaScript** (CE-1721), so the timer callback of the Game of
  Life runs compiled: with `let g = map(i => map(j => …, Range(1, n)), Range(1, n))` and `step(g: list) = map(i => map(j => …, Range(1, n)), Range(1, n))`, the function `(t: real) => do { g = step(g) }` gave the
  decline "an assignment of g, of type list\<list\<number>>". One tick of a
  32 × 32 grid took about 1.7 s interpreted and takes about 1 ms compiled.
  Each call of `run()` reads the grid in the engine and writes the new grid
  back. Three changes make this compile: an input of type
  `list<list<number>>` is read as a list of lists of reals (not in the
  `complex` mode), a parameter of type `list` of a user function takes such
  a list whole, and the variable can be written by an assignment that is a
  statement of the body. A write in a branch or in a loop, and a second
  write that reads the first, still fall back to the interpreter.

- **A compiled function can flatten a list of lists that it receives as
  input** (CE-1734, #638). With `L: list<list<integer>>`,
  `compile(Length(Flatten(L)))` fell back to the interpreter, because an
  input whose rows can have different lengths was read only row by row. On
  JavaScript, `Flatten(L)` now compiles to a new list of the elements of the
  rows in order: at `L = [[1, 2], [], [3]]` it gives `[1, 2, 3]`, and
  `Length`, `Sum`, `Sort`, `Map` and the other readers of a list read it. A
  part of a tuple input and a parameter of a user function of that type
  compile too. `Flatten(L, 0)`, GLSL, the interval target and the bigint
  mode still fall back.

- **In the bigint compile mode, `Floor`, `Ceil`, `Round` and `Truncate` of
  an integer times a rational constant compile.** With `n: integer`,
  `compile(Floor(n/2), { mode: 'bigint' })` fell back to the interpreter
  (`1/2` has no `bigint` value). It now compiles to an exact division of
  integers, and at `n = -7n` gives `-4n`; `Ceil((n + 1)/3)` and
  `Round(3n/4)` compile too. `Round` with a `roundingTies` other than the
  default still falls back, and so does `Floor(n/m)` of two inputs.

- **In the bigint compile mode, `(a − Mod(a, c))/c` of integers compiles**
  (CE-1739, #638). With `n, m: integer`,
  `compile((n − Mod(n, m!))/m!, { mode: 'bigint' })` fell back to the
  interpreter, because a quotient of two integers is not always an integer.
  This quotient always is: it now compiles to the exact floor division
  `⌊n/m!⌋`, and at `n = 100n, m = 3n` gives `16n`. A constant divisor,
  `(n − Mod(n, 3))/3`, compiles too. Another quotient still falls back.

- **In the bigint compile mode, `Reduce` and `Fold` that build a list of a
  run-time length compile** (CE-1740, #638). With `n: integer`,
  `compile(Fold((a, i) => Join(a, [i]), [0], 1..n), { mode: 'bigint' })`
  fell back to the interpreter, although the default mode compiled it. The
  loop now carries the list and its length, as in the default mode, and at
  `n = 5n` gives `[0n, 1n, 2n, 3n, 4n, 5n]`. `Append(a, i)` from `List()`
  compiles too. A step that gives a value that is not an integer or a
  Boolean still falls back.

- **A compiled `If` or `Which` with an empty list as one arm compiles on
  JavaScript** (CE-1735, #638). `If(n < 1, [], Range(1, n))` declined with
  "an empty list", so the program fell back to the interpreter. The arm
  `[]` now takes the element type of the other arms when the type of the
  conditional is a list of integers or reals, and the result is `[]` or
  the other list. `[]` as the argument of an `Apply` parameter declared
  `list<integer>` or `list<real>` compiles the same way. A list of
  booleans, points or lists, GLSL and the interval target still decline.

- **A compiled test of membership in a number set compiles when the declared
  type decides it** (CE-1738, #638). With `n: integer`,
  `Element(n, Integers)` (`n \in \Z`) fell back to the interpreter. It now
  compiles to `True`, on every target. The test is decided from the static
  type of the value, for `Integers`, `RationalNumbers`, `RealNumbers`,
  `ComplexNumbers`, `ImaginaryNumbers`, `Numbers` and the extended sets:
  `True` when the type is inside the set, `False` when the two do not meet
  (`x \in i\R` with `x: real`). `NotElement` is the negation. A type that
  does not decide (`x \in \Z` with `x: real`) still falls back.

- **A compiled read of one part of a tuple whose parts have different kinds
  compiles in more forms on JavaScript** (CE-1741, #638). With
  `S: tuple<string, integer>`, `First(S)` and `Last(S)` fell back to the
  interpreter, while `At(S, 1)` compiled. `First`, `Second`, `Third` and
  `Last` now read the part as `At` does. With `P: list<integer>`,
  `At(Tuple(0, P), 2)` also fell back; `At`, `First` and `Last` of a
  `Tuple` literal at a constant index in range now compile to the part at
  that index (`P` here). A read at an index known only at run time still
  falls back: the shape of the result depends on the index.

- **The `///` comments of a protocol and of its members are kept, and the
  editor functions show them** (CE-1730). `epsilHover()` on a protocol gives
  its comment, also for a protocol that a prelude declared on the engine,
  and the signature help and the completion of a member give the member's
  comment: after `executeEpsil(ce, prelude)`, `c.rotate(` shows "Rotates the
  figure by `angle` radians…". A call written `rotate(c, ` shows the
  member's declared signature, `rotate(self: Figure, angle: real, …)`, and
  not the generic signature of its dispatcher. A value made by a function of
  the engine has the function's result type, so `let c = circle(…)` gets the
  members of `Figure` with no annotation. In MathJSON the comments are an
  optional fourth operand of `DeclareProtocol`, `["Dictionary", description: …, members: ["Dictionary", member: …]]`, and a host documents a protocol
  with the options `description` and `memberDescriptions` of
  `ce.declareProtocol()`.

- **`epsilCompletions()` offers the names that the engine defines, such as
  the functions of a prelude that the host ran** (CE-1729). After
  `executeEpsil(ce, prelude)`, typing `circ` in the edited source offers the
  prelude's `circle`, with its signature and its `///` comment, as
  `epsilHover()` describes it; it was not offered. A definition of the
  engine replaces the library item of the spelling it shadows: a prelude's
  `segment(p, q)` is offered in place of the library's `segment`, as a call
  reaches it. A name of the edited source still shadows both, and a name that
  the host declares with a signature (`ce.declare("draw", "(real) -> nothing")`) is offered as a function.

- **`compile()` compiles a program that builds values of a named tuple type
  and passes them to a function of the host, such as a drawing library whose
  figures are records, which it refused** (CE-1652). On JavaScript:

  - A value of a named tuple type is a record. With
    `type P = tuple<x: real, y: real>` and `f(t: real) = P(cos(t), sin(t))`,
    `f(t)` compiles, and `run({ t: 1 })` returns the object
    `{ x: 0.5403…, y: 0.8414… }`, keyed by the field names; a field whose
    value is `Nothing` is `null`. `[t, "a"]` and `("a", t)`, of elements of
    several kinds, compile and return an array. A field is read by its name
    (`p.x`) or at a constant index, and a field typed `any`, `list` or
    `string | color | nothing` takes the shape of the value it is given.
  - A user function compiles once for each kind of value it is given: a
    parameter of no stated type, of type `any` or of a named tuple type takes
    a record, and one of no stated type or `any` also a string or a colour
    (`any`: also a number or a point). With
    `shift(p: P, d: real) = P(p.x + d, p.y)`, `shift(P(cos(t), sin(t)), 1)`
    compiles. A protocol method called on a record is chosen when the code is
    compiled, from the type of the record, and an argument that the call
    leaves out takes the default of the protocol:
    `t => circle((2, 0), 0.2).rotateAbout(t / 1000, (0, 0))` compiles.
  - `match`, `x is T` and `N` compile. A `match` whose cases are string or
    number constants, `_` or a tuple of names compiles:
    `(k: string, x: real) => match k { == "square" => x^2; _ => 0 }` gives
    `9` for `("square", 3)`. In each compiled copy of a function, `x is T` of
    a parameter is `true` or `false` when the kind of its value decides it
    (`x is Figure` of a figure, `box is nothing` of a box
    `((x0, y0), (x1, y1))`), `==` and `!=` of a string and a number or a point
    are `false` and `true` as the interpreter gives them, and `==`, `!=` and
    `match` of strings known when the code is compiled (a literal, a protocol
    default) are decided; the arm of an `if` or a `match` that is not taken is not
    compiled. `N(x)` and `N(x, 15)` of a number, a string, a boolean, or a
    list or a tuple of real numbers are `x`.
  - A function whose one parameter is a rest parameter compiles once for
    each list of argument types, and a function of the host takes a list, a
    tuple or a record and receives the interpreter's value. With
    `function draw(...args) -> nothing { figureDraw(listFrom(args)) }` and a
    host function `figureDraw` declared `(any) -> nothing`,
    `t => draw(circle((cos(t), 0), 0.1))`, `.rotate(t)`, `.scale(2)` and
    `.stroke("blue")` of the circle, two figures in one `draw`, and
    `draw([orbit, sun, earth.rotateAbout(t / 1000, (0, 0))])` with the three
    figures built before the callback compile, and `figureDraw` receives
    `List(Figure("circle", List(…), Tuple(…), Nothing, …))`, its numbers as
    machine numbers.

  These still fall back to the interpreter: a value whose kind depends on a
  run-time condition (`if t > 0 { circle(…) } else { circle(…).fill("red") }`);
  a field of a run-time length (`.dash([t, 2])`); a record, or a list of
  several kinds, given to a parameter declared `list`; a list of strings in a
  field; a recursive function that takes or returns a record; a colour, a lazy
  collection (`draw(1..3)`) or a function of the host whose result is `any` at
  the host; a call of the host in a function that assigns a variable of the
  engine; a rest parameter beside other parameters; a `match` case with a
  guard, a `match` with no `_` case, an `x is T` that the kind of the value
  does not decide, and `N(x, p)` with fewer than 15 digits; and every record on
  GLSL and `interval-js`. A result that is a record cannot be broadcast.

## 0.200.1 _2026-11-23_

### New Features

- **Eight more probability distributions: `StudentTDistribution(ν)`,
  `ChiSquareDistribution(k)`, `FRatioDistribution(d₁, d₂)`,
  `GammaDistribution(α, θ)` (shape and scale), `BetaDistribution(α, β)`,
  `GeometricDistribution(p)`, `NegativeBinomialDistribution(n, p)` and
  `HypergeometricDistribution(n, K, N)`** (CE-1590). `PDF`, `CDF`,
  `Quantile`, `Mean`, `Variance` and `StandardDeviation` accept them, as
  they accept the five older distributions. A t critical value
  `Quantile(StudentTDistribution(10), 0.975)` is `2.2281388519862747484`,
  and the p-value of a chi-square test is
  `1 - CDF(ChiSquareDistribution(4), 9.488)`. A density at a symbolic point
  evaluates to its closed form, which compiles:
  `PDF(BetaDistribution(2, 3), x)` is
  `Which(0 < x && x < 1, 12x(1 - x)^2, True, 0)`. The geometric and the
  negative binomial distributions count the failures before the first (the
  n-th) success, so their support starts at 0. A continuous quantile has no
  closed form: with exact operands it stays unevaluated, and `.N()` gives
  its value.
- **The orthogonal polynomials `ChebyshevT(n, x)`, `ChebyshevU(n, x)`,
  `LegendreP(n, x)`, `HermiteH(n, x)` and `LaguerreL(n, x)`, of an integer
  degree** (CE-1592). In Epsil they are `chebyshevT`, `chebyshevU`,
  `legendreP`, `hermiteH` and `laguerreL`; in LaTeX
  `\operatorname{ChebyshevT}(n, x)`. With a literal degree, a symbolic `x`
  gives the polynomial: `ChebyshevT(3, x)` is `4x^3 - 3x` and
  `LegendreP(2, x)` is `3/2 * x^2 - 1/2`. An exact rational `x` gives an
  exact value (`ChebyshevT(3, 1/2)` is `-1`), and a float `x` or `.N()` the
  value of the three-term recurrence. `HermiteH` is the physicists'
  polynomial (`HermiteH(2, x)` is `4x^2 - 2`). They compile to JavaScript and
  GLSL for an integer degree and a real `x`.

### Behavior Changes

- **With no domain, `Solve` gives the complex roots of an exponential
  equation** (CE-1713). For a complex `x`, `e^x` repeats with the period
  `2πi`, so `Solve(e^x = 2, x)` is now `[ln(2) + 2πi·n]`, where `n` is
  `ArbitraryInteger(1)`, any integer; it was `[ln(2)]`. `Solve(e^x = -1, x)`
  is `[iπ + 2πi·n]` (it stayed unevaluated), `Solve((x - 1)(e^x + 1) = 0, x)`
  is `[1, iπ + 2πi·n]` (it was `[1]`), and `Solve(2^x = 8, x)` is
  `[3 + 2πi·n/ln(2)]`. A hyperbolic function is a sum of exponentials:
  `Solve(cosh(x) = 2, x)` is `[ln(2 + √3) + 2πi·n, ln(2 - √3) + 2πi·n]`.
  `Solve` over `ComplexNumbers` gives the same families. An equation whose
  complex roots are not all known now stays unevaluated with no domain: an
  exponent that is not linear (`e^(x²) = 2`), a trig function of a periodic
  argument (`sin(sin(x)) = 0`, which holds where `sin(x) = kπ`), and an
  equation from which a step removed a complex root
  (`(sin(x) - 2)(sin(x) - 1/2) = 0`). Over `RealNumbers`, or for an unknown
  declared `real`, the answers do not change: `Solve(e^x = 2, x ∈ ℝ)` is
  `[ln(2)]`. `expr.solve('x')` does not change.

- **`ReplaceAll` applies a rule for a name and a rule for an expression in
  one pass** (CE-1691). The rules for names were applied first, so a
  pattern rule saw their result: `ReplaceAll(x + x^2, [x -> 2, x^2 -> y])`
  was `6`, and it is now `y + 2`, as its description says. At each part,
  the first rule that matches replaces it, thus with two rules for the same
  name the first one wins (it was the last one). When a pattern matches
  inside a part that binds a name of a rule for a name (a `Sum`, a
  `Function`, a set builder), or whose index the substitution must rename,
  the call stays unevaluated: `ReplaceAll(Sum(x Sin(x), Limits(x, 1, 3)), [x -> 2, Sin(_a) -> 1])`.
- **A function that assigns its own parameter is applied to each element of
  a list argument, whatever the body does with the parameter** (CE-1507).
  The parameter had a scalar slot when the body only indexed it after the
  write, but took the list whole when the body passed it to `Sum` or
  `Mean`: with `g(n) := Block(Assign(n, Range(1, n)), Sum(n))`, `g([3, 4])`
  was an `incompatible-type` error, and it is now `[6, 10]`, as
  `g(3)` is `6`. A body that takes the list whole declares its parameter:
  with `F(p: list) := Block(Assign(p, [1, 2]), Length(p))`,
  `F([10, 20, 30])` is `2`.
- **In Epsil, an error in an element of a list or a tuple is underlined at
  that element** (CE-1137). With `function g(x) { Ln(x) + 1 }` and
  `let y = 5`, the error of `let v = [y + 1, g("a")]` underlined the `y` of
  the other element, and that of `let xs = [1, g("a"), 3]` underlined the
  whole statement. Both now underline `g("a")`. This applies when the
  list is the value of the statement, of a `let` or of an assignment to a
  name, and when each element before the failed one is a literal, a list or
  an arithmetic call: a variable or another call can give a `Sequence`,
  which moves the elements, and the location is then as before.

### Improvements

- **A definite integral compiles to GLSL when the engine finds its closed
  form** (CE-1467).
  `compile(ce.parse("\\int_0^x \\sin t\\,dt"), { to: "glsl" })` declined;
  its code is now `((-cos(x)) + 1.0)`, as the JavaScript code computes it.
  An integral with no closed form, and every `NIntegrate`, still decline on
  GLSL, which has no quadrature. Where the closed form is `NaN`, at a bound
  where the integrand has an integrable singularity (`\int_a^2 \ln t\,dt` at
  `a = 0`), the GLSL code gives `NaN`; the JavaScript code runs the
  quadrature there.
- **In Epsil, a `$…$` LaTeX island is read with the LaTeX syntax of the
  engine when the host gives no `parseLatex`** (CE-1665). With
  `ce = new ComputeEngine()`, `executeEpsil(ce, "$\\frac{1}{2}$ + 1")` gave
  the error `latex-parsing-unavailable`; its value is now `3/2`. This
  applies to `executeEpsil`, `executeEpsilAsync`, `checkEpsil`,
  `epsilCompletions`, `epsilSignatureHelp`, `epsilHover`,
  `epsilDefinition` and `epsilDebugStatements`. The island is read as
  `ce.parse(latex, { form: "raw" })` reads it, with `ce.latexOptions`. The
  editor functions also take a `parseLatex` option now. An engine of the
  core-only entry has no LaTeX syntax: an island still gives
  `latex-parsing-unavailable` there.

- **`applyEpsilAsync(ce, fn, args, { debug, signal })` applies a function
  value under a debugger** (CE-1647). A host that kept a function of an
  earlier run, such as the timer callback of a notebook cell, applies it
  with the debug hooks and the signal of `executeEpsilAsync()`: the hooks
  are called for the statements of the function only, and a pause does not
  count against a time limit. The result has the form of the result of
  `executeEpsilAsync()`, and a runtime problem is an `["Error", …]` value.
  Before, the host ran a wrapper program that called the function, and
  the statements of the wrapper called the hooks too.
- **`\zeta(0, a)` with a symbolic `a` evaluates to `1/2 - a`** (CE-1598),
  as `HurwitzZeta(0, a)` does. The two-argument `Zeta` stayed unevaluated
  unless `a` was known to be positive. For another order, such as
  `\zeta(-1, a)`, the condition remains: at a negative base point `Zeta`
  and `HurwitzZeta` have different values (`Zeta(-1, -5/2)` is `109/24`,
  `HurwitzZeta(-1, -5/2)` is `-107/24`), so the Bernoulli polynomial of
  `HurwitzZeta` is correct for `Zeta` only when `a` is positive.
- **A nonzero constant over a polynomial equal to 0 has no solution**
  (CE-1594). `Solve(1/(x^2+1) = 0, x)`, `Solve((x^2+1)^(-2) = 0, x)` and
  `Solve((x-1)^(-2) = 0, x)` stayed unevaluated; they are now `[]`, as
  `Solve(1/x = 0, x)` was. A numerator with a parameter is read as nonzero,
  as for `a·x = 0`: `Solve(a/(x^2+1) = 0, x)` is `[]`.
- **The antiderivative of an integer power of a polynomial of degree 2 or
  more has a closed form** (CE-1591). `Integrate((x^2+1)^2, x)` stayed
  unevaluated, while the same polynomial written out integrated; it is now
  `x^5/5 + 2x^3/3 + x`. When no other rule applies, the power is expanded
  and integrated term by term. A power whose expanded degree is more than 32
  stays unevaluated.
- **A function literal that assigns a list variable of the engine compiles to
  JavaScript** (CE-1662), so a timer callback that updates a list runs
  compiled: with `let L = [0, 0, 0]`, the function
  `(t: real) => do { L = L + [1, 2, 3] }` (or `do { L[2] = L[2] + 1 }`, or
  `do { L = Append(L, t) }`) gave the decline "an assignment of L, of type
  list\<number>". Each call of `run()` reads the list in the engine and
  writes its new value back, as for a real variable (`assigns`); the length
  of the list can change at each call. A list of lists still declines.
- **A recursive function row of a Document whose body has no effect is pure,
  and its applications are kept** (CE-1709). A row that states no effect and
  calls itself, or another row that calls it back, had the effects `any`, so
  each application was evaluated again: `F(n) = F(n-1) + F(n-1)` ran 2^n
  times, and `F(14)` took about 850 ms where the same function assigned on a
  scope took 12 ms. The row now has the least effects that hold those of its
  body (`(unknown) pure -> number`), and `F(14)` takes about 3 ms. A body
  that draws a random number still gives the row the effect `random`.
- **`Zeta`, `HurwitzZeta`, `PolyGamma`, `Gamma`, `PolyLog` and `LerchPhi` of
  a complex argument compile on GLSL** (CE-1600), so a domain coloring of
  these functions draws
  on the GPU: `compile(ce.parse('\\zeta(z)'), { to: 'glsl' })` with `z`
  declared `complex` gave the decline "the operation czeta on glsl". The
  single-float kernels give the values of `N()` within about 3e-5 for
  `Gamma`, `Zeta` and `PolyGamma` (a few percent of `HurwitzZeta` for
  `Re(s) < 0`, where its terms are much larger than its value; next to a
  zero of ζ the error is absolute; on the real axis they give the real
  kernels' values, `NaN` included). `PolyGamma(n, z)` of a complex `z` also
  compiles on JavaScript, with the interpreter's kernel, and under
  `mode: 'complex'` `PolyGamma(n, x)` of a real `x` takes it too.
  `PolyLog(s, z)` of a real order is within 3e-5 of `N()` on the plane,
  and `LerchPhi(z, s, a)` in the unit disk; `LerchPhi` gives `NaN` past the
  unit circle unless `a = 1`, and next to `z = 1` (where
  `|ln z| < (|s| + 24)/1400`). Both give `NaN` where their terms cancel too
  far (mostly `LerchPhi` for `Re(s) < 0`), and `PolyLog` gives `NaN` where
  `|ln z| > 3.5` (`|z| > 4.7` next to the negative real axis, `|z| > 33` on
  the positive one) at an order `Re(s) > 1` that is not an integer, or an
  integer above 24. The GLSL `Zeta(x)` of a real `x` next to 0 is exact to
  single-float precision: `Zeta(-1e-6)` gave `-0.5243` for `-0.5000`.
- **`LambertW(x)` of a real `x` compiles to GLSL and to the interval target**
  (CE-1511). It declined on both. On GLSL, `LambertW(1)` is `0.5671433`
  and `LambertW(-0.5)` is `NaN` (below `-1/e`). On the interval target, the
  interval of `[0.5, 3]` holds `[0.3517, 1.0499]`, an interval below `-1/e`
  is empty, and `[-0.5, 1]` gives the partial interval `[-1, 0.5671]`.

### Resolved Issues

- **A failed `node:assert` comparison whose actual value is an expression
  no longer uses all the memory of the process** (CE-1650).
  `assert.equal(ce.expr(['Add', 'A', 'x']), undefined)` took about one
  second and 750 MB to write its message, and `assert.deepStrictEqual` did
  not finish: the message and the comparison walked the whole engine. They
  now stop at the expression's own data, and both finish at once. The
  engine, the scopes and the definitions that an expression refers to are
  now private fields: `expr.engine` is still available, but
  `Object.keys(expr)` no longer lists it, and an expression cannot be read
  through a `Proxy`, such as the one of Vue's `reactive()` (wrap the
  expression with `markRaw()` or keep it outside the reactive object).

- **`PolyLog(1, z)` of an exact rational `z` with `0 < z < 1` is a
  logarithm with no negation** (CE-1596). `PolyLog(1, 1/2).evaluate()` was
  `-ln(1/2)`, and it is now `ln(2)`; `PolyLog(1, 1/3)` is `ln(3/2)`.

- **`LambertW(x)` is correct for `x` above about `1e154`** (CE-1511). The
  value was the first estimate of the iteration: `N(LambertW(1e300))` was
  `684.2471774347877`, and it is now `684.2472086297608`. Compiled
  JavaScript gives the same value.

- **The `epsil` command line tool accepts an option value that starts with a
  dash** (CE-1393). `epsil -e '-5 % 3'` failed with "Option '-e' argument is
  ambiguous", and it now prints `1`. An option that takes a value takes the
  next argument, whatever its first character.

- **A scope that the host pops is released when the garbage collector runs**
  (CE-1152). After a call of a function evaluated in a scope, the engine kept
  that scope and its definitions in memory after `ce.popScope()`, until a later
  call read a type under another scope. One scope at most was kept this way.

- **The Epsil guides describe a `let` with no value as valid** (CE-1459).
  The declarations guide and `epsil doc declaration-without-value` said that
  `let a: integer; if c { a = 1 }; a` is the error
  `declaration-without-value`. It gives `1` when `c` is true, and the
  run-time error `read-before-initialization` when `c` is false; `epsil doc read-before-initialization` now explains this case.
  `declaration-without-value` is now described as the error of a `Declare`
  that is not a statement of a block. The error of
  `let (U, S, V) = svd([[1, 2], [3, 4]])` now points to `epsil doc unevaluated-tuple`, a new explanation, instead of
  `epsil doc runtime-error`.
- **A function with inferred effects follows a new body of a helper that it
  calls** (CE-1674). With `h` declared `(number) -> number` and assigned a
  pure `Function`, a function `k` that calls `h` and states no effects kept
  the effects of the body `h` had when `k` was defined: after
  `h` was assigned `(x) => x + Random()`, `k` was still `pure`, and a
  contract `(number) pure -> number` of a function that calls `k` did not
  refuse the new body of `h`. The effects of `k` now follow each new body
  of `h`, also when `h` had no body when `k` was defined, and the contract
  refuses the assignment.
- **The Epsil formatter accepts about twice the depth of nesting** (CE-1186).
  `serializeEpsil()` of a chain of about 140 nested function applications
  could fail with "Maximum call stack size exceeded" in the formatter. The
  formatter now adds fewer stack frames for each level, and the same chain
  serializes up to about 240 levels.
- **`JacobiTheta` gives the digits of the engine's precision** (CE-1395).
  Above machine precision it gave about 16 digits: at a precision of 30,
  `N(JacobiTheta(3, 0, i))` gave `1.086434811213308`; it now gives
  `1.08643481121330801457531612151`. Where the digits cannot be reached (an
  `Im(τ)` very close to 0, or a zero of the function that the series does not
  give exactly, such as `JacobiTheta(3, 1/2 + i/2, i)`), the expression stays
  unevaluated, as `DedekindEta` does.
- **The numeric value of a power with a large exponent has the digits of the
  engine's precision** (CE-1700). Above machine precision, an exact exponent
  that is not an integer lost a digit for each power of ten of its size: at
  a precision of 30, `N(2^(3000000000000001/3))` gave
  `1.97495439177298922275641597277e+301029995663981`, where the value is
  `1.97495439177298922275641642908e+301029995663981`. A large float
  exponent lost the digits of an exact base in the same way. The exponent is
  now read with more digits as its size grows. A non-integer exponent of
  more than about 500 digits leaves the power unevaluated:
  `N(2^(10^600 + 1/3))` gave `+oo`.
- **Each cell of the numeric value of a product with a list is the numeric
  value of the scalar product** (CE-1710, CE-1711). At machine precision, a
  fraction times a list of floats rounded the fraction first:
  `N((2/3)·[81.67574227865587])` gave `54.450494852437245` where
  `N((2/3)·81.67574227865587)` gives `54.45049485243725`, one cell in three
  off by one unit in the last place. A list or a tuple that mixes exact cells
  with other cells rounded its exact cells first: `N(3·[1/3, 0.5])` gave
  `[0.999…9, 1.5]`, and `N((1/3)·[3 + 6i])` gave `0.999…9 + 1.999…8i`; they
  are now `[1, 1.5]` and `1 + 2i`. A matrix of floats times a number is
  computed on its doubles row by row, about six times faster.
- **A square root times a list of fractions has the numeric value of the
  scalar product in each cell** (CE-1715). At the default precision,
  `N(√2·[1/3])` gave `[0.471404520791031682933424928812542301650399437]`,
  with more digits than the precision and a wrong last digit, where
  `N(√2·(1/3))` gives `0.4714045207910316829338962`. The cell is now the
  same value. A tuple of fractions times `√2` had the same digits.
- **In Epsil, an error in the second operand of a subtraction whose first
  operand has a unary minus underlines the operand that made the error**
  (CE-1129). With `s` holding `"a"`, the type error of `-(y + 2) - s`
  underlined `y + 2`, and the runtime error of `[-y - s, 1]` underlined `y`.
  Both now underline `s`.
- **In Epsil, the message of an error in the argument of `exp` or in the
  numerator of a division names the call that the program contains**
  (CE-1139). With `w` holding `"s"`, the runtime error of `exp(w) + 1` said
  "in Power argument 2, in Add argument 1", and that of `w/2 + 1` said "in
  Multiply argument 2, in Add argument 1". They now say "in Exp argument 1"
  and "in Divide argument 1".

## 0.200.0 _2026-11-22_

### Improvements

- **`MoebiusMu`, `PrimePi`, `PrimeNu`, `PrimeOmega`, `Totient` and `NthPrime`
  compile on JavaScript** (CE-1704), with the interpreter's values. They
  declined, so a curve that used one, such as the Möbius sum
  `Sum(MoebiusMu(m)/m · li(x^(1/m)), Limits(m, 1, ⌊log₂ x⌋))`, ran in the
  interpreter. An operand beyond the safe integer range throws a
  `RangeError`, as for `IsPrime`, and `PrimePi` and `NthPrime` throw past
  20,000,768, where the interpreter gives an error.

- **The derivative of a function whose parameter has the name of a declared
  symbol is no longer slower** (CE-1708). With `x` declared `real`, the
  derivative of `f(x) = √(x + √(x + … + √x))`, 37 levels, took about 1.8
  times as long as the same function with a parameter `p`; it now takes
  about as long. The finiteness of an expression is now cached like its
  sign, so building a chain of calls is no longer quadratic in its depth
  (CE-1200): 5,000 nested `Sin` took 4.8 s, and now take less than 0.1 s.

- **`Zeta` of a complex argument compiles on JavaScript** (CE-1600), with the
  interpreter's kernel: `|ζ(1/2 + it)|` with `t` real and `ζ(z)` with `z`
  complex compile, where they declined with "Zeta of complex", so a plot of
  zeta on the critical strip ran in the interpreter at every sample. The
  GLSL target still declines it.

### Resolved Issues

- **The interpreter fallback of a compilation whose `inputs` names a
  Document row gives the row the value of the run** (CE-1707). With the rows
  `k = 2x_w` and `X(x) = Factor(kx)`, `compile(X(x), { inputs: { k: 'real' } })`
  declines on `Factor`, and its `run({ x: 1, k: 3 })` threw `Cannot assign a value to the constant "k"`; it now gives `3`, the value that the compiled
  code gives when the expression compiles. The row keeps its own value after
  the run. A run argument that names a row and is not in `inputs` is still
  refused.

- **With no domain, `Solve` no longer answers `[]` for an equation that has
  only complex roots.** `Solve(sin(x) = 2, x)` and `Solve(e^x = -1, x)` were
  `[]`, which reads as "no solution", although `x = π/2 ± i·ln(2 + √3)` and
  `x = (2k + 1)·π·i` are solutions; with no domain, `Solve` answers over the
  complex numbers where it can (`Solve(x^2 + 1 = 0, x)` is `[i, -i]`). When
  the inversion of `sin`, `cos`, `cosh`, `tanh` or an exponential removes a
  root because it is not real, or an interval proof shows that a nested
  periodic equation (`cos(sin(x)) = 0`) has no real root, `Solve` now stays
  unevaluated, and `expr.solve('x')` gives `null`. Over `RealNumbers`, or for
  an unknown declared `real`, the answer is still `[]`; `Solve(e^x = 0, x)`
  and `Solve(√x = -1, x)`, which have no complex root either, are still
  `[]` (#526, reported by [enumeratio](https://github.com/enumeratio)).

- **Epsil: a pipe into a `std::` call passes the piped value as into the
  plain call** (CE-1699). `xs |> std::take(2)` is `xs |> take(2)`; it was an
  `incompatible-type` error. Signature help marks the piped parameter there
  too.

- **Epsil: the error for an unclosed string names its closing delimiter,
  without a backslash** (CE-1659). `print("Hello` gives `Expected closing string delimiter '"'` (it was `"\""`), and `#"ab` gives `'"#'` (it named
  the opening `#"`).

- **Epsil: the type error for a value at a declaration quotes the value once,
  as it is written** (CE-1660). `const A : matrix = onesMatrix` gives `The value "onesMatrix" of type …`; it was `""OnesMatrix""`.

- **Epsil: a field of a value whose type is defined as another declared type
  is read through both types** (CE-1667). With `type Circle = tuple<r: number>` and `type Wrapped = Circle`, `Wrapped(Circle(2)).r + 1` is `3`; it
  was `1 + Circle(2)`, with no diagnostic.

- **The numeric value of a product with a list of fractions is the value of
  each scalar product** (CE-1653). `N(3·[1/3, 2/3])` is `[1, 2]`; it was
  `[0.999…9, 2.000…1]`, because each fraction was rounded before the
  product. The same holds for a matrix of fractions, a list of fractions
  times a list, a fraction times a point (`(1/3)·(3, 6)` is `(1, 2)`) and,
  above machine precision, a fraction times a list of floats
  (`(1/3)·[1.5, 2.5]` is `[0.5, 0.833…3]`).

- **A small number in engineering notation is printed with the right
  exponent** (CE-1690). `0.000012` was `120.0\cdot10^{-3}` (that is
  `0.12`); it is now `12.0\cdot10^{-6}`. Every exponent from `-4` down that
  is not a multiple of 3 was wrong.

- **A Document row can call an import declared `unknown` or `function`**
  (CE-1705). With an import `f` declared `function` and given the value
  `t ↦ 2t`, the row `g(x) = f(x) + 1` is prepared, and `g(2)` is `5`. It was
  refused with `provisional heads f`: the call waited for a later definition
  of `f`, which a sealed import cannot get.

- **A formula row read through a function row is an `inputs` name of a
  compilation** (CE-1706). With the rows `k = 2x_w` and `X(x, y) = kx/y`,
  `X(x, y)` compiled to GLSL with `inputs: { k: 'real' }` and
  `vars: { k: 'u_k', … }` reads the uniform `u_k`. It declined: `k` "has no
  declared type". The type that `inputs` gives must fit in the type of the
  row (`real` or `integer` for `k`); another type still declines.

- **A point plus a name of unknown type is typed as a point** (CE-1319). With
  `y` undeclared, `(1, 2) + y` is typed `tuple<number, number>`; it was
  `number | tuple<number, number>`, although a number plus a point is an
  error. So `q ↦ q + (1, 2)` is typed `(q: unknown) -> tuple<number, number>`,
  as `q ↦ q·(1, 2)` already was.

- **The value of a `Declare` in a nested block reads the parameter of the
  same name** (CE-1702). `u ↦ Block(Block(Declare(u, u + 1), u))` applied to
  `2` is `3`, and so is the same body written with a `Delimiter` around the
  inner block; it was the formula `u + 1`, because the value read the new
  local, which had no value yet. A `Declare` of the parameter's name in the
  body's own block is still the error `variable-redeclaration`. A block in
  between that declares the name is closer than the parameter, and a global
  of the same name is not read.

- **A function that passes its argument whole to another function and also
  uses it as a number reports a result that holds a list** (CE-1701). With
  `S(x) = Mean(x)` and `T(x) = S(x) + x`, `T` is typed
  `-> broadcastable<number>`, and `T([1, 2, 6])` is typed `vector<3>`; it was
  `-> number` and `number`, while the value is `[4, 5, 9]`. A function with a
  default value or a rest parameter is typed `-> any` in this case.

## 0.199.0 _2026-11-22_

### Breaking Changes

- **`AlgebraicGenerator(List(c₀, …, cₙ))` is deprecated: it is
  `PolynomialRoot(c₀ + c₁t + … + cₙtⁿ, t)`, the abstract root with no
  embedding.** It stays for one release as an alias that canonicalizes to
  `PolynomialRoot`, so `AlgebraicGenerator(List(-2, 0, 1))` is now
  `PolynomialRoot(t² − 2, t)`, and
  `Factor(x² − 2, x, AlgebraicGenerator(List(-2, 0, 1)))` prints its factors
  with `PolynomialRoot(t² − 2, t)`. `PolynomialRoot(p, x, k)`, with an index,
  is the `k`-th root, one particular complex number (PR #493, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#492](https://github.com/cortex-js/compute-engine/issues/492)).

- **A list at a parameter with no type is mapped, also beside a parameter that
  takes its argument whole** (CE-1697). With
  `f(L, n) := Which(n = 0, 0, True, Mean(L) + f(L, n - 1))`, where `L` is used
  as a collection, `f([1, 2, 6], [1, 2])` is `[3, 6]`, one call for each
  element of `n` with `L` passed whole to each call. Before, both lists were
  passed whole, and the recursion never reached its base case
  (`Recursion limit exceeded`). A body that combines the whole list with the
  other argument element by element now gives one row per element: with
  `g(L, k) := Mean(L) + L·k`, `g([1, 2, 6], [1, 2, 3])` is
  `[[4, 5, 9], [5, 7, 15], [6, 9, 21]]`; it was `[4, 7, 21]`. The call is
  typed as the map (`list<…>`). `Apply` of a function literal follows the same
  rule. A library function whose scalar parameter is declared, such as
  `Repeat(value, integer)`, is unchanged.

### New Features

- **`Limits` takes a step**
  ([#517](https://github.com/cortex-js/compute-engine/issues/517)).
  A sum or a product reads `Limits(i, lo, hi, step)`, the Wolfram iterator
  `{i, lo, hi, step}`, as `Element(i, Range(lo, hi, step))`:
  `Sum(i, Limits(i, 1, 4, 2))` is `4` and `Product(i, Limits(i, 1, 4, 2))` is
  `3`. The step was dropped, and the sum was `10`. `NDSolve` declines a
  `Limits` with a step.

- **Signature help marks optional, rest and implicit parameters, and covers
  member calls** (CE-1698). A parameter of `epsilSignatureHelp()` has
  `optional: true` when a call can leave it out (`axis1` and `axis2` of
  `transpose(`, a parameter of the source with a default value), `rest: true`
  when it takes the remaining arguments (the second parameter of `sum(`,
  `...rest`), and `implicit: 'pipe'` or `implicit: 'receiver'` when the left
  side of `|>` or the receiver of a member call fills it. After `|>`, the slot
  is that of the completion snippets: `xs |> take(` marks `xs`, and
  `xs |> map(` marks the collection; a signature where the slot is not known
  has no mark. A member call (`c.scale(`) has the signature of the protocol
  function or of the field that holds a function, as member completion
  resolves the member; `xs.take(` stays `null`, since a library function is
  not a member. The active parameter skips the implicit parameter
  (`xs |> take(` and `c.scale(` are at their second parameter).
- **`serializeEpsil` takes a `numberFormat` option for the digit grouping.**
  `serializeEpsil(3811)` is `3_811`, and
  `serializeEpsil(3811, { numberFormat: { digitGroup: 0 } })` is `3811`;
  `digitGroupSeparator: ''` does the same. Epsil reads only `_` between
  digits, so another separator throws a `RangeError`. The type
  `EpsilNumberFormat` is exported from the Epsil entry (#653, contributed by
  [enumeratio](https://github.com/enumeratio)).
- **The permutation statistics that depend on the degree n take a
  `PermutationAction(n)`.** A `Permutation` keeps its normalized form (trailing
  fixed points dropped), so equal permutations stay structurally the same.
  `PermutationCycles(p, PermutationAction(n))` lists every cycle on 1..n, the
  fixed points as 1-cycles; without the action it is unchanged. The new
  `PermutationFixedPoints(p, PermutationAction(n))` gives the fixed points,
  and `PermutationImages(p, PermutationAction(n))` the one-line form padded to
  n: for `Permutation([2, 1, 3])` in degree 4, `[3, 4]` and `[2, 1, 3, 4]`. A
  permutation that moves a point above n is
  `Error("permutation-outside-action")` (#622, contributed by
  [enumeratio](https://github.com/enumeratio)).
- **Algebraic numbers: minimal polynomials, norms and traces, and the ring of
  integers of the field a number generates.** `MinimalPolynomial(1 + ∛2, x)`
  is `x³ − 3x² + 3x − 3`, `MinimalPolynomial(1/(1 + √2), x)` is
  `x² + 2x − 1`, `IsAlgebraicInteger((1 + √−5)/2)` is `False`,
  `AlgebraicNumberNorm(1 + √2)` is `−1` and `AlgebraicNumberTrace(1 + √2)` is
  `2`. `NumberFieldDiscriminant(∛19)` is `−1083`,
  `NumberFieldIntegralBasis(∛19)` is `[1, ∛19, (1 + ∛19 + ∛19²)/3]` and
  `NumberFieldSignature(∛2)` is `[1, 1]`. The field invariants are those of
  the field ℚ(a) that the argument generates, also when it is a proper
  subfield (`NumberFieldDiscriminant(PolynomialRoot(x⁴ − 2, x, 1)²)` is `8`),
  and a rational generates ℚ. Under `N()` the argument is read exactly and
  the answer is approximated.

  `PolynomialRoot(p, x, k)` is Mathematica's `Root[Function[x, p], k]`: the
  `k`-th root of the polynomial `p` in the bound variable `x`, real roots
  first in increasing order, then complex roots by real part, each conjugate
  pair together with the lower one first, as Mathematica does: the roots of
  `(x² − 2x + 2)(x² − 2x + 5)` are `1 − i`, `1 + i`, `1 − 2i`, `1 + 2i`.
  The roots are numbered only when disks around them prove
  their separation and the order of their real parts; otherwise the call
  stays unevaluated. The root of a quadratic is a radical; the root of a
  cubic or higher stays `PolynomialRoot` until `N()`, which gives it for any
  degree. `PolynomialRoot(p, x)` with no index is the abstract root of an
  irreducible `p`, with no embedding. `Root` is still the n-th root.

  An argument is read as a polynomial in one generator: a radical of a
  rational (`Root(-2, 3)` is the real cube root, as everywhere in the engine,
  and `Root(-2, 6)` the principal sixth root), `i`, the golden ratio or a
  `PolynomialRoot`, with sums, products, powers and quotients. Several
  numbered roots of one irreducible polynomial are read in its splitting
  field: `MinimalPolynomial(PolynomialRoot(x³ − 2, x, 1) + PolynomialRoot(x³ − 2, x, 2), x)` is `x³ + 2`. Anything else, such as `√2 + √3` or `π`, a field
  of degree above 12, or a polynomial whose irreducibility the factorization
  does not prove, stays unevaluated, with its argument as written. The ring
  of integers comes from Eisenstein's criterion and Round 2 (Cohen, _A Course
  in Computational Algebraic Number Theory_, §6.1–6.2), under the engine's
  deadline; the field arithmetic, characteristic polynomials and
  discriminants are those of the number-field code of `Factor`. The new
  operators are not compiled (PR #493, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#492](https://github.com/cortex-js/compute-engine/issues/492)).

- **`Reduce` and `Fold` by a function literal compile with a list, tuple or
  Boolean accumulator.** The compiler declined a fold whose accumulator was not
  a real number: `Fold((acc, k) => [acc[2], acc[1] + acc[2]], [0, 1], 1..n)`, a
  Fibonacci pair, or a fold that keeps a Boolean flag. The loop now carries the
  accumulator: a list or tuple of a stated length is one carried value, and a
  list of a run-time length (`Map(z => 0, 1..n)`, or `List()` that the body
  appends to) is carried with its length, on JavaScript only. With no initial
  value, `Reduce(L, f)` seeds the accumulator from the first element, so a list
  of Booleans or of points folds too. A step that changes the length of a tuple,
  a list of points or a matrix as accumulator, GLSL and the interval mode still
  decline (#647, contributed by [enumeratio](https://github.com/enumeratio)).

- **A tuple input whose parts are strings and numbers compiles on
  JavaScript.** With `T` declared `tuple<string, integer>`,
  `If(T[1] = "A", 2·T[2], T[2] + 1)` declined ("the input T of type
  tuple\<string, integer>"); it compiles, and `run({ T: ['A', 3] })` is `6`.
  The compiled code reads each part at a constant index; a read of the whole
  tuple, of its length or of a part at a run-time index, a function that reads
  it or takes it as an argument, GLSL, the interval mode and the `bigint` mode
  still decline. A `list<any>` input stays refused (#640, reported by
  [enumeratio](https://github.com/enumeratio)).

- **The recursive form that compiles is documented.** A function literal
  applied to itself (`Apply(f, f, L)` with `f = (self, t) ↦ …self(self, …)…`)
  still declines: its argument `self` is a function value passed to a
  function. Written as a named function with a declared signature,
  `s := t ↦ If(Length(t) = 0, 0, First(t) + s(Rest(t)))` with `s` declared
  `(list<integer>) -> integer`, the recursion compiles on JavaScript and gives
  the interpreter's value (#639, reported by
  [enumeratio](https://github.com/enumeratio)).

- **A `list<list<integer>>` or `list<list<real>>` input is read row by row in
  compiled code.** Its rows can have different lengths, and compiled code read
  only its elements `g[i][j]`: `Map(r ↦ Length(r), g)`,
  `Map(r ↦ Reduce(r, Add, 0), g)`, `Length(g)` and `Count(g)` declined. On
  JavaScript, `Map` whose value for a row is not a list, `Length`, `Count`,
  `IsEmpty`, `IndexWhere`, `Fold` and `Reduce` over such an input or parameter
  now compile, and read each row of the host's array in place. A `Map` or a
  `Filter` that gives a list of rows and a list of lists of run-time length
  built in the program still decline (#638, reported by
  [enumeratio](https://github.com/enumeratio)).

- **A row of a `list<list<integer>>` input at an index known at run time
  compiles, and such a list can be read by a function, held in a tuple or
  bound by `Apply`.** With `g` declared `list<list<integer>>` and `k` an
  integer, `Sum(g[k])` and `Length(g[k])` declined; on JavaScript they compile,
  `g[-1]` is the last row, and at `g = [[1, 2], [3], [4, 5, 6]]`,
  `Length(g[5])` is `NaN` and `Coalesce(Length(g[5]), -7)` is `-7`, as the
  interpreter's `Missing`. The size of a tree from its adjacency list,
  `sz := (g, v) ↦ 1 + Reduce(Map(c ↦ sz(g, c), g[v]), Add, 0)` with `sz`
  declared `(list<list<integer>>, integer) -> integer`, compiles, and so does
  the same function `size(v)` that reads the adjacency list `A` as a free
  input (it declined: "the function size reads the input A of type
  list\<list\<integer>>"): `size(1)` at `A = [[2, 3], [4], [], []]` is `4`. A
  tuple input `G: tuple<integer, list<list<integer>>>` (`G[1] + Length(G[2])`)
  or `tuple<list<integer>, list<integer>>`, and a typed parameter of `Apply`
  (`Apply((m: list<list<integer>>) ↦ Length(m), g)`) compile too. The row
  `g[k]` as the result of the program and `AssertPresent(g[k])` decline (#638,
  #639, reported by [enumeratio](https://github.com/enumeratio)).

### Resolved Issues

- **The LaTeX of `Boole` of an operand that is not a relation reads back as
  `Boole`** ([#517](https://github.com/cortex-js/compute-engine/issues/517)).
  `Boole(P)` is written `\operatorname{Boole}(P)`; it was the Iverson bracket
  `[P]`, which reads back as the list `["List", "P"]`. A relation keeps the
  bracket: `Boole(x > 0)` is written `\lbrack0\lt x\rbrack`.

- **The partial canonical form `InvisibleOperator` of an applied function
  literal is the application**
  ([#517](https://github.com/cortex-js/compute-engine/issues/517)).
  `ce.parse("(x\\mapsto x^2)(a)", { canonical: ["InvisibleOperator"] })` is
  `["Apply", ["Function", ["Power", "x", 2], "x"], "a"]`; it was a `Multiply`
  of one operand around the `Apply`, and for a curried literal the `Multiply`
  held an `incompatible-type` error.

- **A subscript made of letters stays one symbol when one of its letters
  names a macro** (CE-1657). After `ce.declare('P', { macro: ['Add', 't', 1] })`,
  `I_{Past}` is the symbol `I_Past`, as it is with no macro; it was
  `["Subscript", "I", ["Multiply", "a", "s", "t", ["Add", "t", 1]]]`, because
  the letters were read as a product and `P` was expanded inside it. The same
  holds for `["Subscript", "I", "P"]`, which is `I_P`. An index that is an
  expression still expands the macro: `I_{P+1}` is
  `["Subscript", "I", ["Add", "t", 2]]`.

- **A function that passes its argument whole to another function takes a list
  whole when that function does** (CE-1696). With `S(x) = Mean(x)` and
  `T(x) = S(x)`, `T([1, 2, 6])` is now `3`; it was `[1, 2, 6]`, because the list
  was mapped over its elements. This happened for Document function rows, and
  for functions declared (`ce.declare('S', 'function')` or with a signature)
  before they were assigned; a plain `ce.assign()` already gave `3`. With the
  same `S`, `T(x) = S(x) + x` now gives `[4, 5, 9]` for `[1, 2, 6]`, as a plain
  `ce.assign()` did, where it gave `[2, 4, 12]`. A callee that maps its argument
  (`Sin`, or a name that holds `Norm`) still maps it.

- **Under `.N()`, the guard digits of an exact operand grow with its nearness
  to a pole and, for some functions, with its size.** An exact operand was
  read with 10 guard digits, too few past a condition number of 10^10:
  at 30 digits, `Gamma(3000000001/3)` was 7 units off in the last digit,
  `Zeta(-3000000001/3)` 2 units, `Binomial` of two operands near
  10^15 lost 5 of 30 digits, and `Beta(1/3, -13/3 + 10^-29)` had 11 correct
  digits of 30. Near a pole, one digit is added per power of ten of the
  distance of an operand, or of `a + b` for `Beta` and `n - k` for
  `Binomial`, to the pole, computed from the exact operands; this is for the
  gamma family, `Beta`, `Binomial` and `HurwitzZeta`. For `Gamma`,
  `Factorial`, `Zeta`, `DirichletEta`, `HurwitzZeta`, `Binomial` and `e^x`,
  whose condition number grows with the operand, one digit is added per
  power of ten of the operand above 100. Past 500 added digits the
  expression stays unevaluated: `Gamma(10^600 + 1/3)` (#618, contributed by
  [enumeratio](https://github.com/enumeratio) in PR #619).

- **Members after a dot are listed for a value made by a constructor.** After
  `let c = Circle(1)` (no type annotation), completion at `c.` lists the
  members of `Circle`, and `c.scale(` has signature help; before, both were
  empty unless `c` was declared `c: Circle`.

- **`Reduce(L, f)` with no initial value compiles when `f` is a function
  literal.** The first element is the seed and the fold runs over the rest, as
  the interpreter does: `Reduce(Range(1, n), (a, b) => a * b)` is `n!`, and
  `Reduce(L, (a, b) => a - b)` folds from the left. Of an empty list the
  interpreter gives no value, so the compiled code throws `out-of-range`
  (#630, contributed by [enumeratio](https://github.com/enumeratio)).

- **A function value that reads a parameter of the enclosing function keeps
  it when another argument mentions the same name.**
  `Apply(a ↦ Apply(v ↦ Map(j ↦ v[j] + a, 1..2), Map(q ↦ a + q, 1..2)), 10)`
  was `[a_1 + 11, a_1 + 12]`, and is `[21, 22]` again; a `Fold` whose step
  applies such a typed let gave `[5, At(acc_1, 2), At(acc_1_1, 3)]`, and gives
  `[5, 6, 7]`. The scope of a nested `Block` holds the binding of each
  enclosing parameter its body reads, and the capture check took that entry
  for a binder and renamed the parameter there (#632 and #655, contributed by
  [enumeratio](https://github.com/enumeratio)).

- **`Rationalize(x, 0)` of a float is the exact rational of its decimal.** A
  zero tolerance gave the convergent of the default tolerance, so
  `Rationalize(3.141592653589793, 0)` was `80143857/25510582` while a
  tolerance of `1e-30` gave the exact value. Now `Rationalize(0.1, 0)` is
  `1/10`, and the result at 0 is the result at a tiny tolerance. The decimal
  is the one the number holds at working precision; the binary double is not
  used (#634, contributed by [enumeratio](https://github.com/enumeratio)).

- **`ReplaceAll` applies a pattern rule wherever it matches, not only at the
  root.** `ReplaceAll(Sin(x^2) + 1, x^2 -> y)` is `Sin(y) + 1`. The expression
  is visited from the top: at each part the first rule that matches replaces
  it, and the replacement is not searched again, as `expr /. rules` does in
  Wolfram, so `ReplaceAll([g(a), k(b)], {g(_a) -> k(_a), k(_a) -> g(_a)})` is
  `[k(a), g(b)]` (#636, contributed by
  [enumeratio](https://github.com/enumeratio)).

- **`Flatten(m, d)` compiles when the depth is a constant non-negative integer
  or `+oo`.** A matrix has one nesting level, so depth 0 is the matrix itself
  and any other depth is the list of its elements row by row; another depth
  declines (#641, contributed by [enumeratio](https://github.com/enumeratio)).

- **`Sort` of integers and `ReplaceAt` at a run-time position compile in the
  `bigint` mode.** `Sort(L)` gives a sorted copy of the list of `bigint`
  values, and `ReplaceAt(L, i, v)` with an index known at run time throws
  `out-of-range` for an index that is 0 or out of range, as in the double
  mode (#643 and #645, contributed by
  [enumeratio](https://github.com/enumeratio)).

- **`Element` of a quotient reads the assumptions on its denominator.** Under
  `assume(x > 0)`, `Element(1/(x·Gamma(x+2)), RealNumbers)` stayed undecided:
  the type of a quotient is derived from its operands' types, and
  `Gamma(x+2)`, typed `real`, is positive only by its sign handler, which the
  proof did not read. It does now, so the denominator is known not to be zero
  (#649, contributed by [enumeratio](https://github.com/enumeratio)).

- **`Sum` and `Product` of one term that is not a number stay unevaluated.**
  With no indexing set, `Sum(Subset(5, [1, 3, 4]))` and `Product(True)` gave
  the term, and `Sum(True)` was an `incompatible-type` error. `Sum(7)`,
  `Sum(Pi)` and `Sum(Missing)` are unchanged (#651, contributed by
  [enumeratio](https://github.com/enumeratio)).

- **`Limits` takes a step.** `["Limits", "i", 1, 4, 2]` is the iterator
  `{i, 1, 4, 2}` of Wolfram: `["Sum", "i", ["Limits", "i", 1, 4, 2]]` is
  `1 + 3 = 4`. The step was dropped without a diagnostic, and the sum was 10.
  A big operator reads a stepped clause as `["Element", "i", ["Range", 1, 4, 2]]`, as it already read `["Tuple", "i", 1, 4, 2]`, and the LaTeX is
  `\sum_{i\in 1..3..4}i`. A sum or a product over a range enumerates the
  values of `Range`: over an empty range, such as `Range(5, 1, 2)` or
  `Range(1, 4, 0)`, the sum is 0 and the product 1, and a step that is not an
  integer (`Range(1, 4, 0.5)`) gives a value; before, both stayed
  unevaluated.
  A stepped clause does not compile; the compiled function falls back to the
  interpreter. `NDSolve` has no use for a step, and stays unevaluated with a
  stepped `Limits` (#517, reported by
  [enumeratio](https://github.com/enumeratio)).

- **The LaTeX of `Boole` reads back as `Boole`.** `["Boole", "P"]` was
  written `\lbrack P\rbrack`, which reads back as `["List", "P"]`, and so was
  any operand that is not a relation, such as `["IsPrime", "n"]`. Such an
  operand is now written `\operatorname{Boole}(P)`; a relation keeps the
  Iverson bracket, `[x>0]` (#517, reported by
  [enumeratio](https://github.com/enumeratio)).

- **The partial canonical form `InvisibleOperator` of an applied function
  literal is the `Apply`.** `ce.parse("(x\mapsto x^2)(a)", { canonical: ["InvisibleOperator"] })` was `["Multiply", ["Apply", …, "a"]]`, a product
  of one factor, and the curried `(x\mapsto y\mapsto x^{y})(a)\lhd b` gave a
  `Multiply` with an `incompatible-type` error. Both are now an `Apply`, as
  in the full canonical form (#517, reported by
  [enumeratio](https://github.com/enumeratio)).

## 0.198.1 _2026-11-21_

### New Features

- **A completion item says which characters of its label matched**
  (CE-1695). A hump or subsequence item has `matchRanges`, offsets into
  `label`, end excluded, sorted, with adjacent characters in one range, so an
  editor can show them in bold: at `idM`, `identityMatrix` has
  `[[0, 2], [8, 9]]`, and at `ivs`, `inverse` has `[[0, 1], [2, 3], [5, 6]]`.
  A prefix item has no `matchRanges`: its first `range[1] - range[0]`
  characters matched.

### Improvements

- **A completion item's `fit` is more precise** (CE-1694). Where a number is
  expected, the non-finite values (NaN, the infinities) no longer count
  against `'match'`: after `let x = 2`, at `sin(` the name `x` (a `number`)
  and the functions `abs` and `sqrt` (which return a `number`) are `'match'`,
  where they were `'maybe'`. `'match'` now means "always of the expected
  type, apart from NaN and the infinities". A value item has a `fit` too,
  judged by the type of its literal: the likely values (`0`, `""`) and the
  keywords `true` and `false`. At `determinant(`, `true` is `'never'`; at
  `if `, it is `'match'`. The other keywords (`if`, `let`) have no `fit`.

### Resolved Issues

- **A recursive Document function whose body narrows a parameter binds**
  (CE-1692). With no stated types, a recursion that reads a point (`p.x`) or
  consumes a list (`mean(x)`) was a row error, "… does not match (unknown) any
  -> unknown", and every row that called it had no value. Its parameters now
  take the types that the body infers, as for a function that is not recursive,
  so a list argument at such a parameter is passed whole: with
  `K(0,x) = mean(x)` and `K(n,x) = K(n-1,x)`, `K(3,[1,2,6])` is `3`, and with
  `g(P) = P.x (1,0)`, `f(P,n) = g(P) + f(P,n-1)` and the base clause `(0,0)`,
  `f((1,2),2)` is `(2,0)`.
- **A Document value row that declares the field axes as locals is a value**
  (CE-1693). With the field row `d = x + y`, the row
  `A = (x := [1,2]; y := [3,4]; d)` is the list `[4, 6]`, but it had the field
  parameters `x` and `y`, so a host drew it and the rows that read it as fields.
  A read of a field row inside a `Block` that declares an axis before the read
  no longer counts as a read of that axis.

## 0.198.0 _2026-11-21_

### New Features

- **The entry `@cortex-js/compute-engine/epsil-highlight` colors Epsil
  source.** It imports nothing (no engine, no parser), so an editor bundle can
  load it alone. `epsilStreamParser` is a CodeMirror 6 stream parser, for
  `StreamLanguage.define()`; `epsilHighlightTokens(source)` returns the styled
  ranges of a source. The token boundaries are those of the Epsil lexer, and
  nested block comments, `"""` strings and `$…$` islands that span lines are
  carried from line to line. `epsilHighlightTokens('let x = f(2)')` styles
  `let` as `definitionKeyword`, `x` as `variableName` and `f` as
  `functionName`.
- **Each completion item tells how the name fits the expected type** (CE-1661).
  When `epsilCompletions()` gives an `expectedType`, each name item has a
  `fit`: `'match'` when its value is always of that type, `'never'` when it can
  never be, and `'maybe'` otherwise. At `determinant(`, `adjugateMatrix` is
  `'match'`, `transpose` (which returns a `value`) and `hadamardProduct`
  (`matrix | vector`) are `'maybe'`, and `isPrime` is `'never'`. A host can
  hide the `'never'` items. The ranks keep their meaning; within ranks 4 and 5
  the `'maybe'` items now come before the `'never'` items.
- **A completion item of a function inserts the call with argument fields**
  (CE-1664.7). An item of a function with a required parameter has a
  `snippet`, in the syntax of LSP and of CodeMirror's `snippet()`: at `tak`,
  `take` has `take(${1:xs}, ${2:count})${0}`, and after `xs |>` it has
  `take(${1:count})${0}`. Each required parameter is a field, with its name
  (or its type) as default text; optional and rest parameters have none. A
  function member after `.` leaves out its receiver, and a variant constructor
  has a field per payload element. There is no snippet before a `(`, where
  a function value is expected (`filter(xs, isPr`; after `|>` there is one),
  for a function with no required parameter, or for an overload set whose
  signatures differ in their number of required parameters. `insertText`
  keeps its value. The VS Code extension sends the snippet as a snippet to a
  client that supports snippets.
- **A completion in a record literal offers the fields of its type**
  (CE-1664.1). At `const p: record{x: real, y: real} = {`, the items of
  `epsilCompletions()` are `x` and `y`, inserted as `x -> ` and `y -> `, with
  their types as `detail`, and no other name; a field already written is left
  out, and an optional field comes last with a `?` in its `detail`. After
  `{x -> ` the expected type is `real`, the type of the field. This holds for
  a record type reached through an alias, for an argument whose parameter is
  a record type (`f({`), and for a nested literal (`{p -> {`). A nominal type
  does not admit a literal, and a literal with no expected record type gets
  the names, as before.
- **A completion at a case of a `match` on a sum type offers the variants
  that no case covers** (CE-1664.2). In `function f(c: Color) { match c {`,
  with `type Color = red | green | circle(r: real)`, the items of
  `epsilCompletions()` are `red`, `green` and `circle`, inserted as `red()`,
  `green()` and `circle(r)` (one binding per field of the payload, `_` for a
  field with no name), and no other name and no keyword. A variant that a case
  matches unconditionally (`green() => …`, `circle(x) | red() => …`,
  `x: circle => …`) is left out, and a catch-all case (`_`, `otherwise`, a bare
  binding) leaves none. A fix-it item, `add the missing cases`, inserts one
  case `<pattern> => nothing` per missing variant, a line each. This holds for
  a sum type reached through an alias, for a generic sum type (`opt<integer>`),
  and for a union of variants (`c: red | circle`). A subject of any other
  type, a nominal type whose body is a sum included, gets the items as before.
- **A completion at an argument of a call offers the parameter names**
  (CE-1664.3). At `take(xs, `, the first item of `epsilCompletions()` is
  `count`, inserted as `count: `, with the type `number` as `detail`; the
  other items follow as before. The names are those of the declaration that
  the call resolves through: a function of the source, a library function
  whose signature names its parameters, or a variable whose declared type is
  a signature that names them. A parameter already filled, by position or by
  name, and a rest parameter are left out. After a named argument
  (`interest(rate: 0.05, `) only the names are offered, since a positional
  argument cannot follow it. In an overload set, a name is offered when every
  signature that can still match the call has it. After `|>` the parameter of
  the piped value is left out, and no name is offered when its slot is not
  known or comes after the named arguments (`xs |> fold(`). After `count: `,
  the expected type is the type of `count`, also for a library function and
  a variable with a declared signature.

### Improvements

- **A completion matches the humps of a camelCase name** (CE-1664.6). The
  items of `epsilCompletions()` were the labels that start with the typed
  word. A word of two characters or more now also matches a name whose humps
  it gives: `idM` gives `identityMatrix`, `invH` gives `inverseHaversine` and
  `mc` gives `max_count`, then a name that holds its characters in order from
  its first character (`ivs` gives `inverse`). These matches come after the
  prefix matches, in the same order of `rank`: at `isM`, `isMatch` and
  `isMissing` come first, then `isSquareMatrix`, then `isCompatibleUnit`. A
  fixit, a keyword and a likely value match by prefix only.
- **A dotted call of a library function has a fixit** (CE-1664.5). The
  `dot-call-not-a-protocol-function` diagnostic of `checkEpsil()` rewrites the
  call: `xs.sort()` becomes `xs |> sort`, and `g(3).sort()` becomes
  `g(3) |> sort`. A call with arguments becomes the direct call, with the
  receiver as the first argument: `xs.take(2)` becomes `take(xs, 2)`. When
  the receiver cannot be the first argument, the call becomes a pipe, which
  puts the receiver where its type fits: `xs.map(x => x + 1)` becomes
  `xs |> map(x => x + 1)`. Inside a larger expression a pipe would need
  parentheses, so `xs.sort().reverse()` becomes `sort(xs).reverse()`, and the
  next fixit `sort(xs) |> reverse`. The Epsil spelling of a library function
  now gives this diagnostic too: `xs.sort()` was reported only when it ran,
  as an `incompatible-type` error of `Field`.
- **A completion where a function is expected compares signatures**
  (CE-1661). At `filter([1, 2], ▮`, `isPrime` fits, since it takes an integer
  and returns a boolean; before, it was compared by its result with the
  callback type and ranked with the names that do not fit. After `|>` the
  expected type is a function of the left side: with `A: matrix`, `A |> ▮`
  expects `(matrix) -> any` (was `function`) and `inverse` fits;
  `inverseFunction` may fit, since `A |> inverseFunction(g)` passes the
  function that a call gives. A union with a function arm
  (`function | nothing`) and a transparent alias of a signature are judged
  the same way, and a callback of `map`, which takes one argument per source,
  may take more arguments than its declared signature.
- **A completion knows the expected type of a condition, of a loop
  collection and of an arithmetic operand** (CE-1664.4, CE-1686). At `if ▮`
  and at `x if ▮ else y` the expected type is `boolean`, and with `n = 5`, `n`
  is `'never'`; at `for i in ▮`, also in a comprehension, it is `collection`:
  a list, a matrix, a string, a tuple and a record fit, a number does not.
  `if ▮`, `while ▮` and `for i in ▮` have it before their block is typed. At
  `1 + ▮`, when every other operand is a number or a tensor of numbers, it is
  `number | quantity`, so a matrix fits and a string or a boolean does not;
  with another operand (a tuple, a string, a name of no known type) there is
  still no expected type. The other arithmetic operands admit a quantity too
  (`A * ▮` expects `number | quantity`; was `number`), and a tuple, which a
  call maps over (`2 * (1, 2)`, `sin((1, 2))`), may fit where it was
  `'never'`.
- **A completion admits a list where the call maps over one** (CE-1661). At
  `A * ▮` with `A: matrix`, `A` fits (`A * A` is a matrix product); at
  `determinant(▮`, `abs` may fit, since `abs(A)` is a matrix.
- **A `let` or a `const` with a literal value has a type in completions and
  hover** (CE-1661). With `const n = 5`, the item of `n` has the detail
  `integer`, and with `let x = 5`, `number` (the type the engine gives the
  variable). Before, both had no detail.
- **After `.`, a completion lists the members of the value before the dot**
  (CE-1663). With `const c: Circle` of a type `tuple<r: number>` that conforms
  to a protocol `Shape` with the functions `area` and `scale`, `c.` offers
  `area` (inserted as `area()`, detail `() -> number`), `r` (`number`) and
  `scale` (`(k: number) -> Circle`). A record offers its fields, an `object`
  type its fields, and a protocol property its type. The type of the value comes
  from its declaration, also through a field (`a.b.`). When that type is not
  known, there are no items. Before, `c.` offered every name of the source and
  of the library, and none of the members. In an argument (`sqrt(c.`), each
  member has a `fit` for the type of the parameter: there, `scale`, which
  returns a `Circle`, is `'never'`.
- **The call-site types of a Document function read the formula rows, and
  skip an open argument.** `PreparedDocumentDefinition.callSiteTypes` now
  also reads the calls in formula rows, such as the plot row
  `(P(t,(1,0)))`. Prepare canonicalizes such a row only to read the types of
  its arguments, in a scope of its own that it then discards: the row gives no
  definition and no row error, and a row that is not valid gives no evidence.
  An argument that reads a field axis, such as the axis `t`, or a field value
  is open. Another free name has the type of the input that the host declared
  with that name, and is otherwise open. An argument whose
  type is open (`unknown`, `any`, or a type with such a part) no longer makes
  the entry `undefined`: it is ignored, and the entry is the join of the
  other calls' argument types. With `P(k, q)` called only from its own body
  and from that plot row, `callSiteTypes` was `["number", undefined]` and is
  now `["number", "tuple<real, real>"]`. A host that declares such an entry as
  a formal type still accepts a call whose argument is typed `unknown` or
  `any`, but can refuse one whose argument only has an open part: `[q]`, of
  type `list<unknown>`, against `tuple<real, real>`.

### Performance

- **An iteration with `max` of an angle evaluates in milliseconds** (CE-1359).
  `Arctan2` with a float operand now gives a float also when the other operand
  is an exact expression: `Arctan2(Cos(Pi/60), 0.5)` is `1.1066…`, where it
  stayed unevaluated. And `Max`, `Min` and `Sort` now order an exact value that
  holds `Arctan2`: `Max(Arctan2(1/2, -Sin(Arctan(1/2))), 1.5)` is
  `Arctan2(1/2, -Sin(Arctan(1/2)))`, where it stayed unevaluated. A function
  whose body is a loop of 12 passes over such values kept a `Max` expression
  that grew at each pass, and
  took about 5 seconds to evaluate at one point. It now takes about 15 ms, and
  about 130 ms for the first point.

### Resolved Issues

- **A compiled `run()` that falls back to the interpreter in a Document
  revision takes the value of a free name.** When a compilation declined,
  `run({ Q: 4 })` of an expression boxed in a prepared Document revision scope
  threw `ConstantAssignmentError`, because the fallback declared `Q` in the
  sealed revision. The value is now substituted into the expression and no
  name is declared, so `Expand(K + Q)` with the row `K = 3` gives `7`, as the
  compiled `K + Q` does. A run argument that names a published row is still
  refused. A row or a function row whose own value reads `Q` does not see the
  substituted value (`docs/COMPILATION-MODEL.md`, known limitations).
- **A compiled `run()` that falls back to the interpreter reads an input
  through a row** (CE-1666). When a compilation declined, an input read only
  through the value of a row or the body of a function row inside a held
  operand was not found, so its run value was never bound: in a Document
  revision with the declared input `Q` and the rows `g = Q + 1` and
  `f(x) = x + Q`, `run({ Q: 4 })` of `Expand(g)` and `Expand(f(2))` gave
  `null`. They now give `5` and `6`, as the compiled `g` and `f(2)` do. The
  same held reads outside a Document gave `NaN` and now give the value too.
  `freeSymbols` of such a fallback now lists the input.
- **A sum over a view whose source has an effect runs the effect once**
  (CE-1428). With `x := 0`,
  `Sum(Map(k ↦ k + 1, Sort(Block(x := x + 1, [x, x]))))` is `4` and `x` is
  `1`, where the sum was `8` and `x` was `4`: each read of the view by the
  reducer evaluated the source again. `Product` and `Reduce`, and a view over
  such a view (`Sum(Filter(Map(f, Sort(…)), p))`), are corrected too.
- **A real solution with a square root of a parameter has a condition**
  (CE-1593). `Solve(x^2 = a, x ∈ RealNumbers)` is
  `[If(0 ≤ a, √a), If(0 ≤ a, -√a)]`, where it was `[√a, -√a]`, which is not
  real for `a < 0`. With the assumption `a > 0` the result is `[√a, -√a]`, and
  with `a < 0` it is `[]`. Over a domain such as `Integers`, or when no such
  condition is found, the `Solve` stays unevaluated: `x^4 = a` over the real
  numbers gave the four roots, `i·∜a` included.

## 0.197.1 _2026-11-21_

### Improvements

- **A restricted list that a name holds compiles again** (CE-1642). With
  `C` declared with the value `If(0 ≤ x ≤ 6, x + [0, 4, 2])`, `At(C, 1)`
  compiles to JavaScript and to `interval-js`, and gives `NaN` (the empty
  interval) where the condition is false; `C` alone gives the list of `NaN`
  there. Both compiled in 0.193.0 and decline in 0.197.0. A program that also reads `C` with
  `Length`, a discharge such as `IsMissing`, or from the value of another name
  or the body of a user function still declines, because the interpreter gives
  `Missing` there.
- **A function that takes a list of lists and returns a list of lists compiles
  to JavaScript** (CE-1607). With `g: list<list<integer>>`, the element read
  `g[i][j]` compiles, and `g` can be passed whole to a user function with a
  parameter of that type. One step of the Game of Life,
  `step(g: list<list<integer>>) = map(i => map(j => nextCell(g, i, j), Range(1, n)), Range(1, n))`
  with `n = 32`, compiles as `(g: list<list<integer>>) => step(g)`, where it
  declined before; `run(grid)` returns an array of arrays, and 100 generations
  take a few milliseconds instead of more than a second for each interpreted
  generation. An index out of range gives `NaN`. Other reads of such a list
  (`Length(g)`, `g[1]`, `Map` over `g`) still decline. A `Map` of a `Map` over
  `Range(1, 20)` also compiles now.
- **A function that assigns a variable it closes over compiles to JavaScript**
  (CE-1620). With `let s = 0.5`, the timer callback
  `advance = (t: real) => do { s = s + t / 1000 }` compiles, where it declined
  before. Each call of `run()` reads `s` in the engine and writes its new value
  back, as an evaluation of the call does: after `run(16)` three times, `s` is
  `0.548`. The result lists the variables in `assigns`; its `code` takes their
  values after the arguments and returns `[value, ...new values]`, for a host
  that runs the code without the engine. The variable must have a declared type
  of real, integer or boolean values (`let` declares one). A function that the
  callback calls and that reads the variable still declines.
- **Compiled JavaScript calls a function that the host declared with an
  `evaluate` function** (CE-1621). With
  `ce.declare("hostDraw", { signature: "(real) -> nothing", evaluate })`, the
  timer callback `(t: real) => hostDraw(t / 1000)` compiles, where it declined
  before. Each call in the code evaluates the call in the engine, at each
  evaluation and in the order of the program. The result lists the functions
  in `hostCalls`, and is not `shippable`. The arguments must be real numbers,
  integers, booleans or strings (at most four), and the result type `real`,
  `integer`, `boolean` or `nothing`. A function that builds a `Figure` of a
  drawing library still declines (CE-1652).

- **A Document gives a recursive function a result type, and each function
  the types of its call sites.** A recursive function row with no
  `resultType` was typed `-> unknown` (or `-> list<any>`). Its result is now
  the join of its base arms, the arms that call no function of the recursion,
  widened as a local is, when the body confirms it: with
  `r(n)=\begin{cases}(0,0)&n\le0\\r(n-1)+(1,1)&\text{otherwise}\end{cases}`,
  `r` is `(unknown) -> tuple<number, number>`, and the factorial is
  `(unknown) -> number`. When a body refuses the guess, the component keeps
  the old result type, so no function of the component, and no call in it, is
  refused that was accepted before. A later row whose stated type is disjoint
  from the confirmed result is refused, which happens only for a program that
  is already ill-typed.
  The new field `callSiteTypes` of a function's `PreparedDocumentDefinition`
  gives, for each parameter, the join of the widened types of its arguments
  in the bodies of the definition rows: with `d(p)=\sqrt{p.x^2+p.y^2}`,
  `A=d((3,4))` and `B=d((1,2))`, it is `["tuple<real, real>"]`, and with
  `C=d([(3,4),(6,8)])` too, `["list<tuple<real, real>^2> | tuple<real, real>"]`.
  An entry is `undefined` with no call, or when an argument type is open. The
  field is advisory: it does not change the function's contract.

### Behavior Changes

- **`Expand` leaves a power of a sum as it is when its expansion has more
  than 4096 terms** (CE-1307). `Expand((x + 1)^4096)` is `(x + 1)^4096`, where
  it was a sum of 4097 terms, and `Expand((x + y + 1)^90)` is
  `(x + y + 1)^90`. The same bound applies to the expansion that `simplify()`
  and the antiderivative search try: `x·(x^65536 + 1)^65536` simplifies to
  itself, where the simplification did not return. `(x + 1)^4095` still
  expands.

- **A Document row that defines a recursion with no base case is a row
  error**: when every arm of every function of a recursive component calls a
  function of the component through arithmetic, a list or a tuple, as in
  `f(x)=f(x-1)+1`, the row has the error
  `Recursive definition with no base case: f`, its readers have
  `invalid-document-dependency`, and a call gives that error instead of
  throwing `Recursion limit exceeded`.

- **The text of a range with the step 1 is the Epsil range `a..b`**
  (CE-1636). `toString()` and the Epsil command line printed a range in a
  list as a call, which reads as a call that was not evaluated:
  `[1..2, 1..3]` printed `[Range(1, 2, 1),Range(1, 3, 1)]`, and now prints
  `[1..2,1..3]`, which Epsil reads back as the same list. A range with no
  step or with another step still prints as a call, `Range(1, 5)` and
  `Range(1, 5, 2)`, and a range alone still prints its elements: `1..3`
  prints `[1,2,3]`.

- **The Epsil REPL waits for the next line after each input that more text at
  its end can complete** (CE-1630). Before, it waited only for an unclosed
  bracket, string or comment, and for an operator at the end of the line. Now
  it also waits for `let`, `while`, `for x in`, `f(x) =`, `if x` and `x.`.
  Enter `.break` to abandon the input. The diagnostic `expression-expected`
  now reads `Expected an expression` (was `expression expected`), and
  `literal-expected` reads `Expected a literal` (was `literal expected`).

- **`\psi^{(m)}(z)` parses as the polygamma function, and `\Phi(z, s, a)` as the
  Lerch transcendent** (CE-1597). `\psi`, `\psi(z)`, `\Phi` and `\Phi(x)` keep
  their reading as a symbol or a function of the user, and a declaration of
  `psi` or `Phi` keeps its own reading.

  ```js
  ce.parse('\\psi^{(1)}(1)').json;
  // ➔ ["PolyGamma", 1, 1] (was "psi")
  ce.parse('\\Phi(1, 2, 1)').json;
  // ➔ ["LerchPhi", 1, 2, 1] (was ["Phi", 1, 2, 1])
  ```

- **A `\text{…}` that names a unit is a string unless it is part of a unit
  expression** (CE-1644). A `\text{…}` is a unit after a number, and as an
  operand of a product, a quotient, a power or a root:
  `5\,\text{A}`, `2\text{ USD}/\text{lb}` and `\text{V}/\sqrt{\text{Hz}}` are
  unchanged. Everywhere else it is a string, as a `\text{…}` that names no unit
  is. Write `\mathrm{…}` for a unit by itself.

  ```js
  ce.parse('\\{\\text{A}, \\text{B}, \\text{C}\\}').json;
  // ➔ ["Set", "'C'", "'B'", "'A'"] (was ["Set", "A", "C", "'B'"])
  ce.parse('m = \\text{A}').json;
  // ➔ ["Equal", "m", "'A'"] (was ["Equal", "m", "A"])
  ```

  A comparison with a unit name written `\text{…}`, such as
  `\operatorname{QuantityUnit}(5\,\text{m}) = \text{m}`, now compares with a
  string: write `\mathrm{m}`.

### Resolved Issues

- **The integral of a high power of a polynomial times `e^x` returns**
  (CE-1307). `\int (x^{65536}+1)^{65536} e^{x}\,dx` stays unevaluated, in
  less than a second, where the evaluation did not return. See "Behavior
  Changes" for the bound on `Expand` that makes it return.

- **In a Document, a function row whose parameter is read only as an operand
  of `Join` or `ListJoin` takes a scalar argument as one element**: with
  `f(y) = ListJoin([1, 2], y)`, `f(7)` is `[1, 2, 7]`, where it was an
  `incompatible-type` error, and `f([3, 4])` is still `[1, 2, 3, 4]`.

- **In degrees, the numeric value of the angle of `i` is `90`** (CE-1635).
  With `ce.angularUnit = 'deg'`, `Argument(i).N()` and `Arctan2(1, 0).N()`
  gave `89.9999999999999999999`, because the angle in radians was rounded and
  then multiplied by a rounded `180/π`. Now `.N()` of `Arctan2` with exact
  operands rounds the exact angle in the unit, so the result is `90`, as for
  `Arcsin(1)`. The same applies in gradians and in turns. A symbol with a
  known sign also gets a value: with `x > 0`, `Arctan2(x, 0).N()` is `90`.

- **The numeric value of a list divided by a number is correct to the last
  digit** (CE-1634). At 21 digits, `N([1, 2, 3]/3)` gave
  `[0.333…333, 0.666…666, 0.999…999]`, because `1/3` was rounded before it
  multiplied each element. Now each element is the exact product, rounded
  once, as for a single number: `[0.333…333, 0.666…667, 1]`. The same applies
  to a matrix and to a range (`Range(1, 3)/3`).

- **A piecewise condition that compares a variable with a word keeps the
  word** (CE-1632). In
  `\begin{cases} x^3 & m = \text{cubic} \\ x & \text{otherwise} \end{cases}`,
  the condition parsed as `Equal(m)`, which is always true, so the first
  branch was taken for every value of `m`. Now it parses as
  `Equal(m, "cubic")`. A text annotation next to the condition, such as
  `\text{if }`, is still removed.

- **An element-wise operation on a list of random draws and a later read of
  the same list use the same draws** (CE-1631). With
  `h = Comprehension(Random(), k ∈ 1..6)`, `h + 10` used one set of draws and
  a later read of `h` drew again, so the first element of `h + 10` was not the
  first element of `h` plus 10. An operation that reads every element of the
  list (`Add`, `Mod`, `Power` and the other element-wise operators) now ends
  its walk of the list, and the list keeps these draws for each later read.

- **In Epsil, a list or a call that ends after its opening bracket or after a
  comma waits for the next line in the REPL** (CE-1630). `[1,`, `f(` and
  `f(1,` got the message `Unexpected symbol ""`, and the REPL showed it as an
  error at the first line of a list or a call written on several lines. Now
  the message is `Expected an expression`, `for x` gets `Expected "in"`, and
  the REPL waits for the next line.

- **A function declared pure stays pure when a function that it calls gets a
  new body** (CE-1629). With `h` declared `(number) -> number` and
  `g` declared `(number) pure -> number` with the body `h(x)`, the assignment
  `h := x ↦ x + Random()` gave a `g` that returned random values. Now the
  assignment is refused with an `incompatible-type` error (`ce.assign()`
  throws), and `h` keeps its previous body. An assignment whose body keeps the
  stated effects of every function that calls it is accepted.

- **A call of a user function whose body is an `If` with no else of a list
  compiles where `At`, `First`, `Last`, a reduction or arithmetic reads it**
  (CE-1648). With
  `C(w) = If(0 ≤ w ≤ 6, w + [0, 4, 2])`, `At(C(x), 1)` and
  `Max(C(x)[1], C(x)[2], C(x)[3])` compile on JavaScript and `interval-js` and
  give `NaN` where the condition is false, as the inline `If` does since
  0.196.0. This also applies through a function that calls `C`, and to a body of
  a declared result type. A call that `Length`, `Rest`, `IsMissing`, `Coalesce`
  or another function reads still declines.

- **`Expand`, `Factor` and the other transformers no longer use the index of a
  sum, or the parameter of a function, of their operand in place of a variable
  of the same name in a stored formula** (CE-1641). When the operand holds a
  sum, a function or a block, a symbol under it whose formula names the
  variable of that sum, function or block now stays as written, and the
  transformer does not expand into it.

  ```js
  ce.assign('a', ce.parse('n + 1'));
  ce.parse('\\mathrm{Expand}(\\sum_{n=1}^{3} n a)').evaluate().evaluate();
  // ➔ 6n + 6, as without Expand (0.196.1: 20)
  ```

- **An expression that reuses a list through `Zip` many times is built in
  linear time** (CE-1345). With `A` declared `list<real>`, the 14 levels of
  `z = Zip(z, x·z)` took about 3 seconds to build, twice as long at each
  level; they now take a few milliseconds. The finiteness of an eager
  collection operator that has an operand of unknown finiteness is no longer
  computed by an evaluation, so the `isFiniteCollection` of
  `Reverse(Sort(Reverse(Sort(F(3)))))`, with `F` a user function that returns
  a list, is now `undefined` (was `true`). Its value does not change.

- **The value of a function call or of a block that is not decided yet names
  the values of its local variables** (CE-1330). With `t` free,
  `function f(a) { let k = a^2; if t > 0 { k + 1 } else { 0 } }` gives
  `If(0 < t, 26, 0)` for `f(5)`, where it gave `If(0 < t, k + 1, 0)`, whose
  `k` had no value once the call had ended: `let r = f(5); let t = 1; r` is
  now `26`, not `k + 1`. A parameter in the same place already got its value.
  The same holds for a `do { … }` block, for a sum with a free bound
  (`sum(k * i * t, i, 1, m)` gives `Sum(25i·t, …)`), and for a function
  literal that the call did not evaluate: with
  `f := a ↦ Block(Declare(k, "unknown", a), If(c, x ↦ k + x, x ↦ 0))`, the
  function of the branch of `f(5)` applied to `1` gives `6` again, where it
  gave `k + 1` since 0.192.0. A local keeps its name in a function value (a
  closure reads the last value of the local), in a part that writes the
  local (`do { k += 1; k }`, or a call of a closure that writes it), in an
  `Error`, and where `HoldValues` shields it.

## 0.197.0 _2026-11-21_

### New Features

- **`createDocumentEnvironment()` prepares a document of LaTeX rows as one
  unit.** A host passes the complete list of rows, each with a stable `id` and
  its LaTeX source, and a `DocumentSyntax` that says how to read a row head. The
  engine finds the head of each row first, then parses each body with the other
  rows in view: `f(3)` is an application when another row defines `f(x)=x^2+1`,
  and `L[2]` is an index when another row defines `L=[10,20,30]`. Each call to
  `prepare()` returns an independent revision. An older revision keeps its own
  bindings until it is disposed.

  ```ts
  const environment = createDocumentEnvironment(ce, () => {});
  const imports = environment.createImports((declareInput) =>
    declareInput('s', 'real')
  );
  const revision = imports.prepare(rows, syntax, new Set(['W']));
  ce.expr('a', { scope: revision.scope }).evaluate(); // 10
  revision.dispose();
  imports.dispose();
  environment.dispose();
  ```

  The types and shapes a revision derives are fixed when it is prepared. The
  definitions of its rows and imports are read-only: assigning to them,
  declaring a new name in the revision scope, or changing a type throws a
  `ConstantAssignmentError`. Only a declared input (`declareInput()`) or a row
  named in the writable set accepts a value of its type: a `list<integer>` row
  accepts a longer list, and a `vector<integer^4>` row refuses a list of twelve
  elements. `revision.collectionWriteError()` tells whether a value is accepted,
  before the host writes it. The profile and import callbacks must be
  synchronous. `createDocumentEnvironment` is also in the global registration
  slot (`globalThis[Symbol.for('io.cortexjs.compute-engine')]`), for a host that
  discovers the engine at run time.

  A row whose content cannot be prepared does not stop the others. The row gets
  a diagnostic in `revision.rowErrors`. A definition that reads it gets
  `invalid-document-dependency`, and a formula row that reads it evaluates to
  the error. This holds for a row still being typed (`f(x)=` or `f(x)=x+1&`), a
  cycle (`a=b_1` with `b=a_1`) and a body whose type contradicts its stated
  type. Every row keeps an entry in `revision.rawRows`. `prepare()` throws only
  when the host breaks its contract, for example with two rows of the same `id`,
  or when a time limit or step budget expires.

### Behavior Changes

- **The type, protocol and value-kind registries are read-only while a document
  environment is live.** `ce.declareType()`, `ce.declareProtocol()`,
  `ce.declareProtocolImplementation()`, conformance declarations and the
  registration or removal of an arithmetic value kind throw until the
  environment, every import factory and every revision made from it are
  disposed. Declare these before you open the environment. Two revisions that
  need different types need two engines.

### Resolved Issues

- **`.references` lists the outer name that a declaration's initializer reads**
  (CE-1575). For
  `["Block", ["Declare", "d", "'unknown'", ["Add", "d", "n"]], ["Multiply", "d", 2]]`,
  `.references` was `["n"]` and is now `["d", "n"]`: the initializer reads the
  outer `d`.

## 0.196.1 _2026-11-21_

### Behavior Changes

- **Each loop iteration has a distinct scope again.** When a host callback
  re-enters the scope it saved on the first iteration of a sum, it reads the
  first iteration's index even while the second iteration runs.

### Resolved Issues

- **`FindRoot` can solve equations involving list reductions whose symbolic
  derivative is unavailable** (CE-1646). The equation `Mean([a, 2a]) = 6`
  converges to `a = 4` from a start of `a = 1`. Numeric derivative probes
  respect the parameter bounds.

## 0.196.0 _2026-11-21_

### Breaking Changes

- **The comparisons have no tolerance** (CE-1603). `Equal`, `NotEqual`, `Less`,
  `LessEqual`, `Greater`, `GreaterEqual` and the methods `.isEqual()`,
  `.isLess()`, `.isLessEqual()`, `.isGreater()` and `.isGreaterEqual()` compare
  two numbers exactly: a double as it is, and a big decimal or an exact number
  at the working precision. Two floats that differed by at most `ce.tolerance`
  (`1e-10`) were equal, so a test on small numbers gave the wrong answer:
  `1e-11 > 1e-12` was `False`, and `1.6e-19 = 0` was `True`. `ce.tolerance` is
  now read only by `Chop`, `ApproxEqual`, `.is()` and the numeric algorithms
  (`Solve` still accepts a computed root whose residual is within it).

  | Expression                          | Before  | Now     |
  | ----------------------------------- | ------- | ------- |
  | `1e-11 > 1e-12`                     | `False` | `True`  |
  | `9.5e-11 <= 0`                      | `True`  | `False` |
  | `1.6e-19 = 6.6e-34`                 | `True`  | `False` |
  | `\sqrt{3.5} \cdot \sqrt{3.5} = 3.5` | `True`  | `False` |
  | `\sin(3.141592653589793) = 0`       | `True`  | `False` |
  | `0.1 + 0.2 = 0.3`                   | `True`  | `True`  |
  | `\frac{1}{10} = 0.1`                | `True`  | `True`  |
  | `\sin(\pi) = 0`                     | `True`  | `True`  |

  To compare two computed values within a tolerance, use `ApproxEqual(a, b)`,
  `Chop(a - b) = 0`, `|a - b| < \varepsilon`, or `a.is(b)`. Membership in a
  `Set` or an `Interval`, the number patterns of `match`, `Solve` over a finite
  domain and the comparison of two quantities follow the same rule:
  `Solve(x = 2.0000000000001, x \in [-10..10])` is `[]`, and
  `1\,\mathrm{m} = 1.000000000001\,\mathrm{m}` is `False`.

- **Compound matrix and collection operands require shape information at
  boxing.** A determinant can use a matrix declared by the host or initialized
  in a program. To box an expression such as `Determinant(A + B)` before either
  value is available, declare the matrix operands first. The engine no longer
  revises the types of symbols inside the sum after boxing the operand.

- **In Epsil, the range `a..b` counts up, and it is empty when `a` is greater
  than `b`** (CE-1604). `a..b` is now `Range(a, b, 1)`, so a loop over the first
  `n` things runs zero times when `n` is 0, as `range` in Python and `1:0` in
  Julia do:

  ```epsil
  let n = 0
  let c = 0
  for k in 1..n { c = c + 1 }
  c                // ➔ 0 (was 2: the range was [1, 0])
  sum(1..n)        // ➔ 0 (was 1)
  xs[1..n]         // ➔ [] (was the elements at 1 and 0)
  ```

  To count down, write the step: `Range(7, 4, -1)` is `[7, 6, 5, 4]`. A range
  with two literal bounds and no element, such as `7..4`, gets the warning
  `range-empty`, with that call as its fix-it. The call `Range(a, b)` with no
  step does not change: it counts toward `b` in either direction, in Epsil, in
  MathJSON and in LaTeX. `serializeEpsil()` writes `Range(a, b, 1)` as `a .. b`,
  and `Range(a, b)` as a call.

### New Features

- **`epsilDebugStatements()` lists the statements of an Epsil source at which a
  debug run of `executeEpsilAsync()` cannot pause** (CE-1570), so that a
  debugger can grey out a breakpoint that never stops. It is exported from
  `@cortex-js/compute-engine/epsil`, reads the source without running it, and
  takes the options of `epsilCompletions()`. Each statement has its `range`, as
  the debug hooks receive it, and `canPause`. `canPause` is `false` for a
  statement of a function literal given to the library `map`, `filter`,
  `takeWhile` or `count`: the engine runs it on the synchronous route, which
  calls no hook. Every other statement is listed with `canPause: true`, also
  some that never pause, such as a named function that only `map` applies.

  ```ts
  const source = "let ys = map(k => do { let t = k + 1; t * 2 }, 1..3)\nsum(ys)";
  epsilDebugStatements(ce, source).map(
    (s) => `${s.canPause} ${source.slice(...s.range)}`
  );
  // ➔ ["true let ys = map(k => do { let t = k + 1; t * 2 }, 1..3)",
  //    "false let t = k + 1", "false t * 2", "true sum(ys)"]
  ```

  The documentation of the debug hooks no longer lists `any` and `all`: the
  engine awaits their predicate, so a breakpoint in it stops the run.

- **`epsilHover()` says what the name at an offset of an Epsil source is, and
  `epsilDefinition()` says where the source declares it** (CE-1589), for the
  "Show Info" and "Go to Definition" commands of an editor. Both are exported
  from `@cortex-js/compute-engine/epsil`, parse the source without evaluating
  it, and take the options of `epsilCompletions()`. The name is resolved in its
  scope: a name of the source gives its signature or declared type and the doc
  comment of a `function`, also when it shadows a library name; a library name
  gives its signature, its description and the address of its entry in the
  library reference. An offset in the text of a string or in a comment, and a
  name that nothing defines, give `null`.

  ```ts
  const source =
    "/// Twice the sine.\nfunction f(x: real) -> real { 2 * sin(x) }\nlet y = f(1)";
  epsilHover(ce, source, source.indexOf("f(1)"));
  // ➔ { range: [71, 72], name: "f", kind: "function",
  //     detail: "(real) -> real", description: ["Twice the sine."] }
  epsilDefinition(ce, source, source.indexOf("f(1)"));
  // ➔ { name: [29, 30], header: [20, 48] }: "f" in "function f(x: real) -> real "
  epsilDefinition(ce, source, source.indexOf("sin(x)")); // ➔ null: a library name
  ```

- **A statement that a debugger of `executeEpsilAsync()` receives says in which
  source it was written** (CE-1624). `EpsilDebugStatement` has two new fields:
  `sourceContent`, the text of that source, and `sourceUrl`, the `url` option of
  the run that parsed it. A statement of a function that an earlier run defined
  (a function of an earlier notebook cell, of a prelude) calls the hooks too,
  and its `range` is in the source of that earlier run, not of the run that
  calls it. A debugger now shows it there, or skips it:

  ```ts
  executeEpsil(ce, "function f(t) { let k = t * 2; k + 1 }", { url: "cell-1" });
  await executeEpsilAsync(ce, "f(5)", {
    url: "cell-2",
    debug: {
      beforeStatement: (at) =>
        console.log(at.sourceUrl, at.sourceContent?.slice(...at.range)),
    },
  });
  // ➔ cell-2 f(5)
  // ➔ cell-1 let k = t * 2
  // ➔ cell-1 k + 1
  ```

### Improvements

- **Each signature that `epsilSignatureHelp()` returns has its own
  `activeParameter`** (CE-1571). The arms of an overload set can differ, and the
  one index of the active signature did not apply to the others. In
  `slice(s, 1, ▮`, the two signatures `slice(value, start, end)` have the active
  parameter `2`, and the two `slice(value, span)` have none (`-1`). The
  top-level `activeParameter` is unchanged: it is the one of the active
  signature. The VS Code extension sends the value of each signature, so each
  arm highlights its own parameter.

  ```ts
  epsilSignatureHelp(ce, "slice(s, 1, ", 12).signatures.map((s) => s.activeParameter);
  // ➔ [-1, 2, -1, 2]
  ```

- **`ArgMax`, `ArgMin`, `MaxBy` and `MinBy` compile** (CE-1610). `compile()`
  declined them on every target ("the operator ArgMax is not supported by the
  compiler"). They now compile to JavaScript for a list of real numbers, and to
  GLSL for a list of a stated length, with or without a key function of one
  parameter:

  ```js
  ce.declare('L', 'list<real>');
  ce.declare('a', 'real');
  const nearest = compile(ce.parse('\\mathrm{ArgMin}(L, t \\mapsto |t - a|)'));
  nearest.run({ L: [3, 9, 2], a: 8 }); // ➔ 2
  ```

  As `evaluate()` does, they give the first of several equal keys. Where
  `evaluate()` leaves the expression unevaluated (an empty list, or a `NaN` key
  among two elements or more), the compiled `ArgMax` and `ArgMin` give `0`, and
  `MaxBy` and `MinBy` give `NaN`. `MaxBy` and `MinBy` also give a point of a
  list of points: `MinBy(P, p ↦ p[2])`. A list of strings, a key that is not a
  real number and the `interval-js` target still decline.

- **The derivative of `Min` or `Max` of a list is the derivative of the selected
  element**. `D(Min([x^2, (x - 1)^2]), x)` is
  `At([2x, 2x - 2], ArgMin([x^2, (x - 1)^2]))`: `0.4` at `x = 0.2` and `-0.4` at
  `x = 0.8`. Where two elements are equal, it is the derivative of the first of
  them. The derivative of `ArgMin` or `ArgMax` of a list is `0`. Compiled to
  JavaScript, such a derivative is exact, where it was a numeric derivative, and
  it now compiles to GLSL. The derivative stays unevaluated for a list written
  with a function (`Min(Map(f, L))`), for a result of more than 10,000 nodes,
  and where `ArgMin`, `ArgMax` or `At` has a user definition.

### Resolved Issues

- **An expression that reads a seeded random list whose length is a variable
  compiles again** (CE-1614). With `N: integer` and
  `H := WithRandomSeed(139128, RandomChoice([0, 1), 4N))`, compiling `t + H[2]`
  to JavaScript declined in 0.194.0 and later ("the value of H, which has an
  effect"), so a plot that read such a list drew nothing. The compiled code now
  makes the draws in their `WithRandomSeed`, as when the draws are written in
  place of `H`, and gives the value of `evaluate()` at each `N`. A symbol still
  declines when its value draws outside a `WithRandomSeed`, calls a function
  that draws, or draws at more than one place of one `WithRandomSeed`
  (`WithRandomSeed(5, Random() + Random())`), where compiled code can make the
  draws in another order than `evaluate()`.
- **The statistics of a list, a binomial coefficient over a list, and the
  comparison of two lists, two points or two booleans compile again** (CE-1532).
  They compiled in 0.193.0 and declined in 0.194.0 and later. `Mode`,
  `Quartiles`, `InterquartileRange`, `Skewness` and `Kurtosis` of a list of real
  numbers, and `Covariance`, `PopulationCovariance` and `Correlation` of two
  lists, compile to JavaScript; `Binomial` and `Choose` apply to each element of
  a list on every target. `Equal` and `NotEqual` of two lists or of two tuples
  of real numbers compile to one boolean, as `evaluate()` gives (the same
  length, and each element equal), and so do `Equal` and `NotEqual` of two
  booleans; they compile to JavaScript and `interval-js`, and to GLSL for
  tuples, booleans and lists of a stated length. The elements are compared
  exactly, with no tolerance, as every compiled `Equal`.

  ```ts
  ce.declare('L', 'list<real>');
  ce.declare('M', 'list<real>');
  const data = { L: [3, 1, 4, 1, 5, 9, 2, 6], M: [2, 7, 1, 8, 2, 8, 1, 8] };
  compile(ce.box(['Quartiles', 'L'])).run(data); // ➔ [1.5, 3.5, 5.5]
  compile(ce.box(['Correlation', 'L', 'M'])).run(data); // ➔ 0.20965531907301213
  compile(ce.box(['Binomial', 'L', 2])).run(data); // ➔ [3, 0, 6, 0, 10, 36, 1, 15]

  ce.declare('P', 'tuple<real, real>');
  ce.declare('Q', 'tuple<real, real>');
  const same = compile(ce.box(['Equal', 'P', 'Q']));
  same.success; // ➔ true (0.195.2: false)
  same.run({ P: [1, 2], Q: [1, 2] }); // ➔ true
  same.run({ P: [1, 2], Q: [1, 3] }); // ➔ false
  ```

  Where `evaluate()` gives an error (two lists of different lengths for a
  covariance, fewer than two pairs, a correlation of equal values), the compiled
  code gives `NaN`. A tuple compared with a list, lists of lists, of points or
  of booleans, and the statistics on GLSL and `interval-js` still decline.

- **Assignments to a pure function slot reject a function that draws random
  numbers** (CE-1633). The assignment reports an incompatible-type error and the
  slot keeps its previous function. A slot declared to allow random effects can
  still accept the replacement.

- **An element of an `If` with no else of a list compiles again** (CE-1606). A
  restriction of a list of curves that `At`, `First` or `Last` reads, that
  `Max`, `Min` or `Sum` reduces, or that arithmetic changes before one of these
  reads it, compiles on JavaScript and `interval-js`, and on GLSL for a list of
  stated length; it compiled in 0.193.0 and declined in 0.194.3 and later. Where
  the condition is false the element is `NaN`, the value of the interpreter for
  `At`, `First` and `Last`. `IsMissing`, `Coalesce`, `AssertPresent`, `Length`,
  `Rest` and the other readers of the list still decline: the interpreter gives
  `Missing` there, and a compiled list is never absent.

  ```ts
  ce.declare('x', 'real');
  const curves = ['If', ['LessEqual', 0, 'x', 6], ['Add', 'x', ['List', 0, 4, 2]]];
  const f = compile(ce.box(['At', curves, 1]));
  f.success;          // ➔ true (0.195.2: false)
  f.run({ x: 1.5 });  // ➔ 1.5
  f.run({ x: 7 });    // ➔ NaN
  compile(ce.box(['Length', curves])).success; // ➔ false
  ```

- **`Expand`, `Factor`, `Together`, `Distribute` and `Solve` of a stored formula
  no longer use a function's argument in place of a variable of the formula that
  has the same name** (CE-1455). These operators replace a symbol of their
  operand by the formula it holds. A variable of that formula is the variable of
  the scope where the formula was assigned, but it was read by its name where
  the operator was evaluated: in a function with a parameter of that name, in a
  block with a local of that name, and in a sum over an index of that name.

  ```js
  ce.assign('y', ce.parse('(x+1)^2'));
  ce.assign('f', ce.parse('x \\mapsto \\mathrm{Expand}(y)'));
  ce.parse('f(2)').evaluate(); // ➔ x^2 + 2x + 1 (0.195.2: 9)

  ce.assign('a', ce.parse('n + 1'));
  ce.parse('\\sum_{n=1}^{3} \\mathrm{Expand}(n a)').evaluate();
  // ➔ 6n + 6, as without Expand (0.195.2: 20)
  ```

  A parameter, a local or an index that the operand itself names is still
  replaced by its value: with `f := x ↦ Expand(x·y)`, `f(2)` is `2x^2 + 4x + 2`.

- **A `Series` of `GammaLn` is no longer off by `πi` where `Γ` is negative**
  (CE-1616). `GammaLn(x)` is `ln|Γ(x)|` for a real `x`, and
  `Series(GammaLn(x), x, -1, 2)` was `-ln(x + 1) + ln(-1) + …`, the series of
  `Ln(Gamma(x))`, which is `GammaLn(x) + πi` for `x > -1`. It now stays
  `Series(...)`, as it does at `0` and at `-2`, and so do the series at `-3`,
  `Series(GammaLn(x - 1/2) / x, x, 0, 2)` and `Series(GammaLn(-1/x), x, +∞, 2)`,
  which were off by `πi/x` and by `πi`. `Series(Ln(Gamma(x)), x, -1, 2)` is
  unchanged, and so is a series of `GammaLn` where `Γ` is known to be positive:
  `Series(GammaLn(1/x), x, +∞, 1)` is `ln(x) - EulerGamma/x + O(x^(-2))`.
- **An Epsil program that ends with `map`, `filter` or another finite lazy
  collection gives the list of its elements** (CE-1601). The value of
  `executeEpsil()` and `executeEpsilAsync()` was the lazy expression: its text
  was `[6,7]`, but its `json` and `latex` were the `Map` call, so a notebook
  cell showed `Map(u ↦ u+1, [5, 6])`. Only a comprehension was listed. The value
  is now a `List`, a `Set` or a `Dictionary`, and the callback runs once for
  each element, during the run.

  ```ts
  const { value } = executeEpsil(ce, 'map(u => u + 1, [5, 6])');
  value.json;  // ➔ ["List", 6, 7] (0.195.2: ["Map", ["Function", …], ["List", 5, 6]])
  value.latex; // ➔ \bigl\lbrack6, 7\bigr\rbrack (0.195.2: \mathrm{Map}(u\mapsto u+1, …))
  ```

  A range (`1..4`), a collection with no last element (`map(f, 1..oo)`) and a
  collection with more than `ce.maxCollectionSize` elements stay lazy, and so
  does the value of a statement that is not the last one (`onStatement` receives
  it). A list of more than 10 elements now prints in full
  (`map(u => 2 * u, 1..30)` printed `[2,4,6,8,10,...,52,54,56,58,60]`), and an
  element that is a range prints as `Range(1, 2)`, as in a list literal. When
  the time limit, the step budget or the recursion limit stops the computation
  of the elements, the value is `["Error", message, cause]`, as for a statement:
  a comprehension as the last statement threw a `CancellationError` to the
  caller, and `statementTimeLimitMs` and the time limit around
  `executeEpsilAsync()` did not apply to its elements. With
  `statementTimeLimitMs`, the elements have a second span of that limit.

- **`GCD` and `LCM` of real numbers compile to GLSL again** (CE-1595). Since
  0.194.0, `compile(expr, { to: 'glsl' })` declined them when an operand was not
  of an integer type ("GCD (the operation rgcd) on glsl"), so a heatmap of
  `\gcd` of a slider value was drawn by the interpreter. A shader now gives the
  value of `evaluate()` where the operands hold integers, and where they have a
  common divisor far above 1e-6 of the larger operand (`GCD(7.5, 2)` is `0.5`).

  ```ts
  ce.declare('x', 'real');
  ce.declare('y', 'real');
  compile(ce.box(['GCD', 'x', 'y']), { to: 'glsl' }).code;
  // ➔ "_gpu_ir_rgcd(x, y)" (0.195.2: declined)
  ```

  For operands with no such divisor (`GCD(3.14159, 2.71828)`), `evaluate()`
  gives a small value that changes with the last digit of an operand, and a
  shader, which computes in single floats, can give another small value. In a
  shader, two integer operands of which one is 2^31 or more give `NaN`.

- **A `type`, `protocol` or conformance statement of an Epsil program that a
  host runs in a scope of its own is at the top level** (CE-1627). After
  `ce.pushScope()`, as a notebook cell runs, `executeEpsil()` of
  `type Pt = tuple<x: real, y: real>` gave the error "Type declarations must be
  at the top level of a program", although the type was declared. The statement
  now gets no error. A declaration in a block, a function body or a branch still
  gets it. Types and protocols stay engine-global: a type that a program
  declares in a pushed scope is still declared after `popScope()`.
- **In Epsil, a block comment that is not closed gets the error
  `end-of-comment-expected` wherever it starts** (CE-1580). `let a = 1 /* note`
  gave `unexpected-symbol` for `/* note`, and `let /* note` and `f(1 2 /* note`
  gave no error for the comment. The source now gets the errors of the same
  source with the comment closed, then `end-of-comment-expected` with
  `incomplete: true`. For `f(1 /* note`, the fixit of `closing-bracket-expected`
  puts the `)` before the comment, and the Epsil REPL waits for the next line.
- **A debugger of `executeEpsilAsync()` stops at the last statement of a
  function that declares a return type or an effect** (CE-1625). In
  `function f(t) -> number { let k = t; k + 1 }`, the hooks were called for
  `let k = t` and not for `k + 1`, and `function f(t) scope { a = a + t }`
  called none. Each statement of the body now calls them.
- **A debugger of `executeEpsilAsync()` stops at each statement of a function
  that another function returned** (CE-1626). With
  `function mk(k) { t => do { let z = t + k; z } }`, `mk(2)(5)` called the hooks
  for `z` and not for `let z = t + k`: a statement that uses a parameter of `mk`
  called none. Each statement now calls them.
- **A `Series` at a zero or a pole of the argument of a logarithm no longer
  gives a series that holds on one side only** (CE-1442).
  `Series(Ln(x^2), x, 0, 3)` was `2ln(x) + O(x^4)`, which is `ln(x²) + 2πi` for
  `x < 0`. `Ln(-x)`, `Ln(1/x)` and `Ln(1 - Cos(x))` were off by `2πi` for
  `x < 0` in the same way. Each one now stays `Series(...)`, and so do
  `Log(x^2)`, `x * Ln(x^2)`, `Ln(a * x)` when the sign of `a` is not known, and
  `GammaLn(x)` and `Ln(Gamma(x))` at `0` and at `-2`. A logarithm whose series
  holds on both sides is unchanged: `Series(Ln(Sin(x)), x, 0, 3)` is
  `ln(x) - x^2/6 + O(x^4)`, and `Series(Ln(-1/x), x, 0, 3)` is
  `-ln(x) + ln(-1) + O(x^6)`. The series at `+∞` and `−∞` are unchanged.

- **A colour made from a complex channel compiles again in the complex mode**
  (CE-1586). With `mode: 'complex'`, `compile()` declined a colour constructor
  whose channel has a complex value, such as `Hsv(Sqrt(z), 1, 1)` for a real
  input `z` ("Hsv of complex, integer, integer"). The constructors `Rgb`, `Hsl`,
  `Hsv`, `Oklab` and `Oklch` now read the real part of a complex channel, as
  `evaluate()` does: at `z = -4`, `Hsv(Sqrt(z), 1, 1)` is the colour of
  `Hsv(0, 1, 1)`.

- **A `Map` or a `Comprehension` over a `Range` of constant integer bounds
  compiles to GLSL again** (CE-1587). `compile()` with `to: 'glsl'` declined
  `Min(Comprehension((x - k)^2, Element(k, Range(1, 16))))` ("the region build
  (a Map, a Filter or a Range) on glsl"), so such a shader ran on the CPU. A
  `Range` whose bounds and step are integer constants now has a constant length
  at compile time, and the build over it is written out, one element after the
  other, as for a literal list of up to 64 elements. On JavaScript, a build over
  such a `Range` of up to 16 elements is also written out instead of a loop. A
  `Range` with a real bound or step, and every `Range` with
  `constantFold: false`, keep the previous behavior.

- **A call of a function declared with an `unknown` result is real again in the
  strict mode** (CE-1588). A function declared `(real) -> unknown` and assigned
  `w ↦ sin(w)·√(1 − e²)`, with `e: real<-10..10>`, has the reported result type
  `complex`. `compile()` returned a complex value for a call of it, so
  `(F(t), t)` declined on GLSL ("a list of complex numbers on glsl"). In
  `mode: 'strict'`, the result of such a call now has the type of the compiled
  body, as when the body is written in place: a real, which is `NaN` where
  `1 − e²` is negative. A result declared `complex`, and the `complex` mode,
  keep the complex value.

- **The derivative of a number computed from a list is a number, not a list**
  (CE-1602). `D(Mean([x^2, (x - 1)^2]), x).evaluate()` gave the list
  `[2x·Mean′(…), (2x − 2)·Mean′(…)]` for an expression of type `number`: the
  chain rule multiplied the derivative of each element by a derivative of
  `Mean`. It now stays `D(Mean([x^2, (x - 1)^2]), x)`. This applies to `Mean`,
  `Median`, `Norm`, `Variance` and `StandardDeviation` of a list that depends on
  the variable, to `Min` and `Max` where they have no closed form (see
  Improvements), and to a function declared `(list<number>) -> number`. An
  operator applied to each element (`D(Sin([x^2, x]), x)`) and `Min` of number
  arguments (`D(Min(x^2, x), x)`) are unchanged. An expression that holds such a
  derivative is much smaller and faster to evaluate: for the distances to 64
  points, `Abs(g) / Sqrt(D(g, x)^2 + D(g, y)^2)`, with `g` the difference of the
  two smallest distances, evaluated to 12.3 million nodes in about 10 s, and now
  to 51,000 nodes in about 0.25 s.

- **A constant of value 0 is not read as a nonzero value by `0/a` and `a^0`**
  (CE-1429). With `ce.declare('z', { value: 0, isConstant: true })`, `0/z` is
  `0/0` and `z^0` is `0^0`, which have no value:

  ```js
  ce.box(['Divide', 0, 'z']).simplify(); // was 0, now NaN
  ce.box(['Power', 'z', 0]); // was 1, now NaN
  ce.parse('x z^0').evaluate(); // was x, now NaN
  ```

  `evaluate()` already gave `NaN` for the quotient. A constant with a nonzero
  value (`0/\pi` is `0`, `\pi^0` is `1`), a constant with no value and a
  variable are unchanged.

- **A number written in a base above 10 reads back from its LaTeX as the same
  number** (CE-1400). `BaseForm(42, 16)` was written `\mathrm{2a}_{16}`, which
  parses as a symbol. A numeral with a letter digit is now written as a string
  with the base as a subscript, the form that the parser reads as a number:

  ```js
  ce.box(['BaseForm', 42, 16]).latex; // was \mathrm{2a}_{16}, now \text{2a}_{16}
  ce.parse('\\text{2a}_{16}').json; // ➔ 42
  ce.box(['BaseForm', 205, 16]).latex; // ➔ "cd"_{16}
  ```

  Digits that spell a unit or a keyword (`cd`, `and`) are written with double
  quotes, as the string is: `\text{cd}` is the candela. In a base above 36, a
  numeral with a letter digit is written `\operatorname{BaseForm}(50, 40)`. A
  numeral with decimal digits only is unchanged (`101010_{2}`).

- **With `evaluateAsync()`, a function that has only an `evaluateAsync` handler
  runs once when its call is inside a list operand** (CE-1454). The function ran
  twice when its call was an entry of a nested list, or an entry of a list that
  is an operand of an operator such as `Add` or `Equal`, and the result held the
  value of the second run:

  ```js
  let n = 0;
  ce.declare('g', {
    signature: '() -> integer',
    pure: false,
    evaluateAsync: async () => ce.number(++n),
  });
  await ce.box(['List', ['List', ['g'], 2], ['List', 3, 4]]).evaluateAsync();
  // was [[2, 2], [3, 4]] after two runs of g, now [[1, 2], [3, 4]] after one
  ```

  The entries of a nested list are now evaluated in their order, as the entries
  of a flat list are.

### Performance

- **A `Map`, a `Filter` or an `Apply` over a list evaluates once a part of its
  function that reduces another list** (CE-1609). In
  `Map(k ↦ Which(k = Min(d), 10^9, True, k), d)`, with `d` a list of 100
  symbolic distances, `Min(d)` was evaluated at each element, and again in the
  condition, so the time grew with the square of the length. It is now evaluated
  once for the whole list: reading the 100 elements took about 1,060 ms and
  takes about 270 ms, and 64 elements about 530 ms and now 150 ms. The values
  are the same.

- **A loop, and a block evaluated again, allocate less when no closure or lazy
  collection keeps their variables.** An Epsil program that sums `2i` for `i` in
  `1..100` with `N()` took about 900 µs and takes about 780 µs. Boxing `x^2 + 1`
  takes about 7% less time, and boxing `x ↦ x^2 + 1` about 5% less. The values
  are the same: a function made in an iteration still keeps the value of the
  index in that iteration.

## 0.195.2 _2026-11-20_

### New Features

- **The fixit of an unclosed Epsil string can close it at the caret** (CE-1520).
  A `Fixit` has an optional fourth element, a caret range `[start, end]` (both
  ends included). The fixit of `string-literal-closing-delimiter-expected` for a
  single-line string or a LaTeX island has one: the text after the opening
  delimiter and after the last `\(…)` hole. An editor whose caret is in that
  range inserts the delimiter at the caret: with the caret after `Buzz` in
  `{ "Buzz| }`, the fix gives `{ "Buzz" }`, and with the caret at the end of
  `{ "Buzz }|` it gives `{ "Buzz }"`. Outside the range, or in a host without a
  caret, the fixit inserts at its range as before. A multiline string has no
  caret range.

### Behavior Changes

- **Epsil completion offers only what the grammar admits there**.
  `epsilCompletions()` reads the tokens before the offset: a name being declared
  (`let ▮`, `for ▮`) and the place after a declared name or a type (`let a ▮`,
  `let a: integer ▮`) get no items; `for i ▮` gets `in`, `if x { 1 } ▮` gets
  `else`, and a complete expression on its line (`f(1) ▮`) gets `if`, `in` and
  `is`, not the names and the statement keywords. `x is ▮` gets the types,
  `type T is ▮` and `protocol P extends ▮` get the protocols, and a case pattern
  of `match` gets no keyword other than `true` and `false`.

## 0.195.1 _2026-11-20_

### Resolved Issues

- **Functions that call each other in a cycle are defined quickly** (CE-1516).
  Defining functions that call each other in a cycle, each with a head declared
  `(unknown) -> unknown`, took seconds or ran out of memory: with `a(n)` calling
  `c(n - 1)` and `b(n - 1)`, `b(n)` calling `c(n - 1)` and `c(n)` calling
  `a(n - 1)`, the assignment of `c` took several seconds and the next definition
  that called `a` did not finish. Each read of a head inside the cycle derived
  its signature again. A derived signature is now kept for the current pass of
  the derivation that reads it so repeated reads within that pass can reuse it.

## 0.195.0 _2026-11-20_

### New Features

- **A parse diagnostic of Epsil tells when the input ended too soon** (CE-1522).
  A diagnostic of `parseEpsil()` has `incomplete: true` when the parser reached
  the end of the input before the construct was complete, so that more text at
  the end can remove the error: `let s = "abc`, `f(1`, `let a = 1 +`, `if x`,
  `let x: list<`. An editor can wait before it shows such a diagnostic on the
  line being typed, and show the others at once. An error before the last line
  (`let a = 1 +` and then `let b = 2`) and an error that more text cannot remove
  (`1 )`, `let a = *`) do not have the field.

- **An unclosed string or bracket in Epsil has a fixit** (CE-1520). The
  `string-literal-closing-delimiter-expected` diagnostic of `parseEpsil()`
  inserts the delimiter after the text of the string on its line, before a
  closing bracket that the string ran over: `{ "Buzz }` gives `{ "Buzz" }`. The
  `closing-bracket-expected` diagnostic of a bracket still open at the end of
  the input inserts the bracket after the last token, before trailing white
  space and comments: `f(1 // note` gives `f(1) // note`. A bracket missing
  before another token (`f(1]`) has no fixit.

- **`epsilDiagnosticMessage()` gives the text of an Epsil diagnostic**
  (CE-1519). It is exported from `@cortex-js/compute-engine/epsil` and turns the
  `[code, ...args]` message of a diagnostic of `parseEpsil()` or `checkEpsil()`
  into the sentence that the `epsil` command line, its MCP server and the VS
  Code extension show, without the code. For `let x: notatype = 1` it gives
  `Unknown type "notatype"`; these tools showed
  `type annotation error: Unknown type "notatype"` before.

- `Permutations(n)` for a non-negative integer `n` is the permutations of
  `Range(1, n)`, as lists and in the same order as `Permutations(Range(1, n))`,
  and `Permutations(n, k)` its arrangements of length `k`. It is a lazy
  collection like the one over a collection: `Count` is `n!`, and `At`,
  `IndexOf`, `Contains` and `Count(…, v)` read a position or an element with no
  walk (`At(Permutations(25), 10^24)`). `Permutations(0)` is `[[]]`. A negative
  or non-integer `n` is still a type error, a symbol of type `integer` reads its
  value, and `Permutations("abc")` is still the list of strings.
  `IntegerPartitions` also gives the position of a partition: `IndexOf`,
  `Contains` and `Count(…, v)` read it from the table of counts that `At` uses,
  with no walk, for every form of the operands (the number of parts, the allowed
  parts and the limit). A list that is not one of the partitions, or has a part
  that is not an exact integer, is not contained (#620, PR #621, contributed by
  [enumeratio](https://github.com/enumeratio))

- **The compilation result has a `rows` field** (CE-1549). It is `true` when the
  result of compiled JavaScript is a list of lists whose rows can have different
  lengths, as `Chunk(L, k)` of a list of run-time length gives: `run()` returns
  an array of plain arrays, and the code has no batch form. `broadcast()`,
  `broadcastAsync()` and the batch loaders of the runtime (`loadBroadcast()`,
  `loadBroadcastSlice()`, `loadBroadcastAsync()`) throw a `TypeError`, and
  `shippable` is `false`. A stored copy of the result keeps the field.

- **A parameter of a protocol function can have a default value** (CE-1554). The
  protocol owns the default: a call that leaves the argument out receives it, in
  the bare, the method and the qualified form, and every implementation takes
  the full parameter list:

  ```epsil
  protocol Figure {
    function stroke(self: Self, color: string, width: real = 1) -> Self
  }
  type Pen = tuple<color: string, width: real>
  type Pen is Figure {
    function stroke(self: Pen, color: string, width: real) -> Pen { Pen(color, width) }
  }
  let p = Pen("black", 3)
  (p.stroke("red").width, p.stroke("red", 4).width, Figure.stroke(p, "blue").width)
  // ➔ (1, 4, 1)
  ```

  Before, the declaration was refused (`invalid-protocol-declaration`). An
  implementation that leaves out `width`, or gives it another default, is
  `protocol-signature-mismatch`. A default is a constant, as for any function: a
  library constant, a constant of the host, or a `const` declared above the
  `protocol` statement, and it is read with the value the constant has when the
  call is made. An optional parameter without a default, and a default on a
  parameter whose type mentions `Self`, are still refused.
  `ce.declareProtocol()` accepts the same signatures:
  `'(self: Self, scale: real = 10) -> real'`. A named argument may skip a
  parameter with a default: with `a: real = 1, b: real = 2`, `sc(x, b: 5)`,
  `x.sc(b: 5)` and `S.sc(x, b: 5)` are `sc(x, 1, 5)`.

### Behavior Changes

- **The text of an Epsil `type-annotation-error` no longer starts with "type
  annotation error: "** (CE-1519). The `epsil` command line, its MCP server, the
  VS Code extension and the `message` field of `epsil check --json` show the
  sentence of the type parser alone: for `let x: notatype = 1`,
  `Unknown type "notatype"`, not
  `type annotation error: Unknown type "notatype"`. The `code` field is still
  `type-annotation-error`.

- **In Epsil, a bare call of a protocol function member named like a library
  function calls the library function when no implementation applies to its
  first argument.** After
  `protocol Styled { function fill(self: Self, c: any) -> Self }` and a
  conformance of a `Fig` type, `fill(s, "red")` still calls the member for a
  `Fig` value, and `fill(7, 3)` is now the library `Fill`: `[7, 7, 7]` (before:
  a `protocol-implementation-missing` error). When the type of the first
  argument does not settle the question (an untyped parameter), the call is
  decided when it runs. The qualified call `Styled.fill(7, 3)` does not fall
  back, and a definition of your own named `fill` still wins over both.

### Resolved Issues

- **The harmonic number of a very small complex number is correct** (CE-1572).
  `HarmonicNumber(10^{-30}(1+i))` evaluates to about `1.6449e-30 + 1.6449e-30i`;
  its real part was `−7.39e-16`. A complex `n` with `|n| < 0.1`, with no order
  or a real order `r`, now takes the series in `n` that a real `n` takes, so
  each part keeps its digits: `HarmonicNumber(10^{-30}i)` has a real part of
  about `ζ(3)·10^{-60}`. When the series cannot give each part to the working
  precision, the value stays unevaluated. With an integer order `r ≤ 0`, the
  harmonic number of a complex `n` is the exact polynomial in `n`, rounded once:
  `HarmonicNumber(10^{-30}(1+i), -3)` is about `−10^{-90} + 5·10^{-61}i`, where
  its real part was `0`.

- **A list of `True` and `False` values is read as fast as a list of numbers**
  (CE-1369). A list whose elements are `True`, `False`, numbers and strings
  evaluates to itself and has no effect, so it is no longer walked at each turn
  of a `Map` that reads it. A function
  `f(l) := Map(j ↦ l[j], Range(1, Length(l)))` with `l: list<boolean>` took four
  times longer each time the list doubled: about 1.5 s for 16,000 values. It now
  takes about 0.13 s, as for a list of numbers.

- **A selection at each position whose arms are a `Map` or a `Range` compiles**
  (CE-1562). With `L: list<real>` and `i: list<real>`,
  `Which(Equal(Mod(i, 2), 1), Map(w ↦ 2w, At(L, i)), True, 0)` compiles to
  JavaScript again, as it did in 0.186.0, and gives `[10, 0, 14]` for
  `L = [5, 6, 7]` and `i = [1, 2, 3]`, as the interpreter does. So does a
  selection whose arms and later conditions are ranges, such as
  `Which(Equal(Mod(Range(1, N), 3), 1), Range(1, N), Equal(Mod(Range(1, N), 3), 2), Range(0, N - 1), True, 0)`.
  Both declined with "a selection at each position whose arms or later
  conditions are not pure". A `Range` arm is read at each position and never
  built. An arm that builds a list of another length than the first condition
  still declines, because the interpreter does not evaluate an arm that no
  position selects.

- **A point multiplied by a list of numbers compiles** (CE-1569). With
  `l: list<real>`, `a: real` and `b: real`, `Multiply(l, Tuple(a, b))` compiles
  to JavaScript again, as it did in 0.186.0. It declined with "Multiply of a
  tuple: its value on a tuple is not its value on a list". The value is the list
  of the points that each number scales, as in the interpreter: for `l = [1, 2]`
  and `(a, b) = (3, 4)` it is `[(3, 4), (6, 8)]`. A point divided by a list of
  numbers (`Divide(Tuple(a, b), l)`) also compiles, and on GLSL both compile
  when the list has a constant length.

- **A `Sum` of points, or of lists of points, compiles** (CE-1568). With
  `P: list<tuple<real, real>>`, the spline
  `Sum(Multiply(At(P, Add(Mod(Add(k, Range(0, 1)), 2), 1)), k), Limits(k, 1, 4))`
  compiles to JavaScript again, as it did in 0.186.0, and gives
  `[(18, 28), (22, 32)]` for `P = [(1, 2), (3, 4)]`, as the interpreter does. It
  declined with "a term that is not a number". The terms are added point by
  point. A `Product` of points still declines, and so does a sum of points over
  a range that can be empty: the interpreter then gives the number `0`.

- **A `Sum` or a `Product` of list terms from 0 to the length of a list
  compiles** (CE-1567). With `L: list<real>`,
  `Sum(Multiply(k, L), Limits(k, 0, Length(L)))` compiles to JavaScript again,
  as it did in 0.186.0, and gives `[3, 6]` for `L = [1, 2]`, as the interpreter
  does. It declined with "a term that is a list, over a range that can be
  empty": a length is never negative, so a range from a constant at most 0 to a
  length always has a term. `Limits(k, 1, Length(L))` still declines: for an
  empty `L` that range has no term, and the interpreter gives the number `0`.

- **A name whose value is a `Comprehension`, a `Sum` or a `Product` compiles
  when the index of a clause has the name of another symbol with a value**
  (CE-1566). With `j := [4, 5]` and
  `c := Comprehension(j / 10, Element(j, Range(0, S - 1)))`, `x + Sum(c)`
  compiles to JavaScript again, as it did in 0.186.0. It declined with "the
  value of c, which reads j of another binding": the index `j` of the clause was
  taken for a read of the outer `j`. The index is now bound in the body of the
  clause and in its condition. A bound or a list of a clause that reads a symbol
  of another binding still declines.

- **A list of points multiplied or divided by a list of numbers compiles when
  the lists have lengths known only at run time** (CE-1561). With
  `p: list<tuple<real, real>>` and `n: list<real>`,
  `Multiply(PointX(p), PointList(1, n))` compiles to JavaScript again, as it did
  in 0.186.0. It declined with "Multiply of a list of points and a value of
  another shape". Each number scales the point at the same index, as in the
  interpreter: for `p = [(1, 2), (3, 4)]` and `n = [10, 20]` the value is
  `[(1, 10), (3, 60)]`. `Multiply(n, p)` and `Divide(p, n)` also compile. Two
  lists whose stated lengths differ still decline.

- **A conditional whose condition is a constant compiles when the arm that is
  not taken would decline** (CE-1560). With `x: real`,
  `Which(1.2 <= 1, Which(x < -Sqrt(1 - 1.2^2), 1, True, 0), True, 1)` compiles
  to `1` again, as it did in 0.186.0. It declined with "Less of real, complex".
  The interpreter does not evaluate the arm that is not taken, and now the
  compiler does not lower it either. This applies only when every arm has the
  same scalar type (integer, real or boolean) and there is an `else` arm. A name
  read only in the arm that is not taken is then not in `freeSymbols`. Arms of
  two shapes still decline, as `docs/COMPILATION-MODEL.md` says.

- **The characters of a string and the elements of a list of strings can be
  counted, read and transformed in compiled JavaScript** (CE-1556). With
  `s: string` and `L: list<string>`, `Count(Characters(s), c -> c == "a")`,
  `Map(ToUpperCase, L)`, `Filter(L, p)`, `Any`, `All`, `Reverse`, `Take`,
  `Drop`, `Rest`, `Most` and the rotations of a list of strings now compile, and
  so do `Equal`, `NotEqual` and `KroneckerDelta` of two strings. They declined
  before. Each element is read with the interpreter's text (NFC):
  `Map(c -> c == "é", L)` is `[True]` for an element written `e` + U+0301.
  `At(L, i)`, `First(L)` and `Last(L)` compile as the result (`undefined` out of
  range) and in `IsMissing`, `Coalesce` and `AssertPresent`, which give the
  interpreter's value at `i = 9` too. Elsewhere such a read declines; write
  `ToUpperCase(Coalesce(At(L, i), ""))` for `ToUpperCase(At(L, i))`.

- **Lists of strings can be sorted and strings compared in compiled JavaScript**
  (CE-1574). With `s, t: string` and `L: list<string>`, `Sort(L)`, `Unique(L)`,
  `Sort(Characters(s))`, `Unique(Characters(s))` and `Less`, `LessEqual`,
  `Greater` and `GreaterEqual` of two strings or of two characters now compile;
  they declined before. The order is the interpreter's: two strings by UTF-16
  code units, two characters by code points, so `Less("\u{E000}", "😀")` is
  `False` and the same comparison of two characters is `True`. `Unique` keeps
  the first of equal elements, by their NFC text. A character against a string,
  a chain of three or more operands and `Sort` of a list that holds both still
  decline.

- **`IsMissing` of a string or a colour read out of range no longer compiles to
  `false`.** `IsMissing(At(["a", "b"], i))`, `IsMissing(At(L, i))` of a
  `list<string>` `L` and `IsMissing(At(Characters("ab"), i))` compiled to
  `false` on JavaScript, and `IsMissing(At([Rgb(x, 0, 0), Rgb(0, x, 0)], i))` to
  `false` on JavaScript and GLSL, where the interpreter gives `True` at `i = 9`.
  They now decline (a compilation without fallback fails, and the default
  compilation falls back to the interpreter). The discharges of a present string
  give its value (`Coalesce(ToUpperCase(s), "z")` is `"AB"` at `s = "ab"`);
  `IsMissing` of any colour declines.

- **`HarmonicNumber(n, 0)` of a large `n` is immediate** (CE-1555).
  `HarmonicNumber(1e6, 0).N()` took minutes and is now `1000000` at once. The
  exact sum of a large `n` counts the work of its common denominator, so
  `HarmonicNumber(20000, 2)` and `HarmonicNumber(5000, 10)` stay symbolic under
  `evaluate()` and take the numeric route under `N()`, instead of computing a
  rational of tens of thousands of digits for more than a second.

- **`HarmonicNumber` of a number close to 0 is no longer 0** (CE-1559). For a
  real `|n| < 0.1` and a real `r`, `HarmonicNumber(n)` and
  `HarmonicNumber(n, r)` are the series `Σ −(−n)ʲ (r)ⱼ/j! ζ(r + j)` when it is
  short, and otherwise the continuation at a precision raised by the digits that
  it loses, so every digit of the working precision is right:
  `HarmonicNumber(1e-30).N()` is `1.6449e-30` (it was `0`),
  `HarmonicNumber(1e-30, 2)` is `2.4041e-30`, `HarmonicNumber(1e-30, -1)` is
  `5e-31` and `HarmonicNumber(1e-30, -5.5)` is `1.7004e-32`.

- **The derivative of the norm of a point-valued function call has a closed form
  (CE-1563).** With `f := t ↦ PointList(sin 2t, cos 3t, sin 5t)`, `D(|f(t)|, t)`
  and `D(|f'(t)|, t)` stayed unevaluated; they now give `(Σ fᵢ·fᵢ′)/|f(t)|`, as
  for a written-out tuple `|(sin 2t, cos 3t, sin 5t)|`. So the derivative of the
  unit tangent `F := t ↦ f'(t)/|f'(t)|` gives the same function whether or not
  `f` and `F` are first declared `function`. Before, with the declarations,
  `Derivative(F, 1)` stayed unevaluated and `compile(F'(u))` declined with "a
  derivative with no closed form"; it now compiles.

- **A compiled program nested too deep for the JavaScript parser declines as too
  deep.** Where the parser of the host runs out of stack (on Windows, a `Which`
  of 1,000 clauses on the interval target, a `ListJoin` of 1,000 operands), the
  decline was "internal error: … made code that does not parse (RangeError:
  Maximum call stack size exceeded)" with the whole code; it is now "an
  expression too deep to compile", as for a walk of the compiler that runs out
  of stack.

- **`Map` over the groups of `Partition(xs, p)` gives a value (CE-1558).** With
  a predicate `p`, `Map(f, Partition(xs, p))`, its `Count`, `At`, `Reduce` and
  `Sum` stayed unevaluated, while the same over `Partition(xs, 2)` or
  `Chunk(xs, 2)` gave a value. They now give the value that they give over the
  list of the two groups: with `F = Function(Length(r), r)`,
  `Count(Map(F, Partition([1, 2, 3, 4], t ↦ t < 3)))` is `2`.

- **A compiled `ListJoin` of a list of points and a point appends the point**
  (CE-1565). With `S: list<tuple<real, real>>`, `ListJoin(S, Tuple(0, 0))`
  compiled to JavaScript gives `[[1, 2], [3, 4], [0, 0]]` for
  `S = [(1, 2), (3, 4)]`, as the interpreter does: a tuple operand is one
  element. Since 0.194.0 it declined with "a tuple where a list is read", so the
  polyline of the Desmos `join(L, (0, 0))` was computed point by point or drew
  nothing. A tuple beside a list whose elements are not tuples of the same
  length still declines.

- **A parameter of an outer function literal, read two literals down under a
  lazy `Map` that a reducer holds, has its value.**
  `Apply(s ↦ Sum(Map(v ↦ Apply(t ↦ Length(Take(s, 2)), v), 1..2)), [2, 3, 4, 4])`
  was `2Length(Take(s, 2))`; it is `4`. The same for `Max` and `Reduce` in place
  of `Sum`. `Map` lowers its callback, so the callback's scope is never an
  activation, and the call frame of the inner literal chained to a scope that
  holds no value of `s`. The frame now chains to the activation of the nearest
  enclosing scope that has one. (#624, PR #625, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`SinIntegral`, `CosIntegral`, `SinhIntegral`, `CoshIntegral`, `AiryAiPrime`
  and `AiryBiPrime` of a real argument carry the precision asked for.** At
  `ce.precision = 50`, `SinIntegral(0.7)` was the double `0.6812222391166113`;
  it is `0.68122223911661131088950681145394251597654289921409`. The same for the
  other four, and for `AiryAiPrime(0.7)` and `AiryBiPrime(0.7)`. A value the
  engine cannot compute to the digits asked for stays unevaluated: the four
  integrals past `|x| = 1000`, `AiryBiPrime(200)` and `AiryAiPrime(10001)` were
  doubles (or `+∞`) and are now left as written. `CosIntegral(-3)` and
  `CoshIntegral(-3)` are the principal value `f(3) + iπ` with both parts at the
  working precision. Complex arguments and machine precision are unchanged.
  (#628, PR #629, contributed by [enumeratio](https://github.com/enumeratio))

- **`Zeta` of a real number within 10^-j of 1, 0, −2, −4, … is right to the
  working precision.** Next to the pole and the trivial zeros the value is a
  quotient or product with a factor of size 10^-j, and the rounding error of
  that factor, absolute at the working precision, cost j digits of the result:
  `Zeta(-2 - 10^-30).N()` at 30 digits was 3.0448457058393270780251**4788**e-32
  for 3.0448457058393270780251**5305**e-32, and `Zeta(1 + 10^-30)` was wrong
  from its 25th digit. The kernel now adds j guard digits, so the error is
  relative to the result, and declines (the call stays unevaluated) when j
  passes 500; within 10^-(p+2) of 0, at p digits, the value is −1/2. Against
  mpmath on `s = n ± 10^-k` for `n` in 1, 0, −1, −2, −4, −10, `k` from 10 to 40
  and 30, 50 and 100 digits, a float operand, an exact one, `evaluate()` and the
  LaTeX parse route had 74 wrong points of 252 each (27 for an exact operand),
  and have none. Machine precision is unchanged. (#626, PR #627, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`HurwitzZeta(s, a)` within 1.1e-16 of `s = 1` is answered, not an internal
  error.** The double of such an `s` is exactly 1, and the Euler-Maclaurin
  planner sized the sum from `log10|s - 1|` of that double, an infinite estimate
  that ended in `RangeError: The number NaN cannot be converted to a BigInt`. It
  reads the distance from the operand now, and declines when the estimate is
  still not finite or, as `Zeta` does, within 10^-500 of 1.
  `HurwitzZeta(1 + 10^-30, 3).N()` at 30 digits is
  `999999999999999999999999999999.0772…`. Against mpmath, `a` = 1/4 and 3,
  `s = 1 ± 10^-k` for `k` from 3 to 40, at 30, 50 and 100 digits: 78 of 156
  points were an error, and none is now. (#626, PR #627, contributed by
  [enumeratio](https://github.com/enumeratio))

- **A finite value past the exponent range of a big decimal stays unevaluated.**
  A `BigDecimal` keeps its decimal exponent in a JS number, so `exp()` saturates
  beyond 2^53 and `Gamma(3000000000000001/3)` (about 10^(1.5·10^16)) answered
  `+oo`, `Zeta(-3000000000000001/3)` `-oo` or `~oo`, and `DirichletEta` of it
  `+oo` or `NaN`, as did `Factorial`; a `Binomial` with such a coefficient
  answered `+oo`, `~oo` or `0`. They now stay unevaluated, with `evaluate()` and
  `.N()` alike. `Beta(a, b)` at a large `a` or `b` was `NaN` (a quotient of
  overflowed `Γ` values) and is now computed from the log-gamma ratio, as
  `Binomial` is, or declines. Machine precision keeps the double convention
  (`Gamma(200)` is `+oo`). (#616, PR #617, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`PolyLog` and `LerchPhi` no longer answer in doubles at a precision above
  machine when `z` is too close to the unit circle.** Inside `|z| < 1` the
  arbitrary-precision series gives up past 30,000 terms (about `|z| > 0.99` at
  50 digits), and the call then fell through to the double kernel and boxed its
  15 digits as a 30 to 100 digit number: `PolyLog(1/2, 0.999999999999).N()` at
  100 digits was wrong from the 5th digit. Such a call now stays unevaluated, as
  every other kernel that cannot vouch for its digits does; at machine precision
  the double kernels are unchanged. Against mpmath over 2,900 grid points (less
  12 mpmath-noise rows) at 30, 50 and 100 digits, the 215 wrong answers (all
  with `|z|` from 0.99 to `1 - 1e-12`) are now unevaluated, and the rest are
  unchanged. (#614, PR #615, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`LogGamma` at a negative real and `HurwitzZeta(s, a)` at a negative `a` with
  a non-integer `s` are computed at the engine precision.** Their values are
  complex and were answered in doubles (15 digits) at every precision.
  `LogGamma(x)` is now `ln|Γ(x)| − iπ⌈−x⌉` and `HurwitzZeta` is the principal
  front sum plus `ζ(s, a + ⌈−a⌉)`, both in big decimals; a case the kernel
  cannot vouch for stays unevaluated. `Gamma(s, z)` at `z < 0` stays unevaluated
  at a precision above 15 digits instead of answering in doubles (#612, PR #613,
  contributed by [enumeratio](https://github.com/enumeratio))

- **`DirichletEta(n)` and `DirichletBeta(n)` at an integer `n` carry every digit
  asked for under `.N()`.** `N(DirichletEta(3))` at 30 digits ended
  `…49803621132`, where the correct value ends `…49803621134`: the closed form
  `(1 − 2^(1−n)) ζ(n)` rounded `ζ(n)` and then the product, and the odd
  `DirichletBeta(n)`, a rational times `π^n`, rounded `π^n` and then the
  product. Both now run on the arbitrary-precision kernels, which carry their
  own guard digits, and the exact forms of `evaluate()` are unchanged. Against
  mpmath at 30, 50 and 100 digits, for `n` from 2 to 99, the integer cases of
  `DirichletEta` that were 1 to 5 units off and of `DirichletBeta` that were up
  to 3 units off now agree to the last digit. (#610, PR #611, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`Binomial`, `Choose`, `Factorial`, `GammaRegularized`, `BetaRegularized` and
  `ClausenCl` read an exact operand with guard digits under `.N()`.** The
  operand `1/3`, rounded to the working precision, reached the last digits of
  the result multiplied by the condition number of the function: at 30 to 100
  digits the last 2 to 8 digits were wrong, and up to 10^8 units at large
  arguments (`Factorial(328/6).N()`). `Binomial` of float operands computes the
  Γ quotient with guard digits and rounds once (it ended 2 units off), and its
  poles are decided on the exact operands: `Binomial(19/6, 385/6).N()` is `0`,
  not a rounding residue. `GammaRegularized` of an integer order sums its series
  with guard digits and rounds once (#608, PR #609, contributed by
  [enumeratio](https://github.com/enumeratio))

- **An `If` with no else of a list compiles again (CE-1564).** A restriction of
  a list of curves, `If(0 < x, x·L)` with `L: list<real>`, compiles on
  JavaScript, and on GLSL for a list of stated length, when it is the result of
  the program: where the condition is false, its value is the list of `NaN` of
  the length of the list (a list of points of `NaN` for a list of points). Where
  an operator reads its value (`IsMissing`, `Length`), the compilation still
  declines: the interpreter's value there is `Missing`, and a compiled list is
  never absent. A restriction of a list by a list condition,
  `If(PointX(P) < 20, P)`, selects at each position, to the shorter of the
  condition and the list, as the interpreter does. Both declined since 0.194.0.

- **`HarmonicNumber(n)` and `HarmonicNumber(n, r)` compile to GLSL again.**
  Since 0.194.0, `compile(expr, { to: 'glsl' })` declined them. A shader now
  gives the value of the interpreter within single-float precision, for an
  integer and for a non-integer `n`:

  ```ts
  ce.declare('n', 'real');
  compile(ce.box(['HarmonicNumber', 'n', 2]), { to: 'glsl' }).code;
  // ➔ "_gpu_ir_harmonic2(n, 2.0)" (0.194.3: declined)
  ```

  As on JavaScript, a negative integer `n` is +∞ (a pole) and a value that is
  not real is `NaN`. The shader also gives `NaN` where single floats cannot hold
  the digits of the value, such as next to the zero of `HarmonicNumber(n)`
  between two negative integers (`HarmonicNumber(-24.78)`) and for an `r` close
  to 1 with `n` above 256 (`HarmonicNumber(300, 1.001)`).

- **`HarmonicNumber(n, +∞)` in compiled code gives the interpreter value.** It
  was `NaN` on JavaScript. It is now 1 for `n > 0`, 0 at `n = 0` and −∞ for
  `-1 < n < 0`: `HarmonicNumber(2, +∞)` is 1, `HarmonicNumber(-0.5, +∞)` is −∞.

- **`HurwitzZeta(s, a)` and `Zeta(s, a)` on GLSL are accurate for a negative
  `s`.** The shader of a negative `s` that is not an integer, and of an integer
  `s` below -14, was up to 2e-4 off (relative), as at `HurwitzZeta(-19.5, 1.6)`
  and `HurwitzZeta(-24, 1.3)`. It is now within 2e-6 of the interpreter there.

- **`HurwitzZeta(s, a)` on GLSL gives `NaN` instead of a wrong value where its
  terms cancel at a negative `a`.** `HurwitzZeta(25, -1.5)` gave `3.96e-5`; the
  value is `1.126e-10`, the remainder of the terms ±2^25. The shader now gives
  `NaN` there.

- **`Characters`, `StringJoin` of a list and `ColorToString` compile again on
  JavaScript (CE-1548).** `Characters(s)` and `GraphemeClusters(s)` give the
  array of the characters of `s`, `StringJoin(L)` and `StringJoin(L, sep)` join
  an input `L: list<string>` (or `list<character>`), a literal list or
  `Characters(s)`, and `Length(Characters(s))` is the number of characters, each
  as the interpreter gives it. A list of strings compiles as an input that
  `StringJoin` reads, a literal, `Characters(s)` or the result; a read of its
  elements (`At`, `Map`, `Count`, `Sort`) declines when the list has a run-time
  length, and the interpreter answers it. `ColorToString(c)` and
  `ColorToString(c, format)` with a literal format give the interpreter's string
  for a colour constructor, a name whose value is one, a conversion of one to
  its own space (`AsRgb(Rgb(…))`) or a tuple of three numbers:
  `ColorToString(Rgb(0, x, 0.25))` at `x = 0.5` is `#008040`. Another colour
  (`ColorMix`, a conversion to another space, an `If`) declines: its compiled
  channels can print one unit off.

- **`Chunk` and `Partition` compile when their rows can have different lengths**
  (CE-1549). On the JavaScript target, `Chunk(L, k)` and `Partition(L, n)` of a
  list `L: list<real>` of run-time length, and `Partition(L, p)` of a predicate,
  compile again as the result of the program, as they did in 0.193.0:
  `Chunk(L, 2)` at `L = [1, 2, 3]` gives `[[1, 2], [3]]`. A consumer that
  reduces each row compiles too: `Map(r ↦ Sum(r), Chunk(L, k))`,
  `Length(Partition(L, n))`, `At(Partition(L, p), 1)`. The list must be an input
  or a literal list of numbers or booleans; a count known at run time throws a
  `RangeError` where the interpreter leaves the form unevaluated (a count below
  1, a count of `Chunk` above 10,000). Other uses of such rows, and `Chunk` of a
  computed list such as a `Range`, fall back to the interpreter. `Chunk` of a
  constant count above 10,000 now declines also when every row has one length,
  where the interpreter leaves it unevaluated.

- **A protocol function called under `.N()` receives its arguments exactly, as
  any function does.** With `D = (25! - 1)/24!` and an implementation that
  returns `Floor(k)`, `f(m, D).N()` gives `24`; it gave `25`, because the
  argument was approximated before the implementation saw it.

- **A compiled `AsHsv` or `AsHsl` of a name keeps the channels of its own
  space.** With `C = Hsv(270, 1, 0)`, the compiled `AsHsv(C)` gave `(0, 0, 0)`
  on JavaScript and GLSL: the colour went through OKLCh, which loses the hue and
  the saturation of a black or a grey. It now gives `(270, 1, 0)`, as the
  interpreter, also for a value with a channel that is an input (`Hsv(y, 1, 0)`)
  and for `AsHsv(AsHsv(c))`. A conversion of a colour that can be of the same
  space at run time but is not known at compile time declines, so the
  interpreter answers it: an `If` or a `Which` of colours
  (`AsHsv(If(x > 0, Hsv(270, 1, 0), Rgb(1, 0, 0)))`), a call of a user function,
  and `ContrastingColor` of three colours. A list of colours
  (`AsHsv(List(Hsv(270, 1, 0), C))`) converts each element by the same rule.

### Performance

- **A bound of a `Range` is evaluated once per evaluation** (CE-1510). An
  operator applied to a `Range` whose bound is computed, such as
  `1 + Range(1, Length(C))` or `Sin(Map(j ↦ C[j], Range(1, Length(C))))`,
  evaluated the bound, and thus `C`, at each read of the length of the range:
  about fifty times for one `evaluate()`, whatever the length of `C`. It is now
  evaluated twice (once exactly, once numerically). An impure bound
  (`Range(1, RandomInteger(1, 5))`) is still evaluated at each read.

## 0.194.3 _2026-11-19_

### New Features

- **A debug run of `executeEpsilAsync()` keeps its time limit** (CE-1545). The
  limit counts running time only: the time while the promise that a debug hook
  returned is pending does not count against a `withTimeLimit()` span around the
  run or against `statementTimeLimitMs`. In 0.194.2 the limit kept running
  during a pause, so a debugged run had none. A pause of any length now does not
  end the run, and an endless loop still ends with a timeout:

  ```ts
  const sleep = (ms) => new Promise((resume) => setTimeout(resume, ms));
  let run;
  ce.withTimeLimit(300, () => {
    run = executeEpsilAsync(ce, "let a = 1\na + 41", {
      debug: { beforeStatement: () => sleep(600) },
    });
  });
  (await run).value; // ➔ 42 (0.194.2: Error("Timeout exceeded (0ms)", "timeout"))
  ```

  A watch that runs in `at.inScope()` during a pause is running time, and pauses
  that overlap count once. The paused time belongs to the run: a pause does not
  extend the time limit of other work, on the same engine or on another.

- **`epsilCompletions()` gives the completion items at an offset of an Epsil
  source.** The items are the likely values of the type expected at the offset,
  the names of the source visible there (with their type or signature), the
  standard-library names (with their signature and the first line of their
  description) and the keywords valid at the position. After `:` in a
  declaration or a parameter, the items are the type names. Each item has a
  `kind` and a `rank`, and the items come sorted, best first:

  ```ts
  epsilCompletions(ce, "let count: integer = 10\nlet a: integer = co", 43);
  // ➔ { range: [41, 43], expectedType: "integer",
  //     items: [{ label: "count", kind: "variable", detail: "integer", rank: 2 },
  //             { label: "countIf", kind: "library-function", rank: 3, … }, …] }
  ```

  The Epsil extension for VS Code offers the same items as completions. Each
  library item also has a `description`: the paragraphs that the hover of the
  name shows.

- **`epsilSignatureHelp()` gives the signatures of the call at an offset of an
  Epsil source** (CE-1541), also in a call that is not closed yet. Each
  signature has a label and the range of each parameter in it, and the result
  marks the parameter of the argument at the offset. A named argument marks the
  parameter of that name. A library function whose signature is an overload set
  has one signature per arm.

  ```ts
  epsilSignatureHelp(ce, "function f(x: real, n: integer = 2) { x }\nf(1, ", 47);
  // ➔ { callee: "f", activeSignature: 0, activeParameter: 1,
  //     signatures: [{ label: "f(x: real, n: integer?)", parameters: [
  //       { name: "x", type: "real", range: [2, 9] },
  //       { name: "n", type: "integer", range: [11, 22] }] }] }
  ```

  The Epsil extension for VS Code offers the same signature help.

- **A debug hook of `executeEpsilAsync()` gives the call depth of the
  statement** (CE-1544): `at.callDepth` is the number of function calls in
  progress, 0 at the top level. Compare call depths to step over or out of a
  call. `at.depth` counts every evaluation context, and an `if` branch or a loop
  body adds one without a call, so a step over based on `depth`, as the
  documentation said before, skipped the statements of a branch.

### Resolved Issues

- **A function of two matrices keeps the order of its products** (CE-1490,
  CE-1491, CE-1494). The commutator `a·b − b·a` gave the zero matrix for two
  matrices that do not commute in three cases: the parameters annotated
  `expression`, a literal with untyped parameters assigned to a name declared
  `(matrix, matrix) -> matrix` or `(expression, expression) -> expression` (or
  given as the `evaluate` of such a declaration), and a body whose products read
  the parameters through another operator (`Transpose(a)·Transpose(b)`) before a
  later use made them matrices (`Determinant(a)`). Each case now gives the
  matrix product in the written order:

  ```ts
  ce.declare('g', '(matrix, matrix) -> matrix');
  ce.assign('g', ['Function', ['Subtract', ['Multiply', 'a', 'b'], ['Multiply', 'b', 'a']], 'a', 'b']);
  ce.box(['g', [[1, 2], [3, 4]], [[0, 1], [1, 0]]]).evaluate();
  // ➔ [[-1, -3], [3, 1]]  (0.194.2: [[0, 0], [0, 0]])
  ```

  A product of untyped names with no matrix use is still a product of numbers
  (CE-1317).

- **The type of a call with a function argument at a value parameter holds its
  value** (CE-1452). With `f := (a, b) ↦ a[b + [1, 2, 3]]` and `j` a list of
  integers, `f(j, N)` (`N` is the library function) was typed `integer`; its
  value is a list. It is now typed `unknown`, the result of the signature. A
  function passed through (`g ↦ g`) keeps its type.

- **The functions of a complex number and the zeta family compile to GLSL
  again** (CE-1534). Since 0.194.0, a shader of `Csc(Sec(x + iy))` (a domain
  colouring) declined ("Sec (the operation csec) on glsl"), in the strict and in
  the complex mode. `Sec`, `Csc`, `Sech`, `Csch`, `Coth`, the inverse
  trigonometric and hyperbolic functions (`Arcsin`, `Arccos`, `Arctan`,
  `Arsinh`, `Arcosh`, `Artanh`, `Arccsc`, `Arcsec`, `Arsech`, `Arcoth`), `Log`
  and `Root` of a complex number now compile on `glsl`, and so do `PolyGamma`,
  `HurwitzZeta`, `Zeta(s, a)`, `LerchPhi` and `PolyLog` of real numbers
  (`Zeta(s, a)` on `javascript`: CE-1533). The shader of `Tan(z)` and `Tanh(z)`
  of a complex `z` gave an infinity next to a pole, such as
  `Tan(π/2 - 0.0001 + 0.0001i)`, where the value is about `5000 + 5000i`
  (CE-1506); it now gives that value. `Arccot` and `Arcsch` of a complex number
  still decline on `glsl`.

- **Operators that compiled in 0.193.0 compile again** (CE-1533). On JavaScript:
  `HarmonicNumber(n)` and `HarmonicNumber(n, r)`, the generalized `Zeta(s, a)`,
  the upper incomplete `Gamma(s, z)` (complex in `mode: 'complex'`), `Gamma`,
  `Sign` and `Norm` of a complex, `ND(f, x)` of a function literal, and
  `EvaluateAt(f, a)` and `EvaluateAt(f, a, b)` of a function literal of one
  parameter (also on GLSL and in the interval mode). In the interval mode,
  `Argument` of a real. Each gives the interpreter's value. A `Limit` compiles
  when it reads no input: it is its value at compile time
  (`Limit(t ↦ sin(t)/t, 0)` is `1`). A `Limit` at a point or of a body that
  reads an input still declines: the interpreter computes a symbolic limit at
  each point first, and the numeric limit of 0.193.0 gave `NaN` at a jump near
  the point (CE-1232).

- **List operations compile to JavaScript again** (CE-1531). 0.193.0 compiled
  them, and 0.194.0 declined them: `Append`, `DeleteAt`, `Insert`, `Slice`,
  `Linspace`, `TakeWhile`, `DropWhile`, `FlatMap`, `Scan`, `Tabulate` (and
  `Table`), `Reduce` by a function literal from an initial value, `Element` of a
  list, `Identity`, `CountIf`, `Find`, `IndexWhere`, `Position`, `RandomSample`,
  `ApplyWhole`, and `StartsWith`, `EndsWith` and `ContainsSequence` of lists. A
  real count of `Take` and `Drop` is rounded, as the interpreter rounds it.
  `Chunk` and `Partition` compile when every chunk has the same length (a list
  of a stated length that the chunks divide, or the windows of
  `Partition(L, n, step)`); a result whose chunks can have different lengths
  still declines. Each compiled value is the interpreter's; where the
  interpreter gives no list (an index out of range), the compiled code throws.

- **Matrix operators compile to JavaScript again** (CE-1529). 0.193.0 compiled
  them and 0.194.0 declined them. `Matrix`, `Vector`, `Transpose`,
  `ConjugateTranspose`, `Trace`, `Diagonal`, `Determinant`, `Inverse`,
  `MatrixPower` (also `A^2` of a matrix `A`), `MatrixMultiply`, `RowReduce`,
  `Rank`, `Shape`, `Flatten`, `Reshape` and `Cross` compile for a matrix whose
  rows have a stated length, such as an input declared `matrix<real^3x3>` or
  `list<list<real^2>>`, or a literal. `Cross` of two 3-tuples or two lists of
  three numbers also compiles to GLSL and to `interval-js`. The values are the
  interpreter's numeric values (`.N()`); `Inverse` of a singular matrix is a
  matrix of `NaN`. An input declared `list<list<real>>`, whose rows can have
  different lengths, is still refused, and so are a matrix that must be square
  and is not, a `MatrixPower` by a real exponent, and a `Transpose` of a matrix
  whose number of rows is known only at run time.

- **The sum, the difference and the power of lists of points compile again**
  (CE-1537, CE-1539). Since 0.194.0, with `P, Q: list<tuple<real, real>>`,
  `compile()` declined `P + Q` and `P - Q` ("lists of different lengths or
  ranks") and `P^2` ("Power of a matrix"), so these were computed by the
  interpreter. They compile to JavaScript and `interval-js`, point by point,
  with the interpreter's value; as for two `list<real>`, two lists of different
  lengths give an unspecified value. The power of a matrix is the matrix power
  on JavaScript (CE-1529) and declines on `interval-js`, which gave the power of
  each element of a matrix input (`A^2` at `[[1, 2], [3, 4]]` was
  `[[1, 4], [9, 16]]`, where the interpreter gives the matrix power
  `[[7, 10], [15, 22]]`).

- **A list of points compiles to GLSL again** (CE-1538). A list of points of a
  constant length, such as `[R(x, y), R(x + 1, y), R(x, y + 1)]` where `R`
  returns a point, is an array of vectors in GLSL (`vec2[3](…)`), as in 0.193.0.
  Since 0.194.0, such a list as the result of an expression, a local or the arm
  of a conditional declined with "a list of rank 2 on glsl". An input declared a
  list of points of a stated length (`list<tuple<real, real>^3>`) is a `vec2[3]`
  uniform again. A list of rows of 2 to 4 numbers, such as a matrix of 2
  columns, is also an array of vectors, one per row: a `matrix<real^(3x2)>`
  input is a `vec2[3]` uniform of its rows, not the column-major `mat3x2`
  uniform of 0.193.0.

- **The colour operators compile to JavaScript and to GLSL again** (CE-1535).
  They compiled in 0.193.0 and declined in 0.194.0. On JavaScript, `Color` of a
  string literal, `ColorContrast`, `ColorDelta`, `ContrastingColor`, `GamutMap`,
  `ColorToColorspace` and `Colormap` give the interpreter's value; on GLSL,
  `ColorMix`, `ColorContrast`, `ColorDelta`, `ContrastingColor`, `GamutMap`,
  `ColorToColorspace`, `Color`, and `AsHsv` and `AsHsl` as the result of the
  program compile. A colour space, a gamut or a palette must be a string
  literal.

  `Colormap(name, t)` is a list of colours when `t` is an integer of 2 or more,
  so it compiles only when the type of `t` is a range below 2:

  ```ts
  ce.declare("t", "real<0..1>");
  compile(ce.box(["Colormap", "'viridis'", "t"])).run({ t: 0.3 });
  // ➔ { space: "oklch", c0: 0.4777…, c1: 0.0883…, c2: 251.35…, alpha: undefined }
  ```

  `ColorToString` still declines: its value is a string.

- **Text operators compile again on JavaScript.** Since 0.194.0, `compile()`
  declined a string input, a string literal and every text operator, so
  `ToUpperCase(s)` or `PadStart(s, n, "0")` ran on the interpreter. A scalar
  string now compiles on the `javascript` target, with the interpreter's value:
  `Length` of a string, `ToUpperCase`, `ToLowerCase`, `CaseFold`, `Trim`,
  `TrimStart`, `TrimEnd`, `StringRepeat`, `PadStart`, `PadEnd`, `StringReplace`
  (also of a literal `RegExp`), `StartsWith`, `EndsWith`, `StringCompare`,
  `String` of strings and `StringJoin` of a string. A string input is read as
  the engine reads one (NFC, a lone surrogate replaced with U+FFFD), and a value
  that is not a string throws a `TypeError`. A count or a pad that the
  interpreter answers with an error value throws a `RangeError`. Such code
  reports `strings: true` and `shippable: false`, and `broadcast()`,
  `broadcastAsync()` and the batch loaders of the runtime throw for it. `String`
  of a number still declines: its text follows the formatting options of the
  engine. Lists of strings, `Characters`, `GraphemeClusters`, `StringJoin` of a
  list, and `At` and `Equal` of strings still decline, as do strings on `glsl`,
  `interval-js` and in the `bigint` mode.

- **A sum of inexact imaginary numbers that cancel is `0`** (CE-1326).
  `2.5i - 2.5i` threw a `TypeError` when it was evaluated. Imaginary numbers
  that cancel leave no term, as in `x + 2.5i - 2.5i`, which is `x`, so the sum
  is now `0`.

- **The numeric value of an integral of a peak that underflows next to a bound
  is no longer 0** (CE-1312). The value of `∫₀^{10⁷} x²⁵·e⁻ˣ dx`, by `N()` and
  in compiled code, was `0`; it is now `25! ≈ 1.551121e25`. When the integrand
  is 0 at the nodes next to a bound of the integral, the quadrature now reads it
  at each probe between them and the bound.

- **`HurwitzZeta(s, a)` and `Zeta(s, a)` end at a very large order `s`**
  (CE-1228). `ce.box(['HurwitzZeta', 1e300, 2]).N()` did not end, and now gives
  `0`, the value 2^(−10³⁰⁰) + 3^(−10³⁰⁰) + … rounded; at `a = 1` the value is
  `1`. A compiled `HurwitzZeta(x, y)` at that point did not end either, and now
  returns `0`.

- **`Reduce` at machine precision keeps a value that underflows the double
  range** (CE-1435). `Reduce([10^-200, 10^-200, 10^300], Multiply).N()` gave
  `0`, and so did `Reduce([10^-400, 10^300], Multiply).N()` with
  `ce.jit = 'off'` or when an element is not real; they give `1e-100`, the value
  of the plain `Multiply`. A pure fold at machine precision whose value is 0 is
  computed again exactly, unless its seed and its elements are integers and its
  reducer is `Add`, `Subtract`, `Multiply`, or a function that applies only
  these operators and `Negate` to its parameters and to integers.

- **A product of zero, another number and a list is a list of zeros** (CE-1504).
  `0·2·[2, 4, 8]` gave the number `0`, while `0·[2, 4, 8]` gives `[0, 0, 0]`; it
  now gives `[0, 0, 0]` too. The same holds for a tuple (`0·2·(1, 2)` is
  `(0, 0)`) and with a NaN or infinite factor (`0·2·NaN·[1, 2]` is
  `[NaN, NaN]`).

- **`Mandelbrot` and `Julia` compile again on JavaScript and GLSL.** Since
  0.194.0, `compile()` declined them ("the operator Mandelbrot is not supported
  by the compiler"), so a field such as `Mandelbrot(x + y·i, 256)` was computed
  by the interpreter, point by point. The compiled value is the interpreter's,
  and NaN where the interpreter leaves the call unevaluated (a point that is not
  finite, a count that is not positive). The `interval-js` target still declines
  them: it has no complex numbers.
- **An expression that reads a seeded random list compiles again.** With
  `a := WithRandomSeed(7, RandomChoice([0, 1), 3))`, compiling `x + Min(a)`
  declined since 0.194.0 ("the value of a, which has an effect"). Draws over
  literals under a number as the seed are the same at every evaluation, so the
  compiled code now holds their values, the interpreter's, on `javascript` and
  `glsl`. A seeded value that reads a variable or calls a user function still
  declines.
- **The `iterationBudget` of `compile()` stops a loop of more than 2^32
  passes.** On the `javascript` target, such a loop threw a `RangeError` ("a
  loop of more than 2^32 iterations") before its first pass, where the budget
  throws a `CancellationError` with the cause `iteration-limit-exceeded`. A
  budget below 2^32 now throws its cancellation for every loop past it.

## 0.194.2 _2026-11-19_

### Breaking Changes

- **`assume()` and `forget()` leave static types unchanged.** If `x` is declared
  `real`, assuming that it belongs to the integers makes
  `ce.verify(["Element", "x", "Integers"])` return `true`. The type of `x` and
  the type of `x + 1` remain `real`. Code that read `.type` to test an
  assumption should query the predicate with `ce.verify()`. Use
  `ce.declare("x", "integer")` when an integer is required by the static
  contract. The square root of a declared strictly positive finite real now
  retains that positive bound in its result type.

### New Features

- **`executeEpsilAsync()` accepts debug hooks, so a debugger can pause an Epsil
  program in a browser.** The `debug` option takes `beforeStatement(at)` and
  `afterStatement(at, value)` (`EpsilDebugHooks`). They are called for each
  top-level statement and each statement of a function body, a loop body, an
  `if` branch or a `do` block. When a hook returns a promise, the run waits
  until it settles. `at.range` locates the statement in the source, `at.depth`
  serves to step over or out of a call, and `at.inScope(fn)` reads the variables
  of the paused statement:

  ```ts
  await executeEpsilAsync(ce, "function f(n) {\n  let a = n * 2\n  a + 1\n}\nf(20)", {
    debug: {
      beforeStatement: async (at) => {
        // at the statement `a + 1`:
        at.inScope(() => ce.box("a").evaluate()); // ➔ 40
        await resumed; // the run waits here
      },
    },
  });
  ```

  A hook that throws ends the run. A statement of a function that a lazy
  collection applies (a function given to `map` or `filter`), or that is called
  in the domain of a `for`, calls no hook. The passes of a `parallel for` call
  the hooks and run in order. A time limit keeps running while the run waits, so
  a debugged run has none.

- **`compile()` uses the range of the declared type of an input** (CE-1505).
  With `k: real<0..5>` and `x: real<1..9>`, `Abs(k)` compiles to `k`; in
  `mode: 'complex'`, `Sqrt(k)` is the real square root instead of complex
  arithmetic; and on GLSL, `Ln(x)` is the builtin `log(x)` with no domain guard.
  A value outside the declared range gives an unspecified result (`Abs(k)` at
  `k = -2` gives -2). An assumption (`assume(k >= 0)`) does not change a type,
  so it does not change the code.

### Resolved Issues

- **Assigning a caller of three mutually recursive functions completes**
  (CE-1515). The provisional signature shortcut applies only to functions that
  call themselves directly.

- **`runAsync()` runs a `parallel for` on the engine's worker pool again**
  (CE-1462). 0.193.0 did, and 0.194.0 ran every such loop on one thread. A loop
  whose passes only add to numbers (`s += e`) and to the elements of a list
  declared outside it (`L[i] += e`), and read neither otherwise, at a statement
  of the program or of a function it calls outside a callback or a
  comprehension, is split into one sub-range of passes per worker of
  `ce.workers`; the calling thread adds the partial sums in the order of the
  sub-ranges. Integer accumulators give the value of `run()`; real ones can
  differ by the grouping of the sum. Every other loop runs in order, and `run()`
  does not change. `onLoop` reports the route of each run (`route: 'pool'` or
  `'calling-thread'` with a reason, now also `'step-budget'` inside
  `ce.withStepBudget()`), and `willParallelize(passes?, minPasses?)` answers
  whether a loop would go to the pool. A worker stops at the deadline of the
  frame current at the call of `runAsync()` (`ce.withTimeLimit()`), which
  rejects the promise with that frame's `CancellationError`; an error of a pass
  is the error that `run()` gives. The buddhabrot step of 1,200,000 orbits runs
  in about 16 ms on 8 workers, against 127 ms with `run()` (0.193.0: 41 ms on 8
  workers).

- **Writing a sum, a product, a quotient or a sine of a list whose length is
  computed from another list no longer computes that other list** (CE-1364).
  `ce.box(["Add", 1, ["Range", 1, ["Length", "C"]]])` evaluated the value of `C`
  five times, and `Sin` of a `Map` over that `Range` ten times, before anything
  was evaluated; a list built by a long recursion froze the document when the
  expression was created. Boxing now evaluates `C` no times. The values are
  unchanged.

- **The elements of a `Map` whose function holds a sum or a product over its own
  index are numbers again** (CE-1316).
  `Max(Map(j ↦ Sum(k, Limits(k, 1, 3)), [10, 20]))` evaluated to `Max(3k, 3k)`
  and `Min(Map(j ↦ Product(k, Limits(k, 1, 3)), [10, 20]))` to `Min(k^3, k^3)`:
  the index `k` was read as a free name. They now evaluate to `6`, as the direct
  application `(j ↦ Sum(k, Limits(k, 1, 3)))(10)` does. The `Map` itself
  evaluated to `[3k, 3k]` and is now `[6, 6]`.

- **A call of a function over a value that may be a number, a point or a list
  has the same type as a call over a value of unknown type** (CE-545). With
  `T(a) := a + 1` and `y` declared
  `number | tuple | list<number | tuple | list<any>>` (the type of `2h(1)` when
  `h` returns `unknown`), `T(y)` was typed `any`, while `T(h(1))` was typed
  `number | tuple | list<number | tuple | list<any>>`. Both are now typed
  `number | tuple | list<number | tuple | list<any>>`.

- **`compile()` compiles `ColorMix` on JavaScript and `Cot` of a complex
  argument on GLSL again** (CE-1468). Both compiled in 0.193.0 and declined in
  0.194.0. `AsOklab(ColorMix(Rgb(1, 0, 0), Rgb(0, 0, 1), x))` at x = 0.25 gives
  the interpreter's `Oklab(0.58397, 0.27139, -0.00977)`: the mix is in OKLCh,
  the ratio is clamped into [0, 1], and `ColorMix(a, b)` mixes at 0.5.
  `ColorMix` still declines on GLSL. On GLSL, `Cot(z)` of a complex `z` is the
  helper `_gpu_ir_ccot`. `LambertW` still declines on GLSL and in the interval
  mode.

- **`compile()` compiles a `Sum` or a `Product` whose terms are lists**
  (CE-1470). With `X: list<real>`, `Sum(X + i, Limits(i, 1, 3))` declined ("a
  list where a scalar is required") and now gives `[6.75, 7.5]` at
  `X = [0.25, 0.5]`, as the interpreter does: the terms are added element by
  element. So does a count per element of a list,
  `Sum(Which(C = U[i], i, True, 0), Limits(i, 1, 20))`. This works on JavaScript
  and in the interval mode, and on GLSL for lists of a stated length. Two cases
  still decline. The first is a term whose length is computed in each term
  (`Sum(Range(1, i), …)`). The second is a sum over bounds that are not
  constants (`Limits(i, 1, N)`) when the type of the sum states no length: at
  `N = 0` the interpreter gives the number `0`, not a list. With
  `L: list<real^2>`, `Sum(L + i, Limits(i, 1, N))` compiles and gives `[0, 0]`
  at `N = 0`.

- **A lazy list that a function returns, made from a lazy argument, has a
  length** (CE-1368). With `clean(l) := Map(i ↦ l[i], Range(1, Length(l)))` and
  `R(p, q) := clean([p[k] + q for k in 1..Length(p)])`,
  `ListFrom(R([10, 20, 30], 1))`, `Sum(…)`, `Length(…)` and `At(…, 2)` stayed
  unevaluated, though the elements could be listed one by one. They now give
  `[11, 21, 31]`, 63, 3 and 21: the bound of the `Range` reads `p` and `q` in
  the call of `R` that made the comprehension, where they have values. A name
  with no value there still leaves the length unknown.

- **`compile()` compiles an exact fraction of an expression boxed without the
  canonical form again** (CE-1499). With `x: real`,
  `ce.expr(['Add', 'x', ['Rational', 1, 256]], { form: 'structural' })` declined
  in 0.194.0 on every target ("the operator Rational is not supported by the
  compiler"); 0.193.0 compiled it on JavaScript and GLSL. `Rational(p, q)` of
  two exact integer literals is now the number `p/q`, as in the canonical form:
  at x = 1 the code gives 1.00390625 on JavaScript, as the interpreter does,
  `x + 0.00390625` on GLSL, and it compiles in the interval mode too.
  `Floor(Rational(1, 49)·x)` at 49 gives 1, as the canonical form does.

- **A recursive function whose result wraps the result of its recursive call no
  longer gets slower at each read** (CE-1501). With `P` declared
  `(unknown, unknown) -> unknown` and
  `P(n, x) := If(n = 0, x, Length(n) + P(n − 1, x))`, each read of the type of
  `P(1, 2)` gave one more level of `broadcastable<…>`, and the fourth read took
  about 15 s. A new derivation of the signature no longer replaces the earlier
  one with an equivalent type written differently: the type is now
  `broadcastable<any>` at every read, and a read takes constant time. The values
  do not change.

- **`compile()` compiles a call of a function of an input inside a function
  whose parameter has the name of that input again** (CE-1502). With
  `x, y: real`, `k(v) := v + x` and `u(x, y) := k(0)^2 + y^2`, `u(x, y)`
  declined in 0.194.1 ("a call of k, which reads the input x, where x is a local
  or a parameter"). At x = 10, y = 2 it now gives 104 on JavaScript and in the
  interval mode, as the interpreter does: `k` reads the input `x`, not the
  parameter `x` of `u`. GLSL compiles it too. The same holds through a chain of
  such functions (`h(x) := k(x)` called in `n(x) := x·h(x)`).
- **`compile()` compiles a colour conversion of a tuple of three numbers.**
  `AsOklab((1, 0, 0))`, `AsRgb((r, g, b))` and the other `As…` conversions read
  the tuple as the sRGB colour of its channels, as the interpreter does, on
  JavaScript and GLSL (`AsHsl` and `AsHsv` on JavaScript only). Before, they
  declined ("AsOklab of a tuple: its value on a tuple is not its value on a
  list"). A tuple of four numbers (with an alpha) still declines.

## 0.194.1 _2026-11-19_

### New Features

- **On JavaScript, `compile()` compiles a list local that its block changes
  element by element, `AddTo`, the parallel assignment and `parallel for`**
  (CE-1462). Before, each of these declined and the interpreter ran the program:
  - `let L = H; L[c] += 1` and `L = replaceAt(L, i, v)` write the element of the
    list in place. The declaration copies the value, so the input `H` is not
    changed. A negative index counts from the end; an index that is 0, not an
    integer or out of range throws `out-of-range` when the code runs, where the
    interpreter gives an error. Another read of the list (`let M = L`, `f(L)`)
    reads a copy of it at that point. A list local read in a function literal
    (`map(x => L[x], [1, 2])`), and a written value of another type (a complex
    number in a list of reals), decline.
  - `s += e` (`AddTo(s, e)`) is `s = s + e`, and `(a, b) := (b, a + b)` computes
    both values before it writes either name, on every target that compiles an
    assignment.
  - `parallel for k in 1..n { … }` (`ParallelLoop`) runs its passes in order, on
    one thread, with the interpreter's values. It declines when its body assigns
    a variable declared outside it other than with `+=`, when it has a `break`
    or a `continue` of its own, and when the program draws a random number or
    sets a random seed. `runAsync()` still runs the code on one thread.

  A step that counts 1,200,000 escape-time orbits into a list of 90,001 cells
  compiles and runs in about 130 ms; the interpreter took more than 30 s.

### Resolved Issues

- **`compile()` binds an argument at a typed parameter of a function literal
  when its type does not prove the parameter's** (CE-1485, CE-1498). With `a`
  declared `real | signed_infinity | nan`, `Apply((p: real) ↦ 2p, a)` declined
  in 0.194.0 ("an argument of Apply that is not real"); it now gives 6 at a = 3,
  as the interpreter does. A local of no stated type (of the type `number`) at
  an `integer` parameter binds the same way, so Tycho's Othello action compiles.
  The interpreter checks the value at the call; compiled code does not: an
  argument value outside its parameter's declared type gives an unspecified
  result, a new caveat of compiled code (`docs/COMPILATION-MODEL.md`). A complex
  argument at a real parameter still declines.

- **A compiled expression boxed in a scope reads the names of that scope**
  (CE-1500). With `a = 1` in the document, `a = 10` in a scope `s`, and
  `ce.expr(['Add', ['PointX', 'P'], 'a'], { scope: s })` with `P = (3, 4)`, the
  compiled code returned 4, where `evaluate()` gives 13; 0.193.0 compiled 13.
  The same held for a binder boxed in the scope (`Sum(a·k)` gave 6, not 60).
  `compile()` took the scope of the boxing, which `ce.expr()` gives to some
  nodes of the expression, for a scope of the expression itself, and read the
  names from the current scope. It now reads them from the scope of the boxing,
  and gives the interpreter's value.

- **`compile()` compiles a call of a function declared
  `(unknown, unknown) -> unknown` whose body is a `Dot`** (CE-1497). With
  `p := (a, b) ↦ (cos a, sin a)` and `d := (u, v) ↦ Dot(p(u, v), (u, v))`, `d`
  declared `(unknown, unknown) -> unknown`, compiling `d(x, y)` declined in
  0.194.0 ("the result of d is not a scalar (value)"), and compiled in 0.193.0.
  The assignment narrows the declared result to `value`, the type of the body;
  the compiler now takes the result of such a function from its lowered body, as
  for a result of no stated type, and gives the interpreter's value
  (0.40480902940221763 at x = 0.3, y = 0.4).

- **`compile()` compiles a loop over a list of tuples of tuples** (CE-1488).
  `for gap in [(OuterCircle, RightCircle, TopCircle), …] { … gap[1] … }`, each
  gap a tuple of three circles and each circle a tuple of three numbers,
  declined in 0.194.0 ("a tuple of tuples"), and compiled in 0.193.0. On
  JavaScript, a loop over a literal list of tuples of one length now compiles
  when the body reads the element at a constant index (`gap[1]`, `gap[-1]`) or
  binds it to a pattern (`for (p, q, r) in …`), and gives the interpreter's
  value. Another read of the element, such as `Length(gap)` or `f(gap)`,
  declines. The loop over the gaps of the Apollonian gasket showcase now
  compiles.

- **A parameter read at one index and passed to a function that reads more
  indices takes the longer tuple** (CE-1489). With
  `function touches(p, q) { … p[1] … p[3] … }` and
  `function isNewCircle(p, c) { 1 / c[1] >= 0.008 && touches(c, p) }`, the
  parameter `c` was typed `tuple<number>` from the read `c[1]`, and compiling a
  call of `isNewCircle` declined ("c: an argument of touches that is not
  tuple\<real, real, real>"). With the call written before the read, `c` was
  typed `tuple<number, number, number>`. `c` is now that tuple in either order.
  As for every type that index reads give, the length is not a contract: the
  interpreter still accepts a longer tuple or a list. The circles of the
  Apollonian gasket showcase (`fillGap`) now compile.

- **`compile()` treats an integer to a literal power as an integer** (CE-1484).
  With `n: integer`, `g(c: integer) -> integer { c % 7 }` and `g(n^2)`, the
  compilation declined ("an argument of g that is not integer"): `n^2` was a
  real in compiled code, where the interpreter types it `integer<0..>`. A power
  of an integer by a literal integer exponent of 1 or more is now an integer in
  compiled code, the exact product (`n^5` is `(n·n)·(n·n)·n`), on JavaScript and
  GLSL, so `g(n^2)` at `n = 6` is 1, as the interpreter gives. A value of 2^53
  or more (2^24 on GLSL) is rounded, as a product of integers is. A power by an
  exponent that is not a literal (`n^m`) stays real: it is a rational at
  `m < 0`. The starting state of the Turing patterns showcase (`seedState()`,
  `let CellCount = N^2`) now compiles.

- **`compile()` compiles a `Loop` with no `Element` clause again** (CE-1486).
  `Block(k := 0, Loop(Block(k := k + 1, If(3 < k, Break()))), k + x)` declined
  in 0.194.0 ("a Loop with no Element clause"). On JavaScript it now gives 5 at
  `x = 1`, as the interpreter does: a `Break` ends the loop, and a `Continue`
  skips the rest of a pass. With the `iterationBudget` option, each pass counts,
  and a loop with no `Break`, such as `Loop(k := k + 1)`, throws a
  `CancellationError` with the cause `iteration-limit-exceeded` at the end of
  the budget. Without the option the loop has no count, as in 0.193.0. GLSL and
  the interval mode still decline such a loop.

- **`compile()` compiles a list local that is written in place and also read
  whole** (CE-1485). With `H: list<integer>`, the step
  `let L = H; L[1] += n; let M = L; L[1] += 1; M` declined ("the list local L,
  written in place, read other than by At or Length (an alias)"), as did a list
  local passed to a function literal, summed, mapped over, or returned in a
  tuple. On JavaScript such a read now reads a copy of the list at that point,
  so `M` above is `[H[1] + n, …]`, the interpreter's value, and a later write
  does not change it. A block whose value is such a local in a tuple (`(L, s)`)
  compiles too, and so does the copying form of Tycho's buddhabrot step, which
  ends in `replaceAt(L, N, r + n)` (CE-1487). A list local read in a function
  literal still declines: the function can run after a later write. The action
  body of Tycho's Othello showcase still declines at a later rule: it passes a
  local of no stated type (a `number`) to a parameter declared `integer`.

- **`compile()` compiles `ReplaceAt` used as a value** (CE-1487). With
  `H: list<real>`, `ReplaceAt(H, 1, 5)` declined ("the operator ReplaceAt is not
  supported by the compiler"). It now gives `[5, 2, 3]` at `H = [1, 2, 3]`, as
  the interpreter does, and `H` is not changed. A negative index counts from the
  end. On JavaScript an index known only when the code runs that is 0, out of
  range or not an integer throws `out-of-range`, where the interpreter leaves
  `ReplaceAt` unevaluated or gives an error; a constant index 0 or not an
  integer declines, and so does one out of a stated length. The interval mode
  and GLSL compile a constant index of a list of a stated length.

- **`compile()` compiles a list that a program builds again in each pass of a
  loop** (CE-1481). A local holding a list that the program replaces as a whole,
  `L = value`, declined in 0.194.0 ("a write to a constant (the interpreter
  refuses it) or to a list local other than ReplaceAt or AddTo of an element"),
  and so did a local declared a list of tuples. On JavaScript,
  `let L = [1]; for k in 1..n { L = [...L, k] }` now gives `[1, 1, 2, 3]` at
  `n = 3`, as the interpreter does: the length of the list can change at each
  write, in a loop and in the arms of an `if`. The list can hold numbers,
  booleans or points (`let P: list<tuple<real, real>> = []`, then
  `P = [...P, (k, k/2)]`), and can be passed to a function that rebuilds it
  (`L = f(L)`), also a recursive one. A local written both whole and in place
  (`L[1] = 5`), a value of another type, and an empty list of no stated type
  still decline, and so does every such list on GLSL and in the interval mode.

- **`compile()` compiles a function of a point called with a list of points
  again** (CE-1477). With `P: list<tuple<real, real>>` and `f` declared
  `(tuple<number, number>) -> tuple<number, number>`,
  `f := p ↦ (p[1] + 1, p[2])`, `f(P)` declined in 0.194.0 ("a list argument of f
  that the parameter 1, a list or a point, would take whole"). It now gives
  `[(2, 2), (4, 4)]` at `P = [(1, 2), (3, 4)]` on JavaScript and in the interval
  mode, as the interpreter does: the function is called once per point. Two
  lists of points of one length, or a list of points and a list of numbers of
  its length, are zipped; a point or a number beside them is passed to each
  call. On GLSL, a function with a number result compiles over a `PointList` or
  a literal list of points of a constant length. Lists of different lengths,
  lists whose lengths are known only when the code runs and are not the same
  value, an argument of type `unknown` beside a list of points (its shape is not
  settled), and a function whose result is a list still decline. A function of
  numbers called with a list of numbers can now also return a point: `g(L)` with
  `g := u ↦ (u, 2u)` is `[(1, 2), (2, 4)]` at `L = [1, 2]`.

- **On JavaScript, the compiled code of a chain of functions grows with the call
  counts, not their product** (CE-1475). With `f(a) := Sin(a)`,
  `g(b) := f(b) + f(b + 1) + … + f(b + 4)` and
  `h(c) := g(c) + g(c + 1) + … + g(c + 4)`, the code of `h(x)` held 21
  `Math.sin(` sites and 761 characters in 0.194.0; it now holds 5 (the copies of
  `f` in `g`, which `h` calls) and 409 characters, with the same value. A chain
  of 10 functions, each calling the previous three times, went from 10,729
  characters to 1,455. A function that calls another function twice or more is
  no longer copied at its calls outside a loop; a call in a loop is still
  copied.

- **`compile()` compiles a call of a function of an input inside a sum whose
  index has the name of that input again** (CE-1479). With `x: real` and
  `k(v) := v + x`, `Sum(x + k(1), Limits(x, 1, 3))` declined in 0.194.0 ("a call
  of k, which reads the input x, where x is a local or a parameter"). At x = 10
  it now gives 39 on JavaScript and in the interval mode, as the interpreter
  does: `k` reads the input `x`, not the index of the sum. GLSL compiles it too.
  The same holds under a block local of that name. A call where a parameter of
  the calling function has that name still declines.

- **On GLSL, `compile()` compiles the distances to a short list of points
  again** (CE-1474). With `x, y: real`, `Abs(PointList(x - [1/2, 1], y))`
  declined on `glsl` in 0.194.0 ("the region build (a Map, a Filter or a
  Range)"), so the plot was drawn on the CPU. It is now the `vec2` of the two
  distances, `[0.728…, 0.990…]` at x = 0.3, y = 0.7, as in the interpreter;
  `Min(Abs(PointList(x - [1/2, 1], y, z + 2)))` compiles too. On GLSL, a
  `PointList` whose list components have a constant length of 1 to 64 is written
  out, a point per index, and on such a list of points, or a literal `List` of
  points, `Abs`, `PointX`, `PointY`, `PointZ`, the `Add` of a point, a
  `Distance` to a point, and a `Multiply` or a `Divide` by a list of numbers
  give the list of their values at each point. A list of points as the result,
  and a component of a run-time length, still decline on GLSL.

- **`compile()` compiles a list of integers that the program fills with reals**
  (CE-1480). `let points = [0.0 for j in 1..2*n]` followed by
  `points[2*k - 1] = x` with a real `x` declined since 0.194.0 with "a real
  value written to a list of integer elements" (`0.0` is the integer 0), so the
  preludes of Tycho's barnsley-fern, koch-snowflake and galton-board showcases,
  and the `grayscott` step of turing-patterns, ran on the interpreter. The
  interpreter widens the list to reals; the compiled code now holds the list as
  reals from its declaration, and gives the interpreter's values:
  `let L = [0, 0, 3]; L[1] += 0.5; L` is `[0.5, 0, 3]`. A list declared
  `list<integer>` still declines (the interpreter gives an `incompatible-type`
  error), and so does a complex number or a boolean written to a list of
  integers.

- **`compile()` binds a list of reals at a parameter `list<integer>` of a
  function literal or of a named function** (CE-1483).
  `Apply((H: list<integer>) ↦ H[1], L)` declined since 0.194.0 with "an argument
  of Apply that is not list\<integer>" when `L` is a list of reals, also of the
  type `list<nan | real | signed_infinity>` of a Tycho row, so the action of the
  buddhabrot showcase ran on the interpreter and passed its deadline. The
  interpreter binds the list whole and checks no element: at `L = [2.5, 3, 4]`
  both now give `2.5`, and the buddhabrot action compiles again (90,001 cells
  after 5,000 samples). A named function does the same: with
  `function g(H: list<integer>) -> real { H[1] }`, `g(L)` and `f(n) = g([n, 1])`
  at `n = 2.5` give `2.5`, as in the interpreter (they declined with "an
  argument of g that is not list\<integer>"); a call with a list of reals and a
  call with a list of integers call two versions of `g`. A tuple whose type does
  not prove the parameter's, and a real at a parameter `integer`, still decline:
  the interpreter gives an `incompatible-type` error. So does a function whose
  result is `integer`, declared or inferred
  (`function g(H: list<integer>) { H[1] }`), with a list of reals, where the
  interpreter gives `2.5`.

- **`compile()` compiles a list of the calls of a recursive function again**
  (CE-1472). With `r` declared `(real) -> real` and
  `r(k) := Which(k <= 0, 0, True, s + r(k - 1))`,
  `Comprehension(r(i), Element(i, Range(0, 5)))` declined in 0.194.0 with "a
  Comprehension with an effect", although `r` has no effect. On JavaScript it
  now gives `[0, 2, 4, 6, 8, 10]` at `s = 2`, as in the interpreter; so does a
  list of the points of a recursive point function
  (`Comprehension(P(i, P_0), Element(i, Range(0, 40)))`). A function that draws
  a random number still declines in a `Comprehension`, and so does a call of a
  function in a `Comprehension` of its own body.

- **`compile()` compiles `StandardDeviation` and `Variance` again** (CE-1473).
  `StandardDeviation(L)` declined with "the operator StandardDeviation is not
  supported by the compiler" since 0.194.0; at `L = [3, 1, 3]` it now gives
  `1.1547005383792515`, the numeric value of the interpreter's `2/3·√3`.
  `Variance`, `PopulationVariance` and `PopulationStandardDeviation` compile
  too, also of several operands (`Variance(x, L)`). The code computes the mean
  first, then the sum of the squares of the deviations from it, so data far from
  0 keeps its digits. An empty list, and a list of one element for a sample,
  give `NaN`, as in the interpreter. Complex elements and a distribution
  decline; GLSL compiles a list of a stated length only.

- **`compile()` compiles a call of a user function with a complex argument at a
  parameter of no stated type again** (CE-1476). With `x, y: real`, `f` declared
  `function` and `f(w) := w^2`, `Arg(f(x + i·y)) + f(x)` declined in 0.194.0
  ("an argument of f that is not real") in `mode: 'complex'`; at x = 0.5, y =
  0.3 it now gives 1.3308390005411683, as the interpreter does. A parameter of
  no stated type, or of type `unknown` or `number`, takes the lane of its
  argument: a call with a real argument calls a compiled function of a real
  parameter, and a call with a complex argument a function of a complex
  parameter, in `mode: 'complex'`, on JavaScript and on GLSL; the default
  (strict) mode declines a complex argument there ("an argument of f that is not
  real"), as in 0.194.0. A host that compiles a complex shader that calls such a
  function (a domain colouring of `f(z) + 1`) passes `mode: 'complex'` to a
  `glsl` compilation. A parameter declared `real` still declines a complex
  argument.

- **`compile()` compiles a `let` and a `for` loop that name the parts of a point
  again** (CE-1478). `let (a, b) = (1, 2); a + b` declined in 0.194.0 ("a
  declaration with no value, or with attributes"), and
  `for (p, q) in P1 { s = s + p * q }` over an input `P1` of type
  `list<tuple<real, real>>` declined with "a Loop index that is not a name".
  They now give `3`, and `3.5` at `P1 = [(1, 0.5), (2, 1.5)]`, as in the
  interpreter. The value of the `let` can be a tuple, nested tuples
  (`let ((a, b), c) = ((1, 2), 3)`) or a point of the length of the pattern (an
  input `P` of type `tuple<real, real>`); `_` names no part. Every part is
  computed before a name is bound. On GLSL the `let` of a point compiles; a list
  of points still declines there. A pattern whose length differs from that of
  the point, a list or a number in place of a point, a nested pattern over a
  point, a `let` with a stated type, and both forms on `interval-js`, decline.

- **`compile()` compiles a recursive function with a list or point result
  again** (CE-1471). A recursive call of a function whose signature states a
  list or a tuple result declined in 0.194.0 ("a recursive call of F, a function
  with a list or tuple result"). The stated result is now the type of the call,
  on JavaScript: with `F` declared `(real) -> list<real>`,
  `F(k) := Which(k = N - 1, [k], True, ListJoin([k], F(k + 1)))` gives
  `[0, 1, 2, 3]` for `F(0)` at `N = 4`, and with `F` declared
  `(real, tuple<real, real>) -> tuple<real, real>`,
  `F(k, p) := Which(k = 0, p, True, F(k - 1, p) + (1, 0))` gives `[4, 2]` for
  `F(3, (1, 2))`, as in the interpreter. A result type that the engine infers
  from the body (`list<number>` of a `Join`) serves too. A result whose elements
  have no stated type (`tuple<unknown, unknown>`) still declines, and GLSL,
  which has no recursion, declines.

- **`compile()` compiles `Apply` of a function literal whose parameters are
  typed** (CE-1469).
  `Apply(Function(Add(At(H, 1), n), Typed(H, 'list<real>'), Typed(n, 'integer')), L, 5)`
  declined in 0.194.0 ("Apply of a value that is not a function literal of one
  untyped parameter per argument"); at `L = [2, 3, 4]` it is now `7`, as in the
  interpreter. A parameter declared a list or a tuple takes its argument whole,
  and a parameter declared a scalar maps over a list argument where the
  interpreter maps it (`Apply(Function(Multiply(2, k), Typed(k, 'real')), L)` is
  `[4, 6, 8]`). An argument whose type does not fit the declared type, and a
  declared union type, still decline.

- **`compile()` compiles `RotateLeft` and `RotateRight` of a count of type
  `real` again** (CE-1465). `RotateLeft(S, N)` with `N` declared `real` declined
  with "a count that is not an integer" since 0.194.0. The compiled code now
  tests the count when it runs: at `N = 2` it gives `[3, 4, 1, 2]` for
  `S = [1, 2, 3, 4]`, and at `N = 2.4`, where `evaluate()` gives an
  `incompatible-type` error, it throws. On GLSL and `interval-js` such a count
  still declines; a count declared `integer` compiles as before.

- **`compile()` compiles `Join` of lists again** (CE-1466). `Join(L, M)` of two
  lists declined with "the operator Join is not supported by the compiler" since
  0.194.0; it now gives `[1, 2, 3]` for `L = [1, 2]` and `M = [3]`, also with
  more operands and with a scalar operand (`Join(L, x)`). `Join` of a tuple, a
  set or a string, and of lists of numbers and booleans, declines, as does
  `Join` on GLSL.

- **`compile()` compiles `At` of a list of points with a list of indexes, and
  `If` and `Which` of a list condition** (CE-1464). Both declined in 0.194.0 ("a
  list where a scalar is required"). With `P = [(1, 2), (3, 4), (5, 6)]` and
  `L = [3, 1]`, `At(P, L)` is now `[(5, 6), (1, 2)]`, as in the interpreter,
  with a point of NaN for an index out of range. With `L = [2, 5]`,
  `Which(Less(3, L), 1, True, 0)` is now `[0, 1]`: the selection is made at each
  position, a list arm gives its element at that position, and a position where
  no condition holds is NaN (a point of NaN for point arms); `If(c, a, b)` of a
  list condition `c` is `Which(c, a, True, b)`; an `If` of a list condition with
  no `else` and a list arm still declines (the interpreter restricts the arm to
  the mask). On GLSL the selection compiles for lists of numbers of a stated
  length. A selection whose arms or later conditions are not pure (an effect, a
  write, an operation that can throw), or whose first condition is a scalar,
  still falls back to the interpreter, as does the interval mode.

## 0.194.0 _2026-11-18_

### Breaking Changes

- Program and Block variables keep the contract supplied by an annotation or
  inferred during initialization. Mutable numeric values establish `number`,
  mutable lists erase lengths, and empty list elements stay unknown. A later
  store must satisfy the contract. A declaration without a value reserves a
  slot. Reading it before initialization reports `read-before-initialization`.

- **`compile()` uses one compiler for JavaScript, GLSL and interval arithmetic,
  and the compilation APIs of the previous compilers are removed.**
  `compile(expr, { to })` with `to` set to `'javascript'` (the default),
  `'glsl'` or `'interval-js'` gives a result of the same shape as before; the
  option `profile: 'ir'` is no longer needed, and is accepted with no effect.
  Removed:
  - the `compile()` options `target`, `functions`, `operators`, `imports`,
    `preamble`, `strictTypes` and `broadcast`. The option types no longer have
    them, and a call that still passes one throws an `Error` that names it:
    `The compilation option "functions" was removed in 0.194.0: …`. The option
    `callerLocals` is accepted and ignored: a GLSL function takes every input
    that its body reads as a parameter.
  - custom targets: `ce.registerCompilationTarget()`,
    `ce.unregisterCompilationTarget()`, the classes `JavaScriptTarget`,
    `GLSLTarget`, `GPUShaderTarget` and `BaseCompiler`, and the types
    `CompileTarget`, `LanguageTarget`, `CompiledOperators`, `CompiledFunctions`,
    `CompiledFunction`, `TargetSource` and `ExecutableTarget`.
  - the operator-definition keys `compileHelpers` and `compileShippable`, a
    `compile` handler that returns code text, and the value-kind compile
    contract (`arithmetic.compile`, `ArithmeticCompile`). A definition with one
    of these keys throws. A `compile` handler that returns an `Expression` works
    as before: the expression is compiled in place of the node; a handler that
    returns text, or calls its `compile` callback, declines.
  - the result field `float32Bounds` (the exact form of a GLSL sine hash). Such
    an operand is reported in `warnings` with the code
    `'float32-unsafe-argument'`.
  - `canCompile()` answers by running the compilation, on the three targets:
    `{ ok: true }` exactly when `compile()` gives code.
  - the option `onLoop` of `runAsync()` and the types `ParallelLoopReport` and
    `ParallelLoopReason`: no `parallel for` runs on the worker pool in this
    release (below). `RunAsyncOptions` keeps `signal` and `minPasses`.

  What to do instead: compile to a built-in target with `to`; define a function
  that the code calls in the engine with a body (`f(t) := t^2 + 1` compiles), or
  give its operator a `compile` handler that returns an `Expression`; read
  `freeSymbolTypes[name].provenance` instead of `strictTypes`; call
  `broadcast()` of the result with no option. An operator defined with an
  `evaluate` function only, and a function the host passes at run time, are not
  compiled: the compilation declines. The migration note
  `docs/MIGRATION-0.194.md` gives an example for each removed API.

  What changes in results:
  - A decline falls back to the interpreter: `success: false` with a `run` that
    evaluates, and a `diagnostic` whose `code` is one of `'outside-profile'`,
    `'untyped-input'`, `'unsettled-shape'`, `'static-type-error'`,
    `'lane-mismatch'`, `'unsupported-mode'`, `'bigint-lane'`,
    `'possible-nothing'`, `'union-dispatch'` or `'compile-error'`. On GLSL the
    result has no code, and its `run` evaluates with the interpreter. The codes
    `'caller-local-source'`, `'caller-local-type'`, `'inexact-jump-operand'`,
    `'inline-collection-too-large'`, `'non-real-operand'` and
    `'shared-impure-operand'`, and the warning `'copying-list-update'`, are no
    longer given.
  - `freeSymbols` lists the names the code reads, in the order of their first
    reading (a read in the body of a function counts at the call), with the
    `vars` names the code reads. `freeSymbolTypes` is also set on JavaScript
    results.
  - A program with a `parallel for` (`ParallelLoop`) declines, and the
    interpreter runs its passes in order, on one thread. `runAsync()` of a
    result gives the value of `run()`, and `willParallelize()` is `false`.
    `broadcastAsync()` still uses the worker pool (`ce.workers`). A later
    release compiles `parallel for` and sends it to the pool again.
  - Some programs that the previous compilers compiled decline, among them
    `Dot`, `Cross`, `Norm`, `Sort`, `Take`, `Mean`, `Median`, `Unique`,
    `EvaluateAt`, `BesselJ` and a list of points multiplied by another shape:
    they run in the interpreter on JavaScript.
  - `epsil --compile` refuses a program with a `parallel for`: it reports
    `compile declined: Could not compile: …` and exits with 1. The program runs
    without `--compile`. A program that defines a function and calls it
    (`f(x) = x^2 + 1; f(3)`) compiles, as before (CE-1443).
  - The message of a decline starts with `Could not compile: `, and an operator
    that the compiler does not support is named as such
    (`Could not compile: Sort(L): the operator Sort is not supported by the compiler`).

- **The `interval-js` target compiles with the interval mode of the IR pipeline,
  and `IntervalJavaScriptTarget` is removed.**
  `compile(expr, { to: 'interval-js' })` gives the same result shape as before
  (`run`, `broadcast`, `broadcastAsync`, the stored form, `runtimeVersion`), and
  the option `profile: 'ir'` is no longer needed on this target. An expression
  the mode does not compile is a decline with a specific code in
  `diagnostic.code` (`outside-profile`, `untyped-input`, `static-type-error`,
  `unsettled-shape`, `unsupported-mode`, …): with `fallback: false` it throws a
  `CompileDeclineError`, and otherwise the result is `success: false` with a
  `run` that evaluates with the interpreter and gives interval results. A `mode`
  other than `'strict'` (`unsupported-mode`) and a `vars` entry that is not a
  read of the inputs object decline; the options removed from every target
  (above) throw. The value kind `enclosure` compiles in the mode as on the
  deleted target (an input `x: enclosure` is a `{ lo, hi }` record checked at
  entry, and an operation of the kind computes the doubles of `.N()`). It
  declines, with the kind message, a `Sum`, `Product` or `Integrate` that reads
  an enclosure and a call of a user function with an enclosure argument, which
  the deleted target computed by the rules of a real; a decline of an expression
  with an input or a result of the kind throws a `KindDeclineError`, whatever
  `fallback` says. A host function with a `compile` handler that returns text is
  not compiled in the mode, also beside an enclosure.

  The interval mode compiles fewer programs than the deleted target did.
  `\arg(x+iy)` (a complex value) and an `Integrate` whose integrand reads a
  `vars` entry decline; `At(L, k)` declines when the input `k` is not declared,
  and compiles when it is (`ce.declare('k', 'integer')`). With the default
  `fallback`, such a program gives `success: false` and a `run` that evaluates
  with the interpreter: over an input wider than a point it answers `entire`
  (`'maybe'` for a boolean), and at a point it gives a point only when the
  interpreter's value is exactly a double (an integer, `1/4`), otherwise
  `entire`, and decides a boolean only when the numbers it is computed from are
  exact, otherwise `'maybe'`. `Sinc(x)` and `Chop(x)` compile, also
  `Chop(x, 0.01)` (a constant tolerance; `Chop(x)` takes the engine's tolerance
  at compile time, and `Chop` compiles on JavaScript and GLSL too).
  `FresnelS(x)` and `FresnelC(x)` compile: their enclosure is widened by the
  measured error of the double approximation, which one outward ulp did not
  cover (`FresnelS` of `[1.5, 1.7]` had the upper end 0.6975049600820927, below
  S(1.5) = 0.6975049600820931), and holds the interpreter's value at every point
  of the box. An input with no declaration whose inferred type is a number type
  is read as a real interval, as every value a host passes is one: `x` in
  `Gamma(x)` (`complex | infinity`), `Erf(x)` and `Sinc(x)`
  (`complex | signed_infinity`) compiles undeclared; a declared `complex` input
  still declines. Code that imported `IntervalJavaScriptTarget`, or built a
  target with `new IntervalJavaScriptTarget()`, calls
  `compile(expr, { to: 'interval-js' })` instead.

- **Fourteen members of `IntervalArithmetic` are removed** (the object exported
  by `@cortex-js/compute-engine/interval`): `scale`, `scaleDiv`, `length`,
  `component`, `pointComponent`, `bcast`, `bcastProduct`, `bcastPoint`, `mapFn`,
  `map`, `pointList`, `range`, `seededChoice` and `elseArm`. They were helpers
  of the code that the deleted interval target generated, and the code of
  `compile(expr, { to: 'interval-js' })` does not call them. A program that
  called `scale` or `scaleDiv` calls `mul` or `div`, which give the same
  results.

### Improvements

- **`Iterate` and default parameters of user functions compile to JavaScript.**
  `Take(Iterate(f, x0), n)`, and `At`, `First`, `Second` and `Third` of an
  `Iterate`, compile to a loop with the interpreter's conventions: `f(acc)` or
  `f(index, acc)` by the parameters of `f`, and a real accumulator when an
  integer start leads to a value that is not an integer (`a ↦ a/3` from 1). A
  list accumulator, an effect in `f` and `Last` or `Drop` of the unbounded list
  decline. A user function with a default (`d(x, k = 3) := x + k`, or
  `k: integer = 3` in Epsil) compiles, with the call `d(x)` filled as the
  interpreter fills it; a function with defaults is also accepted by `Map` and
  as a `Sort` key.

- **`Pipe`, `Boole`, `KroneckerDelta`, `Any`, `All`, `Contains`, `IndexOf` and
  `Sort` with a function compile to JavaScript.** They declined and fell back to
  the interpreter. `Pipe` also compiles to GLSL and in the interval mode:
  `x |> Sin`, `L |> Take(2)` and Epsil's `x |> _ + 1` are the calls the
  interpreter evaluates. A named user function is accepted as the function of
  `Map`, `Filter`, `Count`, `Any`, `All` and `Sort` (a function literal was
  required). `Contains` and `IndexOf` compile where the compared values are
  doubles in the interpreter too (integers, inputs, float literals); a value the
  interpreter holds exactly, such as `1/3` or `π`, declines.

- **`IsMissing`, `Coalesce` and `AssertPresent` compile on `javascript` and
  `interval-js`, and `IsMissing` and `Coalesce` on `glsl`.** They declined
  before. Each gives the interpreter's value for an absent operand:
  `Coalesce(At(L, i), 0)` is `0` for an index out of range, and
  `AssertPresent(At(L, i))` throws an `Error` whose message starts with
  `expected-present` on `javascript`. On `interval-js` the test is a verdict
  over the box: `IsMissing(At([1, 2, 3], k))` is `'false'` over `k = [1, 2]`,
  `'true'` over `[4, 5]` and `'maybe'` over `[2, 4]`, where
  `Coalesce(At([1, 2, 3], k), 0)` is the hull of the value and the fallback,
  `partial` over `[0, 3]`; `AssertPresent` of a value absent over the whole box
  gives `entire` (its error ends the run). A pole is not an absent value:
  `IsMissing(1/x)` at the box `[0, 0]` is `'maybe'`. On `interval-js`, an `At`
  that selects an absent element (`At([If(x > 0, x), 1], k)`) is `partial` where
  it gave the other elements only, and `_IA.isAbsent` of `entire` is `'maybe'`
  (it was `'false'`). `AssertPresent` of a value that can be absent declines on
  `glsl`, and the three decline in `mode: 'bigint'`. A discharge of a computed
  value on the real lane whose type admits a complex value declines
  (`Coalesce(Sqrt(x), 0)` with `x: real`: the `NaN` of `Sqrt(-4)` there is the
  interpreter's `2i`, not an absent value), as does a tuple with the written
  `Missing` as a coordinate.

- **The common list operators compile.** `First`, `Second`, `Third`, `Last`,
  `Count`, `IsEmpty`, `Rest`, `Most`, `Reverse`, `Take`, `Drop`, `RotateLeft`,
  `RotateRight`, `Mean`, `Median`, `Sort`, `Ordering`, `Unique`, `Dot` and
  `Norm` declined before. On `javascript` each gives the interpreter's value,
  also for an empty list and a count out of range (`Take(L, -2)` is the last two
  elements, `Drop(L, 5)` of three elements is `[]`, `Mean([])` is `NaN`). On
  `glsl` they compile for a list of a stated length (`Reverse(L)` of
  `L: list<real^4>` is a `vec4`), except `Median`, `Sort`, `Ordering` and
  `Unique`. On `interval-js` all compile except `Median`, `Sort`, `Ordering` and
  `Unique`; there `Rest`, `Most`, `Take` and `Drop` need an input of a stated
  length (`list<real^3>`) and a constant count. `Dot` of a list of points and a
  point is the list of the inner products, as the interpreter gives it. A count
  of `Take`, `Drop` or a rotation that is not an integer, `Sort` with an order,
  and `Norm` of an order other than 1, 2 and `Infinity` decline.

### Behavior Changes

- **`ce.iterationLimit` applies to the interpreter only.** Compiled code does
  not read it; a compiled loop is bounded by the compile option
  `iterationBudget`. The `iterationLimit` option and property of
  `createJavaScriptRuntime()` are deprecated and have no effect: since 0.194.0
  no compiled code read them.

- **A sum of quantities of two dimensions is an error.** `5 m + 3 s` was left
  unevaluated; it now evaluates to an `incompatible-type` error that names the
  two units (`Error(ErrorCode("incompatible-type", "m", "s"))`), the error of
  `UnitConvert(3 s, m)`. In Epsil, `quantity(5, m) + quantity(3, s)` is this
  error. `2 m + 3 m + 4 s` is the same error (it was `5 m + 4 s`). A sum with an
  operand that is not a quantity, or a quantity whose unit has no known
  dimension, stays unevaluated: `x + 2 m + 3 s` and `2 m + 3` are unchanged.

- **`D`, `Integrate`, `Limit` and `Series` read the value of a symbol that holds
  a formula in their variable.** With `G := sin(x)`, `D(G, x)` was `0`; it is
  now `cos(x)`. `D(2G, x)` is `2cos(x)`, `Integrate(G, x)` was `G·x` and is now
  `-cos(x)`, and `lim_{x→0} G` was `sin(x)` and is now `0`. In Epsil,
  `let G = sin(x); D(G, x)` prints `cos(x)`. The name of the variable in the
  value is the variable of the operator. `Sum`, `Product` and the comprehensions
  do not read the value in this way: with `G := sin(x)`, `Σ_{x=1}^{3} G` is
  still `3sin(x)`.

- **`===` (`Same`) and `IsSame` read a parameter and a loop variable.** In a
  function literal, a parameter is replaced by its argument before the
  comparison, so `any([1, 2, 3], e => e === 2)` was `False` and is now `True`,
  `filter([1, 2, 3], e => e === 2)` was `[]` and is now `[2]`, and
  `find([1, 2, 3], e => e === 2)` was `NaN` and is now `2`. The variable of a
  `for` loop, of a comprehension and of `Sum` or `Product` is read in the same
  way. A name declared with `let` or assigned is still compared as written:
  `let x = 5; x === 5` is still `False`.

- **The `incompatible-type` error of a color operator or of `UnitConvert` has a
  payload.** `Color("nosuchcolor")` was `Error("incompatible-type")`; it is now
  `Error(ErrorCode("incompatible-type", "color", "\"nosuchcolor\""))`, the
  expected `color` and the operand that is not a color. This applies to every
  color operator (`ColorToString`, `ColorMix`, `AsRgb`, …).
  `UnitConvert(Quantity(2, h), m)` is now
  `Error(ErrorCode("incompatible-type", "m", "h"))`, the target unit and the
  unit of the quantity. A function color string with fewer than three arguments,
  such as `"rgb(1 2)"`, was transparent black; it is now not a color, as
  `"rgb()"` is.

### Resolved Issues

- **The type of a `Mod`, a `Sqrt` or a `Power` of an operand that calls a user
  function or holds a `Sum` no longer throws** (CE-1445). `Mod(5, Floor(g(1)))`,
  with `g` a function assigned without a declared type, threw "The type handler
  of "Mod" modified engine state while deriving a type": the type handler read
  the sign of `Floor(g(1))`, which evaluated `g(1)`. The sign of such an operand
  is now the sign of its type.

- **`Remainder` of floats is the exact remainder of its operands** (CE-1447).
  Both float lanes rounded the quotient before they multiplied it back, and the
  dividend and the product cancel. The lane of doubles gave
  `Remainder(-825977087020874.5, 0.7)` = `0` at machine precision; it is
  `0.0476…`, the remainder of the doubles. The lane of big decimals gave
  `Remainder(-825977087020874, 0.7)` = `2` at machine precision (an exact
  integer beside a float takes it); it is `-0.1`, the remainder by the decimal
  `0.7`. At the default precision
  `Remainder(1000000000000000000000000000001.5, 0.7)` was `-999999998.5`; it is
  `-0.3`. The remainder is now computed exactly (from `a % b` for doubles, with
  integers for big decimals) and rounded once.

- **The interval `Remainder` of two reals holds the remainder** (CE-1448).
  `IntervalArithmetic.remainder` computed `a − b·round(a/b)` in plain doubles
  and widened the answer by 3 ulps, which does not cover the cancellation:
  `remainder(-19.599995613098145, 0.7)` gave a lower end `4.386901853337119e-6`,
  above the exact `4.3869018542253e-6`; a pair whose remainder is small next to
  `a` could miss. It now composes the outward division, multiplication and
  subtraction around an exact rounding of the quotient, and `Remainder` of reals
  compiles on `interval-js`.

- **The interval log-gamma of a value that grows without bound has the upper end
  `+∞`** (CE-1450). `IntervalArithmetic.gammaln({ lo: 1, hi: Infinity })` and
  `ln Γ(1/x)` compiled to `interval-js` over `x = [0, 1]` gave an upper end
  `NaN`.

- **Two GLSL helpers no longer overflow or underflow on the way to a
  representable value.** `Binomial(128, 64)` compiled to GLSL gave `Infinity`
  (it is about 2.4e37), and `BesselJ(40, 10)` gave 0 (it is about 6e-21).

- **A compiled integral whose closed form is NaN at a bound runs the quadrature
  there.** `∫ ln(t) dt` from an input `a` to 2 gave NaN at `a = 0`; it now gives
  −0.6137, as the interpreter does.

- **A user function named `Program` compiles as a call of that function.** The
  compiler rewrote every `Program` call to a `Block`, so a user
  `Program(x) := x + 1` compiled to `x`.

- **The special functions compile to JavaScript again.** Since 0.194.0 they
  declined and fell back to the interpreter: `Heaviside`, `Remainder`,
  `Smoothstep`, `InverseHaversine`, `ErfInv`, `Erfi`, `Beta`, `BetaRegularized`,
  `GammaRegularized`, `Digamma`, `Trigamma`, `PolyGamma`, `AiryAi`, `AiryBi`,
  `AiryAiPrime`, `AiryBiPrime`, `BesselJ`, `BesselY`, `BesselI`, `BesselK` (of
  an integer order), `SinIntegral`, `CosIntegral`, `ExpIntegralEi`,
  `LogIntegral`, `AGM`, `EllipticK`, `EllipticE`, `EllipticF`, `EllipticPi`,
  `Hypergeometric1F1`, `Hypergeometric2F1`, `HurwitzZeta`, `LerchPhi`,
  `PolyLog`, `DirichletEta`, `DirichletBeta`, `StieltjesGamma`, `ClausenCl`,
  `LambertW`, `Fibonacci`, `IsPrime`, `LCM`, and `Binomial`, `Choose` and `GCD`
  of reals. Each gives the interpreter's real value, NaN where it is not real;
  with `mode: 'complex'`, `InverseHaversine`, `EllipticK`, `EllipticE(m)`,
  `Hypergeometric2F1`, `HurwitzZeta`, `LerchPhi`, `PolyLog` and `LambertW(x)`
  give its complex value. On GLSL, within single-float precision: `Arccot`,
  `Arcsec`, `Arccsc`, `Arcoth`, `Arsech`, `Arcsch`, `Haversine`, `Erf`, `Erfc`,
  `Gamma`, `GammaLn`, `Factorial` of a real, `Factorial2`, `Zeta`, `Binomial`
  and `LCM` of integers, `Heaviside`, `Remainder`, `Smoothstep`,
  `InverseHaversine`, `ErfInv`, `Beta`, `Digamma`, `Trigamma` and `BesselJ` of
  an integer order. On `interval-js`, `Heaviside` and `Remainder` compile with
  the kernels of the interval library: over `[-1, 1]`, `Heaviside(x)` is
  `singular` at 0 with the value `[0, 1]`, and at the point 0 it is 1/2. `GCD`
  and `LCM` of reals decline there (the kernels round their operands to
  integers); the other special functions have no interval kernel and decline.
  `compile(Equal(x))` declines on every target; it threw
  `internal error: Cannot read properties of undefined`.
- **`N()` of a definite integral with a complex bound gives the value of its
  closed form.** `∫_i^0 t dt` is `0.5` under `N()`, as `evaluate()` gives `1/2`;
  it was `0`, the quadrature over the real parts of the bounds. Without a closed
  form, the integral stays unevaluated (CE-1440).
- **The random test of the compiler classifies a list computed from a value of
  the caveats.** A `Filter` that keeps or drops elements computed from an `At`
  at the index 0 (NaN in compiled code, an error in the interpreter) was left
  unclassified when the sequence of generated programs changed (CE-1323).
- **A declined compilation names the inputs with no type also when it declines
  for another reason.** With `x` declared `real` and `u` undeclared,
  `compile(u := If(x < 0, u, 0)).unsupported` is `['Assign', 'u']`; it was
  `['Assign']` (CE-1432).
- **A compilation refused for an argument of the wrong type prints the type as
  declared.** The message read
  `an argument of legal that is not list<integer^v129>`; it now reads
  `… that is not list<integer>` (CE-1444).
- **A compilation refused for a parameter declared `any` or `value` names the
  parameter.**
  `compile(['Function', ['Multiply', 2, 't'], ['Typed', 't', "'any'"]])` has
  `unsupported` equal to `['t']`, and `diagnostic.value` is `'t'`; they were
  `['Typed', 'Typed(t, "any")']` and `'Typed(t, "any")'`.
- **A compiled call of a function that takes a list, with a number argument,
  declines with a message that names the argument.** With `fallback: false`,
  `compile(f(x))` for `f` assigned `(p: list<real>) -> Sum(p)` and `x` declared
  `real` threw `internal error: Cannot read properties of undefined`; it now
  throws `x: a scalar argument of f for the parameter 1, a list or a point`.
- **A function declared to return an `integer` that counts in a loop compiles.**
  With `f(B: list<integer>, k: integer) -> integer` whose body is
  `let n = 0; for j in 1..k { n = n + B[j] }; n`, `compile(f(L, 3))` declined
  (`a body of f that is not integer`): a local declared with no type, such as
  `let n = 0`, was a real in compiled code. It is now an integer when its value
  is an integer and its type after every write is `integer`, so a call of `f`,
  and a condition on it such as `if f(L, 3) > 0`, compile. A block that holds a
  power (`n = n + j^2`) keeps such locals real: the compiled power is a real.
- **A unit conversion between units with exact scales rounds once.**
  `UnitConvert(Quantity(12, "in"), "ft")` was `0.9999999999999998 ft` and is now
  `1 ft`; `1 m/s` in `km/h` was `3.5999999999999996` and is now `3.6`, and
  `Quantity(1, "ft") + Quantity(12, "in")` is `2 ft`. The conversion now uses
  the exact scales of the units (`in` is `0.0254 m`, `ft` is `0.3048 m`), as it
  did for the temperature units only. The result is still a float when the
  factor is not an integer. When the factor is an integer, an exact magnitude
  now stays exact: `Quantity(Pi, "ft")` in `in` is `12π in` (the factor was
  `12.000000000000002`, and the result a float). A unit whose scale is not exact
  (`deg`, `dB`) converts as before.
- **A `Series` at a kink, a jump or a branch point of a root no longer gives a
  series that holds on one side only.** `Series(Abs(x), x, 0, 3)` was `O(x⁴)`,
  `Series(Floor(x), x, 1, 3)` was `1` (the floor is `0` for `x < 1`), and
  `Series(Sqrt(x^2), x, 0, 3)` was `x + O(x^(9/2))` (it is `-x` for `x < 0`);
  `Sqrt(-x)` and `Sqrt(x^3)` had the wrong sign for `x < 0`. Each one now stays
  `Series(...)`. Away from the kink or the jump the series is unchanged:
  `Series(Abs(x), x, 1, 3)` is `x + O((x - 1)^4)`, and
  `Series(Sqrt(x^4), x, 0, 3)` is `x^2 + O(x^(7/2))`. A `Mod` or an `If` of the
  variable at a finite point now stays `Series(...)` too:
  `Series(Mod(x, 1), x, 0, 3)` was `x`.
- **An interval integral whose bound reaches past the domain of the integrand is
  no longer `empty`.** On `interval-js`, `Integrate(Sqrt(t), Limits(t, 0, x))`
  over `x = [-0.77, 1.23]` answered `empty` ("no value anywhere") although it
  has a value for every positive `x`; it is now `entire`. `empty` stays when the
  integrand has no value in the range that every choice of the bounds covers.
- **The interval `sinc` encloses its turning points.** The extrema of the
  cardinal sine were tabulated to 6 digits, so an interval that holds one missed
  the extremum: `sinc({ lo: 4, hi: 5 })` had the lower end
  `-0.21723362821118977`, above the minimum `-0.21723362821122166`, and on
  `[7, 8]` the upper end was 2e-13 below the maximum. The extrema are now
  computed to the precision of a double, and each end other than `1` is widened
  by the error of its computation.
- **A recursive function with an annotated parameter no longer maps over a list
  that its other parameter takes whole.** With
  `r := (n: number, s) ↦ If(n = 0, s, r(n − 1, [1, 2]))`, `r(1, [0])` was
  `[[1, 2]]`; it is now `[1, 2]`, as without the annotation. The call of `r` to
  itself gives `s` a list, so the signature is
  `(n: number, s: list<any>) -> unknown`, and a list argument at `s` is bound
  whole.

- **Under `.N()`, a user function that returns early with a rounding function
  gives the correct integer.** With
  `f := x ↦ Block(If(x > 1, Return(Floor(x))), 0)`, `f((25! − 1)/24!).N()` was
  `25`, the floor of the float of the argument; it is now `24`, as
  `f((25! − 1)/24!).evaluate()` is. The same applies to a local that holds the
  parameter (`Block(y := x, Floor(y))`), and to the other functions whose value
  jumps (`Round`, `Mod`, `Sign`, a comparison, …) in a statement before the last
  one. The numeric request applies to the value of the function: such a body now
  reads the exact value of an argument that is cheap to compute. A body with a
  loop, a recursion or a call of another user function still reads the float of
  the argument, because an exact rational can double in size at each step.

- **A limit written with its variable and its point is correct when the formula
  is in a symbol.** With `G := sin(x)`, `Limit(G + 0, x, 0)` was `x` and
  `Limit(G, x, 0)` stayed unevaluated; both are now `0`. In Epsil,
  `let G = sin(x); limit(G + 0, x, 0)` prints `0`. `Limit(f, x, a)` with a
  symbol `x` is now the limit as `x` approaches `a` also when `f` does not
  contain `x`, so `Limit(1/x, a, 1)` is `1/x`, the limit of a constant as
  `a → 1`. It was the limit of `1/x` as `x → a` from above. For a symbolic point
  with a direction, write the variable: `Limit(1/x, x, a, 1)`. A constant in
  second position is still the point (`Limit(1/x, Pi, 1)` is `1/π`), and so is a
  symbol after a function name (`Limit(Sin, a, 1)`).

- **A quantity with a complex value keeps its imaginary part when it is
  converted to another unit.** `UnitConvert(Quantity(1 + i, m), in)` was
  `39.37007874015748 in`; it is now
  `(39.37007874015748 + 39.37007874015748i) in`. The same applies to
  `UnitSimplify` and to a sum of quantities in different units:
  `(1 + i) in + 1.5 m` was `1.5254 m` and is now `(1.5254 + 0.0254i) m`.

- **A color or unit error says what is wrong.** In Epsil, `color("nosuchcolor")`
  printed `incompatible type: ` with nothing after it; it now prints
  ``expected `color`, got `"nosuchcolor"` ``, and
  `unitConvert(quantity(2, h), "m")` prints ``expected `m`, got `h` ``. An
  `incompatible-type` error with no detail reads `incompatible type`, with no
  colon. A string that names no color does not write the warning
  `parseColor: unrecognized color` to the console any more, in the interpreter
  and in compiled JavaScript.

- **A categorical palette is not interpolated.** `Colormap("tycho11", 0.05)` was
  a mix of the first two colors of the palette; it is now the nearest color of
  the palette, the color at index `round(t × (length − 1))`, so the second
  color. `Colormap("tycho11", 3)` was the first, the middle and the last colors;
  it is now the first three colors, and a count larger than the palette repeats
  its colors from the start. This applies to the categorical palettes (`tycho11`
  and its variants, `tableau10`, `kelly22`, `mathematica10`, `cupertino10`,
  `cupertino-dark10`, `spectrum12`), in the interpreter and in compiled
  JavaScript. The sequential and diverging palettes are still interpolated.

- **A unit written as a string is the target of a conversion.** In Epsil,
  `unitConvert(quantity(2, h), "min")` was unevaluated; it is now `120 min`.
  `UnitConvert`, `IsCompatibleUnit` and `UnitDimension` read a string unit
  operand (`"min"`, `"km/h"`) as `Quantity` does: `IsCompatibleUnit("min", "h")`
  is `True` and `UnitDimension("km/h")` is `[1, 0, -1, 0, 0, 0, 0, 0]`. A string
  is the way to write a unit whose name is also the name of a function, such as
  `min` or `lb`: a bare `min` is the function `Min`. A string that is not a unit
  expression, such as `"kg/("`, is an `unexpected-argument` error.

- **`TrigExpand`, `TrigReduce` and `TrigToExp` rewrite the value of a variable,
  and the result of another rewrite.** With `y := \sin(2x)`, `TrigExpand(y)` was
  `y`; it is now `2\sin(x)\cos(x)`, as `TrigExpand(\sin(2x))`.
  `TrigReduce(TrigExpand(\cos(2x)))` was
  `TrigExpand(\frac12 e^{2ix}+\frac12 e^{-2ix})`; it is now `\cos(2x)`, and
  `TrigExpand(TrigReduce(\sin(x)^2))` is
  `\frac12\sin(x)^2-\frac12\cos(x)^2+\frac12` (it was `TrigReduce(\sin(x)^2)`).
  As for `Expand`, each symbol of the operand that holds a value is replaced by
  that value: with `y = 5`, `TrigExpand(\sin(x+y))` is
  `\sin(5)\cos(x)+\sin(x)\cos(5)` (it kept `y`). `Integrate`, `Limit` and
  `Expand` of a `TrigReduce` or `TrigToExp` call now work on the rewritten
  expression: `\int TrigReduce(\sin(x)^2)\,dx` is `\frac12 x-\frac14\sin(2x)`
  (it stayed unevaluated).

- **A quantifier nested in a quantifier of the other kind gives the right
  answer.** `\forall x\in\{1,2\}, \exists y\in\{1,2\}, y=x` was `False`; it is
  now `True`. The inner quantifier was merged into the outer one and evaluated
  over the Cartesian product of the two domains, which is right only when both
  quantifiers are of the same kind. The inner quantifier is now evaluated for
  each value of the outer variable, so
  `Exists(Element(x, Set(1, 2)), ForAll(Element(y, Set(1, 2)), x > y))` is
  `False` (it was `True`).

- **A derivative in a sum or a product keeps its variable when the variable has
  a value.** With `x = 5`, `\sum_{i=1}^{2}\frac{d}{dx}x^2` was `20`; it is now
  `4x`, as the sum of two copies of `\frac{d}{dx}x^2`, which is `2x`. The
  product `\prod_{i=1}^{2}\frac{d}{dx}x^2` is `4x^2` (it was `100`), and
  `\sum_{i=1}^{2}\frac{\partial}{\partial x_i}x_i^2` with `x_1 = 5` is
  `2x_1+2x_2` (it was `2x_2+10`). A symbol of the body still gives its value:
  `\sum_{i=1}^{2} x` is `10`.

- **A numeral that starts with `0b` or `0x` is read in the base it is given.**
  `"0b1"_{16}` was 1 and `"0bad"_{16}` was an `unexpected-digit` error, because
  the `0b` was read as a binary prefix; they are now 177 and 2989. `"0x10"_{10}`
  was 16; it is now an `unexpected-digit` error. The prefix is read only in its
  own base (`0x` in base 16, `0b` in base 2), in either case: `"0X1F"_{16}`
  is 31. `DigitsFrom("- 0b1", 16)` is -177 (it was -1), `NumberFrom("0b1", 12)`
  is 133 (it was an `invalid-number` error), and `"0x"_{16}` is `NaN` (it was
  0).

- **A color written as an `oklch(…)` or `oklab(…)` string keeps its channels.**
  `Color("oklch(50% 0.3 240)")` was `Oklch(0.508, 0.131, 246)`, because the
  string was read as an 8-bit sRGB color, clipped to the sRGB gamut; it is now
  `Oklch(0.5, 0.3, 240)`, the same color as the head. Every operator that takes
  a color string reads these two notations the same way, in the interpreter, in
  compiled JavaScript and in a GPU `Color` literal. The CSS units are read: a
  chroma or an OKLab `a`/`b` of `100%` is 0.4, and a hue can be written in
  `deg`, `rad`, `grad` or `turn`. A string of these notations with an argument
  that is not a number is now an `incompatible-type` error, not a color.

- **A level in decibels converts to nepers by the factor ln(10)/20.**
  `UnitConvert(Quantity(10, dB), Np)` was `10 Np`; it is now
  `1.151292546497023 Np` (1 dB = ln(10)/20 Np, ISO 80000-3). Arithmetic and
  comparisons use the same factor: `3 dB + 1 Np` was `4 Np` and is now
  `1.345… Np`, and `1 dB < 1 Np` is `True`. A level does not convert to a ratio
  or a number any more: converting `10 dB` to `percent` or `rad` is an
  `incompatible-type` error (it was `1000 percent` and `10 rad`),
  `IsCompatibleUnit(dB, percent)` is `False`, and `(3 dB/m)·(2 m)` is `6 dB`,
  not the number `6`.

- **The LaTeX of a `Delimiter` with the Unicode angle brackets `⟨` and `⟩` reads
  back.** `["Delimiter", ["Sequence", 1, 2, 3], "'⟨,⟩'"]` was written `⟨1,2,3⟩`,
  which the parser does not read. It is now written `\langle1,2,3\rangle`, as
  the spelling `"'<,>'"` was. A `Delimiter` with square brackets is still
  written with parentheses, except for a `List` operand: `\lbrack 1,2,3\rbrack`
  reads back as a list, not as the tuple that the group is.

- **A constant whose value is 0, divided by itself, has no value.** With
  `ce.declare('z', { value: 0, isConstant: true })`,
  `ce.box(['Divide', 'z', 'z'])` was `1`. The quotient is now kept, and its
  `evaluate()` and `simplify()` give `NaN`, as for `0/0`. The same applies to
  `z.div(z)` and to `['Multiply', 'z', ['Power', 'z', -1]]`. A constant with a
  nonzero value (`Pi/Pi`), a constant with no value and a free variable (`x/x`)
  still give `1`.

- **The `epsil` command line tool prints numbers with a fraction or a radical in
  a form that Epsil reads back as the same value.** `epsil -e 'sqrt(3)/2 * i'`
  printed `sqrt(3)/2i`, which Epsil reads as `sqrt(3)/(2i)`; `3/sqrt(2)` printed
  `3/2sqrt(2)`, which reads as `3/(2sqrt(2))`; and `2*sqrt(-2)` printed
  `2sqrt(2)i`, which Epsil does not read. They now print `sqrt(3)/2 * i`,
  `3/2 * sqrt(2)` and `2sqrt(2) * i`. The `toString()` of an expression is
  unchanged.

- **`Map`, `Filter` and the other lazy collection operators walk a list chosen
  by `If`.** With `f = k ↦ k + 1`,
  `ListFrom(Map(f, If(True, [4, 5], [1, 2, 3])))` gave `[]` and
  `Sum(Map(f, If(True, [4, 5], [1, 2, 3])))` gave `0`, with no error. They now
  give `[5, 6]` and `11`. The `If` is evaluated once in the evaluation of the
  view.

### Performance

- **Compiled code is smaller, compiles faster and runs faster with the single
  compiler.** Measured against 0.186.0 on a corpus of 9,974 JavaScript, 3,992
  GLSL and 5,155 interval programs:
  - Compiled JavaScript runs faster: the median time per call is 0.72 of
    0.186.0's, and 1% of the programs are more than 10% slower.
  - Compilation is faster. The median time is 0.92 of 0.186.0's on JavaScript,
    0.29 on GLSL and 0.60 on interval. The total time for the corpus fell from
    12.9 s to 6.9 s on JavaScript, from 3.2 s to 0.8 s on GLSL and from 3.7 s to
    3.4 s on interval.
  - The compiler's source is 82% smaller (166,419 lines to 30,668), and the
    minified code the engine loads is 17% smaller (5.9 MB to 4.9 MB; gzip 1.8 MB
    to 1.5 MB).
  - The number of programs that compile is about the same: 9,351 on JavaScript
    (9,491 in 0.186.0), 3,858 on GLSL (3,832) and 4,859 on interval (4,835). A
    program the compiler declines runs in the interpreter. No program throws an
    error during compilation; 0.186.0 threw on 484 of them.

- **A `Map` or `Filter` callback that reads one element of a list expression
  evaluates that list expression once per walk, not once per element.** In
  `Map(j ↦ Which(At(c, j), At(v, j), True, NaN), Range(1, n))`, where `c` and
  `v` are list expressions that do not depend on `j`, the time grew with the
  square of `n`: 4.6 s for `n` = 3,200. It is now 0.09 s. The same applies to a
  mask such as `Filter(Range(1, n), i ↦ 0 < At(Abs(C), i))`. A sub-expression
  that reads the parameter, a local of the callback or a value that changes
  between two elements is still evaluated at each element.

## 0.193.0 _2026-11-17_

### Breaking Changes

- **`parseEpsil()` always returns a `Program`, including for empty or
  single-statement source.** For example, `parseEpsil("2x + 1")[0]` has the form
  `["Program", ["Add", ["Multiply", 2, "x"], 1]]`, omitting source metadata.
  Whole-program boxing and direct evaluation now preserve the caller scope;
  nested `Block` expressions still introduce a scope. Types and protocols are
  prepared first, then function definitions, then the other statements in source
  order. Invalid top-level siblings do not stop later statements. A
  host-evaluated `Block` now consistently has local scope and one enclosing
  evaluation; use `Program` for caller-scoped statement execution.
- **Epsil program variables retain their declaration's type on assignment.**
  `let a = 1; a = "x"; a` previously returned `"x"`; it now reports
  `assignment-type-mismatch` and returns `1`. Unannotated function-valued
  variables have type `function`, rather than inheriting the initializer's full
  signature. They accept successive function values, whose own annotations still
  check calls; an explicit variable signature remains its contract. A later
  program may redeclare a name with a new type.
- **A program ending in a declaration or assignment returns `Nothing`.**
  `executeEpsil(ce, "let x = 1")` previously returned `1`; append `x` to obtain
  the stored value. Property stores still return their assigned value when
  evaluated directly, while a Program assignment statement is valueless.
- **The Python compilation target is removed.**
  `compile(expr, { to: 'python' })` now answers as for any target that is not
  registered ("Compilation target "python" is not registered"), and
  `PythonTarget` is no longer exported. There were no known users; the target
  may come back later on the new compiler. A host can still register a target of
  its own through `LanguageTarget`, under any name. A host target whose
  `language` is `'python'` no longer gets the behaviours that the engine keyed
  on that name (for example the lowered type names `float` and `int`, and the
  refusal of an element-wise operation on a list). The MCP `compile` tool no
  longer offers `python`. Removed with it, from `BaseCompiler`: the statics
  `assertAssignmentIsStatement`, `compileExprBroadcastPython`,
  `tryCompilePythonElementwise`, `withFreshBlockLocals` and
  `freshBlockLocalName`; `tailValue()` takes one argument; the result of
  `spellTuplePattern()` has no `pyPattern`.
- **The experimental profile `'numeric-kernel'` of `compile()` is removed**,
  with the structured compiler behind it. `profile` now accepts `'ir'` only:
  `compile(expr, { profile: 'numeric-kernel' })` throws
  `Invalid compilation option "profile": expected "ir"`, whatever `fallback`
  says. The fields `pure` and `defaultedSymbols` of a compilation result and of
  a `canCompile()` answer, which only that profile set, are gone, and so is the
  value `'numeric-kernel'` of the `profile` field of stored code. From the
  exported `JavaScriptTarget`, the protected hook `bodyEmitter()` is removed (an
  override in a subclass is no longer called), and from `BaseCompiler` the
  statics `assertCapturedCallableBindings`, `resetCompilationMemos` and
  `resetSharedCompilationBudgets`. The environment values
  `CE_JS_PROFILE=numeric-kernel` and `CE_JS_PROFILE_SHADOW=1` no longer turn
  anything on.

### Behavior Changes

- **A quantifier over an `Interval` no longer tries only the integers of the
  interval.** `exists(x in interval(1, 2), x == 1.5)` was `False`, because
  `ForAll`, `Exists` and `ExistsUnique` tried only the values 1 and 2. An
  `Interval` is a set of real numbers, so a quantifier over it now stays
  unevaluated, unless its proposition does not read the variable. For the
  integers from `a` to `b`, write the range `a..b` (`["Range", a, b]`):
  `exists(n in 1..2, n == 1)` is still `True`. The index of a `Sum` or a
  `Product` over an `Interval` still takes the integers between the bounds.

- **A destructuring of a value that did not evaluate to a tuple has its own
  error.** `let (U, S, V) = svd([[1, 2], [3, 4]])` failed with "expected
  `tuple`, got `tuple<matrix<2x2>, matrix<2x2>, matrix<2x2>>`": `svd` of an
  exact matrix stays unevaluated until `N`, and its type is a tuple type. The
  error code is now `unevaluated-tuple`, and Epsil prints "`SVD([[1,2],[3,4]])`
  did not evaluate to a tuple, so it cannot be destructured; if `SVD` needs
  numeric input, write `N(…)`". The same applies to a `(a, b) := v` assignment,
  a `for` pattern and a destructuring parameter. A pattern whose number of
  elements differs from the tuple type of the value still gives
  `incompatible-type`.

- **A matrix to a symbolic power is no longer computed entry by entry.**
  `ce.box(['Power', [[1, 2], [3, 4]], 'n']).evaluate()`, with `n` an unknown,
  gave `[[1, 2^n], [3^n, 4^n]]`, which is wrong once `n` holds an integer: an
  integer power of a matrix is the matrix power. The power now stays
  `[[1, 2], [3, 4]]^n` and evaluates when `n` gets a value (with `n = 2`, to
  `[[7, 10], [15, 22]]`). An exponent declared `integer` gives
  `MatrixPower([[1, 2], [3, 4]], k)`, or the `expected-square-matrix` error for
  a matrix that is not square. An exponent that is known not to be an integer,
  or a constant such as `π`, still applies to each entry, as for a vector.

- **Creating an engine or setting its `precision` no longer changes
  `BigDecimal.precision`.** `BigDecimal.precision` is now only the default
  precision of the `BigDecimal` operations called without a precision argument
  (50, unless the host sets it). After `new ComputeEngine({ precision: 80 })`,
  `BigDecimal.precision` was `80`; it is now unchanged. A host that computes
  with `BigDecimal` directly at the precision of an engine passes it:
  `x.div(y, ce.precision)`. Setting `BigDecimal.precision` does not change the
  results of any engine.
- **`Repeat` evaluates a value that is not pure once per element, in every
  position.** `Repeat(Random(), 3)` was three copies of one random number, and
  so were `Max` of it and its sum with `[1, 2, 3]`, while its `Sum` and its sum
  with `1` used three random numbers. It is now three random numbers in every
  case, as `Map(_ ↦ Random(), Range(1, 3))` is. With `c` set to 1,
  `Repeat(Block(Assign(c, c + 1), c), 3)` was `[2, 2, 2]` and left `c` at 2; it
  is now `[2, 3, 4]` and leaves `c` at 4. A count of 0 evaluates nothing, and
  the unbounded `Repeat(Random())` evaluates the value at each element read.
  Above `maxCollectionSize` elements, such a `Repeat` evaluates to the lazy
  `Map(_ ↦ v, Range(1, n))` of its value. The count is now evaluated before the
  value. A pure value is evaluated once, as before. The experimental profile
  `'ir'` of `compile()` gives the same values, where it declined; the default
  JavaScript compiler declines such a `Repeat`, so the interpreter runs it.
- **Runtime-local self-quotients evaluate before cancellation.**
  `const x = 0; x/x` returned `1`; it now returns `NaN`. Nonzero library
  constants retain their ordinary self-quotient simplification.

- **A boolean mask of `At` can have another length than the collection.**
  `At(L, M)` keeps `L[k]` where `M[k]` is `True`, for the positions up to the
  shorter of the two lengths: with `L = [1, 2, 3, 4, 5]` and `K = [1, 0, 1]`,
  `L[K = 1]` is `[1, 3]`, where it was the error "The mask (length 3) must have
  the same length as the collection (length 5)"; a longer mask is read only as
  far as the collection goes. A `Missing` or `NaN` member of the mask keeps
  nothing, as `False` does: `At([1, 2, 3], [True, Missing, True])` is `[1, 3]`,
  where it stayed unevaluated. Compiled JavaScript gives the same list, where it
  gave `NaN`. In the experimental profile `'ir'`, a mask that is a list of
  booleans by its static type (an input `list<boolean>`, `L > 2`, `K = 1`, a
  `Map` to booleans) compiles on JavaScript and in the interval mode, over a
  list of numbers or of points, where it declined; GLSL declines. For this,
  `Equal` and `NotEqual` of a list and a scalar, and `Not`, `And` and `Or` of
  lists, compile in the profile and thread over the list, as in the interpreter
  (`Equal(K, 1)` is a list of booleans; `Equal` of two lists still declines).

- **A limit with no eligible numeric variable keeps nonnumeric bindings
  constant.** `function f() { let L = [1, 2]; limit(sum(L), 1) }; f()` returned
  `1`; it now returns `3`.

- **In the experimental profile `'ir'`, a colour constructor of a list compiles
  on JavaScript, and a constant colour is computed once.**
  `Hsv(210, Range(1, 10)/40, 1)` and `AsOklab(Hsv(0, 0, D))` of a list `D` give
  the array of colours that the default compiler gives, where they declined; a
  list of colours declines on GLSL. A colour that reads no input (`AsOklab(C)`
  of a name `C = Hsv(270, 0.4, 0.95)`) is computed when the code is loaded, and
  every call returns that one object. Measured on the programs of a host's
  documents: such a colour took 1.7 to 3.5 times the default compiler's time and
  now takes at most 1.1 times.
- **In the experimental profile `'ir'`, a list or tuple result on JavaScript is
  no longer a copy.** `run()` returns the value as the code built it, as the
  default compiler does and as the contract of `run()` states (results are
  read-only): with `Q: list<real>`, `compile(Q, { profile: 'ir' }).run({ Q })`
  is the array `Q` itself, where it was a `structuredClone` of it, and
  `List(A, B)` of two point inputs holds the two input arrays. A list of 16 or
  more constants is built once when the code is loaded, not at each call, and a
  result can be that shared list. Compiled code still never writes to an input.
  Measured on the programs of a host's documents: a list or point result took 6
  to 13 times the default compiler's time and now takes the same; a program that
  reads a table of 9,500 numbers took 150 times and now takes 0.7 times.
  `to: 'interval-js'` still returns a copy.
- **The experimental profile `'ir'` refuses an input that has no type.** An
  input typed `unknown` or `any` was read as a real number. It is now refused,
  on every target and in every mode, with the diagnostic of the default
  compiler: `compile(List(w, v), { profile: 'ir' })` with `w` and `v` undeclared
  answers `untyped-input` ("the inputs `w`, `v` have no type…"), with the names
  in `value`. A name read through `vars` follows the same rule. A name whose use
  gives it a type (`x` in `x + 1`), a parameter of a function with no declared
  type, and an input typed by the option `inputs` compile as before.
- **In the experimental profile `'ir'`, a `Sum` or a `Product` with a constant
  bound beyond 2^53 − 1 declines**, as the default compiler does (the
  interpreter gives `out-of-range`). An element-wise operation on a list now
  counts its passes for a step budget and checks a deadline, as a loop does:
  `2L + 1` over 100,000 elements inside `ce.withStepBudget({ steps: 3 }, …)`
  stops with `step-budget`.
- **Compiled JavaScript: a `_` position of a loop pattern no longer takes a
  temporary name**, so the temporaries after it in such a loop
  (`Comprehension(…, Element(Tuple(_, j), Q))`) have other names. The values are
  the same.
- **On `interval-js`, zero to the power zero no longer gives 1.** The
  interpreter and the JavaScript targets give `NaN` for `0^0`, but `y^x` at
  `x = y = [0, 0]` gave the point `[1, 1]`, and a comparison built on it could
  be decided against the interpreter: `0 < y·y^⌊x⌋ + 1` at `x = 0.5`, `y = 0`
  was `'true'` where the interpreter gives `False`. The point is now `empty`, so
  the comparison is `'false'`. A box that holds the point and others keeps its
  enclosure: `y^x` at `x = [0, 0]`, `y = [0, 1]` is still `[1, 1]`. A sum
  `∑ x^k` from `k = 0` is `empty` at `x = [0, 0]`, as the interpreter gives
  `NaN` there. The kernels of the interval library are fixed, so the existing
  target and the profile `'ir'` both give it.

### Bug Fixes

- **A rejected function assignment preserves the previous callable** (CE-1463).
  If rebuilding a dependent detects an effects mismatch, `Assign` returns the
  error and `ce.assign()` throws. Later calls continue to use the previous
  definitions.

- **`Integrate` and `D` use the closed form of the density and the distribution
  function of a continuous distribution.**
  `∫_{−∞}^{+∞} PDF(NormalDistribution(0, 1), x) dx` is `1`, and
  `D(CDF(NormalDistribution(0, 1), x), x)` is the density `e^{−x²/2}/√(2π)`; the
  integral stayed unevaluated, and the derivative was
  `Apply(Derivative(CDF, 0, 1), NormalDistribution(0, 1), x)`. This applies to
  the normal, uniform and exponential distributions. The binomial and Poisson
  distributions are discrete, and their `PDF` and `CDF` stay unevaluated in an
  integral or a derivative.

- **Several special functions evaluate without `N` at points where their exact
  value is a simple number.** `BesselJ(0, 0)` and `BesselI(0, 0)` are `1`, and
  `BesselJ(n, 0)` and `BesselI(n, 0)` are `0` for every other integer `n`.
  `LambertW(0)` is `0` and `LambertW(e)` is `1`. `ClausenCl(1, π/3)` and
  `ClausenCl(1, 5π/3)` are `0`; before, they stayed unevaluated under `N` too.
  `AGM(a, a)` is `a` and `AGM(a, 0)` is `0`, for any `a`. A float operand gives
  a float: `BesselJ(0, 0.0)` is the float `1`.

- **The description of `Length` gives the value for an absent operand
  correctly.** The description, which `epsil doc length`, the editor hover and
  the Epsil reference show, said that `Length(Missing)` is `NaN`. The engine
  gives `Missing`, and the description now says so.

- **The quantile of a binomial or Poisson distribution evaluates without `N`.**
  `Quantile(BinomialDistribution(10, 1/2), 1/2)` stayed unevaluated under
  `evaluate()`; it now gives the exact integer `5`, and
  `Quantile(PoissonDistribution(9), 19/20)` gives `14`. With exact operands,
  each test `CDF(k) ≥ p` is decided exactly, so a `p` just above a step of the
  CDF gives the next integer:
  `Quantile(BinomialDistribution(1, 1/2), 1/2 + 10^(-13))` is `1` (under `N` it
  stays `0`). A float operand gives a float, as for the other distributions: in
  Epsil, `quantile(poissonDistribution(9), 0.95)` gives `14`. An irrational
  parameter, a binomial with large `n` (`n·log₂(b)` above 50,000, for a success
  probability `a/b`) and a Poisson with `λ` above 1000 stay unevaluated; `N`
  gives their value.
- **`Series(LogGamma(x), x, +∞)` gives Stirling's series.** It stayed
  unevaluated; it now gives the series of `GammaLn(x)` at `+∞`,
  `x(ln x − 1) − ½ ln x + ½ ln(2π) + 1/(12x) − 1/(360x³) + O(x⁻⁵)`. The two
  functions are equal where the argument goes to `+∞`.
- **`ND` evaluates the derivative of a function given by its name.**
  `ND(Sin, 1)` stayed unevaluated, also under `N`; it now gives
  0.5403023058595877, the value of `ND(Sin(x), 1)`, as `NIntegrate(Sin, 0, 1)`
  already did for an integral. In Epsil, `nd(sin, 1)` gives the same value.
- **A product of the factors of `SVD` keeps its order.** `SVD` had no result
  type for its three matrices, so a name bound to one of them by a destructuring
  had no type when a product was read, and the factors of the product were
  reordered: in Epsil, `let (U, S, V) = N(svd(A)); U * S * transpose(V)` gave
  `[[-2.81…, 4.69…], [0.31…, 0.19…]]` for `A = [[1, 2], [3, 4]]`, and an error
  for a 2×3 matrix. It now gives `A`. The type of `SVD(A)` for an m×n matrix is
  now a tuple of an m×m, an m×n and an n×n matrix
  (`tuple<matrix<2x2>, matrix<2x3>, matrix<3x3>>` for a 2×3 matrix).
- **`DigitsFrom` reads a sign before a `0x` or `0b` prefix.**
  `DigitsFrom("-0x1F")` gave 0; it now gives -31, and `DigitsFrom("+0b101")`
  gives 5. The prefix may be uppercase (`0X`, `0B`). With a base, a prefix is
  read only when it is the prefix of that base: `DigitsFrom("0b1", 16)` gives
  177 (it gave 1), `DigitsFrom("0x10", 10)` is an `unexpected-digit` error (it
  gave 16), and an invalid base is an error for a prefixed string too.
  `DigitsFrom(x)` with `x` not a string stays unevaluated, as `NumberFrom(x)`
  does, in place of an `incompatible-type` error, and `DigitsFrom("")` gives
  `NaN`, as any string with no digit does.
- **`IsCenteredSquare` recognizes the centered square numbers.** It tested
  `n = 4t² + 1`, so it answered `False` for 13, 25 and 41 and `True` for 17
  and 37. It now answers `True` exactly for `n = t² + (t + 1)²`: 1, 5, 13, 25,
  41, 61, 85, 113, … (OEIS A001844).
- **The compiled code of a function that is written with an operator keeps its
  parentheses under another operator.** The JavaScript and GLSL compilers wrote
  the code of some functions as an infix expression and put it with no
  parentheses into the operator around it, which then applied to a part of it.
  With `x` and `b` parameters, `2 / \operatorname{hav}(x)` compiled to
  `2 / (1 - Math.cos(x)) / 2`, a quarter of the value (since 0.51.0);
  `2 / \operatorname{sech}(x)` to `2 / Math.cosh(x)` and
  `2 / \operatorname{csch}(x)` to `2 / Math.sinh(x)` (since 0.26.0);
  `2·\operatorname{frac}(b)` to `2 * b - Math.floor(b)`, `7.5` at `b = 7.25`
  where `evaluate()` gives `0.5`; `2 / H_x` (`HarmonicNumber`) to
  `2 / _SYS.digamma(x + 1) + 0.577…` (since 0.189.0, on GLSL too). The selected
  branch of an `If` whose condition is decided by the types had the same defect:
  `2·If(2 < 3, x + 1, 0)` compiled to `2 * x + 1`, `3` at `x = 1` for `4`; so
  had a type ascription, `2·Typed(x + 1, 'real')`, and the code that the
  `compile` handler of a user operator returns. Such code is now in parentheses
  when it is an operand, unless it is a name, a number, a call or another
  expression that an operator takes whole: `2 / ((1 - Math.cos(x)) / 2)`,
  `2 * (x + 1)`.
- **The `epsil` command line tool writes booleans and symbols without quotes.**
  A result printed a symbol of more than one letter in quotes, so it looked like
  a string: `epsil -e '[1 == 1, x, "s", a1]'` printed `["True",x,"s","a1"]`. It
  now prints `[true,x,"s",a1]`. `Nothing` and `Missing` print as `nothing` and
  `missing`, and a library constant prints with its Epsil spelling (`integers`).
  The name of a function keeps the engine's form (`QuotientRing(integers, 3)`).
  The examples of the Epsil library reference show the same form.
- **The `epsil` command line tool writes an absolute value, a norm and a root as
  calls that Epsil can read.** `epsil -e 'abs(a)'` printed `|a|`,
  `norm([[1, 2], [3, 4]], 3)` printed `||[[1,2],[3,4]]||` without its second
  operand, and `root(2, 3)` printed `root(3)(2)`. They now print `abs(a)`,
  `norm([[1,2],[3,4]], 3)` and `root(2, 3)`.
- **`NDSolve` and `NDSolveFunction` evaluate on a fresh engine.** Before,
  `["NDSolve", ["Equal", ["D", ["y", "x"], "x"], ["y", "x"]], "y", ["Limits", "x", 0, 1], 1, 100]`
  stayed unevaluated unless the caller declared the independent variable and
  internal names such as `ndsolveystate` as `real`. It now gives the list of 101
  samples, without a declaration. A value assigned to the independent variable
  no longer replaces it in the right-hand side: with `x := 5`, `y' = x·y`,
  `y(0) = 1` on `[0, 1]` gave `y(1) = 148.41…` (`e^5`), and now gives `1.6487…`
  (`e^0.5`).

- **The compiled square of the square root of a sum keeps the sum grouped.**
  Since 0.128.0, the JavaScript code of `1 - \sqrt{x^2+y^2}^2` was
  `-(_.x * _.x) + (_.y * _.y) + 1`, which gives `0.8125` at `x = 0.5`,
  `y = 0.25`; it is now `-((_.x * _.x) + (_.y * _.y)) + 1`, which gives
  `0.6875`, as `evaluate()` does. A negation, a product or a difference of
  `\sqrt{X}^2`, where `X` is a sum that cannot be negative, had this defect:
  `2\sqrt{x^2+1}^2` gave `19` at `x = 3`, and now gives `20`. The same defect
  affected `Abs`, `Real` and `Conjugate` of a `Block` of one expression:
  `2·Abs(Block(x^2 + 1))` compiled to `2 * (_.x * _.x) + 1`, and now compiles to
  `2 * ((_.x * _.x) + 1)`.
- **`bignumLcm` is exact.** It rounded the product of its operands to the
  precision of the big decimals, so the least common multiple of two 41-digit
  integers lost its last digits: `bignumLcm(10^40 + 7, 3·10^40 + 1)` was
  `3.0000000000000000000000000000000000000022e+80`; it is now the exact product,
  which ends in `…07`.
- **A second engine with another precision no longer changes the digits of
  numbers computed by the first**
  ([#556](https://github.com/cortex-js/compute-engine/issues/556)). With an
  engine `a` at precision 30, creating an engine `b` at `precision = 'machine'`
  made `a.expr(['Sqrt', 2]).N().toString()` give `1.4142135623731` instead of
  `1.41421356237309504880168872421`. Every numeric evaluation of an engine
  (arithmetic, `.N()`, trigonometric and special functions, statistics,
  comparisons, compilation, and the display of a number) now uses the precision
  of that engine, so several engines with different precisions can be used in
  one program.
- **A numeric constant tested against a `Set` of numbers is decided by value**
  ([#593](https://github.com/cortex-js/compute-engine/issues/593)).
  `Contains(Set(1, 2, 3), ExponentialE)`, `Element(ExponentialE, Set(1, 2))` and
  `Element(Pi, Set(1, 2))` stayed unevaluated; they are now `False`. A `Filter`
  whose predicate made that test threw "Filter predicate must return "True" or
  "False"":
  `Length(Filter(List(Set(1, 2, 3), Set(3)), b ↦ Contains(b, ExponentialE)))` is
  now `0`. A value with an unknown is still undecided: `Contains(Set(1, 2), x)`
  stays unevaluated. `Contains` over a `List` is unchanged: it compares by
  structure, so `Contains(List(1, 2), x)` is `False`; use `Element` for a
  membership test with an unknown.
- **`EllipticF(φ, m)` and the two-operand `EllipticE(φ, m)` no longer overflow
  far from the real axis.** `EllipticF(0.3 + 400i, 0.5)` was `ComplexInfinity`
  (1.8540746773i), `EllipticF(355i, 2)` was `0` (1.3110287771i),
  `EllipticE(0.3 + 300i, 0.5)` was `ComplexInfinity` (2.03e129 + 6.56e129i), and
  `F(φ|0)` and `E(φ|0)`, which are `φ`, lost digits from `Im φ ≈ −10` and went
  to infinity from about `Im φ = −20`. `cos φ`, its square and `sin³ φ` left the
  double range at `|Im φ|` near 355 (F) and 236 (E), long before the value does.
  Above `|Im φ| = 20` the Carlson arguments are now rescaled by the positive
  real `e^(−2 Im φ)`, which keeps their phases and so the branch cuts, and
  `Im φ < 0` follows by oddness. `F(φ|0) = E(φ|0) = φ`. `EllipticE` stays
  unevaluated where its value leaves the double range, near `|Im φ| = 709` for
  `m = 1` and later for a smaller `|m|`: `EllipticE(708i, 1)` is `i·sinh(708)`,
  and `EllipticE(0.3 + 715i, 10^(-8))` is `4.899e305 + 1.584e306i`. Against
  mpmath over 3,200 points (`|Im φ|` from 1 to 1e4, `Re φ` across several
  periods, real and complex `m` on both sides of 0 and 1) the relative error is
  under 6e-16 for F and 7e-15 for E. (#605, PR #606, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`Arccot` of a complex number next to a negative real number is next to the
  value at that real number**
  ([#563](https://github.com/cortex-js/compute-engine/issues/563)). `Arccot(-3)`
  is `2.8198…`, in the range `(0, π)` of the engine, but
  `N(Arccot(-3 + 10^-12 i))` was `-0.3217… - 10^-13 i`: the complex value was
  `Arctan(1/z)`, which differs by `π` when the real part is negative. The
  complex value is now `π/2 - Arctan(z)`, also in compiled JavaScript code: it
  is continuous across the real line, and its branch cuts are those of `Arctan`,
  the imaginary axis above `i` and below `-i` (`N(Arccot(-2i))` is `π + 0.549i`,
  and `N(Arccot(0.5i))` is `π/2 - 0.549i`). No value at a real argument changes.
  `simplify()` now also rewrites `Arccot(-x)` as `π - Arccot(x)`.
- **`LogIntegral(x)` at machine precision is accurate for a large `x`.** It was
  computed as `ExpIntegralEi(ln(x))`, so the rounding error of `ln(x)` was
  multiplied by `ln(x)`: `LogIntegral(1e300)` was `1.4497500526693022e+297`,
  with a relative error of `2.3e-14` (about 100 units in the last place). The
  largest error measured from `7.5` to the largest double is now 1.6 units in
  the last place: `LogIntegral(1e300)` is `1.4497500526693365e+297`, and the
  correctly rounded value is `1.4497500526693362e+297`. Compiled JavaScript code
  gets the same values.
- **`BesselY(n, x)` at machine precision is `-oo` or `+oo` when its value
  overflows a double.** `BesselY(200, 1)` was `NaN`: the recurrence on the order
  reached an infinite value and the next step computed `∞ − ∞`. It is now `-oo`
  (its value is about `-2.02e432`), and `BesselY(-201, 1)` is `+oo`.
- **`Rationalize(x, tolerance)` keeps a tolerance below double precision.** The
  convergents were computed with doubles, so
  `Rationalize(0.12345678901234567890123, 10^-25)` gave `4115227/33333339`,
  which is `1.9e-16` from `x`. The convergents are now computed exactly, and the
  result is `24324377007729/197027455535852`. An exact rational `x` or tolerance
  is read as its numerator and denominator, any other value at working
  precision. A positive tolerance below the smallest double (`10^-400`) is now a
  tolerance too.
- **`IntegerString(n)` of a symbol with no value stays unevaluated.** It was the
  error `incompatible-type` with the same type, `integer`, given as the expected
  type and as the actual type. The same applies to the base:
  `IntegerString(5, b)` stays unevaluated. A value that is not an integer is
  still a type error. A base that is an integer too large for a small integer
  (`IntegerString(5, 10^30)`) is now `out-of-range`, as a base above 36 is.
- **`EulerE(n, z)` of a complex `z` has a value**
  ([#598](https://github.com/cortex-js/compute-engine/issues/598)). It stayed
  unevaluated. `EulerE(3, 1+2i)` is now the exact `-25/4 - 8i`, and a complex
  with float parts gives a float, with the precision of a bignum part. A complex
  with a radical (`EulerE(2, √2·i)`) gives the polynomial at that point,
  `-2 - √2·i`.
- **The derivatives of `EllipticK`, `EllipticE`, `LambertW`, `PolyLog` and
  `LerchPhi` have a value at 0, and their series at 0 is computed**
  ([#591](https://github.com/cortex-js/compute-engine/issues/591)).
  `Apply(Derivative(EllipticK), 0)` gave `NaN` and now gives `π/8`;
  `Apply(Derivative(EllipticK, 2), 0)` gives `9π/64`, and
  `Apply(Derivative(EllipticE, 2), 0)` gives `-3π/64`, not `~oo`. The derivative
  in `z` of `x ↦ PolyLog(s, x)` and `x ↦ LerchPhi(x, s, a)` at 0 has a value
  too. `Series(EllipticK(m), m, 0, 3)` is
  `π/2 + πm/8 + 9πm²/128 + 25πm³/512 + O(m⁴)`, and the series of `EllipticE`,
  `PolyLog(2, x)` and `LambertW(x)` at 0 are no longer left unevaluated. The
  value of the closed form `D(EllipticK(m), m)` after the substitution `m = 0`
  is still `NaN`, and so is the compiled `Apply(Derivative(EllipticK), x)` at
  `x = 0`.
- **`Beta(a, b)` is 0 where `a + b` is a pole of Γ and `a`, `b` are not
  integers** ([#590](https://github.com/cortex-js/compute-engine/issues/590)).
  `Beta(-1/2, -1/2)` and `Beta(-5/2, 1/2)` stayed unevaluated under
  `evaluate()`, and their `.N()` and `Beta(-2.5, 0.5)` gave `NaN`; they now give
  `0`, also at a precision above the machine precision and in compiled code.
  `Beta(1/3, -4/3).N()` gives `0`, not `-2.4e-30`. Compiled `Beta(x, y)` at a
  negative integer and a positive integer whose poles cancel gives the value of
  the interpreter, not `NaN`: `1/6` at `x = 2, y = -3` and at `x = -3, y = 2`,
  `-1` at `x = -1, y = 1`.

- **`.N()` of a divergent infinite sum whose terms overflow in doubles
  returns.** `\sum_{k=0}^{\infty} \frac{k + k!}{k!}`, whose terms tend to 1, did
  not return in minutes: each term computed the exact `k!` up to `k = 32768`.
  Such a sum now stays unevaluated after about 0.2 s. The walk also stops at
  once when a term is not a finite number (a pole, such as the term at `k = 0`
  of `\sum_{k=0}^{\infty} \frac{(k+1)!}{k! k^2}`), and the sum stays
  unevaluated, as before.
- **The LaTeX of a derivative of negative order reads back as the same
  expression.** `["Derivative", "f", -1]` gave `f^{(-1)}`, which reads back as
  `1/f` when `f` is not declared a function; it now gives
  `\operatorname{Derivative}(f, -1)`. Applied to an argument it gives
  `\operatorname{Apply}(\operatorname{Derivative}(f, -1), x)`.
- **Epsil text for a product nested in a product reads back as the same
  expression when a factor is `%` or `/`.**
  `serializeEpsil(["Multiply", "a", ["Multiply", ["Mod", "x", 2], "b"]])` gave
  `a * x % 2 * b`, which reads back as `((a * x) % 2) * b`; it now gives
  `a * (x % 2 * b)`. A sum nested in a sum is written the same way:
  `a + (x - y + b)`.
- **`EisensteinE` of a high weight is correct when the imaginary part of τ is
  small.** `EisensteinE(100, 0.4 + 0.87i)` gave `80080.27 + 104512.03i` (the
  value is `49.3281 − 59.3508i`), and `EisensteinE(400, 0.4 + 0.87i)` gave
  `ComplexInfinity` (the value is `−31507089.95 + 13619148.95i`). For a weight
  of 4 or more, τ is now first moved into the fundamental domain, and a weight
  of 20 or more is computed by the lattice sum. A value too large for a double
  stays unevaluated, and so does a value whose rounding error, multiplied by the
  factor (cτ + d)^\{−s\} of the reduction, is more than 10⁻⁸ of it: this happens
  near a zero of `EisensteinE`, as at `EisensteinE(102, 0.5 + 0.5i)`, whose
  value is 0.
- **A function returned by another function no longer gets a `scope` effect in
  its type for a loop that assigns its own index.** With
  `mk := y ↦ (x ↦ Block(Loop(Assign(i, i + 1), Element(i, [1, 2])), x + y))`,
  the type of `mk(q)` was `(x: unknown) scope -> number`, as if the loop wrote a
  variable outside the function. It is `(x: unknown) -> number`.
- **In the experimental profile `'ir'`, a sum whose bounds reach 2^53 at run
  time never returned.** `Sum(Sin(x + k), k = n..n + 2)` at `n = 2^53` ran
  forever: the index could not advance. A loop now counts its passes and always
  ends; its value for such bounds is not specified.
- **In the experimental profile `'ir'`, `Floor(x/49)` at `x = 49` gave 0.** A
  product by a rational constant was compiled as a product by the double of the
  constant (`0.0204… · x`), so a `Floor`, `Ceil`, `Round`, `Mod` or a comparison
  of a quotient that is an integer could be off by one. A rational factor whose
  denominator is not a power of two is now a division (`x / 49`), also when a
  name holds the rational, on JavaScript and on GLSL (where a helper gives the
  exact quotient when it is an integer or a half, for a dividend below 2^23).
- **In the experimental profile `'ir'`, a product of two matrices, of a matrix
  and a list, and a power of a matrix were computed element by element.** They
  now decline: the interpreter's value is the matrix product or power.
- **In the experimental profile `'ir'`, an improper integral whose integrand
  overflows gave a wrong number that changed at each run**
  (`∫₀^∞ x^100·e^−x dx`). It is now `NaN`. An integral that the quadrature
  cannot settle and whose integrand is finite keeps its estimate, as with the
  default compiler.
- **In the experimental profile `'ir'`, an assignment in a bound of a `Sum` or a
  `Product` took effect.** Such a sum now declines.
- **On `interval-js`, `GCD` with a zero operand or two equal negative operands
  is no longer negative.** `GCD(0, -2)` gave `[-2, -2]`; it is `[2, 2]`. The
  kernel `gcd` of the interval library is fixed, so the existing target and the
  profile `'ir'` both give it.
- **In the experimental profile `'ir'`, `broadcast()` with `entryChecks: false`
  refused a list input** that every cell shares.

### Improvements

- **A `compile` handler of an operator definition can return an expression.**
  The expression is compiled in place of the node, with the library's
  definitions: a node that the handler created is compiled with no handler
  consulted, and the operands it received, reused as the same objects, are
  compiled as usual. For example, a handler of `At` that returns
  `ce.function('At', [args[0], ce.function('Max', [ce.function('Floor', [args[1]]), ce.number(0)])])`
  compiles `At([10, 20, 30], i)` to a read at `Max(Floor(i), 0)` on every
  target, with no text written for any of them. The profile `'ir'` now calls a
  handler: a handler that returns `undefined` or an expression no longer makes
  that profile decline; one that returns text or calls `compile` still does.
  `OperatorCompileHandler` returns `string | Expression | undefined`.
- **`BigDecimal` operations take an optional precision argument.** Each
  operation that rounds (`div`, `inv`, `pow`, `sqrt`, `cbrt`, `nthRoot`, `exp`,
  `ln`, `log`, and the trigonometric and hyperbolic functions) or bounds its
  result (`add`, `sub`, `addBounded`, `subBounded`, `mulBounded`) takes a last
  argument `prec`, the number of significant digits. It defaults to
  `BigDecimal.precision`. `BigDecimal.pi(prec)` and
  `BigDecimal.eulerGamma(prec)` return the constants at a given precision. For
  example, `new BigDecimal(2).sqrt(40)` is rounded to 40 significant digits
  whatever the value of `BigDecimal.precision`.
- **`Hypergeometric2F1` has a derivative in `z`, and `Series` of it expands.**
  `D(₂F₁(a, b; c; z), z)` is `(ab/c)·₂F₁(a + 1, b + 1; c + 1; z)` (DLMF 15.5.1;
  the parameters keep the inert partial), so the chain rule works through the
  argument, and `Series(₂F₁(1, 1; 3; x), x, 0, 3)` was unevaluated and is
  `1 + x/3 + x²/6 + x³/10 + O(x⁴)`, the coefficients `(a)ₖ(b)ₖ/((c)ₖ k!)`. A
  terminating `₂F₁` (`a` or `b` a non-positive integer) is its polynomial and
  expands exactly about any point: `Series(₂F₁(−2, 3; 4; x), x, 0, 5)` is
  `1 − 3x/2 + 3x²/5` with no `O(·)` term, and about 1 it is
  `1/10 − 3(x − 1)/10 + 3(x − 1)²/5`. The expansion of a non-terminating `₂F₁`
  still declines where it is not a Taylor series: at an argument that is a real
  number `≥ 1` (the branch point and the cut), an exact one such as `π`
  included, at an argument with no value at the point (`(1 − cos x)/x²` at 0),
  and at ±∞. Any `₂F₁` declines when `c` is a non-positive integer `−m` and the
  series does not terminate at a degree `≤ m`, where the function is not
  defined. (#597, PR #603, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`HarmonicNumber(r)` evaluates at a rational with an exact digamma**
  ([#598](https://github.com/cortex-js/compute-engine/issues/598)).
  `HarmonicNumber(1/2)` stayed unevaluated and is `2 − 2 ln 2`,
  `HarmonicNumber(1/3)` is `3 − (3/2) ln 3 − π√3/6`: for a rational `r` whose
  `Digamma(r + 1)` has an exact value (denominators 1 to 4),
  `H(r) = ψ(r + 1) + γ` (DLMF 5.15.2). Another rational (`1/5`) and the
  generalized `HarmonicNumber(r, 2)` stay unevaluated under `evaluate()`; `N()`
  is unchanged. (PR #604, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`Series` of a function whose derivative is algebraic (`Arctan`, `Arcsin`,
  `Arccos`, `Arccot`, `Arsinh`, `Arcosh`, `Artanh`, `Arcoth`, `Arsech`, `Ln`) no
  longer takes time exponential in the order.** `Series(Arctan(x), x, 0, 9)`
  took about 6 s and now takes about 0.1 s; at order 11 it took about 20 s. The
  expansion differentiated the function once per order, and the derivatives of
  `Arctan` grow with the order. When the derivative of the function is built
  from arithmetic operators and powers, its series is now expanded and
  integrated term by term. The coefficients have the same values, but some are
  written in another form (`Series(Arctan(x), x, a, 3)` has the cubic
  coefficient `(4a²/(a² + 1)³ − 1/(a² + 1)²)/3`). `Series(Arcsin(√x), x, 0, 5)`,
  which stayed unevaluated, now gives `√x + x^(3/2)/6 + 3x^(5/2)/40 + …`. (#588,
  PR #589, contributed by [enumeratio](https://github.com/enumeratio))
- **The experimental profile `'ir'` compiles `Apply` of a function literal over
  a list, and more list operators.** `Apply(k ↦ body, L)` of a literal of one
  parameter over a flat list of numbers is compiled as `Map` is, as the
  interpreter evaluates it: with `x: real`, `m: real`,
  `compile(Min(Apply(k ↦ Which(k = m, 10^9, True, k), List(x^2, (x − 1)^2, (x − 2)^2))), { profile: 'ir' })`
  gives 0.49 at `x = 0.3`, `m = 0.09` on JavaScript, and compiles for GLSL and
  for `interval-js`. On GLSL a `Map` over a list of 1 to 64 elements whose
  length is known at compile time now compiles (the body is written once per
  element). `Min(x)` and `Max(x)` of one number are `x`. On JavaScript the
  profile also compiles `ListJoin`, `Zip`, a `Comprehension` of several clauses
  whose lists do not read an earlier index, `Choose` and `Binomial` of integers,
  `RandomShuffle` and `RandomChoice(Interval(0, 1), n)` (under `WithRandomSeed`
  they give the interpreter's numbers), and `If` with a boolean arm and no else
  arm (`False` where the condition is false, also on GLSL). A nested list, a
  tuple or a list of points as the argument of `Apply`, and a literal of several
  parameters with a list argument, are not compiled by the profile.
- **The experimental profile `'ir'` compiles a call of a user function with a
  list argument** when every parameter of the function is a scalar: the function
  is mapped over the list, as the interpreter evaluates it, on JavaScript, on
  GLSL (a list of a length known at compile time) and for `interval-js`. With
  `h(x, b) := b^x`, `h(0.5, List(2, 4, 8, 16))` gives `[1.414…, 2, 2.828…, 4]`;
  lists of one length are taken element by element together, and a scalar
  argument is passed to each call. A nested list, lists of different lengths, a
  list for a function whose result is a list, and a recursive call with a list
  argument are not compiled by the profile.
- **The experimental profile `'ir'` compiles a user function whose result is a
  list of elements of no stated type**, as the engine infers it for parameters
  of no stated type: with `v(a, b) := List(a, b)`, whose result is
  `list<unknown>`, `Sum(v(x, y)·List(0.64, 0.768))` gives 2.176 at `x = 1`,
  `y = 2` on JavaScript, and compiles for GLSL and for `interval-js`. The result
  has the shape of the body, a list of numbers or a list of points; a recursive
  call and elements that can be a number or a list are not compiled by the
  profile. A parameter that the body reads as a list
  (`Sum(p·List(Cos(φ), Sin(φ)))`) takes a list argument of a length known at
  compile time whole, as the interpreter binds it. A body whose length is known
  at compile time, as `PointX` of a list of three points, gives a call of that
  length, so a function whose body maps over such a call (`Map(f, d(x, y))`)
  compiles.
- **The experimental profile `'ir'` compiles a recursive user function whose
  result is not declared**, as a function assigned with no declaration: with
  `s(x, n) := Which(n = 1, Sin(x), True, Sin(s(x, n − 1)))`, `s(x, 3)` gives
  0.5651… at `x = 0.7` on JavaScript, and compiles for `interval-js`. When the
  result is neither declared nor inferred, it is taken as a real number, and
  such a function whose body is a complex number, a boolean, a list or a tuple
  is not compiled by the profile; GLSL declines a recursive function. A
  recursive function can read an input of the compilation, also through a
  function that it calls (`J(n, x) := Which(n = 0, x, True, I(x, J(n − 1, x)))`
  with `I(u, v) := a·u + Sin(v)`); two functions that call each other and read
  an input are not compiled by the profile. As with the existing compiler, a
  recursion that does not reach its base case (`s(x, 2.5)`) throws a
  `RangeError` at the end of the JavaScript stack, where the interpreter throws
  a `CancellationError` at its recursion limit; a depth past that limit
  (`s(x, 200)`) gives a value where the interpreter throws. Two equal calls of a
  recursive function that draws no random number are one call:
  `R(i, x) = R(i − 1, x) + S(R(i − 1, x))` makes 20 calls for `R(20, x)`, not
  2^20.
- **Code of the experimental profile `'ir'` runs lists and loops faster.** A
  list is built in one preallocated array, two element-wise operations in a row
  are one loop, and a loop checks its deadline once per 1,024 passes, not at
  each pass. Measured per call: `2L + 1` over 1,000 elements 41 µs before, 0.85
  µs now (the default compiler: 6.1 µs); `Sum(Sin(L)·x)` over 1,000 elements 47
  µs, 5.6 µs (6.0 µs); `Sum(k·x, k = 1..200)` 240 ns, 126 ns (155 ns). The
  values are the same.
- **Code of the experimental profile `'ir'` computes the invariant part of a
  loop once.** A part of the body of a `Sum`, a `Product`, a `Loop`, a `Map` or
  a `Filter` that does not depend on the index is computed before the loop, on
  JavaScript, on GLSL and in the interval mode: in
  `Sum(Max(Max(L), k), k = 1..n)`, `Max(L)` is computed once. A part that can
  fail (a call of a user function, an inner loop, a `Filter`) moves only out of
  a loop of constant bounds that runs at least once, so a loop of no pass at run
  time calls no function; a loop or a `Map` over the elements of a list that
  exists (`Max(L)`) moves out of any loop and then runs once where the loop has
  no pass (in the interval mode with an `iterationBudget`, a loop over a list
  does not move). Measured per call: that sum with 1,000 elements in `L` and
  `n = 1000`, 449 µs before, 2.0 µs now (the default compiler: 5.4 µs); Tycho's
  `voronoi-diagram`, whose `B(x, y)` called three functions that do not read its
  index in a sum of 16 terms, 0.43 ms, 0.054 ms on JavaScript (0.014 ms), and 41
  ms, 4.2 ms in the interval mode (the existing interval target: 0.72 ms). The
  values are the same, except under an `iterationBudget`: a moved call counts
  the passes of its `Loop`s once, so `Sum(f(x)·k, k = 1..3)`, whose `f` runs a
  `Loop` of 100 passes, gives its value under a budget of 150, where it threw.
- **The experimental profile `'ir'` compiles an input that is a list of points
  on JavaScript.** An input of type `list<tuple<real, real>>` (or of three or
  more numbers per tuple, with a stated or a run-time length) is given as an
  array of arrays: with `P: list<tuple<real, real>>`, `Sum(Abs(P))` at
  `P = [[3, 4], [6, 8]]` is 15, and `P − T` subtracts the point `T` from each
  point. `At` with a constant index, `PointX`, `Length`, `Map`, `Filter`,
  `Comprehension`, `Distance`, and a product or a quotient by a list of numbers
  of the same length apply to it; a user function can take such a list and
  return one. GLSL declines a list of points. The rows are not checked at the
  entry: a row of another length gives an unspecified result.
- **The experimental profile `'ir'` compiles for `interval-js`.**
  `compile(expr, { to: 'interval-js', profile: 'ir' })` compiles scalar
  arithmetic, the elementary functions, powers, comparisons, `If`, `Which`,
  `And`, `Or`, `Not`, locals of a `Block`, `Sum` and `Product` with `Limits`,
  `Random()` (the interval `[0, 1]`) and calls of user functions, with the
  result shapes of the target (an `IntervalResult`, or the verdict `'true'`,
  `'false'` or `'maybe'`). Where a condition is undecided over the input box,
  both arms are evaluated and the result is their hull; a local assigned in both
  arms has the hull of both values. An operand of `And` or `Or` after the first,
  and the arm of a boolean `If` with no else arm, is evaluated only where the
  operands before it do not decide the result, as the interpreter evaluates
  them: `If(0 < x, 0 < R·T^⌊x⌋ + K)` computes no power where `x ≤ 0`. In a
  recursive function (a function on a cycle of calls) a condition must be
  decided, so that the recursion ends: where it is undecided, and where the
  recursion does not reach its base case, the result is `entire`. Lists and
  tuples compile too, as arrays of such values: `At` (an index that is an
  interval gives the hull of the elements it can select), element-wise
  operations, `Sum`, `Product`, `Max`, `Min` and `Length` of a list, `Map`, a
  comprehension over a `Range`, `Filter`, and list or point inputs and results.
  A list whose length is not one number over the input box (a `Filter` with an
  undecided condition, a `Range` with a wide bound) is `entire`. A decimal
  literal is the point at its double, as in the JavaScript code (`x + 1.8` adds
  the point `[1.8, 1.8]`), and a float exponent is read as the interpreter reads
  it: `x^0.2` is the real root of a negative `x`, `x^1.5` has no value there. A
  difference is one `_IA.sub`, and a rational exponent whose denominator is a
  power of 2 (`x^(3/2)`) is the power of its double, as on the existing target,
  with its bounds. An exponent known at run time over a base whose enclosure
  cannot be negative (`2^y`, `|x|^y`, `(x^2)^y`) is `_IA.powInterval`, as on the
  existing target, without the reading of the exponent, which cannot apply
  there. As on the existing target, a quotient of a negation is one
  `_IA.negDiv`, `(2/3)·π·x` multiplies `x` by the constant `2π/3`, and an
  addition of an exact 0 (`x + 0/3`) is not written. `Binomial` and `Choose` of
  real operands compile (`_IA.binomial`). A comparison that the engine decides
  for every value of its inputs (`(x + 1)^2 < 0` or `Equal(x, x)` of a real `x`)
  is that verdict, as on the existing target. A value that reads no input is
  computed once: each constant when the code is loaded (`preambleOnce`), and a
  call of constant arguments that runs at every call (`b(3π)`) at the first
  call; if it throws there, every call is `entire`, as when it is computed at
  each call. A `Sum` or a `Product` of integer constant bounds and at most 100
  passes is written out, term by term in ascending order, so that a part that
  reads only the index is computed once:
  `2/π · Sum((-1)^i/i · sin(i·x), i = 1..100) + 3` takes 34 µs per call, where
  it took 75 µs in a loop (the existing target: 32 µs). A body with a random
  draw, with a `Loop` or with a call of a recursive function keeps the loop. A
  list of a constant length of at most 16 elements is written out the same way,
  in its reductions, its element-wise operations and the calls of a user
  function that return it, so that only the elements that are read are computed:
  `At(S(x), 2)` of `S(t) = Cos(t + List(0, 1, 2))` is one cosine. An integral of
  one variable (`Integrate` with one `Limits`, `NIntegrate`) is the enclosure of
  the existing target, with the same number of pieces, or the closed form of the
  engine's antiderivative where the existing target uses one (an indefinite
  integral is its closed form); with an angular unit other than radians it is
  the enclosure only. With a random draw in a bound it is the enclosure only
  too, because the engine's closed form would hold one draw made at compile
  time; an indefinite integral of an integrand with a draw declines. With a
  bound `+∞` or `−∞` in the program, the parts of the integrand that do not read
  its variable are not computed before the integral, where the enclosure answers
  `entire` without calling the integrand, and the closed form computes what it
  reads. The result has `freeSymbols`, `freeSymbolTypes`, `unsupported` and
  `mode`, as on the existing target. A `Loop` over a `Range` or a list compiles:
  a local that its passes assign holds the hull of both arms of an undecided
  `If` (the existing target answers `entire`), a bound that is not one integer
  over the box gives `entire`, and with an `iterationBudget` each pass counts
  one pass of the call, as on the existing target, and a call over the budget
  throws the same `CancellationError`. A value computed once at the first call
  (a call of constant arguments) counts its passes apart, so a program that the
  existing target cancels can give a value, and the first call can run up to
  twice the budget. Any other program declines, and with `fallback` the existing
  target then compiles it: an integral of several `Limits`, a `Loop` with a
  `Break`, a `Continue` or a `Return`, a recursive function, a `Range` of real
  operands. Without the option `profile`, nothing changes.
- **With the profile `'ir'`, two calls of a user function with the same
  arguments are one call** on every target (JavaScript, GLSL, `interval-js`),
  when the function draws no random number, directly or through a call, and is
  not recursive. A function `a_1(x)` that calls `a_0(x)` five times calls it
  once, so a chain of such functions runs in a time proportional to its length,
  not exponential in it.
- **With the profile `'ir'`, equal sub-expressions are compiled once** on every
  target, also when the expression writes them as separate copies (as a MathJSON
  tree does): two copies are equal when they have the same operators, operands
  and numbers, and each name resolves to the same definition. A recurrence of
  points in which each of five levels reads the level below five times compiled
  in 4.5 s to code of 4.2 MB that took 36 ms per call; it now compiles in 43 ms
  to code of 11 KB that takes 2.7 µs per call (the default compiler: 10 µs). A
  sub-expression that draws a random number is still computed at each place it
  is written.
- **The interval library has the kernels `atLeast(v, c)` and `atMost(v, c)`**
  (the value `v` with its lower end raised to that of `c`, or its upper end
  lowered to that of `c`), **`number(x)`** (the number of a point that is an
  integer, an `UndecidedConditionError` otherwise) and **`undecided(message)`**,
  which throws that error, and **`rangeCount(lo, hi, step)`**, the number of
  elements of a `Range` of numbers. They are members of `IntervalArithmetic`.
- **The interval library has a kernel `powReal(base, exponent, digits?)`**, also
  a member of `IntervalArithmetic`: the power for an exponent given as an
  interval. A point exponent that is not an integer is read as the interpreter
  reads a float exponent, to `digits` significant digits (by default those of
  the working precision): a rational of odd denominator gives the real root of a
  negative base (`powReal([-8, -8], [0.2, 0.2])` is about `-1.5157`), any other
  float has no real value there (`powReal([-8, -8], [1.5, 1.5])` is `empty`).
- **The experimental profile `'ir'` compiles a name whose value is an
  expression**, on JavaScript, GLSL and `interval-js`: the value is lowered
  where the name is read, as the existing compiler does. With `x_1` and `x_2`
  inputs and `P := (x_1, 2x_2)`, `At(P, 2) + x_1` reads both inputs; a list
  computed from constants (`R := Map(t ↦ 2t, Range(0, 100))`) and a list of
  exact constants (`k := (1, e^(2/5))`, enclosed in the interval mode) compile
  too, where they declined. The name stays in `symbolDeps`. Such a value still
  declines when it reads the name again, has an effect (a draw, a name of
  `vars`), or does not fit the declared type of the name, and when a name that
  it reads may be a local, a parameter or an index where the name is read: with
  `R := (n, 2n)`, `Sum(At(R, 1) + n, n = 1..3)` declines, since `R` reads the
  global `n` (the same read already lowered outside the `Sum` is reused, with
  the global `n`). A value of a library constant that is not a number
  (`GoldenRatio`) still declines.

## 0.192.0 _2026-11-15_

This is the content first numbered 0.191.0, a version that was not published.

### Breaking Changes

- The field `epoch` of `TypeProvenanceEntry` is removed. No part of the engine
  read it. The entries are reached through the internal field `_typeProvenance`
  of a definition.
- **A copy of a parameter into a local is no longer a use of the parameter.**
  Whether a function with an untyped parameter takes a list argument whole or is
  applied to each element is decided by the direct uses of the parameter only.
  `function h(xs) { let ys = xs; mean(ys) }` with `h([1, 2, 3])` gives
  `[1, 2, 3]`, where it gave `2`; the same holds for a component of a tuple
  local (`let q = (s, 0)`, then `take(q[1], 2)`) and a leaf of a destructuring
  (`let (a, b) = (s, 0)`). Declare the parameter to take the list whole:
  `function h(xs: list) { … }`.
- **A parameter with no written type that the body reads by index takes a list
  argument whole.** `h(v) = v[1] + v[2]` is still typed
  `(v: tuple<number, number>) -> number`, but that type no longer makes a call
  over a list of points one call per point: `h([(1, 2), (3, 4)])` is `(4, 6)`
  (the first point plus the second), where it was `[3, 7]`. The direct
  application `Apply(v ↦ v[1] + v[2], [(1, 2), (3, 4)])` already gave `(4, 6)`,
  and both now agree. Compiled JavaScript gives `[4, 6]`, the same point as an
  array. On `interval-js` the call declines, as `L[1]` does that is a row or a
  point and is used as a value (it gave the whole real line); GLSL declines it
  too. A list at another parameter is still applied element by element, as
  before. To apply the function to each point, declare the parameter:
  `h2(v: tuple<number, number>) = v[1] + v[2]` gives `[3, 7]`.

### Improvements

- **`ce.macroNames`** is the read-only set of the names that were declared as a
  macro on the engine (`ce.declare(name, { macro })`), in any scope. The set of
  an engine with no macro is empty, so a host can skip its own macro handling.
  The set never shrinks: a name that is not in it is not a macro in any scope,
  and for a name that is in it `ce.lookupDefinition(name)` gives the definition
  that the current scope reads (CE-1324).
- **The experimental profile `'ir'` compiles to GLSL.**
  `compile(expr, { to: 'glsl', profile: 'ir' })` compiles with the new compiler
  a real, integer, boolean, complex or colour result, or a list of stated
  length, of scalar inputs and of inputs that are tuples or lists of a stated
  length, and gives a GLSL result. A point, or a list of 2 to 4 numbers, is a
  `vec2`, `vec3` or `vec4`, as a result and as an input: `Tuple(Cos(t), Sin(t))`
  is `vec2(cos(t), sin(t))`, and an input `P: tuple<real, real>` has
  `freeSymbolTypes.P.lowered` equal to `vec2`, as with the existing GLSL target;
  a list of another length is a `float[n]`, as a result and as an input
  (`L: list<real^6>` is `float[6]`). `At(L, k)` with an index known only at run
  time reads the element from 1, from the end when `k` is negative, and is NaN
  for an index that is 0, not an integer or out of range. A `Sum` or a `Product`
  of more passes than `iterationBudget` (10,000 by default, as on the existing
  GLSL target) is NaN; a program whose loops, nested ones included, can run more
  passes in all declines. A parameter of a user function declared
  `tuple<real, real>` is a `vec2` (an array on JavaScript), and so is a result
  declared `tuple<real, real>`; a result declared `list<real^3>` is a `vec3`. A
  user function can read an input that is a point, a list in storage, or a list
  of at most 4 elements (GLSL would copy a longer array at each call). A list
  parameter of a user function declared with no length (`H: list<integer>`)
  takes on GLSL the stated length of its argument: with
  `H_1: list<integer^90001>`, `c(H_1, x)` compiles, and a second call of `c`
  with a list of another length declines. An element-wise operation over a list
  of more than 64 elements declines. With `storage: { S: 'sampler2D' }`, the
  list input `S` is read from a texture that the host uploads as for the
  existing GLSL target (one value per texel of a single-channel float texture,
  row-major from texel (0, 0), of any width): `At(S, k)`, a `Sum`, `Max` or
  element-wise operation over `S`, and a user function that reads `S` or takes
  it as a list argument read its texels; `S` as a value (the result, an arm of
  an `If`, the result of a function) declines. `callerLocals` is accepted and
  changes nothing: a user function always takes the inputs that its body reads
  as parameters. A `Mod` or `Fract` of a trigonometric value amplified by a
  constant of magnitude 1000 or more (a sine hash) has the warning
  `float32-unsafe-argument` in `warnings`, also where the existing target
  compiles an exact form. `code` is an expression, or statements that end in
  `return`, in which an input is its name; `preamble` holds the helpers, named
  `_gpu_ir_…`, and the user functions, named `_fn_ir_…`; `freeSymbols` and
  `freeSymbolTypes` list the inputs. With `vars`, a name is read as the host's
  text, which must be a name, or a member or an element of one (`u_x`, `u.P`,
  `u[0]`), and the name stays in `freeSymbols`. Declined: a list input of a
  run-time length, a list result of a user function of a run-time length, a
  result declared with complex elements, a `Function` literal, a `vars` text of
  another form or a `vars` name that has a value, and the options `functions`,
  `operators`, `imports`, `preamble`, `strictTypes`, `broadcast` and the mode
  `'bigint'`; with `fallback`, the existing GLSL target then compiles the
  expression. On JavaScript the profile now compiles an input of a tuple type
  such as `tuple<real, real>`, given as an array (`run({ P: [1, 2] })`), a user
  function that returns a point or a list of a stated length, and one that reads
  a list or point input.
- **The experimental profile `'ir'` compiles complex numbers and colours to
  GLSL.** A complex value is a `vec2` (real part, imaginary part), as an input,
  a result, a local, and a parameter or a result of a user function: with
  `z: complex`, `Sqrt(z)·x` is `_gpu_ir_cmul(vec2(x, 0.0), _gpu_ir_csqrt(z))`
  and `freeSymbolTypes.z.lowered` is `vec2`. The arithmetic, `Real`,
  `Imaginary`, `Conjugate`, `Abs`, `Argument`, `Exp`, `Ln`, `Sqrt`, `Power`, the
  six trigonometric and hyperbolic functions `Sin` to `Tanh`, a `Sum` and a
  `Product` compile, and `mode: 'complex'` is accepted; the inverse functions,
  `Root`, `Log`, the reciprocal functions and a list of complex numbers decline.
  A colour is an OKLCh `vec3`: `Rgb`, `Hsl`, `Hsv`, `Oklab`, `Oklch` and
  `AsOklch` compile, and `AsOklab` or `AsRgb` when it is the result of the
  expression, so `AsOklab(Hsv(h, 1, 1))` compiles; on JavaScript a colour is the
  object `{ space, c0, c1, c2, alpha }` of the default compiler. On both targets
  a name that holds a colour of three numbers (`C` with the value
  `Hsv(270, 0.4, 0.95)`) compiles as that colour, and a user function can return
  a colour. An alpha, a colour input or parameter and a list of colours decline.
  A GLSL number is now written with the fewest digits that give the same single
  float (`0.1`, where it was `0.10000000149011612`).
- **The experimental profile `'ir'` compiles arithmetic on points, sums with
  bounds that are not integers, and `Apply` of a function literal.** With `P`
  and `Q` of type `tuple<real, real>`: `P + 2Q` is a point, `Abs(P)` is its
  length (5 at `P = (3, 4)`), `Distance(P, Q)` is the length of `P − Q`, on
  JavaScript and on GLSL; on JavaScript a point can be added to a list of
  points, `Abs` and `PointX` apply to a list of points, and `PointList(L1, L2)`
  of two lists is a list of points as long as the shorter one. A product of two
  points and a point plus a number decline, as the interpreter refuses them. A
  user function with no declared types can take and return points: a parameter
  with no declared type is a point when the argument of the function's first
  call is one, and a later call with an argument of another shape declines. A
  name that holds a point written as `PointList(0.7, -0.4)` compiles as that
  point. A bound of a `Sum` or a `Product` of a real type is floored, as the
  interpreter does: `Sum(k, Limits(k, 1, n))` at `n = 3.7` is 6. On JavaScript a
  `Range` takes real operands (`Range(0.5, 3.7)` is `[0.5, 1.5, 2.5, 3.5]`). A
  bound or an operand of `Range` that is a constant infinity or `NaN` declines.
  `Apply(Function(body, p), a)` with scalar arguments compiles as the body with
  the parameter bound; a list or tuple argument declines, since the interpreter
  may map the function over it.
- **The code of the experimental profile `'ir'` can be stored, loaded and sent
  to a worker.** A result of `compile(expr, { profile: 'ir' })` now has
  `runtimeVersion`, `preambleOnce` and `entryPlan`, as a result of the default
  compiler has: `createJavaScriptRuntime().load()` and `loadBroadcast()` run a
  copy of it, and a kernel pool runs it on its workers
  (`FindFit.evaluateAsync()` scans on the pool). In 0.190.0 the loaders refused
  such code. `shippable` is `false` for code that draws a random number or
  computes an integral, as for the default compiler. The `run()` of the result
  checks its inputs and returns its value as a loaded copy does:
  `Multiply(Z, 2)` with `Z: complex` at `Z = 1.5` gives `3`, where it gave
  `{ re: 3, im: 0 }`.
- **The experimental profile `'ir'` compiles `mode: 'bigint'`.** Every integer
  is a JavaScript `bigint`, so a program of integers is exact at any size: with
  `n: integer`, `compile(Mod(n, 10), { profile: 'ir', mode: 'bigint' })` gives
  `7n` at `n = 2n ** 60n + 1n`. The inputs, the results and the value at a pole
  (`NaN` or `Infinity`) are those of the default compiler's `bigint` mode. A
  program with a value that is not an integer or a boolean declines with
  `outside-profile`: a real input or literal, `n/2`, `Floor(n/3)`,
  `Floor(Sqrt(n))`, `n < 7/2`, `n^m` (the exponent can be negative), `Floor(n)`,
  `If` with no else, `Max` of a list, and the option `vars`.
- **A result of the experimental profile `'ir'` runs batches and `runAsync()`.**
  A result of `compile(expr, { profile: 'ir' })` has `broadcast()`,
  `broadcastAsync()`, `willUsePool()`, `runAsync()` and `willParallelize()`, as
  a result of the default compiler has, and the option `broadcast: true` no
  longer declines. Each cell of a batch is the value of `run()` at that cell,
  with the layouts, `out` and shared lists of the default compiler, and
  `broadcastAsync()` sends a large batch of shippable code to the engine's
  worker pool. `runAsync()` runs `run()`: the profile sends no loop to the pool.
  In `mode: 'bigint'` a batch is refused, as with the default compiler. A result
  with a `vars` text that reads the inputs object (`vars: { E: '_.E' }`) is now
  shippable, as with the default compiler.
- **In the experimental profile `'ir'`, a square root or a logarithm of an
  operand that the engine proves negative is complex in the default mode.** With
  `x: real`, `compile(Sqrt(-x^2 - 1), { profile: 'ir' })` gives
  `{ re: 0, im: 1.8027756377319946 }` at `x = 1.5`, where it gave `NaN`, as the
  interpreter and the default compiler do; `Sqrt(x)` stays `NaN` at `x = -4`. An
  operator whose library definition a host gave a `compile` handler or
  `compileHelpers` (`ce.lookupDefinition('At').operator.compile = …`) now
  declines with `outside-profile`, since the profile does not call that handler:
  before, it compiled the operator's stock value.

### Behavior Changes

- **The end of a function call no longer rebuilds the function literals of its
  result.** A function literal becomes a function value when it is evaluated,
  and that value keeps the variables of the call that made it; the result of a
  call was walked a second time, to rebuild each function literal on the call,
  and it is not any more. Two results change, both for a function literal that
  the call did not evaluate, such as a branch of an `If` or a `Which` whose
  condition has no value yet. With
  `mk := n ↦ If(c > 0, () ↦ Block(n := n + 1, n), 0)` and `c` with no value,
  `mk(5)` stays `mk(5)`, where it gave the `If`; evaluated once `c` has a value,
  it gives the counter, as before. With
  `f := a ↦ Block(Declare(k, "unknown", a), If(c, x ↦ k + x, x ↦ 0))`, the
  function of the branch of `f(5)` no longer reads the local `k` once `c` has a
  value: applied to `1` it gives `k + 1`, where it gave `6`, as the same branch
  written as an expression (`k + 1`) already did (CE-1330). A parameter of the
  call in the same place is replaced with its value, as before.

- **A function parameter that a collection operator reads is a collection, also
  when an arithmetic use comes first.** `x ↦ (x + x, Length(x))` was typed
  `(x: unknown) -> tuple<number, …>` and called once per element of a list
  argument: on `[1, 2, 3]` it gave a list of three tuples with
  `incompatible-type` errors. It is now typed `(x: collection) -> …`, binds the
  list whole and gives `([2, 4, 6], 3)`. The same holds for `Sort`, `Count`,
  `Contains`, `At`, `Filter`, `Join`, a spread `[...x, 0]`, `Sum` and the other
  operators that read a collection; `Reverse`, `First`, `Last`, `Take`, `Drop`,
  `Rest`, `Unique` and `IndexOf` after `x + x` type `x` as
  `indexed_collection<any>` or `collection<any>`, where it was `matrix`. A use
  that requires one number and does not map (`Range(n)`) still makes the
  parameter a number.
- **A fold of an arithmetic canonical form reads only the declared facts of a
  variable.** The folds of `Power` (an integer exponent, a base that is not
  negative, a finite base) and of `Divide` (an infinity, the sign of a divisor)
  read, of a variable that is not a constant, its declared type and the
  assumptions, not the value it holds or a type inferred from that value. With
  `ce.assign('k', 4)` and no declaration, `(x^2)^k` is no longer boxed as
  `x^(2k)`, also in `subs()` and `simplify()`; with `p` holding 2, `(p^2)^{1/2}`
  is `Sqrt(p^2)`, not `p`; with `a` holding `∞`, `2/a` is not `0`; with `z`
  undeclared and holding 0, `z^0` stays `z^0`, whose value is that of `0^0`. A
  declared type keeps the folds: with `k: integer`, `(x^2)^k` is `x^(2k)`; with
  `p: real<0..>`, `(p^2)^{1/2}` is `p`; with `z: real`, `z^0` is `1`. A variable
  whose type was inferred gives no fact to a fold, also after its value is
  cleared, and so does a constant whose value reads a variable.
- **A function that calls a function defined later gets the result type and the
  inferred effects of that function once it is defined.** With
  `honest := () ↦ later()` and then `later := () ↦ Random()`, `honest` is typed
  `() random -> real` and its effects are `random`, where it stayed
  `() any -> unknown` with the effects `any`; with a pure `later`, `honest` is
  pure. `R := M ↦ G(M − [0, 0, Y])` before `G := M ↦ [M[1], M[2], M[3]]` is
  typed `(M: dictionary<any> | indexed_collection<any> | value) -> vector<3>`
  once `G` is defined, where it was `(M: unknown) any -> list<unknown^3>`: the
  same type as with `G` defined first. A declared effects contract over a
  function that is not defined yet stays trusted, and is not checked again when
  the function is defined; a contract installed while the function is defined is
  checked again when it is redefined.

### Resolved Issues

- **A function passed by name as a callback calls the function of the scope it
  was written in.** `Map(h, [1, 2])` boxed before `h` is defined, then
  `h(t) := t`, then a scope pushed later that declares `h := t ↦ 100`:
  `ListFrom` of the `Map` gave `[100, 100]` in that scope, and gives `[1, 2]`,
  as the call `h(1)` boxed with it does. A callback whose name has no definition
  there stays unevaluated.

- **A GLSL compilation refuses every reserved word of GLSL as an input name.**
  The list of reserved words lacked 53 words of GLSL ES 3.00 (`active`,
  `common`, `resource`, `partition`, `sampler1D`, ...). With `active` declared
  `real`, `compile(expr, { to: 'glsl' })` of `active + 1` gave the code
  `active + 1.0`, which a WebGL compiler rejects ("Illegal use of reserved
  word"). It now declines with "`active` is a reserved word of GLSL, and the
  shader cannot name a variable so: rename it, or map it with the `vars`
  option."

- **An Epsil `while` whose condition is undecided stops.** In
  `let i = 1; while i <= n { i = i + 1 }` with `n` free, the condition `i <= n`
  is neither `true` nor `false`, and `executeEpsil` never returned. The loop now
  ends with an `incompatible-type` error (expected `boolean`, at the condition),
  reported as a runtime error, and `i` keeps the value `1`. The condition must
  be decided at each turn, the first one included: an undecided condition ends
  the loop before the body runs, so initialize each variable that the condition
  reads. A host `Loop(Block(If(c, Break), body))`, the form of a `while`, gets
  the same treatment: with `x` declared `integer` and no value,
  `Loop(Block(If(Not(x ≠ 5), Break), Block(x := 5)))` assigned `x` and ended,
  and now gives the error with `x` unassigned. An `If(c, Break)` in a `Loop` of
  another form is held as before (CE-1303).
- **The value of a function does not depend on the order in which its body uses
  an untyped parameter.** `(A, B) ↦ (A·B − B·A, Determinant(A), Determinant(B))`
  applied to `[[1, 2], [3, 4]]` and `[[0, 1], [1, 0]]` gave the zero matrix as
  its first element: the products were built while `A` and `B` were still
  numbers, and cancelled. It now gives `([[-1, -3], [3, 1]], -2, -1)`, as the
  body with the determinants first does. When a later use changes the type of a
  parameter from a number type to another type, the body is boxed once more with
  the parameter starting at that type. `x ↦ (x + x, Length(x))` on `[1, 2, 3]`
  called the function on each element and gave three errors; `x` is now typed
  `collection`, and the result is `([2, 4, 6], 3)`, as for
  `x ↦ (Length(x), x + x)`. `x ↦ Sin(x) + Length(x)` on `[0, 0]` gives `[2, 2]`.
  A product of untyped parameters with no other use is still a product of
  numbers: `(A, B) ↦ A·B − B·A` gives the zero matrix (CE-1270).
- **A timeout inside a cell of a batch stops the batch.** When the time limit of
  `ce.withTimeLimit()`, or the `deadline` of a task on a worker, expired inside
  a cell of `broadcast()` or `broadcastAsync()` (an integral, a long sum), the
  cell was `NaN` and the batch went on, so `done` counted cells with no value.
  `broadcast()` now throws the `CancellationError`, as `run()` does, and a slice
  stops at that cell: the cells before `done` are all valid. A cell over its
  `iterationBudget` is still `NaN`.
- **A variable that held a list and is given a number has the type `integer`.**
  After `L := [1, 2]` and then `L := 7`, the type of `L` was the literal type
  `7`, so `L = 7` was typed `true` and code compiled in that state returned the
  branch for `7` for any input value. It is `integer`, as after a first `L := 7`
  (CE-1304).

- **`.N()` of an exact sum whose terms cancel gives the correct digits.** When
  the terms of a sum are exact (`\pi`, `e^{20}`, `\sqrt{2}`, a large integer)
  and their sum is much smaller than the largest term, the sum is computed again
  at a higher precision. The remainder
  `81129638414606663681390495662081 \bmod \sqrt{2}` evaluates to
  `81129638414606663681390495662081 - 57367317478180994538678159693372\sqrt{2}`,
  whose numeric value was `9500000000`; it is `1.05464095093706286692`.
  `\pi\cdot10^{30} - 3141592653589793238462643383279` was `2643000000`; it is
  `0.502884197169399375106`. The float of `1/(\sqrt{10^{40}+1} - 10^{20})` was
  `~oo`; it is `200000000000000000000`. `\lfloor x \rfloor`, `\lceil x \rceil`,
  `\operatorname{sign}(x)` and the other functions whose result jumps still use
  the exact value of `x` under `.N()`.

- **A form boxed while a variable holds a value stays right after the value
  changes.** After `ce.assign('k', 4)`, `(x^2)^k` was boxed as `x^(2k)`, so
  after `k := 0.5` it gave `-3` at `x = -3` where `(x^2)^k` is `3`; a function
  `f(x) := (x^2)^k` defined then, and the compiled code of the expression, gave
  the same wrong value. With `p := 2`, `(p^2)^{1/2}` was boxed as `p` and gave
  `-2` after `p := -2`, also for `p` declared `real` and for an Epsil
  `let p: real = 2`. The form is now `(x^2)^k` and `Sqrt(p^2)` (CE-1280).

## 0.190.0 _2026-11-14_

### Breaking Changes

- **`ContinuedFraction` of a quadratic irrational is its periodic form, and
  every term it gives for an exact real is correct.**
  `ContinuedFraction(Sqrt(2))` was twenty terms `[1, 2, 2, …]`; it is
  `[1, [2]]`, where the last list is the period, as
  `ContinuedFraction((3 + Sqrt(7))/5)` is `[1, 7, [1, 2, 1, 8, 13, 8]]`. The
  result type is `list<integer | list<integer>>`. With a count `n`, the result
  is exactly `n` terms: `ContinuedFraction(ExponentialE, 40)` was 19 terms
  ending in a wrong `…, 12, 2`, and `ContinuedFraction(Sqrt(23))` ended in a
  wrong `…, 1, 4`. Another exact real is expanded at a precision that is doubled
  to check its terms, or stays unevaluated. `FromContinuedFraction([1, [2]])`
  reads the period back and is `Sqrt(2)`. (PR #571, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#570](https://github.com/cortex-js/compute-engine/issues/570))

### Improvements

- **`canCompile()` is exported by the main package.** A program that loads
  `@cortex-js/compute-engine` can ask whether an expression compiles to GLSL
  before it compiles it, without the `@cortex-js/compute-engine/compile`
  sub-path. It takes a LaTeX string, a MathJSON expression or an expression, as
  the free function `compile()` does. It is also on the object that the main
  bundle stores under `Symbol.for('io.cortexjs.compute-engine')`.

- **A call of a function with a declared scalar result keeps that result when
  the body ends after a loop.** With the Epsil function
  `f(B: list<integer>, k: integer) -> integer` that counts in a loop and returns
  the count, `f(L, 3)` with `L` declared `list<integer>` had the type
  `integer | list<any>`, and `if f(B, k) > 0 { out = 1 }` did not compile. The
  call is now `integer`, and the condition compiles, when each argument is a
  value of the type annotated on its parameter.

- **`Integrate` gives a closed form for a polynomial of degree up to 200 times
  `e^{ax+b}`, `\sin(ax+b)` or `\cos(ax+b)`.** `\int x^{10} e^{-x}\,dx` was left
  unevaluated after about 1.5 s; it is
  `-x^{10}e^{-x} - 10x^9e^{-x} - \cdots - 3628800e^{-x}`, and
  `\int_0^\infty x^{10} e^{-x}\,dx` evaluates to `3628800`. The same holds for
  `\int x^{10}\sin(x)\,dx` and for a symbolic coefficient `a`.

- **A block local whose value reads the outer variable of the same name
  compiles.** `compile()` of `Block(Declare(z, 'unknown', z + Z), 3z)`, the form
  of `z \coloneq z + Z; 3z`, declined with "reads the block local "z" before any
  statement gives it a value", and the expression ran in the interpreter. It
  compiles on the JavaScript, GLSL, Python and interval targets, and the value
  reads the outer `z`, as in the interpreter: with `z = 2` and `Z = 10` the
  compiled function gives `36`.

### Behavior Changes

- **A static error of an Epsil program has its engine error code in a `code`
  field, and a read before a declaration has the range of the name.** A
  `static-type-error` diagnostic of `checkEpsil()` and `executeEpsil()` has the
  field `code`, for example `assignment-to-undeclared-variable` or
  `read-before-declaration`, so a host does not read the message to tell which
  error it has. For `let a = b1 + 1` then `let b1 = 2`, the range of the
  `read-before-declaration` diagnostic was the whole statement `let a = b1 + 1`;
  it is the name `b1`, and each statement that reads the name before its
  declaration gets a diagnostic.

- **In an Epsil program, each assignment to an undeclared name is reported, in a
  block as at the top level.** `checkEpsil()` and `executeEpsil()` reported only
  the first assignment of each name in a block, a loop body or a function body:
  `for k in 1..3 { t = 1; u = 2; t = 3 }` gave two
  `assignment-to-undeclared-variable` diagnostics and `t = 1`, `u = 2`, `t = 3`
  at the top level gave three. Both give three now, each at its assignment.

### Performance

- **`compileShader()` refuses a body whose code would be too large before it
  analyzes the body.** A body statement that reads a point whose value is a deep
  graph of shared subexpressions (`u = u + sin(u)` repeated 24 times) took about
  14 s to report that the code would have more than 50,000 nodes; it reports it
  in about 20 ms.

### Resolved Issues

- **A copy of a compile result can be given to `runtime.load()` in TypeScript
  again.** Since 0.188.0, `{ ...result }` passed to `load()` or
  `loadBroadcast()` of `createJavaScriptRuntime()` was a type error
  (`Types of property 'profile' are incompatible`): the `profile` of a compile
  result admits `'ir'`, and the stored code admitted only `'numeric-kernel'`.
  The stored code now admits both. The loaders refuse code of the experimental
  profile `'ir'` with an error that names it, also when the copy sets a
  `runtimeVersion`: run such code with the `run()` of the compile result.

- **`ce.assign(name, undefined)` removes the value of a variable, as its
  documentation says.** It threw `Invalid definition for symbol "v"`. Now the
  declaration and the type of `v` stay, and `v + 1` evaluates to `v + 1`. A name
  with no definition stays undeclared; a constant and a name defined as a
  function throw an error.

- **A series at −∞ of a root of a square has the right sign, and a series at ±∞
  of a function with an absolute value or a step stays unevaluated.**
  `Series(1/(Sqrt(x^2) + 1), x, -oo, 3)` was `1/x - 1/x^2 + 1/x^3 + O(x^-4)`; it
  is `-1/x - 1/x^2 - 1/x^3 + O(x^-4)`, because `√(x²) = −x` for `x < 0`.
  `√(x² + x) − x` at −∞ is `−2x − 1/2 + …`, not `1/2 − …`. `1/|x|` and `1/⌊x⌋`
  at +∞ were `O(x^-4)`, without their term `1/x`; a series at ±∞ of a function
  with `Abs`, `Sign`, `Floor`, `Ceil`, `Round` or another step of `x` stays
  unevaluated.

- **A compiled function literal reads a number passed to a parameter whose uses
  make it `complex`.** The compiled `t ↦ LerchPhi(0.3, t, 2)` gave
  `Φ(0.3, 0, 2) ≈ 1.4286` at every `t`, so the compiled
  `D(LerchPhi(0.3, x, 2), x)` and `ND(t ↦ LerchPhi(0.3, t, 2), 2)` were about
  `0`; they are `-0.219975`. A literal compiled with `entryChecks: false` now
  also lifts a number passed to a parameter declared `complex`, and in
  `mode: 'complex'` a parameter whose uses make it `real` (`t ↦ Mod(t, 1)`)
  receives a number, where it gave `NaN`.

- **`EllipticF` and the incomplete `EllipticPi` are accurate at machine
  precision for an amplitude near `π/2` and a parameter near 1.** At
  `ce.precision = 'machine'`, `EllipticF(1.57079632679, 1)` was
  `27.428776665347943`, off by about `ln 2`; it is `26.73562948478799`
  (`artanh(sin φ)`). At `m = 1 - 10^{-12}`, `EllipticF(1.5707963, m)` was
  `15.175049215835525` and is `15.175023992482723` (a relative error of
  `1.7·10^{-6}`, now under `10^{-15}`). `EllipticPi(n, φ, m)` had the same error
  at the same operands. Compiled JavaScript gives the corrected values. At other
  operands a value changes at most in its last digit; precision above machine
  precision is unchanged.

- **`HurwitzZeta(s, m)` at a large order no longer evaluates to a closed form
  whose numeric value is 0.** `HurwitzZeta(21, 15).evaluate().N()` was `0`; it
  is `2.73172211187533517712e-25`, the value of `HurwitzZeta(21, 15).N()`. When
  `ζ(s) − Σ_{k<m} k^−s` would lose more than 6 digits under `.N()`, `evaluate()`
  keeps the call. The same holds for the two-operand `Zeta`. `HurwitzZeta(3, 2)`
  is still `Zeta(3) - 1`.

- **`DigitsFrom` reads a `0x` or `0b` numeral past 2^53 exactly.**
  `DigitsFrom("0x1fffffffffffffffff")` was `590295810358705700000`; it is
  `590295810358705651711`.

- **A compiled `Chop` of a complex value falls back to the interpreter.** With
  `z` declared `complex`, the compiled `Chop(z)` at `3 + 10^{-12}i` returned the
  value unchanged; the interpreter gives `3`, and the compilation now declines.

## 0.189.0 _2026-11-14_

### Breaking Changes

- **An expression boxed before its function is defined calls the definition of
  the scope it was boxed in, or of a parent of that scope.** A function of that
  name declared in a scope pushed later is not called. With
  `c = ce.box(['Add', ['h', 2], 1])` at the top, then `h := t ↦ 10t` at the top,
  then a pushed scope that declares `h := t ↦ t·Random()`, `c.evaluate()` called
  the `h` of the pushed scope and drew; it is `21`, and `c.isPure` is true. The
  compiled code of such a call calls the same `h`. To call the function of the
  pushed scope, box the expression in that scope.
- **The type of an expression no longer depends on the values that its symbols
  hold.** It depends on the declared or inferred types of the symbols, and on
  the values of constants. With `x` declared `real` and `x := 4`, `Sqrt(x)` was
  `real` and is now `complex`, the type for every real `x`. With `P` declared
  `collection<number>` and `P := [1, 2]`, `Sin(P)` was `list<number>` and is now
  `broadcastable<number>`, as for a `P` with no value. With
  `Q := Map(x ↦ 2x, P)`, `Sin(Q)` was `list<number>` and is now
  `broadcastable<number>`.
- **A symbol whose value reads other symbols has the type of that value as their
  types give it, not as their values give it.** With `y := x + 1`, then
  `x := 2`, `y` was `number` and is now `integer`: it follows the type of `x`,
  which the assignment of `x` sets. With `x` declared `real`, `x := 4` and
  `r := Sqrt(x)`, `r` was `real` and is now `number`, the type of `Sqrt` of a
  real. A change of the type of a symbol that the value reads is followed: with
  `L := [3, 1, 3, 2]` and `C := Map(k ↦ k + 1, L)`, `C` is `vector<integer^4>`,
  and `vector<integer^2>` after `L := [1, 2]`.

### New Features

- **Epsil execution can report individual statements.** `executeEpsil()` and
  `executeEpsilAsync()` accept `onStatement`, called after each top-level
  statement with its value, expression, original source index and range.
  `statementTimeLimitMs` sets an independent time limit for each statement.

- **`Zeta(s, -k)` evaluates exactly for an integer `s > 1` and a negative
  integer `-k`.** It is `ζ(s)` plus the `k` terms before the omitted one:
  `Zeta(2, -1)` is `1 + π²/6` and `Zeta(3, -1)` is `1 + ζ(3)`; past `k = 1000`
  the call stays unevaluated (PR #529, contributed by
  [enumeratio](https://github.com/enumeratio)).

- **`Beta`, `BetaRegularized`, `Erf`, `ErfInv`, `Gamma` and `GammaRegularized`
  take the incomplete and generalized call forms, and `PolyGamma(z)` is
  `PolyGamma(0, z)`.** `Beta(1/2, 2, 3)` was an `unexpected-argument` error and
  is `11/192`, the incomplete beta function `B_z(a, b)`; `Erf(z0, z1)` is
  `Erf(z1) - Erf(z0)`, `Gamma(a, z0, z1)` is `Γ(a, z0) - Γ(a, z1)`,
  `BetaRegularized(z0, z1, a, b)` is `I_z1(a, b) - I_z0(a, b)` and
  `ErfInv(z0, z)` is `ErfInv(z + Erf(z0))`. A difference of close endpoints
  keeps its digits: `N(Erf(1, 1 + 10^-100))` is `4.1510749742059470334e-101`.
  The new forms decline in compiled code (PR #567, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#566](https://github.com/cortex-js/compute-engine/issues/566)).

- **`UniformDistribution` takes Wolfram's other two forms.**
  `UniformDistribution([1, 3])` is `UniformDistribution(1, 3)` and
  `UniformDistribution()` is `UniformDistribution(0, 1)`;
  `Mean(UniformDistribution([1, 3]))` was a `missing` error and is `2`. (PR
  #569, contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#568](https://github.com/cortex-js/compute-engine/issues/568))

- **`Chop` takes a tolerance.** `Chop(0.004, 0.01)` was an `unexpected-argument`
  error; the second operand is now the tolerance, as in Wolfram's
  `Chop[x, tol]`: a real or imaginary part whose magnitude is at most the
  tolerance becomes 0. `Chop(0.004, 0.01)` is `0`, `Chop(3 + 0.002i, 0.01)` is
  `3` and `Chop([0.004, 0.5], 0.01)` is `[0, 0.5]`. Without it the engine's
  `tolerance` applies, as before. The JavaScript target compiles the tolerance;
  the interval target compiles a numeric tolerance and declines a symbolic one.
  (PR #541, contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#540](https://github.com/cortex-js/compute-engine/issues/540))

- **`EulerE(n)` is the Euler number Eₙ and `EulerE(n, x)` the Euler polynomial
  Eₙ(x).** They are Mathematica's `EulerE`. `EulerE(n)` is an exact integer for
  a non-negative integer `n` (`EulerE(4)` is `5`, an odd `n` gives `0`) and
  stays unevaluated past the same work limit as `BernoulliB`. `EulerE(n, x)` is
  exact at a rational `x` (`EulerE(4, 1/3)` is `22/81`), a float at a float `x`,
  and the expanded polynomial otherwise (`EulerE(2, x)` is `x^2 - x`). A
  negative `n` stays unevaluated. (PR #522, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`HarmonicNumber(n)` is the harmonic number Hₙ = Σ 1/k, and
  `HarmonicNumber(n, r)` the generalized harmonic number Σ 1/kʳ.** They are
  Wolfram's `HarmonicNumber`. A non-negative integer `n` with an integer `r`
  gives an exact rational (`HarmonicNumber(10)` is `7381/2520`), left
  unevaluated past a work limit. Under `N()` or with an inexact operand, the
  value is the continuation ψ(n + 1) + γ, or ζ(r) − ζ(r, n + 1) for `r` other
  than 1, for a real or complex `n` (`N(HarmonicNumber(1/2))` is
  `0.6137056388…`). A negative integer `n` is the pole `~oo`. It compiles to
  JavaScript and GLSL, and its derivative in `n` is `Trigamma(n + 1)`. (PR #519,
  contributed by [enumeratio](https://github.com/enumeratio))

- **`IntegerPartitions(n, kspec, parts, m)` lists the partitions of an
  integer.** As in Mathematica, each partition is a list of positive parts in
  non-increasing order, and the partitions are in reverse lexicographic order:
  `IntegerPartitions(4)` is `[[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]]`.
  `kspec` is a largest number of parts (`k`), an exact one (`[k]`) or a range
  (`[kmin, kmax]`, `[kmin, kmax, step]`, with `Infinity` or `All` for no limit);
  `parts` limits the sizes to a list of positive integers; `m` keeps the first
  `m` partitions. It is a lazy collection like `Combinations`:
  `Count(IntegerPartitions(n))` is `NPartition(n)` with no walk, and `At` reads
  a position from a table of counts. A count that needs more than a bounded
  amount of work is unknown. Parts that are not positive integers, and the `[m]`
  and `[m1, m2]` forms of `m`, are not supported: the call stays unevaluated.
  (PR #520, contributed by [enumeratio](https://github.com/enumeratio))

- **`PartitionsQ(n)` is the number of partitions of `n` into distinct parts.**
  It is the Wolfram Language `PartitionsQ` and, by Euler's theorem, also the
  number of partitions into odd parts. Like `NPartition`, it is 0 for a negative
  integer, applies to each element of a list, gives a float for a float operand
  and stays unevaluated for an `n` too large to compute. `PartitionsQ(10)` is
  `10`. (PR #521, contributed by [enumeratio](https://github.com/enumeratio))

- **The compile option `inputs` gives the types of the inputs at the call.**
  `compile(expr, { inputs: { x: 'real', P: 'tuple<real, real>' } })` reads `x`
  and `P` as inputs of these types, whatever the scopes declare for them and
  whatever values they hold, in the expression and in the functions it calls. No
  declaration and no pushed scope are needed, and nothing is declared after the
  call. With `g(t) := t x` and no declaration of `x`,
  `compile(g(2) + x, { inputs: { x: 'real' } })` is `_.x + _fn_g(2)`. With
  `n := [1, 2, 3]`, `n x` compiles to a broadcast over the stored list, and to
  `_.n * _.x` with `inputs: { n: 'real' }`. The other names of the expression
  keep the definitions they were boxed with. `canCompile()` takes the option
  too. The expression keeps the canonical form it was boxed with: give a type
  that is the type at boxing or a subtype of it, or box the expression in a
  scope that declares the name with the wider type. A name of `inputs` that a
  called function reads as a constant declines.

### Improvements

- **`evaluate()` gives the closed form of `PolyLog`, `HurwitzZeta`, `Zeta`,
  `LerchPhi`, the upper incomplete `Gamma`, `BetaRegularized`, the Airy
  functions at 0, `Hypergeometric1F1` and `Hypergeometric2F1` at exact arguments
  that have a standard one.** `PolyLog(2, 1/2)` was unevaluated and is now
  `π²/12 - ln²2/2`; `PolyLog(2, 2)` is `π²/4 - iπ ln 2`, `HurwitzZeta(s, 1/2)`
  is `(2^s - 1)ζ(s)` for any exact `s`, `HurwitzZeta(2, 1/4)` is `π² + 8G`,
  `LerchPhi(-1, 3, 1/2)` is `π³/4`, `Gamma(2, x)` is `(x + 1)e^-x`,
  `Gamma(1/2, z)` is `√π erfc(√z)`, `BetaRegularized(1/2, 2, 3)` is `11/16`,
  `AiryAi(0)` is `1/(3^(2/3) Γ(2/3))`, `Hypergeometric1F1(a, a, z)` is `e^z` and
  `Hypergeometric2F1(a, b, b, z)` is `(1 - z)^-a` (not on the cut `z > 1`) (PR
  #536, contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#533](https://github.com/cortex-js/compute-engine/issues/533)).

- **`evaluate()` gives the closed form of `Gamma`, `GammaLn`, `LogGamma`,
  `Digamma`, `Trigamma`, `PolyGamma` and `Beta` at exact arguments that have a
  standard one.** `Gamma(1/2)` was unevaluated and is now `√π`; `Gamma(-1/2)` is
  `-2√π`, `Digamma(1/4)` is `-γ - π/2 - 3 ln 2`, `Trigamma(1/4)` is `π² + 8G`,
  `PolyGamma(2, 3)` is `9/4 - 2ζ(3)`, `GammaLn(4)` is `ln 6`, `LogGamma(-3/2)`
  is `ln(4√π/3) - 2πi` and `Beta(3/2, 5/2)` is `π/16`. The arguments covered: a
  half-integer for `Gamma`, a rational with denominator 1, 2, 3 or 4 for
  `Digamma`, an integer, a half-integer or (for order 1) a quarter for
  `PolyGamma` and `Trigamma`, a positive integer or a half-integer for `GammaLn`
  and `LogGamma`, two half-integers for `Beta`. Past a size limit, or when the
  closed form would lose digits under `.N()`, the call stays unevaluated. `.N()`
  is unchanged (PR #535, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#532](https://github.com/cortex-js/compute-engine/issues/532)).

- **A circular or hyperbolic function of its own inverse folds under
  `evaluate()`, `.N()` and `simplify()`.** `Sin(Arcsin(x))` is `x` for the
  twelve pairs, and `N(Sin(Arcsin(5)))` was `5 - 3.0e-16i` and is `5`. For an
  exact real `y`, `Arcsin(Sin(3))` is `π - 3` and `Arccos(Cos(5))` is `2π - 5`;
  `Arcsin(Sin(x))` stays. `simplify()` also gives `Arccos(-x) = π - Arccos(x)`,
  `Cos(Arcsin(x)) = √(1 - x²)`, `Cos(i·t) = Cosh(t)`, `Sin(x)/Cos(x) = Tan(x)`
  and `Cosh(x)² - Sinh(x)² = 1`, and `Arcsin(Sin(4)).simplify()` no longer
  overflows the stack (PR #565, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#564](https://github.com/cortex-js/compute-engine/issues/564)).

### Behavior Changes

- **Inside a run, the type of an expression over a `const` local of a block does
  not come from the value that the local holds in that run.** In
  `do { const h = (k) => k + 1; map(h, [1, 2]) }`, the type of the `map` node
  read during the run (by an `evaluate` handler of the host) was `vector<2>` and
  is `list<unknown^2>`, the type it has before and after the run. The value is
  `[2, 3]` as before.
- **`Series` of a library function whose derivatives the engine cannot evaluate
  stays unevaluated.** `Series(Hypergeometric2F1(1, 1, 3, x), x, 1, 3)` was a
  sum of `Apply(Derivative(Hypergeometric2F1, …), 1, 1, 3, 1)` terms, which are
  not the coefficients: the function has a logarithmic branch point at `x = 1`.
  The same holds at a regular point: `Series(Zeta(x), x, 0, 3)`, which was
  `−1/2 + x·Apply(Derivative(Zeta, 1), 0) + …`, and the series of `LambertW`,
  `PolyLog` and `Hypergeometric2F1` at 0 stay unevaluated. A function the engine
  does not define (`f`) keeps its symbolic Taylor form `f(0) + f′(0)·x + …`. (PR
  #573, contributed by [enumeratio](https://github.com/enumeratio))

### Resolved Issues

- **`DedekindEta` of a complex `τ` carries the precision asked for.** At
  `ce.precision = 40`, `DedekindEta(0.3 + i)` was
  `0.7678448651091705 + 0.05906109778250378i`, a double's digits; it is
  `0.7678448651091705567421299051799721144743 + 0.05906109778250378247292565345689206690519i`.
  Above machine precision a `τ` with `Im τ < 0.001` stays unevaluated instead of
  returning a double: `DedekindEta(0.3 + 0.0005i)` at 30 digits was
  `0.0750263045067908 + 0.005904698221439741i` and is
  `DedekindEta(0.3 + 0.0005i)`. Machine precision is unchanged. (PR #561,
  contributed by [enumeratio](https://github.com/enumeratio); fixes
  [#555](https://github.com/cortex-js/compute-engine/issues/555)).

- **`AiryAi`, `AiryBi`, `ExpIntegralEi` and `LogIntegral` of a real argument
  carry the precision asked for.** At `ce.precision = 30`, `ExpIntegralEi(2)`
  was the double `4.95423435600189`; it is `4.95423435600189016337950513023`.
  `AiryAi(1/3)` was `0.2706826474593453` and is
  `0.270682647459345282887346318096`. A value the engine cannot compute to the
  digits asked for stays unevaluated: `ExpIntegralEi(5000)` and `AiryBi(200)`
  were `+∞`. Complex arguments, the Airy derivatives and machine precision are
  unchanged. (PR #562, contributed by
  [enumeratio](https://github.com/enumeratio); fixes
  [#554](https://github.com/cortex-js/compute-engine/issues/554)).

- **`BesselJ`, `BesselY`, `BesselI` and `BesselK` of a real argument carry the
  precision asked for, and a real non-integer order has a value.** At
  `ce.precision = 30`, `BesselJ(1, 1/3)` was the double `0.16436254381427073`;
  it is `0.164362543814270735363798698286`. `BesselJ(0.5, 2)` stayed
  unevaluated; under `.N()` it is `0.5130161365618278` at machine precision, and
  the same holds for `BesselY`, `BesselI` and `BesselK` at a positive argument.
  Above machine precision a value the engine cannot compute to the digits asked
  for stays unevaluated: `BesselI(0, 5000)` was `+∞` and is `BesselI(0, 5000)`.
  Integer orders at machine precision and compiled code are unchanged. (PR #560,
  contributed by [enumeratio](https://github.com/enumeratio); fixes
  [#553](https://github.com/cortex-js/compute-engine/issues/553)).

- **A call that returns a function keeps its type after it is evaluated.** With
  `f := y ↦ (x ↦ x + y)`, the node `f(q)` of `Apply(f(q), 5)` was typed
  `(x: unknown) -> number` before `evaluate()` and `any` after it. It is
  `(x: unknown) -> number` in both: the evaluation no longer writes on the
  operand `q` of the call.
- **`Zeta(s)` at a complex `s` gives its value to the precision of a double, or
  stays unevaluated.** `Zeta(0.5 + 1000i).N()` was
  `0.35633436719464573 - 0.9319978312332674i`, 3.7e-13 off, and
  `Zeta(0.5 + 10⁶i).N()` was 1.6e-9 off, both printed with sixteen digits. The
  first is now `0.35633436719439365 - 0.9319978312329936i` (2.4e-15 off);
  measured against mpmath, the relative error is at most 3e-13 for `|Im s|` up
  to about 12 868. Above that `Zeta(s)` stays unevaluated, as
  `HurwitzZeta(s, 1)` does, also where the value was correct:
  `Zeta(20 + 15000i).N()` had sixteen correct digits. The result is a double at
  every precision, as for the other complex special functions. (PR #559,
  contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#552](https://github.com/cortex-js/compute-engine/issues/552))

- **`BetaRegularized(x, a, b)` has a value at a real `x` outside `[0, 1]` where
  that value is real and a finite sum.** `BetaRegularized(2, 2, 3).N()` stayed
  unevaluated; it is `8`. For positive integers `a` and `b` the function is the
  polynomial `Σ_{j=a}^{a+b-1} C(a+b-1, j) xʲ (1-x)^(a+b-1-j)`, for any real `x`
  (`I_3(2, 3)` is `81`, `I_{-1/2}(2, 2)` is `1`); for `x > 1`, a real `a > 0`
  and an integer `b` up to 30 it is `B_x(a, b)/B(a, b)`
  (`BetaRegularized(2, 5/2, 3).N()` is `16.2634559672905930612…`). Both are
  computed at the working precision. A non-integer `b` with `x > 1`, a
  non-integer `a` with `x < 0`, a degree `a + b - 1` above 200, and a value that
  cancels to `0` stay unevaluated. `evaluate()` of an exact operand is
  unchanged. (PR #558, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#551](https://github.com/cortex-js/compute-engine/issues/551))

- **`Beta(a, b)` has a value at a complex operand under `N()`.**
  `Beta(1+i, 2).N()` stayed `Beta(1+i, 2)`; it is
  `0.10000000000000012 - 0.3000000000000001i` (exactly `0.1 - 0.3i`), the value
  of `Γ(a)Γ(b)/Γ(a+b)`. It is `0` where `a + b` is a non-positive integer, and
  `~oo` at a non-positive integer `a` or `b` with a complex partner, as with a
  real one. Measured against mpmath, the relative error is at most 3e-13 for
  `|Im a|` and `|Im b|` up to 300, and grows with them (2e-10 at
  `Beta(1 + 10⁵i, 1/2)`). The result is a double at every precision, as for the
  other complex special functions. `evaluate()` of an exact operand stays
  symbolic. (PR #558, contributed by
  [enumeratio](https://github.com/enumeratio))

- **`EllipticF(φ, m)`, `EllipticE(φ, m)`, `EllipticPi(n, φ, m)` and
  `EllipticPi(n, m)` give `N()` at the working precision for real operands with
  a real value.** At a precision of 30, `EllipticE(0.5, 0.3).N()` was the double
  `0.4939911447289684`; it is `0.493991144728968428148069987960`. `EllipticPi`
  where `1 - n sin²φ < 0` (`n > 1` for the complete form) is the Cauchy
  principal value, as at machine precision. A call stays unevaluated when the
  digits asked cannot be computed, for example `EllipticE(φ, 1)` at a precision
  of 100 with `φ` the first 420 digits of `π/2`, and when `m = 1` and
  `|φ| > π/2`, where the value is not finite. A value that is not real, such as
  `EllipticF(2, 2)`, is still a double complex number. Exact operands are read
  with guard digits under `N()`, as for `EllipticE(φ, m)` before; `evaluate()`
  of an exact operand is unchanged, and so are the values at machine precision.
  (PR #557, contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#550](https://github.com/cortex-js/compute-engine/issues/550))

- **`Series` at `DirectedInfinity` and `ComplexInfinity` expands in `1/x` or
  stays unevaluated.** `Series(sin(x)/x, x, DirectedInfinity(1), 3)` was a
  Taylor sum with `sin(DirectedInfinity(1))` in its coefficients; it stays
  unevaluated, as at `+∞`. `DirectedInfinity(1)` is read as `+∞` and
  `DirectedInfinity(-1)` as `−∞`: `Series(1/(x + 1), x, DirectedInfinity(1), 3)`
  stayed unevaluated and is `1/x − 1/x² + 1/x³ + O(x⁻⁴)`. At `ComplexInfinity`
  or `DirectedInfinity(i)`, the expansion is given only when it is the same at
  `+∞` and `−∞` and the function is analytic (`1/(x + 1)`).
  `Series(arctan(x), x, ComplexInfinity, 3)` was the expansion at `+∞`,
  `π/2 − 1/x + …`, which is wrong in the other directions; it stays unevaluated,
  as do `exp(x)` and `√x`. (PR #573, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#572](https://github.com/cortex-js/compute-engine/issues/572))

- **`MatrixRank` of a matrix of symbols is its full rank when the rank at one
  integer point is full.** `MatrixRank([[a, b], [c, d]])` and
  `MatrixRank([[x, 1], [1, x]])` stayed unevaluated; they are `2`, the rank for
  generic values of the symbols (a minor that is nonzero at one point is not
  identically zero), as `MatrixRank([[a, b], [a, b]])` was already `1`. A matrix
  whose rank is lower at every point tried, such as
  `[[a, b, c], [2a, 2b, 2c], [d, p, q]]`, and a matrix of entries that are not
  rational at integer points, such as `[[sin t, cos t], [cos t, sin t]]`, stay
  unevaluated. (PR #581, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#580](https://github.com/cortex-js/compute-engine/issues/580))

- **A sum of `kⁿ·rᵏ/k!` over an infinite range is a closed form.**
  `Sum(k^3/k!, k, 1, ∞)` stayed a `Sum`; it is `5e` (Dobiński's formula, `e`
  times the Bell number). `Sum(k^2·x^k/k!, k, 0, ∞)` is `(x² + x)·eˣ`, and a
  lower bound above 0 subtracts the terms below it. A polynomial over `k!` is
  the sum of its terms: `Sum((k^2 + k)/k!, k, 0, ∞)` is `3e`. The power `n` and
  the lower bound are at most 200. (PR #577, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#576](https://github.com/cortex-js/compute-engine/issues/576))

- **`Integrate` of a product of powers of `sin` and `cos` of a linear argument
  is a closed form.** `∫ sin³x dx`, `∫ cos⁵x dx`, `∫ sin³x cos²x dx` and
  `∫ sin⁴x dx` stayed `Integrate`. `∫ sin³x dx` is now `cos³x/3 − cos x`, and
  `∫ sin⁴x dx` is `3x/8 − 3 sin(2x)/16 − cos x·sin³x/4`. A constant factor and
  an argument `a·x + b` are read (`∫ 3 sin³(2x + 1) dx`), for powers up to 40.
  (PR #579, contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#578](https://github.com/cortex-js/compute-engine/issues/578))

- **`Zeta(0, a)` is `1/2 - a` for every `a`.** The two-argument `Zeta` omits the
  term where `n + a = 0`, but at `s = 0` every term is 1 and the omitted term
  counts, as in Mathematica: `Zeta(0, -1)` is `3/2` (was `1/2`) and `Zeta(0, 0)`
  is `1/2` (was `-1/2`). `.N()` and the compiled `Zeta` (JavaScript and GLSL)
  give the same value. For `s ≠ 0` the term stays omitted (PR #529, contributed
  by [enumeratio](https://github.com/enumeratio), fixes
  [#524](https://github.com/cortex-js/compute-engine/issues/524)).

- **The hyperbolic functions of `Ln(q)` for an exact rational `q`, and `Arsech`
  of a rational above 1, evaluate exactly.** `Sinh(Ln(2))` stayed unevaluated
  and is `3/4`, and `Tanh(Ln(3))` is `4/5`; `Arsech(2)` is `iπ/3`, the value
  `.N()` gives (PR #537, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#534](https://github.com/cortex-js/compute-engine/issues/534)).

- **A float parameter or point of a distribution gives a float under
  `evaluate()`.** `PDF(NormalDistribution(0, 1), 0.5)` was `0.6240… / √π`, exact
  on one side and a float on the other, and
  `PDF(NormalDistribution(0.0, 1), 1/2)` was exact; both are now
  `0.3520653267642995`. The rule applies to `PDF`, `CDF` and `Quantile` of the
  continuous distributions, to `Mean`, `Variance` and `StandardDeviation` of a
  distribution (`Mean(UniformDistribution(0.0, 4))` was `2` and is `2.0`), and
  to `PDF` of a discrete distribution at an integer-valued point
  (`PDF(PoissonDistribution(2), 3.0)` is `0.1804470443154836`). As in Wolfram, a
  discrete `CDF` reads a float point as its floor and stays exact
  (`CDF(PoissonDistribution(2), 2.5)` is `5 / e^2`), and the mass at a
  non-integer point is the exact `0`. The variance of
  `NormalDistribution(0.0, 1)` is `1`: it does not depend on the mean. (PR #569,
  contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#568](https://github.com/cortex-js/compute-engine/issues/568))

- **`Tabulate` takes any number of dimensions.** `Tabulate(Add, 2, 2, 2)` was
  boxed as `Tabulate(Add, 2, 2)`, which dropped the third dimension; it is now a
  `tensor<integer^(2x2x2)>`, and `Table(f, 2, 2, 2)` follows. The JavaScript and
  Python targets compile any number of dimensions. A dimension of 0 gives an
  empty list, as in Wolfram's `Array`: `Tabulate(f, 2, 0)` is `[[], []]` once
  materialized. (PR #530, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#525](https://github.com/cortex-js/compute-engine/issues/525))
- **`All` and `Any` report an operand they do not take.** `All(xs, p, 2)` was
  boxed as `All(xs, p)` and the `2` was ignored; it is now an
  `unexpected-argument` error, as the signature of `All` and `Any` says. (PR
  #530, contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#525](https://github.com/cortex-js/compute-engine/issues/525))
- **The `Shape` of a list of applications of an unknown function is read from
  its nesting.** `Shape([[a(1), a(2)]])` was `()` and is `(1, 2)`; a ragged list
  still has no shape. (PR #530, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#525](https://github.com/cortex-js/compute-engine/issues/525))

- **`First` and `Last` take the value of an empty collection, `Flatten` takes an
  infinite depth, `Fold` needs no seed, `Count` takes levels and `Unique` takes
  a test.** These are the call forms of Wolfram's `First[expr, def]`,
  `Flatten[list, Infinity]`, `Fold[f, list]`, `Count[expr, pattern, levelspec]`
  and `DeleteDuplicates[list, test]`; each was an error (`unexpected-argument`,
  `incompatible-type` or `missing`). `First([], 0)` is `0` and
  `First([1, 2], 9)` is `1`; the type of the call is the type of the element or
  of the default. `Flatten(xs, +oo)` flattens completely. `Fold(Add, [1, 2, 3])`
  is `Reduce([1, 2, 3], Add)`, `6`. `Count([[1, 1], 1], 1, 2)` counts the parts
  at levels 1 to 2, `3`; `[n]` names one level and `[from, to]` a range. A level
  specification that is not a positive integer, `+oo` or such a list, a
  predicate, or a lazy collection such as `Reverse(xs)` leaves the call
  unevaluated. `Unique([1, 2, 3, 4], (a, b) => a mod 2 == b mod 2)` is `[1, 2]`,
  and `Unique` of a string with a test is a string. The JavaScript and Python
  targets do not compile the new forms of `First`, `Last`, `Count` and `Unique`,
  and fall back to the interpreter. (PR #539, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#538](https://github.com/cortex-js/compute-engine/issues/538))

- **`PowerMod` and `PowerModList` take a rational base and a list, and
  `ChineseRemainder` takes a lower bound.** `PowerMod(1/2, 2, 7)` was an
  `incompatible-type` error and is now `2`: the base `p/q` is `p` times the
  inverse of `q` modulo `m`, and a base whose denominator has no inverse stays
  unevaluated (`PowerMod(1/2, 2, 4)`). `PowerMod([2, 3], 2, 7)` is `[4, 2]` and
  `PowerModList([2, 3], 2, 7)` is `[[4], [2]]`: a list operand threads, a scalar
  is held fixed, and lists of different lengths stay unevaluated.
  `ChineseRemainder([2, 3, 2], [3, 5, 7], 100)` is `128`, the smallest solution
  that is at least `100` (it was an `unexpected-argument` error). (PR #547,
  contributed by [enumeratio](https://github.com/enumeratio), fixes
  [#546](https://github.com/cortex-js/compute-engine/issues/546))

- **`NextPrime`, `DivisorSigma`, `FactorInteger`, `IsSquareFree`,
  `CatalanNumber` and `IsPerfect` take a rational or a non-positive operand.**
  `NextPrime(7/2)` was an `incompatible-type` error and is now `5`;
  `NextPrime(7/2, -1)` is `3`. `DivisorSigma(-1, 12)` stayed unevaluated and is
  now `7/3`: a negative order `-j` gives `σ_j(n) / n^j`, and a huge order stays
  unevaluated. `FactorInteger(12/35)` is `[(2, 2), (3, 1), (5, -1), (7, -1)]`,
  the primes of the denominator with negative exponents, and
  `IsSquareFree(6/35)` is `True` (both were `incompatible-type` errors).
  `CatalanNumber(1/2)` is `8/(3π)`: a positive half-integer is exact, and
  another positive real is computed from `Γ(2n+1) / (Γ(n+1) Γ(n+2))` for a float
  or under `N()`. `IsPerfect(-6)` and `IsPerfect(0)` are `False` (they stayed
  unevaluated). Integer operands are unchanged. (PR #543, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#542](https://github.com/cortex-js/compute-engine/issues/542))

- **`D` gives a closed form for the derivatives of `ErfInv`, `Beta`, `BarnesG`,
  `LogBarnesG`, the complete `EllipticK` and `EllipticE`, `HurwitzZeta` and
  `LerchPhi` in `a`, `LerchPhi` in `z`, and `ClausenCl` of a literal order.**
  Each was the inert `Apply(Derivative(f, …), …)`. `D(ErfInv(x), x)` is
  `½√π·e^(ErfInv(x)²)`, `D(HurwitzZeta(s, x), x)` is `−s·HurwitzZeta(s + 1, x)`,
  `D(Beta(a, b), a)` is `Beta(a, b)(ψ(a) − ψ(a + b))`, and `D(EllipticK(m), m)`
  is `(E(m) − (1 − m)K(m))/(2m(1 − m))`. An operand with no closed form keeps
  the inert form (`HurwitzZeta`, `LerchPhi` and `ClausenCl` in `s` or `n`). The
  coefficients of a `Series` follow: `Series(ErfInv(x), x, 0, 5)` is
  `½√π x + π^(3/2) x³/24 + 7π^(5/2) x⁵/960 + O(x⁷)`, and the error of
  `Beta(2.5 ± 0.1, 3)` is propagated. (PR #575, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#574](https://github.com/cortex-js/compute-engine/issues/574))

- **`D(f, [x, n])` is the `n`-th derivative of `f` in `x`, as `D(f, {x, n})`
  is.** `D(x^5, [x, 3])` is `60x²`; it stayed unevaluated. A pair of a variable
  and a number is read as an order: a negative order is an error, and a
  fractional or symbolic order, or an order above 1000, leaves the derivative
  inert. (PR #575, contributed by [enumeratio](https://github.com/enumeratio),
  fixes [#574](https://github.com/cortex-js/compute-engine/issues/574))

- **`FromDigits` takes any base, and `IntegerString`, `DigitCount` and
  `DigitSum` take a length or a position.** The base of `FromDigits` was an
  integer of at least 2: `FromDigits([1, 1, 0], -2)` is now `2`,
  `FromDigits([1, 2, 3], 1/2)` is `17/4` and `FromDigits([a, b, c], x)` is
  `a x^2 + b x + c` (all three stayed unevaluated). A digit or a base that is
  not an integer gives the sum of `d * base^k`, exact under `evaluate()` and
  numeric under `N()`, so `FromDigits([1.5, 2])` is now `17.0` instead of
  staying unevaluated, and the result type of `FromDigits` is `number` unless
  the digits are integers and the base is an integer. `IntegerString(5, 2, 8)`
  is `"00000101"`: with a length, the digits of `|n|` are padded with zeros or
  cut to the last digits. `DigitCount(5, 2, 0, 8)` is `6`: the digits are padded
  first. `DigitSum(1234, 10, 2)` is `3`, the sum of the first two digits, and
  `DigitSum(1234, 10, -2)` is `7`, the sum of the last two (these three calls
  were `unexpected-argument` errors). The length of `IntegerString`,
  `IntegerDigits` and `DigitCount` is at most 1,000,000:
  `IntegerDigits(5, 2, 10^9)` used to run until it ran out of memory, and now
  stays unevaluated. (PR #583, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#582](https://github.com/cortex-js/compute-engine/issues/582))

- **`Transpose` with axes is written as a call, so its LaTeX reads back.**
  `["Transpose", "a", 2, 1]` was written `a^T`, which reads back as
  `["Transpose", "a"]`; it is `\operatorname{Transpose}(a, 2, 1)`. Only the
  one-argument form is written `a^T` (PR #518, contributed by
  [enumeratio](https://github.com/enumeratio), fixes item 2 of
  [#517](https://github.com/cortex-js/compute-engine/issues/517)).
- **A `Derivative` with a symbolic order, or with one order per argument, reads
  back from its LaTeX.** `["Derivative", "f", "k"]` was written `f^{\prime}`, a
  first derivative; it is `f^{(k)}`. With `f` a function, `f^{(0,1)}` parses as
  `["Derivative", "f", 0, 1]`, the form written for that expression; it was an
  `incompatible-type` error (PR #518, contributed by
  [enumeratio](https://github.com/enumeratio), fixes items 3 and 4 of
  [#517](https://github.com/cortex-js/compute-engine/issues/517)).
- **A factorial before `=` is written so that it does not read as `\ne`.**
  `Equal(Factorial(5), 5)` was written `5!=5`, which reads back as
  `NotEqual(5, 5)`; it is `5! =5` (PR #518, contributed by
  [enumeratio](https://github.com/enumeratio)).
- **`Arcsec(x)` is written `\operatorname{arcsec}(x)`.** It was written
  `\mathrm{arcsec}(x)`, which reads back as the arcsecond unit, or as an unknown
  function `arcsec` once canonical (PR #518, contributed by
  [enumeratio](https://github.com/enumeratio)).

- **`A \setminus B \setminus C` is `SetMinus(A, B, C)`, the difference read from
  left to right.** It was read as `SetMinus(A, SetMinus(B, C))`, a different
  set: `\{1,2,3,4\} \setminus \{2\} \setminus \{4\}` evaluated to `{1, 3, 4}`;
  it is `{1, 3}`. `SetMinus(A, B, C)` was already written as that chain, and it
  now reads back. `\backslash` reads the same way, and a parenthesized operand
  stays nested: `A \setminus (B \setminus C)` (PR #585, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#584](https://github.com/cortex-js/compute-engine/issues/584)).

- **`\triangle` (`SymmetricDifference`) binds as tightly as `\cup` and `\cap`.**
  It had the precedence of `=`, so `a \triangle b = c` was read as
  `a \triangle (b = c)`, an `incompatible-type` error once canonical. It is now
  `Equal(SymmetricDifference(a, b), c)`, and a set identity such as
  `A \triangle B = (A \setminus B) \cup (B \setminus A)` parses as an equation.
  A mix with `\cup` or `\cap` without parentheses now nests to the right, as
  `\cup` and `\cap` do with each other: `A \cup B \triangle C` is
  `Union(A, SymmetricDifference(B, C))` (PR #587, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#586](https://github.com/cortex-js/compute-engine/issues/586)).

- **`ExtendedGCD` takes any number of integers, and `Fibonacci` and `BellNumber`
  take a second operand, the variable of their polynomial.**
  `ExtendedGCD(12, 18, 27)` was an `unexpected-argument` error; it is
  `(3, 4, -4, 1)`, the GCD and one Bézout coefficient per operand
  (`12·4 + 18·(-4) + 27·1 = 3`). `Fibonacci(10, x)` is the Fibonacci polynomial
  `x^9 + 8x^7 + 21x^5 + 20x^3 + 5x` and `BellNumber(4, x)` the Bell polynomial
  `x^4 + 6x^3 + 7x^2 + x`; an index past 1000 stays unevaluated.
  `Binomial(n, n)` and `Binomial(n, n - 1)` for a symbolic `n` evaluate to `1`
  and `n`. Compiled code declines `Fibonacci(n, x)`. (PR #545, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#544](https://github.com/cortex-js/compute-engine/issues/544))

- **The effects of a function literal are read from the scope it was boxed in.**
  A name that the literal calls resolves from the scope of its body and the
  scopes around it, not from the scope that is current when the effects are
  read, so the answer no longer changes with the reader. The effect slots that
  change:
  - In `Block(Declare(g, 'unknown', s ↦ Length(s)), Map(x ↦ g(x) + 1, S))` the
    literal was `(x: string) -> …` inside a run of the block and
    `(x: string) any -> …` after it. It is `(x: string) -> …` in both: a local
    that its block declares once with a literal, and writes nowhere else, has
    the effects of that literal. A local that the block writes again is `any`.
  - In the Epsil program `function g() { Random() }  function h(x) { g() + x }`,
    `h` was `(x: unknown) any -> …`; it is `(x: unknown) random -> …`.
  - A function that calls itself, or a function of the same block that calls it
    back, is no longer `any` for that call:
    `function f(n, acc) { let out = acc; if n > 0 { out = [...out, n]; out = f(n - 1, out) }; out }`
    is `(n: unknown, acc: collection<any>) -> collection<any>`, and `even`/`odd`
    defined in the body of a function are pure inside a call of that function
    and outside it.
  - In `Function(Function(1 + Return(), x), Return)`, the inner literal was
    `(x: unknown) any -> …`. It is `(x: unknown) -> …`: `Return` is the
    unannotated parameter of the enclosing literal, which is optimistically
    pure, as for a direct call. The same holds for
    `Function(Apply(Function(1 + Return(), x), 5), Return)`.
  - With `h` defined in a scope that a reader pushes, a literal boxed outside
    that scope keeps the effects of the `h` it reads: with a pure global `h` and
    a pushed scope that declares a drawing `h`, `x ↦ h(x) + 1` stays
    `(x: unknown) -> number`, and a literal boxed in the pushed scope stays
    `(x: unknown) random -> number` after the scope is popped.
- **The value of a `vars` or `symbolic` input is hidden in a function body that
  was written before the input was declared.** With `f(x) := |a| x` defined
  first, then `a: real` holding 4, then a scope that declares `a` again with no
  value, `compile(f(x), { symbolic: ['a'] })` emitted `x * _.a` for the
  function: the name had no definition when the body was boxed, and the
  declaration it reads now was not among those whose value the compilation
  hides. It emits `x * Math.abs(_.a)`.
- **A compilation target called directly reads the `symbolic` option.**
  `new JavaScriptTarget().compile(expr, { symbolic: ['a'] })`, and the same call
  on the shader targets and the Python target, ignored the option and folded the
  value of `a`. Only `compile()` and the interval target read it.
- **A name of `symbolic` or `vars` that the compilation does not read has no
  effect.** A name that the expression, the functions it calls and the values it
  reads never use is no longer refused (a constant, a function, a name with an
  inferred type), and it no longer keeps the compilation from running in the
  scope of the expression: with `a` holding 10, `a + x` boxed, and a pushed
  scope that declares `a` again and `b`, `compile(expr, { symbolic: ['b'] })`
  declined, and is `10 + _.x`. A host can list every name that its scopes
  declare with no value.
- **A `symbolic` name that is a function declines.** A name defined with
  `g(t) := …` was silently left as a function. The compilation now declines with
  the name in `binding`, as for a name that holds a function literal.

- **`IntegerString` and `DigitsFrom` keep an integer past 2^53 exact.**
  `IntegerString` read its operand as a double, so a large integer lost digits
  and, in base 10, came out in exponent notation: `IntegerString(Factorial(30))`
  was `"2.65252859812191058636e+32"` and is now
  `"265252859812191058636308480000000"`, and `IntegerString(Factorial(50), 16)`
  was `"49eebc961ed2780000000000000000000000000000000000000000"` and is now
  `"49eebc961ed279b02b1ef4f28d19a84f5973a1d2c7800000000000"`. `DigitsFrom`
  summed the digits in a double too:
  `DigitsFrom(IntegerString(Factorial(50), 16), 16)` was
  `3.0414093201713376e+64` and is now 50! exactly. Small and negative values are
  unchanged. (PR #528, contributed by
  [enumeratio](https://github.com/enumeratio), fixes
  [#523](https://github.com/cortex-js/compute-engine/issues/523))

### Performance

- **A run keeps the cached types.** The end of a call, of a block or of a loop
  step no longer makes the engine compute the types of the expressions again:
  the pop of a scope changes no type, and only a pop that reverts an assumption
  invalidates them. One call of a program of nested functions over a list of 64
  cells (the shape of a board-game prelude) computed 13,184 types and took about
  230 ms; it computes 8 and takes about 102 ms. A loop of 200 steps, and a
  recursive function called 50 times, no longer invalidate the types at each
  step or call.

## 0.188.1 _2026-11-13_

### New Features

- **The compile option `symbolic` names the symbols that are inputs of the
  compiled code.** `compile(expr, { symbolic: ['a'] })` reads `a` as an input
  wherever the compilation reads its name: in the expression, in the bodies of
  the functions that the expression calls and in the values of the symbols that
  it reads. Its stored value is not folded, and no analysis of the compiler
  reads it: with `a: real` holding 4 and `f(x) := |a| x`, `f(x) + a` compiles to
  `4 + _fn_f(_.x)` without the option and to `_.a + _fn_f(_.x)`, with
  `x * Math.abs(_.a)` for `_fn_f`, with it. Unlike `vars`, the option gives no
  source text: the name is emitted as any other input of the target. A host that
  declares a name in a scope pushed around a compilation (an axis, a parameter
  of a kernel) names it in `symbolic`, so that a function defined outside that
  scope reads the input too. A name whose type was only inferred from an
  assigned value, and a constant, make the compilation decline.

### Resolved Issues

- **A compilation reads each name from the scope the expression was boxed in, as
  its evaluation does.** With `a := 10`, `x + a` boxed, and then a pushed scope
  that declares `a` again with the value 1, the compiled code of `x + a` was
  `1 + _.x` on every target, where `evaluate()` reads 10; it is now `10 + _.x`.
  A user function that the expression calls is the one it was boxed with. An
  expression boxed in a scope that was popped compiles with the definitions of
  that scope. An expression built from operands boxed in scopes that give a name
  different definitions (`ce.function('Add', [a, b])`) declines with the code
  `compile-error` and the name in `binding`, and falls back to the interpreter
  (CE-1273).

- **The value of a `vars` input is hidden in the body of a function that the
  compiled expression calls.** With a slider `a: real` that holds 4,
  `f(x) := |a| x`, a scope that declares `a` again with no value and
  `compile(f(x), { vars: { a: '_.a' } })`, the emitted function was `x * _.a`:
  the compiler read the outer value 4 in the body and dropped the absolute
  value, so `a = -3`, `x = 2` gave −6. It is now `x * Math.abs(_.a)`, which
  gives 6. The value is hidden on every definition that an occurrence of the
  name reads, in the expression, in the bodies of the functions it calls and in
  the values of the names it reads. A name that `vars` maps is an input wherever
  it is read, and takes no part in the choice of the scope of the compilation.

## 0.188.0 _2026-11-13_

### Breaking Changes

- **The parameter of a family of roots is `["ArbitraryInteger", k]`, and a
  constant of integration is `["ArbitraryConstant", k]`.** They were the symbols
  `t`, `t_1`, … and `c_1`, `c_2`, …. The free parameter of an identity is
  `["ArbitraryConstant", 1]`, where it was `t`. `Solve(sin(x) = 0, x)` was
  `[π·t]` and is now `["List", ["Multiply", "Pi", ["ArbitraryInteger", 1]]]`;
  `DSolve(y' = y, y, x)` was `y = c_1·eˣ` and is now
  `y = ArbitraryConstant(1)·eˣ`.
- **The constants are not in `unknowns`, `symbols` or `freeVariables`.** A host
  finds them by their operator.
- **`subs()` and `ce.assign()` no longer reach a constant.** `r.subs({ t: 2 })`
  and `ce.assign('c_1', 2)` leave a result as it is. Replace the constant
  instead:
  `r.replace({ match: ce.box(['ArbitraryInteger', 1]), replace: 2 }, { recursive: true })`.
- **A solve for the parameter of a result needs that replacement first.** An
  unknown of `Solve` is a symbol, and a constant is not one: to solve
  `π·ArbitraryInteger(1) = 3π` for the parameter, replace the constant with a
  symbol, then solve for that symbol.
- **A solve declares nothing.** `t` stays free for the user: after a solve,
  `ce.assign('t', 0.5)` is accepted, where it threw a type error, and an
  expression in `t` made after a solve no longer has the type `integer`. The
  result of a solve no longer depends on the names that were declared or used
  before it: after `ce.parse('t + 1')`, `Solve(sin(x) = 0, x)` was `[π·t_1]`,
  and is now the same as in a new engine.
- **A compilation of a result with a constant declines.** It took `t` or `c_1`
  as an input; the result now names the operator in `unsupported`. A host
  replaces the constant with a symbol of its own first.
- **The LaTeX of a constant is `\constant{n_{1}}` or `\constant{c_{1}}`.** A
  family is `\pi\constant{n_{1}}`, shown as `π n_1`, where it was `\pi t`. A
  renderer needs the macro `\constant`, which shows its argument
  (`\newcommand{\constant}[1]{#1}`); without it, the formula is an error.
- **A constant is never inferred as a variable.** `Solve` and `D` with no stated
  variable infer it from the free names: a result that held `t` could make
  `Solve` of that result infer `t`.

- **`ce.checkpoint()`, `ce.restore()` and `ce.discard()` are removed**, with the
  type `EngineCheckpoint` and the class `CheckpointError`; they were deprecated
  since 0.187.0. To give names values for one computation, use
  `ce.withValues()`; to make declarations that are undone together, declare them
  in a scope pushed with `ce.pushScope()` and remove them with `ce.popScope()`.
  The internal `_restoreCheckpointSnapshot()` of an operator definition is
  removed too, so a test that injected a failure of a restore through it has
  nothing to call. `ce.loadLibrary()` no longer depends on a checkpoint: when a
  declaration of the library fails, the declarations made before it are removed,
  also during an evaluation, where before they stayed. The environment variable
  `CE_CHECKPOINT_CANARY` has no effect.
- **The environment variable `CE_BINDING_UNITS` and the internal field
  `ce._bindingUnits` are removed.** Boxing declares no name, as it does by
  default since 0.187.0, and no setting gives the earlier behavior:
  `CE_BINDING_UNITS=0` and `ce._bindingUnits = false` have no effect. A host
  that set either one declares its names, or calls `ce.infer()` on the
  expressions that use them.
- **The helper of a user function that shadows a library operator has a new name
  in compiled code.** A document that defines `Gamma` compiles a call of it as a
  call of a private copy: the copy was named `GammaUser` (emitted as
  `_fn_GammaUser`), and is now named by `ce.temporaryName()`, `Gamma_tmp1`
  (emitted as `_fn_Gamma_tmp1`). The values are the same. A host that compares
  emitted code, or that reads the helper name, sees the new name.
- **A local of a block is made only by a `Declare`, and an `Assign` never makes
  one.** An `Assign` writes the variable that is in scope. In a block, a
  function body, a binder body, a branch or a loop body, an `Assign` to a name
  that no scope declares is the error `assignment-to-undeclared-variable`:
  `["Block", ["Assign", "c", 5], ["Multiply", 2, "c"]]` with no `c` in scope was
  `10` and is now that error. Declare the local:
  `["Block", ["Declare", "c", "'unknown'", 5], ["Multiply", 2, "c"]]` is `10`.
  In Epsil a local is written with `let`, also at the top level of a program:
  `c = 5; 2c` is the error, `let c = 5; 2c` is `10`. In LaTeX, the first `:=` of
  a name in a `;` block is already a `Declare`, so `c := 5; 2c` is still `10`.
  Outside every block (`ce.assign()`, an `Assign` that the host evaluates), an
  assignment declares the variable in the current scope, as before.
- **A `Declare` is allowed only at the top level of a block.** A `Declare` in a
  branch of an `If` or in a loop body is the error
  `declaration-below-statement`:
  `["Block", ["If", "True", ["Declare", "t", "'integer'", 3]], "t"]` was `3`.
  The error `first-assignment-in-branch` is removed: a first assignment in a
  branch is now `assignment-to-undeclared-variable`.
- **A function statement in a block or a function body declares a local variable
  that holds a function, and the errors of a block local apply to it.** A call
  before the statement is `read-before-declaration`: in Epsil,
  `do { let a = g(2); function g(x) { x + 1 }; a }` was `3`. A second function
  statement of the same name, or a `let` or `Declare` of that name in the same
  block, is `variable-redeclaration`:
  `do { function g(x) { x + 1 }; function g(x) { x + 2 }; g(2) }` was the error
  `function-redefinition`, and
  `["Block", ["Declare", "g", "'unknown'", 1], ["DefineFunction", "g", …], ["g", 2]]`
  was `invalid-clause-definition`. The type of the local is the signature that
  the statement writes, and `function` when it writes none:
  `do { function g(x) { x + 1 }; type(g) }` was `(x: unknown) -> number` and is
  `function`. A function statement at the top level of a program, and a `let` of
  a function literal anywhere, are unchanged.
- **The top level of an Epsil program follows the rules of a block.** A read
  before a `let` is `read-before-declaration`: `let a = q + 1; let q = 2; a` was
  `3`. An assignment in a value operand to a name that is not declared
  (`["Sum", ["Assign", "s", ["Add", "s", "i"]], ["Limits", "i", 1, 3]]`) is
  `assignment-in-operand`, as before.
- **An expression reads its names from the scope it was boxed in.** A
  declaration or an assignment in a scope pushed after the expression was boxed
  is not read: with `e = ce.parse('x+1')`, then `ce.pushScope()` and
  `ce.assign('x', 3)`, `e.evaluate()` was `4` and is `x + 1`, and with
  `ce.declare('x', 'integer')` in the pushed scope `e.type` was `integer` and is
  `number`. A declaration made later in the scope the expression was boxed in,
  or in one of its parents, is read, as before: without the `pushScope()`,
  `e.evaluate()` is `4`. To read the current scope, bind the expression again:
  `ce.rebind(e).evaluate()` is `4`. A scope that was popped keeps its
  definitions for the expressions boxed in it: with `ce.pushScope()`,
  `ce.declare('x', 'integer')`, `ce.assign('x', 5)`, `e = ce.parse('x+1')` and
  `ce.popScope()`, `e.evaluate()` was `x + 1` and is `6`. To give a name a value
  for one evaluation, or to hide its value, use
  `ce.withValues({ x: 3 }, () => e.evaluate())` in place of a declaration in a
  pushed scope: it writes on the definition that the expression reads, so it
  also reaches a stored function that the expression calls, which `ce.rebind()`
  does not.
- **`Type(x)` of a name with no declared type is the type of the value it holds,
  and of a declared name its declared type, in a block as at the top level.**
  `do { let v = [1, 2, 3]; v = [4]; type(v) }` was `vector<integer>` and is
  `vector<integer^1>`, as at the top level.
  `function f(x: list) { type(x) }; f([1, 2])` was `list<integer>` and is
  `list`. An untyped parameter gives the type of its argument, as before:
  `function f(x) { type(x) }; f(1)` is `integer`.
- **A lazy list stored in a variable is a closure.** A lazy collection that
  stays lazy when it is assigned (a `filter` or a `map` of an endless range, a
  lazy comprehension) reads the variables of its callback when an element is
  computed, as a function does; it no longer stores their values at the
  assignment. With `let k = 3; let big = filter(1..oo, c => c > k); k = 10`,
  `first(big)` was `4` and is now `11`. To keep the elements at a statement,
  list them there: `let firsts = listFrom(take(big, 3))` before `k = 10` gives
  `[4, 5, 6]`. A variable that is an operand of the collection (`xs` in
  `xs = filter(xs, p)`) still gives the value it holds at the assignment.
- **A `const` local of a block is ordered as a constant in a sum or a product,
  as a global constant is.** In Epsil,
  `function h(x: real) -> real { const i = floor(x); 30001 + i }` compiles to
  JavaScript that returned `i + 30001` and now returns `30001 + i`. The value is
  the same. A `let` local and a parameter are ordered as variables, as before:
  with `let i = floor(x)`, the code returns `i + 30001`.
- **A name with no definition in the body of a function literal or of a `Block`
  is the free name of the scope that the expression is written in.** Boxing no
  longer declares a copy of it in the scope of the body. The `f` of
  `ce.box(['Function', ['Block', 'f'], 'x'])` and a later `ce.box('f')` were not
  `isSame` and now are; the same holds for `ce.box(['Block', ['Add', 'f', 1]])`.
  Values are unchanged: after `f := 5`, the literal applied to `3` is `5`, as
  before. A library operator name used as a value in a body (`N` in `x ↦ N + x`)
  is a free name too, as it is at the top level.
- **An assignment or a declaration with a value no longer types the symbol that
  is its value.** With `ce.declare('q', 'integer')` and
  `ce.declare('uu', 'unknown')`, `ce.assign('q', ce.symbol('uu'))` typed `uu` as
  `integer`; `uu` now keeps the type `unknown`. The same holds for
  `ce.declare('r', { type: 'real', value: ce.symbol('zz') })` with `zz` declared
  `unknown`. Declare the type of the symbol to give it one.

### New Features

- **The GLSL target passes the inputs that are locals of the caller to the
  shader functions that read them.** A host that runs the code inside a function
  of its own, `float userFn(float x, float y) { … }`, names those inputs in the
  new compile option `callerLocals`. A user function that reads one of them,
  directly or through another user function, takes it as a trailing parameter,
  in the sorted order of the names. With `g(u) := u + x` and
  `callerLocals: ['x']`, `g(1)` was `_fn_g(1.0)`, with the definition
  `float _fn_g(float u) { return u + x; }`, which reads a global `x`; it is now
  `_fn_g(1.0, x)`, with
  `float _fn_g(float u, float _in_x) { return u + _in_x; }`. A call passes the
  `vars` source of the name when it has one, and in
  `GLSLTarget.compileFunction()`, which takes the option too, a declared
  parameter by its name. A name with no GLSL value type that a function reads
  declines. Without the option, the code is unchanged; the other targets ignore
  it.

- **Two operators stand for the arbitrary constants of a result.**
  `["ArbitraryConstant", k]` is any number (a constant of integration, the free
  parameter of an identity) and `["ArbitraryInteger", k]` is any integer (the
  parameter of a family of roots, of a diophantine or a congruence solution).
  The index `k` is a positive integer literal; any other operand is an error. A
  call has no value: `evaluate()` and `N()` keep it. Inside one result, two
  calls with the same index are the same value, and two calls with different
  indexes are independent: `ArbitraryConstant(1) − ArbitraryConstant(1)`
  simplifies to `0`, and `ArbitraryConstant(1) − ArbitraryConstant(2)` stays.
  The indexes are given for one evaluation of `Solve`, `DSolve` or `RSolve`,
  from the smallest one that its input does not use: a solve whose equation
  holds `ArbitraryInteger(1)` gives its new parameter the index 2. Two results
  of two solves both use the index 1, so an expression that combines them
  identifies their constants; replace the indexes of one result first.

- **`\constant{c_{k}}` and `\constant{n_{k}}` read and write the constants in
  LaTeX.** `\constant{c_{1}}` is `["ArbitraryConstant", 1]` and
  `\constant{n_{1}}` is `["ArbitraryInteger", 1]`. Any other argument of
  `\constant` is an error. Without the command, `c_1` is a symbol, as before.

- **A macro: `ce.declare(name, { macro: body })`.** A macro keeps a raw MathJSON
  body and has no value and no type of its own. Where a name of the input
  (MathJSON or LaTeX) resolves to a macro, boxing replaces it by the body, boxed
  at that place, in the scope of the occurrence and in the same form (canonical,
  partial or structural). So a parameter or an index of the reader binds the
  names of the body, and an operator gives the value it gives for the body
  written in place of the name (`D(A, x)`, `\int A\,dx`):

  ```ts
  ce.declare('A', { macro: ['Multiply', 'k', 'x'] });
  ce.parse('\\sum_{k=1}^{3} A').evaluate(); // 6x
  ce.declare('B', { macro: ['Add', ['Power', 'x', 2], ['Power', 'y', 2]] });
  ce.assign('f', ['Function', ['Add', 'B', 1], 'x']);
  ce.box(['f', 3]).evaluate(); // y^2 + 10
  ```

  A parameter, an index or a local of the same name hides the macro. A position
  that takes a name (a parameter, an index, the variable of `D` or `Solve`, the
  target of `Assign` or `Declare`) is not an occurrence, and a symbol made with
  `ce.symbol()` is not expanded. The raw form keeps the name, and so does a held
  operand, also when `ReleaseHold` releases it. Nothing is expanded during an
  evaluation (`evaluate()`, `N()`, `simplify()`, `compile()`, `replace()`, ...):
  a name boxed then, such as the replacement of a rule or a `ce.parse()` in a
  host callback, is the plain name. A macro that reaches itself is
  `Error('macro-cycle', name)`. A macro is declared before the expressions that
  name it are boxed: an expression boxed earlier keeps the name, which has no
  value. `ce.assign()`, an evaluated `Assign` and `ce.withValues()` on a macro
  throw; a definition with `macro` takes no other field. In LaTeX, `A(x+1)` is a
  product.

- **Experimental: the `ir` profile of the JavaScript target.**
  `compile(expr, { profile: 'ir' })` compiles the expression with a new
  compiler; it can change or be removed without notice. A program or an option
  outside the profile declines with `outside-profile`, and `fallback` applies as
  for any other decline; without the option, nothing changes. A user function
  declared with the bare type `function` whose body is a list compiles, with the
  shape of its body, as one whose result is `list<unknown>`.

- **`ce.temporaryName(hint, ...avoid)` gives a name for a temporary symbol.** It
  returns `<hint>_tmp<n>`, with `n` the smallest integer from 1 for which the
  name has no definition from the current scope and does not occur in `avoid`:
  boxed expressions (each symbol, free or bound, and each operator name), single
  names, and sets of names. It keeps no state and declares nothing, so the same
  call in the same state gives the same name. A name that ends with `_tmp` and a
  positive integer is reserved for this method. The series, residue and
  contour-integration code, the solvers of `DSolve` and `RSolve`, and the
  compiler use it for their own auxiliary names.

  ```js
  ce.temporaryName('t'); // ➔ "t_tmp1"
  ce.temporaryName('t', ce.box(['Add', 't_tmp1', 'x'])); // ➔ "t_tmp2"
  ```

- **The `numeric-kernel` profile compiles user functions that read the inputs of
  the program.** A user function whose body reads a name that is not one of its
  parameters declined (`unsupported helper capture`). It now compiles when the
  name is an input of the program (`g(t) := t + x`): the function reads the
  input where it runs, as the existing compiler does, so a function of the host
  that changes the inputs object gives the same value. It also compiles when the
  name has a value that is an expression (`lv := x + 1`): the value is computed
  once per call and passed to the function. Both hold also where the function is
  applied to each element of a list (`g(L)`). Such a function still declines
  with a root `Function` literal, and, for a value that is an expression, as a
  function operand (`Map(h, L)`), in a local function, or under a binder of the
  name.

  ```js
  ce.declare('x', 'real');
  ce.assign('g', ce.box(['Function', ['Add', 't', 'x'], 't']));
  compile(ce.box(['g', 2]), { profile: 'numeric-kernel' }).run({ x: 1.5 });
  // ➔ 3.5
  ```

- **The `numeric-kernel` profile compiles more statement and loop forms.** These
  forms declined and now compile, with the values of the existing compiler:
  - a `Loop` over several index sets, nested with the first one outermost;
  - a `Loop` with no index set, which a `Break` ends;
  - a `Loop` over a list value (`Element(c, Reverse(L))`) or over a range with a
    step;
  - a `Comprehension` with several generators, with filters, over a list value,
    or over a range with a step, when its body, its filters and its later
    sources are pure;
  - a destructuring declaration or write of a literal tuple, or of the tuple
    value of a user function (`(a, b) ≔ (b, a + b)`), in the `strict` mode;
  - `Return(v)` in tail position;
  - `Continue` at the end of a branch of an `If` of a loop body;
  - a user function with a parameter that has a default value.

  These forms still decline, each with its cause in the message:
  - a `Break` in a loop over several index sets, which the existing compiler
    also declines;
  - a `Return` or a `Continue` elsewhere;
  - a default value of a parameter of the root `Function`.

  ```js
  ce.declare('n', 'integer');
  const fib = compile(
    ce.box([
      'Block',
      ['Declare', 'a', "'real'", 0],
      ['Declare', 'b', "'real'", 1],
      ['Loop', ['Assign', ['Tuple', 'a', 'b'], ['Tuple', 'b', ['Add', 'a', 'b']]],
        ['Element', 'k', ['Range', 1, 'n']]],
      'a',
    ]),
    { profile: 'numeric-kernel' }
  );
  fib.run({ n: 10 }); // ➔ 55
  const pairs = compile(
    ce.box(['Comprehension', ['Tuple', 'i', 'j'],
      ['Element', 'i', ['Range', 1, 3]],
      ['Element', 'j', ['Range', 'i', 3], ['Less', 'i', 'j']]]),
    { profile: 'numeric-kernel' }
  );
  pairs.run({}); // ➔ [[1, 2], [1, 3], [2, 3]]
  ```

- **The `numeric-kernel` profile compiles a user function applied to each
  element of a list, sums of lists, and `Max`, `Min` and `Equal` with lists.**
  These forms declined with `outside-profile` and now compile, with the values
  of the existing compiler: a user function with real or integer parameters
  (declared, inferred, a local function, or through `Apply`) called with a list
  of reals or of integers (`f(L)`, `g(L, x)`, `g(L, L)`, `f(A)` of a list of
  lists), whose value is the list of its values, one call per element in order,
  also when the function's value is a list; a `Sum` or a `Product` whose body is
  a list (`Sum(L·k, k, 1, 3)`, `Sum([k, 2k], k, 1, 3)`) with number literal
  bounds and a range that is not empty, or a body whose type states its width
  (`Sum(V·k, k, 1, 0)` of `V: vector<3>` is `[0, 0, 0]`); `Max` and `Min` of
  lists and numbers (one number); `Equal` and `NotEqual` of two lists of numbers
  (one boolean). Still declined: two list arguments of lengths that only the
  values decide (`g(L, M)`: declare one width), a list at an integer parameter,
  a sum of a list body with a bound such as `n` (`Sum(L·k, k, 1, n)`: the
  existing compiler gives a number, not a list, for an empty range or a bound
  that is not a safe integer), and `Equal` of two lists in the `complex` mode.

  ```js
  ce.declare('f', '(real) -> real');
  ce.assign('f', ce.box(['Function', ['Add', ['Square', 't'], 1], 't']));
  const u = compile(ce.box(['f', 'L']), { profile: 'numeric-kernel' });
  u.run({ L: [1, 2, 3] }); // ➔ [2, 5, 10]
  ```

- **The `numeric-kernel` profile compiles the scalar functions of a list, the
  comparisons of a list and the selections on them.** In the `strict` mode these
  forms declined with `outside-profile` and now compile, with the values of the
  existing compiler: a scalar function applied to each element of a list and
  real operands (`L^3`, `Exp(L)`, `Sqrt(L + 1)`, `Log(L, 2)`, `Mod(L, 3)`,
  `Hypot(L, x)`, `Round(L)`, `Gamma(L)`, `BesselJ(n, L)`, …), and of two lists
  whose lengths are equal by construction (one name, an element-wise result of
  it, two comprehensions over one range) or whose types state one width
  (`vector<3>`, `list<real^3>`); a comparison of a list (`L < 0`, `L == 3`) and
  `Not`, `And`, `Or` of such lists, whose value is a list of booleans, and `At`
  and `Length` of one; `If` and `Which` whose conditions are such lists, with
  arms that are reals or lists of the same length (`NaN` where no condition
  holds). Two lists of unstated lengths still decline (`L + M`, `Hypot(L, M)`):
  declare one width. Also declined: every element-wise function in the `complex`
  mode, `Arcsin` and the other inverse functions whose scalar value can be
  complex, `Beta`, `AGM`, `CosIntegral` and `GammaRegularized` of a list,
  `Sin(π·L)`, a power of a list by an exact fraction of odd denominator
  (`L^(2/3)`), a selection arm that draws, calls the host or can throw
  (`If(L > 0, Random(), 0)`, `If(L > 0, Length(Range(1, n)), 0)`), a list of
  booleans as an input, a local or the value of a helper, a list whose elements
  the existing compiler reads as complex numbers (`Arctan([√k for k in 1..n])`),
  `Max(L, x)` and `Equal(L, M)`.

  ```js
  ce.declare('L', 'list<real>');
  const f = compile(ce.box(['If', ['Less', 'L', 0], 0, ['Sqrt', 'L']]), {
    profile: 'numeric-kernel',
  });
  f.run({ L: [-1, 4, 9] }); // ➔ [0, 2, 3]
  ```

- **The `numeric-kernel` profile compiles names whose value is an expression,
  captured lists of lists and captured complex numbers.** These names declined
  with `unsupported binding` and now compile, with the values of the existing
  compiler. A name whose value is a pure expression of the inputs
  (`lv := x + 1`, a list `[x, 2y]`, a chain of such values) is computed once per
  call, before the body, as the existing compiler computes `_val_lv`; the name
  and each name whose value it reads are in `symbolDeps`. A value that is not
  pure, that reads the host, that a user function reads, whose names a parameter
  or an index binds where it is read, or that is real for a name declared
  `complex`, still declines. A captured list of lists (`rows := [[1, 2], [3]]`)
  is one array, made once, which no call writes: a result that can hold it or
  one of its rows is a copy, so a host that writes into the result does not
  change the next call; a result of rank 3 or more in such a program
  (`[rows, rows]`) declines. A captured complex number (`z0 := -0.5 + 2i`) is
  read as the existing compiler reads it. An input of a union of a number and a
  list (`u: list<real> | real`) still declines, with the union in the message.

  ```js
  ce.declare('x', 'real');
  ce.assign('lv', ce.box(['Add', 'x', 1]));
  ce.assign('rows', ce.box(['List', ['List', 1, 2], ['List', 3, 4]]));
  const f = compile(ce.box(['Add', ['Multiply', 2, 'lv'], ['Sin', 'lv']]), {
    profile: 'numeric-kernel',
  });
  f.run({ x: 0 }); // ➔ 2.8414709848078967
  const g = compile(ce.box(['Multiply', 'x', 'rows']), {
    profile: 'numeric-kernel',
  });
  g.run({ x: 2 }); // ➔ [[2, 4], [6, 8]]
  ```

- **The `numeric-kernel` profile compiles the functions of flat lists of numbers
  and the index operands that are not one integer.** These forms declined with
  `outside-profile` and now compile, with the values of the existing compiler:
  `Ordering`, `Unique`, `IndexOf`, `Contains`, `Second`, `Third`, `Most`,
  `IsEmpty`, `Append(L, x)`, `Repeat(x, n)` with an integer count, `Linspace`
  with finite literal bounds, `Slice`, the statistics `PopulationVariance`,
  `StandardDeviation`, `PopulationStandardDeviation`, `Skewness`, `Kurtosis`,
  `Mode`, `InterquartileRange`, `Covariance` and `Correlation`; `CountIf`,
  `Any`, `All`, `Find`, `IndexWhere`, `Position`, `TakeWhile` and `DropWhile`
  with a predicate literal (each stops at the element that decides, as the
  existing compiler does), and `Tabulate(f, n)` of one dimension; `At(L, x)`
  with a real index (`NaN` for a fraction), `At(L, I)` and `At(L, Range(a, b))`
  (a gather, `NaN` at an index out of range), and `Take` and `Drop` with a real
  count (rounded). A list of tuples or of lists still declines for most of these
  heads, and so do `Repeat` with a real count, `Linspace` with a bound that is
  not a finite literal, `Quartiles`, `Element(x, L)`, `DeleteAt`, `Insert`,
  `Partition`, `Chunk` and `Zip`.

  ```js
  ce.declare('L', 'list<real>');
  ce.declare('a', 'integer');
  ce.declare('b', 'integer');
  const f = compile(ce.box(['Sum', ['At', 'L', ['Range', 'a', 'b']]]), {
    profile: 'numeric-kernel',
  });
  f.run({ L: [1, 2, 3, 4], a: 2, b: 3 }); // ➔ 5
  ```

- **The `numeric-kernel` profile compiles the special functions and the
  number-theory heads of real operands.** These heads declined with
  `outside-profile` ("unsupported head") and now compile, with the values of the
  existing compiler: `GammaRegularized`, `StieltjesGamma`, `PolyGamma`, `Zeta`,
  `Beta`, `Binomial`, `Choose`, `GammaLn`, `Trigamma`, `Sinc`, `Erfi`, `ErfInv`,
  `FresnelS`, `FresnelC`, `SinIntegral`, `CosIntegral`, `ExpIntegralEi`,
  `LogIntegral`, `DirichletEta`, `DirichletBeta`, `ClausenCl`, `EllipticF`,
  `BesselJ`, `BesselY`, `BesselI`, `BesselK`, `AGM`, `Chop`, `Heaviside`,
  `Remainder`, `GCD`, `LCM`, `KroneckerDelta`, `Clamp`, `Boole`, and `Real`,
  `Imaginary` and `Argument` of a real operand. `HurwitzZeta`, `PolyLog`,
  `LambertW`, `EllipticK`, `EllipticE` and `Gamma` of two operands compile too;
  in the `complex` mode only where the value is proved real (`HurwitzZeta(k, y)`
  with `k` an integer), as the existing compiler writes the complex kernel
  elsewhere. A complex operand of these heads, the heads of three operands
  (`BetaRegularized`, `LerchPhi`), and `CosIntegral` of an operand that can be
  negative (the existing compiler gives the real part of a complex value there)
  still decline, and so do `GammaRegularized(a, z)` and `Gamma(s, z)` with a
  `z`, `AGM` with an operand, that is not provably non-negative, and `Beta` with
  an operand that is not provably positive: the existing kernels give `NaN`
  there, where the interpreter has a finite value for some arguments.

  ```js
  ce.declare('x', 'real<0..>');
  ce.declare('k', 'integer');
  const f = compile(ce.box(['Add', ['GammaRegularized', 3, 'x'], ['GCD', 'k', 6]]), {
    profile: 'numeric-kernel',
  });
  f.code; // ➔ "_SYS.gcd(_.k, 6) + _SYS.gammaQ(3, _.x)"
  ```

- **The `numeric-kernel` profile compiles an `If` or a `Which` whose conditions
  are constant.** A condition whose type is `true` or `false` selects its
  branch, and the code is that branch alone, as the existing compiler writes it:
  `If(2 < 3, x, Sqrt(x))` compiles to `_.x`. As an operand, the selection
  compiles only when the branch is a symbol with no value. An `If` of three
  operands whose selected branch is not a symbol or a number still declines: the
  existing compiler writes that branch with no parentheses
  (`2 · If(2 < 3, x + 1, 0)` is `2 * _.x + 1` there). A selection whose other
  branches widen its type beyond a number (a name with no declared type)
  declines too.

- **The `numeric-kernel` profile compiles a rounding function of a parameter
  that has the name of a symbol with a value.** With `ce.assign('t', 1/3)`,
  `Function(Floor(t), t)` compiles to `(t) => { return Math.floor(t); }`, where
  it declined with "Floor of an operand with the exact constant t".

- **The `numeric-kernel` profile compiles lists of lists.** In the `strict`
  mode, a value of the type `list<list<real>>`, `list<list<integer>>`, `matrix`
  or `matrix<m×n>` (rows of different lengths too) can be an input, a parameter,
  a local or a result, with the values of the existing compiler: literals of
  rows, comprehensions of rows, `At(M, i)` (a row, `undefined` out of range),
  `At(M, i, j)` (`NaN` out of range), `Length` of each level, `First`, `Last`,
  `Take`, `Drop`, `Rest`, `Reverse`, `Join`, the rotations and `ReplaceAt` of a
  row or of an element. The inputs are never written.

  ```js
  ce.declare('M', 'list<list<real>>');
  ce.declare('x', 'real');
  const f = compile(ce.box(['ReplaceAt', 'M', 1, 2, 'x']), {
    profile: 'numeric-kernel',
  });
  f.run({ M: [[1, 2], [3]], x: 9 }); // ➔ [[1, 9], [3]]
  ```

  A `tensor`, complex cells and the `complex` and `bigint` modes still decline.
  So do a product and a power of lists of lists (`M·M`): with `list<list<real>>`
  the value decides whether the product is a matrix product; declare a matrix as
  `matrix`.

- **The `numeric-kernel` profile compiles matrix functions, arithmetic and folds
  of lists of lists.** In the `strict` mode these forms compile, with the values
  of the existing compiler:
  - `Determinant`, `Trace`, `Inverse`, `MatrixPower` with an integer exponent,
    `MatrixMultiply`, `Dot` with a matrix operand, `Transpose`, `RowReduce`,
    `Diagonal`, `Flatten` and `Norm` (also with a numeric order);
  - element-wise `Add`, `Subtract`, `Multiply` by a number, `Negate` and
    `Divide` of a list of lists, and the sum of two whose lengths are equal at
    every depth by construction (`A + 2A`, `matrix<2x2> + matrix<2x2>`);
  - `Sum` and `Product` of the rows of a `matrix`, and `Map` of a function
    literal over the rows;
  - the product `A·B` of two `matrix` values, or of a matrix and a list.

  ```js
  ce.declare('A', 'matrix<2x2>');
  ce.declare('v', 'vector<2>');
  const f = compile(ce.box(['Add', ['Multiply', 'A', 'v'], 'v']), {
    profile: 'numeric-kernel',
  });
  f.run({ A: [[1, 2], [3, 4]], v: [1, 1] }); // ➔ [4, 8]
  ```

  A matrix that can have no value (the inverse of a singular matrix, a product
  whose dimensions do not agree: `NaN` in place of the matrix) is admitted only
  as the result, as the operand of a matrix function or as the list of `At`;
  elsewhere the compilation declines. A product of lists of lists that are not
  declared `matrix`, a product of more than two factors, the sum of two `matrix`
  inputs of no stated dimensions, `Max`, `Filter`, `Reduce` and `Scan` of rows
  still decline.

- **The `numeric-kernel` profile compiles captured lists, folded constants and
  unread parameters.** Four forms that declined with `outside-profile` now
  compile, with the values of the existing compiler:
  - a name whose value is a list of finite real numbers
    (`ce.declare('L', { type: 'list<integer>', value: [10, 20, 30] })`): the
    list is one array of the code, made once when the compiled function is made,
    and the name is in `symbolDeps`;
  - a name read in the frame of a call that the interpreter is making (`d` in
    `f(d) := Sum(Map(x ↦ x + d, Range(1, 128)))`);
  - a rounding, a sign, a remainder or a comparison of exact operands that read
    no input (`Floor((25! − 1)/24!)`, `Less(a, b)` of two captured rationals),
    written as the literal of its value; and `Mod(x, 1)` of a dividend that is
    not integer-valued;
  - a parameter of the root `Function` that the body never reads, whatever its
    type.

  ```js
  ce.declare('x', 'real');
  ce.declare('k', 'integer');
  ce.declare('L', { type: 'list<integer>', value: ['List', 10, 20, 30] });
  const deps = new Set();
  const f = compile(ce.parse('L_{k} + x'), {
    profile: 'numeric-kernel',
    symbolDeps: deps,
  });
  f.code; // ➔ "_.x + _SYS.atNumeric(_tv1, _.k, \"integer\")"
  f.preambleOnce; // ➔ "const _tv1 = [10, 20, 30];\n"
  f.run({ k: 2, x: 0.5 }); // ➔ 20.5
  [...deps]; // ➔ ["L"]
  ```

  A `ParallelLoop`, an `If` whose condition has a constant type, `Mod(k, 1)` of
  an integer `k`, and a captured value that is an expression of the inputs still
  decline.

- **The `numeric-kernel` profile of `compile()` admits integrals and derivatives
  that have a closed form.** An `Integrate`, `D`, `ND` or `Derivative` node, and
  an applied derivative (`f'(x)`), declined with `outside-profile` ("unsupported
  head Integrate"). In the `strict` mode the profile now compiles such a node
  when the engine finds its closed form at compile time, as the compiler without
  the profile does: the code is the code of the closed form, with the same
  values.

  ```js
  ce.declare('a', 'real');
  ce.declare('x', 'real');
  const f = compile(ce.parse('\\int_0^a e^{-t^2} dt'), { profile: 'numeric-kernel' });
  f.run({ a: 1 }); // ➔ 0.746824132812427
  const g = compile(ce.parse('\\frac{d}{dx} \\sin(x^2)'), { profile: 'numeric-kernel' });
  g.run({ x: 1 }); // ➔ 1.0806046117362795
  ```

  An integrand that draws, the `complex` mode and `NIntegrate` still decline
  with `outside-profile`; a derivative with no closed form and `Limit` compile
  numerically (below).

- **The `numeric-kernel` profile of `compile()` integrates numerically a
  definite integral that has no closed form.** Such an integral declined with
  `outside-profile`. In the `strict` mode the profile now writes the call of the
  compiler without the profile, `_SYS.integrate`, with the integrand as a
  function of its variable, one call per `Limits` clause (the first clause
  outermost) and the same starting panel count: the integrand is evaluated at
  the same points, in the same order, and the result is the same number. The
  integrand can read inputs, captured numbers, the locals of a block and a loop
  index, and call user functions; the integral can be in a branch, a `Loop`, a
  `Map`, another integral or the body of a user function. Such a result reports
  `pure: false` and `shippable: false`.

  ```js
  ce.declare('a', 'real');
  const f = compile(ce.parse('\\int_0^a \\sqrt{1+t^4} dt'), { profile: 'numeric-kernel' });
  f.run({ a: 1 }); // ➔ 1.0894294132248226
  ```

  Still declined: a bound that reads the variable of its own clause
  (`∫₀ˣ √(1 + x⁴) dx`), an integrand that reads or calls a function of the host,
  a `Sum` or a `Product` whose terms hold such an integral (below), and an
  indefinite integral with no closed form. A rounding of such an integral
  (`⌊∫₀ᵃ √(1 + t⁴) dt⌋`) compiles, and so does a rounding of the variable in the
  integrand when the variable also has a value of its own.

- **The `numeric-kernel` profile computes derivatives and limits numerically,
  integrals in log space, and the Monte Carlo estimator.** These declined with
  `outside-profile`; in the `strict` mode each one now writes the call of the
  compiler without the profile (with `constantFold: false`), with the body as a
  function of its variable, evaluated at the same points, in the same order:

  - a derivative with no closed form, `D(body, v)` of one symbol, `ND(f, x)` and
    `Apply(Derivative(f, n), x)` of a function literal of one parameter or of a
    user function whose result is a number: the stencil `_SYS.nd`;
  - `Limit(f, x)` and `Limit(f, x, d)` of a function literal: `_SYS.limit`, with
    no symbolic attempt, so a constant limit gives the value of the
    extrapolation (`1.0000000000000002` for `sin t / t` at 0, where the compiler
    without the profile folds it to `1` by default);
  - an integrand that the compiler without the profile computes again in log
    space where its value is not finite (`∫₀ᵃ t^b e^{-t} dt`): the same second
    function and `_SYS.finiteOr`;
  - the option `quadrature: 'monte-carlo'`: `_SYS.integrateMC`, which draws from
    the entropy source of the engine as before.

  ```js
  ce.declare('x', 'real');
  const d = compile(ce.box(['D', ['Zeta', 'x'], 'x']), { profile: 'numeric-kernel' });
  d.run({ x: 0.7 }); // ➔ -11.035491244462525
  const l = compile(
    ce.box(['Limit', ['Function', ['Divide', ['Sin', 't'], 't'], 't'], 0]),
    { profile: 'numeric-kernel' }
  );
  l.run({}); // ➔ 1.0000000000000002
  ```

  A derivative or a limit of a pure body reports `pure: true`. Still declined: a
  derivative of a function whose value is a point or a list, of several
  variables, or that the compiler without the profile computes with Taylor jets;
  a limit of a function that is not a literal, at `-∞` with no direction or at
  an infinity from the other side (the compiler without the profile then gives
  the limit at the other infinity) or at a point whose type admits an infinity
  (`real | signed_infinity`, `number`), or in a `Sum` or a `Product` (it can
  throw the timeout of a deadline); a body that draws or reads the host; the
  `complex` mode.

- **The `numeric-kernel` profile declines a `Sum` or a `Product` whose terms can
  throw.** The compiler without the profile stops a sum or a product at the
  first term that is `NaN`, and the profile evaluated every term:
  `Sum(Mod(1, j/k), Limits(j, 0, n))` at `k = 0` gave `NaN` without the profile
  and threw a `RangeError` with it (the second term divides by zero, and `Mod`
  of an infinite operand throws). A sum or a product declines with
  `outside-profile` when a term can throw where an earlier term is `NaN`, or
  integrates numerically, also through a user function or a function that `Map`
  or `Reduce` calls. `Mod` throws only for an operand beyond ±(2^53 − 1), so a
  `Mod` whose operands are each an index of the sum, an integer literal or the
  same value in every term stays admitted: `Sum(Mod(k, 3), Limits(k, 1, n))`,
  `Product(1 + Mod(k, 2), Limits(k, 1, n))`, `Sum(Mod(k, m), Limits(k, 1, n))`
  with an input `m`. A term that reads or calls a function of the host is
  ordered and counted as before, and so is every term of a sum or a product of
  fewer than four written-out terms, which the compiler without the profile
  evaluates in full.

- **The `numeric-kernel` profile compiles lists of the type `list<number>` in
  the `strict` mode.** An input or a parameter of the type `list<number>`,
  `vector<n>` or `vector` declined (`outside-profile`: "the input L has the type
  list\<number>"). In the `strict` mode, the default, it is now a list of real
  numbers, as without the profile: `At`, `Length`, the folds, element-wise
  arithmetic and the functions of lists read it, with the values of the
  compilation without the profile. In the `complex` mode it still declines.

  ```js
  ce.declare('L', 'list<number>');
  const f = compile(ce.box(['Sum', ['Add', 'L', 1]]), { profile: 'numeric-kernel' });
  f.run({ L: [1, 2, 3] }); // ➔ 9
  ```

- **The `numeric-kernel` profile compiles a call of a user function declared
  with a parameter of the type `unknown`.** With
  `ce.declare('g', '(unknown) -> number')` and a function literal with no
  annotation as its value, a call `g(x)` declined ("the parameter t of the
  helper g has no type annotation"). Such a parameter now has the default kind
  of the mode, as for a function whose signature the engine inferred: a real
  number in the `strict` mode.

  ```js
  ce.declare('g', '(unknown) -> number');
  ce.assign('g', ce.box(['Function', ['Add', ['Multiply', 't', 't'], 1], 't']));
  ce.declare('x', 'real');
  compile(ce.box(['g', 'x']), { profile: 'numeric-kernel' }).run({ x: 3 }); // ➔ 10
  ```

### Resolved Issues

- **A call of a function literal with an annotated parameter no longer types the
  body of the literal to check its arguments.** The check reads the parameter
  types only. An interpreted call of a typed function that runs a loop is
  faster: one call of `legal(B, B[65])` in Tycho's othello prelude went from a
  median of 1,160 ms to 670 ms. An operator whose declared result is a union of
  types that cannot hold a function (`Floor`) is no longer typed at each
  evaluation to look for the effects of a function it could return (CE-1210).

- **A parameter named `c_1` in the initial conditions of `DSolve` or `RSolve` is
  a parameter.** It was taken for a constant of integration and solved for:
  `DSolve([y'' = y, y(0) = c_1, y'(0) = 0], y, x)` was `y = 0`, and is now
  `y = (c_1/2)·eˣ + (c_1/2)·e⁻ˣ`, as with any other name.

- **A compilation with the `numeric-kernel` profile of a deeply shared tree
  ends.** When one node object is an operand several times (`t₁ = Beta(x, x)`,
  `t₂ = Beta(t₁, t₁)`, …), the admission of the profile read each node once per
  path: a root `Block` that assigns such a tower of depth 30 did not finish,
  also when it then declines. The reads of the free symbols, of the bound names
  and of the values of a body, the sign of an operand of `Sqrt`, `Ln` and
  `Power`, the complex part of a calculus node, the reads of a local function
  and the reason of a loop now read each node object once, and a tower of depth
  40 compiles or declines in milliseconds. The code and the values are the same
  as before.

- **A name whose value is a deeply shared tree compiles with the
  `numeric-kernel` profile.** For `H + 1`, where `H` was assigned such a tower
  over a name with no type, the test of whether the existing compiler lifts the
  value of `H` to a complex number read the tower once per path: at depth 36 the
  compilation did not finish. It now reads each node object once, and compiles
  or declines in milliseconds. The code is the same as before.

- **The `numeric-kernel` profile declines `x·Conjugate(Haversine(2y))`.** The
  compilation failed with an internal error (`compile-error`): the profile
  writes `Conjugate` of a real operand as the operand, and did not check the
  grouping of the haversine in the product, as it does for `x·Haversine(2y)`.
  Both now decline with `outside-profile`.

- **`ce.infer()` gives a type to a symbol declared with the type `unknown`.**
  After `ce.declare('x', 'unknown')`, `ce.infer([ce.parse('x + 1')])` changed
  nothing and reported `x` in `skipped` with the reason `'defined'`. It now
  gives `x` the type `number`, as it does for a symbol with no declaration: a
  declaration with the type `unknown` states no type.
- **`ce.infer()` reports each symbol that it did not change.** `skipped` was
  empty for a symbol that no use gives a type to (`q` in `[q]`) and for a symbol
  with a declared type. It now lists the first with the reason `'untyped'` and
  the second with the reason `'defined'`, as the documentation of `InferResult`
  states. A symbol of the library (`Pi`), a parameter of a function literal and
  the index of a `Sum` are not listed.
- **A parameter that `Solve` generates does not take the name of a symbol that
  an expression already uses.** With `t + 1` made before `Solve(sin(x) = 0, x)`,
  the family of roots was `π t`, and the `t` of `t + 1` then had the type
  `integer` of the parameter. The family is now `π t_1`. With no earlier use of
  `t`, the parameter is `t`, as before.
- **Epsil: a type error on an undeclared name of the top level says where its
  type came from.** Since 0.187.0, the error of `let b = p && q` followed by
  `let y = p + 1` had no note. It has the note "`p` was inferred to have type
  `boolean` from its use in `p && q`" again.
- **A compiled derivative used as an operand gives the right value.** The closed
  form of `D`, `ND` or `Derivative` was written with no parentheses, so
  `\frac{1}{\frac{d}{dx}(x^3+x)}` compiled to
  `0.3333333333333333 * (_.x * _.x) + 1` and gave `2.333…` at `x = 2`. It now
  compiles to `1 / (3 * (_.x * _.x) + 1)` and gives `1/13`, the value of
  `evaluate()`. The same holds for a negation, a product, a difference and a
  power of a derivative, on every target. The code of a compiled derivative has
  one more pair of parentheses (`(2 * _.x)` for `D(x^2, x)`). (CE-1216)

## 0.187.1 _2026-11-11_

### New Features

- **The `numeric-kernel` profile compiles in the mode `bigint`.**
  `compile(expr, { profile: 'numeric-kernel', mode: 'bigint' })` compiled
  nothing (`outside-profile`: "the option `mode: 'bigint'` is not in the
  profile"). It now compiles a program of `integer` inputs made of arithmetic,
  `Mod`, `Remainder`, `GCD`, `LCM`, `Factorial`, `Factorial2`, `Binomial`,
  `Fibonacci`, `IsPrime`, `Abs`, `Sign`, `Min`, `Max`, `Boole`, `If`, `Which`,
  the comparisons and the connectives, and `Floor`, `Ceil`, `Round`, `Truncate`
  and an integer `Typed` of a quotient, a power or a square root. A `bigint` or
  `boolean` result is the result of the mode without the profile; a pole gives
  `NaN` or `Infinity`. The result reports `pure: true` and `shippable: true`,
  and `canCompile()` gives the same answer.

  ```js
  ce.declare('n', 'integer');
  ce.declare('m', 'integer');
  const q = compile(ce.box(['Floor', ['Divide', 'n', 'm']]), {
    profile: 'numeric-kernel',
    mode: 'bigint',
  });
  q.run({ n: 2n ** 64n + 7n, m: 3 }); // ➔ 6148914691236517207n
  q.run({ n: 5n, m: 0n });            // ➔ Infinity
  ```

  It also compiles `Sum` and `Product`, calls of user functions, the lists of
  integers (`list<integer>` inputs, `List`, `Range`, `At`, `First`, `Last`,
  `Length`, `Count`, `Take`, `Drop`, `ReplaceAt`, and a list result) and a
  `Function` literal at the root. Each element of a list result is the element
  of the mode without the profile, an index of `At` out of range gives `NaN`,
  and the call does not change an input list.

  ```js
  ce.declare('L', 'list<integer>');
  const s = compile(ce.box(['Sum', ['Factorial', 'k'], ['Limits', 'k', 0, 'n']]), {
    profile: 'numeric-kernel',
    mode: 'bigint',
  });
  s.run({ n: 25 }); // ➔ 16158688114800553828940314n
  const a = compile(ce.box(['Add', ['At', 'L', 'n'], ['Length', 'L']]), {
    profile: 'numeric-kernel',
    mode: 'bigint',
  });
  a.run({ L: [2n ** 64n, 5n], n: 1 }); // ➔ 18446744073709551618n
  a.run({ L: [1n], n: 3 });            // ➔ NaN
  ```

  `Map`, `Reduce` and `Fold` (a function operand), a recursive user function, a
  user function that reads an input, a nested list and the options `vars`,
  `functions`, `operators`, `imports` and `preamble` still decline with
  `outside-profile` in the mode.

- **The `numeric-kernel` profile of `compile()` admits functions of lists and
  function operands.** It admits the functions of lists `Norm`, `Mean`,
  `Median`, `Variance`, `Dot`, `Take`, `Drop`, `Rest`, `Reverse`, `Sort`,
  `Join`, `First`, `Last`, `Count` and `Range(a, b)` as a value, `Map`, `Filter`
  and `Count` with a function literal (`Map((t) ↦ t·x + 1, L)`,
  `Count(L, (t) ↦ t < x)`), `Map` of a library operator (`Map(Sin, L)`),
  `Reduce` and `Scan` by `Add`, `Multiply`, `Max`, `Min` or a function literal
  of two parameters, and `Apply` of a function literal; the body of a function
  literal is written inline and runs once per element, in order, and must be
  pure. A comparison of three operands or more (`0 < x < 1`, `a = b = c`)
  evaluates each operand once and stops at the first pair that is false.
  `Factorial`, `Factorial2`, `Arccot`, `Arccsc`, `Arcsec`, `Arcoth`, `Arsech`,
  `Arcsch`, `Coth`, `Truncate`, `Fract` of an arithmetic operand, `Hypot` of two
  operands, `Sech` and `Csch` of a complex operand, and a power with a complex
  base or exponent and an exponent that is not a number literal (`z^x`, `2^z`)
  are admitted. A parameter of a user function with a declared signature that
  has no annotation (`g: (real) -> real`, `g := t ↦ 2t`) has the type of the
  signature when that type is `real`, `integer`, `number`, `complex` or
  `boolean`; it declined. In the `strict` mode a local declared `number` is a
  real local. A product, a quotient or a power of an arithmetic expression of a
  call of a local function, and in the `strict` mode a call of a local function
  whose value is complex, decline: the ordinary compiler writes them in another
  form. An element of a list whose type is not real
  (`At(Comprehension(√y, …), 2)`) declines in the `strict` mode too, and the sum
  of a number and a block operand whose value is a complex literal
  (`x + { b0 ⩴ 1; i }`) gives the real part `0` at `x = -0`, as the ordinary
  compiler does; it gave `-0`.

- **The `numeric-kernel` profile of `compile()` admits more programs of lists.**
  In the `strict` mode a user function can be the function operand of `Map`,
  `Filter`, `Count`, `Reduce`, `Scan` and `Apply` (`Map(f, L)`,
  `Reduce(L, g, 0)`): the compiled code calls the function once per element, in
  order. `Range(a, b, step)` is admitted as a value, and `RotateLeft` and
  `RotateRight` of a list, also as operands of an element-wise sum. A list of
  tuples of one size (`list<tuple<real, real>>`, and in the `strict` mode
  `list<tuple<number, number, number, integer>>`) is admitted as an input, a
  parameter and a declared local (`let out: list<tuple<real, real>> = []`), with
  list literals and comprehensions of tuples, `At`, `First`, `Last`, `Length`,
  `Count`, `Take`, `Drop`, `Reverse`, `Join`, `ListJoin`, a rotation, and `Map`,
  `Filter` and `Count` with a function literal. A `Loop` can visit the elements
  of a list that a name holds (`for c in all { … }`). Each such program gives
  the values and the shapes of the ordinary compiler (`cse: false`,
  `constantFold: false`).

  ```js
  ce.declare('LP', 'list<tuple<real, real>>');
  ce.declare('x', 'real');
  const f = compile(
    ce.box(['Filter', 'LP', ['Function', ['Less', ['At', 'e', 1], 'x'], 'e']]),
    { profile: 'numeric-kernel' }
  );
  f.run({ LP: [[0, 1], [2, 3], [-1, 5]], x: 1 });  // [[0, 1], [-1, 5]]
  ```

### Resolved Issues

- **`expr.subs(map)` reads `map` only for the names of `expr`.** Since 0.187.0,
  `subs()` listed every key of the substitution and read each value, also the
  keys that the expression does not name. A host whose substitution computes a
  value when it is read (a `Proxy`, a getter) computed every value at each call.
  `subs()` again reads only the keys of the symbols and the operators of the
  expression.

## 0.187.0 _2026-11-11_

### Breaking Changes

- **Boxing an expression no longer declares its symbols.** `ce.parse()`,
  `ce.box()`, `ce.expr()` and `ce.function()` declare no name, and they do not
  change the type of a name that has no declared type. A symbol with no
  definition keeps its name and evaluates through the definition that the name
  has when the expression is evaluated. The type that the uses of a symbol
  require (`x + 1` requires a number) is kept with the expression, not on a
  definition that every expression shares.

  ```js
  const a = ce.parse('x + 1');
  ce.lookupDefinition('x');   // was a definition of type number, is undefined
  ce.box('x').type;           // was number, is unknown
  a.op1.type;                 // number, as before: the `x` of `x + 1`
  ce.assign('x', 3);
  a.evaluate();               // 4, as before
  ```

  What changes for a host:

  - `ce.lookupDefinition(name)`, `expr.valueDefinition` and the inspection of a
    scope do not see a name that was only boxed. Declare the name
    (`ce.declare()`, `ce.assign()`), or call `ce.infer()`, described below.
  - To read the type that an expression requires of a symbol, read the type of
    the symbol in that expression (`a.op1.type`), or `freeSymbolTypes` in the
    result of `compile()`. A symbol boxed alone (`ce.box('x')`) has no use, so
    its type is `unknown`.
  - An expression that the host keeps reads a declaration made later: after
    `ce.declare('x', 'string')`, `a.op1.type` is `string`.
  - An operation on an expression (`evaluate()`, `simplify()`, `subs()`,
    `compile()`, …) does not change the types that the expression reads.
  - `narrowings()` of an inspectable scope has nothing to report.

- **The reading of an expression no longer depends on the expressions boxed
  before it.** A type inferred from one expression is not used to read another
  one.

  ```js
  ce.parse('x + 1');
  ce.parse('x(3)').json;      // was ["Multiply", 3, "x"], is ["x", 3]
  ```

- **`compile()` types an input from the expression that it compiles.** An input
  with no declared type has the type that the compiled expression requires of
  it, including the assigned values and the function bodies that the code reads.
  A type that only another expression requires is not used: the compilation
  declines with `untyped-input`, until the input is declared or `ce.infer()`
  commits the type.

  ```js
  const a = ce.parse('x + 1');
  const b = ce.parse('x > 1');
  compile(b).success;         // was true, is false: `x > 1` requires no type
  ce.infer([a, b]);           // declares x: number
  compile(b).success;         // true
  ```

  A name of the library that an expression reads as a variable (`N` in `N + 1`)
  has no type until it is declared: `compile(ce.parse('N + 1'))` declines, and
  compiles after `ce.declare('N', 'real')`.

  The result of an operation does not carry the types that the operation
  required of a symbol that the host made before it. Declare such a symbol
  before compiling the result:

  ```js
  const q = ce.symbol('q0');
  const r = ce.parse('a \\cos(x)').subs({ a: q });
  compile(r).success;         // was true, is false: `q0` has no type
  ce.declare('q0', 'real');
  compile(r).success;         // true
  ```

- **In an Epsil program, an assignment in a branch to a name that an earlier
  statement only reads is a first assignment.** A read does not declare the
  name, so `y = x + 1; if y > 0 { x = 2 }; x` reports
  `first-assignment-in-branch`. Assign or declare `x` before the branch.

- **`ce.checkpoint()`, `ce.restore()` and `ce.discard()` are deprecated.** They
  keep working in this release. Use `ce.withValues()` to evaluate with temporary
  values, and `ce.pushScope()` / `ce.popScope()` for temporary declarations. A
  `restore()` does not undo a type that an expression boxed before the
  checkpoint came to require after it.
- **The engine needs `WeakRef`.** The engine makes a `WeakRef` in ordinary use
  (the type of an expression with an undeclared symbol), so a runtime without
  `WeakRef` cannot use it. Earlier releases made one only on some routes. A
  Cloudflare Worker with an old compatibility date needs the compatibility flag
  `enable_weak_ref`.

### New Features

- **`ce.infer(exprs)` declares the symbols of expressions with the types that
  their uses require.** For each symbol of `exprs` that has no declared type, it
  combines the types that the expressions require and declares the symbol with
  the result, marked as inferred, in the scope where a declaration of the name
  would go. The order of `exprs` does not change the result. A symbol whose uses
  conflict is not declared and is reported:

  ```js
  const a = ce.parse('x + 1');
  const c = ce.parse('x(3)');
  ce.infer([a]);      // { declared: [{ name: 'x', type: number, … }], skipped: [] }
  ce.infer([a, c]);   // in a new engine: skipped: [{ name: 'x', reason: 'conflict', … }]
  ```

  The reasons of `skipped` are `'conflict'`, `'untyped'` (no use requires a
  type), `'defined'` (the name has a declared type) and `'out-of-scope'`.

- **Experimental: the `numeric-kernel` profile of the JavaScript target.**
  `compile(expr, { to: 'javascript', profile: 'numeric-kernel' })` compiles the
  expression with the structured compiler of the JavaScript target. It admits
  scalar arithmetic of real and complex numbers (with a complex operand:
  products, quotients, powers with a number literal exponent and the elementary
  functions, `e^(i·x)`, `1/(t·ln t)`), conditionals, calls of user functions
  with declared signatures, captured numbers, loops over an integer range (with
  `Break` at the end of a branch of an `If`), lists of numbers made with a
  comprehension and updated with `ReplaceAt`, list literals of numbers
  (`[x, y, 1]`) and tuples of reals (`(x, y)`) as values, inputs, parameters and
  results, `Sum`, `Product`, `Max` and `Min` of a list or a tuple, arithmetic of
  a list and numbers applied to each element (`L + 1`, `2·L`, `x/L`; two lists
  only when their lengths are equal by construction), a comprehension with a
  pure guard (`[k for k in 1..64 if B[k] == p]`, with literal or `Length`
  bounds), and random draws: `Random()`, `Random` of a literal `Interval` or
  `Range`, `WithRandomSeed`, and calls of user functions whose body draws. The
  code draws the numbers of the ordinary compiler, in the same order and the
  same number of times; a draw in a comprehension declines, as do
  `RandomChoice`, `RandomSample`, `RandomShuffle` and `Random` of a domain known
  only at run time. A block of statements can be the compiled expression itself,
  with its free symbols as the inputs, and a power or a root of two number
  literals is written as the value that the ordinary compiler folds it to. A
  block can hold a block (a statement whose locals are not visible after it, or
  the value of the body, the form of an Epsil program), and a block whose
  statements declare names with a value can be an operand
  (`{ a ⩴ 3.7x; a − ⌊a⌋ } + 1`, the body of a `Sum`). A local declared `unknown`
  with a value (`m \coloneq x + 1`) has the type of its value, and a first write
  to a new name of a block (`s ⩴ x^2`) declares a local, as in the ordinary
  compiler. In the `strict` mode, a local function of the block
  (`g(t) \coloneq t + a`, `DefineFunction`) and a user function declared
  `function` are compiled once as a function of the program; a local function
  takes the names of the block that it reads as arguments, at each call, so it
  reads their values there, as a closure does. A local function in a branch, a
  loop or the `complex` mode, a recursive one, and a local of a nested block
  with the name of an outer one decline. A program outside the profile declines
  with the diagnostic code `outside-profile`, which names the first node outside
  it (`operator` or `binding`); `fallback` applies as for any other decline, and
  the ordinary compiler is never used for a part of the program. A parameter or
  a free symbol with no declared type is a real number in the `strict` mode and
  a complex number in the `complex` mode, whatever type boxing inferred for it;
  the result and the positive answer of `canCompile()` list such names in the
  new field `defaultedSymbols`. A type that the host wrote for a free symbol
  with `ce.infer()`, `ce.assume()` or `ce.assign()` is read as a declared type,
  so a host declares each name or calls `ce.infer()` before `compile()`: after
  `ce.infer([ce.box(['Mod', 'x', 2])])`, `x` is real in both modes, as on the
  ordinary compiler, and is not listed in `defaultedSymbols`. With
  `CE_BINDING_UNITS=0`, where boxing writes inferred types, no inferred type is
  read. A free symbol boxed before the host assigned it a number is captured
  with that number; it was compiled as an input. A call boxed before the host
  assigned its function (`g(x) + 1`, then `ce.assign('g', …)`) calls that
  function, as on the ordinary compiler; it declined. The same rule applies to a
  call of a user function with no declared signature (`f(x) := x^2 + 1`): each
  parameter with no annotation has the default type, the result is the type of
  the body, an argument of another type declines, and `defaultedSymbols` lists
  the name of the function. A name declared `number` (an input, a parameter, a
  parameter of a user function) has the same type as on the ordinary compiler:
  real in the `strict` mode, complex in the `complex` mode; a name declared a
  union of a real type with `nan` or `signed_infinity` is real. A user function
  declared with the result `number` returns the type of its body, and a name
  declared `number` with a number value is captured. `defaultedSymbols` does not
  list these names: their type is declared. A local declared with a type keeps
  that type: an integer value of a `real` local and a list of integers of a
  `list<real>` local are admitted, and a value of another kind declines with
  `outside-profile` (`let t: real = 1 + 2i`, `let t: real = sqrt(x)` in the
  `strict` mode, a number of a list local). A product with a quotient factor
  whose numerator is a product with an exact rational (`q·((0.1/3)/w)`) gives
  the doubles of the ordinary compiler; it gave a value that differed in the
  last place before. The options `cse` and `constantFold` are ignored under the
  profile. The options `vars`, `functions`, `operators`, `imports` and
  `preamble` give the code of the ordinary compiler, and the host functions run
  the same number of times, in the same order. A `vars` entry that reads the
  vars object under another name (`u: '_.w'`) is an input. Another source
  (`t: 'next()'`) is read once at each occurrence of the name, and makes the
  result not `pure` and not `shippable`. A call of a `functions` or `operators`
  entry is a call of the host: it is `pure` when the entry is declared pure, and
  never `shippable`. A `preamble` that is not blank makes the result not `pure`,
  because it runs on every call. `broadcast` is ignored: the result has no
  `batch`. These forms decline with `outside-profile`, each with its own
  message:
  - the function form of `operators`;
  - an infix `operators` entry;
  - an entry for an operator or a constant of the library;
  - a `vars` source that is not one operand;
  - a `functions` source that is not a name, a dotted path of names or a pure
    arithmetic function expression (`_.getTransform()`);
  - a source with a line terminator or a comment;
  - a read or a call of the host in the `complex` mode;
  - a `Sum` or a `Product` that calls a function declared pure.

  `mode: 'bigint'` declines too. A program of more than 100,000 operations
  declines with `outside-profile` too, also one with no repeated subexpression
  (a sum of 30,000 terms `sin(x + c)`). With another target, or in the
  `compile()` method of a target object, the option is an error. Without the
  option, nothing changes.

  A result compiled with the profile reports `profile: 'numeric-kernel'`, the
  new field `pure` (two calls give the same results in any order or at the same
  time, and a call changes nothing that the host can observe), and `shippable`
  (the code can run on a worker of the pool), also for a `Function` literal. A
  draw makes a program not pure, unless it is inside a `WithRandomSeed`; a
  program that draws or seeds the random stream is not shippable. `canCompile()`
  answers for the profile, with the same diagnostic as `compile()`, and its
  positive answer carries `pure` and `shippable`:

  ```js
  ce.declare('x', 'real');
  ce.declare('y', 'real');
  canCompile(ce.box(['Add', 'x', ['Sin', 'y']]), {
    to: 'javascript',
    profile: 'numeric-kernel',
  });
  // ➔ { ok: true, pure: true, shippable: true }
  ```

## 0.186.0 _2026-11-10_

### Breaking Changes

- **The `BaseCompiler` static member `compileMatchTernary` is removed**, with
  the type `MatchStatementClause` of its `statement` option. It compiled a
  `Match` to nested conditional expressions for the GLSL target, and GLSL now
  declines every `Match` before it writes code: `Match` is not in the GLSL
  fragment. A custom target that compiles `Match` writes its own lowering in its
  `functions` table.

- **The `CompileTarget` field `checkOperandShapes` is removed, and the type
  `GPUShapeRules` keeps only `scalarGenTypeSlots`.** The hook ran on the code of
  each lowering and could refuse it for its operand shapes; no built-in target
  sets it since the GLSL fragment check refuses those shapes before any code is
  written. A custom target that set the hook checks its operand types before it
  calls `compile()`. The fields `mandatoryScalarSlots`, `vectorOnlySlots`,
  `matrixArithmetic` and `matrixNegate` of the value returned by
  `getShapeRules()` had no reader: a subclass of `GPUShaderTarget` or
  `GLSLTarget` that overrides `getShapeRules()` removes them from the object it
  returns.

- **The GLSL target no longer compiles a random draw on any route.** `Random`,
  `WithRandomSeed`, `RandomChoice`, `RandomSample` and `RandomShuffle` are not
  in the GLSL fragment, so `compile()` to `glsl` already declined them. A GLSL
  target object passed to `compile()` as the `target` option compiled a draw to
  a PCG3D hash in the shader; it now declines too. A seeded frame with a
  constant value (`WithRandomSeed(42, Random())`) still folds to the number it
  draws.

- **A GLSL target object passed to `compile()` as the `target` option runs the
  GLSL fragment check.** An object made by `GLSLTarget.createTarget()` skipped
  the check of `compile(expr, { to: 'glsl' })`, and the code that checked
  operand shapes after emission is removed. On that route, `compile()` now
  declines what `canCompile()` refuses, with the same diagnostic: for `v` of
  type `list<real^3>` and `x` of type `real`, `Arctan2(v, x)` declines instead
  of writing `atan(v, x)`, which no shader compiler accepts. Forms that this
  route accepted before and that the fragment refuses now decline there too, as
  they do with `to: 'glsl'`: for example `Log(v, 10)`, the negation of a matrix,
  and a list of more than 256 elements read as a uniform array.

- **On GLSL, code that the caller supplies is computed into a temporary before
  its statement.** This is a `vars` entry whose source is not a plain read
  (`nextValue()`, `vec3(u + v)`), a `functions` entry not declared `pure: true`,
  and an operator's own `compile` handler. Such code can count its calls or draw
  a number. Each occurrence now runs once, in the order of the interpreter, so
  the code of an expression that holds it is a list of statements that ends with
  `return`: with `vars: { W: 'nextValue()' }`, `W + 1` was `nextValue() + 1.0`
  and is now `float _tv1 = nextValue();` then `return _tv1 + 1.0;`. A piece of
  such code in a branch is computed at the start of its branch, so an `If` or a
  `Which` whose branch holds it is written as an `if` statement, not with `?:`.
  A plain read (`u_t`, `params.x`) is not caller code and stays in place, unless
  caller code comes after it in the statement: the caller's code could write the
  variable that it reads, so it is then read first. Expressions with no such
  code compile as before.

### Resolved Issues

- **The type of a derivative no longer keeps the range of its operand.**
  `D(|x|, x)` had the type `real<0..> | signed_infinity`, the type of `|x|`,
  although the derivative is `-1` for a negative `x`. The type of `D(f, x)` is
  now the numeric type of `f` without its range: `real | infinity` here.

- **`ce.withValues()` reports a failed restore when its callback threw.** When
  `fn` threw and putting back the earlier value of a symbol failed too, only the
  error of `fn` was thrown, and the symbol could keep its temporary value with
  no report. The method now throws an `AggregateError` whose `errors` are the
  error of `fn` and the restore error, in this order, and whose `cause` is the
  error of `fn`. When `fn` returns, a restore failure is thrown as before
  (CE-1192).

- **On GLSL, `canCompile()` and `compile()` agree on an applied derivative.** An
  application of a derivative, `Apply(Derivative(f), x)`, is now replaced by the
  closed form of the derivative before the check, so `canCompile()` checks the
  code that is written:
  - With a list argument, `Apply(Derivative(u ↦ 7u), [x, y]) + 1` is typed as a
    `vec2`, as its code is; the check typed it as a `float`.
  - With an argument that has an effect,
    `Apply(Derivative(u ↦ u^2), x + Random())`, `canCompile()` answered
    `{ ok: true }` and `compile()` declined; both now decline.
  - With an argument that is not valid, the closed form could leave out the
    argument (the derivative of `u ↦ u` is `1`), so the code gave `1.0` where
    the interpreter gives an error; it now declines.
  - With an argument that runs code that the caller supplies (a `vars` entry
    such as `t: 'nextValue()'`, or a `functions` entry that is not declared
    pure), the application now declines: the closed form can read the argument
    several times, in another order, or not at all, so the code cannot run once,
    in the order of the interpreter.

- **On GLSL, `canCompile()` and `compile()` agree on a call of a function with a
  parameter named by a reserved GLSL word** (`f(discard) := discard^2`). Such a
  call is written in place, and it is now written before the check, so the check
  sees the code that is written. `f(f(u))` and a call inside the body of a
  function that is written as a shader function were accepted by `canCompile()`
  and declined by `compile()`; the first now compiles, and the second declines
  in both. A call whose argument or whose function body runs code that the
  caller supplies, or whose argument type is not the declared parameter type,
  now declines in both: written in place, such code could run a different number
  of times than in the interpreter.

- **On GLSL, `compile()` no longer declines expressions with caller code that
  `canCompile()` accepts.** With
  `vars: { W: 'nextValue()', V: 'vec3(nextValue())' }`, `W + Max(V)`,
  `(W, Max(V))`, `W + Sum(V^2)`, `W + Sum(W + k, k, 1, n)` and
  `If(c, Max(V), 0)` declined, because the shader code would have computed `V`
  or the loop before `W`, or a branch would have held statements. They now
  compile, with `W` and `V` each computed once, in the order of the interpreter:
  the `W` of the loop body once per iteration, and the `V` of the branch only
  when the branch is taken. Forms that wrote an operand with caller code more
  than once now compile too, with the operand computed once: `Cot(W)` is
  `float _tv1 = nextValue();` then `return (_gpu_cos(_tv1) / _gpu_sin(_tv1));`,
  and so are `Remainder(W, 2)`, `Binomial(W, 3)`, `x < W < 3` and `Cot(F(x))`
  with `functions: { F: 'myF' }`. `W + W` calls `nextValue()` twice, as the
  interpreter evaluates `W` twice. (CE-1176)

- **On GLSL, the code can no longer call a user function that its preamble does
  not define.** A check of the emitted code built a preamble in the middle of
  the compilation, and that step removed the definitions of user functions that
  its partial code did not name. In one document of the Desmos corpus, the row
  `l(I(x, y) mod 2 - 1) - 0.99` compiled to a call of `_fn_l` with no definition
  of `_fn_l`, which no shader compiler accepts; the definition is now in the
  preamble. The check is removed: the GLSL fragment check refuses the same
  operand shapes before any code is written.

- **On GLSL, `canCompile()` and `compile()` agree on a block used as a value,
  and on a call of a function whose body is a block, next to code that the
  caller supplies or next to each other.** These nodes write only their own
  locals, but the GLSL emitter counted them as random draws, whose order it
  checked. With `vars: { W: 'nextValue()' }`, `W + Block(a := x², a)` was
  accepted by `canCompile()` and declined by `compile()`; so was
  `(f(x), Cot(f(y)))` with `f` a function whose body is a block. They now
  compile. A selection whose clauses call such a function can now take its
  statement form (`if`/`else`) where it took the conditional expression; the
  values do not change.

- **On GLSL, a `functions` entry declared `pure: true` is no longer treated as
  code with side effects.** The declaration had an effect on JavaScript only.
  With `F: (real) -> real` and
  `functions: { F: { source: 'myFn', pure: true } }`, `Cot(F(x))` declined on
  GLSL and now computes `myFn(x)` once; `F(x) + Sum(F(x) + k, k, 1, n)` was
  accepted by `canCompile()` and declined by `compile()`, and now compiles. An
  entry with no such declaration (`functions: { F: 'myFn' }`) still declines in
  these expressions.

- **An edit of a document that pops and pushes a scope no longer takes longer
  than the edit before it.** A function such as `f(x) := h(x) + 1`, defined
  while `h` has no definition, is re-derived when `h` gets one. Since 0.185.0
  the engine releases such a definition after `ce.popScope()` discarded its
  scope, but only when the garbage collector runs. Until then,
  `ce.declare('h', 'function')` followed by `ce.assign('h', …)` in a new scope
  re-derived the `f` of every discarded scope, although none of them can see the
  new `h`. In a host that pops and pushes a scope at each edit, ten edits of a
  document took 0.3, 0.4, 0.7 … 1.9 seconds. A definition is now re-derived only
  when the new definition is in its scope or in a scope above it, and the ten
  edits take about 0.2 seconds each. (CE-1102)

- **A recursive function that passes a local function by name to its recursive
  call gives a value.** With
  `f := (n, g) ↦ Block(q := (y ↦ n + g(y)), If(n = 0, q, f(n − 1, q)))`,
  `f(1, y ↦ 0)(0)` stayed `Apply(f(1, y ↦ 0), 0)`; it is now `1`, as when the
  function literal is written in place of `q`. The same function with the local
  defined by `DefineFunction(q, y ↦ n + g(y))` ended with "Recursion limit
  exceeded" and now gives the same values. (CE-1185)

- **A selection on the equality of two points compiles to `glsl`.** With `p` and
  `q` declared `tuple<real, real>`, `If(p = q, 1, 2)` declined with "a tuple
  operand in an element-wise condition has no element-wise reading", although
  `canCompile()` accepted it. It now compiles to `((p == q) ? (1.0) : (2.0))`:
  GLSL `==` on two `vec2` values is true when every component is equal, as the
  interpreter compares two points. `NotEqual` and a condition such as
  `p = q ∧ x < 1` compile too.

- **A tuple assignment to locals with a declared type compiles when the type of
  each value proves the declared type.** With `a` and `b` declared `real`, the
  loop `Loop((a, b) := (b, a + b), k ∈ 1..5)` was accepted by `canCompile()` on
  `glsl`, and then `compile()` declined it on `glsl` and on `javascript`. It now
  compiles on both and gives `5`, as the interpreter. A value whose type does
  not prove the declared type (`b`, of type `real`, assigned to `a` declared
  `integer`) still declines, because the interpreter checks it before it writes
  any target; on `glsl`, `canCompile()` now refuses it too. (CE-1189)

## 0.185.1 _2026-11-09_

### Resolved Issues

- **A call of a `functions` entry whose operator returns a color, a point, a
  complex number or a boolean compiles to `glsl` again.** Since 0.185.0 the GLSL
  compilation read every such call as a real, so a color operator applied to it
  was refused: with `g` declared `(any, any) -> color`,
  `compile(AsOklab(g(0, x)), { to: 'glsl', functions: { g: 'hostG' } })` failed
  with "No signature of `AsOklab` in the GLSL fragment takes operands of the
  types (real)". The call now has the declared result type of its operator. A
  call of an operator with no declaration, or one that returns a number or an
  integer, is still read as a real. (CE-1183)

- **A call of a function whose parameter has a name that GLSL reserves compiles
  to `glsl` when `canCompile()` accepts it.** With `f := filter ↦ filter + 1`
  and `x: real`, `canCompile(f(x), { to: 'glsl' })` answered `{ ok: true }`, and
  `compile()` then failed with "`filter` is a reserved word in glsl". The call
  is now written in place (`x + 1.0`), as it already was when the parameter has
  a declared type. GLSL also reserves `input`, `output` and `sample`. (CE-1184)

## 0.185.0 _2026-11-09_

### Breaking Changes

- **The `wgsl` compilation target is removed.** `compile(expr, { to: 'wgsl' })`
  now fails with an unknown-target error, and the `WGSLTarget` class,
  `WGSLTarget.compileFieldFunction()` and its types (`FieldFunctionOptions`,
  `FieldFunctionParameter`, `FieldFunctionResult`) are no longer exported. The
  `'storage-buffer'` storage kind of the `storage` option, its types
  (`StorageBufferBinding`, `StorageBufferLayout`) and
  `CompilationResult.storageBuffers` are removed with it: a hint
  `{ kind: 'storage-buffer', group, binding }` is now an invalid option on every
  target, as an unknown kind is, and the `StorageKind` and `StorageHint` types
  admit only `'sampler2D'`. A custom target loses these members, which only the
  WGSL target used: `storageRead`, `hostInputVars`, `storageBufferBindings` and
  `storageBuffersRead` of `CompileTarget`, and the protected methods
  `withTargetExtension()` and `emittedUserFunctionNames()` of `GPUShaderTarget`.
  To compile for a shader, compile to `glsl`; a program that needs WGSL output
  can stay on version 0.184.0.

- **`Fill` fills a tensor with one value.** `Fill(value, d1, d2, …)` is a list
  or a tensor with one axis per extent, each element equal to `value` (see New
  Features). The old form `Fill(f, (m, n))`, which called `f(i, j)` for each
  cell of an m×n matrix, is removed: it now gives an `incompatible-type` error,
  because a tuple is not an integer extent. Write `Tabulate(f, m, n)` instead;
  it gives the same values, also in compiled code. The old form also gave a cell
  for `At(Fill(f, (2, 3)), 2)` (`12`), where its length and its walk gave rows;
  `Tabulate` gives the row `[21, 22, 23]`.

- **The `glsl` target compiles only the forms of the GLSL fragment.** Before it
  writes code, `compile(expr, { to: 'glsl' })` checks the expression against a
  fixed list of forms: real, integer, boolean and complex scalars, points of 2
  to 4 components, colors, lists of at most 256 elements or in a texture, the
  arithmetic and the functions of the shader library, `Sum` and `Product` over
  integer ranges, `At`, user functions without recursion, and blocks of scalar,
  point or complex locals. Outside the list, the compilation declines with the
  diagnostic code `outside-fragment` (see `canCompile()` in New Features), and
  `compileFunction()`, `compileShader()` and `compileToSource()` throw. These
  forms compiled before and now decline:
  - random draws: `x + Random()` and `WithRandomSeed(5, x + Random())`;
  - matrices: `Matrix([[1, 2], [3, 4]])` gave
    `mat2(vec2(1.0, 3.0), vec2(2.0, 4.0))`;
  - `Apply` of a function literal: `Apply(v ↦ v·x, 2)` gave `(2.0 * x)`;
  - `Match`: `Match(x, 1 → 2, _ → 3)`;
  - a list local of a block: `Block(Assign(P, [1, 2, 3, 4, 5]), P[2])`;
  - a symbol whose type is not numeric: `e + 1` with `e` declared `expression`
    gave `e + 1.0`. The diagnostic names the symbol in `binding`: declare a
    numeric type for it;
  - a list input of more than 256 elements without the `storage` option:
    `At(H, 2)` with `H: list<real^1600>` gave `H[1]` over a uniform array of
    1,600 floats, which a GPU can refuse to link. The diagnostic now gives the
    length, the limit and the option to use, `storage: { H: 'sampler2D' }`;
  - a user function with a parameter of no declared type, called with arguments
    of two types: with `sq(u) := u^2`, `sq(x) + Re(sq(z))` for a real `x` and a
    complex `z` compiled two versions of `sq`. Such a parameter now takes the
    type of its argument at the first call, and the diagnostic names the
    parameter and the two types. Declare the type of the parameter, or call the
    function with arguments of one type. A call with one type compiles as before
    (`sq(x)` with a `float` parameter, `sq(z)` with a `vec2` parameter). A
    parameter whose type is a collection with no length
    (`dictionary<number> | indexed_collection<number>`, the type that the engine
    infers for `a` from the read `a[k]` of `h(a, k) := a[k] k`) is read the same
    way: an argument `[x, y]` or `(x, y)` gives a `vec2` parameter.

  These forms are in the fragment and compile as before:
  - a block at the root of the expression;
  - an `If` with no else branch used as a value: `If(x > 0, x)` gives
    `((0.0 < x) ? (x) : (_gpu_nan()))`. The missing branch is `NaN` (a `NaN` in
    each lane of a point or a complex number), and `false` for a boolean value.
    A color value, or a list of more than 4 elements, has no `NaN` in GLSL, and
    such an `If` declines;
  - the sum or the product of a list of known length: `Sum(L)` with
    `L: list<real^3>` gives `((L.x) + (L.y) + (L.z))`. The list is a point, a
    list of 2 to 4 numbers, or a list literal of at most 256 elements;
  - a number added to a name that `compileShader()` or `compileFunction()`
    declares as a GLSL vector (`gl_FragCoord + 1`);
  - a call of a user function with a list of 2 to 4 reals, with the value that
    the interpreter gives. When every parameter of the function is scalar, the
    interpreter applies the function to each element, and so does the shader
    code: with `f(u) := u mod 1`, `f([-x, -y])` gives
    `_fn_f_each2_1(vec2(-x, -y))`, a wrapper that calls `float _fn_f(float u)`
    on each component. Otherwise the list binds its parameter whole: a parameter
    with no declared type, or whose type the engine infers from the index reads
    of the body, is a `vec2` to `vec4`. With
    `R(V, t) := [Sum(V·[cos t, -sin t]), Sum(V·[sin t, cos t])]`,
    `R([x, y], 0.5)` gives `_fn_R_vector_real_2_number(vec2(x, y), 0.5)`. A
    longer list, lists of two lengths in one element-wise call, a complex
    parameter beside a mapped list, and a list at a point parameter that the
    body passes to a declared point parameter decline.

- **A loop of a `glsl` compilation stops after 10,000 passes.** The code of
  `compile()` to `glsl` counts the passes of every loop that the shader runs (a
  `Sum`, a `Product`, a `Loop`, a `parallel for`, also in the body of a user
  function), with one count for each evaluation. Over the cap, the loops stop
  and the value is `NaN` (`false` for a boolean value), where a shader with a
  large bound could before take so long that the browser lost the WebGL context.
  The `iterationBudget` option sets the cap, as it sets the limit of a `Loop` on
  the JavaScript target; `iterationBudget: Infinity` removes the cap and the
  counter. `Sum(k·x, k, 1, n)` now compiles to:

  ```glsl
  _gpu_passes = 0;
  float _tv1 = 0.0;
  for (int k = 1; k <= int(floor(n)); k++) {
    if (++_gpu_passes > 10000) break;
    _tv1 += float(k) * x;
  }
  float _tv2 = _tv1;
  return _gpu_passes > 10000 ? _gpu_nan() : _tv2;
  ```

  The preamble declares the counter `int _gpu_passes` under the guard
  `_GPU_PASSES_DECLARED`. `compileFunction()`, `compileShader()` and
  `compileToSource()` count no pass.

### New Features

- **`canCompile(expr, options)` tells whether an expression compiles to `glsl`,
  without writing code.** It is exported from
  `@cortex-js/compute-engine/compile` beside `compile()` and takes the same
  options. It answers `{ ok: true }`, or `{ ok: false, diagnostic }` with the
  code `outside-fragment` and the first node outside the GLSL fragment: its head
  in the new field `CompileDiagnostic.operator`, or the name of a symbol in
  `binding`. It never throws, and when it names a node outside the fragment,
  `compile()` declines with the same diagnostic.

  ```js
  canCompile(ce.parse('\\sin(x) + x^2'), { to: 'glsl' });
  // ➔ { ok: true }
  canCompile(ce.parse('\\int_0^x \\sin(t)\\,dt'), { to: 'glsl' });
  // ➔ { ok: false, diagnostic: { code: 'outside-fragment',
  //     message: 'The head `Integrate` is outside the GLSL fragment.',
  //     operator: 'Integrate', … } }
  ```

  The answer depends on the expression, the options and the declarations that
  the expression reaches, so a host can keep it until one of those declarations
  changes. For a target other than `glsl` the answer is `ok: false`.

- **`Fill(value, d1, d2, …)`, `Zeros(d1, d2, …)` and `Ones(d1, d2, …)` create a
  list or a tensor with each element equal to one value.** Each operand after
  the value is the length of one axis: `Fill(7, 3)` is `[7, 7, 7]`,
  `Zeros(2, 3)` is a 2×3 matrix of zeros and `Ones(2, 2, 2)` a tensor of rank 3
  of ones. One extent gives a list, not the square matrix of `ZeroMatrix(n)` and
  `OnesMatrix(n)`. In Epsil, the functions are written `fill`, `zeros` and
  `ones`.
  - The value of `Fill` is evaluated once: `Fill(Random(), 2, 2)` holds four
    copies of one number. A function value is an element; it is not called.
  - An extent of 0 or less gives an empty axis, as `Repeat(x, 0)` does:
    `Fill(7, 0)` is `[]` and `Fill(7, 2, 0)` is `[[], []]`. The axes after an
    empty axis are not reached: `Fill(7, 2, 0, 3)` is also `[[], []]`. A
    symbolic extent leaves the expression unevaluated.
  - The result type is `list<T^(d1×d2×…)>`, with `T` the type of the value, when
    every extent is an integer literal and the value is a scalar.
  - A tensor with more than 10,000 elements is a lazy nested `Repeat`, so its
    elements are not created before they are read.

- **A `parallel for` runs on the worker pool with `runAsync()`.** A `javascript`
  result called with an object of variables has `runAsync(inputs, options)`, a
  promise of the value of `run(inputs)`. It sends each `parallel for` that can
  run on the pool to the workers of `ce.workers`, one range of consecutive
  passes for each worker, and adds the sums of the ranges to the accumulators in
  their order. For `let L = H; parallel for k in 1..n { L[k % 3 + 1] += 1 }; L`
  with `n = 900000` and 3 workers, `await result.runAsync({ H: [0, 0, 0], n })`
  gives `[300000, 300000, 300000]`, and `onLoop` receives
  `{ passes: 900000, route: 'pool' }`. A loop runs on the pool when its domain
  is a range, each accumulator is a local number or list of numbers changed only
  with `+=`, the body reads no accumulator, writes no other outer variable,
  makes no random draw and calls no function value, and the loop is a statement
  of the program or of a function that the program calls as a statement or as
  the value of a declaration or an assignment. Every other loop runs in order,
  with the code of `run()`. At run time the loop goes to the pool when it has at
  least `minPasses` passes (default 20 000) and the private lists of the workers
  hold at most 16 million numbers. An accumulator of integers gives the value of
  `run()`; one of real numbers can differ in the last bits, because the terms
  are added in another grouping. `willParallelize(passes)` tells in advance
  whether the pool would take a loop, `options.signal` stops the run, and
  `onLoop` reports the route of each loop. The new types are `RunAsyncOptions`,
  `ParallelLoopReport` and `ParallelLoopReason`. `run()` does not change. The
  rules are in `docs/COMPILATION-MODEL.md`, "The worker pool and `parallel for`:
  `runAsync()`" (CE-1163).
- **`staticShape` gives the collection shape that an expression promises before
  evaluation.** The new accessor `expr.staticShape` is
  `{ indexed, count, elementType }`, or `undefined` when the expression promises
  no collection. With `f := n ↦ [n, n+1, n+2, n/2]`, the unevaluated `f(3)` has
  `isCollection: false` and `count: undefined`, and its `staticShape` is
  `{ indexed: true, count: 4, elementType: 'rational' }`. A collection value
  answers from its collection facets, a symbol with no value from its declared
  type (`L: vector<2>` gives a count of 2), and an application whose head is
  bound (a library operator, an assigned function literal, a declared signature)
  from its static type, with a `missing` or `nothing` arm set aside. A call of
  an undeclared name promises nothing: its type is the lift of a vacuous
  binding. An `If` with an else branch or a `Which` whose arms agree gives their
  shape: `If(c, [1, 2], [3, 4])` has a count of 2. A host can read the shape of
  an expression without evaluating it. The getters `isCollection`,
  `isIndexedCollection`, `count`, `isFiniteCollection`, `isEmptyCollection`,
  `each()` and `at()` are unchanged: they tell whether a collection value is
  present to walk now. The rule is in `docs/COLLECTIONS-MODEL.md`, "The shape of
  an unevaluated application" (CE-1150).

### Improvements

- **A shader loop reads a bound at run time.** On the `glsl` target, a `for`
  loop over `1..e`, where `e` is a local of the function or an input of the
  shader, reads `e` into an integer temporary before the loop. Before, it
  declined: "the bounds of the `Range` must be numbers known at compile time". A
  bound read at run time must have the static type `integer`.
- **On the shader targets, an else-less `if` whose branch holds a `for` loop is
  an `if` statement.** `if e > 0 { for m in 1..e { … } }` compiles to `glsl`;
  before, it declined with "Could not compile `If`: wrong number of arguments".
- **More sums, products and point operations compile to `glsl`.** Each of these
  declined before:
  - a sum or product over two or more index ranges, as nested loops:
    `Sum(i·j·x, i, 1, n, j, 1, n)` ("multi-index (2 indexing sets) is not
    supported in GPU targets");
  - a sum or product whose index set is a range, `Sum(k·x, k ∈ 1..n)` ("expected
    Limits indexing set");
  - a `parallel for` over an integer range whose accumulators are scalar locals,
    as a loop that runs its passes in order, which gives the value of the
    interpreter: `Block(s := 0, ParallelLoop(AddTo(s, k·x), k ∈ 1..10), s)`
    ("the `parallel for` construct compiles only to the JavaScript target");
  - `Length` of a point, which is its number of components: `Length(p)` with
    `p: tuple<real, real, real>` is `3.0` (before: "the 'glsl' 'length()'
    builtin is the Euclidean norm");
  - an operation on the result of `Normalize`: `Dot(Normalize(p), p)` is
    `dot(normalize(p), p)` (before: "the shader builtin `dot` requires MATCHING
    genType arguments", because the result of `Normalize` was read as a number).

### Resolved Issues

- **`Repeat(f, n)` no longer takes the effects of a function value that it never
  calls.** `Repeat` holds its value as an element and never calls it, as `List`
  does, but it took the effects of the body of `f`: `Repeat((k) => Random(), 2)`
  was reported as not pure, while `[(k) => Random(), (k) => Random()]` was pure.
  A value with an effect of its own, `Repeat(Random(), 2)`, still makes the call
  impure. (CE-1174)

- **A factor or a minus sign before an integral with its differential in a
  fraction no longer applies to the terms after the integral.**
  `2\int_0^1 \frac{dx}{1+x^2} + 1` was `2(∫ + 1) ≈ 3.5708` and is now
  `2∫ + 1 = 1 + π/2`, as `2\int_0^1 \frac{1}{1+x^2}\,dx + 1` is.
  `-\int_3^4 \frac{dx}{x} + 5` was `-5 - ln(4/3)` and is now `5 - ln(4/3)`. A
  brace group around an inner integral and a term after it now keeps that term
  in the group: `\int_1^2 1-{\int_3^4 \frac{dx\,dy}{xy} + 5}` subtracts the 5
  inside the integral over `y`. With `diagnostics: true`, a variable after such
  an integral, with the name of its integration variable, is now reported as
  undeclared also after a minus sign (`\int \frac{dx}{x} - x`).

- **A double integral with one differential in a fraction and the other after
  the integrand is read as a double integral.**
  `\int_3^4\int_1^2 \frac{dx}{x}\,dy` gave `7/2` (the `d` of `dx` was a
  variable) and now gives `ln 2`, as `\int_3^4\int_1^2 \frac{1}{x}\,dx\,dy`
  does. `\iint_1^2 \frac{dx}{x}\,dy` now integrates over `x` and `y`, where it
  gave `d`. An integral with one differential for each sign and no enclosing
  integral still reads a `d` in its integrand as a coefficient:
  `\int_0^1 \frac{ax+by}{cx+dy}\,dx` is unchanged.

- **The differential operator `\differentialD` of MathLive is read inside a
  fraction.** `\int_1^2 \frac{\differentialD x}{x}` gave an `unexpected-command`
  error and now gives `ln 2`, and `\frac{\differentialD}{\differentialD x}x^2`
  is now the derivative `2x`.

- **With `diagnostics: true`, a variable after an integral in a brace group is
  reported.** In `\int {\frac{x\,dx}{2} + x}`, the last `x` is outside the
  integral, and is now reported as undeclared; a variable of the integrand after
  a sign inside a fraction (`\frac{x\,dx}{1+x}`) is not.

- **`compileShader()` and `compileFunction()` of the GLSL target refuse a
  declared type that is not GLSL.** An input, output or uniform declared
  `{ name: 'u', type: 'vec3f' }` (or `f32`, `vec3<f32>`, `mat2x2f`,
  `array<f32, 5>`) gave `uniform vec3f u;` and reported success, and
  `compileFunction(x + 1, 'f', 'f32', [['x', 'f32']])` gave
  `f32 f(f32 x) { … }`, but such a shader did not compile on the GPU. Both now
  throw an error that names the declaration and the GLSL spellings to use
  (`float`, `vec3`, `ivec3`, `mat2`, `float[5]`).

- **A `parallel for` whose body ends with an inner loop compiles to
  JavaScript.** In
  `parallel for k in 1..n { if k > 0 { for m in 1..3 { L[m] += 1 } } }`, the
  compilation declined with "the value of this `Loop` is used", and the program
  ran on the interpreter. The body of a `parallel for` is now a statement list,
  as the body of a `for`, so the same body compiles under both. (CE-1164)
- **A sum or product over a set and a range keeps the upper bound of the
  range.** `\sum_{k\in \lbrace1,2,3\rbrace, j=1}^{3} jk` was parsed with no
  upper bound for `j`, so it had no value; it now gives `36`. The LaTeX of
  `["Sum", ["Multiply", "k", "j"], ["Element", "k", ["Set", 1, 2, 3]], ["Limits", "j", 1, 3]]`
  is that LaTeX, so it now parses back to the same sum. The items of the
  superscript are the upper bounds, in order, of the ranges that have none in
  the subscript: a clause `k\in S`, its conditions and a range such as `n=0..10`
  or `1\le n\le 10` take none. So `\sum_{n=0..10, m=1}^{2}(n+m)` now gives `m`
  the upper bound `2`, where it had none before.
- **Two integral signs with both differentials in the numerator of a fraction
  give the right value when a term is before the inner integral.**
  `\int_1^2 1+\int_3^4 \frac{dx\,dy}{xy}` was parsed with no variable for the
  outer integral and evaluated to about 1.1111. It is now parsed as
  `\int_1^2 1+\int_3^4 \frac{1}{xy}\,dx\,dy` is, the integral over `y` of
  `1 + \int_3^4 \frac{dx}{xy}`, and evaluates to `1 + 2ln(2)^2 - ln(2)ln(3)`,
  about 1.1994. The same holds for a difference
  (`\int_1^2 1-\int_3^4 \frac{dx\,dy}{xy}`), and a term after the inner
  integrand (`… + 5`) is outside both integrals.
- **A function declared through a type alias of a signature types its calls from
  that signature.** With
  `ce.declareType('Fn', '(integer) -> list<real>', { alias: true })` and
  `ce.declare('g', 'Fn')`, `g(3)` was typed `unknown`, `g("a")` was not refused,
  and `g([1, 2])` was typed as a call of an undeclared name, where the same
  declaration written out gives `list<real>`, an `incompatible-type` error and a
  broadcast over the list. The typing of a call, the check of its arguments, the
  broadcast decision and the arity of a callback now unfold a transparent alias
  of the declared type. The symbol `g` keeps the type `Fn`, and `staticShape` of
  the call gives the shape that the signature promises.
- **A function whose parameter accepts a point of integers or a string refuses a
  point with a fractional coordinate.** With
  `F: (tuple<integer, integer> | string) -> unknown` and the body `p ↦ p`,
  `F((1.5, 2))` was valid and gave `(1.5, 2)`, while the same point at a
  parameter declared `tuple<integer, integer>` alone is an `incompatible-type`
  error. The check of the components of a point now reads each arm of a union
  parameter: the point is refused when a tuple arm of its arity refutes a
  component and no other arm accepts a value of its type. A symbol that holds
  such a point is refused when the call is boxed, as the point literal is,
  instead of when the call is evaluated. A union with an arm that the point fits
  (`tuple<integer, integer> | tuple<real, real>`, or `collection`) still accepts
  it.
- **Two reads of the same element of a random list give the same value.** With
  `let v = [j for j in 1..10 if random() < 0.5]`, the tuple `(v[2], v[2], v)`
  gave three different second elements, and the same for a `Map`, a `Filter` or
  a `Tabulate` whose function draws: each read by position drew again, and each
  evaluation of `v` made a new view with no memory of the draws. One instance of
  a lazy collection has one set of draws (`docs/RANDOMNESS-MODEL.md` §6): a read
  by position of such a collection now walks it once, and every read of its
  elements, by position or as a whole, is served from that walk. A view over an
  infinite source, one with more than 100,000 elements, or one whose elements
  the memo does not keep (an element that holds a mutable object, an element
  function that also runs host code which states no purity) still draws at each
  read by position.
- **In the VS Code extension, the highlight and the rename of a variable no
  longer take the index of a `sum`, or the variable of a `limit`, that has the
  same name.** After `let k = 2`, the cursor on `k` highlighted the three `k` of
  `sum(k^2, k, 1, 3)` too, and a rename of the `let k` changed them, although
  the sum binds its own `k`. Highlight, Find All References and Rename now give
  the `let k` alone, and the two `k` of the sum together. The same applies to
  `let h = 5` followed by `limit(sin(h)/h, 0)`, and to the variable of every
  library call that binds one (`integrate`, `product`, `nd`, ...). A rename that
  would change which variable such a call binds is refused: the implicit
  variable of a `limit` or an `nd` is chosen by name, so `h` cannot become `Pi`,
  and the `x` of `limit(sin(x)/x + y, 0)` cannot become `z`, which sorts after
  `y`.
- **A shader loop whose bound is a local assigned after its declaration ran the
  number of turns of the declaration.** On the `glsl` target,
  `let e = 0; for m in 1..5 { if m > 2 { e = m; break } }; for j in 1..e { s = s + j }`
  gave `s = 3`: the second loop ran to the value that the compiler read from the
  declaration of `e`. It now reads `e` at run time and gives `6`, the value of
  the interpreter.
- **A loop that writes to the elements of a large list no longer exceeds the
  call stack.** In Epsil, a loop such as
  `for k in 1..5000 { xs[k % 200 + 1] = xs[k % 200 + 1] + 1 }` over a list of
  more than 100 elements, or the same loop with `replaceAt`, `insert` or
  `deleteAt`, gave the error "Maximum call stack size exceeded" after some
  thousands of writes. It now gives the list. The same applies to `ReplaceAt`,
  `Insert` and `DeleteAt` applied again and again to their previous result in
  MathJSON, for a list of at most `maxCollectionSize` elements.
- **A sum or product over a set with two or more conditions keeps every
  condition.** In `\sum_{k\in \lbrace1,2,3\rbrace, k>1, k<3} k`, only the first
  condition after the `k\in` clause was read; the second was dropped with no
  message, so the sum gave `5`. Every condition that follows the clause is now
  kept, joined with `And`, and the sum gives `2`.
- **A function defined in a block and used with a string now gives the
  interpreter's value in compiled JavaScript.** With `t: string`, the compiled
  `["Block", ["Assign", "g", ["Function", ["Length", "s"], "s"]], ["g", "t"]]`
  threw `RangeError: Length: the operand is not a list or a set` at `t = "abc"`;
  it now gives `3`. With `S: list<string>`, the same block with
  `["Map", "g", "S"]` threw at `S = ["xy", "z"]`; it now gives `[2, 1]`, and so
  do `Filter`, `Count`, `Any` and `All` with `g` as their predicate. The
  compilation declines, and the interpreter gives the value, when the body of
  `g` reads another variable of the block, calls another function of the block
  or calls `g` itself.
- **Compiling a built-in function mapped over a list of complex numbers no
  longer declares the symbol `_x` in the engine.** With `zs: list<complex>`, the
  compilation of `["Map", "Abs", "zs"]` to JavaScript declared `_x`, so that
  `ce.box(["Add", "_x", 1]).type` was `complex | infinity` afterwards; it is now
  `number`, as without the compilation. When the program had declared `_x` as a
  `string`, the compiled code gave `[NaN]` at `zs = [3 + 4i]`; it now gives
  `[5]`.
- **A spacing command before a `+` or a `-` that a number follows no longer
  makes the sign a multiplication.** `a\, - 1` was parsed as the product of `a`
  and `-1` and gave `-a`, and `x^2\, + 1` gave `x^2`. They are now `a - 1` and
  `x^2 + 1`, as `a\, - b` already was `a - b`. The same holds for the other
  spacing commands (`\;`, `\quad`, `\!`, `\hspace{1em}`, …) and after a function
  with no parentheses: `\sin x\, - 1` was `\sin(-x)` and is now `\sin(x) - 1`.
  With `form: 'raw'`, `\int \frac{dx}{x}\, - 1` now keeps the spacing command as
  a `HorizontalSpacing` operand next to the integral, as
  `\int \frac{1}{x}\,dx\, - 1` does.
- **A spacing command at the start of an expression, before a sign or another
  prefix operator, no longer gives an error.** `x = \, -b` was parsed as
  `x = \mathrm{space} - b` and gave `x == -b + Error(…)`; it is now `x == -b`.
  `\frac{\,-b}{2}` and `\sqrt{\quad -b}` are now `-b/2` and `sqrt(-b)`, and
  `\,\neg p` is `Not(p)`. With `form: 'raw'`, the spacing command is not kept in
  these cases, and `\, -1` is `["Negate", 1]`, as `-1` is (it was the number
  `-1`).
- **A spacing command directly after a minus sign or after `\neg` no longer
  gives an error.** `x = -\,b` gave `x == (-Error(…), b)`; it is now `x == -b`.
  `-\,\frac12` is now `-1/2`, and `\neg\,p` is `Not(p)`. With `form: 'raw'`, the
  spacing command is not kept in these cases. After an infix operator nothing
  changes: `a-\,b` was and is `a - b`.

### Performance

- **The parse of a long list after a symbol is linear in the length of the
  list.** `ce.parse('G=\\left[1,2,\\dots\\right]')` with thousands of numbers
  took a time proportional to the square of their count: with 40,000 numbers
  about 5 s, where the same list without `G=` took about 0.2 s. Each number of
  the list was tested as the base of a script, and the test copied every token
  since the symbol `G` before it looked at the number. The test now looks at the
  number first, and the parse with `G=` takes about the same time as the parse
  without it.
- **The definitions of a discarded scope are released, also when their bodies
  apply a name that has no definition.** A function such as `f(x) := h(x) + 1`,
  defined while `h` has no definition, is re-derived when `h` gets one, so that
  `h(x)` reads as a call and not as a product. The engine kept every such
  definition for its whole life, also after `ce.popScope()` discarded the scope
  that held it, and each later declaration of `h` walked them all. A host that
  pushed a scope, defined a hundred such functions and popped the scope at each
  edit of a document grew by about 1.5 MB per edit, and the tenth edit took
  about nine times as long as the first. The engine now holds these definitions
  weakly: a definition that nothing reaches is collected, and a definition in a
  scope that the host keeps and pushes again later is re-derived as before. A
  definition is released only after the end of the synchronous task that made
  it, and `ce.withValues()` refuses a value for a name that only collected
  bodies applied until the garbage collector has run.
- **A compiled loop that updates the elements of a local list tests nothing at
  each update.** In `let L = H; for k in 1..n { L = replaceAt(L, c, L[c] - 1. }`, each update tested that `L` still held the copy the block had made, and kept a call to make that copy in the loop. When the local is declared with a value and every other write of it is such an update, the declaration now copies the list (`let L = _SYS.ownedCopy(_.H)`) and each update writes it directly (`L = _SYS.replaceAtInPlace(L, c, …)`). The input list is never changed, as before. A loop of 1,000,000 passes with two updates each takes 1.15 to 1.25 times as long as the same loop written by hand with `L[c - 1] += 1`, against 1.32 to 1.44 before (CE-1098). A list that is updated
       only outside loops keeps the copy at its first update, so a block that
       does not update it does not copy it.
- **On the `interval-js` target, a conditional writes the code of its second
  branch once.** `\begin{cases} A & c \\ B & \top \end{cases}` was compiled to
  `(t = c) === 'true' ? _IA.res(A) : t === 'false' ? _IA.res(B) : _IA.hull(A, B)`,
  which holds the code of `B` twice. When `B` is longer than a short call, the
  code is now
  `(t = c) === 'true' ? _IA.res(A) : _IA.elseArm(t === 'false', t === 'false' ? null : A, B)`,
  with the same values. A plot expression that sums 20 such terms is 20,580
  characters of code and preamble instead of 28,567, and holds 45 arrow
  functions instead of 89, so it loads faster (CE-1167).

## 0.184.0 _2026-11-08_

### Breaking Changes

- **Record types are closed, and a field can be optional.** A value of
  `record{a: integer, b: string}` has exactly the keys `a` and `b`. There is no
  width subtyping any more: `record{a: integer, b: string}` is not a subtype of
  `record{a: integer}`, and a dictionary literal with an extra key is not a
  value of the narrower record type. Depth subtyping stays. A field written
  `b: string?` is optional: a value can leave its key out, and
  `record{a: integer}` is a subtype of `record{a: integer, b: string?}`. A field
  that holds `Missing` keeps its key. Dictionaries stay open: a record type is a
  subtype of `dictionary<V>` when the type of each field, optional fields too,
  is a subtype of `V`, and the empty dictionary `{->}` is a value of every
  record type whose fields are all optional.
  - The join of two record types has the keys of both; a key that only one side
    lists, or that one side makes optional, is optional. The meet is `never`
    when one side requires a key that the other does not list.
  - `Values(r)`, the element type of a record and the type of its entries are
    the join of the types of its fields.
  - `Field(r, "zz")` and `At(r, "zz")` are the error `unknown-field` when `r` is
    a variable declared with a record type that does not list `zz`. A dictionary
    literal, a variable whose type is inferred and a constant still give the
    absence value for a key they do not hold. Reading an optional field that the
    value leaves out gives the absence value of the field type (`Missing` for
    `b: string?`).
  - `RecordType.closed` is removed from the type representation, and
    `RecordType.optional` lists the optional keys.
  - The result types of `FindRoot` and `FindFit` list `timedOut`, `phase`,
    `route` and `reason` as optional fields.

### New Features

- **`DeleteAt(d, key)` removes a key from a dictionary or a record.**
  `DeleteAt({"a" -> 1, "b" -> 2}, "b")` is `{"a" -> 1}`. The value is a copy:
  the dictionary that the operand holds does not change. A key that the
  dictionary does not hold gives the dictionary. For a record type the result
  type has the field removed: with `r: record{a: integer, b: string}`, the type
  of `DeleteAt(r, "b")` is `record{a: integer}`. A key that is not a string is
  an error.

- **Epsil: `parallel for` loops, parallel comprehensions and `+=`.**
  `parallel for k in 1..n { L[c] += 1 }` runs its passes in an order that is not
  specified (the MathJSON `ParallelLoop`), and `[f(k) parallel for k in 1..n]`
  is the list of a comprehension whose passes are independent
  (`ParallelComprehension`). The body can change a variable declared outside the
  loop only with `+=`, and can have no effect other than `random`; a read of
  such an accumulator in a pass gives an unspecified value. `epsil check`
  reports each rule with its own code (`parallel-outer-write`,
  `parallel-accumulator-read`, `parallel-effect`, `parallel-exit`,
  `parallel-comprehension-write`, `parallel-clause-not-first`). `epsil check`
  reports a read of an accumulator written by name in the body; a read by
  another route (a function that the body calls, `parse("s")`, a function of the
  host) is not reported. The interpreter and the JavaScript target give such a
  read the value that the passes, run in order, give; a target that runs the
  passes in parallel declines a pass that reads an accumulator. Inside
  `WithRandomSeed`, the loop consumes one draw index of the frame and each pass
  draws from its own frame, so the direct draws of a pass do not depend on how
  the passes are split (`docs/RANDOMNESS-MODEL.md` §3); the draws of a lazy view
  inside a pass, such as `[random() for j in 1..2]`, are unspecified. The
  interpreter runs the passes in order, and the JavaScript target compiles them
  with the same values; the other targets decline them. `s += e` (`AddTo`) is
  new everywhere: it is `s = s + e`, and `L[i] += e` is `L[i] = L[i] + e`, with
  each position evaluated once. `parallel` is now a contextual keyword: it is
  read as one only before `for`, so a program that uses `parallel` as a name
  keeps its meaning.
- **`Module` reads the library definition of a name that a local definition
  shadows.** `["Module", "Pi"]` is the constant π of the standard library, also
  in a scope where `Pi` is declared and assigned `3`, and
  `["Apply", ["Module", "Floor"], x]` calls the library function `Floor` where a
  user function `Floor` exists. The canonical form of `Module(Pi)` is the symbol
  bound to the library definition. A qualified call is the plain call `[f, …]`
  bound to the library definition, also where `f` is shadowed: the library rules
  simplify it (`["Apply", ["Module", "Sqrt"], ["Power", "y", 2]]` with a user
  function `Sqrt` and a real `y` simplifies to `["Abs", "y"]`), a library
  function that holds or binds an operand reads it as the library does (`Sum`,
  `If`), and a named argument is valid. The arguments read the definitions of
  the scope: with a user function `Not` that returns its argument,
  `["Apply", ["Module", "Not"], ["Not", "False"]]` is `True`. A callee written
  in parentheses, `["Apply", ["Delimiter", ["Module", f]], …]`, is the same
  library call; a callee of another form applied to a library function that
  holds or binds an operand gives the error
  `qualified-call-arguments-canonical`. A name that the library does not define
  gives `["Error", "'not-a-library-name'", name]`. A second operand is reserved
  for the name of another module. LaTeX has no spelling of the qualifier:
  `["Module", "Pi"]` is written `\pi`.
- **Epsil: the qualified name `std::name`.** `std::pi` (or `std::Pi`) is the
  library constant π and `std::floor(2.5)` calls the library function `Floor`,
  whatever the program binds: after `function Floor(x) { x + 100 }` and
  `let floor = 7`, `std::floor(2.5)` is `2`. Where a function or a parameter of
  the program has the name, a qualified call is still the call of the library
  function, also of a library function that holds or binds an argument, or with
  a named argument: after `function Sum(x) { 0 }`, `std::sum(k, k in 1..3)` is
  `6`. `std` is not a reserved word, so `let std = 5` is still valid. A name
  other than `std` before `::` is the error `unknown-module`, and a name that
  the library does not define after `std::` is the error `not-a-library-name`.
  The serializer writes `["Module", "Pi"]` as `std::pi`. A bare name keeps its
  spelling, because it reads what the name reads where the text is read.
  `Module` cannot be rebound, as `Nothing` and `Missing` cannot: it is the form
  of every qualified name. A `let`, a `const`, an assignment or a function named
  `Module` (in MathJSON, a `Declare`, an `Assign` or a `DefineFunction` of
  `Module`, in any scope) defines nothing and gives the error `module-binding`
  when it runs; the static check of Epsil reports every binding of `Module`,
  also a parameter, a loop variable, a `match` pattern and the index of a `sum`.
  A qualified name reads the library in every case: the head `Module` always
  reads the library operator, whatever the program or the host binds.

### Behavior Changes

- **Some divergent integrals of `1/(t·(−ln t)^p)` with `p` near 1 are `NaN`, not
  `+∞`.** The numerical integration cannot tell these integrals from the
  convergent ones with `p` slightly above 1 (see Resolved Issues). A divergent
  integral of this kind in one variable is still `+∞` when its antiderivative is
  known: `\int_0^{1/2} \frac{dt}{t(-\ln t)}` stays `+∞`. Otherwise it is now
  `NaN`: `\int_0^{1/2} \frac{dt}{t(-\ln t)^{0.995}}`,
  `\int_0^{1/2} \frac{dt}{t(-\ln t)(1+t)}` and an `Integrate` with the limits of
  `t` and of a second variable `x` gave `+∞`.

- **In a scope that shadows a library name, the MathJSON of a result writes
  `Module`.** `.json` and `toMathJson()` write a symbol bound to the library
  definition as `["Module", name]`, and a call as
  `["Apply", ["Module", name], …]`, when the name reads another definition where
  the result is read again: in the current scope, or in a local scope of a
  `Function` or a `Block` of the result that encloses the node. So a result read
  again in that scope keeps its value: in a block with `Declare(Pi, real)` and
  `Assign(Pi, 3)`, the result `π²/6` of `Sum(1/n², n, 1, ∞)` is written
  `["Divide", ["Power", ["Module", "Pi"], 2], 6]`, and boxed in the block it
  gives 1.6449, not 1.5. Outside such a scope, the output does not change.
- **`isSame()` and `match()` compare the function that a call is bound to, not
  only its name.** Take `L = ce.box(['Sqrt', 'y'])`, then push a scope where a
  user function `Sqrt` is declared (`ce.declare('Sqrt', 'function')` and
  `ce.assign()`), and box `U = ce.box(['Sqrt', 'y'])` there:
  - `L.isSame(U)` was `true`; it is now `false`, as for two symbols of the same
    name bound to different definitions.
  - `U.match(['Sqrt', '_x'])` was `{_x: y}`; it is now `null`. A library name in
    a pattern means the library function, so `replace()` and the rules do not
    apply a library rule to a call of a user function of that name. A pattern
    head that is not a library name still matches by name.
  - `ce.function('Tuple', [L, U]).match(['Tuple', '_x', '_x'])` was a match; it
    is now `null`.

  Two calls of a library function are still `isSame`, also when they come from
  two engines, or when one was made after
  `ce.declare(name, …, { extend: true })` kept the library handlers. A raw call
  is still compared by name with another raw call, but it is not `isSame` to a
  canonical call:
  `ce.box(['Hold', ['Sqrt', 'y']]).op1.isSame(ce.box(['Sqrt', 'y']))` was
  `true`; it is now `false`. The same holds for a finite `Range` and the list of
  its integers: a canonical `Range(1, 3)` and a canonical `[1, 2, 3]` are still
  `isSame`, but a raw `Range(1, 3)` or a raw `[1, 2, 3]` is no longer `isSame`
  to a canonical `Range(1, 3)`. The `hash` of a call does not change.

### Resolved Issues

- **A formula made before the user defines a function with the name of a
  built-in function keeps the built-in function when it is evaluated after that
  definition.** With `e = ce.box(["Add", "x", ["Sin", "x"]])`, then a pushed
  scope where `Sin` is assigned `t ↦ t + 100`, `e.evaluate()` gave a call of the
  user's `Sin`: at `x = 1` the result was `102`. It now gives `x + sin(x)` with
  the built-in `Sin` (written `["Apply", ["Module", "Sin"], "x"]` in that
  scope), which is `1.8415` at `x = 1`. A `Hold` made before a user `Hold` stays
  held. In the other direction, the call of a user function declared with no
  value, evaluated after its scope ends, stays a call of the user function: a
  user `Sqrt(4)` is no longer `2`. `evaluateAsync()`, and a host function that
  is declared again in an inner scope, still read the new definition.

- **A function that a function body defines reads the variables of the body when
  a closure calls it after the call has ended.** With the body
  `Block(Declare(c, "real", 5), DefineFunction(h, k ↦ c + k), Assign(g, x ↦ h(x)))`
  applied to `1`, the call `g(10)` gave `c + 10`; it now gives `15`. A closure
  that the body returns (`k ↦ h(k)`) had the same defect, with `evaluate()` and
  with `evaluateAsync()`, and so did a function of the body that reads a
  parameter of the body. Each call keeps its own values: a closure of an earlier
  call still reads the values of that call.

- **A function whose body defines a helper with `let` or `=` and calls it with a
  parameter takes a list argument whole when the helper does.** With
  `function f(xs) { let h = (t) => count(t); h(xs) }`, `f([1, 2])` applied `f`
  to each element and gave two `incompatible-type` errors; it now gives `2`, as
  when the helper is declared with `function h(t) { count(t) }`. The slot of
  `xs` in the type of `f` is now `collection<any> | value`, not `unknown`. This
  also applies to a helper written `h = (t) => count(t)` and to a chain of
  helpers written with `=`. A helper that reads its parameter element by element
  (`(t) => t + 1`) still maps over the list.

- **In an Epsil function body or block, a second clause of a function with the
  same parameters is the error `function-redefinition`.** At the top level of a
  program this was already an error. In a body, the second clause gave no
  message, and a call used one clause or the other: with
  `function g(a) { f(y) = y + 1; f(x) = x + 3; f(a) }`, `[g(5), g(6)]` was
  `[6, 9]`. Now `epsil check` reports `function-redefinition`, and `g` is not
  defined, as with two `let` of one name in a body. Clauses with different
  parameters (`f(0) = 1` and `f(x) = 3`) still make one function.

- **The derivative of an expression that holds a named point is computed.** The
  derivative of a symbol that holds a point is the zero point, not the number
  `0`. With `p := (1, 2)`, `D(p + (\sin u, u^2), u)` was an `incompatible-type`
  error, and `D(PointY(p + (\sin u, u^2)), u)`, `D(PointY(u^2 p), u)` and, with
  `g(t, z) := t^2 z`, `D(PointY(g(u, p)), u)` stayed unevaluated. They are now
  `(\cos u, 2u)`, `2u`, `4u` and `4u`. A named list of points gives a list of
  zero points: with `S := [(1, 2), (3, 4)]`, `D(PointY(u^2 S), u)` is
  `[4u, 8u]`. A symbol that holds a number or a list of numbers keeps the
  derivative `0`. The derivative of a function applied to a point, such as
  `D(Norm(p - (\sin u, u)), u)` or `D(f((u, u^2)), u)`, gave a point, a wrong
  shape: the partial derivative with respect to a point is a gradient. It now
  stays unevaluated, except for an operator whose `derivative` key gives a
  number for that partial derivative.

- **On the GLSL and WGSL targets, a function can take a list input as an
  argument.** With the input `H: list<real^1600>` and
  `g: (list<integer>, real) -> real`, the compilation of `g(H, x)` failed:
  `parameter "H" has no static GLSL type`. It now compiles to a call of a
  definition of `g` with no parameter for the list, whose body reads the input
  `H` itself, through the texture of a `sampler2D` storage hint, the buffer of a
  `storage-buffer` hint, or the uniform array. The argument must be an input of
  the expression: for a list that is a local, a literal or a computed list, the
  function still has no shader definition.

- **The derivative of a list made by a spread or a join is computed.** The
  derivative of `ListJoin` (the form of a list literal with a spread,
  `[...a, b]`) is the `ListJoin` of the derivatives of its operands. With
  `a = (u, u^2)` and `b = (u, u^3)`, `D(PointY(ListJoin(a, b)), u)` stayed
  unevaluated; it is now `[2u, 3u^2]`. An operand that is a list, or an
  expression whose value is a list, gives the derivatives of its elements. A
  `ListJoin` with a set or a string operand still stays unevaluated.

- **Above machine precision, a real number plus an imaginary number keeps every
  digit of the imaginary part.** At precision 30,
  `1+0.123456789012345678901234567i` was the complex number
  `1 + 0.12345678901234568i`; it is now `1 + 0.123456789012345678901234567i`.
  This also applies to the MathJSON
  `["Add", 1, ["Complex", 0, {"num": "0.123456789012345678901234567"}]]` and to
  a sum of several imaginary numbers.

- **In a block, a function that calls a function defined later in the block
  takes a list argument whole when the later function does.**
  `Block(Assign(q, a ↦ h(a)), Assign(h, t ↦ Count(t)), q([1, 2]))` applied `q`
  to each element and gave two `incompatible-type` errors; it now gives `2`, as
  when `h` is assigned before `q`. This also applies to a chain of such
  functions. The result of a function with a typed parameter still depends on
  the order of the two assignments.

- **In the Epsil editor model, a `limit` that does not name its variable binds
  the variable that the engine chooses also when that name is a `let` or a
  `const` of the program.** After `let a = 5`, the program `limit(a + h, 1)`
  gives `h + 1`: the engine binds `a`. A rename of `let a` changed the `a` of
  the limit too; it now changes only the `let`. After `const h = 5`,
  `limit(sin(h)/h, 0)` gives `sin(5)/5`, and a rename of `const h` now changes
  the `h` of the limit too. `binderSitesOf()` takes an optional sixth argument,
  a function that gives the `ProgramDeclaration` of a name (exported type): with
  it, after `let L = [1, 2]`, the result for `limit(total(L)*t, 0)` is
  `[{ name: "t", operands: [0] }]`, where it was `[]`. The same applies to
  `nLimit`, `nd` and `nIntegrate`.

- **A convergent integral of `1/(t·(−ln t)^p)` with `p` slightly above 1 is no
  longer `+∞`.** `\int_0^{1/2} \frac{dt}{t(-\ln t)^{1.005}}` with `.N()` gave
  `+∞`; it now gives `200.354 ± 0.042` (the exact value is `200.367`), and
  `p = 1.008` gives `125.362 ± 0.016`. When the exponent is so close to 1 that
  the quadrature cannot tell a convergent integral from a divergent one, the
  result is `NaN`: `p = 1.001` (exact value `1000.37`) gave `+∞`, and now gives
  `NaN`. `NIntegrate`, an integral with more than one variable and compiled code
  give the same results.

- **In Epsil, an error in the argument of `Exp` or in the numerator of a
  division underlines the argument.** With `w` a variable that holds the string
  `"s"`, the error of `let v = Exp(w) + 1` underlined `Exp(w)`, and that of
  `let v = w/2` underlined the whole statement. Both now underline `w`.

- **A number made at a higher precision gives the same digits in a list as
  alone, after the engine is set to machine precision.** With `b` the number
  `0.3` made at precision 30 and the engine then set to `"machine"`, `3b` is
  `0.9`, but `3·[b, 1.5]` and `3·[[b, 1], [2, 3]]` gave `0.8999999999999999` for
  the element of `b`. They now give `0.9`, and so do the element-wise product,
  `Dot` and the matrix product. A list of machine numbers is computed on doubles
  as before, at the same speed.

- **In Epsil, an error in the body of a called function underlines the call.**
  With `function g(x) { Ln(x) + 1 }` and `let y = 5`, the error of
  `let v = y + g("a")` underlined `y`, because the sum in the body of `g` was
  matched to the sum of the statement. It now underlines `g("a")`. The same
  applies to an error that a variable holds from an earlier statement: with `w2`
  the error of `Sin(q)`, `let v = w2 * Sin(x)` underlined `x`, and it now
  underlines `w2`.

- **In a sum or a product, each derivative with respect to a subscripted
  variable uses its own variable.**
  `\sum_{i=1}^{2} \frac{\partial}{\partial x_i} x_i^2` gave `4x_i`, and it now
  gives `2x_1 + 2x_2`. In MathJSON,
  `["D", ["Power", "x_1", 2], ["Subscript", "x", 1]]` is the derivative with
  respect to `x_1`, `2x_1`; it stayed unevaluated before.

- **A function with a local variable, mapped over the rows of a matrix, gives a
  row for each row.** A function made with `ce.box()` before the call, such as
  `f = row ↦ (q ≔ 1; q·row/row)`, read `row` as a number, so
  `ce.function('Map', [f, [[1, 2], [3, 4]]])` gave `[1, 1]` and was typed
  `vector<2>`. It now gives `[[1, 1], [1, 1]]`, typed `matrix<2x2>`, as the same
  function written in the call does. The same applies to a function whose body
  holds another function literal, and to the other operators that apply a
  function to the elements of a collection, such as `Reduce`.

- **A function mapped over residue classes reads the variables of the scope
  where it was made.** With `k = 1`, a function `f = x ↦ k·x` made with
  `ce.box()`, and an inner scope that declares another `k = 2`,
  `Map(f, [ResidueClass(2, 5), ResidueClass(3, 5)])` gave
  `[ResidueClass(4, 5), ResidueClass(1, 5)]`, although `f(ResidueClass(2, 5))`
  gave `ResidueClass(2, 5)`. The map now gives
  `[ResidueClass(2, 5), ResidueClass(3, 5)]`. The same applies to the other
  operators that apply a function to the elements of a collection, such as
  `Reduce`.

- **A numeric double integral whose integrand grows like `1/r` near two, three
  or four points of the box now gives its value.** The potential of two point
  charges over the unit square,
  `\int_0^1\int_0^1 \frac{1}{\sqrt{(x-0.5)^2+(y-0.5)^2}}+\frac{1}{\sqrt{(x-0.25)^2+(y-0.25)^2}} dy\,dx`,
  gave `0 ± 50000000` under `.N()`, and it now gives
  `6.68863997708 ± 0.00000000038`. Since the previous release, this worked for
  one such point only. The box is now cut at each point, and each part is
  integrated with at most one point, at a corner. This applies to a sum and to a
  product of such divisors. With five or more points, or with two divisors that
  are zero at the same point, the box is still integrated whole.
- **The error of a call that returns a value of the wrong type, as a term of a
  sum or a factor of a product, now names that operand.** With `w = ["a"]`, the
  value of `["Multiply", ["At", "w", 1], ["Cos", "x"]]` was the
  `incompatible-type` error with no `ErrorFrame`, so an Epsil program
  `let v = w[1] * Cos(x)` underlined the whole statement. The error now has the
  frame of the operand `w[1]`, and Epsil underlines `w[1]`. The same applies to
  `Add`. The frame names the operand whose value the sum or product refused,
  also when an operand assigns a variable: with a function `F` that assigns
  `"a"` to `s` and returns `"b"`, the error of `s * F()` names `F()`. Before,
  such a product had no frame.

- **A function that calls a parameter with no declared signature does not claim
  a list type for that call.** The type of
  `["Apply", ["Function", ["h", ["List", ["List", 0, 0], 5]], "h"], ["Function", ["Count", "t"], "t"]]`
  was `list<list<unknown^2> | unknown>`, but its value is `2`. The call of `h`
  is now typed `unknown`, and the function literal is typed
  `(h: unknown) -> unknown`, because the function that `h` receives can read the
  whole list. A parameter declared with a signature, such as
  `(list) -> integer`, keeps the result type of the signature.

- **In Epsil, the location of an error in a subtraction does not select a
  variable of another sum.** With `let s: any = "a"` and `let y = 5`, the error
  of `let v = Sqrt(y + 2) - s` underlined the `y` of `y + 2`, which did not make
  the error. Now it underlines the whole subtraction `Sqrt(y + 2) - s`, as it
  does for the sum `Sqrt(y + 2) + s`: the error of a subtraction names a sum,
  and the `y + 2` inside `Sqrt` is another sum. The location of an error in
  `x + Ln(y) + Ln(2)`, when no operand is sure, is now that sum, not the whole
  statement.

- **The LaTeX of a sum or a product over a set with a condition keeps the
  condition.**
  `["Sum", "k", ["Element", "k", ["Set", 1, 2, 3], ["Greater", "k", 1]]]` gave
  the LaTeX `\sum_{k\in \lbrace1, 2, 3\rbrace}k`, which parsed again gives 6
  instead of 5. Now the LaTeX is `\sum_{k\in \lbrace1, 2, 3\rbrace, 1\lt k}k`.
  The parser also reads more conditions after `k\in S`: a predicate
  (`\mathrm{IsPrime}(k)`), an equation (`k\bmod 2=0`, `k=3`) and a membership of
  the same index (`k\in T`). Before, it ignored a predicate and read an equation
  or a membership as one more index range of the sum.

- **Two integral signs with both differentials in the numerator of a fraction
  give the right value when a term follows the fraction or a factor comes before
  the inner sign.** `\int_1^2\int_3^4 \frac{dx\,dy}{xy} + 1` gave
  `1 - 2ln(2)ln(3) - 2ln(2) + 4ln(2)^2 + ln(3)` and
  `\int_1^2 2\int_3^4 \frac{dx\,dy}{xy}` gave
  `-4ln(2)ln(3) - 4ln(2) + 2ln(3) + 8ln(2)^2`: the outer integral had no
  variable. Now each parses as the same expression written with the
  differentials after the integrand
  (`\int_1^2\int_3^4 \frac{1}{xy}\,dx\,dy + 1`), and gives
  `1 + 2ln(2)^2 - ln(2)ln(3)` and `-2ln(2)ln(3) + 4ln(2)^2`. The term after the
  fraction is outside both integrals. A negation before the inner sign
  (`\int_1^2 -\int_3^4 \frac{dx\,dy}{xy}`) is also fixed.

- **An integral whose differential is in a factor before another factor is an
  error, not a wrong value.** In `\int_1^2 \frac{dx}{x}\cdot 2`, the parser
  searched only the end of the product and its last factor for the differential,
  found none, and took the `d` of `dx` as the integration variable: the integral
  evaluated to 3, not 2 ln 2. Now a factor before the last one that holds a
  differential (`\frac{dx}{x}\cdot 2`, `\frac{dx}{x} 2`, `(x\,dx) 3`,
  `\iint \frac{dx}{x}\frac{dy}{y}`) is replaced by an `unexpected-differential`
  error, as a differential at the end of a denominator already is. Write the
  differential last: `\int_1^2 2\frac{dx}{x}` or `\int_1^2 \frac{2}{x}\,dx`.
  Parentheses that hold only the differential after a symbol (`f(dx)\cdot 2`)
  are not changed: they can be a function call.

- **The derivative of a long list is computed when the derivative of each
  element is.** The size limit of a derivative (25 000 nodes) applied to the
  whole list, so a list of many small elements stayed unevaluated: `D` of the x
  coordinate of a list of 14 or more cubic Bezier pieces, each read from a list
  of 31 points with `At(P, 3⌈u⌉ + j)`, stayed `D(…)`, although each piece alone
  was differentiated. The limit now applies to each element of a `List` and to
  each operand of a `Join` whose value is a list, and the result is the list of
  the derivatives. An element whose derivative passes the limit still makes the
  whole derivative stay unevaluated.

- **`toMathJson()` writes a pattern, and every other operand that its operator
  keeps as written, as authored, so that `ce.box()` reads the MathJSON back.**
  The readability rewrites of `toMathJson()` write a `Tuple` of two elements as
  `Pair` and `["Add", "x", -1]` as `["Subtract", "x", 1]`. Applied to a pattern,
  they gave another pattern: the function
  `["Function", ["Match", "u", ["MatchCase", ["Tuple", "_a", "_b"], ["Add", "a", "b"]], ["MatchCase", "_", 0]], "u"]`
  was written with `["Pair", "_a", "_b"]`, and read back, it gave `0` for the
  pair `(1, 2)` where the original gave `3`;
  `["Match", ["Subtract", "y", 1], ["MatchCase", ["Add", "_x", -1], "x"]]` was
  written with `["Subtract", "_x", 1]`, and read back, it gave a `match-no-case`
  error where the original gave `y`. The pattern and the guard of a `MatchCase`,
  the two sides of a `Rule`, a destructuring parameter of a `Function`, the
  destructuring target of an `Assign` or a `Declare`, and the operand of `Hold`
  are now written as authored. A value, for example the value of the `Assign` or
  the subject of the `Match`, is still written with the rewrites:
  `["Tuple", 1, 2]` is `["Pair", 1, 2]`. Before this release, the destructuring
  `Tuple` of a `Function`, an `Assign` or a `Declare` was written `Pair`, and
  `ce.box()` of that gave an `expected-a-symbol` error in place of the
  parameter.

- **A call of a user function with the name of a library function is no longer
  read as the library function when it is used in another scope.** A call keeps
  the function it was bound to where it was made, and the library rules
  (canonical forms, simplification, derivatives, compilation) now apply to a
  call only when it is bound to the library function. With a user `Sqrt` defined
  as `x ↦ x + 100` in a pushed scope, a call `Sqrt(y^2)` made there and
  simplified after the scope ends gave `|y|`; it now keeps its form. With a user
  `Add` that multiplies, the call `Add(2, 3)` made in its scope and then used as
  an operand of the library `Add` (`Add(u, 1)`) was merged into the library sum
  and gave 6; it gives 7. The same holds for the operands of `And`, `Or`, `Xor`,
  `Union`, `Intersection` and `Chop`, and an assignment operator of the same
  name as a user function (`AddTo`, `Assign`) is no longer reported as an
  assignment inside an operand. A library call made before the declaration of a
  user function of the same name is now simplified in that scope: `Sqrt(y^2)`
  gives `|y|` there too. The derivative of such a library call in that scope
  stays unevaluated, because its result would name the user function: in a scope
  with a user `Sin(t) = t + 100`, the derivative of a library `Sin(x)` was
  `Apply(Derivative(Sin, 1), x)`, which reads `Sin` by name; it is now the
  unevaluated `D(Sin(x), x)`, which holds the library `Sin`: after the scope
  ends, its numeric value is `cos(x)`. A compiled call whose function is not the
  one its name reads where it is compiled now declines, and the interpreter
  gives the value.

- **A user function given by its name as the callback of `Map`, `Filter`,
  `Count`, `Any` or `All` over a list of strings now gives the interpreter's
  value in compiled JavaScript.** With `S: list<string>` and
  `f := s ↦ Length(s)`, the compiled `["Map", "f", "S"]` threw
  `RangeError: Length: the operand is not a list or a set` at `S = ["xy", "z"]`;
  it now gives `[2, 1]`, as the interpreter does. The callback now calls the
  copy of `f` with its parameter typed `string`, as the call `["f", "t"]` with a
  string `t` already did.

- **Above machine precision, the arithmetic of lists and matrices keeps all the
  digits of each element.** A number times a list or a matrix, the sum and the
  element-wise product of two lists, and the matrix product (`Multiply`, `Add`,
  `MatrixMultiply`) kept only about 16 digits of an element with more digits
  than a machine number holds. At precision 30,
  `2\cdot\lbrack 0.123456789012345678901234567, 1.5\rbrack` was
  `[0.24691357802469136, 3]`; it is now `[0.246913578024691357802469134, 3]`, as
  the product of the two numbers is. The same holds for a complex element, and
  for `Determinant`, `Inverse`, `Trace`, `Transpose` and the other matrix
  operators. So at the default precision of 21 digits, the matrix operators on
  the `N()` of a matrix give 21 digits, and they take more time: on a 12×12
  matrix, `Determinant` went from 0.4 ms to 3.6 ms and `Inverse` from 0.6 ms to
  9.2 ms in one measurement. Two other results change with such an element. An
  integer cell of a matrix product that does not depend on it is exact, as
  beside an exact rational: `4`, not `4.0`. A matrix that is singular in exact
  arithmetic has a small determinant, the rounding residue of its digits, in
  place of `0`: `Determinant(N([[1/3, 2/3], [1/7, 2/7]]))` is about `-1.4e-22`,
  and its `Inverse` has very large entries. Machine numbers, and big numbers
  that a machine number holds exactly, give the same results as before.
- **The length of a random list is the number of its elements.** A comprehension
  whose guard or domain draws a random number, such as
  `[j for j in 1..10 if random() < 0.5]`, computed its length with draws of its
  own, so the length and the elements could disagree: `(length(v), sum(v), v)`
  gave `(4, 23, [1,3,5,6,8])`. Now the length, the emptiness and the elements of
  one list come from the same draws: `(4, 11, [1,2,3,5])`.
- **A function declared to take a point checks each coordinate of the point.**
  With `U` declared `(tuple<integer, integer>) -> integer` and defined as
  `U(p) := p.x`, `U((1.5, 2))` was valid, typed `integer`, and gave `1.5`. Now
  it is an `incompatible-type` error, as `U([(1.5, 2)])` already was for the
  point in the list. The same check applies to a variable that holds the point,
  and to an argument whose value is such a point when the call is evaluated.

### Performance

- **A compiled minimum or maximum of a `Map` over a list of known length runs as
  fast as the written-out form.** `Min(Map(k ↦ (x − k)² + (2k)², L))`, where `L`
  is a list of up to 64 elements whose length is known at compile time, compiles
  to `Math.min(…)` of one written-out body per element, on every target. The
  JavaScript code built the mapped list at each call and folded it, which took
  2.5 to 6 times as long per call (73 ns against 29 ns for `L = x + [0, 4, 2]`,
  202 ns against 31 ns for a list of 24 numbers). A nested `Max` of a `Map` in
  the function is written out too. The values do not change. A `Map` whose
  function has an effect, or whose value is a list, keeps its fold.
- **More copies of a sub-expression read the value of the first copy in one
  `evaluate()`.** Two cases computed each copy again: a copy that is a branch of
  `Which` (or of another operator that evaluates its operands itself), and a
  copy next to an element-wise operation on a list of more than 100 elements,
  such as `Abs(L)` or `Real(L)`. A formula of a host document holds 13 copies of
  three `Which` expressions over a list of 500 points, under `Real`, `Imaginary`
  and `Abs`. Its evaluation computed a `Which` 13 times, and now computes one 5
  times; the value does not change.
- **A higher derivative of a user function continues from the lower orders
  already computed.** After `Derivative(f, 2)`, the evaluation of
  `Derivative(f, 3)` computed the first and second derivatives of `f` again. It
  now differentiates the second derivative once more, while the state that it
  depends on is unchanged. For `f(x) = √(x + √(x + … + √(x + 1)))` nested 8
  times, `Derivative(f, 3)` after `Derivative(f, 2)` took 3.4 s and now takes
  1.9 s; the result does not change.
- **Compiled JavaScript reads its run-time helpers faster, and a loop that
  updates list elements runs about 4 times faster.** The helpers of a compiled
  function were held in an object that V8 searched as a hash table at each read.
  For a loop of 1,000,000 passes that adds 1 to two elements of a list
  (`L = ReplaceAt(L, c, L[c] + 1)`), `run()` took 15 ms and now takes 3.5 ms.
  The emitted code and the values do not change.
- **A definite integral is about 11% faster.** To know whether an expression
  that applies a function literal (`x ↦ …`) has effects, such as a random draw,
  the engine computed the full type of the literal, with the type of its body.
  It now computes only the effects of the literal when its type is not known
  yet. `∫₁² 1/x dx` took about 138 µs and now takes about 122 µs (medians of
  seven rounds). The values and the effects do not change. (CE-351)
- **The `latex` of a product with a rational coefficient is about 10 times
  faster to compute.** To write `Multiply(1/8, Abs(Sin(8x + 1/1000)))`, the
  serializer split the product into a numerator and a denominator, which built
  and typed new expressions, and then wrote the product as it was. It now writes
  such a product with no split. The serializer also no longer computes the type
  of each sub-expression to find a dictionary. For the 1,000 elements of
  `\sum_{n=0}^{3}\frac{1}{2^n}|\sin(2^nx+\frac{[0...999]}{1000})|`, reading
  `latex` took about 600 ms and now takes about 50 ms. The LaTeX and the
  MathJSON do not change. (CE-1018)

## 0.183.0 _2026-11-07_

### Breaking Changes

- **An Epsil definition in math style can no longer replace a function of the
  library.** `Sin(x) := 5` or `Sin(x) = 5` replaced `Sin` for every later
  computation on the engine, so that LaTeX `\sin(0)` gave `5`. It is now the
  error `assignment-to-library-function`, as the LaTeX `\sin(x)\coloneq 5` is,
  and it defines no function. One-letter names of the library are included:
  `N(x) := x + 1` and `D(x) := 2x` now give the error. Use another name, or
  write `function Sin(x) { 5 }` to replace the function on purpose. A lowercase
  name (`sin(x) := 5`) is a name of the program and stays valid, and so does a
  definition of a function that the host declared or that an earlier `function`
  statement defined. `At(xs, k) := 5` now assigns to an element of the list, as
  `xs[k] := 5` does: it replaced the function `At`, so that `[7, 8][2]` gave
  `5`.
- **`expr.subs()` now avoids variable capture.** When a replacement contains a
  name that a binder of the expression binds, the binder renames that name
  first: `["Sum", ["Add", "j", "k"], ["Limits", "k", 1, 3]]` with `j` replaced
  by `k` is now `["Sum", ["Add", "k", "k_1"], ["Limits", "k_1", 1, 3]]`, which
  evaluates to `3k + 6`. Before, the result was
  `["Sum", ["Add", "k", "k"], ["Limits", "k", 1, 3]]`, which evaluates to `12`.
  The same applies to `Product`, a definite `Integrate`, `Comprehension`, a
  `Function` literal and a local of a `Block`. A substitution where no name
  collides gives the same result as before. In two cases a bound name cannot be
  renamed before the block runs, and the result is the same as before: the
  target of an `Assign` in a held `Block`, and a `Declare` or an `Assign` in a
  branch of an `If` of a held `Block`. `replace()` is not changed: it rewrites
  the structure and renames no binder.
- **A parameter with no type followed by a parenthesized argument is a call of
  the parameter.** A function can now take another function as an argument:
  `(g \mapsto \int_0^1 g(x)\,dx)(t \mapsto t^2)` is `1/3`; it was an
  `incompatible-type` error, because `g(x)` was the product `g \cdot x`. After
  `h(p, a) \coloneq p(a)`, `h(t \mapsto t^2, 0.5)` is `0.25`; it was the product
  `0.5 \cdot (t \mapsto t^2)`. This reverses an earlier rule:
  `(x, N) \mapsto x(N+1)` now calls `x`, and a product needs an explicit
  multiplication (`x \cdot (N+1)`), a number type on the parameter
  (`(x\colon \mathrm{real}, N) \mapsto x(N+1)`), or a declared signature for the
  function that `\coloneq` defines (`ce.declare('b', '(real, real) -> real')`,
  then `b(x, t) \coloneq t(x+1)`). An argument that contains the parameter stays
  a product: `q \mapsto q(2q)` is `q \mapsto 2q^2`. The variable of an integral,
  of a limit and of a sum is not a parameter: `\int_0^1 x(2)\,dx` is still `1`.

### New Features

- **`binderSitesOf()` and its `BinderSite` type are now exported from
  `@cortex-js/compute-engine/epsil`.** For a call of a library operator in a
  parsed Epsil program, the function gives the variables that the call binds and
  the operands that see each one, with the rules the engine uses. A host can
  then tell the names that a call reads from outside it:
  `binderSitesOf(ce, call, 'sum(k^2, k, 1, n)')` gives
  `[{ name: 'k', operands: [0, 1, 2, 3] }]`, so `k` is bound and `n` is read.
- **New `ce.withValues(values, fn)` gives symbols a value only while `fn`
  runs.** When `fn` returns or throws, each symbol gets back its earlier value
  and type. Every expression reads the values while `fn` runs, also one created
  before the call and the body of a stored function. Before, this needed
  `ce.checkpoint()`, `ce.assign()` and `ce.restore()`, and a checkpoint is
  refused during an evaluation:

  ```js
  ce.declare('a', 'real');
  ce.parse('f(x) := x + a').evaluate();
  const expr = ce.parse('f(2)');
  ce.withValues({ a: 1 }, () => expr.evaluate()); // -> 3
  expr.evaluate(); // -> a + 2
  ```

  These throw before any symbol gets a value: a constant, a symbol bound to a
  function definition, a value that is a function, a value that `ce.assign()`
  refuses, and a symbol that the body of a stored function applies while the
  symbol has no definition (`a` in `f(t) := a(t+1)`: declare `a` first).

### Behavior Changes

- **A conditional whose branch calls a function that is not defined yet has the
  type `unknown`.** With `q` declared `real`, `If(q < 2, g(1), 0)` was typed
  `integer` before `g` was defined; after `g := x ↦ x / 2` and `q = 1`, its
  value is `1/2`. It is now typed `unknown`, and the element-wise
  `Which(L < 2, g(1), True, 0)` with `L = [1, 3, 5]` is a `list<unknown^3>` (it
  was a `vector<integer^3>`). The same applies to a call of a function whose
  result type is `unknown`, and to the signature of a function whose body holds
  such a conditional. A recursive function is still typed by its base case:
  `r := n ↦ If(n = 0, 1, r(n − 1))` is `(n: unknown) -> integer`. Two functions
  that call each other can get a wider type than before, when one of them is
  assigned before the other exists: with `F` and `G` declared `function`,
  `F := n ↦ If(n = 0, x > 0, G(n − 1))` and then `G := n ↦ F(n)`, `F(m)` is now
  typed `unknown`; it was `boolean`.

- **A `Linspace` with an endpoint that is an infinity or `NaN` has no value.**
  Its samples cannot be computed, and its reads disagreed: for
  `Linspace(0, +∞, 3)`, `Sum` gave `0`, `Count` gave `3`, `Max` gave `+∞` and
  `Element(5, …)` gave `True`. Each of these now stays unevaluated, as for an
  endpoint with no value yet (`Linspace(a, 1, 3)`). Compiled JavaScript and
  Python give `NaN` for such a `Linspace`, also when an input endpoint is `±∞`
  or `NaN` at run time. With a count of 0 there are no samples, so
  `Linspace(0, +∞, 0)` is still the empty list.
- **A compiled integer power or product of a list declared with a type that
  admits both a matrix and a list of points (the bare `list`, `list<unknown>`,
  `list<any>`, `indexed_collection`) now fails to compile on the JavaScript
  target, where it gave the power of each entry.** With `p` declared `list` and
  the value `[[1, 2], [3, -4]]`, compiled `p^2` gave `[[1, 4], [9, 16]]`, where
  `evaluate()` gives the matrix power `[[7, -6], [-9, 22]]`. Compiled code holds
  a point as an array, so the same value can be a matrix or two points, whose
  square is the square of each coordinate. The compilation now fails with the
  diagnostic `unsettled-shape`, also for a list of points, and with the fallback
  on the result is the value of `evaluate()`. The same holds for `p·q` with `q`
  a list, and for an integer power of a value of type `any`, which can also be a
  matrix: an element `p[1]^2` of such a list (also in a sum such as
  `\sum_k p_k^2`), and `g(t)^2` for `g` declared `(real) -> any`. Declare `p` as
  `list<list<real>>` (a matrix) or `list<tuple<real, real>>` (points) to compile
  it. A non-integer power (`p^{0.5}`) and a product by a number (`3p`) still
  compile.
- **A sum or a product with no index and a free variable now stays
  unevaluated.** `\sum x^k` evaluated to the single term `x^k`, which looks like
  a correct value; it now stays `["Sum", ["Power", "x", "k"]]`, because no index
  is given and the index can be `x` or `k`. The same applies to `\prod x^k` and
  to `["Sum", "r"]` for a symbol `r` declared `real`. Write the index and its
  bounds to sum over it: `\sum_{k=1}^{n} x^k` (`\sum_{k} x^k` sums from `k = 1`
  to infinity). An operand with no free variable is still its own value:
  `["Sum", 5]` is `5`, and `\sum x^k` is `8` when `x` is `2` and `k` is `3`. The
  absent value `Missing` is not a free variable: `["Sum", "Missing"]` and
  `["Product", "Missing"]` are still `Missing`. A sum over a collection,
  `\sum [1, 2, 3]`, is not changed.
- **An assigned lazy collection that stays lazy no longer changes when a
  variable that it reads changes later.** In Epsil, after `k = 3` and
  `let big = filter(1..oo, c => c > k)`, the assignment `k = 10` changed
  `first(big)` from `4` to `11`; it now stays `4`. An `Assign` or a `Declare`
  stores such a collection with the values that its variables have at the
  statement, also the variables read by an inline function. The same applies to
  a `Filter` over a dictionary, and to a `Filter` over a set held by a variable
  typed `collection<any>`. A variable that the collection writes, and the
  variables read by a function that a variable holds (`let p = c => c > k`, then
  `filter(1..oo, p)`), are still read when the elements are read. A finite
  collection that reads a variable is still stored as the list of its elements.
  A finite collection made from a stored lazy one (`let t = take(big, 2)`) reads
  no variable, so it now stays lazy, and its callback runs each time its
  elements are read. `ce.assign()` is not changed: it stores the value it is
  given.
- **`\iint` and `\iiint` now give the limits in the order that the evaluation
  uses: the first limit is the outermost integral.** `\iint xy\,dx\,dy` parsed
  to `["Integrate", …, ["Limits", "x", …], ["Limits", "y", …]]`, which makes `x`
  the outer variable, and now parses to
  `["Integrate", …, ["Limits", "y", …], ["Limits", "x", …]]`. The bounds of the
  sign go with the first limit: `\iint_0^1 xy\,dx\,dy` was `1/4 * y^2` and is
  now `1/4 * x^2`. The same applies to `\oiint` and `\oiiint`. The LaTeX of an
  `Integrate` with several limits now writes the integral sign of the first
  limit first, and the differentials innermost first:
  `["Integrate", ["Multiply", "x", "y"], ["Limits", "x", 0, ["Multiply", 2, "y"]], ["Limits", "y", 0, 1]]`
  (value `y^2`) serialized to `\int_{0}^{1}\int_{0}^{2y}\!xy\,dx\,dy`, which
  parses back with the value `1/2`. It now serializes to
  `\int_{0}^{2y}\int_{0}^{1}\!xy\,dy\,dx`. The plain-text form (`toString()`)
  writes the differentials in the same order, with the variables of the limits:
  that integral is now `int_(0)^(2y)_(0)^(1)(x * y dy  dx)`. An integral with no
  limit still writes one differential for each parameter of its integrand:
  `["Integrate", ["Square", "x"], ["Tuple", "x", 0, 1, 5]]`, whose limit with
  four elements is not recognized, is `int(x^2 dx)`.

### Resolved Issues

- **At machine precision, the numeric value of a function of a long list of
  complex numbers is correct when the function reads the real or the imaginary
  part.** With `B` a list of 101 complex numbers `0.5 + 1.25i`,
  `["Conjugate", "B"]` with `.N()` gave the list itself: each element was
  `0.5 + 1.25i`, and it is now `0.5 - 1.25i`, as `.evaluate()` gives. The same
  applies to `["Map", ["Function", ["N", ["Real", "z"]], "z"], "B"]`, which gave
  `0.5 + 1.25i` and now gives `0.5`, and to
  `["Map", ["Function", ["N", ["Add", ["Imaginary", "z"], 0.5]], "z"], "B"]`,
  which gave `0.5` and now gives `1.75`, for a list of any length.
  `["Conjugate", "B"]` of a list of 100 elements or fewer, and every value at
  the default precision, were already correct.

- **`simplify()` now cancels the like logarithm terms of a sum for every base,
  when each term is a logarithm alone, negated, or with a number coefficient.**
  `\log(x^3) - 3\log(x)` stayed unchanged, while `\ln(x^3) - 3\ln(x)` simplified
  to `0`. It now simplifies to `0`, and so do `\log_2(x^3) - 3\log_2(x)`,
  `3\ln(x) - \ln(x^3)` and `2\ln(x^3) - 6\ln(x)`. The terms still stay when `x`
  is declared complex or is negative. In the same way, `simplify()` of
  `\log_{10.0}(x)` now keeps the float base `10.0`, as the other rules of `Log`
  do: it gave `\log(x)`.

- **A `Sum`, a `Product`, a quantifier or a set-builder whose condition reads a
  symbol with no value stays unevaluated.** With `x` not assigned,
  `["Sum", "k", ["Element", "k", ["Set", 1, 2, 3], ["Greater", "x", 0]]]` gave
  `0`, and `\{k \mid k \in \{1, 2, 3\}, k > x\}` gave the empty set, because a
  value whose condition was neither `True` nor `False` was dropped as if the
  condition were `False`. Both now stay unevaluated; with `x := 1` they give `6`
  and `\{2, 3\}`. A condition whose value is `Missing` still drops the value, as
  the condition of an `If` does.

- **A function made in the body of a `Sum` or a `Product` keeps the value that
  the index has in the iteration where the function is made**, as a function
  made in a `Loop` does. After
  `["Sum", ["Block", ["If", ["Equal", "i", 1], ["Assign", "g", ["Function", ["Add", "x", "i"], "x"]], "Nothing"], "i"], ["Limits", "i", 1, 3]]`,
  `g(1)` gave `4`, because the function read the last value of the index, and
  with `evaluateAsync()` it gave `["Add", "i", 1]`. It now gives `2` in both
  cases.

- **A function that calls a function that the same block assigned before it
  takes a list argument whole when the called function does.** The value of
  `Block(Assign(h, t ↦ Count(t)), Assign(q, a ↦ h(a)), q([1, 2]))` was a list of
  two `incompatible-type` errors, because `q` was applied to each element of the
  list; it is now `2`, as it is when `ce.assign()` defines the two functions.
  The called function must be assigned before the function that calls it: with
  `Assign(q, …)` first, `q` is still applied to each element.

- **The plain-text form of a negated sum in a sum keeps its parentheses.**
  `ce.parse('1-t').subs({ t: ce.parse('1-t') }).toString()` was `1 - 1 - t`,
  which reads as `-t`; it is now `1 - (1 - t)`. In the same way,
  `["Add", "c", ["Negate", ["Add", "a", "b"]]]` printed `-a + b + c` and now
  prints `-(a + b) + c`. The value and the LaTeX form were already correct.

- **A function with a point parameter maps over a list of points of different
  tuple types.** With `X = nan | real | signed_infinity`,
  `W: (tuple<X, X, X>, unknown) -> tuple<number, X, X>` assigned
  `(p, s) ↦ (s p.x, p.y, p.z)`, and `a`, `b` not declared,
  `W([(a, b, 0), (1, a, b)], 2)` was an `incompatible-type` error, and with `K`
  declared to return
  `list<tuple<integer, unknown, unknown> | tuple<unknown, unknown, integer>>`,
  `W(K(a, b), 2)` had the type `error | list<tuple<…>>`, while `W((a, b, 0), 2)`
  was accepted. Both calls are now valid and have the type `list<tuple<…>>`: a
  list is accepted when each of its point types is accepted alone. The
  evaluation of such a call gave an `incompatible-type` error for each point
  whose type only shares values with the parameter, such as `(a, b, 0)`. It now
  binds such a point, as a direct call does, and `W([(a, b, 0), (1, a, b)], 2)`
  evaluates to `[(2a, b, 0), (2, a, b)]`. A point with a component whose value
  is outside its type, such as `(1.5, a)` at `tuple<integer, integer>`, is still
  an error in its cell.

- **In the Epsil editor, a rename or a highlight of a variable no longer changes
  the variable of a `limit` that does not name its variable.** After
  `let h = 5`, the `h` of `limit(sin(h)/h, 0)` is the variable of the limit, and
  the program gives `1`; a rename of `let h` changed it too. The same applies to
  `nLimit`, `nd` and `nIntegrate`. `binderSitesOf()` now gives
  `[{ name: "h", operands: [0] }]` for this call, where it gave `[]`. It takes
  an optional fifth argument, a function that tells whether the program binds a
  name at the call: the engine reads the value of such a name, so when that name
  comes first in sorted order and other names follow, the result is `[]`.

- **A convergent integral from a large number to infinity now has a numeric
  value.** `\int_{10^{10}}^{\infty} \frac{dx}{x^{1.5}}` gave `NaN` with `.N()`
  and `NIntegrate`; it now gives `0.00002 ± 3·10⁻¹⁶`.
  `\int_{10^{6}}^{\infty} \frac{dx}{x(\ln x)^2}` now gives
  `0.072382410 ± 2·10⁻⁸` (exact `1/(6 ln 10)`). The numeric value was found
  divergent when the area is very far from the lower bound. A lower bound larger
  than about `10^{13}` still gives `NaN`.

- **`simplify()` of a sum or a product gives the same result before and after
  `evaluate()`.** The evaluation of a `Sum` or a `Product` kept the last value
  of its index in the scope of the expression: after
  `["Sum", "j", ["Limits", "j", 1, 3]]` was evaluated, `j` had the value 3. A
  later `simplify()` of the same expression then read the index as an assigned
  variable. With
  `nest = ["Sum", ["Sum", ["Subtract", ["Sin", ["Add", "k", "j", 1]], ["Sin", ["Add", "k", "j"]]], ["Limits", "k", 1, "n"]], ["Limits", "j", 1, 3]]`,
  `nest.simplify()` gave `\sum_{j=1}^{3}(\sin(j+n+1)-\sin(j+1))` before
  `nest.evaluate()` and kept the inner sum after it. The index now gets back its
  value from before the evaluation when the iteration stops, also when a time
  limit or an abort signal stops it.

- **A limit of a function that calls one of its parameters now gives the value
  of the call.** With `g := t ↦ t²` and `h := (p, a) ↦ p(a)`,
  `["Limit", ["Function", ["h", "g", "x"], "x"], 2]` gave `["p", 2]`, with the
  name of the parameter in place of `g`. It now gives `4`, the value of
  `h(g, 2)`. `["Expand", ["h", "g", "x"]]` gave `["p", "x"]`; it now keeps the
  call `["h", "g", "x"]`, and the indefinite integral of `h(g, x)` keeps the
  call where it held `p(x)`.

- **An integral over an infinite range of a function that oscillates with a
  symbolic frequency now stays unevaluated.** `\int_0^\infty \cos(xy)\,dx` gave
  `\frac{\sin(\infty y)}{y}`, a formula with an infinity in it, although the
  integral has no value. It now stays unevaluated, as
  `\int_0^\infty \cos(2x)\,dx` already did. A value at the infinite bound that
  is arithmetic on an infinity (`\int_0^\infty y\,dx` is `\infty y`), or a
  function with a limit at infinity (`\int_0^\infty \frac{\sin(ax)}{x}\,dx` is
  `\mathrm{SinIntegral}(\infty a)`), is kept, as before.

- **A function boxed before a call of `Scan`, `Reduce`, `Map` or another
  operator with a function argument now gets the type of the elements when they
  are not numbers.** With
  `f = ce.box(["Function", ["Add", "a", "t"], "a", "t"])` and
  `m = [[1, 2], [3, 4]]`, `ce.function("Scan", [m, f, 0])` was typed
  `vector<2>`, a list of numbers, and `ce.function("Reduce", [m, f, 0])` was
  typed `number`, although their values are rows. They are now typed
  `matrix<2x2>` and `vector<2>`, as when the function is written in the call.
  The same applies to a body that the reading as a number simplified:
  `ce.function("Map", [ce.box(["Function", ["Divide", "x", "x"], "x"]), m])`
  gave `[1, 1]` and now gives `[[1, 1], [1, 1]]`. A function boxed in a scope
  and called in a scope that declares again a name the function reads, or a
  function with a local variable or a function inside it, is used as it was
  boxed, as before.

- **The derivative of an indefinite integral is now evaluated.**
  `\frac{d}{dx}\int x^2\,dx` stayed unevaluated; it is now `x^2`, also for an
  integrand with no antiderivative in closed form
  (`\frac{d}{dx}\int e^{x^3}\,dx` is `e^{x^3}`). The derivative with respect to
  another variable is the derivative of the antiderivative, or the integral of
  the derivative of the integrand when there is no antiderivative in closed
  form: `\frac{d}{dy}\int x^2 y^3\,dx` is `x^3 y^2`. The derivative of an
  iterated indefinite integral with respect to one of its variables stays
  unevaluated.

- **A `d` with no variable after it, at the end of the body of an integral, is
  no longer lost.** The parser read it as the start of a differential and
  dropped it when no variable followed: `\int_0^1 \frac{x\,dx}{2} + 1 \cdot d`
  evaluated to `5/4`, and `\int_0^1 x\,d` to the integral of `x`. Such a `d` is
  now the symbol `d`: the first gives `1/4 + d`, and the second is the integral
  of `x\,d`. A `d` followed by a variable (`dx`, `\cdot dx`, `d\theta`) is a
  differential, as before.

- **The error of a variable that holds a value of the wrong type, as a term of a
  sum or a factor of a product, now names that operand.** With `s = "a"`, the
  value of `["Multiply", "s", ["Cos", "x"]]` was the `incompatible-type` error
  with no `ErrorFrame`, so an Epsil program `let v = s * Cos(x)` underlined the
  whole statement. The error now has the frame `Multiply argument 1`, and Epsil
  underlines `s`. The same applies to `Add`. In the body of a called function,
  the error keeps no frame, as before.
- **The error of `Sin`, `Cos`, `Exp`, `Power` and the other numeric functions
  for an argument that is not a number now names that function.** With
  `w = "s"`, the error of `["Subtract", 3, ["Sin", "w"]]` had the frames
  `Negate argument 1, Add argument 1`, and an Epsil program `let v = Sin(w) * 2`
  underlined `Sin(w)`. The error now has the frame `Sin argument 1` first, as
  the error of `Ln` already had, and Epsil underlines `w`. `Exp(w)` gives the
  frame `Power argument 2`, because its canonical form is
  `Power(ExponentialE, w)`. In the body of a called function, the error keeps no
  frame of its own, as before.
- **An expansion no longer turns one random draw into several.** With `r`
  declared with the `random` effect, `Expand((r(t) + 1)^2)` gave
  `r(t)^2 + 2r(t) + 1`, three independent draws where the input has one; it now
  stays `(r(t) + 1)^2`. A factor that draws is not distributed over a sum
  (`Expand(r(t)·(x + 1))` and `r(t).mul(x + 1)` give `(x + 1)·r(t)`, not
  `x·r(t) + r(t)`), a denominator that draws is not distributed over the terms
  of the numerator, and `Binomial(r(t), 2)` stays as it is. The same applies to
  `Random()`. In the same way, `simplify()` no longer reads two draws as one
  value in `r(t)!/(r(t) − 1)!`, `r(t)!/(k!·(r(t) − k)!)`,
  `\log_{r(t)}(r(t)^x y)` and `r(t)^{\log_{r(t)}(x)}`: each one now stays as it
  is.
- **`simplify()` no longer adds a base of 10 to a common logarithm.**
  `\log(x^2)` simplified to `2\log_{10}(|x|)`, which is not the same expression
  as the simplified form of `2\log(|x|)`; it now simplifies to `2\log(|x|)`. In
  the same way, `\log(10^x y)` now simplifies to `x + \log(y)`, not
  `x + \log_{10}(y)`. A base of `10.0`, a float, stays.
- **The `unknowns` and `freeVariables` of a `Block` now include a variable of an
  enclosing scope that the block reads before it assigns it.** With `a` declared
  outside the block, `["Block", ["Assign", "a", ["Add", "a", 1]], "a"]` gave
  `[]`, and now gives `["a"]`: the value of the block depends on the value of
  `a` before the block. A variable that the block assigns before it reads it is
  still not listed: `["Block", ["Assign", "y", 5], ["Add", "x", "y"]]` gives
  `["x"]`.
- **`subs()` now replaces a variable of an enclosing scope that a `Block` reads
  before it assigns it.** With `a` declared outside the block,
  `["Block", ["Assign", "a", ["Add", "a", 1]], "a"]` with `a` replaced by `2`
  stayed unchanged and evaluated to `a + 1`. It now gives
  `["Block", ["Assign", "a", 2], ["Assign", "a", ["Add", "a", 1]], "a"]`, which
  evaluates to `3`: the block gets a first statement that assigns the
  replacement, because a replacement of each `a` would give the invalid
  `["Assign", 2, 3]`. As before, the block writes the variable `a` of the
  enclosing scope when it is evaluated.
- **`Hypergeometric2F1` at machine precision is now accurate to about the last
  digit for z < −1 and 0.5 < z < 1.** For these arguments some values were wrong
  from the 12th digit: `["Hypergeometric2F1", 2.461, 6.281, 8.033, 0.718]` gave
  `9.193355757971403` and now gives `9.193355757939432`, and
  `["Hypergeometric2F1", 10.214, 8.842, 11.991, -4.788]` gave
  `1.137211485608755e-6` and now gives `1.1372114856110883e-6`. Some arguments
  that gave no numeric value now have one.

- **`simplify()` now gives the closed form of a telescoping sum, of a known
  infinite series and of a known infinite product, as `evaluate()` does.**
  `\sum_{k=2}^n (\sin(k+1)-\sin k)` stayed a sum under `simplify()`; it is now
  `sin(n+1) - sin(2)`. `\sum_{k=1}^\infty \frac{1}{k^2}` is now `1/6 * pi^2`,
  `\sum_{k=0}^\infty x^k` is now `If(|x| < 1, 1 / (1 - x))`, and
  `\sum_{k=1}^\infty \frac{x^k}{k}` is now `If(|x| < 1, -ln(1 - x))`.
  `\prod_{k=1}^\infty (1+1/k^2)` is now `sinh(pi)/pi`, and
  `\prod_{k=1}^\infty \frac{k}{k+1}` is now `0`. A sum or a product that holds a
  symbol with an assigned value, or a function whose purity is not known, keeps
  its form. An infinite series whose body holds another sum or an integral also
  keeps its form, unless it telescopes. A divergent series whose divergence
  `evaluate()` proves with a limit, such as `\sum_{k=1}^\infty \frac1k`, keeps
  its form under `simplify()`; `evaluate()` gives `+oo`.
- **The error of a numeric integral with a power singularity close to `1/x` now
  covers its true error.** `.N()` of `\int_0^1 x^{-0.9999}\,dx` gave
  `10000.00000106 ± 0.00000035`, whose true error is `0.00000106`; the error is
  now `0.000015`. For `\int_0^1 x^{-0.9998}\,dx`, the error was `0.000000015`
  for a true error of `0.00000034`; it is now `0.00000087`. For such exponents,
  the reported error is larger than before.
- **A numeric integral of a narrow peak at a bound of the interval no longer
  gives 0.** `.N()` of `\int_0^1 e^{-10^8 x}\,dx` gave `0` with an error of `0`,
  because the integrand was 0 at every point that the quadrature sampled. It now
  gives `1e-8`. `.N()` of `\int_0^1 \frac{e^{-10^8 x}}{x^{0.99}}\,dx` gave `0`,
  and now gives `82.63 ± 0.12` (the value is `82.704`). The peak is found when
  the integrand is 0 or constant at the sample points nearest to the bound: a
  narrow peak on an integrand that varies there (`e^x + e^{-10^8 x}`) is still
  not found.
- **In a product of a list of more than 100 numbers, an element that is an exact
  `0` now gives the exact `0`, also beside a float.** With `A` a list of 300
  numbers that holds the exact `0`, the element of `2.5·A` was the float `0.0`;
  it is now `0`, as `2.5·0` is.
- **Under `evaluateAsync()`, `FlatMap` awaits its callback, and `Max`, `Min`,
  `Supremum`, `Infimum` and `Sum` of a `FlatMap` read the awaited elements.**
  With `slowF` an operator that has only an `evaluateAsync` handler and gives
  `10x`,
  `await ce.box(["Max", ["FlatMap", ["List", 1, 2], ["Function", ["List", "x", ["slowF", "x"]], "x"]]]).evaluateAsync()`
  gave `max(2, slowF(1), slowF(2))`, and it now gives `20`; `Min` gives `1` and
  `Sum` gives `33`. `evaluateAsync({ materialization: true })` of the `FlatMap`
  now gives `[1, 10, 2, 20]`. When the callback gives a list of a length that is
  not known from such an operator (`x ↦ slowRange(x)`), `Count`, `Reduce` and
  `ListFrom` of the `FlatMap` read the awaited elements too: `Count` of it
  stayed unevaluated, and it now gives the count. `evaluate()` is not changed.
  `ListFrom` of the first `FlatMap` above still gives the unevaluated calls.
  `Max`, `Min`, `Supremum` and `Infimum` of a `FlatMap` whose source is a `Map`
  or another lazy view that applies such an operator stay unevaluated.

- **The type of a call of a function that a block defines with an assignment or
  a `let` no longer claims a list for a list argument.** The type of
  `["Block", ["Assign", "f", ["Function", ["Count", "t"], "t"]], ["f", ["List", ["List", 0, 0], 5]]]`
  was `list<list<unknown^2> | unknown>`, but its value is `2`. The type is now
  `unknown`: the block is typed before it runs, when `f` has no value yet. A
  function defined with `DefineFunction` keeps the result type of its definition
  (`integer | signed_infinity` here), and a call of a function that is not
  declared keeps its type: `foo([1, 3, 5])` is `list<unknown^3>`.

- **A numeric double integral whose integrand grows like `1/r` near one point of
  the box now gives its value.**
  `\int_0^1\int_0^1 ((x-1/64)^2+(y-1/64)^2)^{-1/2} dy\,dx` gave `NaN` under
  `.N()`, and it now gives `1.945131639720 ± 0.000000000014`. With the point at
  `(0.3, 0.3)` the result was `0 ± 1800000000`, and it is now
  `3.295843662862 ± 0.000000000025`. This applies when a divisor of the
  integrand is a positive definite quadratic polynomial of the two variables,
  such as `(x − a)² + (y − b)²`, that is zero at one point of the box. The box
  is cut at that point, and each part is integrated with the point at a corner.
  A divergent integral, such as one of `((x − a)² + (y − b)²)^{-1}`, still gives
  `NaN`.
- **In `mode: 'complex'` on the `javascript` target, a function literal that
  receives a square root as its argument now gives the correct value when its
  body uses the parameter as a real number.** With `y: real`,
  `Block(Assign(f, x ↦ Mod(x, 3)), f(Sqrt(y)))` and
  `Apply(x ↦ Mod(x, 3), Sqrt(y))` gave `NaN` at `y = 16`, and
  `x ↦ If(x > 0, Mod(x, 3), x)` gave `4`; they now give `1`, as the interpreter
  does. `Floor`, `Ceil`, `Round` and `Remainder` had the same defect. The
  argument is passed as its real part, and as `NaN` when it is not real, as for
  a call of a function defined with `ce.assign()`.
- **A numeric integral with a slow logarithmic singularity at a bound that is
  not 0 now gives its value.**
  `\int_{1/2}^{1} \frac{dt}{(1-t)(-\ln(1-t))^{1.1}}` gave `3 ± 36` under `.N()`,
  and it now gives `10.373294 ± 0.000066` (the exact value is
  `10·(ln 2)^(−0.1) = 10.37331…`). `NIntegrate` gives the same value. The
  divergent `\int_{1/2}^{1} \frac{-1}{(1-t)\ln(1-t)}dt` gave `0 ± 72000`, and it
  now gives `+∞`. When the quadrature cannot resolve the singularity at the
  bound, the integral is computed again on the two halves of the interval, each
  written in the distance to its bound, so that the factor `1 − t` is computed
  without rounding next to the bound.
- **On the `interval-js` target, a `Loop` that stops or skips a pass when its
  index passes an input or a constant now gives the correct value.** The
  condition of an `If` statement in the body of the loop was always false when
  it compared the index with an input or with a constant such as `Pi`: with
  `x = 2`, `n ≔ 0; Loop(Block(n ≔ i; If(i > x, Break)), i ∈ 1..5); n + 1` gave
  the interval `[6, 6]`, and it now gives `[4, 4]`, as the interpreter does. A
  boolean input in such a condition is also read correctly. When the input
  interval makes the condition true at some of its points and false at others
  (`x` in `[1.5, 2.5]`), the result is `{ kind: 'entire' }`, because the pass
  where the loop stops is not known; `broadcast()` gives the kind `entire` for
  such a cell. A condition that the `interval-js` target cannot compute, such as
  a comparison of two strings, now makes the compilation decline, and the
  interpreter evaluates the loop.
- **A sum or a product over a set whose condition reads a subscript of the index
  now gives a value.** `\sum_{k\in\{1,2,3\}, a_{k+1}>0} a_k` gave an
  `incompatible-type` error; with `a_1 = 1`, `a_2 = -1`, `a_3 = 2` and
  `a_4 = 3`, it now gives `1`. A subscript on the index in the condition is read
  by value, as in the body: `\sum_{k\in\{1,2,3\}, a_k>0} a_k` gave `0`, because
  `a_k` was one name in the condition, and it now gives `3`. The
  `incompatible-type` error of a condition that is not a boolean now names the
  type of the condition, not the type of the set.
- **Epsil: a program run again on the same engine with another signature for a
  function now uses the new signature.** After a first program
  `let f: (integer) -> integer` and `function f(n) { 2*n }`, a second program
  `let f: (real) -> real`, `function f(n) { 2*n }` and `f(2.5)` on the same
  engine gave the error `no-matching-clause`: the function kept the parameter
  type `integer`. It now gives `5`, as on a new engine.
- **The limit at infinity of a logarithm in base 10, or in another base, now
  reads the base.** The limit was computed as if the logarithm were natural:
  `\lim_{x\to\infty} \log(\frac{2x+1}{x})` gave `\ln 2`, and
  `\lim_{x\to\infty} \log_{\frac{x}{x+1}}(x)` gave `+\infty`. They now give
  `\frac{\ln 2}{\ln 10}` and `-\infty` (the base tends to 1 from below).
- **A multiple integral with its differentials in the numerator of a fraction
  now has the correct value.** In `\iint \frac{dx\,dy}{xy}` the space between
  the differentials stopped the search, so the integral was over `y` only and
  gave `d\ln|y|`; it is now `\ln|x|\ln|y|`. With one sign per integral, each
  sign now takes one differential, as it does for differentials after the
  integrand: `\int_1^2\int_1^2 \frac{dx\,dy}{xy}` gave `\frac{3}{2}\ln 2`, and
  `\int_1^2\int_3^4 \frac{dxdy}{xy}` put the bounds `3` and `4` on `y`. The
  first is now `(\ln 2)^2`, and the bounds of each sign go with its own
  variable.
- **With the integration rules of `loadIntegrationRules()`, an integral of a
  polynomial in `x^2` times a power of `a+bx^2+cx^4` no longer runs until the
  time limit.** `\int \frac{d+gx^2}{\sqrt{fx}\sqrt{a+bx^2+cx^4}}\,dx` ran for 30
  seconds and stayed unevaluated; it now gives a sum of two `AppellF1` terms in
  a fraction of a second. The rules for a polynomial in `x^2` read its degree in
  `x` (2 instead of 1), applied a reduction that does not apply, and doubled the
  degree of the polynomial at each step.
- **With the integration rules of `loadIntegrationRules()`, an antiderivative no
  longer contains a division by 0.** `\int \frac{-b-cx}{x(a+bx+cx^2)}\,dx` gave
  a result with the term `b/0`; it now gives a sum of `artanh` and `ln` terms. A
  rule whose result divides by 0 is now skipped, and the next rule is tried.
- **An integral whose differential is in the last factor of a product now has
  the correct value.** `\int_1^2 2\frac{dx}{x}` gave `3`, because the `d` of
  `dx` was read as the integration variable; it is now `2\ln(2)`, as
  `\int_1^2 \frac{2\,dx}{x}` is. `\int 2\frac{dx}{x}` gave `d^2` and is now
  `2\ln|x|`, and `\int_0^1 3(x\,dx)` is now `\frac{3}{2}`.
- **Epsil: an error in one of two calls of the same function is underlined on
  the argument of the call that failed.** In `let v = Ln("a") + Ln(2)`, the
  run-time error underlined the whole sum and the static type error underlined
  the whole statement; both now underline `"a"`. The value that a type error
  names selects the call: the `2` of `Ln(2)` is not the value `"a"`. When the
  argument of more than one call can be the value, as in `Ln("a") + Ln(x)`, the
  static error still underlines the whole statement; the run-time error
  underlines `"a"`, because its breadcrumb names the operand of the sum that
  failed. The run-time error of an extra argument, `let v = Sqrt(2, 3)`, now
  underlines the `3`, as the static error does, not the whole statement.

- **The error of an argument whose value an operator refuses now names the call
  of that operator.** With `w` declared `any` and assigned the string `"s"`, the
  breadcrumb of the error of `3 - Ln(w)` was `Negate` argument 1, `Add` argument
  1, with no call of `Ln`. It now starts with `Ln` argument 1, as the error of
  `Ln("s")` does. The same applies to `Sqrt`, `Log`, `Not` and the other
  operators that check the value of an argument against their signature when
  they are evaluated, and to a function declared with a signature. In Epsil, the
  run-time error of `let v = 3 - ln(w)` now underlines `w`, not `ln(w)`. When
  more than one operand of a sum or a product holds a call of the function that
  failed, the run-time error now underlines the operand whose evaluation failed,
  not the whole sum: `let v = Sqrt(2, 3) + Sqrt(2, 4)` underlines `3`, and
  `(if n == 1 { g("a") } else { 0 }) + (if n == 2 { 2 } else { 3 })` underlines
  `{ g("a") }`.

- **`Hypergeometric2F1` at machine precision no longer gives a wrong number for
  parameters near 100.** A product of two values of the Gamma function in its
  formulas went past the largest double, and the result had the wrong sign and
  size: with `ce.precision = 'machine'`,
  `["Hypergeometric2F1", -75.504, 20.616, 69.652, 0.5708]` gave `-1.5e-50` and
  is now `1.7048020435584845e-5`, and
  `["Hypergeometric2F1", -75.504, 20.616, 69.652, 1]` gave `0` and is now
  `3.725952279179266e-8`. When the Gamma values are too large to give an
  accurate result (`["Hypergeometric2F1", 0.5, 0.5, 1e10, 1]`), the expression
  stays unevaluated.
- **The WGSL code of an `Or` with an `And` operand is now valid.** WGSL does not
  let `&&` and `||` appear together without parentheses, so the code that
  `compile(expr, { to: 'wgsl' })` gave for `Or(Less(3, y, x), Less(x, 5))`,
  `(3.0 < y) && (y < x) || x < 5.0`, did not compile in a shader. It is now
  `((3.0 < y) && (y < x)) || x < 5.0`. The same applies to an `And` operand:
  `Or(And(p, q), r)` gives `(p && q) || r`. The GLSL code does not change.
- **The limit at infinity of a quotient of an exponential and a power is now
  correct when the exponent grows slowly.** `\lim_{x\to\infty} e^{\sqrt{x}}/x^5`
  gave `0` and is now `+∞`; `\lim_{x\to\infty} x^5/e^{\sqrt{x}}` gave `+∞` and
  is now `0`. The same applies to `e^{\sqrt[3]{x}}/x^{20}`, `2^{\sqrt{x}}/x^5`
  and `e^{\ln(x)\ln(x+1)}/x^9` (`+∞`, was `0`). The order of growth of two terms
  is now decided from their form, never from sample values. When it cannot be
  decided, the limit stays unevaluated: for example `\Gamma(x+1)/(x\Gamma(x))`
  and `x(\frac{\pi}{2}-\arctan x)`, which gave `1`, now stay unevaluated.
- **The limit at infinity of a product with a difference of logarithms is now
  correct.** `\lim_{x\to\infty} x(\ln(x-1)-\ln(x+1))` gave `0` and is now `-2`.

- **The derivative of a definite integral is now evaluated.** `D` of an
  `Integrate` with bounds stayed unevaluated: `\frac{d}{dy}\int_0^1 xy\,dx` gave
  `D(int_(0)^(1)(x * y dx), y)`, and now gives `1/2`. When the integral has a
  closed form, its closed form is differentiated. Otherwise the derivative is
  taken under the integral sign, with a term for each bound that depends on the
  variable: `\frac{d}{dx}\int_0^x e^{t^3}\,dt` gives `e^(x^3)`, and
  `\frac{d}{dy}\int_0^1 e^{x^3 y}\,dx` gives
  `int_(0)^(1)(x^3 * e^(y * x^3) dx)`. The derivative stays unevaluated when the
  integrand has a step, a condition or a singularity that depends on the
  variable (`\lfloor x + y \rfloor`, `\ln|x - y|`), and for an integral over an
  infinite range with no closed form.
- **A numeric integral over an infinite bound whose integrand decreases slowly
  finds its divergence or its value.** `\int_2^\infty \frac{dx}{x\ln x}`
  diverges: `.N()` gave `3.97 ± 71060` and `NIntegrate` gave `3.97`; both now
  give `+∞`. `\int_2^\infty \frac{dx}{x(\ln x)^{1.1}} = 10.3733` gave `3.4 ± 36`
  under `.N()`; it now gives `10.37326 ± 0.00017`. The same applies to a bound
  at `-\infty` and to compiled code.
- **An `Apply` whose callee is not a function now falls back to the interpreter
  in compiled code.** The canonical form of `Apply(D(x ↦ sin(n·x), x), 1)`
  applies the derivative of the body, a number, not a function. Its JavaScript
  compilation gave `success: true`, and the compiled function threw "is not a
  function" when it ran; the Python compilation emitted the same call of a
  number. Both compilations now decline, and the result comes from the
  interpreter. Write `Apply(Derivative(x ↦ sin(n·x)), 1)` to apply the
  derivative as a function: that form compiles.

- **A GLSL or WGSL compilation that reads a list input of unknown length now
  falls back to the interpreter.** With `L` declared `list<real>`, compiling `L`
  to GLSL gave the code `L` with `success: true`, but no shader can declare an
  input of unknown length. The same applies to an input typed `list`,
  `set<real>`, `collection<real>`, `dictionary<real>` or `matrix`, and to a list
  of no element (`list<real^0>`). Declare the length in the type
  (`list<real^8>`), or, on WGSL, give the input a `'storage-buffer'` hint.
- **The compiled JavaScript of a function literal applied to a string now reads
  the string as text.** With `t` declared `string`,
  `["Apply", ["Function", ["Length", "s"], "s"], "t"]` compiled, and at
  `t = "abc"` its code threw a `RangeError` ("the operand is not a list or a
  set"); it now gives `3`, as `evaluate()` does. The same applies to `Count`,
  `IsEmpty`, `Reverse` and `Join` of the parameter. `Last` gave `null`, and
  `Take(s, 2)` of `"a😀b"` gave half of the emoji; they now give `"b"` and
  `"a😀"`. `Max` of a string now falls back to the interpreter instead of giving
  `NaN`.
- **The compiled JavaScript of a user function called with a string now reads
  the string as text.** With `t` declared `string` and `f := s ↦ Length(s)`, the
  call `["f", "t"]` compiled, and at `t = "abc"` its code threw a `RangeError`
  ("the operand is not a list or a set"); it now gives `3`, as `evaluate()`
  does. The same applies when `f` is declared `(collection) -> integer` or
  `(string) -> integer`. `Last(s)` gave `NaN`, `Take(s, 2)` of `"a😀b"` gave
  half of the emoji and `Reverse(s)` threw; they now give `"b"`, `"a😀"` and
  `"b😀a"`.
- **With `diagnostics: true`, the `d` of a differential inside a fraction or
  parentheses no longer reports `undeclared-symbol`.** `\int \frac{dx}{x}`,
  `\int \frac{\mathrm{d}x}{x}` and `\int (3x + 2\,dx)` reported the symbol `d`
  (or `d_upright`), and now report nothing. When the result also holds a free
  `d`, as in `\int \frac{d\,dx}{x}` (`Divide(d, x)`), each `d` is still
  reported.
- **With `diagnostics: true`, the variable of a set-builder no longer reports
  `undeclared-symbol` inside the braces.** `B = \{x \mid -x \in A\}` reported
  `B`, `x` twice and `A`, and now reports `B` and `A`, the names that
  `freeVariables` lists. The variable is the body (`x`), the symbol of a body
  `x \in S`, or the symbol of a membership `k \in S` of the condition that the
  body reads (`k` in `\{2k \mid k \in \Z\}`). A use of the name outside the
  braces is still reported. When the domain of a membership uses the name, as in
  `\{x \mid x \in [0, x]\}`, each `x` is still reported.
- **`subs()` no longer replaces the variable of a set-builder or of a
  quantifier, and `unknowns` no longer lists it.** The variable of
  `\{x^2 \mid x \in S\}` was in `unknowns` (`["S", "x"]`), and `subs({x: 3})`
  gave `["Set", 9, ["Condition", ["Element", 3, "S"]]]`. Now `unknowns` is
  `["S"]` and `subs({x: 3})` keeps the set as it is. The same applies to
  `\{x \mid x > 0\}`, to `\{x + y \mid x \in S, y \in S\}`, and to
  `["Set", ["Square", "x"], ["Element", "x", "S"]]`. The domain of the variable
  still reads the enclosing `x`: in
  `["Set", ["Square", "x"], ["Element", "x", ["Range", 1, "x"]]]`, `x` is in
  `unknowns`, and `subs({x: 3})` gives the set of the squares of `1..3`. A
  non-canonical `["ForAll", "x", ["Greater", "x", "y"]]` (`{form: "raw"}`) now
  binds `x`, as the canonical form does. In
  `["Exists", ["Less", "y", "x"], ["Element", "x", "S"]]`, the first operand is
  not a variable, so `x` is now in `unknowns`, as `evaluate()` reads it.

- **`subs()` no longer replaces a local of a `Block` that a destructuring
  assignment declares.** In
  `["Block", ["Assign", ["Tuple", "a", "b"], ["Tuple", 1, 2]], ["Add", "a", "b"]]`,
  `unknowns` was already `[]`, but `subs({a: 5})` replaced each `a`, and the
  result evaluated to an `incompatible-type` error. It now keeps the block as it
  is, which evaluates to `3`. The same applies to a statement wrapped in
  `Typed`: `["Block", ["Typed", ["Assign", "z", 3], "'integer'"], "z"]` with `z`
  replaced by `9` is now unchanged.

- **`simplify()` cancels the Gauss hypergeometric terms of a definite integral
  of a rational function.** The definite integral
  `∫_{1/2}^{2} (1+x²)/(x²+x⁹) dx` with the Rubi rules gives
  `3/2 + 2·₂F₁(1, 1/7; 8/7; −128) − 32/3·₂F₁(1, 6/7; 13/7; −128) − 1/2·₂F₁(1, 1/7; 8/7; −1/128) + 1/384·₂F₁(1, 6/7; 13/7; −1/128)`,
  which `simplify()` left unchanged. `simplify()` now gives `3/2`. In a sum that
  holds `₂F₁(1, a; a + 1; w)` with exact rational numbers `a` (not an integer)
  and `w < −1`, and also `₂F₁(1, 1 − a; 2 − a; 1/w)`, it writes the first
  function with the argument `1/w`:
  `₂F₁(1, a; a + 1; −z) = πa·z^(−a)/sin(πa) − a/(1 − a)·z^(−1)·₂F₁(1, 1 − a; 2 − a; −1/z)`
  for `z > 0`. The result is kept when it is simpler than the sum.

- **The LaTeX of a function with a pair, a rest or a default parameter reads
  back as the same function.** The LaTeX of
  `["Function", ["Multiply", "x", "y"], ["Tuple", "x", "y"]]`, a function of one
  pair, was `(x,y)\mapsto xy`, which parses as a function of two parameters. It
  is now `\mathrm{Function}(xy, \mathrm{Tuple}(x, y))`. A rest parameter was
  written `\mathrm{Spread}(x)\mapsto 2x` and a default value
  `(x, k=2)\mapsto kx`, which did not parse as functions; they are now
  `\mathrm{Function}(2x, \mathrm{Spread}(x))` and
  `\mathrm{Function}(kx, x, \mathrm{Optional}(k, 2))`. `ce.parse()` reads each
  of these texts back as the same function. A function with plain or typed
  parameters keeps the `\mapsto` notation.

- **The error of an operand of a sum or a product names that operand.** With
  `s = "a"`, the error of `["Multiply", ["Sin", "s"], ["Cos", "x"]]` had the
  frame `Multiply` argument 2, which is `Cos(x)`; it now has the frame
  `Multiply` argument 1, which is `Sin(s)`. The same applies to `Add`, to a
  variable that holds an error, and to a variable that holds an expression whose
  value is an error. In Epsil, `let v = Sin(s) * Cos(x)` now underlines
  `Sin(s)`, not the whole product, and `Ln(w) + Ln(w)` underlines the first
  `Ln(w)`.

- **A subscript on the index of a sum or a product reads the index.**
  `\sum_{k=1}^{3} a_k` evaluated to `3a_k`, as if `a_k` were one symbol; it now
  evaluates to `a_1 + a_2 + a_3`. The same applies to `\prod`, to the MathJSON
  form `["Sum", ["Subscript", "a", "k"], ["Limits", "k", 1, 3]]`, and to a
  comprehension over integers. The canonical term is
  `["Subscript", "a", ["Delimiter", "k"]]`, and its LaTeX is `a_{(k)}`. The
  parse with `canonical: false` changes too: the body is
  `["Subscript", "a", "k"]`, not the symbol `"a_k"`. These are still a part of
  the name: a subscript outside a binder (`a_k` alone is the symbol `a_k`), a
  subscript on a variable that is not an integer index (the variable of `D` or
  `Integrate`), a joined name that the host declared or assigned (after
  `ce.assign("a_k", 5)`, the sum is `15`).

- **A function subscripted by the index of a sum or a product is a function for
  each term.** `\sum_{k=1}^{2} f_k(x)` evaluated to `2f_k(x)`; it now evaluates
  to `f_1(x) + f_2(x)`, and `\sum_{k=1}^{3} c_k\phi_k(x)` to
  `c_1\phi_1(x) + c_2\phi_2(x) + c_3\phi_3(x)`. The canonical term is
  `["Apply", ["Subscript", "f", ["Delimiter", "k"]], "x"]`. Each term reads as
  the term written alone: `\sum_{i=1}^{2} x_i(x_i-1)` is
  `x_1(x_1-1) + x_2(x_2-1)`, a sum of products, and after `ce.assign("w_1", 2)`
  the term `w_1(4)` is the product `8`. A power after the group is a power
  series: `\sum_{k=0}^{3} a_k(x-1)^k` is
  `a_0 + a_1(x-1) + a_2(x-1)^2 + a_3(x-1)^3`, as before. The MathJSON form
  follows the same rule: with `w_1 = 2` and `w_2 = 3`,
  `["Sum", ["Apply", ["Subscript", "w", "i"], 4], ["Limits", "i", 1, 2]]` is
  `20`; it was `5`, because `Apply` read the number `2` as a constant function.
  With a `resolveApplication` hook, the hook still receives the written name
  (`a_k`). The LaTeX of an `Apply` whose function is not a name, with no
  argument or with several arguments, is now
  `\operatorname{apply}(f_{(k)}, x, y)`, which parses back to the same `Apply`;
  it was `\operatorname{apply}(\mathrm{Subscript}, [f_{(k)}, x, y])`, and an
  empty string with no argument.

- **The `unknowns` of a block no longer list the names that a destructuring
  assignment of the block defines.**
  `Block(Assign(Tuple(a, b), Tuple(1, 2)), Add(a, b))` evaluates to `3`, but its
  `unknowns` and `freeVariables` were `["a", "b"]`; they are now `[]`. The same
  applies to a nested pattern and to a `Declare` with a `Tuple` target. The `_`
  position of a pattern binds nothing and is no longer listed. The `defines` of
  `(a, _, b) := v` is now `["a", "b"]` (it was `[]`), and its `references` is
  `["v"]` (it was `["_", "a", "b", "v"]`).

- **The type of a `Scan` over a list with absent elements includes `missing`.**
  With `xs = Map(x ↦ If(x > 1, Missing, x), [1, 2, 3])`, `Scan(xs, Add)` gives
  `[1, Missing, Missing]`, but it was typed `vector<integer^3>`. It is now typed
  `list<integer | missing^3>`, with or without an initial value and with a
  callback. Types computed from the result change with it:
  `At(Scan(xs, Add), 2) + 1` is typed `integer | missing`, not `integer`.
- **The compile option `iterationBudget` limits a `Sum` and a `Product` on the
  `interval-js` target.** With `iterationBudget: 1e6`,
  `Sum(i, Limits(i, 1, 1e12))` compiled to `interval-js` ran every pass, where
  the `javascript` code gave `NaN` at once. The interval loop now gives the
  `entire` interval before its first pass when the range has more passes than
  the budget. Without the option the code is unchanged. (Tycho row 509)
- **`compile(…).freeSymbols` no longer reports `Nothing`.**
  `If(k > 2, Break(), Nothing)` compiles to `if (2 < k) { break }`, which reads
  no such value, and `freeSymbols` held `"Nothing"`, so a host that checks each
  free symbol against its inputs read it as an input with no value.
  `expr.symbols` still lists it. (Tycho row 506)
- **A fold whose pair accumulator takes a value that can be `Missing` compiles
  again** ([#514](https://github.com/cortex-js/compute-engine/issues/514),
  reported by [enumeratio](https://github.com/enumeratio)).
  `Fold((p, x) ↦ If(x > 1, [p[1] + At([], x), x], p), [1, 2], 1..n)` typed the
  accumulator `p` as `tuple<number>`, so the two branches of the `If` had
  different shapes, and the JavaScript target refused the fold since 0.178.0.
  The accumulator is now typed `vector<integer^2>`, the fold
  `list<integer | missing^2>`, and the fold compiles: `n = 3` gives
  `[Missing, 3]` on the interpreter and `[NaN, 3]` in compiled code.
- **A result type on a function no longer makes a compiled list update copy the
  list.** In
  `function g(H: list<number>, n: integer) -> list<number> { let L = H; for k in 1..n { L = replaceAt(L, k, L[k] + 1) }; L }`,
  the compiled JavaScript copied the whole list on each pass of the loop and
  warned `copying-list-update`; without `-> list<number>` it wrote the list in
  place. Both forms now write in place, with no warning. A `Fold` step with a
  result type is written in place on the Python target too. The values do not
  change. (CE-1009, Tycho row FG)
- **`Hypergeometric2F1` at machine precision is correct to about 15 digits when
  its series cancels.** With `ce.precision = 'machine'`,
  `Hypergeometric2F1(-6.937, -4.123, 4.354, -0.662)` gave
  `0.0011253975813495531`, with a relative error of 3.7e-11; it now gives
  `0.0011253975813080236`. For z between −1 and 0 the kernel uses the form of
  the series that cancels least, and a series whose largest term is more than
  100 times its sum is summed again with about 32 digits. Over 4548 random
  points with z from −1 to 0.5, the largest relative error fell from 6.9e-11 to
  2.4e-14. Compiled JavaScript uses the same kernel. (CE-192)
- **In compiled JavaScript and interval JavaScript, a `Return` inside a nested
  `Block` that is a statement ends the function.** It ended only the nested
  block, and the statements after the block still ran. The function
  `["Function", ["Block", ["Declare", "s", {"dict": {"value": 0}}], ["Block", ["Assign", "s", ["Add", "s", "m"]], ["If", ["Greater", "s", 5], ["Return", ["Multiply", 2, "s"]]]], "s"], ["Typed", "m", "'integer'"]]`
  gave `8` for `m = 8` in compiled code, and the interpreter gives `16`. The
  compiled code now gives `16`. A `Which` that is a statement and has a `Return`
  in a branch is no longer compiled: it gave a wrong value for the same reason,
  and the interpreter evaluates it. (CE-1073)

- **The LaTeX of an integral with no limit writes a differential for each
  variable of its integrand**, so that a parse of the LaTeX gives the same
  variables. The LaTeX of
  `["Integrate", ["Function", ["Multiply", "x", "y"], "x", "y"]]` was
  `\int\,xy\!`, which reads back as an integral over `x` only. It is now
  `\iint\!xy\, \mathrm{d}y \mathrm{d}x`. The LaTeX of
  `["Integrate", ["Square", "x"]]` is now `\int\!x^2\, \mathrm{d}x`. (CE-1049)

### Performance

- **The compilation of an expression that reads a symbol whose value is a list
  of tuples of numbers is about twice as fast.** `compile()` writes such a value
  into the code, and it spent about 60 µs on each tuple. For a symbol whose
  value is a list of 224 tuples of four numbers, `compile()` of the symbol took
  about 14 ms and now takes about 6 ms. The emitted code does not change.
- **A finite product that telescopes and has a free variable evaluates to its
  closed form.**
  `["Product", ["Divide", ["Add", "x", "n", 1], ["Add", "x", "n"]], ["Limits", "n", 1, 1000]]`
  took about four minutes and gave a quotient of two polynomials of degree 1000.
  It now gives `(x + 1001)/(x + 1)` at once, and its integral over `[0, 1]`,
  which timed out, is `1 + 1000 ln(2)`. Small products are reduced too: the
  product from 1 to 2 was `(x^2 + 5x + 6)/(x^2 + 3x + 2)` and is now
  `(x + 3)/(x + 1)`.
- **A call of a user function does fewer type computations.** Each call declares
  the parameters of the function, so the types of the expressions in its body
  are computed again at each call. Four tests that read such a type at each call
  now read a cheaper fact first when that fact gives the answer: a `Declare`
  with attributes (`let m = n * 2` in Epsil), a comparison of two operands, and
  the broadcast and tuple tests of `And`, `Or` and of the operators with
  broadcast exemptions. For example, `count(filter(1..20000, f))` with
  `f(n) = do { let m = n * 2; m % 3 == 0 }` took about 1.1 s and now takes about
  0.8 s. The values do not change.
- **At machine precision, a sum, a difference or a product of two lists of more
  than 100 numbers, and a quotient with such a list as an operand, are now
  computed at once.** With `L` a list of 2,000 points, `PointX(L) + PointY(L)`
  took about 2 µs per element and now takes about 0.6 µs;
  `PointZ(L) / PointX(L)` was a lazy list whose elements cost about 4 µs each,
  and is now a list computed in about 0.4 µs per element. The values do not
  change. A quotient of two integers that is not an integer is still the exact
  rational (`7/2`), computed element by element.
- **At machine precision, arithmetic on lists of more than 100 numbers that hold
  complex numbers is now computed at once.** With `L` a list of 2,000 points,
  `Conjugate(PointZ(L) / (PointX(L) + i·PointY(L)))` took about 15 µs per
  element and now takes about 4 µs, and `i·PointY(L)` took about 6 µs and now
  takes about 1.7 µs. A quotient, a negation and a conjugate of such lists were
  lazy lists, and are now lists. This applies to `Add` and `Multiply` of two
  operands, `Divide`, `Negate` and `Conjugate`; the values do not change. Under
  `N()`, and for a list that holds an exact rational or a big-number float, the
  computation stays element by element.
- **An expression that holds several copies of the same sub-expression now
  computes it at most twice in one `evaluate()`.** A copy is a separate
  expression with the same operators, numbers and symbols, as a host makes when
  it writes a function body in place of each call. For example, a `Which` over a
  list of 500 numbers that appears nine times in one formula was computed nine
  times (about 170 ms) and is now computed twice (about 80 ms); the value does
  not change. A copy that holds a local scope (`Block`, `Function`, `Sum`), a
  call of a user function or an impure operator (`Random`) is still computed at
  each place.
- **The condition of `Filter`, `Any` and `All` is now compiled when it compares
  integers, as the function of `Map` already was.** With
  `isEven(n) := n % 2 == 0`, `Sum(Filter(1..20000, isEven))` took about 480 ms
  and now takes about 50 ms; `Any(1..20000, k ↦ k % 2 == 7)` went from about 360
  ms to about 10 ms. The condition must be a comparison of integer arithmetic
  (`+`, `-`, `×`, small powers, `Mod`, `Floor`, `Abs`, `Min`, `Max`), or `And`,
  `Or` and `Not` of such comparisons, and the collection a range or a list of
  integers of 64 elements or more. Other conditions are evaluated as before. The
  values do not change. (CE-880)

- **When a derivative of a function is too large to compute symbolically, the
  higher derivatives of the same function no longer try again.** For
  `f(x) = \sqrt{x+\sqrt{x+\cdots+\sqrt{x+1}}}` nested 37 times, each of
  `f'(0.5)`, `f''(0.5)` and `f'''(0.5)` spent about one second before it used
  the numeric approximation, and compiling their sum took about 3 s. Now only
  the first derivative that is too large takes that time: compiling the sum
  takes about 1.2 s, and each of the other orders takes a few milliseconds. The
  values do not change. (CE-346)

- **Above machine precision, a sum, a product or a negation over a list of more
  than a hundred floats is computed at once, about 3 times faster.**
  `Add(L, 2)`, `Multiply(-2, L)` and `Negate(L)`, where `L` is a list of floats,
  now evaluate to a `List` of floats. Before, the sum and the negation gave a
  lazy `Map`, whose elements were computed each time they were read. Each
  element has the digits that the same operation on the element gives. At the
  default precision, `Min(1, 2 - 2·PointZ(C))` over ten thousand points took
  about 175 ms and now takes about 51 ms. A list of exact integers keeps the
  lazy `Map`. (CE-337)
- **Boxing nested folds whose accumulator types cannot be refined takes about
  20% less time.** When the accumulator of a `Fold`, `Reduce` or `Scan` cannot
  be given a more precise type, the folds in its callback are no longer typed a
  second time from the start. Boxing the RSK row insertion of issue #487 (8
  nested folds, 4 deep) took about 92 ms and now takes about 71 ms (fastest of
  12 runs from source). The types and values do not change. (CE-689)
- **The type of a product of scalar factors is found faster, so boxing,
  simplifying and integrating take up to 18% less time.** A product whose
  factors are plain numbers no longer goes through the tests for points, lists,
  tensors and NaN arms first. Boxing `√6·x + √2·x` took about 20 µs and now
  takes about 16.5 µs; its simplification takes 9% less time and `∫1/(x³+1) dx`
  8% less (medians of seven rounds, one warm process). The types do not change.
  (CE-351)
- **Definite integrals are evaluated up to 11% faster.** The evaluation lifts
  the integrand out of its function literal once, not once for each test, and it
  reads the type of the result before it computes a numeric value to find an
  imaginary part. `∫₁² 1/x dx` took about 187 µs and now takes about 173 µs, and
  `∫₀^π x·sin x dx` about 449 µs and now 397 µs (medians of five runs, from
  source). The values do not change. (CE-351)
- **Boxing an arithmetic expression is up to 10% faster.** The type of an exact
  literal such as `√6` is kept for each value, so a second boxing of the same
  value does not compute it again; a number literal is not tested for an
  inferred type, which it never takes; and the type of a product of fewer than
  two operands that can be lists skips the test for a matrix product. Boxing
  `√6x + √2x` took about 11.8 µs and now takes about 10.6 µs, the simplification
  of `√(3+2√2)` 5% less time, and `∫1/(x³+1) dx` 4% less (medians of five runs,
  from source). The types and values do not change. (CE-351)
- **Evaluating the same derivative again no longer differentiates again.** A `D`
  expression keeps its closed form while nothing that it reads changes: the
  value of a symbol, the definition of a function that it calls, an assumption,
  the type of its variable or the configuration of the engine. For `h(t)`, a
  path of 29 linear pieces read from a list of points, a second `evaluate()` of
  the same `["D", ["PointY", ["h", "u"]], "u"]` took about 80 ms and now takes
  about 18 ms (the first evaluation still takes about 190 ms; one run from
  source). In `x ↦ D(x^2, x)`, each call still puts its own argument in `2x`. A
  derivative that uses the `derivative` handler of an operator declared by the
  caller is still worked out at each evaluation, because that handler can read
  any state. The values do not change. (CE-442)
- **A symbol that holds a list of symbolic elements keeps its evaluated value
  while nothing that the list reads changes.** Each `evaluate()` of the symbol
  evaluated every element of the list again after an assignment to any other
  symbol. For `h(t)`, a path of 29 linear pieces read from a list of points, a
  symbol `d` assigned the value of `["D", ["PointY", ["h", "u"]], "u"]` took
  about 46 ms to evaluate after `ce.assign("z", 1)`, and now takes less than 0.1
  ms (one run from source). An assignment to a symbol that an element reads
  still gives the new value. A list of numbers and strings was already its own
  value and is not changed. The values do not change. (CE-313)
- **Compiled JavaScript loops that are statements run up to two times faster.**
  The code of a `Loop` was an arrow function that is called at once,
  `(() => { for (…) { … } })()`, also where the loop is a statement of a block
  or of a loop body. A loop that writes a local of the code around it then kept
  that local in a slower kind of storage. Such a loop is now the block
  `{ for (…) { … } }`, and so is a loop in a branch of an `if … else` statement.
  A `do { … }` block that is a statement is a block statement too, not an arrow
  function: in `do { let u = 3; for k in 1..n { s = s + k % u } }` with
  `n = 2000000`, the loop took about 6 ms and now takes 3 to 5.5 ms. On the
  `interval-js` target a loop that is a statement is a block as well. The
  Buddhabrot step of Tycho (three nested loops, 5,000 samples) took about 2.1 ms
  per call and now takes about 1.1 ms; the loops of
  `for k in 1..n { let a = 0; for m in 1..20 { … } }` with `n = 200000` went
  from about 0.9 ms to 0.7 ms (medians of 50 calls, from source). A loop that is
  an operand, or that has a `Return` in its body, keeps the arrow function. The
  values do not change. (CE-1073)

## 0.182.0 _2026-11-06_

### Breaking Changes

- **A named function that writes outside itself must state the `scope` effect in
  a top-level `let` or `const`, in a `Declare` statement, and in a scope from
  `ce.pushScope()`.** With `c` a top-level variable,
  `let f = () => do { c = c + 1; c }` installed `f`, and it now gives an
  `incompatible-type` error and declares nothing. Write
  `let f: () scope -> number = () => do { c = c + 1; c }`. After
  `ce.pushScope()`, `ce.declare('f', { value: writer })` now throws, as it does
  in the global scope. A `let` in a block or in a function body is not refused,
  and neither is a value that a call returns (`let counter = makeCounter()`).
- **A LaTeX assignment can no longer replace a function of a library.** After
  `ce.parse('a+b\\coloneq 5').evaluate()`, `Add(1, 2)` gave `5` for the whole
  engine, and `\sin(x)\coloneq 5` made `Sin(0)` give `5`. These now give the
  error `assignment-to-library-function`, in a block too, and `Add(1, 2)` keeps
  its value. The error also applies to a function name that is one letter:
  `N(x)\coloneq x+1` and `D(x, k)\coloneq x+k` were valid and now give the
  error. To define such a function, declare the name first:
  `ce.declare('D', 'function')`. A value that is not a function stays valid
  (`N\coloneq 5`), and so do the MathJSON form `["Assign", "Add", …]` and
  `\mathrm{Assign}(\operatorname{Add}, x\mapsto 5)`. A subscript on a library
  function gives the same error when the assignment would define the function or
  a sequence with its name: after `N_n\coloneq n+1`, `N(1/4)` gave `5/4`, and
  the recurrence `D_n := n \cdot D_{n-1}` replaced `D`. Use another letter for
  the sequence, or declare the name first. A term alone (`N_0\coloneq 1`) and a
  local of a block (`N_n\coloneq 5; N_n+1`) stay valid.

### Improvements

- **An assignment to a list element rebinds the list, in LaTeX and in Epsil.**
  `L[k]\coloneq v` is `Assign(L, ReplaceAt(L, k, v))`, and the Epsil statement
  `xs[i] = v` is `xs = ReplaceAt(xs, i, v)`. With `L = [10, 20, 30]`,
  `L[2]\coloneq 5` gives `L = [10, 5, 30]`. A matrix element is
  `M[j, i]\coloneq v` or `M[j][i]\coloneq v`, which is
  `Assign(M, ReplaceAt(M, j, i, v))`. Lists keep value semantics: after
  `A\coloneq L`, the assignment `L[1]\coloneq 5` does not change `A`. The target
  must be a variable that the program can assign: in Epsil,
  `const c = [1, 2]; c[1] = 5` is the error `constant-assignment`, and in LaTeX
  `N[1]\coloneq 5` is the error `assignment-to-library-function`. A string or a
  tuple target gives the list that `ReplaceAt` gives. In a compiled loop,
  `xs[i] = v` on a block local is written in place on JavaScript.
- **A compiled loop that copies a list on each pass is reported.** When
  `xs = ReplaceAt(xs, i, v)` in a `Loop` cannot write the list in place on the
  JavaScript target, for example because the loop also has `ys = xs`,
  `CompilationResult.warnings` now holds an entry with the code
  `copying-list-update` and the name of the local in `binding`, one for each
  such local of a block. An editor can show the author that the loop copies the
  list. The emitted code does not change. An update that is not in a loop, and
  the Python target, which always copies, are not reported.
- **`checkEpsil(ce, source)` checks an Epsil program without running it.** It is
  exported from `@cortex-js/compute-engine/epsil` and gives the parse errors and
  static type errors that `executeEpsil` reports before it runs a statement. It
  assigns no value, defines no function and declares no type on `ce`, and a type
  that `ce` already knows is not an error.
- **Two more forms keep the in-place write of a compiled block local.** With
  `xs = ReplaceAt(xs, i, v)` in a loop, `const r = xs[1]` before the loop, or a
  `ReplaceAt(xs, 1, 0)` that is not assigned to `xs`, made the loop copy the
  list on each pass. Now only the unassigned `ReplaceAt` makes a copy. A write
  with more than one position keeps the copying form in these cases, because a
  row would be shared.
- **The compile option `iterationBudget` also limits `Loop` on the JavaScript
  and `interval-js` targets.** `compile(expr, { iterationBudget: 1e6 })` with
  `Block(k := 0, Loop(k := k + 1))` did not return, and `run({})` now throws a
  `CancellationError` with the cause `iteration-limit-exceeded`. Each iteration
  of a `Loop` adds to one total for a call, including nested loops and loops in
  user functions, and the next call starts at 0. `broadcast()` gives `NaN` for a
  cell over the limit, and a batch costs up to cells × budget. On Python, a
  program with a `Loop` declines when the option is set. A compiled value that
  is a function declines when it counts passes, unless it is a function literal.
  Without the option, the code of a `Loop` is unchanged.
- **`ReplaceAt` takes more than one position, and a write keeps a known
  length.** `ReplaceAt([[1, 2], [3, 4]], 2, 1, 9)` gives `[[1, 2], [9, 4]]`, and
  `ReplaceAt` over a `vector<3>` now has the type `vector<3>`. The form with
  more than one position compiles to JavaScript when the type of the collection
  shows a list at each level it writes.
- **A `Loop` compiled to GLSL or WGSL can stop early with `Break` and skip a
  pass with `Continue`.**
  `Loop(Block(If(a > 3, Break()), a := a + 1), k ∈ 1..8)` declined with "wrong
  number of arguments", and it now compiles to `if (3.0 < a) { break; }` in the
  `for` statement. So an escape-time formula no longer has to run every pass on
  every pixel. The jump must be a statement of the `Loop` body, alone or as the
  branch of an `If` with no else (or with the else branch `Nothing`).
  `If(c, a := 1, Nothing)` in a statement position also compiles now.

### Behavior Changes

- **An assignment to a list element in Epsil rebinds the list.** `xs[2] = 9`
  gave the error `incompatible-type`, and is now `xs = ReplaceAt(xs, 2, 9)` (see
  Improvements). An assignment with a string index, `xs["a"] = 9`, is the parse
  error `assignment-to-list-element`, and the statement changes nothing. In
  LaTeX, the same error is given for a string index, for a list that is not a
  symbol, for an element target in a `\operatorname{let}` statement or a `where`
  item, which declare a new name, and for the subscript spelling
  `n_{1}\coloneq 7` outside a block: only `n[1]\coloneq 7` rebinds the list. In
  a block, `n_{1}\coloneq 7` still declares the local `n_1`.
- **An assignment that rebinds a list to a `ReplaceAt` of itself checks the
  write, and keeps the old value when it fails.** This applies to
  `Assign(L, ReplaceAt(L, …, v))` however it is written: `L[k]\coloneq v`, the
  Epsil `xs[k] = v`, or MathJSON. With `L = [1, 2]`, `L[5]\coloneq 1` gave the
  unevaluated `ReplaceAt([1, 2], 5, 1)` as the new value of `L`, and it is now
  the error `out-of-range`, as is a position of zero or one that is not an
  integer. A name with no value as the target is the error
  `assignment-to-list-element`, and an error that `ReplaceAt` gives, such as
  `incompatible-type` for a number as the target, is returned. In each case `L`
  keeps its value. A symbolic position, `L[k]\coloneq 1` with `k` unknown, still
  gives the unevaluated `ReplaceAt`. Any other `ReplaceAt`, such as
  `y\coloneq \operatorname{ReplaceAt}(L, 5, 1)`, keeps its documented behavior.
- **Epsil warns when a body that is only `name = value` compares and nothing
  reads the result.** `let a = 0; match 1 { 1 => a = 2 }; a` gave `0` with no
  message, and it still gives `0`, now with the warning
  `equation-not-assignment` from `epsil check` and from a program run. Write
  `1 => do { a = 2 }` to assign, or `1 => a == 2` to compare. The warning also
  applies to a branch of a conditional expression and to a function whose every
  read is a call with a discarded value. A body whose value is read, and an
  equation of a free name, a constant, a parameter or a pattern variable, get no
  warning.
- **The type of a function literal no longer reads a variable that has the name
  of its parameter.** With `n := [1, 2]`, `n ↦ n + 1` was typed
  `(n: unknown) -> list<number>`, and it is now `(n: unknown) -> number`, as
  with a parameter of another name. With `mk := n ↦ (x ↦ x + n)`, `mk(1)` is now
  typed `(x: unknown) -> number`, and `Apply(mk(1), [10, 20])` is typed
  `vector<2>`, not `list<number>`. Its value is still `[11, 21]`. A body taken
  out of the literal and evaluated outside a call still reads the variable.
- **A tuple beside a list of another length is an `incompatible-dimensions`
  error under an operator that reads the tuple by position.**
  `Power((1, 2), [3, 4, 5])` was `[1, 16]`, and it now gives
  `Error("incompatible-dimensions", "2 vs 3")`, as `Power([1, 2], [3, 4, 5])`
  does. `Arctan2`, `Mod`, `Less`, `ElementMax` and the other element-wise
  operators do the same. `Power((1, 2), [3, 4])` is still `[1, 16]`, and
  `Multiply((1, 2), [3, 4, 5])` is still a list of three points.
- **A function with a declared signature checks an argument when a later value
  decides it.** With `h` declared `(integer) -> integer` and the body `2k`, and
  `m` with no value, `h(m)` gave `2m`, so after `m := 1.5` its value was `3`.
  `h(m)` now stays `h(m)`, and after `m := 1.5` it gives an `incompatible-type`
  error. With `m` declared `integer`, `h(m)` still gives `2m`. At a `real` or
  `number` parameter, the body is still applied to a symbol with no declared
  type: `f(x)` gives `x^2` for `f` declared `(real) -> real`. But `f(x + 1)`
  stays while `x` has no type. Declare `x` as `real` to apply the body.
- **A parameter annotated on a function checks an argument when a later value
  decides it.** With `function h(k: integer) { 2*k }` and `m` with no value,
  `h(m)` gave `2m`, so after `m = 1.5` its value was `3`. `h(m)` now stays
  `h(m)`, and after `m = 1.5` it gives an `incompatible-type` error. A function
  literal applied directly or given as a callback stays as an `Apply` of the
  literal: `((k: integer) => 2*k)(m)`. The cases where the body is still applied
  are those of a declared signature above. A symbol at a parameter whose type
  admits it is also applied, on a declared signature too: with `f` declared
  `(symbol) -> symbol`, `f(q)` gives `q`.
- **The index of a `Subscript` is canonical, and an index read by value keeps
  its parentheses.** `A_{n-1}` was `["Subscript", "A", ["Subtract", "n", 1]]`
  and is now `["Subscript", "A", ["Add", "n", -1]]`. A free `i` in an index is
  now the imaginary unit, as it already was in `A_{i,j}`: `A_{i+1}` holds
  `["Complex", 1, 1]`. Declare `i` to use it as a variable. `A_{(n)}` and
  `A_{n+0}` are now `["Subscript", "A", ["Delimiter", "n"]]`, written `A_{(n)}`.
  The form `["Subscript", "A", "n"]` read back as the symbol `A_n`, so that
  `\sum_{n=1}^{3} A_{(n)}` gave `3A_n` after `simplify()`. It now stays a sum,
  whose value is `A_1+A_2+A_3`. A product index is now written in parentheses,
  `A_{(mn)}`, because `A_{mn}` reads back as the symbol `A_mn`. `A_{(3)}` is now
  the symbol `A_3`. `ce.function('Subscript', [ce.symbol('A'), ce.symbol('n')])`
  now reads the value of `n`: use `ce.symbol('A_n')` for the compound symbol.
  `["Subscript", "ExponentialE", "n"]` is now the symbol `e_n`, and `i_{k+1}`
  with `k := 3` is now the symbol `i_4`, as `e_{k+1}` is `e_4`.

### Resolved Issues

- **An Epsil `let` whose name is a library name is a local in the static check
  too.** `let i = 1` followed by `let y: integer = i` ran and gave `1`, but
  `executeEpsil` and `checkEpsil` reported the `static-type-error` "The value
  `i` of type `imaginary` is not compatible with the declared type `integer`":
  the check read `i` as the imaginary unit. A loop with `i` as the position of
  an element assignment, `xs[i] = 10 * i`, got the same false error. The check
  now reads `i`, `e` or `pi` declared by a `let` as the local, as the run does.
- **The Epsil guide no longer shows `random(n)` with an integer.** The examples
  of an effect specifier in the pages "Epsil Control Flow", "Epsil Types" and
  "Inside Epsil" were `function roll(n) random -> integer { random(n) }`.
  `random` draws from a collection, so `roll(6)` gave an `incompatible-type`
  error. The examples now use `random(1..n)`, and `roll(6)` gives an integer
  from 1 to 6.
- **The error of a numeric integral now includes an inner integral in the body
  of a function that the integrand calls.** With
  `F = y ↦ ∫₀¹ e^(−xy)/x^0.99 dx`, `∫₀¹ F(y) dy` gave
  `99.575857194449625 ± 0.000000000000088`, for a true error of `1.2e-12`. It
  now gives `99.57585719445 ± 0.00000000011`, as with the inner integral written
  in the integrand. A result of such an integrand that does not converge no
  longer uses Monte Carlo, which ran a quadrature for each sample. It stays the
  quadrature result, or `NaN` when this result has no finite error.
- **The error of a numeric integral now follows a factor of an inner integral.**
  The error of the inner integral was added with no factor, so a small factor
  gave an error much larger than the true one.
  `∫₀^∞ e^(−y) ∫₀¹ e^(−xy)/x^0.99 dx dy` gave `99.315 ± 0.031` and now gives
  `99.3149882729 ± 0.0000000086`. `∫₀¹ 10⁻¹² ∫₀¹ e^(−xy)/x^0.99 dx dy` gave an
  error of `1.1e-10` for the value `9.96e-11`, and now gives an error of
  `1.1e-22`. An integrand that changes faster than its inner integral, such as
  its square, now gets a larger error. The error is not changed for an integrand
  with an effect (`Random()`, an assignment), or with more than four inner
  integrals.
- **A later global no longer changes a local of a function when the function is
  built again.** After `h = n ↦ Block(g := z ↦ 0, z ↦ g(z) + n)`, `g := t ↦ 9`
  and `Apply(h(1), 0)` each gave the error `incompatible-type` about the `scope`
  effect. The assignment now succeeds, `Apply(h(1), 0)` gives `1`, and `g(0)`
  gives `9`. A global that exists when the function is written stays an outer
  variable of the function, and writing it still needs the `scope` effect.
- **A closure stored under a declared signature keeps the variables of the call
  that made it.** With `h = n ↦ Block(g := z ↦ 0, z ↦ g(z) + n)`,
  `Declare(q, "(real) -> real", h(1))` and `q(0)` gave `1 + g(0)`, and
  `ce.declare('q', { type: '(real) -> real', value: closure })` did the same;
  both now give `1`. With
  `k = n ↦ Block(Declare(g, "(real) -> real", h(n)), z ↦ g(z) + n)`, `k(1)(0)`
  gave the error `Recursion limit exceeded`, and it now gives `2`. A signature
  with a `where` clause, such as `(T) -> T where T`, had the same failures. The
  same programs with the type `unknown` already gave these values.
- **`Integrate` of a block of several statements no longer reads only the first
  statement.** `Integrate(Block(c := 2, c * x), Limits(x, 0, 1)).evaluate()` was
  the error `assignment-in-operand`, and it is now `1`, the value of `.N()`. A
  block that only assigns local variables before its value is integrated through
  that value. Any other block, such as one with an `If` statement or one that
  assigns a variable outside the block, stays unevaluated under `evaluate()`,
  and `.N()` still gives its numeric value. `toString()` of an integral now
  shows every statement of the block. `D` now reduces the same blocks:
  `D(Block(c := 2, c * x), x)` was unevaluated and is now `2`.
- **A `Which` or an `If` over a list of conditions no longer copies an arm that
  is a list with no elements to read.** With `L = [1, 3, 5]` and `foo`
  undeclared, `Which(L < 2, foo(L), True, 0)` was `[foo([1, 3, 5]), 0, 0]`, so a
  list of 500 elements gave 500 copies of the list at each read. It now stays
  `Which([True, False, False], foo([1, 3, 5]), True, 0)`, and it selects when
  `foo` has a definition. An operator that reads the whole list stays around
  such a selection: with `M` declared `list<number>` and no value,
  `Length(Which(L < 2, M, True, 0))` was `3` from the wrong list `[M, 0, 0]`,
  and it now stays `Length(Which([True, False, False], M, True, 0))` until `M`
  has a value. The same applies to a `Which` whose list condition is not
  decided: `Length(Which(L < k, L, True, 0))` was a `Which` with an error in an
  arm.
- **An assignment to a list element no longer replaces the function `At`.** With
  `L` a list, `L[k]\coloneq 5` replaced `At` for the whole engine, so that
  `L[2]` gave `[5, 5, 5]`, and `L[2]\coloneq 5` gave `expected-a-symbol`. Both
  now rebind `L` with `ReplaceAt` (see Improvements), and `At` keeps its
  meaning.
- **`N()` of an integral now reports the error of `evaluate()` when a call head
  is defined later as a data symbol.** Parse `\int_0^1 g(x)\,dx`, then run
  `ce.declare('g', 'real')`. `evaluate()` gave the `expected-function` error and
  `N()` kept the integral unevaluated. `N()` now gives the same error. An
  integral whose call is in a branch that is not reached keeps its value:
  `If(x > 2, g(x), x^x)` over `[0, 1]` is still `0.783...` under `N()`.
- **`D`, `Limit` and `NIntegrate` now report the `expected-function` error when
  a call head is defined later as a data symbol.** Parse `\frac{d}{dx} g(x)`,
  then run `ce.declare('g', 'real')` and `ce.assign('g', 5)`. `evaluate()` gave
  `Apply(Derivative(g, 1), x)`. In the same way, `Limit(x ↦ g(x), 0)` stayed
  unevaluated and `NIntegrate(x ↦ g(x), 0, 1)` gave `NaN`. All three now give
  the `expected-function` error, which the same expression gives when it is
  boxed after the declaration. A call in a branch that no sample reaches keeps
  the value: `NIntegrate(x ↦ If(x > 2, g(x), x^x), 0, 1)` is still `0.783...`.
- **The derivative of a function literal no longer takes a free name of a called
  function for its parameter.** With `a := 3` and `h := x ↦ a·x`,
  `Apply(Derivative(a ↦ a·h(a)), 2)` was `14`, and it is now `12`. The result
  renames a parameter when it holds a free name equal to that parameter:
  `Derivative(a ↦ h(a))` with no value for `a` was `a ↦ a + a`, and it is now
  `a_1 ↦ a`. When the body also binds that name, as in
  `a ↦ h(a) + Sum(a, Limits(a, 1, 3))`, the derivative stays unevaluated and
  `N()` gives its value numerically.
- **A `Break` or a `Continue` that a shader cannot run now declines on GLSL and
  WGSL.** `Block(Break(), 1)`, with no loop, reported success with the code
  `break; return 1.0;`, which the driver refuses. A `Break` in a `Match` case in
  a `Loop` did the same with `(c ? (break) : (s = k))`. Both now decline, and
  `run()` uses the interpreter. `Break(f(k))` in a shader `Loop` also declines:
  the compiled `break` did not evaluate its operand.
- **A closure assigned to a name keeps reading its own binding of that name.**
  With `h = n ↦ Block(g := z ↦ 0, z ↦ g(z) + n)` and
  `k = n ↦ Block(g := h(n), z ↦ g(z) + n)`, `k(1)(0)` gave the error "Recursion
  limit exceeded", and it now gives `2`. The assignment made the `g` of the
  closure read the variable being assigned. A function that calls the name it is
  assigned to is still recursive when that name is the variable being assigned.
- **A compilation to Python or `interval-js` declines arithmetic over a symbol
  declared `any` or `value`, as a compilation to JavaScript does.** Such a
  symbol can hold a list, and compiled code does not test the shape of a value
  at run time. `Function(2t, t: any)` compiled to `lambda t: 2 * t` on Python,
  which gives `[1, 2, 1, 2]` for `[1, 2]`, and on `interval-js` it gave an
  `empty` interval. The compilation now declines with the code
  `unsettled-shape`, with `t` in `unsupported`, and the interpreter gives
  `[2, 4]`. This includes programs that gave the correct value, such as
  `Function(Sin(t), t: any)` on Python and a call with a number. Declare the
  shape, such as `real` or `list<real>`, to compile them.
- **A `let` or `const` that is refused keeps the value of the name from an
  earlier run on the same engine.** `let f = 5` in one run, then
  `let f: string = 1` in the next, gave an error and left `f` with no value. `f`
  is now still 5.
- **`\implies`, `\iff`, `\veebar` and `\barwedge` beside the colon of a brace
  group stay in the condition, as `\land` and `\lor` do since 0.181.1.**
  `\{x > 0 \veebar y > 0: 2, 3\}` was a set with `Xor` over a `Colon`, with no
  diagnostic, and it is now a `Which`. `\{x: x > 0 \implies x > 1\}` is now a
  set-builder with the condition `x > 0 \implies x > 1`. A brace group with no
  colon, such as `\{a \implies b\}`, stays a set of one element.
- **`simplify()` keeps a factor in a `Sum` or a `Product` when the factor reads
  a library-named index in a nested scope.**
  `\sum_{i=0}^{n}\sin(\sum_{k=1}^{i}\sin(0.3k))\exp(-i)` moved the sine out of
  the outer sum, which left `i` free and changed the value at `n = 3` from
  0.2594 to 1.5489. An index named `i` shadows the imaginary unit, and
  `simplify()` gave the outer index and the inner bound two different opaque
  names.
- **`compile()` lists in `freeSymbols` a name that a called function reads when
  a local at the call has the same name.** With `ok(c) := 1 / c ≥ minR` defined
  on the engine and `minR` declared `real`, `Block(let minR = 0.008, ok(4))`
  compiled with `freeSymbols: []`, although the compiled `ok` reads the input
  `minR` and not the local. The list is now `["minR"]`, as for `ok(4)` alone.
  With `minR` not declared, the block compiled, and it now declines with the
  code `untyped-input`. The same applies when the name is the index of a `Sum`,
  a `Product` or a `Loop` around the call.
- **`compile()` no longer lists `DefineFunction` and the name of a local
  function in `unsupported` for a program that compiled.** The Epsil program
  `function f(x) { x + 1 }` then `f(2)` compiled to JavaScript with
  `success: true` and `unsupported: ["DefineFunction", "f"]`, and so did a call
  of a local bound to a function literal (`const g = (k) => k + 1`). The list of
  a compilation with `success: true` is now always empty, as documented. When a
  compilation declines, the list no longer has a name that the expression binds
  (a local function, a parameter, an index): `(f) ↦ f(2)` gave `["f"]`, and now
  gives `[]`. It can still name `DefineFunction` beside the operator that caused
  the decline.
- **`compile()` no longer lists in `freeSymbols` the names that an engine
  function reads when a local function of the program has its name.** With
  `f(t) := t·w` defined on the engine, the program `function f(t) { t + 1 }`
  then `f(x)` calls its own `f`, and `freeSymbols` was `["w", "x"]`. It is now
  `["x"]`.
- **`And`, `Or`, `Nand`, `Nor` and `Implies` of a computed list and a list
  symbol now give a list.** With `u = [1, 2, 3]` and `c = [True, False, True]`,
  `And(u > 0, c)` gave the unevaluated
  `And([True, True, True], [True, False, True])`, and now gives
  `[True, False, True]`. `And(False, c, u > 0)` gave the scalar `False`, and now
  gives `[False, False, False]`. When the two lists have different lengths, the
  result is now the error `incompatible-dimensions`.
- **The type of a block no longer reads a variable outside the block that has
  the name of a local of the block.** With `n = [1, 2]`, the type of
  `Block(Declare(n, "real", 2), n + 1)` was `list<real>`, and its value is `3`.
  The type is now `real`. In Epsil, with the same `n`, the type of
  `function f() { let n: real = 2; n + 1 }` was `() -> list<real>` and is now
  `() -> real`. The values did not change.
- **The type of an element-wise `If` or `Which` now holds the values of a branch
  whose elements have an unknown type.** With `L = [1, 3, 5]` and `f` not
  defined yet, the type of `Which(L < 2, f(L), True, 0)` was
  `vector<integer^3>`, the type of the other branch alone. When `f` is later
  defined as `x ↦ x / 2`, the value is `[1/2, 0, 0]`. The type is now
  `list<unknown^3>`. The same applies to a branch that is a symbol with no type,
  and to a branch declared `list<unknown>`.
- **`evaluateAsync()` of a block now reads a local of the block, not a global of
  the same name, when it tests whether an operand is a list.** With
  `n := [1, 2]`, `Block(Declare(n, "real", 2), n + 1).evaluateAsync()` did not
  end, and the process stopped when its memory was full. It now gives `3`, as
  `evaluate()` does. In the same block, `n = 2` did not end either and now gives
  `True`.

## 0.181.1 _2026-11-05_

### Resolved Issues

- **`Mandelbrot` and `Julia` give a smooth value that is continuous across
  iteration boundaries.** The escape test `|z|² > 4` stopped too early for the
  smoothing formula, so the count jumped by a median of 0.15 at each boundary,
  which a cyclic color formula shows as arcs. The test still decides inside or
  outside. The smoothing then iterates further, at most 16 times, until
  `|z|² > 65536`. This costs about 3 iterations per escaping point, and the
  values change by a small amount. This applies to `evaluate`, `javascript`,
  `glsl` and `wgsl`. A jump remains in one case: a slow orbit that does not
  reach the larger radius in 16 iterations takes the value of its first iterate,
  which a deep zoom near `c = -2` can show.
- **A `\land` or a `\lor` beside the colon of a brace group stays in the
  condition.** `\{m = 1 \land z < 1: 2, 3\}` was the set of
  `And(m = 1, Colon(z < 1, 2))` and `3`, with no diagnostic, and it is now a
  `Which` with the condition `m = 1 \land z < 1`. In the same way,
  `\{x : x > 0 \land x < 1\}` is now a set-builder with the condition
  `x > 0 \land x < 1`. Outside a brace group, the colon still binds tighter.

## 0.181.0 _2026-11-05_

### Breaking changes

- **An operator declares its bound variables with operand roles, and the
  `scoped` flag is a boolean.** The bound variables of an operator (the index of
  a sum, the variable of a derivative) were declared with a binding-site
  selector as the value of `scoped`, made with `operandSites`, `operandsFrom`,
  `indexingSetSites`, `limitsIndexSites` or `lambdaParamSites`. These functions
  and the types `BindingSite` and `BindingSiteSelector` are no longer exported,
  and a function as the value of `scoped` now throws an error that names
  `operands`. Give the bound variables the `bound` role (a symbol, as
  `operandSites` and `operandsFrom` declared) or the `clause` role (an indexing
  set such as `Limits(k, 1, 10)` or `Element(k, S)`, as `indexingSetSites` and
  `limitsIndexSites` declared) of the `operands` handler:

  ```ts
  // Before
  ce.declare('MySum', {
    lazy: true,
    signature: '(any, any+) -> number',
    scoped: indexingSetSites(1, 'integer'),
  });
  // Now
  ce.declare('MySum', {
    lazy: true,
    signature: '(any, any+) -> number',
    operands: (ops) =>
      ops.map((_, i) =>
        i === 0 ? { kind: 'raw' } : { kind: 'clause', type: 'integer' }
      ),
  });
  ```

  An operator with a `bound` or a `clause` role has its own scope, as with
  `scoped: true`. The engine finds these roles when the operator is declared, by
  calling the handler with zero to three `Nothing` operands, so the handler must
  give them for those operands too; a handler that gives one role per position,
  as above, does. A `bound` or `clause` operand of an operator that is not
  `lazy` is no longer evaluated before the `evaluate` handler. The library
  operators bind the same variables as before.

### Resolved Issues

- **Compiled JavaScript no longer defines a function twice with the same body.**
  With `P: (tuple<real, real>) -> number`, a call `P((n, n + 1))` inside a `Sum`
  and a call of `P` with another point gave two definitions in `preamble`, with
  the same text. These calls now share one definition, `_fn_P`. The values do
  not change.
- **A zero times a list or over a list keeps the list.** With `L: list<real>`
  and no value yet, `0·L` and `L - L` simplified to the scalar `0`, the
  canonical form of `0/L` was `0`, and `0·L + 1` simplified to `1`. A broadcast
  that held such a term changed length. These forms now stay as a product or a
  quotient, and with `L = [1, 2, 3]` they evaluate to `[0, 0, 0]`, `[0, 0, 0]`,
  `[0, 0, 0]` and `[1, 1, 1]`. A type that only may hold a list still folds to
  `0`: `sin(f(x)) - sin(f(x))` with `f` undeclared is `0`.
- **`simplify()` keeps `|arcsin(x)|`, `|arccsc(x)|`, `|artanh(x)|` and
  `|arcoth(x)|`.** It rewrote `|f(x)|` as `f(|x|)`, which is complex where `f`
  is not real: `|arcsin(2)|` is `2.05`, and `arcsin(|2|)` is `1.57 - 1.32i`. The
  result was also typed complex, so that a compiled comparison of it declined.
  The rewrite stays for the functions that are real on the whole real axis, such
  as `arctan` and `arsinh`, and it no longer applies to a symbol declared
  complex: `|sinh(i)|` is `0.84`, and `sinh(|i|)` is `1.18`.
- **`evaluate()` and `simplify()` no longer overflow the stack on a lazy
  operator over an operand that evaluates to itself.** A `Map` over
  `Range(0, Length(At(u, i)) - 1)` with a length that is not known replaced the
  operand with the same expression and evaluated the `Map` again, until the
  stack overflowed.
- **`simplify()` of a large sum respects `withTimeLimit()`.** The rule for
  `g·sin²(u) + g·cos²(u)` examined each pair of terms with no check of the limit
  and built the factors of a term again for each pair. A limit of 300 ms on
  `(sin(3x) + cos(xπ²) + 2)^64 / M^64` ended after about 5,600 ms, and now ends
  after about 500 ms.
- **A `Map` that the engine compiles reads the current value of the symbols in
  its function.** The compiled code kept the value of the first drain when the
  symbol got a new value with no assignment: a parameter of a new call, a local
  of a new call, or a loop index. With
  `f(d) := Sum(Map(x => x + d, Range(1, 128)))`, `f(1); f(2); f(3)` was
  `8384; 8384; 8384`. Now it is `8384; 8512; 8640`, as with `ce.jit = 'off'`.
  `Sum(Sum(Map(x => x + k, Range(1, 128))), k, 1, 3)` was `25152`, and now it is
  `25536`. The defect was in both the integer compilation and the compilation
  under `N`. The engine now compiles the function again when such a value
  changes.
- **[#513](https://github.com/cortex-js/compute-engine/issues/513) An operator
  definition can declare which of its operands are statements.** An assignment
  is valid only as a statement, and the statement operands were a fixed list of
  library operators, so a host operator such as `Do(body, n)` could not take
  one: `Block(Assign(s, 0), Do(Assign(s, s + 1), 5), s)` was the error
  `assignment-in-operand`. The new `operands` handler of an operator definition
  gives a role to each operand:
  `operands: () => [{ kind: 'statement' }, { kind: 'value' }]`. Now the block
  above evaluates to `5`. A statement operand is canonicalized as a branch of an
  `If` is: a first assignment of a name that no enclosing scope declares is the
  error `first-assignment-in-branch`, and a bare `Break` is an error. An
  operator that is not `lazy` evaluates only its `value` operands before its
  `evaluate` handler, so the handler receives the statement as written and runs
  it when it needs to. The body of a `MatchCase` is a statement too:
  `Block(Assign(a, 0), Match(x, MatchCase(1, Assign(a, 2))), a)` was the error
  `assignment-in-operand`, and now gives `2` when `x` is `1`.
- **[#437](https://github.com/cortex-js/compute-engine/issues/437) An operator
  can hold one operand and keep the checks of the others.** To compute
  `Mod(Fibonacci(10^6), p)` in ℤ/p, a `Mod` handler must see `Fibonacci(10^6)`
  before it is evaluated. An operator that is not `lazy` evaluated every operand
  before its `evaluate` handler, and a `lazy` operator lost its type, its
  broadcast over a list, the check of its operands against the signature and its
  `NaN` result: a lazy copy of `Mod` typed `Mod(3*4, 5)` as `real`, left
  `Mod('a', 3)` unevaluated, and threw on `Mod(1)`. The new `held` operand role
  of the `operands` handler keeps one operand unevaluated in an operator that is
  not `lazy`: `operands: () => [{ kind: 'held' }, { kind: 'value' }]`. Now the
  handler receives `Fibonacci(10^6)` as written, under `evaluate()`, `N()` and
  `evaluateAsync()`, and the operator keeps the checks, the type and the
  broadcast of `Mod`: `Mod(3*4, 5)` is `2` typed `integer`, `Mod('a', 3)` is the
  error `incompatible-type`, and `Mod([1, 2, 3], 2)` is `[1, 0, 1]`. A literal
  list at a held position is broadcast, and the handler receives each element
  unevaluated. The `held` role is refused on a `lazy` operator, whose operands
  are all `raw`.
- **A read through an alias of a record or a dictionary has the type of the read
  of the named type.** With `Rec` an alias of `record{a: list<real>}` and
  `x: Rec`, `At(x, "a")` was typed `tuple<string, any>`, and `At(x, "a", 1)` was
  typed `string`, so `At(x, "a", 1) + 1` was an error. They are now typed
  `list<real>` and `real`, and the sum has a value. The same applies to an alias
  of a dictionary, and to an alias that is an arm of a union.
- **A read with several indexes has the type of the same read written one index
  at a time.** With `t: tuple<list<real>, real>`, `At(t, 1, 2)` was typed
  `list<real>`, and its value is a real number; with `L: list<record{a: real}>`,
  `At(L, 1, "a")` was typed `tuple<string, any>`. Now each is typed `real`, as
  `At(At(t, 1), 2)` is, also for a step through a dictionary. `At(t, 1, 2)` now
  compiles: it declined before. A read out of range whose steps go through a
  record, a dictionary or a tuple now gives the marker of the final value:
  `At(L, 9, "a")`, and `At(X, 9, 1)` with `X: list<tuple<real, string>>`, are
  `NaN`, not `Missing`. A read with one index too many (`At(t, 2, 1)`) is typed
  `error`, and its value is an error, as before.
- **`Flatten` keeps a tuple element in every form of the call.** A list of
  tuples of one shape kept them, but other forms opened them:
  `Flatten([(1, 2), (3, 4)], 1)` was `[1, 2, 3, 4]`, and
  `Flatten([(1, 2), (3, 4, 5)])` was `[1, 2, 3, 4, 5]`. Now each keeps the
  tuples, as the reference page says, so a point stays a point:
  `Flatten([(1, 2), (3, 4)], 1)` is `[(1, 2), (3, 4)]`. A tuple as the operand
  is still opened: `Flatten(([1, 2], 3))` is `[1, 2, 3]`.
- **The numeric evaluation of a rational is typed as a real.** `N(1/3)` was
  typed `rational<0.33..0.34>`, and its value is a float, which is not a
  rational. Now it is typed `real<0.33..0.34>`. `N([1/3, 2])` is a
  `vector<real^2>`, and `Map(k ↦ N(k / 3), [1, 2])` is a `vector<real^2>`. An
  integer stays an integer: `N(5)` is typed `integer`, and `N(5) / 3` is typed
  `real`. With a precision, the type has no range, because the value is rounded:
  `N(1/3, 1)` is `0.3`, and it is typed `real`. `Typed(N(1/3), 'rational')`
  still passes.
- **[#512](https://github.com/cortex-js/compute-engine/issues/512) Collection
  operators that keep the elements of their operand give the element type of the
  operand.** `Flatten` of a `list<list<integer>>` was typed `list`, so an
  element of it was typed `any`, and
  `Max(At(Flatten(xs), i), At(Flatten(xs), j))` did not compile. Now
  `Flatten(xs)` is a `list<integer>`, and the `Max` compiles. With a depth, the
  type has the levels that stay: `Flatten(xs, 1)` of a
  `list<list<list<integer>>>` is a `list<list<integer>>`. A tuple element keeps
  its type: `Flatten(xs)` of a list of points is a
  `list<tuple<integer, integer>>`. These operators also keep the element type
  now: `Chunk` (`list<list<integer>>`, was `list<list>`), `GroupBy`
  (`dictionary<list<integer>>`, was `dictionary<list>`), `Cycle`, `Union`,
  `Intersection`, `SetMinus`, `Complement`, `SymmetricDifference`, `Join` of
  sets (`set<integer>`, was `set`), `Iterate` with a user function or a symbol
  declared with a function type (`list<integer>`, was `list`), `Reshape`
  (`matrix<integer^(2x2)>`, was `matrix<2x2>`), and `Tabulate` and `Table` with
  a function literal (`vector<integer^5>`, was `vector<5>`). The compiled
  JavaScript `Flatten` declines when it would open a tuple:
  `Length(Flatten(xs))` with `xs` a list of points gave the number of
  coordinates, not the number of points. `Flatten` now stays unevaluated when an
  element is an infinite list (`Flatten([[1], Cycle([2])])`) or an unevaluated
  read of a list (`Flatten([[1], At(xs, 1)])` with `xs` a list of lists with no
  value).

- **A series keeps its remainder under `N()`.** `Series(sin x).N()` and
  `Series(exp x).N()` were `NaN`, because a `BigO` term was `NaN` under `N()`.
  Now the `BigO` term stays, its operand is approximated, and the other terms
  are approximated, as in Mathematica: `Series(sin x).N()` is
  `x - 0.1666…x^3 + 0.008333…x^5 + O(x^7)`, and `BigO(x^7).N()` is `BigO(x^7)`.
  The value of `Series(sin x, x, 0, 3)` at `x = 1/2` is `0.479… + O(0.03125)`
  under `N()`. A host that tests `.N().isNaN` to find a series no longer finds
  one: test for the `BigO` operator. Use `Normal` to drop the remainder, as
  before.

- **A power of `0` with a variable exponent is no longer folded with the value
  that the variable has when the expression is boxed.** After
  `ce.assign('x', 2)`, `ce.box(['Power', 0, 'x'])` was the number `0`, and it
  stayed `0` after `ce.assign('x', -1)`. Now the expression stays `0^x`, and
  `evaluate()` and `N()` use the value of that moment: `0` for `x := 2`,
  `ComplexInfinity` for `x := -1`, `NaN` for `x := 0`. An exponent made only of
  numbers and constants still folds when it is boxed (`0^{2\pi}` is `0`).
- **`Sort` and `Ordering` of an empty list give the empty list.** `Sort([])` and
  `Ordering([])` stayed unevaluated, also with a key function or a comparator,
  and also for a source that evaluates to an empty list
  (`Sort(Filter([1, 2], x ↦ x > 5))`). Now each gives `[]`. `Sort("")` gives the
  empty string `""`.
- **The application of a curried function to a list is typed as a list.** With
  `mk := n ↦ (x ↦ x + n)`, `Apply(mk(1), [1, 2])` was typed `number`, and its
  value is `[2, 3]`. Now it is typed `vector<2>`, as `Apply(x ↦ x + 1, [1, 2])`
  is. A list of tuples, whose cells the body of the inner function decides,
  gives the type `any`.
- **The negation of a chained comparison compiles to the negation of the whole
  chain.** `Not(Less(3, y, x))` compiled to `!(3.0 < y) && (y < x)` in GLSL and
  WGSL, and to the same form in JavaScript and Python
  (`not (3 < y) and (y < x)`), which negates only the first comparison: at
  `y = 4`, `x = 1` the compiled code gave `false` and the interpreter gives
  `True`. Now the code is `!((3.0 < y) && (y < x))`.

## 0.180.0 _2026-11-04_

### Breaking changes

- **A function literal whose body cannot give the declared result type is
  refused when it is assigned.** With `g` declared `(x: number) -> number`,
  `ce.assign("g", t ↦ t > 0)` now throws an `incompatible-type` error, as
  `ce.assign("v", True)` does for `v` declared `number`. The same holds for
  `ce.declare()` with a value, and the `Assign` operator gives the error value.
  Before, the assignment was accepted and each call gave the error. A generic
  result is read at the bounds of its type variables: with
  `(x: T) -> T where T: broadcastable<number>`, the bodies `t > 0` and
  `(t, t^2)` are refused, and with `(x: T) -> boolean where T` the body `x ↦ 1`
  is refused. An inferred type that is only wider than the declared result is
  still accepted (`n ↦ n + 1` under `(integer) -> integer`), and so is a
  character under a string result (`(s: string) ↦ s[1]` under
  `(string) -> string`). Not tested: `NaN`, `Missing` and `Nothing` in the type
  of the body, a collection body when a parameter can receive a collection whole
  (the result can then be a broadcast), and a body with a `Return` before its
  last statement.

### Performance

- **Adding symbolic terms with rational coefficients reuses unchanged
  products.** Evaluating and reading the 1,000 elements of
  `\sum_{n=0}^{3}2^{-n}|\sin(2^nx+[0...999]/1000)|` took about 494 ms and now
  takes about 377 ms in an alternating five-run comparison. The values and their
  types are unchanged.

- **Reading the elements of an evaluated broadcast that holds `Abs` is about
  twice as fast.** For `\sum_{n=0}^{3}2^{-n}|\sin(2^nx+[0...999]/1000)|`,
  reading the 1,000 elements of the evaluated value took about 1,250 ms and now
  takes about 560 ms. Three changes: the coefficient of `Abs(u)` is read without
  building a new `Abs` node when there is no coefficient to extract; an
  evaluation no longer computes the type of its result to take back incomplete
  walks when it recorded none; and the type of `Abs` of an operand that may be
  NaN (`nan | real<0..> | signed_infinity`) is one shared frozen type, so its
  facts are computed once. The values and the types are the same (Tycho row
  474).

### Resolved Issues

- **Arithmetic on a value declared as a point or a list of points keeps the
  signed infinities in the component types.** With
  `E = real | signed_infinity | nan` and `P: list<tuple<E, E>> | tuple<E, E>`,
  the expressions `2P`, `P + P` and `(6, 0) + P` were typed
  `list<tuple<infinity | nan | real, …>> | tuple<infinity | nan | real, …>`,
  while `-P` and `P/2` kept `E`. The type `infinity` admits the complex
  infinity, which no such sum or product has, so a symbol declared with the
  union refused the result. A sum and a product are now typed for each arm of
  the union, and the result is the union `list<tuple<E, E>> | tuple<E, E>`. The
  3-D union is the same (Tycho row 492).

- **Compilation to JavaScript: a call mapped over a literal list of points
  compiles when a point reads an input declared with a range.** With
  `n: (tuple<number, number>, unknown, unknown) -> tuple<number, number>`,
  `n := (q, D2, d2) ↦ q + C(D2, d2)` and `x`, `y` declared `real<-10..10>`,
  `n([(1, 2), (x, y)], 4, 2)` now compiles and gives `[(2, 2), (4, 4)]` at
  `x = 3`, `y = 4`. Before, it fell back to the interpreter, because the element
  type of the list is a union of two tuples
  (`tuple<integer, integer> | tuple<real<-10..10>, real<-10..10>>`), and the map
  then used the definition of `n` with `D2` and `d2` typed `unknown`. The map
  now uses the definition for one point whose coordinates join the coordinates
  of the tuples (`tuple<real, real>`), as it did when `x` and `y` were declared
  `real`.

- **Compilation to GLSL and WGSL: the body of a user function calls the built-in
  `sin`, `cos`, `sign`, `min`, `max` or `clamp` of a parameter that every call
  bounds, or that the host declared with a range.** Since 0.179.0, such an
  operand called the NaN-safe helper (`_gpu_sin`, …). With `x` declared
  `real<-1e15..1e15>` and `F(a) := sin(a)`, the GLSL of `F(x)` now defines
  `_fn_F` as `sin(a)`, as in 0.178.0. A parameter is finite for certain when
  every call of the function in the compiled expression passes a value proven
  finite from the declarations, also through the body of another function
  (`G(c) := F(c, 2c)` called as `G(k)` with `k: real<0..10>` bounds both
  parameters of `F`). A declared range on a parameter
  (`F: (real<-1..1>) -> real`) now also gives the built-in, for any argument:
  before, the engine typed the parameter `number` and the range was lost. One
  call with a value that can overflow in f32 (`F(exp(y))` with `y: real`) or be
  NaN (`y: real | signed_infinity | nan`) keeps the helper. A call of a function
  whose declared result type has no finite range keeps the helper: the body of a
  function is not read to prove its result. No compiled value changes.
- **A `Filter` predicate that reads a typed parameter of an enclosing function,
  and then reads it again in a nested function, no longer throws**
  ([#510](https://github.com/cortex-js/compute-engine/issues/510), reported by
  [enumeratio](https://github.com/enumeratio)). With `v: list<integer>` the
  parameter of the outer function,
  `Count(Filter(1..1, c ↦ v[3] = v[1] ∧ Min(Map(1..3, j ↦ v[j])) ≥ 0))` applied
  to `[1, 0, 1]` threw "Filter predicate must return "True" or "False"" since
  0.178.0: the nested function `j ↦ v[j]` read `v` without its value. It now
  gives `1`.
- **A fold whose callback appends to the accumulator on one branch of an `If`
  and returns it unchanged on the other is typed as a list of numbers**
  ([#511](https://github.com/cortex-js/compute-engine/issues/511), reported by
  [enumeratio](https://github.com/enumeratio)).
  `Fold((t, m) ↦ If(m > l, t, Join(t, [x])), [1], 1..l)` was typed `list<any>`,
  so a second fold in `x` that reads `t` by index declined to compile with "does
  not settle one shape" since 0.178.0. It is now typed `list<number>`, and it
  compiles: in the example of the issue, `n = 3` and `l = 4` give
  `[1, 1, 2, 4, 7]`, as the interpreter does.
- **A fold whose accumulator is read past its end compiles again**
  ([#511](https://github.com/cortex-js/compute-engine/issues/511), reported by
  [enumeratio](https://github.com/enumeratio)). The cumulative sums
  `Fold((acc, c) ↦ Join(acc, [If(c = 1, 0, acc[c - 1]) + xs[c]]), [], 1..Count(xs))`,
  with `xs: list<integer>`, declined since 0.178.0 with "the accumulator can be
  a collection (type `list<integer | missing>`)". The read `acc[c - 1]` can be
  out of range, so the accumulator is typed `list<integer | missing>`, and a
  declared type cannot name `missing`. It compiles now, and
  `xs = [3, 1, 4, 1, 5]` gives `[3, 4, 8, 9, 14]`, as the interpreter does. As
  for every compiled read, an element that is absent gives `NaN` where the
  interpreter gives `Missing`.
- **A compiled call of a user function whose body does not give its declared
  result type declines, where it gave a wrong value.** The compiled code used
  the declared result and did not check the body. With
  `g: (x: number) -> number` and `g := t ↦ t > 0`, the compiled `g(b) + 1` gave
  `2`, and the interpreter gives an `incompatible-type` error. With
  `g: (x: T) -> T where T: broadcastable<number>`, `g := t ↦ (t, t^2)` and
  `x: list<real>`, the compiled `Sum(Rest(g(x)))` gave the string `"02,43,9"`,
  and the interpreter gives `(5, 13)`. Such a call now declines, and
  `evaluate()` gives the value. This includes a call that maps the function over
  a list argument. A body with a `Return` before its last statement is not
  checked. Most such functions are now refused when they are assigned (see
  "Breaking changes"); the decline covers the others.
- **A fold whose callback gives a matrix is typed with a type that admits its
  value.** `Fold((a, k) ↦ [[a[1], 2], [3, 4]], [1, 2, 3], 1..n)` was typed
  `matrix<integer^(2x2)> | vector<integer^3>`, but for `n = 2` its value is
  `[[[1, 2], 2], [3, 4]]`, which that type does not admit. It is now typed
  `list<list<unknown>> | vector<integer^3>`.

## 0.179.0 _2026-11-04_

### Breaking changes

- **Custom compile targets: two `CompileTarget` members are removed.**
  `absence.object.isNull` is gone: the guard of an absent collection at a
  position-preserving accessor (`At`, `First`, `Length`, ...) now tests it with
  `absence.object.isAbsent`, which a target already declares.
  `collectionEqualityOperand` is gone with no replacement: the compiled `Equal`
  and `NotEqual` over collections now always give a boolean, so a branch
  condition needs no classification of its operands.
- **`BaseCompiler` static members of the condition analysis are removed**:
  `isAbsenceSymbol`, `operandMayBeAbsent`, `ATOMIC_FRAGMENT`, `mayBeUndecided`,
  `compileGuardTest`, `conditionDecidability`, `conditionNode`,
  `connectiveNode`, `isDecidedByConstruction`, `operandPresenceConjuncts`,
  `isNanLiteral`, `absentOnlyThroughNumericSlots`, `peelNegations`,
  `kleeneCondition`, `kleeneConditionParts`, `kleeneValueLeaf`,
  `kleeneRelationLeaf`, `kleeneConnective`, `kleeneValueConnective`,
  `isDecidedBooleanValue`, `withConditionOperands`, `exactSelect`,
  `compileExactCondition`, `conditionDialects` and `conditionDialectOf`, and the
  exported `ConditionDialect`, `ConditionNode` and `CONDITION_DIALECT_JS`. A
  custom target compiles a branch condition with `BaseCompiler.compile`, or with
  `BaseCompiler.guardCondition` for the check that the condition is a boolean.
- **Custom compile targets: the code for an input that the compiled code writes
  is removed.** A write to an input already declines ("is not a local of the
  compiled expression"), so the `CompileTarget` fields `inputWrites` and
  `inputLocals` are gone, and a target no longer makes a local copy of an input
  or compiles the expression a second time. The `BaseCompiler` static members
  `classifyLocalReads`, `loopRunsOnce`, `localReadWithNoWrite`,
  `nestedOnlyLocals`, `chainedLocalDeclares`, `chainedAmbientWrite`,
  `scopeChainBinds`, `splitChainedAssignments` and `localVarsObjectStatement`
  are removed too: the forms that they handled (a read of a local before it has
  a value, a chained assignment) are static errors since 0.178.0. No compiled
  value changes.
- **Custom compile targets: `CompileTarget.reboundFunctions` is a set of
  names.** A call of a block-local function whose value can change while its
  block runs (assigned more than once, inside a nested statement, or from the
  result of a call) already declines, so the field no longer holds a function
  literal or a decline reason for each name: it is a `ReadonlySet<string>`. The
  `BaseCompiler` static members change with it: `reboundLocalNames` returns the
  set, and `reboundFunctionScope` and `noteLocalFunction` take it. Such a call
  now declines with one reason, also when the values of the local have different
  signatures or one of them is not a function literal. No compiled value
  changes.
- **Custom compile targets: `CompileTarget.reset` is removed.** The compiler
  never called it: a compilation is not done again on the same target. A target
  object that still has the field is accepted; the field is no longer read or
  checked, and TypeScript reports it as an unknown property in an object literal
  typed `CompileTarget`. No compiled value changes.
- **`BaseCompiler` static members of the promotion record are removed**:
  `_promoted`, `notePromoted`, `recordPromotion`, `recordFoldedPromotions` and
  `hasPromotedDefinition`. They recorded the values that the `auto` mode
  promoted to complex. That mode and the `promoted` result field were removed in
  0.178.0, so nothing read the record. No compiled value changes.
- **`BaseCompiler` static members of the `Nothing` and decidability proofs are
  removed**: `callbackExcludesNothing`, `isElementReadWithoutNothing` and
  `isCompiledIndex`. `assertCollectionOmissionSupported` is renamed
  `assertNoNothingElement`, and takes no `target` argument: it reads only static
  types. `withScalarFedLiteral` takes no kind argument (its `'finite'` kind gave
  the same code as `'scalar'`), and `scalarFedLiterals` is a `Set` of the marked
  literals.
- **Custom compile targets: `CompileTarget.gpuParameterFacts` is removed.** The
  shader targets no longer record facts about the parameters of a user function
  or the index of a loop, so nothing read the field.

### Behavior Changes

- **Compilation to JavaScript: a fold over elements whose shape the type does
  not settle declines.** A `Sum` or a `Product` of one collection, and a
  `Reduce` or a `Scan` by `Add` or `Multiply`, now declines with the code
  `unsettled-shape` when an element can be a number or a list: `Sum(L)` with
  `L: list<unknown>`, `L: list<real | list<real>>`,
  `L: list<broadcastable<real>>` or `L: collection<expression>`, and `Sum(g(x))`
  with `g: (real) -> unknown`. A source typed `any`, `unknown` or `value`
  declines too. The interpreter evaluates these folds. Declare the element type
  to compile them: with `L: list<real>` or `L: list<list<real>>`, `Sum(L)`
  compiles. A fold whose element type is settled tests no shape of an element at
  run time, nor the shape of a source that is an input, a list literal,
  element-wise arithmetic over one, `Map` over one, or an element of an input or
  a literal: with `L: list<tuple<real, real>>`, `Sum(L)` compiles to
  `(_.L).reduce((_a, _b) => _SYS.add(_a, _b), 0)`, where it tested each element
  and the source with `Array.isArray`. Its values do not change.

- **Compilation: `Max`, `Min` and the interval fold decline over a value that
  can be a number or a list, and three consumers of a list test no shape at run
  time.** On JavaScript, `Max` or `Min` of an operand whose type is a union of a
  number and a list, a `broadcastable<T>` or `unknown`
  (`Min(Distance(S, (1, 2)))` with `S: indexed_collection`, `Max(√x, f())` with
  a block-local `f`) now declines with the code `unsettled-shape`, alone or
  beside other operands. On `interval-js`, a `Sum`, `Product`, `Max` or `Min` of
  such a value (`Max(2b)` with `b: broadcastable<real>`, a `Which` with a list
  branch and a number branch) declines too. The interpreter evaluates these
  expressions. Declare the type of the value (`S: list<list<real>>`) to compile
  them. An input or a parameter declared with a union of a number and a list
  keeps its one test. Code that compiled before and still compiles tests no
  shape where the type settles it: the loop of an indexed `Sum` or `Product`
  whose term is a list (`Sum(L·i, i, 1, n)` with `L: list<real>`), `Max` or
  `Min` of one list operand (`Min(P·(1 − v) + Q·v)` with `P, Q: list<real>`),
  and the `interval-js` fold of an input typed as a list of numbers (`Sum(L)`).
  Their values do not change: a length mismatch still gives `NaN` on JavaScript
  and the absence marker on `interval-js`. A list value that is not an input, a
  list literal, element-wise arithmetic over one, `Map` over one, or an element
  of an input or a literal keeps its test, because an indexed `Sum` over a list
  of unknown length is the number `0` for an empty range
  (`Max(2·Sum(L·i, i, 1, n))` at `n = 0` is `0`). The term of an indexed `Sum`
  or `Product`, and a `PointList` component, whose type is a union of a number
  and a list keep their run-time test (`docs/COMPILATION-MODEL.md`, R3).

- **Compilation to GLSL and WGSL: a call is proven finite from the declarations
  and the expression only.** A call of `sin`, `cos`, `sign`, `min`, `max` or
  `clamp` uses the built-in when its argument is proven finite in f32 from the
  declared types and ranges of the inputs, the declared ranged result types of
  the user functions, the literals and the operators of the argument, and calls
  the NaN-safe helper (`_gpu_sin`, …) otherwise. The compiler no longer reads
  the body of a user function, the values that the calls of a function pass, or
  the bounds of a loop to prove it. These forms now call the helper where they
  called the built-in: an operand that reads a parameter of a user function,
  also when every call passes a finite value or the signature declares a range
  (`F(a, b) := sin(a) + cos(b) + min(a, b)` called as `F(x, y)` gives
  `_gpu_sin(a) + _gpu_cos(b) + _gpu_min(a, b)` in `_fn_F`); an operand that
  reads the index of a `Sum`, a `Product` or a loop that the shader does not
  unroll; a call of a user function whose result type has no declared range
  (`sin(f(x))` with `f(u) := cos(u)/2` gives `_gpu_sin(_fn_f(x))`); and a
  quotient by `cos(u)` with `u` in a bounded interval. The helper gives the same
  value as the built-in on a finite argument, so no compiled value changes; the
  helper costs a bit test and a selection per call. To get the built-in, declare
  the range of an input (`t: real<-5.5..5.5>`) or a result type with a range for
  the function: with `f: (real) -> real<-1..1>`, `sin(f(x))` gives
  `sin(_fn_f(x))`, and `sin(1000·f(x))` gives `sin(1000.0 * _fn_f(x))`. A result
  type with no range (`(real) -> real`) keeps the helper: the body is computed
  in f32 and can overflow. A body whose f32 value leaves its declared range
  gives a value outside its type, for which the compiled value is unspecified.
- **An assignment to a symbol with a declared type accepts a value whose type
  overlaps the declared type, and each read of the symbol tests the value.** A
  function call already accepts such an argument. Before, the type of the value
  had to match the declared type. With `E = real | signed_infinity | nan`, `a`
  declared `real` and `P` declared `tuple<E, E>`,
  `ce.assign("P", ce.parse("(-\\sqrt{1-a^2}, a)"))` threw "not compatible with
  the type", because the value is typed `tuple<complex, real>`. It is now
  accepted: `P` evaluates to `(-0.866…, 0.5)` when `a = 0.5`, and to an
  `incompatible-type` error when `a = 5`, where the first component is
  imaginary. This applies to `ce.assign()`, `Assign`, `ce.declare()` with a
  value, `Declare` and a typed Epsil `let`. These are still refused when
  assigned: a value whose type has no value in common with the declared type
  (`ce.declare("t", "gf8"); ce.assign("t", 2)`), and a value made only of
  literals and constants that is not of the declared type. Compiled code does
  not test the value: it reads the symbol as a value of its declared type, and a
  value outside that type gives an unspecified result. A compilation that reads
  such a symbol declines when the stored value can be complex (`r: real`
  assigned `z: complex`), so a valid input such as `z = 2 + 0i` gives the
  interpreter's value (Tycho row 483).
- **`Find` with no matching element gives the absent value of the element type,
  not `Nothing`.** `Find([1, 2, 3], x ↦ x > 5)` is `NaN`, typed `integer | nan`
  (it was `Nothing`), so `Coalesce(Find(xs, p), 0)` gives `0` and
  `Find(xs, p) + 1` is `NaN` (it was an `incompatible-type` error). Over a list
  of points the value is the point of `NaN` coordinates, and over strings or
  other elements it is `Missing`: `Find(["a"], x ↦ x = "b")` is `Missing`, typed
  `missing | string`. This is the value that a read out of range of the same
  list gives. Compiled JavaScript and Python give `NaN` for numbers and the
  `NaN` point for points (compiled JavaScript gave a scalar `NaN` for points).
- **A sequence search that finds nothing gives `Missing`, not `Nothing`.**
  `RangeOf([1, 2, 3], [9])` is `Missing` (it was `Nothing`), and `RangeOf` is
  typed `range | missing`. `Slice(xs, RangeOf(xs, needle))` is still absent when
  the needle does not occur: it is `Missing`, as every operator over `Missing`
  is, and `Coalesce(Slice(xs, RangeOf(xs, needle)), [])` gives `[]`. `Slice`
  gives `Missing` for a `Missing` operand in any position
  (`Slice(Missing, 2, 3)` was an `incompatible-type` error), and
  `Slice([1, 2, 3], Nothing)` is now an `incompatible-type` error (it was
  `Nothing`). Test a failed search with `IsMissing` or `Coalesce` (`??` in
  Epsil), not with a comparison to `Nothing`.
- **Compilation: a parameter default that names a constant declared by the host
  compiles.** With `ce.declare('W0', { isConstant: true, value: 5 })` and
  `f := (k = W0) ↦ k + 1`, the compiled `f()` is `f(5)` and gives 6, as the
  interpreter does. Before, the compilation declined on every target (#490).
  Compiled code fills the value of the constant, read where the function is
  declared, not its name, so a local of the same name or a `vars` entry where
  the call is made does not change it. The value must be a number, a string, a
  boolean, a list or tuple of such values, or `{}`; any other value still
  declines. A default that names an Epsil `const` still declines when the
  program is compiled before it runs: the constant has no value at compile time.
  To compile such a function, write the value as the default, or pass the
  argument.
- **Compilation: a value that can be `Nothing` declines with one diagnostic
  code, read from static types.** Compiled code has no representation of
  `Nothing` as a value. The symbol `Nothing` read as an operand declines with
  the code `possible-nothing`. A `Tuple` coordinate, an element of a collection
  operation (`Map`, `Filter`, `Sum`, …), the result of the callback of `Map`,
  `Tabulate` or `Scan`, the operand of `IsMissing`, `Coalesce` or
  `AssertPresent` and a dictionary value decline with the same code when their
  static type has an explicit `nothing` arm: `nothing`, `real | nothing`,
  `list<real | nothing>`. A type such as `any` or `unknown` has no such arm.
  Compiled code produces `Nothing` only from the symbol `Nothing` or from a
  statement read as a value, and both decline where they occur; a `Nothing` that
  the host supplies for a value typed `any` is outside its type. The compiler no
  longer analyzes the body of a callback, and some expressions over values typed
  `any` that declined now compile: with a local function `h := k ↦ k + 1`,
  `Map(h, 1..3)` gives `[2, 3, 4]`. Before, these declines had the generic code
  `compile-error`. A `Sum` or a `Product` of a collection, or a `Reduce` or a
  `Scan` by `Add` or `Multiply`, whose element type is `any` declines with the
  code `unsettled-shape`: such an element can be a number or a list, and
  compiled code does not test the shape of a value at run time. With
  `w: collection<any>`, `Sum(w)` declines; declare `w: collection<real>` to
  compile it.
- **Compilation to JavaScript: a condition that can be a value other than a
  boolean declines.** Compiled code no longer tests at run time that the
  condition of `If`, `Which` or `Boole` is a boolean. When the static type of
  the condition admits another value (`boolean | integer`, `unknown`), the
  compilation declines with the code `unsettled-shape`, where the compiled code
  threw at run time for such a value: with `c: boolean | integer`, `If(c, 1, 2)`
  and, with an untyped parameter `c`, `(c ↦ If(c, 1, 2))(b)` now decline. The
  interpreter evaluates them. To compile them, give the condition a boolean
  type. A condition that can be absent still reads as `false`.

- **Compilation: in the default `strict` mode, a value of type `number` must be
  real.** The compiled code reads a binding typed `number` (an input, a
  parameter, a `number` element or tuple component) as a real number, and a
  complex value there gives an unspecified result: with
  `L: list<tuple<number, real>>` at `[(1 + i, 2)]` and
  `hr = (p: tuple<real, real>) ↦ p[1] + p[2]`, `hr(L[1])` gives
  `"[object Object]2"`. This is the behavior since 0.178.0, now stated as a
  rule; no compiled value changes. To pass complex values, compile with
  `mode: 'complex'` (which gives `3 + i` here) or declare the binding `complex`.
- **A compiled element-wise selection declines for a branch that can be a point
  or a list of points.** With a host function `W` declared
  `(real) -> tuple<real, real> | list<tuple<real, real>>` and `F` a list of
  booleans, `If(F, W(t), (0, 0))` now uses the interpreter (diagnostic code
  `unsettled-shape`): the compiled JavaScript tested the value of `W(t)` at run
  time to lift a point whole or to index a list. Declare the result of `W` with
  one shape, or declare and compile one function for each shape. An input
  declared with this union (`P: tuple<real, real> | list<tuple<real, real>>`)
  still compiles as a branch: the compiled code tests it once where it is bound
  and has one body for each shape.

- **A compiled sum of a list of points and a value that can be a point or a list
  of points declines.** With `W` declared as above and
  `L: list<tuple<real, real>>`, `W(t) + L` now uses the interpreter (diagnostic
  code `unsettled-shape`), where the compiled JavaScript tested the value of
  `W(t)` at run time. Declare the result of `W` with one shape. An input
  declared with the union (`P + L`) still compiles.

- **An input declared with a union of shapes declines when the code for one
  shape declines.** The compiled code has one body for each shape of such an
  input. When one body could not be compiled, the code was one body for all the
  shapes, which tested the shape of the input at run time. It now declines with
  the reason of that body: with `U: real | list<real>`, `Sum(U)` uses the
  interpreter (`Sum` of a number has no indexing set), and so does
  `If(x > 0, U, x)` (in the body for `list<real>`, the branches are a list and a
  number). Declare the input with the one shape that you pass, or compile one
  function for each shape.

- **A compiled sum of a point and a value that can be a point or another shape
  declines, and so does its absolute value.** With `P` a list of points,
  `Sum(P)` has the type `integer | tuple<real, real>` (the sum of an empty list
  is `0`), and `Sum(P) + (1, 1)` now uses the interpreter (diagnostic code
  `unsettled-shape`), where the compiled JavaScript tested the value of `Sum(P)`
  at run time. The same applies to a function whose parameter is declared
  `list<tuple<number, number>> | tuple<number, number>` when the code has one
  body for both shapes: `|P − (4, 0) − (1, 2)|` declines there. The absolute
  value of a value of type `list<number> | tuple<number, number>` declines too,
  on every target: the compiled JavaScript gave `[3, 4]` for the point
  `(3, -4)`, where the interpreter gives `5`. Declare one shape, or compile one
  function for each shape; a call whose argument has one shape still compiles
  (`g((x, y))`, `g(Q)` with `Q` a list of points and `g(P) = |P − (4, 0)|`).

- **A compiled `PointList` declines for a coordinate of a value that can be a
  point or a list of points.** With `p` undeclared, `PointList(p.y, p.x)` infers
  the type `collection<any> | tuple` for `p`, and now uses the interpreter
  (diagnostic code `unsettled-shape`), where the compiled JavaScript tested the
  value of `p` at run time. Declare `p`:
  `ce.declare("p", "tuple<real, real> | list<tuple<real, real>>")` compiles one
  body for each shape. A function literal applied where it is written
  (`(v ↦ PointList(v.y, v.x))(P)`) still compiles: its parameter has the type of
  the argument.

- **Compiled code gives no special value for a condition or a comparison over an
  absent value.** A compiled `If` or `Which` whose condition is absent takes its
  next branch, where it gave `NaN`: `If(At(B, 9), 1, 2)`, with `B` a list of 2
  booleans, is `2`. A compiled `Equal` over collections gives booleans:
  `Equal([1, Missing], 1)` was `[true, NaN]` and is now `[true, false]`. These
  values are unspecified by the caveats of compiled code
  (`docs/COMPILATION-MODEL.md`, "Caveats of compiled code"). These expressions
  now compile, where they used the interpreter before: `Any` and `All` over
  elements that may be absent; `IndexOf`, `Contains` and `Element` with a
  searched value that may be absent; a chained `Equal` with an absent operand
  before an impure one (`Equal(x, Which(t > 0, 1), Random())`); and, on Python,
  `Dot` and `Cross` with an operand that may be absent.

### Resolved Issues

- **A compiled `Sum`, `Product`, `Max` or `Min` of a list computed by an empty
  indexed `Sum` gives the value of the interpreter.** An indexed `Sum` or
  `Product` over a list of unknown length is the number `0` or `1` for an empty
  range, so a value typed as a list can be a number. With `L: list<real>` and
  `n: integer`, at `n = 0`, the compiled JavaScript of `Sum(Sum(L·i, i, 1, n))`,
  `Sum(2·Sum(L·i, i, 1, n))` and `Max(Sum(L·i, i, 1, n))` threw
  `.reduce is not a function`, and `Max(2·Sum(L·i, i, 1, n), 1)` threw
  `is not iterable`. They now give `0`, `0`, `0` and `1`, as `evaluate()` does.
  The fold and the extremum of a list that can be a number at run time test its
  shape when they run, and a number is the fold or the extremum of itself. No
  test is added for an input, a declared parameter or `Declare` local, a list
  literal, arithmetic over one, a `Take` or `TakeWhile`, or an `If` or `Which`
  of such values. The code for an input (`Sum(L)`, `Max(L, 1)`) does not change.
- **An element read of a symbol that holds a list of numbers is a number in
  compiled JavaScript, whatever the declared type of the symbol.** With `C`
  declared as the bare type `list` and holding `[c_1, …, c_10]` over symbols of
  type `real`, the term of `\sum_{i=0}^{\mathrm{Length}(C)-1} C[i+1] x^i` is
  typed `any`, and the loop tested the shape of every term at run time
  (`Array.isArray` and `_SYS.bcast`). The compiled code folds the held list into
  a constant, so the read is a number, and the loop adds numbers with no test.
  No value changes. The type of the expression in the interpreter does not
  change.
- **A list of points plus a point keeps the signed infinities in the component
  types.** With `E = real | signed_infinity | nan`, `L: list<tuple<E, E>>` and
  `P: tuple<E, E>`, the sums `L + (1, 1)` and `L + P` were typed
  `list<tuple<infinity | nan | real, …>>`. The type `infinity` admits the
  complex infinity, which no such sum has, so a symbol declared
  `list<tuple<E, E>>` refused the result. The sum is now typed
  `list<tuple<E, E>>`, as the sum of two points has been since 0.178.0 (Tycho
  row 483).
- **The accumulator of a fold inside a function literal is typed from the seed
  when the callback body is a block**
  ([#506](https://github.com/cortex-js/compute-engine/issues/506), reported by
  [enumeratio](https://github.com/enumeratio)).
  `Function(Block(Reduce(1..3, (f, v) ↦ Block(If(f = 0 ∧ us[v] = 1, v, f)), 0)), us: list<integer>)`
  was typed `(us: list<integer>) -> unknown`, and is now typed
  `(us: list<integer>) -> number`, as it was without the `Block` wrappers. The
  canonical MathJSON of a function literal has these wrappers, and the compiler
  rebuilds a fold callback whose accumulator is a list from this MathJSON. So a
  fold seeded with a list literal, whose callback holds a second fold that reads
  the accumulator, declined with "does not settle one shape" since 0.176.0. It
  compiles again: in the example of the issue, `run({ n: 2 })` gives
  `[0, 0, 0]`, as `evaluate()` does. The cause: while one expression is
  canonicalized, each raw node is canonicalized once per lexical scope, and the
  canonical form is used again. The fold refinement canonicalizes the same raw
  callback once for each accumulator type that it tries, so every try after the
  first got the body of the first try, where the accumulator is `unknown`. The
  body of a function literal now has its own memo.
- **`serializeEpsil` takes linear time in the indentation of its output**
  ([#508](https://github.com/cortex-js/compute-engine/issues/508), contributed
  by [enumeratio](https://github.com/enumeratio)). The formatter trimmed the
  padding at the end of each stacked fragment with a `/[…]+$/` regex, which is
  quadratic in the length of each run of indentation inside the fragment. A
  chain of 160 function literals applied to arguments, indented up to column
  2242, took 4.2 s and now takes 0.56 s; the output is unchanged.
- **A partial `cost` option of `serializeEpsil` overrides only the costs it
  names** ([#508](https://github.com/cortex-js/compute-engine/issues/508),
  contributed by [enumeratio](https://github.com/enumeratio)).
  `{ cost: { linebreak: 3 } }` replaced every cost, left the others `undefined`,
  and threw `TypeError: Cannot read properties of undefined (reading 'cost')` on
  any output that needs a layout choice.
- **A function literal that calls itself no longer reads a value computed while
  its parameter had no value**
  ([#507](https://github.com/cortex-js/compute-engine/issues/507), reported by
  [enumeratio](https://github.com/enumeratio)). A regression in 0.176.0. The
  type of a call such as `self(self, Take(f, Len(f) - 1))` asks whether the
  `Take` is finite, which evaluates its count with `f` unbound. With a pure host
  `Len` that gives 0 for a symbol, the count was `-1`, and the memo of shared
  nodes gave that `-1` to the call that followed: counting the elements of
  `[7, 8, 9, 10]` gave 3. The memo of shared nodes and the lazy value memo are
  now neither read nor written inside a type computation during a call.
- **`Trace` of a matrix of free symbols no longer changes the type of the
  symbols** ([#505](https://github.com/cortex-js/compute-engine/issues/505),
  reported by [enumeratio](https://github.com/enumeratio)). A regression in
  0.176.0. Boxing `Trace([[a, b], [c, d]])` gave `a`, `b`, `c` and `d` the type
  `number | tensor`, the element type of the parameter `tensor`. A cell of that
  type can be a list, so `[[a, b], [c, d]]` was then typed
  `list<list<number | tensor>>`, not `matrix<2x2>`, for the rest of the session,
  and `Trace`, `Determinant` and `Inverse` of it stayed unevaluated. Now a
  parameter that is a tensor of unknown rank gives no type to the cells of a
  list literal, as the parameter `matrix | vector` of `MatrixMultiply` does.
  `Trace([[a, b], [c, d]])` is `a + d`, and `Determinant` and `Inverse` evaluate
  after it in the same engine.

## 0.178.0 _2026-11-03_

This is the language release. It narrows the language that compiled code
accepts, and it changes some results of the interpreter, so it has breaking
changes: a restriction `e\{c\}` parses to `If(c, e)` and the `When` operator is
gone; a comparison is `True` or `False`; `Missing` is a result only;
`Indeterminate` is `NaN`; a local of a block is declared with a value, and an
assignment is a statement; compiled code calls only a function it can see, and a
parameter default fills only an argument the call leaves out; the compile mode
`'auto'` is gone and `'strict'` is the default. Each entry under "Behavior
Changes" gives the form that no longer works and what replaces it. A removed
form in compiled code is a decline or a static error, not a different value;
where the interpreter's result changed, the entry gives the old and the new
value. Hosts that build expressions for `compile()` should read these entries
before they update.

### New Features

- **Finite-group maps, quotients, matrix groups and polycyclic coordinates.**
  The optional group-theory library (`@cortex-js/compute-engine/group-theory`)
  adds checked homomorphisms, quotient projections, structural queries on finite
  groups (series, Sylow and Hall subgroups, Fitting and Frattini subgroups,
  socle, automorphisms), exact matrix groups over the rationals and over prime
  fields, and finite polycyclic sequences. A collected polycyclic presentation
  (`PcGroup`) supports exact arithmetic without listing the elements of the
  group, for example in a group of order 2^36. The general finite model holds at
  most 256 elements, and every limit gives an `Error` expression, never a
  partial answer. (Contributed by [KingArth0r](https://github.com/KingArth0r) in
  #484.)

### Behavior Changes

- **A local of a block is declared with a value, and an assignment is a
  statement.** A declaration gives its name a value, and an assignment is a
  statement of a block, never an operand, so a local always has a value when it
  is read. The interpreter no longer gives the `read-before-declaration` error
  value at run time, and no longer keeps a read of a local with no value as a
  symbol: each form below is a static error in place in the canonical form,
  `epsil check` reports it before the program runs, and a compilation declines
  it.
  - `Declare(x, "integer")` then `Assign(x, 5)` is the error
    `declaration-without-value`: write `Declare(x, "integer", 5)`. In Epsil,
    `let x: integer` is the same error: write `let x: integer = 0`. A function
    type with no value stays valid when a `function` statement of the same name
    is in the same block: it gives the signature of that function
    (`let f: (integer) -> integer; function f(x) { x + 1 }`). In LaTeX,
    `\operatorname{let} k \coloneq v` is now `Declare(k, "unknown", v)`.
  - `f(a := 2)` is the error `assignment-in-operand`: write `a := 2; f(a)`.
  - `a := b := v` is the syntax error `chained-assignment`, in Epsil and in
    LaTeX: write two statements, `b := v; a := b`.
  - A first assignment of a name in a branch of an `if`, in a case of a `match`
    or in a loop body is the error `first-assignment-in-branch`: declare the
    name with a value before the branch (`t = 0; if c { t = 1 }`). This applies
    also at the top level of an Epsil program and to an `If`, `Which`, `Loop` or
    `Match` boxed outside a block: `if c { a = 1 }; a` was valid and gave the
    symbol `a`. An assignment in a branch to a name that the session already
    declares writes that name, as before.
  - A use of a local before the statement that declares it is the static error
    `read-before-declaration`.
  - A reassignment with a value of another type
    (`Block(Assign(a, 1), Assign(a, "x"), a)`) is the error
    `assignment-type-mismatch`. The type of a local is its declared type, or the
    type of its first value widened to `number`, `string` or `boolean`.
  - A block whose last statement is an assignment or a declaration has the value
    `Nothing` (`Block(Assign(b, 2))` was `2`): end the block with the name.
  - A function whose declared result type does not admit `nothing`, and whose
    body ends in an assignment or a declaration
    (`function f() -> integer { x = 2 }`), gives the `incompatible-type` error
    when it is called, as a body with a value of another type does. It gave
    `Nothing`.

  In compiled code (every target):
  - A write to a symbol that the compiled code does not declare (a symbol
    declared in the engine, an input, a `vars` name) declines. It wrote the vars
    object, or a local copy of the input. Return the value and let the host
    assign it, or declare a local with a value and read the local.
  - A block with a statement other than a declaration with a value (an
    assignment, a loop) declines as an operand (`1 + Block(Assign(b, x), 2b)`,
    the value of an assignment). It compiles as a statement, as the body of a
    function, of the compiled expression or of a binder such as `Sum`. Assign
    the value to a local declared before the block, and read the local. A block
    whose statements before the last are only declarations with a value (a
    `where` clause, `1 + (a - floor(a) where a := 3.7x)`) is a value, and
    compiles as an operand.
  - A block that ends in an assignment or a declaration declines where its value
    is used: its value is `Nothing`. The JavaScript code of `[1, Block(b := 2)]`
    gave `[1, 2]`. End the block with the name.
  - A loop whose value is used declines, as before (`y := Loop(…)`): assign the
    result to a local declared before the loop, and end the block with the
    local.

- **Compiled code calls only a function it can see, and a parameter default
  fills only an argument that the call leaves out.** A compiled call compiles
  when the callee is a defined function, a declared function with a value, or a
  function literal at the call site; the callbacks of `Map`, `Filter`, `Sort`,
  `Fold` and `Reduce` compile when they are such a callee, and
  `Apply(Derivative(f, n), x)` with `f` defined compiles as before. The
  interpreter keeps first-class functions: lambdas, closures, currying, partial
  application and function values. Breaking changes, each with its replacement:
  - In compiled code, a curried call or a partial application
    (`Apply(Apply(f, 1), u)`, `Apply(f, 1)`), a function passed as an argument
    or through a parameter of function type (`h = (g: function) ↦ g(1)`,
    `h(x ↦ x + u)`), a function returned from a call (`Apply(mk(1), u)`) and a
    function stored in a local that is assigned more than once decline: the
    compilation falls back to the interpreter. Write the call with every
    argument (`f(1, u)`), call the function directly in the body, or define one
    function per case.
  - A default no longer fills a supplied absent value, in the interpreter and in
    compiled code: this reverses the change of 0.177.0. With
    `g = (k: real = 2) ↦ k + 1`, `g()` is still `3` (the default is filled at
    canonicalization, and every target, GLSL, WGSL and `interval-js` included,
    completes the call when it compiles it), but `g(Missing)` and `g(First([]))`
    pass `Missing` to the body and give `Missing`, and `g(0/0)` gives `NaN`. In
    compiled code, `g(At(L, 100))` with `L: list<real>` passes `NaN`, a value
    outside `real`, so its result is not specified. To replace an absent
    argument, write it in the call: `g(Coalesce(At(L, 100), 2))` is `3`. A
    default parameter is no longer one of the operators that read an absent
    value; `interval-js` no longer declines a call that supplies a number at a
    defaulted parameter.
  - A default is a constant: a number, a string, a boolean, `[]`, `{}`, a
    library constant (`over: set = Integers`, `k: real = Pi`), a symbol declared
    with `isConstant: true` (`weights: list<number> = DefaultWeights`), a
    `const` of an Epsil program, or a symbol that the parameter type lists
    (`mode: symbol<Auto> | symbol<Manual> = Auto`). The default is bound where
    the function is declared: a local of the same name at the call site does not
    change it. A default that names a variable (`(k = n) ↦ k` with `n` declared
    without `isConstant`, or assigned) is the static error
    `expected-a-literal-default` in a function literal, and makes `ce.declare()`
    throw for a signature (in 0.176.0 and 0.177.0 the symbol was read at the
    call site): declare the symbol constant, write the value, or pass the
    argument. In compiled code, a default that is a library constant or a symbol
    that the type lists is filled; a default that names a constant declared by
    the host or by the program declines (write the value as the default, or pass
    the argument).
  - A function literal with a rest parameter has no default: a default on such a
    literal is a static error. Pass the argument.
  - In the JavaScript `bigint` mode, a supplied `NaN` or `null` at a parameter
    with a default throws the entry `TypeError` of a supplied value that is not
    an integer; only a left-out argument (`undefined`) takes the default.

- **The compile mode `'auto'` is removed; `'strict'` is the default of every
  target.** The lane of a compiled value follows its static type: it is complex
  for a declared `complex` input or parameter, a complex literal or an operation
  whose result type is complex, and real otherwise. Breaking changes, each with
  its replacement:
  - `compile(expr, { mode: 'auto' })` declines with
    `diagnostic.code === 'unsupported-mode'` on every target. Use
    `mode: 'complex'` where complex values are wanted: an unknown-sign radical
    or logarithm is computed on the complex lane, and a kernel whose value is
    real still returns a JavaScript number (`Sqrt(x)^2` at `x = -4` is `-4`). A
    value that is not a number can come back in its complex form (`0^x` at
    `x = -1` is `{re: Infinity, im: Infinity}`, the interpreter's
    `ComplexInfinity`, where `'auto'` gave `Infinity`).
  - The default mode of the `javascript` and `python` targets is `'strict'` (it
    was `'auto'`). On the real lane an operation whose exact value is complex
    gives `NaN` on every target, as on the shader targets: with `x: real`,
    `compile(Sqrt(x))` at `x = -4` gives `NaN` (it gave `{re: 0, im: 2}`); with
    `mode: 'complex'` it gives `{re: 0, im: 2}`. A complex value that reaches a
    binding compiled real declines with `'lane-mismatch'`, and the compilation
    is no longer redone in complex mode. `x + 2i` with `x: real` is complex in
    every mode, as before.
  - The compile result has no `promoted` and no `escalation` field.
    `result.mode` is the requested mode, `'strict'` when none is requested. A
    host that kept a promoted kernel off a shader target reads
    `result.mode === 'complex'`, or compiles `'strict'` for the shader.
  - The `reset()` hook of a custom compile target is no longer called, and
    `supportedModes` no longer accepts `'auto'`.
  - An escalation of a compilation to `mode: 'bigint'` when a run-time value
    passes `2^53` will not be added: `'bigint'` is used only when it is
    requested.
  - The engine's own compilations (the `Map` drain, `Reduce`, the stochastic
    equality probes, the numeric integration and series kernels) compile in
    `'strict'`, and their values do not change: the `Map` drain and `Reduce`
    compute a `NaN` element again with the interpreter, an integrand is computed
    in `'complex'` at a `NaN` sample, and the stochastic equality probes use the
    compiled code only for an expression of heads that give `NaN` for a `NaN`
    operand (arithmetic, powers, roots, logarithms, the trigonometric and
    hyperbolic functions, rounding, `Max`, `Min`); any other expression is
    sampled with the interpreter.
  - In `mode: 'complex'`, five cases where the compiled code mixed a complex
    object with real arithmetic, and gave `NaN` or a string where the
    interpreter gives a real number, are fixed: a power of a call whose value is
    complex (`f(x)^2` with `f: (real) -> unknown`); an element-wise operation
    over a list (`r·10^i` with `i: list<integer>`, `Sqrt(L^2)` with
    `L: list<real>`); `Sqrt`, `Ln` and `Log` of a value whose type admits a
    complex value but which is not negative (`\sqrt{x^2+y^2}` with
    `x, y: real | signed_infinity`); a `Product` over a shared `Map`
    (`Sum(Map(f, P)) + Product(Map(f, P))`); and a fold over an empty list or
    one element (`Product(Map(Sqrt, P)) + 1` with `P = []` is `2`). The negation
    of a real value keeps a `+0` imaginary part, so `Ln(-x)` at `x = 2` is
    `ln 2 + iπ`, as in the interpreter (it was `ln 2 − iπ`).
  - In `mode: 'complex'`, a call of a user function no longer sends a complex
    object to a parameter that the definition reads as a real number. With
    `u: real`, `s(x) := x - \lfloor x \rfloor` and `g := t ↦ s(t) + 1`, `g(u)`
    at `u = 0.25` gave the string `"[object Object]NaN1"`; it is now `1.25`, as
    in the interpreter. The call passes the real part of a real argument, and
    `NaN` for an argument with an imaginary part (`g(w)` with `w: complex` at
    `1.5 + i`; the interpreter gives an `incompatible-type` error). See
    `docs/COMPILATION-MODEL.md`, "Compile modes".

- **One static error, one dynamic non-value per domain.** An `Error` is the one
  static failure, `NaN` is the one numeric non-value, and `Missing` is the
  absent datum of the other domains. `Indeterminate` is no longer a value: the
  exact route gives `NaN` for a form with no value, as `.N()` and every compiled
  target already did. `Nothing` is the value of an empty block or of a statement
  with no value, and it is kept as an element wherever it appears. Compiled code
  does not change. Breaking changes, each with its replacement:
  - `ce.Indeterminate`, `INDETERMINATE_VALUE` and `isIndeterminateValue` are
    removed. Use `ce.NaN`.
  - `Expression.isIndeterminate` is removed. Use `isNaN`.
  - The `isExact` hook of an `ArithmeticDefinition` (a value kind) is
    deprecated: the engine no longer reads it.
  - A form with no value gives `NaN` on the exact route (it gave
    `Indeterminate`): `0/0`, `∞ − ∞`, `0^0`, `Mod(5, 0)` and `Variance([3])` are
    `NaN`, and an operator over `NaN` gives `NaN`: `Mean([1, 0/0])` and
    `Max(1, 0/0)` are `NaN` (they were the exact `Indeterminate`). `NaN` keeps
    its IEEE behavior, `IsMissing(0/0)` is still `True` and `Coalesce(0/0, 5)`
    is still `5`. `Indeterminate` is now an input spelling of `NaN`: the
    MathJSON symbol `"Indeterminate"`, `\operatorname{Indeterminate}` and
    `\mathrm{Indeterminate}`, the Epsil name, `NumberFrom("Indeterminate")` and
    the word in a type string read as `NaN`. The serializer writes `NaN`
    (`\operatorname{NaN}`), and `String(0/0)` is `"NaN"`.
  - A `Nothing` element is no longer removed from a list, an argument list or a
    dictionary: `[1, Nothing]` has length 2, `f(1, Nothing)` has two arguments,
    and `{a: Nothing}` keeps the key `a`. An operator that needs a value gives
    an `incompatible-type` error for it: `Add(1, Nothing)` is an error (it was
    `1`). Write the list without the element, or use `Filter` with an explicit
    predicate: with `d: list<integer | nothing>` at `[1, Nothing, 3]`,
    `Filter(d, y ↦ y ≠ Nothing)` is `[1, 3]`.
  - `Map` calls its callback on a `Nothing` element and keeps a `Nothing`
    result: `ListFrom(Map(x ↦ If(x > 1, x, Nothing), [1, 2]))` is `[Nothing, 2]`
    (it was `[2]`). Use `Filter` after `Map`:
    `Filter(Map(x ↦ If(x > 1, x, Nothing), [1, 2, 3]), y ↦ y ≠ Nothing)` is
    `[2, 3]`.
  - `Filter` no longer drops a `Nothing` element without calling its predicate.
    Use a predicate that tests for it, as above.
  - `Sum`, `Product`, `Min`, `Max`, `Mean`, the statistics and the covariance
    family no longer skip a `Nothing` element: `Sum([1, Nothing])` and
    `Mean([1, Nothing, 3])` are `incompatible-type` errors (they were `1` and
    `2`), and the error outranks `NaN`: `Max([NaN, Nothing])` is an error.
    Filter the data first, as above.
  - An empty slot in LaTeX is a parse error: `(3,,4)`, `[3,,4]` and `f(3,,4)`
    hold `["Error", "'missing'"]` in the slot (the slot was `Nothing`, which was
    removed). Write every slot. A trailing comma, `[1, 2,]`, is still dropped.
    In `cases`, an empty row and a trailing comma in a condition cell give
    `Which(c, v)`, the parse of a piecewise with no default: `\{x>0: x,\}` is
    `Which(0 < x, x)`. `\partial f` is `["PartialDerivative", "f"]`.
  - An empty `Sequence()` stays `Sequence()` in canonical form and prints as
    `Sequence()` (it printed as `Nothing`). A list or an argument list still
    splices it out: `[1, Sequence(), 2]` is `[1, 2]`. In Epsil, the rest capture
    `t` of `[h, ...t]` over a list of one element is the empty `Sequence`, so
    `[t]` is `[]`. See `docs/ERROR-MODEL.md`, "One static error, one dynamic
    non-value per domain".

- **`Missing` is a result only.** `Missing` is produced by a selection with no
  match, an accessor out of range and the written symbol, and it can no longer
  be declared. Breaking changes, each with its replacement:
  - A declared type that names `missing`, at any depth, is an error:
    `ce.declare("w", "real | missing")` and
    `ce.declare("f", "(real | missing) -> real")` throw, an operator definition
    whose signature has such a parameter throws, a parameter annotation of a
    function literal (`["Typed", "x", "'real | missing'"]`) or a signature
    string is an `invalid-type-annotation` error, a `Declare` statement is an
    `invalid-type-declaration` error, and Epsil reports a
    `type-annotation-error` (`let x: real | missing = 1`). Declare the type of
    the present value, and read an absent value with `IsMissing` or `Coalesce`
    (`??`). The result type of a signature may still name `missing`.
  - `"Undefined"` is no longer an absent value: it is an ordinary symbol with no
    value (`IsMissing(Undefined)` is `False`, `Undefined + 1` stays
    `Undefined + 1`). Use `"Missing"`. The engine writes `Missing` where it
    wrote `Undefined` (an operand that is not given when an expression is
    serialized, a `dynamic` value with no result).
  - An operator over `Missing` gives `Missing` (it gave `NaN` in a numeric
    domain): `Missing + 2`, `Sin(Missing)`, `1 / Missing`, `Max(1, Missing)`,
    `Sum([1, Missing])`, `Mean([1, Missing])`, `Norm((1, Missing))` and
    `ce.box("Missing").add(1)` are `Missing`, and `[1, Missing] + 1` is
    `[2, Missing]`. `Missing + 2` is typed `missing`. An aggregate over `NaN` or
    over no data is still `NaN`. Read the absence with `IsMissing` or `Coalesce`
    before computing.
  - `At`, `First` and `Last` over a list of points, out of range, give a point
    whose coordinates are all `NaN` (they gave `Missing`):
    `At([(1, 2), (3, 4)], 5)` is `(NaN, NaN)`, in the interpreter and in
    compiled JavaScript and Python. Over numbers the value is `NaN`, and over
    other values `Missing`, as before.
  - A false restriction of a point gives a point whose coordinates are all `NaN`
    (it gave `Missing`, and `undefined` in compiled JavaScript): `If(c, (1, 2))`
    with `c` false is `(NaN, NaN)`, in the interpreter and in compiled
    JavaScript and Python, so `Sin(If(c, (0, 1)))` is `(NaN, NaN)` and
    `Norm(If(c, (3, 4)))` is `NaN`. `First` of a false restricted list of points
    is `(NaN, NaN)` too, while the restricted list itself stays `Missing`.
    `IsMissing` and `Coalesce` read the `NaN` point as absent, as before.
  - Compiled code tests every point for absence at a parameter default and at
    `AssertPresent`, also a point typed `tuple<real, real>`: a read out of range
    gives the `NaN` point whatever the type of the point says.
    `AssertPresent(At(qs, 9))` with `qs: list<tuple<real, real>>` now raises the
    `expected-present` error in compiled JavaScript, as in the interpreter (it
    gave `[NaN, NaN]`).
  - The result type of an accessor has no marker arm: with `ss: list<string>`,
    `At(ss, i)` is typed `string` (it was `string | missing`), and with
    `ys: list<real>`, `At(ys, i)` is typed `real` (it was `real | nan`). The
    value out of range is still the marker. A read whose position is proved not
    to exist keeps the marker type (`At([1, 2], 5)` is typed `nan`).
  - The signature of `Append` is `(collection<any>, any+) -> collection` (it was
    `(collection<any>, (value | missing)+) -> collection`): an appended
    `Missing` is still kept as a cell (`Append([1], Missing)` is
    `[1, Missing]`).
  - A symbol whose value holds `Missing` compiles under its declared type. The
    declaration cannot name `missing`, so the compiler removes the `missing`
    parts of the value's type before it compares it with the declared type, as
    an assignment does. With `cd: list<color>` at `[Missing, Rgb(0, 1, 0)]` (a
    selection with no match in the first cell), `AsOklab(cd)` failed to compile
    ("its value has the type `list<color | missing>`, which is not the type
    `list<color>`") and now compiles to JavaScript: the second cell is the
    interpreter's Oklab color, and the first cell is the `NaN` color (where the
    interpreter gives an `incompatible-type` error). With `ss: list<string>` at
    `[Missing, "b"]`, `At(ss, 2)` compiles to `"b"` and `At(ss, 1)` to
    `undefined`. A function literal that reads such a symbol gets the same
    reading in the interpreter: `((x) ↦ At(ss, 2))(1)` is `"b"` (it was an
    `incompatible-type` error). A value that is wrong where it is present
    (`[5, Missing]` for `ss`) is still refused, in both. (CE-791.) See
    `docs/ERROR-MODEL.md`, "`Missing` is a result only".
- **A comparison is two-valued: `True` or `False`.** An operand that does not
  decide a comparison makes it `False` (`NotEqual`: `True`, since `≠` is
  `Not(=)`): `NaN`, a pole, a value with no order, and now also an absent value
  (`Missing`, `Undefined`). The connectives and the quantifiers read an absent
  value as `False`, and so does the condition of an `If` or a `Which`: the
  branch takes its next arm, as in Desmos, where `\{u<1:5,7\}` is 7 with `u`
  undefined and `\{L<2:5,7\}` with `L=[1,0/0,3]` is `[5,7,7]` (measured by Tycho
  on 2026-11-02). This extends the rule of 2026-10-20 for a `NaN` operand (Tycho
  rows 411 and 413) to `Missing`, to the connectives and to the conditions.
  Breaking changes: `Missing > 0` is `False` (it was `Missing`);
  `Not(Missing > 0)` and `Not(Missing)` are `True` (they were `Missing`);
  `And(Missing, True)` is `False`; `If(Missing, 1, 2)` is `2` and
  `If(Missing, 1)` is `NaN`: the absent-condition error is gone;
  `0 < Missing < 1` is `False`; `Equal([1, Missing], [1, Missing])` is `False`
  and `Equal([1, Missing], 1)` is `[True, False]`;
  `Any([1, Missing], x ↦ x > 2)` is `False`. A boolean predicate of the
  collection and set libraries over an absent operand is `False` too (it was
  `Missing`): `Any(Missing, p)`, `All(Missing, p)`, `Element(2, Missing)`,
  `Contains(Missing, 3)`, `IsEmpty(Missing)`, `StartsWith`, `EndsWith`,
  `ContainsSequence`, `Subset` and its relatives; the negated forms
  `NotElement`, `NotSubset`, `NotSuperset` and `NotSupersetEqual` are `True`. So
  a predicate over a restricted collection, `Element(2, If(c, L))`, gives the
  same value when it is evaluated fresh and when it is evaluated again from its
  held form. The number-theory predicates (`IsPrime(Missing)`) are still
  `Missing`. The type of a comparison, a connective or such a predicate has no
  `missing` arm: with `L: list<integer> | missing`, `L < 3` is typed
  `boolean | list<boolean>` (it was `list<boolean> | missing`). A selection
  whose condition is a list of booleans is never absent as a whole, so a
  comparison over it is a list of its length: with `q: list<real^4>`,
  `Which(q < 0.1, 2, True, 1) < 2` is typed `list<boolean^4>` (it was
  `boolean | list<boolean^4>`), and a selection over that comparison has one
  shape and compiles. The corpus row art/njncrg9fkv declined on JavaScript and
  now gives the interpreter's four points. No interpreter value changes.
  (CE-792.) Under a list of conditions, a relation position that is not selected
  is `False` (it was `Missing`), and a colour position is `Rgb(NaN, NaN, NaN)`,
  which a plotter reads as "no colour here" (Tycho item 189). A restriction of a
  relation by a scalar condition is `False` where the condition is false, so the
  condition `If(c_2 < 1, 0 < If(c_1 < 1, 1))` of the corpus row
  neyret/xhlkk7k9aq gives the interpreter's value in compiled code. A scalar
  `Which` with no match is still `Missing`. In compiled code a value computed
  from an absent value is still not specified. See `docs/ERROR-MODEL.md`, "A
  comparison is two-valued".
- **A restriction `e\{c\}` covers its whole group and parses to `If(c, e)`.**
  The parser no longer produces `When`. The restriction applies to the whole of
  the smallest group that holds it: the statement (the relation included), one
  side of `\to`, the body of `for` or `where`, one comma item, the content of a
  delimiter or of a LaTeX argument, the body of a big operator, or one operand
  of a logical connective (`\land`, `\lor`, the operand of `\neg`). A
  restriction binds tighter than a connective and looser than a relation:
  `x>0\{x<1\}\lor x>2\{x<3\}` is `Or(If(x<1, x>0), If(x<3, x>2))`. In 0.177.0 it
  applied to the factor just before it. Examples from Tycho's two Desmos corpora
  (rows out of 8,231, of which 761 hold a restriction,
  `docs/plans/2026-11-02-restriction-binding.md`): `y=0\{x\le0\}` is
  `If(x\le0, Equal(y, 0))`, where it was `Equal(y, When(0, x\le0))` (133 rows of
  this shape); `x^2+y^2<9\{c\}` is `If(c, Less(…, 9))` (111 rows);
  `H(x)=3x^2-2x^3\{c\}` is `If(c, Equal(H(x), 3x^2-2x^3))`, where only `2x^3`
  was restricted (34 rows); `-a\{c\}` is `If(c, -a)` (25 rows); `(1,2)\{c\}` is
  `If(c, Tuple(1, 2))` (79 rows). A restriction inside a group stays in it:
  `x^{3.1\{c\}}` is `Power(x, If(c, 3.1))` (3 rows), `(a\{c\}, b)` is
  `Tuple(If(c, a), b)` (15 rows), `\sum_{n=1}^{N} a_n\{c\}` is
  `Sum(If(c, a_n), …)` (6 rows). `a\{\}` is still a parse error. A false
  single-branch `If(c, e)` with a scalar condition gives the value that
  `When(e, c)` gives: `NaN` for a number, `Missing` otherwise (in 0.177.0 every
  false single-branch `If` gave `Missing`). The type of a single-branch
  `If(c, e)` is the type of `e`, with no `nan` or `missing` arm: the type of
  `If(c, 1)` is `integer`, where it was `integer | missing`, and a symbol
  declared `number` accepts the value `If(0 < t, 3)`. Compiled code gives the
  same values as before. `x \coloneq 1\{c\}` is `Assign(x, If(c, 1))`: the
  restriction is in the value.
- **Stacked restrictions in one group merge.** `a\{c_1\}\{c_2\}` is
  `If(And(c_1, c_2), a)` in written order, up to 4 deep (76 corpus rows), and
  `a\{c_1\}+b\{c_2\}` is `If(And(c_1, c_2), a+b)`. A restriction of a
  single-branch piecewise merges too: `\{c_1: a\}\{c_2\}` is
  `If(And(c_1, c_2), a)`; `\{c_1: a, b\}\{c_2\}` is
  `If(c_2, Which(c_1, a, True, b))` (14 rows). A comma group in the braces is
  still `Or` (7 rows). The condition before a piecewise `:` and the arm after it
  are each a group of their own, and a condition group accepts a condition that
  has its own restriction: `\{x>0\{y<1\}: a, b\}` is
  `Which(If(y<1, x>0), a, True, b)`, where it was a `Set` (Tycho row
  neyret/xhlkk7k9aq #1752170633), and `|y+3|\le.2\{x>0\{x<1\}, x>2\{x<3\}\}` is
  `If(Or(If(x<1, x>0), If(x<3, x>2)), |y+3|\le 0.2)`, where it was a `Tuple`
  (row neyret/akconkhexx #721856020).
- **`\{c\}` alone is `If(c, 1)`**, Desmos's value 1 where `c` holds. In 0.177.0,
  `\{x>1\}` was the set `Set(x>1)`.
- **The items of a `where` clause are bindings and conditions.** In
  `e \text{ where } item, item, …` (also `\operatorname{where}`), an item is a
  binding, `a \coloneq v`, `a = v` with a symbol on the left (it can have a
  subscript) or `\text{let } a \coloneq v`, or a condition, every other
  relation. A binding is one statement `Declare(a, "unknown", v)` (with a
  function literal, `Declare(f, "function", v)`), in written order, and the
  conditions, joined with `And`, wrap the body in `If(c, e)`:
  `e \text{ where } a \coloneq 1, b = 2, 0\le t\le 1` is
  `Block(Declare(a, "unknown", 1), Declare(b, "unknown", 2), If(0\le t\le 1, e))`.
  With conditions only, the value is the `If`:
  `(\cos t, \sin t) \text{ where } 0\le t\le\pi` is
  `If(0\le t\le\pi, Tuple(…))`, where it was a `Block` with the bound as a
  statement. In 0.177.0 `a \text{ where } b = 2` gave `Block(Equal(b, 2), a)`
  and bound nothing. Every comma starts another item: a comma followed by text
  that is not an item is a parse error, and so is a `let` with no value.
  Witnesses: Graph Paper's stored documents and help pages, and the 58 Tycho
  Desmos rows with `\operatorname{with}`, which Tycho's importer turns into
  `where` (`docs/plans/2026-11-02-where-binding.md`).
- **A `for` after a `where` clause applies to the whole clause.**
  `i \operatorname{where} n \coloneq 3 \operatorname{for} i = \operatorname{Range}(n)`
  is now
  `Comprehension(Block(Declare(n, "unknown", 3), i), Element(i, Range(n)))`, so
  the `n` of `Range(n)` is free; in 0.177.0 the `Block` was outside the
  comprehension. Tycho's 24 comprehension rows whose binding reads the index
  need this order.
  `i \operatorname{for} i = \operatorname{Range}(n) \operatorname{where} n \coloneq 3`
  keeps its value.
- **A `;` block declares a local with its value in one statement.**
  `a \coloneq 2; a+1` is `Block(Declare(a, "unknown", 2), a+1)`, where it was
  `Block(Declare(a), Assign(a, 2), a+1)`. A later `\coloneq` of the same name is
  still an `Assign`.
- **A binding `Block` and a single-branch `If` serialize with `where`.** A
  `Block` of `Declare(a, "unknown", v)` statements followed by one expression is
  written `e \text{ where } a \coloneq v, …`, where it was `a\coloneq v; e`, and
  when the expression is a single-branch `If`, its condition is the last item.
  Every single-branch `If(c, e)` is written `e \text{ where } c`, where it was
  `\mathrm{If}(c, e)`. The clause is in parentheses when it is not the whole
  expression: `2\left(p \text{ where } p \coloneq 3\right)`. The serializer
  never writes the brace `\{c\}`. `If(c, e)` keeps the function form when `c` is
  not a relation, when `c` is an `=` with a symbol on the left (`If(a=1, e)`,
  which `where` would read as a binding), and when `e` is an assignment, a
  declaration or a function literal, which would read the clause into its value.
  Every other `Block` keeps the `;` form. The text parses back to the same
  canonical expression.

- **The `When` operator is removed.** A restriction is the single-branch `If`:
  write `["If", c, e]` where you wrote `["When", e, c]` (the operands are in the
  other order). `["When", …]` in a MathJSON document is now an unknown operator:
  it has no type, does not evaluate and does not compile. `\mathrm{When}(e, c)`
  parses to that unknown operator, not to a restriction. Stacked restrictions
  written as nested `If`s are not merged into one `And`; stacked braces
  `e\{c_1\}\{c_2\}` still parse to one `If(And(c_1, c_2), e)`. A held
  restriction prints as `If(0 < t, 3)` in the ASCII form, where it printed
  `3 {0 < t}`. Witness: the parser has produced only `If` since the restriction
  rule above; Tycho, the only known builder of `When`, builds `If` from its next
  release.
- **A held restriction over a list presents as a list.** With `t` free,
  `If(0<t, [1, 2, 3])` is an indexed collection of 3 elements (`isCollection`,
  `count` and `each()` agree with its type). An operation applied to each
  element keeps the condition outside: `\sin([1,2,3]\{0<t\})` is
  `If(0<t, [\sin(1), \sin(2), \sin(3)])`, and with `t = -1` it is `Missing`, as
  before. With a `True` or `False` condition the value is unchanged.
- **The type of a restriction has no `missing` or `nan` arm.** `If(c, e)` has
  the type of `e`, and an accessor of it has the element type:
  `At(If(0<t, (1, 2)), 1)` is `integer`, where `When` gave `integer | nan`. The
  absent value (`NaN`, a `NaN` point, `Missing`) is outside the declared type,
  as `NaN` is outside `real`. `Insert`, `ReplaceAt`, `Append`, `Distance`,
  `Norm` and `Midpoint` of a restricted value lose the `missing` arm that the
  restriction gave them.
- **Element-wise selection takes a flat list of booleans, and a position with no
  match is `NaN` or a `NaN` point.** `If` and `Which` select element by element
  only when the static type of a condition is a list:
  - A position that no clause selects is `NaN` for a number and a point whose
    coordinates are `NaN` for a point: `If([True, False], (1, 2))` is
    `[(1, 2), (NaN, NaN)]` (it was `[(1, 2), Missing]`), and compiled JavaScript
    gives `[NaN, NaN]` (it gave `undefined`). The type of a restriction of a
    list of points is `list<tuple<number, number>>`, with no `missing` arm.
    `IsMissing` and `Coalesce` no longer read such a cell as absent. A plot
    skips a `NaN` point.
  - These are errors found from the types (`incompatible-type`), and a
    compilation declines them: a condition that is a list of lists
    (`If([[True], [False, True]], 7, 0)`, `If(M < 3, M, 0)` with `M` a matrix),
    a condition with a `Missing` element, a condition typed
    `collection<boolean>`, `set<boolean>`, `list` or `list<any>`, an arm whose
    elements are lists, a string or a set under a list of conditions, and a
    number arm beside a point arm. Two lengths that the types give and that
    differ are `incompatible-dimensions`: `If([True, False], [1, 2, 3], 0)` (a
    single-branch restriction such as `[1,2,3]\{[True, False]\}` was truncated
    to the shorter length). A length known only from the value is still
    truncated.
  - A relation arm, such as the region
    `1>0 \text{ where } x^2+y^2 \le (0..0.2..1)^2`, is accepted under a list of
    conditions, as before.
  - A condition whose type does not settle the number of dimensions
    (`tensor<boolean>`, `boolean | list<boolean>`) is accepted, and is checked
    on its value: a nested list there is an `incompatible-type` error, and `NaN`
    in compiled code.
  - The no-match value of `Which` with a scalar condition is unchanged:
    `Missing`.

  Witness: the 757 documents of Tycho's corpus. Only one value changes, the
  unmatched points of a 3-D point list (art/njncrg9fkv, `undefined` →
  `[NaN, NaN, NaN]`), and no document gains a decline. No document holds a
  nested condition, an uneven condition or a string arm under a list of
  conditions.

- **Compiled code no longer tests for an input that the caller leaves out.** The
  host supplies every input with a value of its declared type; the result for an
  input left out is undefined and can differ per target
  (`docs/COMPILATION-MODEL.md`, "Caveats of compiled code"). So `run()`,
  `broadcast()` and the `interval-js` runner no longer refuse a run that leaves
  out a collection input that the code reads: with `L: list<real>` left out,
  `Sum(L)` gave `NaN` on JavaScript and the empty interval on `interval-js` in
  0.177.0; it now throws a `TypeError` on JavaScript and gives `undefined` on
  `interval-js`. The functions that `compileFunction()` and `compileLambda()`
  emit for Python no longer start with a test of such an input. A comparison
  whose value is the result is the plain comparison: `x > 0` compiles to
  `0 < _.x`, which is `false` for an `x` left out, where 0.177.0 gave
  `undefined`. A branch over a comparison is the plain comparison too:
  `If(x > 0, 1, -1)` compiles to `((0 < _.x) ? (1) : (-1))` and takes the else
  arm for an `x` left out, where 0.177.0 gave `NaN`. An `Equal` of two variables
  is the plain `===` (`(_.a) === (_.b)`), with no test for `undefined`. A symbol
  declared `boolean` is read by its truthiness in a branch condition and in
  `And`, `Or` and `Not`: `And(p, q)` compiles to `_.p && _.q`; a symbol declared
  `boolean | missing` keeps the three-valued test. The stored entry plan of a
  result has no `required` field, and the `interval-js` `listInputs` are the
  inputs declared with a collection type that has no `missing` arm.
- **Compiled code no longer tests an absent argument of a function, or the shape
  of a point input.** A function applied to an absent value has no specified
  value in compiled code. So a call of a function whose parameter is annotated
  with a type that is not numeric and has no `missing` arm no longer stops the
  run with a `TypeError` that names the parameter (the `_SYS.present` helper is
  removed). An absent point in a list of points
  (`list<tuple<real, real> | missing>`) given to a function, by a call, by
  `Map`, `Filter` or another callback, or by `Apply` of a literal, goes to the
  definition compiled for one point: with `f := t ↦ 2t` and
  `L = [(1, 2), Missing]`, `Map(f, L)` gave the interpreter's value
  `[(2, 4), Missing]` in 0.177.0 and now throws a `TypeError` on JavaScript.
  Some of these programs declined before and now compile. The arithmetic of a
  point input (`P + (1, 2)` with `P: tuple<real, real>`) is written component by
  component, `[(_.P[0] + 1), (_.P[1] + 2)]`, with no run-time test that `P` is
  an array of two numbers.
- **A compiled `Sum` or `Product` over an empty range of a body of known vector
  width gives the identity of that shape.** With `x, y, z: real` and
  `n: integer<0..10>`, `Sum(i * [x, y, z], i, 1, n)` at `n = 0` compiles to
  `[0, 0, 0]` on JavaScript (`[1, 1, 1]` for `Product`), the zero of its static
  type `vector<real^3>`. The interpreter gives the scalar `0` (`1`) for this
  case. Inside a broadcast both give the same value: `0.5 * Sum(…) + [x, y, z]`
  is `[x, y, z]` on both.
- **Compiled code tests no value against its declared type.** The compiler
  assumes that every value holds its static type, a value given by the host
  included, and a value outside that type gives an undefined result. These
  run-time tests are removed:
  - the test of an argument against the declared type of its parameter, for a
    user function, a block-local function and an annotated function literal
    applied directly, on `javascript` (the `_fn_f$t` shim, which gave `NaN` or
    `undefined`) and on `interval-js` (`_IA.checkedCall`, which clipped an
    interval to a bounded type; `checkedCall` is no longer exported from the
    interval library). With `f` declared `(real) -> number`, `f(y)` compiled to
    `_fn_f$t(_.y)` and now compiles to `_fn_f(_.y)`. An argument whose static
    type does not prove a parameter type that admits only some real numbers
    (`integer`, `real<0..>`, `rational`) is assumed to hold it: with `g`
    declared `(integer) -> integer` and `y: real`, `g(y)` declined on Python and
    GLSL and now compiles on every target, with no test, and a recursive call
    such as `f(n - 1)` at an `integer` parameter compiles. Only an argument
    whose static type has no value of the parameter type declines. A
    complex-lane argument at a real parameter is still passed as its real part
    (`_SYS.creal`), so `p(√y)` at `y = 4` gives the value of `p(2)`; a function
    value that a consumer gives such elements declines: with `h` declared
    `(real) -> real`, `Map(h, [√y, 1])` compiled and now declines;
  - the refusals of `run()` and `load()`: an array, a boolean or a string for a
    binding declared with a number type, and any value but a string for a
    binding declared `string`. A `{re, im}` value other than `~oo` for a binding
    read as real, and a string and a typed array for a binding read as a list,
    are still refused: they are values of some types (`number`, some collection
    types) that compiled code cannot read. `broadcast()` no longer refuses a
    boolean for a number binding, or any input for a `string` binding. The
    stored entry plan has no `scalars` and no `texts` field (a stored plan that
    has them still loads, and the fields are ignored);
  - the shape test of a reduction or an inner product over a declared width:
    `\sum(V)` with `V: list<real^3>` compiled to
    `((_tv1) => Array.isArray(_tv1) && _tv1.length === 3 ? (0 + _tv1[0] + _tv1[1] + _tv1[2]) : (_tv1).reduce((_a, _b) => _a + _b, 0))(_.V)`
    and now compiles to the term-by-term fold alone, and `Dot` of two points
    whose width the type states has no `_SYS.matmul` fallback;
  - on JavaScript, the test that a list of points is an array, in its sum with a
    point and its product with a list of numbers: with
    `P: list<tuple<real, real>>`, `P + (1, 2)` compiled to
    `((_tv3, _tv4) => (Array.isArray(_tv3) ? _tv3.map((_tv5) => …) : NaN))(_.P, [1, 2])`
    and now compiles to `((_tv3, _tv4) => _tv3.map((_tv5) => …))(_.P, [1, 2])`.
    In the product, the other operand is tested only when it is typed
    `broadcastable<…>`;
  - on JavaScript, the `RangeError` "PointList: source component … is not an
    array at run time" for a `PointList` source typed as a list (or as a list or
    `missing`);
  - on JavaScript, the test that the source of a counted reduction over a range
    of positions (`Sum(At(L, 2..5))`) is an array, when its type has no
    `missing` arm. The test of the `Repeat` count and of the `Slice` span no
    longer tests the type of the value; they give the same values.
- **A declared scalar result binds the body of the function.** With `h` declared
  `(number) -> number` and `h := t ↦ [t, t]`, `h(3)` evaluated to `[3, 3]`,
  typed `number`, and now gives an `incompatible-type` error, as does
  `(t ↦ Typed([t, t], number))(5)`. A function computed once per element of a
  list argument still returns the list of its results: with `d` declared
  `(point | list<point>) -> number`, `d([(1, 2), (4, 6)])` is a list of numbers.
  The compiler declines every call of such a function on `javascript`,
  `interval-js` and Python, a bare call `h(u)` included, which compiled and
  returned the list before, and a function value of such a function given to a
  consumer (`Map(h, xs)`). (GitHub issue #488.)
- **Group-theory queries have one name for every representation.** The
  permutation-only queries of 0.172.0 are removed. Use the generic names, which
  accept a permutation group or a matrix group: `PermutationGroupOrder` →
  `GroupOrder`, `PermutationGroupContains` → `GroupContains`,
  `PermutationIsSubgroup` → `GroupIsSubgroup`, `PermutationIsNormal` →
  `GroupIsNormal`, `PermutationGroupIsAbelian` → `GroupIsAbelian`,
  `PermutationGroupElements` → `GroupElements`, `PermutationGroupGenerators` →
  `GroupGenerators`, `PermutationGroupEqual` → `GroupEqual`,
  `PermutationGroupIdentity` → `GroupIdentity` and `PermutationSubgroupIndex` →
  `GroupIndex`. A permutation group still uses the stabilizer-chain algorithms
  and their limit options. The operations specific to permutations
  (`PermutationCompose`, `PermutationCycles`, `PermutationOrbit`, ...) keep
  their names. (#484.)

### Resolved Issues

- **A product with a quotient factor reads back as the same expression.**
  `\sin(90\frac{x}{\sin(k)})` was written `\sin(\frac{90x}{\sin(k)})`, which
  reads back as `Sin(Divide(Multiply(90, x), Sin(k)))`, not as the product
  `Sin(Multiply(90, Divide(x, Sin(k))))`. A product whose only denominators are
  those of quotients with a numerator other than 1 is now written factor by
  factor: `\sin(90\times\frac{x}{\sin(k)})`, and `\frac{a}{b}\frac{c}{d}` stays
  `\frac{a}{b}\frac{c}{d}`. A product with a reciprocal or a negative power is
  still one fraction: `2\cdot\frac{1}{a}` is `\frac{2}{a}`. The prettified
  MathJSON (`toMathJson({ prettify: true })`) follows the same rule. (CE-787.)

- **A returned closure calls a local function that a nested block declares.**
  `Apply(Apply(w ↦ (x ↦ If(x > 0, Block(Declare(g, "unknown", z ↦ 3), x + g(0)), 0)), 1), 5)`
  gave `5 + g(0)`; it now gives `8`. When a call ends, the nested block of a
  closure that the call returns is rebuilt on a new scope, and the call `g(0)`
  did not find the local `g` in that scope. (CE-794.)

- **In `mode: 'complex'`, a block local with a real value compiles on the real
  lane.** With `x: real`, the compiled
  `Block(Declare(k, "unknown", Floor(x)), Cos(k)) + Floor(x)` gave the string
  `"[object Object]1"` at `x = 1.3`; it now gives `1.5403`, the interpreter's
  value. The same fault made the dot product of a point returned by a function
  with a `where` local
  (`p(x) := (\cos θ, \sin θ) \operatorname{where} θ := \operatorname{mod}(x, 1)`)
  give `NaN`. A local whose type is real holds the real part of each value
  assigned to it, and `NaN` for a value that is not real.

- **An evaluation of a block does not change the type of its locals.** A local
  declared with no type (`Declare(k, "unknown", v)`, `let k = v`) has the type
  that the canonical form gives it, also after a run of the block. Before, a run
  gave the local the type of its value in that run, and a copy made by `subs()`
  shares the locals of the block. With `x: real` and
  `e = Block(Declare(k, "unknown", Sqrt(x)), k + 1)`, after
  `e.subs({x: 4}).evaluate()` the type of `k` was `integer`, and `e` compiled in
  `mode: 'complex'` gave `NaN` at `x = -4`. It now gives `1 + 2i`, the
  interpreter's value. (CE-796.)

- **The `sgn` of a power with an exponent that is not provably real is
  `undefined`.** A positive base raised to a complex exponent can be any
  non-zero complex number: `ce.parse('2^{\ln(-3)}').sgn` gave `'positive'`, but
  the value is about `-1.2211 + 1.7592i`; the sign is now `undefined`.
  `(|\pi|)^{\ln(-3)}` gave `'non-negative'` and now gives `undefined`. A real
  exponent keeps the sign: `2^{\sqrt{2}}` is `'positive'`.

- **A `Sum` or `Product` over an empty range of a vector body gives a vector.**
  With `x, y, z: real` and `n: integer<0..10>`, `Sum(i·[x, y, z], i, 1, n)` has
  the type `vector<real^3>`. At `n = 0`, `evaluate()` gave the scalar `0` and
  now gives `[0, 0, 0]`; the `Product` gave `1` and now gives `[1, 1, 1]`, as
  compiled code does. `simplify()` of a range that is empty by its numeric
  bounds gives the same vectors. So `Norm(Product(i·[x, y, z], i, 1, n))` at
  `n = 0` is `√3` (before: `1`). A body of another type, a matrix included,
  keeps the scalar identity. (CE-786.)
- **The sum of two lists of points is typed as a list of points when only one
  length is known.** With `P: list<tuple<real, real, real>>` and
  `Q: list<tuple<real, real, real>^10>`, `P + Q` and `P - Q` were typed
  `list<list<tuple<real, real, real>>>`; they are now typed
  `list<tuple<real, real, real>>`, which is the shape of the value. With
  `n := [1...10]`, `n · PointList(m, m, v)` is a list of points too. The point
  type of such a sum is the component-wise sum of the two point types: with
  `A: list<tuple<integer, integer, real>>` and
  `C: list<tuple<real, real, integer>^2>`, `A + C` is
  `list<tuple<real, real, real>>`, where its cell was the union of the two point
  types. (CE-789.)
- **The sum of a point-or-list operand and a list is typed as a list.** With
  `U: tuple<real, real> | list<real>` and `W: list<real>`, `U + W` was typed
  `list<list<real> | tuple<real, real>>`, a type that does not hold the value
  `[11, 22]` of `U := [1, 2]`, `W := [10, 20]`. It is now typed `list<real>`.
  The same holds for `U - W`; with `W` declared `vector<2>`, `U + W` is
  `vector<2>`. (CE-790.)

## 0.177.0 _2026-11-01_

### Behavior Changes

- **Compiled code guarantees an absent value only where it is produced, moved or
  discharged.** An absent value (`Missing`, the `NaN` of a read past the end of
  a numeric list, the `undefined` a host passes for an input declared
  `real | missing`) keeps the interpreter's value in compiled code at its
  producers (`At`, `First`, `Last` past the end, an unmatched `Which` cell),
  through the accessors that move it without computing on it (`At`, `First`,
  `Last`, `Rest`, `Length`, a `Map` binding), and at a discharge (`IsMissing`,
  `Coalesce`, `AssertPresent`, a default parameter). Every other operator
  applied to an absent operand gives the target's own value in compiled code,
  and nothing computed from it is specified: with `w: real | missing` absent,
  `If(IsMissing(w), 1, 0)` is 1 on every route, while
  `If(IsMissing(w > 0), 1, 0)` is 1 in the interpreter and 0 on JavaScript
  (`undefined > 0` is `false`). In 0.176.0 the compiler carried the three-valued
  comparison to the `IsMissing`, so both gave 1. The interpreter does not
  change. A host passes `undefined`, never `null`, for an absent input. The rule
  and its record: `docs/COMPILATION-MODEL.md`, "Caveats of compiled code", and
  `docs/plans/2026-11-01-absent-value-contract.md`.
- **A default parameter fills a supplied absent value as well as an argument
  left out.** `(k: real | missing = 2) ↦ k` gives 2 for `f()`, `f(Missing)` and
  `f(At(L, 100))` with `L` a list of two elements; in 0.176.0 the second gave
  `Missing` and the third an `incompatible-type` error. The test of absence is
  the one of `Coalesce`, so `NaN` and `Indeterminate` take the default too:
  `(k: real = 2) ↦ k` gives 2 for `f(0/0)`. A caller that needs to pass an
  absent value through a parameter declares no default for it. Compiled code
  fills the default in the function with the same absence test as `Coalesce`
  (`undefined`, `null` or `NaN` in JavaScript; `None` or a float or complex
  `NaN` in Python), not with a native default parameter, which fills only an
  argument that is left out. On `interval-js`, where an empty interval is either
  an absent value or a pole, a call that supplies a number at a defaulted
  parameter declines.

- **Compiled code no longer guards an absent operand of an operator that is not
  a discharge.** The three-valued comparisons and connectives, the absence
  levels of broadcasts and point arithmetic, and the `missing` flag of
  `interval-js` results are removed, as the rule above allows. With
  `w: real | missing` absent, `If(IsMissing(w > 0), 1, 0)` is now 0 on
  JavaScript. On JavaScript, `Equal(s, t)` with `s` and `t` both declared
  `string | missing` now declines, and the interpreter fallback gives its value.
  The public `CompileTarget.absence.numeric` has no `readInput` member any more:
  compiled Python reads an input as it is, so an input of `None` in arithmetic
  raises a `TypeError` where it gave `nan`.

- **`IsMissing`, `Coalesce` and `AssertPresent` read every spelling of an absent
  value in compiled code.** On JavaScript they read `NaN`, `undefined` and
  `null` as absent for a value of any type; before, the test for a point, a
  string or a boolean read only `undefined`. On Python they read `None` and a
  float or complex `NaN` (NumPy scalars included) as absent and every other
  value as present; before, `IsMissing(u)` with `u: real | string | missing`
  holding `"ab"` raised a `TypeError`, and `IsMissing(At(["a", Missing], 2))`
  gave `False`. The unmatched cell of an element-wise `When` with a complex
  value is now a plain `NaN`, as `Which` gives it: with `z: complex` and
  `v = [1, -1]`, `IsMissing(At(When(z, v > 0), 2))` is now `true` (before:
  `false`), and `Coalesce(At(When(z, v > 0), 2), 0)` is now `0`. An unmatched
  point or string cell stays `undefined`.

- **A destructuring `Declare` whose pattern repeats a name declines in compiled
  code.** In 0.176.0, the MathJSON
  `["Block", ["Declare", ["Tuple", "a", "a"], "'unknown'", ["Tuple", 1, 2]], "a"]`
  compiled on every target and `a` got the value at its last position, `2`. Now
  the compilation declines on every target, with a message that names the
  repeated symbol, and the interpreter evaluates the expression (it gives `2`).
  A nested pattern such as `(a, (b, a))` declines in the same way. Only MathJSON
  input can contain such a pattern: the Epsil parser rejects it, and LaTeX does
  not give a destructuring `Declare`.
- **A compiled `Sum` or `Product` whose body writes its index declines.** In
  0.176.0, `Sum(Block(j ≔ j + 1; j), Limits(j, 1, n))` compiled on every target,
  and each target kept a separate loop counter to give the interpreter's value
  (14 at `n = 4`). Now the compilation declines on every target, with a message
  that names the index, and `compile()` falls back to the interpreter, which
  gives the same value. The decline comes before the `Sum` handler of the
  target, so a custom target with its own `Sum` handler declines too. A body
  that assigns or declares another variable by name still compiles. A body that
  holds a destructuring `Declare` also declines, because the check cannot tell
  which names such a pattern writes.
- **A compiled read of a `Block` local that only some paths assign declines on
  every target.** A local that its `Declare` gives no value, and that a
  statement reads when it may not have a value yet (after an assignment in one
  branch of an `If`, or after an early `Return`), now makes the compilation
  decline on JavaScript, interval JavaScript and Python, as it already did on
  GLSL and WGSL. In 0.176.0, JavaScript checked the read at run time and threw
  `read-before-declaration`, and Python gave the local the start value
  `_ce_unset(name)`. An input that the caller can leave out no longer counts as
  a path on which no branch runs: with `x: real`,
  `Block(Declare(n), If(x > 5, n ≔ 1, n ≔ 2), n + 1)` compiles on JavaScript
  with no check, and gives `3` at `x = 1`.
- **Compiled `Take` and `Drop` test every run-time count for `NaN`, and compiled
  Python raises for a `NaN` count.** In 0.176.0 the compiler tested a count only
  when its type showed it could be `NaN`. Now compiled JavaScript tests every
  count that is not a compile-time number and gives `undefined` for a `NaN`
  count, as before; an operator that reads the slice still has no value
  (`Length(Take(xs, k))` is `NaN`). Compiled Python no longer tests the count: a
  `NaN` count raises `ValueError`, as before 0.176.0 (it gave `None`). The
  interpreter has no value for a `NaN` count.
- **On GLSL and WGSL, `First`, `Second`, `Third` and `Last` of `Missing` or
  `Undefined` decline.** In 0.176.0 they compiled to the shader `NaN`. The
  interpreter gives `Missing`, and a decline falls back to it.
- **Compiled arithmetic over a symbol declared `any` or `value` declines.** On
  the JavaScript target, an element-wise site, `Max`, `Min`, `Sum` and `Product`
  over a parameter declared `any` or `value`, over an input declared `value`, or
  over a symbol declared `any` or `value` that has a value, no longer emit a
  run-time test of whether the value is a list. The compilation declines with
  the code `unsettled-shape` and the symbol in `unsupported`, and the
  interpreter computes the value: `Function(p + q, p: any, q: any)` gives
  `success: false`, and `run([1, 2], [3, 4])` still gives `[4, 6]`. Declare the
  shape of the symbol (`real`, `list<real>`) to compile it. An input declared
  `any` with no value is still refused with `untyped-input`.

### Resolved Issues

- **Compiled Python groups a `vars` source that is not a primary expression.**
  With `p: real` and `vars: { p: '2+3' }`, `2p` compiled to `2 * 2+3`, which is
  7; it is now `2 * (2+3)`, which is 10. A negative constant is grouped too:
  `p^2` with `vars: { p: -3 }` is `(-3) ** 2`, which is 9 (before: −9).
- **On `interval-js`, `PointX` and `PointY` of a list whose every point is
  absent keep the list.** `PointX([Missing, Missing])` gave one `empty` result;
  it now gives a list of two, as the interpreter gives `[Missing, Missing]`. The
  same applies to a list of restricted points whose conditions are all false.

- **On the `interval-js` target, a `Break` condition in a `Loop` that is always
  false no longer stops the loop.** With `k ∈ 1..5`,
  `Block(s ≔ 0; Loop(Block(If(k > 20, Break()), s ≔ s + k), k ∈ 1..5); s)` gave
  the interval `[0, 0]`; it now gives `[15, 15]`, as `evaluate()` gives 15. The
  same applies to a condition written `False`.
- **`Solve` finds the real cube root of a quotient.** With `t` and `x` declared
  `real`, `Solve(t^3 x = 1, t)` stayed unevaluated; it now gives
  `[Root(1/x, 3)]`. An odd root of a base whose values are real numbers,
  infinities or NaN now has the type `real` together with the infinities and NaN
  of the base, not `number`: `Root(1/x, 3)` is `infinity | nan | real`.
- **A compiled power of a list of extended reals no longer tests the shape of
  the list at run time.** With `P` declared `list<tuple<C, C>>` and `C` the type
  `real | signed_infinity | nan`, the JavaScript code of `PointY(P)^2` called
  `_SYS.matrixPowerShape` to check at run time whether the list was a matrix. It
  now gives the same element-wise power as for `C = real`. The same applies to a
  `list<real | signed_infinity | nan>`. The value is unchanged.
- **A compiled call over a list of points compiles again when the function
  passes a parameter declared `unknown` to another function.** With
  `C := (D, d) ↦ ((D − d)/2, 0)` and `n := (q, D2, d2) ↦ q + C(D2, d2)` declared
  `(tuple<number, number>, unknown, unknown) -> tuple<number, number>`, the
  compilation of `n([(1, 2), (3, 4)], 4, 2)` declined in 0.176.0 with the code
  `unsettled-shape`, although `n((1, 2), 4, 2)` compiled. Each call of the
  compiled map now types `D2` and `d2` from their arguments, as the call on one
  point does, and the result is `[(2, 2), (4, 4)]`, as `evaluate()` gives.
- **The variable of a compiled derivative takes the type of its declaration
  outside the derivative.** With `x` declared `real` and
  `F := t ↦ Max(Abs(t), Abs(t - 1))`, `compile(D(F(x), x))` declined in 0.176.0
  with the diagnostic code `'untyped-input'`, and `freeSymbolTypes.x` was
  `unknown`. It now compiles to a numeric derivative at `x`, `freeSymbolTypes.x`
  is `real` with the provenance `declared`, and `run({ x: 2 })` gives 1. This is
  the rule that already applies to the variable of an indefinite integral.
- **The code of a `compile` handler on the definition of `Which` is used when
  the branches have different shapes.** In 0.176.0, with `x` declared `real` and
  a handler that returns `x > 0 ? [0, 0] : [1, 2]` for
  `Which(x > 0, 0, True, [1, 2])`, the compilation declined with
  `unsettled-shape`, because the branches are a number and a list. The check of
  the shapes of the branches applies to the stock lowering of a conditional, and
  a handler takes precedence over that lowering, so the compilation now uses the
  code of the handler, as it did in 0.175.0. The node then has its static type
  (here `integer | vector<integer^2>`). The same rule applies to every node
  whose code a `compile` handler wrote, conditional or not: when its type admits
  values of shapes that conflict (a number and a list), the node compiles only
  where no code of the stock lowering reads its value. It compiles as the whole
  expression, as the value of the whole expression (the last statement of a root
  `Block`, a branch of a root `If`, the body of a root function literal), and as
  an operand of another node whose code a handler wrote. This holds for each
  occurrence of a node that occurs more than once: the compilation writes the
  code of one occurrence and uses it for the others, so `At(W, 1) + At(W, 2)`
  with `W` that `Which` and a handler on `At` too compiles. Under a stock
  consumer, such as `Which(x > 0, 0, True, [1, 2]) + 1`, the compilation
  declines with `unsettled-shape`: give the node a type of one shape (for
  example with a type handler on the definition) or write the code of the
  consumer with a handler too. As the body of a user function that the code
  calls, such a node also declines, and so does a case of a `Match` whose value
  is used. A type `broadcastable<T>`, alone or in a union
  (`broadcastable<real> | missing`), admits several shapes. A handler node whose
  type has one shape compiles anywhere; a `missing` member does not count as a
  shape, so `Which(x > 0, 1, x < 0, 2) + 1`, of type `integer | missing`,
  compiles. A handler that returns no code gives the stock lowering, which still
  declines. The admission check also no longer calls the handler a second time
  for a node that the compilation already gave to it.
- **Shader targets: `floor`, `fract` and `mod` of a bounded value no longer keep
  the NaN-safe helper.** On `glsl` and `wgsl`, `sin`, `cos` and the other
  guarded calls use the built-in only when their operand cannot overflow f32,
  and each factor of a product must then have a known size. `floor`, `ceil`,
  `round` and `trunc` of an operand had no size, so with `t` declared
  `real<-5.5..5.5>`, `\sin(10000(51.1\lfloor t\rfloor-3.9))` compiled to
  `_gpu_sin(…)`, while the same formula without `\lfloor\rfloor` compiled to
  `sin(…)`. Now `floor`, `ceil`, `round` and `trunc` of an operand of size `s`
  have the size `s + 1`, a fractional part (`Fract`, `Mod(a, 1)`) has the size
  1, and `Mod(a, d)` has about the size of `d` when `a` has a size. So
  `\sin(10000(51.1\lfloor t\rfloor-3.9))`, `\sin(1000(t-\lfloor t\rfloor))` and,
  with `T` declared `real<0..120>`,
  `\cos(\frac{T}{40}+\frac{\pi\lfloor T\bmod 7\rfloor}{7})` call the built-in.
  An operand with no size (`x` declared `real` with no range) keeps the helper,
  as before.
- **A function with a point parameter maps over a list of points that one point
  of the same type would satisfy.** With `E = real | signed_infinity | nan`, `g`
  declared `(tuple<E, E>) -> unknown` and assigned `p ↦ p.x + p.y`, and `L`
  declared `list<tuple<number, number>>`, `g(L)` had the type `error`, while
  `g(T)` was accepted for `T` declared `tuple<number, number>`. Now a list, a
  matrix, or a union of one point and a list of points is accepted when its
  point type would be accepted as the whole argument: `g(L)` has the type
  `list<E>`, evaluates to one value per point, and compiles to a call per point.
  The value of each point is checked when it is bound to the parameter.
- **Arithmetic on points whose components may be infinite keeps the signed
  infinities in the component types.** With `P` and `Q` declared
  `tuple<real | signed_infinity | nan, real | signed_infinity | nan>`, the type
  of `P + Q`, `P - Q`, `2P` and `P / 2` was
  `tuple<infinity | nan | real, infinity | nan | real>` (`P / 2` was
  `tuple<number, number>`). The `infinity` type admits the complex infinity, so
  a symbol declared with the type of `P` could not be assigned these results.
  Now each component has the type `real | signed_infinity | nan`, as the same
  arithmetic on scalars of that type has. A scalar quotient such as `x / p`,
  with `x: real | signed_infinity` and `p` a finite real that is not zero, is
  now `real | signed_infinity` (it was `infinity | nan | real`), and with
  `a: real | signed_infinity | nan`, `a / p` is now
  `real | signed_infinity | nan` (it was `number`).
- **Reading `.latex` of an expression no longer changes the type of a call to a
  recursive function.** With
  `F := n ↦ Which(n = 9, [(0, 0, -n)], True, ListJoin([(0, 0, -n)], F(n + 1)))`,
  `C := F(0)` and `N` declared `(tuple<number, number, number>) -> number`, a
  read of `.latex` of `N(C)` changed the type of `F(0)` from
  `list<tuple<integer, integer, number>>` to
  `list<tuple<integer, integer, unknown>>`, and a later `compile()` of `N(C)`
  declined. The type now stays `list<tuple<integer, integer, number>>`, and the
  compile succeeds in both orders.

## 0.176.0 _2026-11-01_

### New Features

- **An optional parameter can have a default value.** Write it after the type in
  a signature:
  `ce.declare("Scaled", { signature: "(x: number, factor: number = 2) -> number", evaluate: … })`.
  A call that leaves the parameter out gets the default when it is made
  canonical, so `Scaled(3)` and `Scaled(3, 2)` are the same expression: the
  `evaluate` handler, the type handlers and the compiler receive two operands,
  and `def.signature` prints `(x: number, factor: number = 2) -> number`.
  Before, `= 2` was a parse error and each handler had to supply the value of a
  missing operand itself. A default is a number (`-1`, `NaN`, `+oo`), a string,
  `true` or `false`, a symbol, `[]` or `{}`. A symbol default is the symbol
  itself, read as if it were written in the call (`over: set = Integers`,
  `mode: symbol<Auto> | symbol<Manual> = Auto`); it need not be declared. For
  another value, declare a constant and name it as the default. A named argument
  can skip a parameter that has a default: `F(3, factor: 5)` with
  `(x, density: number = 1, factor: number = 2)` is `F(3, 1, 5)`. A variable
  declared with such a signature fills its calls the same way, and accepts a
  function that requires the parameter. In a function literal, a parameter with
  a default is `["Optional", param, default]`; in Epsil it is written
  `function f(x: number, k: number = 2)`, `(x, k = 2) => x * k` or
  `(x, k: number = 2) => x * k`. A call of the literal with the required
  arguments is a full call, not a partial application:
  `((x, k = 2) => x * k)(3)` is `6`. Compiled code fills the default on every
  target (JavaScript and Python default parameters, call-site completion on
  GLSL, WGSL and interval-js). A default that does not match its parameter type,
  a default in an overloaded signature or a multi-clause function, and a default
  on a parameter whose type uses a type variable are refused when the function
  is declared. The operand descriptor and `LambdaDefinition.parameters` report
  `optional` and `default` for such a parameter. The annotation
  `["Typed", "k", "'number?'"]`, which was ignored before (the call was a
  partial application), is now the error `invalid-parameter-annotation`. (#490,
  requested by [enumeratio](https://github.com/enumeratio))

- **A `bigint` compile mode on the JavaScript target computes integers exactly
  past `2^53`.** `compile(expr, { mode: 'bigint' })` computes every integer
  value as a JavaScript `bigint`. With `n: integer`, the Catalan form
  `Binomial(2n, n) − Binomial(2n, n + 1)` at `n = 40n` gives
  `2622127042276492108820n`, and `Mod(n, 10)` at `n = 2^60 + 1` gives `7n`; in
  the default mode the first is rounded and the second throws a `RangeError`.
  The mode compiles integer arithmetic, `Abs`, `Min`, `Max`, `Sign`, `Mod`,
  `Remainder`, `GCD`, `LCM`, `Factorial`, `Factorial2`, `Binomial`, `Fibonacci`,
  `Sum`, `Product`, `Fold`, `Reduce`, `Range`, `Map`, `At`, `Take`, `Drop`,
  `Length`, `If`, `Which`, the comparisons, `IsPrime` and user functions with
  integer parameters. `Floor`, `Ceil`, `Round` and `Truncate` of a quotient
  (`Floor(n/3)`, `Floor(n(n + 1)/2)`, `Floor(2^(−n))`) or of `Sqrt(n)` are
  exact. Any other expression declines with the new diagnostic code
  `bigint-lane` and runs on the interpreter: `DigitSum(n)`, `String(n)`, `n/2`
  outside a rounding function, a `real` input, a constant such as `π`. An input
  is a `bigint` or a safe-integer `number`. The result is a `bigint` for an
  integer, a `boolean`, or a `number` (`NaN` or `Infinity`) when a
  sub-expression has no finite value: `n!` at `n = −1n` gives `Infinity`. A
  `number` result has no defined relation to the value of `evaluate()`. A result
  with more than 1,000,000 decimal digits from `Power`, `Factorial`,
  `Factorial2`, `Binomial` or `Fibonacci` throws a `RangeError` (`Fibonacci(n)`
  at `n = 10n ** 9n`), where the interpreter leaves the expression unevaluated.
  `broadcast()`, `broadcastAsync()` and the batch loaders of
  `createJavaScriptRuntime()` refuse code compiled in the mode. The mode is
  never selected by `'auto'`. The `compile` tool of the MCP server accepts
  `mode: "bigint"`. The exported types change: `CompileMode` is now
  `'strict' | 'complex' | 'auto' | 'bigint'`, the `mode` of a compilation result
  and of stored JavaScript can be `'bigint'`, and `CompiledValue` and the
  variable values of the runners admit `bigint`. A custom target with an
  exhaustive `switch` on `CompileMode` must add the new case. Only the built-in
  `javascript` target offers the mode: on any other target, also a custom target
  that lists `'bigint'` in its `supportedModes`, a request for the mode declines
  with `unsupported-mode`. (#503, requested by
  [enumeratio](https://github.com/enumeratio))

- **A protocol can extend other protocols.** In Epsil,
  `protocol FloorOrder extends PartialOrder { function floor(self: Self) -> integer }`;
  the parents are separated by commas. With the host API,
  `ce.declareProtocol("FloorOrder", { functions: { floor: "(self: Self) -> integer" } }, { extends: ["PartialOrder"] })`.
  In MathJSON, `["DeclareProtocol", name, members, ["List", parent, …]]`. A type
  that conforms to `FloorOrder` conforms to `PartialOrder` too, and one
  implementation block supplies the members of the whole hierarchy:
  `type Money is FloorOrder { function compare(…) {…} function floor(…) {…} }`,
  or one
  `ce.declareProtocolImplementation("Money", "FloorOrder", { functions: { compare, floor } })`.
  Before, each ancestor needed its own declaration, and nothing stopped a type
  from conforming to `FloorOrder` without `PartialOrder`. The conformance
  registers an ordinary conformance on each ancestor, so
  `ce.conformsTo("Money", "PartialOrder")` is still a direct lookup, and
  dispatch is unchanged. Code that declares every ancestor by hand, parents
  first, keeps working. A parent must be declared first (`protocol-unknown`); a
  member name can be declared by only one protocol of a hierarchy
  (`protocol-member-inherited`, `protocol-extends-member-conflict`); running a
  `protocol` statement again can add a parent but cannot remove one
  (`protocol-extends-removal`); a cycle is `protocol-extends-cycle`. A qualified
  name names the protocol that declares the member: `FloorOrder.compare` is
  `protocol-member-unknown`, with the hint "write `PartialOrder.compare`".
  `extends` is a soft keyword: a symbol named `extends` stays legal. (#491)

- **The `broadcast()` of an `interval-js` result accepts a list input, as its
  `run()` does.** With `L` declared `list<number>`, the code of `x + Sum(L)`
  reads `L` as a list. `run({ x: { lo: 1, hi: 1 }, L: [1, 2] })` gave the point
  `4`, but `broadcast({ x: new Float64Array([1, 1, 2, 2]), L: [1, 2] })` threw
  "the input for "L" must be a Float64Array or a number". Now `L` is bound once
  for the whole batch, as on a `javascript` result, and the two cells are the
  point intervals `4` and `5`. The list is a plain array of numbers and
  `{ lo, hi }` objects, the forms `run()` accepts. A `Float64Array` for it
  throws a `TypeError` that asks for a plain array: an `interval-js`
  `Float64Array` is read as `lo, hi` pairs, so `[1, 2]` would be one interval,
  not two elements. The `shared` option of `broadcast()` is now accepted on an
  `interval-js` result too, and `broadcastAsync()` sends the list to each worker
  of `ce.workers`. A stored `interval-js` result has a new field, `listInputs`,
  so that `createIntervalRuntime().loadBroadcast()` reads the list the same way.

- **New `Composition(f, g, h)`: the composition of functions, applied right to
  left, as Wolfram's `Composition`.** `Composition(f, g, h)(x)` is `f(g(h(x)))`,
  and the rightmost function takes all the arguments:
  `["Apply", ["Composition", "Sin", "Exp"], 0]` evaluates to `sin(1)`, and
  `Composition(Sqrt, Add)(3, 6)` to `3`. Nested compositions flatten, `Identity`
  steps are removed, `Composition()` is `Identity` and `Composition(f)` is `f`.
  A composition is a function value, so it works in `Apply`, a call, `Pipe` and
  `Map`. When each step has a signature, the type has the parameters of the last
  step and the result of the first: `Composition(Sin, Exp)` is
  `(number) -> number`. An application compiles to the nested call on every
  target. As a callback, `Map(Composition(Sin, Exp), xs)` compiles to JavaScript
  when the last step has a fixed number of parameters; when it does not (`Add`),
  the interpreter evaluates the `Map`. (#495, contributed by
  [enumeratio](https://github.com/enumeratio) in #496)

- **A partial application of a function literal compiles, where it equals the
  interpreter.** The interpreter curries a call with fewer arguments than
  parameters: its value is the deferred function `(_1) ↦ Apply(f, 1, _1)`, which
  applies `f` to all the arguments when the last one arrives (see Behavior
  Changes). A partial application now compiles when each supplied argument is a
  number literal whose value is a double, or a string literal, for a pure body
  and for a body with an effect, and also for a chain of currying steps:
  `Apply(Apply(f, 1), u)`, `Apply(Apply(f, 1), u, 4)` and
  `Apply(Apply(Apply(f, 1), 2), u)` are one call of `f` on `javascript`,
  `interval-js`, `glsl`, `wgsl` and `python` (with `f = (x, y) ↦ x + y`, `glsl`
  gives `u + 1.0`). `Apply(f, 1)` alone compiles to a function on `javascript`,
  `interval-js` and `python` at the root of the compilation, where the
  `javascript` result has `calling: 'lambda'`, and as the value of an assignment
  to a block local (`g := Apply(f, 1); g(u)`); at any other position (an `If`
  branch, a list element, an argument) it declines. Every other partial
  application declines with the reason. A supplied argument that is not such a
  literal (an exact rational, a decimal with more digits than a double, `Pi`,
  `True`, a variable, a list) declines: the interpreter curries with the
  evaluated argument, its approximation under `.N()`, maps over a list, and
  `True` can name a local. A generic literal and a rest parameter decline too.
  `glsl` and `wgsl` have no function values and decline a partial application
  that is not applied, with a message that says so. Before, every target
  declined all these shapes with "the function takes 2 parameter(s) but 1
  argument(s) are supplied", and `python` emitted `((lambda x, y: x + y))(1)`,
  which raises a `TypeError` when it runs.

### Behavior Changes

- **A power of a float and an infinity whose value is 0 is now the float `0`**,
  as `2.5/∞` already was. For example, `0.5^∞` was the exact `0` and is now
  `0.0`, and `∞^{-2.5}` was `0` and is now `0.0`. With exact operands the result
  stays the exact `0`: `(1/2)^∞` and `3^{-∞}` are `0`.

- **A compiled `Loop` whose value is used falls back to the interpreter.** The
  value of a loop is `Nothing`, or the value of a `Break(v)`, and compiled code
  has no form for either. Before, `compile()` of
  `\keyword{for} i \keyword{from} 1 \keyword{to} 10 \keyword{do} i^2` gave a
  function whose `run()` returned `undefined` (JavaScript) or `None` (Python),
  and a loop left with `Break(30)` also returned `undefined`. Now such a loop
  does not compile (`success: false`, diagnostic code `unsettled-shape`) on
  every target. This includes a search loop that ends with a `Return`, such as
  `(x) ↦ Loop(If(k > x, Return(k)), k ∈ 1..5)`, which gives `Nothing` when no
  `Return` runs. A loop used as a statement still compiles:
  `s ≔ 0; \keyword{for} i … \keyword{do} s ≔ s + i^2; s` gives 385. A loop with
  no indexing set and no `Break`, which ends only through a `Return`, also still
  compiles.

- **Two calls of a function declared with the `random` effect are two
  independent draws** (CE-606). For example with `r` declared
  `(number) random -> number`, an equality comparison no longer reads `r(t)` and
  `r(t)` as one value because their trees are the same. `Equal(r(t), r(t))`
  evaluated to `True` and now stays inert; `NotEqual(r(t), r(t))` evaluated to
  `False` and now stays inert; `r(t).isEqual(r(t))` and
  `r(t).isIdenticallyEqual(r(t))` returned `true` and now return `undefined`.
  The same applies to two sets that hold such a call
  (`Equal(Set(r(t), 1), Set(1, r(t)))` stays inert). A call of a pure function
  or of an undeclared function is still equal to itself, `isSame()` still
  compares the trees, and a list with a `NaN` element is still not equal to
  itself.

- **Limits at infinity no longer read the sign of a base from a sample.** The
  rules `f^g → exp(g·ln f)` and `ln u − ln v → ln(u/v)`, and the conjugate
  rewrites of a difference of radicals, need operands that are positive for
  every large `x`. They took a positive value at `x = 120` as a proof.
  `Limit(ln(x) − ln(130 − x), x, +∞)` gave `ln(−1) = iπ`, but the limit is
  `−iπ`, and `Limit((sin(x) + 0.9)^{1/x}, x, +∞)` gave `1`, but there is no
  limit. Both now stay unevaluated. The sign is now proved from the form of the
  operand only: a polynomial with a positive leading term, a sum of positive
  terms, a product, a power or a root of operands with a proved sign, `e^g`,
  `ln b` with `b − 1` proved positive, and `cos(1/x)`. Some limits that were
  correct now stay unevaluated, because the sign of their base is not proved
  from its form: `Limit((1 + sin²x)^{1/x}, x, +∞)` and
  `Limit((2 + sin x)^{1/x}, x, +∞)` (both `1`), and
  `Limit((ln(ln x))^{1/x}, x, +∞)` (`1`).

- **`ce.declare()` with a function value refuses a function that writes outside
  itself** (CE-58). A named definition that states no effects must not write
  outside itself (the `scope` effect is opt-in), but
  `ce.declare('f', { type: '() -> number', value })`, and `{ value }` with no
  type, installed a function literal that assigns to an outer variable. In the
  global scope this call now throws the same effect-contract error as
  `ce.declare('f', '() -> number')` followed by `ce.assign('f', value)`, whether
  the value is an expression, MathJSON, LaTeX or a function that makes it.
  Declare the `scope` effect (`'() scope -> number'`, or on the literal itself)
  to allow the write; a literal that states its effects must keep to them. A
  `Declare` statement (an Epsil `let`) and a declaration in a nested scope are
  not changed: block-local writer closures stay installable.

- **A compiled expression declines when an input has no type, and the result
  names the input.** An input (a free symbol of the compiled code) whose type is
  `unknown` or `any` now declines on every target, and `unsupported` holds its
  name. With `M` not declared, `compile(If(M < 3, M, 0))` emitted code that read
  `M` as a number: `run({ M: [1, 5] })` gave `0`, where the interpreter gives
  `[1, 0]`. Now the compilation declines with `unsupported: ["M"]` and the
  diagnostic code `'untyped-input'`, and the interpreter fallback gives
  `[1, 0]`. Declare the input (`ce.declare("M", "real")`), or declare a union
  such as `real | list<real>` when the host can pass both shapes: a union is not
  refused. A parameter of a function is not an input: `t ↦ 2t` still compiles,
  and a list passed to its untyped parameter gives an unspecified result. An
  input declared `any` that the JavaScript target tested at run time for a list
  now declines too. When the expression also declines for another reason, that
  reason stays the error and the diagnostic, and `unsupported` also holds the
  names of the inputs with no type. A name that the code only writes, outside
  every scope of the expression, is an input too. A transparent alias of
  `unknown` or `any` is that type. A name that only a branch of an `If` in a
  block assigns is an input, outside a function body: with `b` undeclared,
  `Block(If(a < 1, b ≔ 1); b)` declines. The variable of an indefinite integral
  (`\int x^2 dx`) takes the type of its declaration outside the integral. A
  value that the code assigns to an input must have the shape of the type of the
  input, declared or inferred: with `x: real` and `p` undeclared,
  `Block(If(x > 0, p ≔ [1, 2], p ≔ [3, 4]), 2p)` gave `null` where the
  interpreter gives `[2, 4]`, because the read `2p` gave `p` the inferred type
  `number`. It now declines with the code `'unsettled-shape'`.

- **A compiled conditional whose branches have different shapes declines.** An
  `If`, a `Which` or a `Match` whose branches have conflicting shapes (a number
  and a list, a point and a list of points) declines on every target, and two
  points of different sizes decline on `glsl` and `wgsl`, with the code
  `'unsettled-shape'`, and `unsupported` holds the conditional as `toString()`
  writes it. `If(x > 0, [1, 2], 3) + 1` compiled on `javascript` with a test of
  the shape at run time. `If(x > 0, [1, 2], 3)` gave
  `((0.0 < x) ? (vec2(1.0, 2.0)) : (3.0))` on `glsl`, which is not valid GLSL,
  and `If(x > 0, [x, 2], 3)` on `interval-js` took the hull of a list and an
  interval when the condition was not decided. The check also applies to a
  conditional in the body of a user function that the code calls. The values
  that a function body can give (each `Return` value and its last value) and the
  `Break` values of a `Loop` are compared in the same way: with `M: list<real>`,
  `At(Apply(a ↦ Block(If(Length(a) > 1, Return(First(a))), Reverse(a)), M), 1)`,
  whose compiled code threw at run time when the early `Return` gave a number,
  now declines. A branch whose type has no single shape (`unknown`, a union, the
  result of a call that is tested at run time) is not compared, and a
  conditional over a list condition, which selects element by element, still
  compiles when its branches assign no name and have no `Return`, `Break` or
  `Continue`. A branch that a condition known at compile time excludes is not
  compared either: `Which(2 < 3, [1, 2], True, 0)` compiles to `[1, 2]`, and
  `If(False, [1, 2], 0)` to `0`. On `glsl` and `wgsl`, the branches that the
  shader code keeps are compared: `If(2 < 3, (1, 2), 0)` still compiles to
  `vec2(1.0, 2.0)`, but `If(False, (1, 2), 0)`, which gave the invalid
  `((false) ? (vec2(1.0, 2.0)) : (0.0))`, declines. A branch that the code drops
  is not checked: `If(2 < 3, 0, If(x > 0, [1, 2], 3))` compiles to `0`, and with
  `z` undeclared, `If(2 < 3, 0, z)` compiles too, because the code does not read
  `z`. A name that also occurs in the code that is kept stays an input, also
  where a binder binds it there:
  `List(If(2 < 3, 0, z), Sum(z, Limits(z, 1, 3)))` declines. On the targets that
  are not shaders, a conditional whose value the code discards (a statement of a
  block that is not its last one, a loop body) is not checked:
  `Block(p ≔ (0, 0); n ≔ 0; If(x > 0, p ≔ (1, 2), n ≔ 3); n)` compiles. A
  written `NaN` is a number, so `If(c, (x, y), NaN)` declines: its value is a
  point or a number. When the target declines for a more specific reason, that
  reason stays the error.

- **A compiled name that gets values of different shapes declines.** In one
  scope, the values that the code assigns to a name, and the type of the name,
  must now have one shape class: a number, a complex number, a string, a list, a
  point or a matrix. Otherwise the compilation declines with the code
  `'unsettled-shape'` on every target. With `x: real`,
  `t ↦ Block(If(x > 0, p ≔ [1, 2], p ≔ 3), 2p)` compiled to code that read `p`
  in one shape. The rule does not examine the order of the assignments:
  `Block(p ≔ 0; p ≔ [1, 2]; p)`, where the interpreter gives `[1, 2]`, also
  declines, and the interpreter fallback gives `[1, 2]`. The length of a list is
  not part of its shape: `[1, 2]` and then `[1, 2, 3]` compile. A declared type
  settles the shape of a local, so `Block(Declare(p, "real"); p ≔ (x, 2); p)`
  declines on every target, where `glsl` declared `p` a `vec2`. A parameter of a
  function literal has the type of the parameter: at `p = 2`,
  `p ↦ Block(Loop(p ≔ [i, i], i ∈ [1, 2, 3]); 2p)` gave `null` where the
  interpreter gives `[6, 6]`, and now declines. A type that a `Declare` states
  and that admits several shapes (`real | list<real>`, `broadcastable<number>`)
  is not checked. A name that a `Declare` of a nested block declares is another
  variable; two locals of the same name with no `Declare` are compared as one.

- **A compiled call selects the variant of a function from the static type of
  its argument, and emits no run-time test of the shape.** With `f := t ↦ 2t`, a
  call of `f`, a `Map(f, L)` or an `Apply` of a literal now compiles to the
  variant that the declared or inferred type of the argument selects: a direct
  call of the scalar variant for a `real`, a map over the list levels for a
  `list<real>` or a `list<list<real>>`, and a variant compiled for a point
  (`_fn_f_tuple_real__real_`) for a `tuple<real, real>`, a list of points or an
  alias of a point type. Before, the JavaScript and interval-js targets tested
  the shape of each argument at run time (`_SYS.bcastFn`, `_IA.bcastFn`). In the
  Tycho corpus of 757 documents, no record holds `bcastFn` now (320 JavaScript
  and 27 interval-js records before), the records that hold `Array.isArray` fall
  from 510 to 269, and no record declines that compiled before. Some values
  change because the old test was wrong:
  - A point at a parameter with no declared type is bound whole, as in the
    interpreter. With `f7 := t ↦ 7` and `LP: list<tuple<real, real>> | missing`
    holding `[(1, 2), (3, 4)]`, `f7(LP)` gave `[[7, 7], [7, 7]]`; it now gives
    `[7, 7]`.
  - An absent element (`Missing`, compiled as `undefined`) is passed to the
    function, as in the interpreter: with
    `PM: list<tuple<real, real> | missing>` holding `[(1, 2), Missing]`,
    `Map(f7, PM)` gave `[[7, 7], 7]`; it now gives `[7, 7]`.

  An input or a parameter declared with a union of shapes
  (`real | tuple<real, real>`) gets one test at that binding and one body per
  member. These cases decline with the code `'unsettled-shape'`, where the value
  has no single shape or a route cannot give the interpreter's value:
  - a list whose element type is a union of shapes: `Map(f2, CS)` with
    `CS: list<real | tuple<real, real>>`, and a list of points of two widths;
  - a callback whose body reads an absent point, other than through a function
    defined on the engine with one parameter: `Map(t ↦ t[1], PM)`,
    `Find(PM, t ↦ Length(t) > 1)` (JavaScript gave the right value only when the
    match came before the absent element, and threw otherwise);
  - an absent element beside an argument that may hold a point:
    `Reduce(L, g, S)` with `g := (a, x) ↦ 2a`,
    `L: list<tuple<real, real> | missing>` and `S: tuple<real, real> | missing`;
  - an absent element at a callback with a parameter that has a default value;
  - on Python, an `Apply` of a literal whose body reads a point that may be
    absent (`Apply(t ↦ Max(t, 0), PD)`).

  The interpreter fallback gives the value of each case that declines.

- **MCP clients cannot remove or extend the server's deadline, and a public
  listener must be authenticated.** With a nonzero server `--time-limit`, a tool
  argument of `timeLimit: 0` now uses that server limit instead of disabling it,
  and a larger argument is reduced to the server limit. Starting Streamable HTTP
  with a non-loopback address, such as `--host 0.0.0.0`, now fails unless
  `--auth-token-env <name>` names a nonempty environment variable whose value
  has no leading or trailing whitespace; requests must send its value as a
  Bearer token.

- **In Epsil, a protocol function member shadows the library function of the
  same lowercase name in the program that declares it.** After
  `protocol F { function floor(self: Self) -> integer }` and a conformance of
  `Money` that implements `floor`, a bare `floor(Money(3))` in the same program
  was the library `Floor` and gave a static `incompatible-type` error; in a
  later program it gave `3`. It now gives `3` in both. The library function
  stays reachable by its capitalized name: `Floor(2.5)` gives `2`. A
  `function floor` or `let floor` of the program still wins over the member for
  a bare call; `F.floor(x)` calls the member.

### Bug Fixes

- **A variable raised to an infinity is no longer folded with a value it may not
  have.** With `z` declared `real`, `z^∞` was `0`, and `z^∞` with `z` replaced
  by `2` stayed `0`; it now stays `z^∞` and gives `+∞` for `z = 2`. With
  `x := 0.5`, `x^∞` was folded to `0` when it was boxed and stayed `0` after
  `x := 2.5`; it now evaluates to `0.0`, then to `+∞`. A float base computed
  during evaluation, such as `(z + 0.5)^∞` with `z = 2`, now gives `+∞` instead
  of `NaN`.

- **A number base near 1 raised to an infinity gives its limit.** The base is
  compared with 1 by its exact value. `1.00000000001^∞` and
  `1.000000000000000000001^∞` were `0` and are now `+∞`; `0.99999999999^{-∞}`
  was `0` and is now `+∞`. Under `N()`, `(1 + 10^{-30})^∞` was `NaN` and is now
  `+∞`.

- **The derivative of a function literal no longer reads the value of a variable
  that has the name of its parameter, and its application to a list is typed as
  a list.** With a global `a := [1, 2]`, `Derivative(a ↦ a^2)` gave the constant
  function `a ↦ [2, 4]`, and is now `a ↦ 2a`. In the same way,
  `((a: list<real>) ↦ Apply(Derivative(a ↦ a^2), a))([1, 2])` gave
  `[[2, 4], [2, 4]]` with the type `number`, and is now `[2, 4]` with the type
  `vector<2>`; a partial derivative such as `Derivative((a, b) ↦ a^2 b, 1, 0)`
  is fixed too. The application of a derivative maps over a list argument:
  `Apply(Derivative(x ↦ x^2), [1, 2])` and `Apply(Derivative(Sin), [1, 2])` were
  typed `number`, and are now typed as a list with the depth of the argument. A
  tuple argument, whose shape the body decides, gives the type `any`.

- **A lazy view stored out of a loop iteration at the top level reads a symbol
  default of its callback in that iteration.** In Epsil, with
  `let f = (x, k = d) => x * k`,
  `for d in [3, 6] { if d == 3 { h = Map(f, Range(1, Infinity)) } }` then
  `ListFrom(Take(h, 2))` gave `[d, 2d]`; it now gives `[3, 6]`. The view names
  no `d`: the call `f(x)` fills `k` with the `d` of the context of the call,
  which was the context of the reader, after the loop. The assignment now
  records, for the view, the loop and block scopes that the variable outlives,
  with their values at the assignment, and each read of the view calls `f` in
  them, as for a view made in a function call. A view made outside the loop
  (`let v = Map(f, R); for d in [3] { h = v }`) is still read in the context of
  its reader. So is a view that leaves its block as the value of the block
  (`h = do { let z = 0; Map(f, R) }` in the loop): its elements stay `d` and
  `2d`.

- **A lazy view assigned to a subscripted name out of a loop iteration reads the
  values of that iteration.** With
  `for d in [3, 6] { if d == 3 { L_0 := Map(x => x + d, R) } }`, a base case of
  the sequence `L` (also `P_{0,0} := …`), or the same assignment to a declared
  name `h_1` (`h_1 := …`), the elements read after the loop were `7, 8`, the
  value of `d` after the loop. They are now `4, 5`, as for an assignment to a
  variable. The assignment to a declared `h_1` also lists a finite lazy view
  that reads a variable and copies the variables of a call, as an assignment to
  `h_1` written without the subscript does.

- **A lazy `Map` in the callback of a `Map`, or in the body of a function, now
  gives the values of each application under `.N()`.**
  `Map(k ↦ Map(j ↦ k + j, [10, 20]), [1, 2])` with
  `evaluate({ numericApproximation: true })`, `.N()` or `evaluate().N()` gave
  `[[11, 21], [11, 21]]`, and is now `[[11, 21], [12, 22]]`, as `evaluate()` and
  `evaluateAsync()` give. Also
  `Block(c := 5, g(k) := Map(j ↦ c + k + j, [10]), Map(k ↦ g(k), [1, 2]))` gave
  `[[16], [16]]`, and is now `[[16], [17]]`; and with
  `f(h) := Map(j ↦ h(j), [10])`, `[f(x ↦ x + 1), f(x ↦ 2x)]` gave
  `[[11], [h(10)]]`, and is now `[[11], [20]]`. The numeric form of the inner
  `Map` was kept after the first application and read again in the later ones;
  it is now kept only when the `Map` reads no name, and calls no function, of a
  frame or of a block.

- **`evaluateAsync({ numericApproximation: true })` of a block whose lazy `Map`
  calls a function that the block defines now reads the locals of the block.**
  `Block(Declare(c, 'real', 5), DefineFunction(h, k ↦ c + k), Map(k ↦ h(k) + 1, [1, 2]))`
  gave `[c + 2, c + 3]`, and is now `[7, 8]`, as with
  `evaluate({ numericApproximation: true })` and `evaluateAsync()`. The callback
  with the numeric marker substitutes its arguments in its body without a call
  frame, and it evaluated that body in the scope of the reader of the `Map`, so
  `h` did not find the run of the block that holds `c`. The body is now
  evaluated in a scope whose parent is the scope where the callback was defined,
  as a call frame is.

- **A function called with a block-local valueless symbol reads that local.** A
  function called in a `Block` with an argument that holds a valueless local of
  the block read a binding of the same name from the scope that defined the
  function in place of the local. With a global `y := 5` and `g := x ↦ x + 0.5`,
  `Block(Declare(y, 'real'), g(y))` gave `5.5`, and with
  `f := x ↦ NumericApproximation(x)`, `evaluateAsync()` of
  `Block(Declare(y, 'real'), f(y))` or of
  `Block(Declare(y, 'real'), Apply(f, y))` gave `5`. These now give `y + 0.5`
  and `y`, on the synchronous and the asynchronous routes, also when the block
  is the body of a function (`F := n ↦ Block(Declare(y, 'real'), g(y))`,
  recursive or not), when the argument is passed on to another call, and when a
  lazy view made in the block (`L := Map(g, [y])`) is read in a nested block
  that declares its own `y`. A function that closes over a private `y` no longer
  gives its value to a `y` of the caller that has no binding.

- **`ArgMax(f, xs)` in the body of a function is applied to the list, not to
  each element.** `Apply(xs ↦ 1 + ArgMax(x ↦ 2x, xs), [1, 4])` gave a list of
  two `incompatible-type` errors, one per element, where
  `1 + ArgMax(x ↦ 2x, [1, 4])` gives one. The domain of the optimization form
  `ArgMax(f, domain)` (and `ArgMin(f, domain)`) gave the parameter `xs` no type,
  and a function whose parameter has no type is applied to each element of a
  list argument. The parameter is now typed `collection`: a set bound to it
  keeps the optimization form (`Apply(xs ↦ ArgMax(f, xs), Set(1, 4))` stays
  `ArgMax(f, Set(1, 4))`), and a list gives the error of the collection form.

- **A lazy operator whose canonical handler gives up is canonical and invalid.**
  A call such as `Tail(xs, 2)`, `Head(xs, Sin)` or `Interval("bad", 1)`, with an
  operand that the handler does not accept, was kept as written: not canonical,
  and reported valid. As an operand of a sum (`1 + Tail(xs, 2)`), its evaluation
  printed "Assertion failed" on the console. An operand left over is now
  `Error("unexpected-argument")`
  (`Tail(xs, Error("unexpected-argument", "2"))`). With a valid number of
  operands, the operands are checked against the signature, so the refused
  operand is a typed error:
  `Interval(Error(ErrorCode("incompatible-type", "number", "string"), "bad"), 1)`.
  An invalid call has no `count` any more: `Interval("bad", 1)` had the count
  `Infinity` of a valid interval. A call whose operands all pass the check
  (`Series(1)`, which has no variable, or any call when `ce.strict` is false) is
  canonical and inert: `evaluate()` and `N()` return it unchanged. A top-level
  `Sequence` operand supplies its elements (`Interval(Sequence(1, 2))` is
  `Interval(1, 2)`). A handler that throws, and an operator whose signature is
  inferred, still keep the call as written.

- **Every collection operator reads a `FlatMap` whose finiteness is known only
  after its callback is applied.** With `v = FlatMap([1, 2], x ↦ Range(1, x))`,
  only `ListFrom`, `Count`, `Length`, `IsEmpty`, `Sum`, `Product`, `Max`, `Min`
  and `Reduce` listed `v`. `Mean(v)`, `Median(v)`, `Sort(v)`, `Unique(v)`,
  `Contains(v, 2)`, `SetFrom(v)`, `MaxBy(v, k ↦ k)` and the other consumers
  stayed unevaluated, and so did a consumer of a view over `v`:
  `ListFrom(Reverse(v))` was not `[2, 1, 1]`. Each of them now gives its value
  over the elements `[1, 1, 2]`, under `evaluate()` and `evaluateAsync()`. The
  callback is applied once for each element of the source, and an operator that
  reads a prefix (`First`, `Take`) still applies it only to the elements that it
  reads. A `FlatMap` with an infinite inner result (`x ↦ Range(1, ∞)`) stays
  unevaluated in these operators. Also,
  `IsEmpty(FlatMap([1, 2], x ↦ Map(slowF, Range(1, x))))`, where `slowF` has
  only an `evaluateAsync` handler, is now `False`: the callback of a `Map` does
  not change the number of its elements.

- **The pop of a scope no longer disposes a definition that another live
  evaluation context holds**, also when that context is on another stack (an
  asynchronous evaluation, a lazy view), and the debug check of dead bindings
  (`CE_DEBUG_BINDINGS`) now reports a read of the index of a `Sum` or `Product`
  after `evaluateAsync()`, as it does after `evaluate()`. In `u(u(b))` with
  `u := (l) => [l[i] for i in 1..n]`, and in a recursive call that runs the same
  loop, the inner pop disposed a definition that the outer evaluation still
  read. The values were correct, but an assumption about a disposed definition
  is ignored. The pop of an asynchronous evaluation of a `Sum` did not mark the
  definitions of its local scope as dead, so a later read of its index was not
  reported. Two overlapping `evaluateAsync()` calls of a node with a `const` in
  its body no longer report a read of the constant.

- **`Sort` with a sort key or a comparator, `Iterate` and `Pipe` compile on
  `javascript`.** Before, `Sort([3, y, 2], x ↦ -x)`,
  `Take(Iterate(x ↦ x + 1, y), 3)` and `Pipe([1, y], Map(x ↦ 2x))` declined and
  ran in the interpreter. Each now compiles and gives the interpreter's value:
  for `y = 5`, `[5, 3, 2]`, `[6, 7, 8]` and `[2, 10]`.
  - As in the interpreter, a function that takes one argument is a sort key, and
    any other function is a comparator, which returns a boolean or a number. The
    sort is stable, and `NaN` and `Missing` sort last. A key whose result is not
    a real number, and a comparator whose result is neither a boolean nor a
    number, decline.
  - `Iterate` compiles under `Take`, `TakeWhile`, and under `First` and `At`
    with a constant positive index, also through a `Drop` or a `Rest`. A `Map`
    or a `Filter` over an `Iterate` still declines. Only a sequence of real
    numbers with an initial value compiles, and only when the function is pure:
    the interpreter computes the elements before a position again for each read,
    so the effects of a function that is not pure would run more often there
    than in compiled code. `First` and `At` with a constant positive index now
    compile over the other infinite collections too (`First(Map(f, 1..∞))`).
  - `Pipe` compiles as the expression it evaluates, on `javascript` and
    `python`: a call missing one argument receives the piped value
    (`Pipe(xs, Take(2))` is `Take(xs, 2)`), a function literal is applied to it,
    and the name of an operator is called with it.
  - An applied function literal that receives a value that can be complex at a
    parameter that it compiles as a real number is a lane mismatch. In the mode
    `auto`, the expression is compiled again in the mode `complex`. With
    `y: real`, `Apply(x ↦ 2x, √y)` gave `NaN` at `y = −4` under `auto`, and now
    gives `4i`, as the interpreter does. In the mode `strict`, a complex
    argument (`z: complex`) declines, and `√y` stays a real number (`NaN` for a
    negative `y`), as for a call of a named function. A point with a coordinate
    that can be complex, given to a literal with scalar parameters
    (`Apply(t ↦ 2t, (y + i, 1))`), declines in every mode: the compiled literal
    would read the point as one number. A call of a named function with such a
    point (`dbl((y + i, 1))` with `dbl := t ↦ 2t`) compiles, and gives the
    interpreter's value `(2y + 2i, 2)` under `auto`. A literal parameter
    declared with a type now gets the same check of each position as a parameter
    of a named function: with `P: tuple<complex, real>`,
    `Apply((p: tuple<number, real>) ↦ p[1] + 1, P)` gave the string
    `"[object Object]1"`, and now gives `2 + i` under `auto`; `strict` declines.
    The check compares types, not the positions that the body reads, so `strict`
    also declines `Apply((p: tuple<number, real>, a) ↦ p[2] + a, P, y)`, which
    reads only the real coordinate; `auto` gives the interpreter's value.
  - The same check applies to a call of a named function with scalar parameters
    whose argument is a list of lists of complex numbers. With
    `f := (x: number) ↦ 2x` and `W: list<list<complex>>`, `f(W)` gave `NaN` for
    each element, and so did `Apply(t ↦ 2t, W)`; both now give the interpreter's
    value under `auto`, and `strict` declines. The check also reads the type of
    the argument at the call site: with `g: (real) -> any` assigned
    `u ↦ Block(w ≔ u + i, w)`, the call `g(y)` has the type `any`, and
    `Apply(t ↦ 2t, g(y))` and `h(g(y))` with `h := t ↦ 2t` gave `NaN` under
    `auto`, and now give `2y + 2i`.

- **In Epsil, an unknown call that is not in the result of a statement gets its
  did-you-mean warning.** `for i in range(1, 3) { i }` gave `Nothing` and no
  diagnostic: the loop ran zero times over the inert call `range(1, 3)`, and the
  `unknown-function` warning ("did you mean `Range`") was found only in the
  result of a statement. The canonical form of each statement is now scanned
  too, so a call in the source of a loop, a condition, a function body or a
  branch that is not taken is reported, once for each name. A name that the
  program binds (a parameter, a local function, a `let` of a function in a later
  statement) and a function bound by the host or by an earlier program are not
  reported. The value of the program does not change.

- **A point passed to a function with an untyped parameter gives the
  interpreter's value.** With `P: list<tuple<real, real>>` and
  `gm = (p) ↦ Max(p) + 1`, the compiled `gm(P[1])` gave `NaN` (shown as `null`)
  where the interpreter gives 3; `Min(p)`, `Map(gm, P)`,
  `Reduce(P, (a, v) ↦ a + gm(v), 0)`, a function local to a `Block`, and a
  function with a trailing default parameter (`(p, k = 1) ↦ Max(p) + k`) gave
  `NaN` too. The call now uses the function compiled for one point. Where that
  is not possible (Python, GLSL, WGSL, or a point that may be missing at a
  callback), the expression falls back to the interpreter.

- **A multi-index `At` compiles.** `At(R, 1, 2)` (`R[1, 2]`) with `R` a matrix,
  a list of lists or a tensor declined on every target with "only the
  single-index form compiles"; it now compiles as `At(At(R, 1), 2)` and gives
  the interpreter's value, also as a function argument (`h(R[1, 1])`). A chained
  access whose static type does not match the nested reads (a tuple or record
  base) still falls back to the interpreter. On Python, an index that is a list
  (a gather or a mask) now falls back to the interpreter; before,
  `At(R, [2, 1])` compiled and raised a `TypeError` when it ran.

- **A destructuring `let` as a loop body compiles on Python, GLSL and WGSL.**
  `Loop(Declare((a, b), "unknown", (k, 2)), Element(k, Range(1, 3)))` compiled
  on JavaScript and declined on the other targets with "destructuring
  declaration in value position"; Python also declined a destructuring `let` in
  every loop body. A destructuring `let` whose value reads a name that the
  pattern declares, such as `let (a, b) = (k, a)`, now falls back to the
  interpreter on every target: the compiled code read the new `a`, so JavaScript
  gave 6 where the interpreter gives 300 for
  `a = 100; s = 0; for k in 1..3 { let (a, b) = (k, a); s = s + b }; s`.

- **Compiled `Sum`/`Product`: a bound that reads a variable with the name of the
  index, and a bound with a known effect.** In JavaScript,
  `Function(Sum(j, Limits(j, 1, j + 2)), j)` applied to 2 gave 6 instead of 10:
  the upper bound read the loop counter, not the parameter `j`. A lower bound
  `j` (`Sum(j, Limits(j, j, 5))` with an outer `j`) threw
  `Cannot access 'j' before initialization`. The loop now steps a separate
  counter when a bound has no compile-time value, and only the loop body
  declares the index. In GLSL and WGSL, the loop condition read the integer
  counter for an upper bound `j` (`for (int j = 1; j <= int(floor(j)); j++)`):
  such a bound is now evaluated into a local before the loop. In Python, a bound
  of a later clause that reads an outer variable with the name of an index
  (`Sum(j + k, Limits(j, 1, 2), Limits(k, 1, k))`) raised an `UnboundLocalError`
  in the generator expression: the later clauses now get fresh index names. On
  every target, a `Sum` or `Product` with a bound that has a known effect
  (`Sum(j, Limits(j, 1, Random(Range(2, 3))))`, a call of a function declared
  not pure) now declines, as the interpreter leaves it unevaluated; before, the
  JavaScript and GLSL code evaluated the bound. A call of a function that is
  declared with a type, has no definition and is supplied by the host (the
  `functions` option) still compiles: the interpreter evaluates that bound once
  the function has a value.

- **An indefinite integral computed through a second integral uses the variable
  of the enclosing scope.** With `g(f) := \int f\,dx`, the result `1/2 * x^2` of
  `g(x)` held an `x` of the scope of the integral, which was discarded when the
  integral returned. That `x` was not the global `x`: the result was not
  `isSame` to `1/2 * x^2` written directly, and after `x := 3` it did not
  evaluate to `9/2`. Now it does both. The same applies when the integrand calls
  a user function that reads a symbol with the name of the variable
  (`\int g(k)\,dk` with `g(a) := a k x` gives `x * k^2`, or
  `1/2 * k * x * "k_1"^2` when `k` has no value), when it calls a user function
  named like a library function, and when the integrand is a list or a tuple
  (`\int [x, x^2]\,dx` gives `[9/2, 9]` after `x := 3`).

- **The debug check of dead bindings (`CE_DEBUG_BINDINGS`) reports no live
  read.** It reported a read of a discarded scope in two correct cases: the
  index of a `Sum` or `Product` evaluated with `evaluateAsync()` after an
  `evaluate()`, and the index of a lazy comprehension that a function call
  returned, read through another call of the same function (`u(u(b))` with
  `u := (l) => [l[i] for i in 1..n]`). The values were correct; only the check
  threw.

- **`Count`, `Length`, `ListFrom`, `Sum` and the other consumers that read a
  whole `FlatMap` list it when its callback gives an asynchronous-only function
  as data.** An asynchronous-only function has only an `evaluateAsync` handler.
  With `slowF` such a function, `Count(FlatMap([1, 2], x ↦ [x, slowF]))` stayed
  unevaluated under `evaluate()` and `evaluateAsync()`, although the view is
  `[1, slowF, 2, slowF]`. The count is now `4`, and `IsEmpty` is `False`. The
  symbol `slowF` is an element and is not applied. The same applies to a named
  user function `f(x) := [x, slowF]` given as the callback. A symbol counts as
  data only at a position known to hold data: an element of a `List`, `Tuple` or
  `Set`, a value of a dictionary, a branch of an `If` or the last statement of a
  `Block`, each in the result of the callback. At any other position an operator
  can apply it, and a view whose walk can apply such a function stays
  unevaluated, because the walk of `FlatMap` is synchronous: `x ↦ slowRange(x)`,
  `x ↦ Map(slowF, Range(1, x))`, `x ↦ Sort([x, 3, 1], slowLess)`,
  `x ↦ Tabulate(slowF, x)`, or a source `Map(slowF, Set(1, 2))`.

- **A collection-first callback operator with a function as its collection
  operand is a type error.** `Filter`, `Reduce`, `Scan`, `TakeWhile`,
  `DropWhile`, `FlatMap`, `MaxBy` and the other operators that take the
  collection first now refuse a function at the collection position, as `Sort`
  does: `Filter(x ↦ x > 0, [1, 4])` is
  `Filter(Error(ErrorCode("incompatible-type", "collection", "(x: unknown) -> boolean"), x ↦ x > 0), [1, 4])`,
  canonical, invalid and typed `error`. Before, the call was kept as written and
  was not canonical. As an operand of a sum, its evaluation printed "Assertion
  failed" messages on the console
  (`Apply(xs ↦ 1 + Filter(x ↦ x > 0, xs), [1, 4])`), and in the body of a
  function it was applied to each element of the list instead of to the list. A
  callback-first operator with a function at its collection position is refused
  the same way, whatever its callback position holds:
  `Fold(xs, 0, (a, x) ↦ a + x)`, `Map(t, f)` with `t` undeclared, and
  `Map(Sin, Cos)`. A function is never a collection. `Map` keeps its own report
  of the wrong order (`Map([1, 4], f)`). The optimization form
  `ArgMax(f, domain)` and `ArgMin(f, domain)` now accepts any function, not only
  a function literal (an operator such as `Sin`, a symbol declared with a
  function type, or a call whose value is a function, such as
  `Derivative(Sin)`), with a set or an undeclared domain.
  `ArgMax(Sin, RealNumbers)`, `ArgMax(g, D)` with `g: (real) -> real` and
  `D: set<real>`, and `ArgMax(g, RealNumbers)` with a variable `g` declared
  `function` that holds `Sin` are valid and stay unevaluated, as
  `ArgMax(x ↦ sin(x), RealNumbers)` does. An undeclared domain symbol is not
  declared by the call.

- **The generic `Sum`/`Product` loop of a custom compile target reads a symbolic
  bound.** A custom target with no `Sum` or `Product` of its own (for example
  one whose `functions` is `() => undefined`) replaced a bound with no numeric
  value by a default: `Sum(j, Limits(j, 1, n))` with `n` an `integer` compiled
  to `while (j <= 10001)`, so the compiled value for `n = 4` was `50015001`
  instead of `10`. A bound is now compiled as an expression (`n`, `m + 1`, `2n`)
  and evaluated once, before the loop. A bound that names an outer variable with
  the name of the index (`Sum(j, Limits(j, j, 5))`) reads that variable; before,
  the compiled code threw a `ReferenceError`. A run-time bound that is not a
  safe integer answers `NaN`, as the JavaScript target does, instead of a loop
  that does not end. The compilation now declines, with a reason, for a bound
  that has no compile-time value and is not typed `integer`, an infinite bound,
  a bound that is not pure (`Random(…)`, which the interpreter leaves
  unevaluated), and an indexing set other than `Limits` (`Element(j, L)`). With
  no indexing set, `Sum(x)` of a number `x` compiles to `x`, and `Sum(L)` of a
  list of real numbers compiles to a reduction (before, the compilation threw a
  `TypeError`); any other operand, such as a nested list or a list of complex
  numbers, declines.

- **Python compilation: the name of an operator or a function used as a value
  declines.** The interpreter gives the symbol itself, and Python code has no
  form for a symbol value. `Head(List(1))` and `Head(Dictionary())` compiled to
  the Python code `List` and `Dictionary`, and a bare `Sqrt` or user function
  `f` to its name, which raise a `NameError` when the code runs; `Head(x + 1)`
  and a bare `Add` compiled to the JavaScript source `(a,b) => a + b`, which is
  a Python syntax error. These compilations now decline with a reason, and the
  default `fallback: true` uses the interpreter. A parameter or a `vars` key
  spelled like an operator (`Add`) is an input and still compiles. This change
  does not affect the callback operand of a higher-order operator: as before,
  `Add`, `Subtract`, `Multiply` and `Divide` compile as the combiner of `Reduce`
  (which also accepts `Min` and `Max`), and another operator or function name,
  such as `Sqrt` in `Map(Sqrt, v)`, declines.

- **`N()` of a definite integral evaluates a `D` in the integrand whose variable
  is not the integration variable.** Before,
  `Integrate(D(y·z², y), Limits(z, 0, 1)).N()` stayed unevaluated, because the
  numeric route read `y` as a free symbol with no value, while `evaluate()` gave
  `1/3`. When the integrand has a free symbol, the numeric route now evaluates
  each held `Integrate`, `Sum`, `Product` or `D` first, as the exact route does,
  and integrates the result when no free symbol is left: the example gives
  `0.3333…`. A `Sum` or `Product` with a bound that reads an integration
  variable stays held, and the content of a `Hold` is not evaluated.

- **A `Sum` or `Product` whose bound is a call of a host function with a real
  result type that is not an integer type stays symbolic.** With
  `g(t) := \begin{cases} 0.5 & t < 1 \end{cases}`, `\sum_{k=g(n)}^{3} k`
  simplified to `1/2·(−g(n)^2 + g(n) + 12)`, which is 6.125 at `n = 0`, while
  the sum, which rounds the bound 0.5 down, is 6. The undeclared `n` in the
  argument no longer lets the closed form through: the result type of a host
  function without a type handler (here `missing | real`) does not depend on its
  arguments. A host function whose result type is `number` (`h(t) := 2t`) or an
  integer type, and a library operator such as `\sqrt{n}`, keep the closed form,
  as the same bound written inline (`2n`) does.

- **`simplify()` keeps the binding of the index of a `Sum` or a `Product` when
  it rewrites a bound and keeps the body as it is.** With
  `g(t) := \begin{cases} 0.5 & t < 1 \end{cases}`,
  `Sum(k, Limits(k, g(0), 3)).simplify()` printed as
  `Sum(k, Limits(k, 0.5, 3))`, but its value was `4k`, not 6: the index `k` in
  the body was read as a free symbol. Its value is now 6.

- **A type is computed again at once when an inferred type of a symbol it uses
  widens** (CE-36). When an inferred type widens while a type is being computed
  (for example `x`, inferred `integer`, becomes `real`, as a `for` index widened
  by a later assignment in the loop of a signature derivation), a type cached
  before the widening was served until the outermost computation ended, so
  `x + 1` could stay `integer` after `x` became `real`, and a derived result
  type could be too narrow. A narrowing of an inferred type still takes effect
  when the outermost computation ends: until then a cached type can be wider
  than it could be, but it is never wrong.

- **A set no longer merges two random draws into one.** The canonical form of
  `Set(Random(), Random())` was `Set(Random())`, so
  `Count(Set(Random(), Random()))` was always `1`. Two elements with a known
  effect (a call of `Random()`, or of a function declared with the `random`
  effect) are now both kept in a set literal, in a set comprehension, and in the
  results of `Union`, `Intersection` and `SymmetricDifference`, also when an
  unevaluated `Union` is counted or walked. Pure elements are still
  deduplicated.

- **A call of a function literal over an operand whose type is a union with a
  tuple arm and no list arm has a type that holds its value** (CE-546). With
  `T := a ↦ 2a`, `T(y)` for `y := (3, 4)` is `(6, 8)`, and these calls were
  typed `number`. Now `y: number | tuple<real, real>` gives
  `number | tuple<number, number>`, the union of the results of the arms;
  `y: tuple<real, real> | tuple<real, real, real>` gives
  `tuple<number, number, number> | tuple<number, number>`; and
  `y: string | tuple<real, real>`, `boolean | tuple<real, real>` and
  `number | missing | tuple<real, real>` give `any`. A call with one of these
  unions and a second operand that can be a list that the call maps gives `any`.
  A transparent alias of such a union is typed the same way.

- **A call of a function that maps a list whose elements may be tuples has a
  type that holds its value.** The call binds each tuple element whole, and the
  body decides the shape of the result. With `T := a ↦ 2a` and `y` declared
  `number | tuple<real, real>`, `T([y, y])` was typed `list<number>`, but for
  `y := (3, 4)` its value is `[(6, 8), (6, 8)]`; it is now typed
  `list<number | tuple<number, number>>`. `T([(1, 2), (3, 4)])` was typed
  `vector<2>` and is now `list<tuple<number, number>>`. When an element type has
  a tuple beside another kind of value, or the body does not compute the tuple
  component by component (`a ↦ |a|`), the result is typed `any` or `list<any>`.

- **The type of `D` and of an indefinite `Integrate` holds the values that the
  enclosing binding of a variable gives them** (CE-139). The value of
  `D(a^2, a)` is `2a`, and outside the derivative `a` reads the binding that
  encloses it. When that binding holds a list, the value is a list, but the type
  was `number`: `(a: list<real>) ↦ D(a^2, a)` was typed
  `(a: list<real>) -> number`, and applied to `[1, 2]` it gave `[2, 4]`. It is
  now typed `(a: list<real>) -> list<number> | number` (the number is for a
  closed form without the variable: `D(3a, a)` is `3`). A global or a block
  local of a list type gives the same type. When the binding can hold a value
  that is not a tensor of numbers, or the derivative is not a number
  (`D([a^2, a^3], a)` gives a nested list), the type is `any`. A binding of type
  `real` or `unknown` keeps the type `number`. Compiled JavaScript evaluated the
  closed form with the variable read as a number (`NaN` for a list); the
  compilation now declines for a `D` whose closed form holds a variable with a
  list binding that is a parameter or a block local, and for an `Integrate`
  whose variable has a list binding. A `D` over a global list is still compiled,
  as a broadcast.

- **A list or a set that holds a failed cell evaluates its other cells**
  (CE-670). Before, the literal was kept as it was, so with `I = ∫_0^1 x^x dx`,
  `(y·[I, "a"]).N()` gave `[y·I, Error(…)]` with the integral not computed, and
  `[a, Error(…)]` stayed `[a, Error(…)]` after `a := 5`. Now `(y·[I, "a"]).N()`
  gives `[0.78343…·y, Error(…)]`, `[a, Error(…)]` evaluates to `[5, Error(…)]`,
  `{5, a, Error(…)}` to `{5, Error(…)}`, and a finite `Map` cell becomes a list,
  as in a literal with no failed cell. The failed cell stays as it is:
  `[a, ln("b")]` evaluates to `[5, ln(Error(…))]`. A set comprehension with a
  failed cell stays as it is.

- **A subscript with several indices is serialized with its commas.**
  `ce.parse('A_{n,m}').latex` was `A_{n m}`, which parses back as the symbol
  `A_nm`, and `ce.parse('A_{i,j}').latex` was `A_{\imaginaryI j}`, which parses
  back as the symbol `A_ImaginaryUnitj`. The indices of
  `Subscript(A, Sequence(n, m))` are now written `A_{n, m}`, which parses back
  as the same expression. A subscript with one index is not changed.

- **`subs()` and `freeVariables` read the index of a raw `Sum`, `Product`,
  `Integrate` or `NDSolveFunction` as the canonical form does.** With
  `e = ce.expr(['Sum', ['Add', 'x', 1], ['Limits', 'x', 1, ['Add', 'x', 1]]], {form: 'raw'})`,
  `e.subs({x: 2})` kept the upper bound `x + 1`, and `e.freeVariables` was `[]`.
  Now the upper bound is `2 + 1` and `e.freeVariables` is `["x"]`: the bounds of
  a clause read the outer `x`. The `Tuple` and bare-symbol spellings of a clause
  now bind their index: raw `["Sum", "k", "k"]` with `subs({k: 7})` gave
  `["Sum", 7, 7]`, and now stays `["Sum", "k", "k"]`. A bound of a `Tuple`
  clause or of a flat clause reads the outer value of the index, in the raw and
  the structural forms: `["Sum", "k", ["Tuple", "k", 1, "k"]]` with
  `subs({k: 7})` gives `["Sum", "k", ["Tuple", "k", 1, 7]]`, as `Limits` does.
  The variable of an indefinite `Tuple` or `Hold` clause of an `Integrate` is
  free: `["Integrate", "x", ["Tuple", "x"]]` has the free variables `["x"]`.

- **A `Sum` or `Product` whose bound is a call of a user function with a real
  result type that is not an integer type stays symbolic.** With
  `g(t) := \begin{cases} 0.5 & t < 1 \end{cases}`, `\sum_{k=g(n)}^{3} k`
  simplified to `1/2·(−g(n)^2 + g(n) + 12)`, which is 6.125 at `n = 0`, while
  the sum, which rounds the bound 0.5 down, is 6. The undeclared `n` in the
  argument no longer lets the closed form through: the result type of a user
  function without a type handler (here `missing | real`) does not depend on its
  arguments. A user function whose result type is `number` (`h(t) := 2t`) or an
  integer type, and a library operator such as `\sqrt{n}`, keep the closed form,
  as the same bound written inline (`2n`) does.

- **A `Sum` or `Product` keeps the binding of its index when `simplify()`
  rewrites a bound or the body.** With `g(t) := {0.5 if t < 1}`,
  `ce.box(['Sum', 'k', ['Limits', 'k', ['g', 0], 3]]).simplify()` printed
  `Sum(k, Limits(k, 0.5, 3))`, but its `N()` and `evaluate()` gave `4k`, not
  `6`: the rebuilt `Sum` had no local scope, so the index `k` in the body was
  read as a free symbol. A nested sum gave a wrong number:
  `Sum(Sum(k, Limits(k, g(0), j)), Limits(j, 1, 3)).simplify()` gave `18`, not
  `10`, because the inner sum read the index `j` of the outer sum before the
  simplification. The rebuilt `Sum` and `Product` now keep their local scope.

- **A limit at 0 of a root or a power with a symbolic degree or exponent no
  longer gives a wrong value.** With `n` assumed negative,
  `ce.box(['Limit', ['Root', 'x', 'n'], 'x', 0]).evaluate()` gave `Root(0, n)`,
  although `Root(x, n) = x^{1/n}` grows without bound as `x` tends to 0 from
  above. With `m` of unknown sign, `Limit(x^m, x, 0)` gave `0^m`,
  `Limit(x·x^m, x, 0)` gave `0`, and `Limit(e^{m ln x}, x, 0)` gave `e^{-∞·m}`,
  although each limit is infinite for some negative `m`. These limits now stay
  unevaluated. A degree or an exponent known to be positive still gives the
  value at 0.

- **A `Sum` or a `Product` whose bound is a derivative with a constant value is
  evaluated.** The variable of a derivative is free in it (`D(x, x)` is the
  derivative at `x`), so a bound such as `D(x, x) + 2` was read as a symbolic
  bound. The bound is now evaluated, and its value is used when it has no free
  variable. `\sum_{k=1}^{D(x,x)+2} k` stayed unevaluated and is now `6`.
  `\prod_{k=1}^{D(x,x)+2} k` was `(D(x,x)+2)!` and is now `6`. A bound whose
  value still has a free variable (`D(x^2, x)`, which is `2x`) keeps the
  operator symbolic, and `simplify()` gives no closed form for a bound whose
  value is not an integer.

- **In a function body, the asynchronous evaluation of an arithmetic operator or
  a user function applied to a lazy `Map` or `Filter` of a parameter gives the
  value of `evaluate()`.** `(xs ↦ 1 + Map(x ↦ 2x, xs))([1, 4])` gave `[]` under
  `evaluateAsync()`, and `(xs ↦ -Map(x ↦ 2x, xs))([1, 4])` did not end; they now
  give `[3, 9]` and `[-2, -8]`. The code that runs after each `await` of a
  broadcast now runs in the context of the evaluation, where the parameter has
  its value.

- **A compiled `Sum` or `Product` whose body writes its index gives the value of
  the interpreter.** The interpreter binds the index to its next value at each
  iteration, whatever the body wrote: `Σ_{j=1}^{n} (j ≔ j + 1; j)` at `n = 4` is
  2 + 3 + 4 + 5 = 14. The JavaScript loop stepped the variable that the body
  wrote, so it skipped iterations and gave 6 (and a write such as `j ≔ −j`
  looped forever). With constant bounds, the JavaScript target declined the
  write, and the Python, interval, GLSL and WGSL targets declined it with any
  bounds. Now the loop steps a separate counter, and each iteration gives the
  index the value of the counter, on the JavaScript, Python, interval, GLSL and
  WGSL targets and on a custom target with no `Sum` of its own; a body that
  writes its index is not unrolled. With several independent clauses, a write to
  an outer index lasts for one tuple of indices, as in the interpreter; when a
  bound reads another index, the clauses nest, and the write lasts until the
  next value of that index.

- **A limit at infinity of a root of `1/x`.**
  `Limit(Root(1/x, -2)/Ln(x), x, +∞)` stayed unevaluated. Its canonical form is
  `1/(ln(x)·√(1/x))`, and `Root(1/x, -2) = √x` grows faster than `ln x`, so the
  limit is `+∞`. As `x → +∞`, `√(1/x)` and `ⁿ√(1/x^m)` are now rewritten to
  `x^(-1/2)` and `x^(-m/n)`, and a quotient of quotients `(a/b)/(c/d)` is
  compared as `(a·d)/(b·c)`. Before, the factor `√(1/x)` and a quotient in the
  denominator had no growth order, and the numeric comparison does not separate
  `ln x` from `√x`.

- **The asynchronous numeric evaluation of a lazy `Map` that a call makes reads
  the names of that call.** With `f := (x, k = d) => x * k` and
  `g := (d, xs) => Map(f, xs)`,
  `await ce.box(['g', 10, ['List', 1, 2]]).evaluateAsync({ numericApproximation: true })`
  gave `Map(…NumericApproximation(f(_1, d))…, [1, 2])`, read as `[d, 2d]`; it
  now gives `[10, 20]`, as `evaluate()` and `N()` do. An asynchronous evaluation
  keeps its own stack of contexts, and two steps used the stack of the engine
  instead: the numeric rewrite of the callback of `Map`, and the read of a lazy
  view in the context of the call that made it.

- **A closure made in a function call no longer reports a "discarded scope"
  error under the debug check of bindings (`ce._debugBindings`)** when it reads
  a name of that call after the call has returned. With
  `f := (x, k = d) => x * k` and `o1 := d => (xs => ListFrom(Map(f, xs)))`,
  `o1(7)([1, 2])` threw 'The binding of "d" belongs to the discarded scope
  "call"'. The same happened for a closure that the call assigns to an outer
  variable. The frame of a call that makes such a closure is now kept alive, as
  for a lazy view. The same holds for a closure made in a loop body, a block, a
  comprehension or a big operator (`Sum`, `Product`), and for a recursive call
  that runs the same loop as its caller, which reported a read of a discarded
  scope between two live runs of the loop. The values were already correct
  without the debug check.

- **A function literal that a comprehension element assigns to an outer variable
  captures the index of its element** and the parameters of the enclosing call,
  as a literal made in a `for` loop body does. In Epsil, `let h = (x) => x` then
  `ListFrom([do { h = (x => x + d); 0 } for d in [3]])` then `h(1)` gave
  `d + 1`; it now gives `4`. Inside a function `b(n)`, with `x + d * n`, the
  result was `d·n + 1`.

- **A lazy view that a loop iteration or a block stores outside it reads the
  values of that iteration.** In Epsil,
  `let h = []; for d in [3, 6] { if d == 3 { h = Map(x => x + d, Range(1, Infinity)) } }`
  then `ListFrom(Take(h, 2))` gave `[7, 8]`, the value of `d` after the loop;
  inside a function it gave `[d + 1, d + 2]`. It now gives `[4, 5]`. A lazy
  operator keeps its callback unevaluated, so the callback was never captured as
  a closure is. Now, when a `Map`, `Filter`, `Scan` or other lazy collection is
  assigned to a variable outside the loop or block, to a destructured target or
  to an object field, the loop indices and block locals that it reads are
  replaced by their values at the assignment. This also applies to a view inside
  a list, a dictionary or a branch of an `If`, and to a local that holds another
  view. A view read in its own scope, or stored in a variable of that scope,
  still reads the current values. A view reads a `let` local by its value at the
  assignment, while a closure reads it by binding (`docs/SCOPING-MODEL.md`).

- **`N()` of a definite integral evaluates a `D` whose variable is not the
  integration variable.** `Integrate(D(y·z², y), Limits(z, 0, 1)).N()` stayed
  unevaluated: the numeric route read `y` as a free symbol with no value, while
  `evaluate()` gave `1/3`. When the integrand has a free symbol, the numeric
  route now evaluates each `Integrate`, `Sum`, `Product` or `D` in it first, as
  the exact route does, and integrates the result when no free symbol is left:
  the example gives `0.3333…`. This is done only when it can remove every free
  symbol: the integrand has no effect (also through the value of a symbol), and
  no free symbol is outside these operators. `∫_0^1 a·Σ_{k=1}^{3} k·z\,dz` stays
  symbolic, and its `Sum` is not evaluated. A `Sum` or `Product` with a bound
  that reads an integration variable stays held, and the content of a `Hold` is
  not evaluated.

- **A `Sum` or `Product` bound that is not an integer is not put into a closed
  form.** `evaluate()` and `simplify()` put such a bound into a closed form, but
  the enumeration of the same operator rounds a numeric bound down. So the value
  depended on whether the closed form was made before or after the substitution.
  With `y` declared `real`,
  `\sum_{k=1}^{y}\left(\frac{1}{k}-\frac{1}{k+1}\right)` evaluated to
  `1 - 1/(y+1)`, about `0.714` at `y = 2.5`, while the sum at `y = 2.5` is
  `2/3`. `\prod_{k=1}^{y} k` gave `y!` (`3.32` at `y = 2.5`; the product is
  `2`). The operator now stays symbolic in these cases: a bound that is not an
  integer (`2.5`), a bound that holds a symbol declared with a type that is not
  an integer type (`real`, `number`, `complex`), and a bound whose symbols are
  all declared and whose type is not an integer type (`n/2` or `n + 1/2` with
  `n` declared `integer`). A bound declared `integer` (`n`, `2n`, `n!`) and an
  undeclared symbol keep the closed forms.

- **`FlatMap` with a callback that names a user function gives the same result
  as the same callback written inline.** With `f := x ↦ [x, x]`,
  `ListFrom(FlatMap([1, 2], f))` is now `[1, 1, 2, 2]`, and `Count`, `Sum` and
  `Length` over it are `4`, `6` and `4`. Before, they stayed unevaluated,
  because the type of `FlatMap([1, 2], f)` came from the inferred signature of
  `f`, `(x: unknown) -> list<unknown>`, which has no fixed length. The type now
  comes from the call of `f` on one element of the source: `FlatMap([1, 2], f)`
  is `list<integer>`, as for the inline callback. A callback that returns a
  tuple also gives a finite result now: `ListFrom(FlatMap([1, 2], x ↦ (x, x)))`
  is `[1, 1, 2, 2]`.

- **`ListFrom`, `Count`, `Length`, `IsEmpty`, `Sum`, `Product`, `Max`, `Min`,
  `Reduce` and `Fold` give a value for a `FlatMap` over a finite source whose
  callback result has no fixed length.** `Sum(FlatMap([1, 2], x ↦ Range(1, x)))`
  is now `4`; before, it stayed unevaluated, because the type `list<integer>` of
  `Range(1, x)` does not show whether the inner result is finite. These
  operators now list the view with the same bounded walk as
  `evaluate({ materialization: true })`. When an inner result is infinite,
  `ListFrom` gives the `out-of-range` error "a finite collection", `Count` and
  `Length` give `+∞`, and the others stay unevaluated, as for any other infinite
  collection. When the evaluation of the view is another error (a callback
  symbol that holds an error value), each of them gives that error. A `FlatMap`
  over an empty source is finite. `Take` and `First` still apply the callback
  only to the elements they read. The materialization of a `FlatMap` now stays
  lazy when an inner result is a `Filter` that stops at the iteration limit, or
  applies an operator that has only an `evaluateAsync` handler. Before, the
  first threw an iteration-limit error, and the second listed the unevaluated
  calls as elements.

- **A non-canonical `Integrate` binds the variable of its canonical form**
  (CE-699). `subs()` on a non-canonical `Integrate` whose limits name no
  variable now keeps the variables that the canonical form binds. For example,
  `ce.box(['Integrate', ['Multiply', 'x', 'y'], ['Limits', 0, 1]], { form: 'raw' }).subs({ x: 3 })`
  replaced `x`, and the integral was `3/2`; now `x` stays the variable of
  integration, and the integral is `y/2`, as for the canonical form. The free
  variables of the two forms are the same (`["y"]`). The limit can be written
  `Limits(Nothing, a, b)`, `Limits(a, b)`, `Range(a, b)` or the
  `Tuple(Nothing, a, b)` of `ce.parse('\int_0^1 xy', { form: 'raw' })`.

- **An integral evaluates a `Sum`, a `Product` or a `D` in its integrand before
  it integrates** (CE-616), as it already did for an inner `Integrate`.
  `\int_0^1 \frac{d}{dx}x^3\,dx` and `\int_0^1 2\left(\sum_{k=1}^3 kx\right)dx`
  gave an unevaluated `Integrate` under `evaluate()`; they are now `1` and `6`,
  the values that `N()` gave. The index of a `Sum` stays bound, and the variable
  of `D` is the integration variable. A sum whose value is conditional (an
  infinite series such as `Σ_{n=0}^∞ n·x^n`), a sum whose bound reads the
  integration variable (`∫_0^3 Σ_{k=1}^{x} … dx`, a step function), and an
  operator inside `Hold` are not replaced.

- **`Limit` at infinity of a power whose base tends to 0 and whose exponent is
  negative.** With `n < 0`, `Limit(Root(1/x, n), x, +∞)` gave `ComplexInfinity`;
  `x^{-1/n}` is real and positive, and the limit is now `+∞`. The rule gives
  `±∞` only when the base is proved positive (or negative, with an exact integer
  exponent, by parity) for large `x` from its form, and the limit of the base is
  exactly 0: `Root((130 − x)/x², n)` and `Root(sin(x)/x, n)` stay unevaluated,
  and `Root(10^{-30} + 1/x, n)` gives the finite `(10^{-30})^{1/n}`.

- **With `evaluateAsync()`, a function literal that a block returns, applied
  inside a function body, reads the locals of the block.**
  `Apply(Function(Apply(Block(Declare(c, 'real', 5), k ↦ c + k), n), n), 1)`
  gave `c + 1` with `evaluateAsync()` and `6` with `evaluate()`; it now gives
  `6` on both routes, also when the literal calls a function that the block
  defines, and for two asynchronous evaluations that run at the same time.

- **A `Map` callback that calls a block local holding a function is evaluated.**
  `Block(Declare(c, 'real', 5), Assign(h, k ↦ c + k), Map(k ↦ h(k), [1, 2]))`,
  and the same with `Declare(g, 'unknown', x ↦ c + x)`, gave `[h(1), h(2)]` with
  `evaluate()` and `evaluateAsync()`. They now give `[6, 7]`, as a function
  defined with `DefineFunction` does. A function value assigned in the global
  scope is not changed.

- **With `evaluateAsync()`, a function literal that leaves a `Block` and calls a
  function that the block defines reads the locals of the block.**
  `Apply(Block(Declare(c, 'real', 5), DefineFunction(h, k ↦ c + k), k ↦ h(k)), 1)`
  gave `c + 1` with `evaluateAsync()` and `6` with `evaluate()`, and
  `Map(k ↦ h(k), [1, 2])` or `Map(k ↦ k + h(1), [1, 2])` as the value of the
  same block kept `c` free. Both routes now give the value of `evaluate()`.
  Under `.N()`, a `Map` whose callback calls a function defined in a block now
  evaluates its elements exactly first.

- **`Limit` at infinity: a root with a negative degree and a radicand that
  decays.** The growth ranking gave every root with a constant negative degree
  the rank of a bounded term, whatever the radicand. With `n < 0`,
  `Root(1/x, n) = x^{-1/n}` grows like a power of `x`, so
  `Limit(Root(1/x, n)/ln(x), x, +∞)` returned `0`. A negative degree now gives
  the bounded rank only when the radicand tends to infinity; otherwise the rank
  is not known, and the limit stays unevaluated instead of giving a wrong value.

- **The product of a scalar and a list with a failed cell gives the same result
  on every route** (CE-671). The failed cell is the error with one `Multiply`
  frame, as `3·Error("missing")` is: `3·[Error("missing"), 2]` evaluates to
  `[Error("missing"), 6]`. Before, `evaluate()` added a `Divide` frame to the
  trace of the error, and `.N()` kept the cell as the unevaluated product
  `3·Error("missing")`. The same holds for a scalar times a matrix and for the
  element-wise product of two vectors.

- **With `evaluateAsync()`, a lazy collection that leaves a `Block` reads the
  locals of the block, as with `evaluate()`.** The function literal of the
  collection read a local as a free symbol after the block ended:
  `Block(Declare(c, 'real', 5), Map(k ↦ c + k, [1, 2]))` gave `[c + 1, c + 2]`
  instead of `[6, 7]`. This also holds for a function defined in the block and
  passed to the collection (`h(k) := c + k`, then `Map(h, [1, 2])`), for a
  function literal returned as the value of the block, and for nested blocks in
  a function body.

- **An exact integer power or binomial near the 1,000,000-digit limit is
  computed.** The interpreter leaves an exact `Power` or `Binomial` with more
  than 1,000,000 decimal digits unevaluated, and two estimates of the number of
  digits were wrong. `Power(999999999999999, 66000)` (990,000 digits) stayed
  unevaluated; it now gives the integer. `Binomial(10^100, 30000)` built an
  integer of about 2.9 million digits; it now stays unevaluated at once.

- **A power of `0`, `1` or `−1` to a large integer exponent is evaluated.**
  `(−1)^(10^7)` stayed unevaluated, because the size limit of an exact power
  multiplies the digits of the base by the exponent; it now gives `1`. Under
  `N()`, `(−1)^(10^30 + 1)` gave `1`, from the double of the exponent; it now
  gives `−1`. A float exponent still gives a float result.

- **A power of `i` or `−i` to a large integer exponent is evaluated.**
  `i^(10^30 + 1)` stayed unevaluated under `evaluate()` and `simplify()`; it now
  gives `i`, from the exponent modulo 4. `(−i)^(10^30 + 3)` gives `i`. A base
  that is only close to `i`, such as `((10^30 + 1)/10^30)·i`, is not taken as
  `i`.

- **A compiled name equal to a name of the emitted code is renamed.** The
  compiled JavaScript calls its runtime helpers through `_SYS` and uses other
  fixed names, such as `_upper` for the bound of a `Sum` loop. A parameter of a
  top-level function literal, a block local or a loop index with one of these
  names kept it and hid the emitted one: `(_SYS) ↦ _SYS!` threw a `TypeError`,
  and `(n, _upper) ↦ Sum(k·_upper, k = 1..n)` at `(3, 10)` gave `18` for `60`.
  Such a name is now emitted under another name. The same applies to the names
  `_f`, `_v`, `_c`, `_pt` and `result` of the JavaScript target and `result` and
  `_r` of the interval target: a list parameter `_f` in `Map(y ↦ y + 2, _f)`
  threw `_f.map is not a function`, and `Coalesce(At(L, 5), _c)` gave `null` for
  the value of `_c`. In a complex `Reduce`, a user function named `_a` or `_x`
  used as the combiner no longer declines.

- **A destructuring `Declare` whose pattern repeats a name compiles.** The
  MathJSON `["Declare", ["Tuple", "a", "a"], "'unknown'", ["Tuple", 1, 2]]`
  gives `a` the value at its last position, `2`, in the interpreter. The
  JavaScript target emitted `let a = 1; let a = 2`, which is not valid
  JavaScript, so `compile(…, { fallback: false })` threw a `SyntaxError`. It now
  compiles on every target, and the name gets the value at its last position,
  also in a nested pattern, a loop body or a `Sum` body.

- **A block-local function that receives complex values compiles in the complex
  lane.** In `Block(g ≔ (a, b) ↦ a + b, Reduce(L, g, 0))` with
  `L: list<complex>`, the compiled code used the real `+` for `g` and gave the
  string `"[object Object]…"` for `[1 + i, 2]`; the interpreter gives `3 + i`. A
  call of a block-local function, as a `Reduce`, `Fold` or `Scan` combiner, as a
  `Map` callback or directly, with a complex argument (or a point with a complex
  coordinate) at a parameter that is not typed complex now restarts the
  compilation in `mode: 'complex'`, which gives the interpreter's value. With
  `mode: 'strict'` the compilation declines, with a message that asks for a
  `complex` annotation on the parameter of the function literal. The same
  applies to a function defined with `ce.assign()` that receives a point with a
  complex coordinate: with `h = (p) ↦ p[1] + 1` and
  `P: list<tuple<complex, real>>`, `h(P[1])` gave `"[object Object]1"`; it now
  gives `2 + i`. The argument and the parameter types are compared position by
  position, and a position with no type (`any`, `unknown`) counts as real: in
  `mode: 'strict'`, `(L) ↦ Length(L)` applied to such a point now declines.

- **A Leibniz derivative in the integrand of an integral leaves the closing
  differential to the integral** (CE-617). `\int_0^1 \frac{d}{dx}x^3\,dx` parsed
  as the derivative of `x^3·d·x`, so the integral had no variable and its value
  still held `x`. The operand of `\frac{d}{dx}`, `\frac{\partial}{\partial x}`
  and `\partial_x` now stops where the enclosing expression stops: the integral
  reads `dx` as its variable, and with `E = [1, 2]`,
  `\int_0^1 \frac{d}{dx}x^3 \cdot E\,dx` evaluates to `[1, 2]`, as the MathJSON
  form does. A derivative operand that starts with a function
  (`\sin \frac{d}{dx}\cos x`) still takes that function.

- **A LaTeX `value` of `ce.declare()` is parsed** (CE-58). A value such as
  `'$1+2$'` gave an `unexpected-token` error, because the `$` delimiters were
  passed to the parser. It now gives `3`.

- **A statistics operator applied to a list literal infers the free symbols of
  the list as numbers** (CE-663). After `Mean([p, q])`, `p` and `q` are typed
  `number` (they were `unknown`), so a later `p ∧ q` is an error, and
  `Mean([p, q])` compiles. This applies to `Mean`, `Median`, `Mode`, `Variance`,
  `StandardDeviation`, `PopulationVariance`, `PopulationStandardDeviation`,
  `Skewness`, `Kurtosis`, `Quartiles` and `InterquartileRange`: their parameter
  is a union (`collection<nothing | number> | number`, with a `distribution` arm
  for some), and only its collection arm admits a list. A parameter with two
  arms that admit a list, such as `matrix | vector` at `MatrixMultiply`, still
  infers nothing. A symbol with no value is typed `number`, not
  `nothing | number`; a symbol that holds `Nothing` keeps the type `nothing`. A
  transparent alias of such a union
  (`declareType('nums', 'list<number> | boolean', { alias: true })`) infers the
  cells in the same way.

- **In a block that declares a local named `Pi`, a result built with the library
  π keeps its value when it is assigned** (CE-103). With `Pi` a block local of
  value `3`, `s := Sum(1/n², n, 1, ∞); s` gave `3²/6 = 3/2`: the assignment
  replaced each symbol that reads a block local with its value, and it read the
  library `Pi` of `π²/6` as the local. It now gives `π²/6`, as the evaluation of
  the same symbol does. A JSON round trip of such a result inside that block
  still reads `"Pi"` as the local.

- **The type of a call of a function with an early `Return` includes the value
  of the `Return`** (CE-737). With `x: real` and
  `g := y ↦ Block(If(y > 1, Return((y, y))), y + 1)`, `g(x)` was typed `number`,
  although `g(2)` is the point `(2, 2)`, so `2·g(x)` was typed as a number too.
  `g(x)` is now typed `number | tuple<number, number>`. The signature that is
  derived when a function literal is assigned to a name now joins the types of
  its early `Return` values, as the type of the literal already did.

- **A compiled element-wise `If` whose branch assigns a name declines.** With
  `L: list<real>`, `Block(p ≔ 0; If(L > 0, p ≔ 5); 2p)` compiled on `javascript`
  to code that ran the branch when the list `L > 0` had any element: for
  `L = [-1, -2]` it gave `10`, where the interpreter gives `0`. With
  `M: list<any>`, `Block(p ≔ 0; If(M[1], p ≔ 5); 2p)` gave `0` for
  `M = [[True, False]]`, where the interpreter gives `10`. An `If` or a `Which`
  whose condition is or can be a collection, and whose branch assigns a name or
  has a `Return`, a `Break` or a `Continue`, now declines with the code
  `'unsettled-shape'` on every target. An `Equal` or a `NotEqual` condition
  compares whole values, and is not such a condition. An element-wise
  conditional whose branches change nothing compiles as before.

- **A compiled `Comprehension`, `Sum`, `Product` or `Integrate` with an
  assignment where the interpreter does not change the outer name declines.**
  `Block(p ≔ 0; Comprehension(Block(p ≔ 5, i), i ∈ [1]); p)` compiled to code
  that gave `5`, where the interpreter gives `0`. An assignment of a name of an
  enclosing scope, a `Return`, a `Break` or a `Continue` in the body or a clause
  of a `Comprehension` (except the source of its first clause), in a clause of a
  `Sum` or a `Product`, or in the integrand or a bound of an `Integrate` now
  declines with the code `'unsettled-shape'`. A `Return`, a `Break` or a
  `Continue` in the body of a `Sum` or a `Product`, which gave JavaScript code
  with a syntax error (`Illegal break statement`), declines too. A local that a
  block of such a part assigns with no `Declare` counts as a name of an
  enclosing scope: `Comprehension(Block(q ≔ 2i, q + 3), i ∈ [1, 2, 3])`, which
  compiled to `[5, 7, 9]`, now declines; with `Declare(q, "real")` in the block
  it compiles.

- **A compiled function that assigns a name of an enclosing scope declines.**
  `Block(p ≔ 0; Filter(L, u ↦ Block(p ≔ 5, u > 1)); p)` compiled to code that
  gave `5`, where the interpreter, which does not run the callback when the
  result is not used, gives `0`. For `Limit` the compiled code gave `0` where
  the interpreter gives `5`. Because a function can reach such an operator in
  many ways (stored and passed by name, behind an `If`, returned by another
  function), every function literal that assigns a name of an enclosing scope
  (or an element of one), or that a `Break` or a `Continue` leaves, now declines
  with the code `'unsettled-shape'`: a callback, the value of a `Declare` or an
  `Assign`, a function returned by another one, and the body of a user function
  that the code calls. This includes cases where the two agreed: a stored
  function `g` that writes `p` and that the code only calls as `g(1)`, and the
  curried `Apply(Apply(Apply((y, w) ↦ (x ↦ Block(y ≔ 2, x + y)), 0), 1), u)`,
  which the interpreter fallback now computes. The root of the compilation, and
  a function that `Apply` applies where it is written to scalar arguments, still
  compile.

- **A compiled function literal that assigns the index of an enclosing loop
  declines.**
  `Block(n ≔ 0; Loop(Block(Apply(u ↦ k ≔ 5, 0), n ≔ n + 1), k ∈ 1..3); n)` gave
  `1` where the interpreter gives `3`. It now declines with the code
  `'unsettled-shape'`. A direct assignment of the index in a loop body is
  handled as before.

- **A compiled `Return` inside a `Loop` that has code after it declines.** With
  `L = [1, 2, 3]`,
  `p ↦ Block(q ≔ 0; Loop(If(i > 1, Block(q ≔ 7, Return(5))), i ∈ L); 100 + q)`
  gave `107` where the interpreter gives `5`: the compiled loop is a function of
  its own, so the `Return` ended only the loop. It now declines with the code
  `'unsettled-shape'`, also in the root and in a stored function. A `Return`
  inside a loop that is the last statement of the function, where the value of
  the loop is the value of the function, compiles as before.

- **A local that only a loop body assigns is not reported as an input.** In a
  function declared with the `scope` effect whose loop body assigns
  `p ≔ (t, 2t)`, a compilation of a call of the function reported `p` in
  `freeSymbols`, with the type `unknown`, although the generated code declares
  `p` as a local of the function body. The same is true for a name that only a
  branch or a nested block of a function body assigns.

- **A local of a function in a case of a `Match` is not reported as an input.**
  With `x: real` and `L: list<real>`, the compilation of
  `Match(x, 1 -> Map(L, v ↦ Block(q ≔ 2v, q)), _ -> L)` reported `q` in
  `freeSymbols`, with the type `unknown`, although `q` is a local of the
  function. The reference analysis now reads the canonical form of each case
  body, made in the same scope as the compiled code makes it, and reports only
  `x` and `L`.

- **`freeSymbols` does not list the variable of an outer integral that the bound
  of an inner integral reads.**
  `Integrate(e^(y^2), Limits(x, 0, 1), Limits(y, 0, x))` reported `x` as an
  input, although the compiled code binds it.

- **Compiled JavaScript is valid in strict-mode code when a binding has a
  reserved name.** `compile()` of
  `["Function", ["Multiply", 2, "arguments"], ["Typed", "arguments", "'real'"]]`
  gave the `code` string `(arguments) => 2 * arguments`, which is a syntax error
  in strict-mode code, so a host that evaluated `code` in a module failed. A
  parameter, a block local or a loop index named with a reserved word (`if`,
  `class`, `let`) made the compilation fall back to the interpreter, and one
  named after a global that the compiled code reads (`Math`, `undefined`) gave a
  wrong result or threw ("Math.sin is not a function"). Now such a binding is
  emitted under a fresh name on the `javascript` and `interval-js` targets, as a
  binding named `_SYS` is: the example above compiles to `(_p) => 2 * _p`. This
  applies to function parameters, block locals and the locals of a loop body,
  `Sum`, `Product`, `Loop` and `Comprehension` indexes, and integration
  variables. A body that assigns such a parameter also compiles, in a nested
  function literal and in an engine-defined function too. A free symbol keeps
  its name, because the compiled code reads it as `_.arguments`.

- **A function-valued expression compiled for `interval-js` can be called.**
  `compile(x ↦ 2x, { to: 'interval-js' })` reported `success: true`, but
  `run(3)` gave the compiled JavaScript function over enclosures, which a caller
  cannot call with numbers and which is not an interval value. Now a root whose
  value is a function (a `Function` literal, a block whose value is one, a
  symbol whose value is one, a partial application) has `calling: 'lambda'`, as
  on the JavaScript target: `run(3)` gives
  `{ kind: 'interval', value: { lo: 6, hi: 6 } }`, and each argument can be a
  number, an `Interval` or a boolean. Such a result has no `broadcast()`. A
  function-valued root declines with the reason when it reads a free symbol
  (`x ↦ a·x`), because there is no vars object to read the symbol from; when its
  value is a function (`x ↦ (y ↦ x + y)`), because the inner function would take
  enclosures. A function-valued `If` or `When` whose condition is decided at
  compile time is compiled as the function it selects:
  `If(1 > 0, x ↦ 2x, x ↦ 3x)` gives `6` for `run(3)`. Such a root declines when
  its condition is not decided (`Random() > 2`), because the interval lowering
  of `If` and `When` does not give a function, and when the `functions` option
  maps the `If` head or a head in its condition. The interpreter fallback of
  such a root also has `calling: 'lambda'`: it applies the expression to the
  arguments, each boxed with the type of its parameter, and a function value
  gives `{ kind: 'entire' }`. The standalone runtime
  (`createIntervalRuntime().load()`) calls a stored result with
  `calling: 'lambda'` with the same arguments, and its batch evaluators refuse
  such a result.

- **A dictionary compiles on the JavaScript and Python targets.**
  `compile(ce.box(["Dictionary"]), { to: "javascript" })` failed with "Could not
  compile expression: `{->}`", and so did every dictionary with entries. Thus a
  function literal with the parameter default `{}`, such as
  `(m: dictionary<integer> = {}) => m`, did not compile, while a default `[]`
  did. Now a dictionary compiles to an object literal in JavaScript
  (`{a -> x + 1}` is `({"a": _.x + 1})`) and to a `dict` display in Python
  (`{"a": x + 1}`), with each value compiled. The result has the form of a
  `dictionary` input: a plain object or a `dict`. A key `__proto__` is an own
  key of the object (the JavaScript literal writes it as the computed key
  `["__proto__"]`), not its prototype. Each evaluation makes a new object, so a
  call that changes the default dictionary does not change the default of the
  next call. A value whose type is `unknown`, and a value that can be `Nothing`
  (the interpreter leaves out its entry), do not compile; an untyped input in a
  value is refused by name, as elsewhere. A dictionary does not compile on the
  interval-js, GLSL and WGSL targets, which have no dictionary value; the error
  message gives the reason. A dictionary result with the keys `re` and `im` is
  returned as it is: `{re -> x, im -> 0}` gave the number `x`. A `dictionary`
  input with these keys, such as `{ re: 1, im: 0 }`, is accepted: it was refused
  as a complex number given for a real input.

- **A hexadecimal or binary number in a type string has its value.**
  `ce.type("0x10")`, `ce.type("-0x10")` and `ce.type("0b10")` gave the value
  type `0`, and `integer<0x0..0xff>` gave `integer<0..0>`. Now they give `16`,
  `-16`, `2` and `integer<0..255>`. A parameter default value such as
  `(x: number, k: number = 0x10) -> number` is decoded the same way, instead of
  being refused. A radix prefix with no digits (`0x`) is a parse error. In a
  dimension, `0x2` is still the shape `0 x 2`, a zero-length axis, and the
  length of a vector cannot be hexadecimal: `vector<0x2>` is a parse error (it
  was `vector<2>`). A length that is not an integer (`vector<2.5>`, which was
  truncated to `vector<2>`) or that is negative (`vector<-2>`, which was read as
  an unknown length) is now a parse error, and so is a length larger than
  `2^53 - 1` (`vector<1e300>`). `-1` is still accepted as an unknown length, as
  in `list<any^-1>`.

- **A lazy collection that a function returns calls its callback where it was
  created.** With `f := (x, k = d) => x * k` and `g := (d, xs) => Map(f, xs)`,
  the elements of `g(10, [1, 2])` were `d` and `2d`: they are computed when the
  collection is read, after `g` has returned, and the default `d` was read where
  the collection was read. They are now `10` and `20`, as in the compiled
  function and as with `ListFrom(Map(f, xs))` inside `g`. This applies to `Map`,
  `Filter`, `Scan`, `TakeWhile`, `DropWhile`, `FlatMap`, `Tabulate` (and
  `Table`, which evaluates to `Tabulate`), `Iterate` and `Fill` created during a
  function call, also in a `Block`, an `If` branch or a loop of its body, and
  also when the collection is in a list or a dictionary that the function
  returns, in another lazy collection (`Dedup(Map(f, xs))`), or in a variable
  that a returned function reads. A lazy collection created outside every
  function call is read as before, in the context of its reader. An operator of
  the host whose collection calls a function operand when it is read can set the
  new collection handler flag `callsCallbackOnRead` to get the same behavior.

- **The parameter of a function literal that is applied at once has the type of
  its argument in compiled code** (GitHub issue #498). With `n` declared
  `integer` and `evens` the list `Filter(Range(1, n), i ↦ Mod(i, 2) = 0)`,
  `Apply(d ↦ Sum(d), evens)` and
  `Apply(d ↦ If(Length(d) = 0, 0, Max(d)), evens)` did not compile ("possible
  'Nothing' elements"), and `Apply(d ↦ At(d, 1), evens)` compiled to a general
  element read. A bare parameter took only the type that its uses in the body
  give (`collection`). Now a bare parameter that receives a collection, and that
  `Apply` or `ApplyWhole` binds whole, has the type of the argument in compiled
  code (here `list<integer>`), as when the argument is written in place of the
  parameter. The expression itself is not changed, and a function literal with
  scalar parameters still maps over a list argument.

- **The MCP server enforces its resource and network security boundaries.** A
  tool call can shorten the server's time limit, but `timeLimit: 0` can no
  longer disable it and a larger value cannot extend it; checking, parsing,
  documentation lookup, and serialization now run under the server limit too. A
  Streamable HTTP listener on a non-loopback address requires
  `--auth-token-env <name>` and Bearer authentication with that environment
  variable's value, preventing an accidentally public unauthenticated server.

- **MathJSON dictionaries preserve hostile-looking keys as data.** Converting or
  serializing a dictionary with an own `__proto__` entry used to invoke the
  inherited setter on a temporary object, changing that object's prototype and
  dropping the entry. The conversion paths now define own data properties and
  ignore inherited properties of JavaScript record inputs.

- **Development dependencies no longer contain known npm advisories.** Patched
  `glob` and `minimatch` versions are enforced across Jest, Madge, and TypeDoc,
  and Jest's `deepmerge` dependency uses a vendored, MIT-licensed copy with
  prototype-poisoning keys rejected. `npm audit` now reports zero findings.

- **An expression with a sub-expression of type `error` declines on every
  compile target.** With `u` declared `real` and `ADD = (x, y) ↦ x + y`, the
  expression `ADD("ab", u)` is valid, but its type is `error`, and the
  interpreter gives an error. The `javascript` target compiled it, and
  `run({ u: 2 })` gave the string `"ab2"`. `Apply((x, y) ↦ x + y, "ab", u)`,
  `ADD(p, u)` with `p: boolean` (`3`) and a call of a user function whose body
  has the type `error` were wrong the same way. Now the compilation declines on
  `javascript`, `interval-js`, `glsl`, `wgsl` and `python`, also when the
  sub-expression is in a branch of an `If`, in the body of a function or in the
  stored value of a symbol that the expression reads. A name bound where it
  occurs (a parameter, a `Sum` index, a name that a `Block` statement assigns,
  after that statement) is not read as the global definition:
  `Apply((G) ↦ G + 1, u)` still compiles when the global `G` has a body of type
  `error`. A bound name is not followed to its global definition, but a node
  whose own static type is `error` declines also when it is a call of a bound
  name: `G() + u`, with `G` replaced through `functions`, declines when type
  inference gives it the type `error` from the engine's `G`. The diagnostic has
  the code `'static-type-error'` and the kind `'correctness'`, its `value` is
  the sub-expression, and `unsupported` holds `ErrorCode`, as for an invalid
  expression, so that a host can tell an error in the expression from an
  operator with no lowering. An invalid expression now has `ErrorCode` in
  `unsupported` on every target too: before, `Error("x")` had an empty
  `unsupported`.

- **Compiled JavaScript folds with an accumulator that becomes a list.** With
  `M` declared `list<vector<2>>`, `Reduce(M, (a, t) ↦ a + t, 0)` compiled, and
  `run({ M: [[1, 2], [3, 4]] })` gave the strings `["1,23", "1,24"]` where the
  interpreter gives `[4, 6]`: the step read its accumulator `a`, which has no
  declared type, as a number, and from the second step on JavaScript added a
  list to a number. The seed `[0, 0]`, `Fold`, `Scan`, a product, and a step
  that makes a list from a scalar seed over a range were wrong the same way. The
  step is now compiled with the accumulator typed by the values the fold passes
  to it (the seed joined with the step's result), so the step maps over a list
  accumulator. A fold with a tuple seed over a list of tuples, which declined,
  now compiles. A scalar fold keeps its code. A step whose list accumulator is
  in the complex lane (`(a, t) ↦ a + i·t`) declines; it gave
  `{re: null, im: null}` values.

- **Compiled JavaScript maps an operator over a call that maps over a list.**
  With `q(t) := 2t` and a free input `u` that nothing types, the compiled call
  `q(u)` maps `q` over a list, as the interpreter does, but the operator around
  the call read its result as one number: `1 + q(u)` compiled to
  `_SYS.bcastFn(_fn_q, _.u) + 1`, and `run({ u: [1, 2, 3] })` gave the string
  `"2,4,61"` where the interpreter gives `[3, 5, 7]`. The same was true for
  `Multiply`, `Negate`, `Power`, `Sqrt`, `Less` and the other element-wise
  operators, for a nested call `p(q(u))`, a branch of an `If`, and a block local
  assigned `q(u)`. The operator now maps over the result of the call. A call of
  a complex-valued function, `1 + h(u)` with `h(t) := t + i`, which declined
  also for a `u` declared `list<number>`, now compiles. A free input declared
  `number`, or narrowed to `number` by a use such as `u + 1`, keeps the scalar
  code. The compiled code tests the value of the call at run time, so a number
  still takes the scalar `+` and pays no closure call.

- **A compilation no longer changes the cache versions of the engine.** A
  compiled broadcast (`_SYS.bcast`) declared its element parameters (`_tv1`,
  `_tv2`) in the current scope of the engine: compiling `L + 1` with `L` a
  `list<number>` advanced the versions that the engine's caches key on, so
  cached types and values were computed again after each such compilation. The
  element parameters are now declared in a temporary scope.

- **Compiled Python declines a function literal applied to a collection at a
  parameter it reads as a scalar.** `((t) ↦ 2t)([[1, 2], [3, 4]])` compiled to
  `((lambda t: 2 * t))([[1, 2], [3, 4]])`, which repeats the list in Python and
  gives `[[1, 2], [3, 4], [1, 2], [3, 4]]`; the interpreter gives
  `[[2, 4], [6, 8]]`. The same was true for a parameter with no declaration,
  declared `unknown`, a scalar type, `any` or `value`, and for `Add`,
  `Subtract`, `Divide`, `Power` and `Negate`. The Python target now declines
  such a call (falls back to the interpreter) when the argument can be a
  collection and the parameter is not declared with a collection type, and a
  callback of `Map`, `Reduce`, `Filter`, … when its parameter declared `any` or
  `value` receives a value that can be a collection. A parameter declared with a
  collection type (`list<number>`) still compiles.

- **Compiled Python declines a fold whose accumulator can become a collection.**
  `Reduce([[1, 2], [3, 4]], (a, t) ↦ a + t, 0)` compiled to
  `functools.reduce((lambda a, t: [a + _tv1 for _tv1 in t]), …, 0)`: the step
  read the accumulator `a` as a number, but after the first step it holds the
  list `[1, 2]`, and the second step raised a `TypeError` in Python. The
  interpreter gives `[4, 6]`. The same was true for the seed `[0, 0]` and for
  `Scan`. The Python target now declines (falls back to the interpreter) a
  callback parameter with no declaration, or declared `unknown`, that receives a
  value that can be a collection when the function is compiled with that
  parameter read as a scalar. A fold over a list of numbers, and an accumulator
  typed as a list from its uses (`(a, t) ↦ Join(a, t)`), still compile.

- **Compiled JavaScript declines an input declared `expression`.** The
  interpreter accepts a collection as the value of a symbol declared
  `expression`, and maps an element-wise operator over it: with
  `ce.declare("x", "expression")` and `x = [1, 2]`, `2x` is `[2, 4]`. Compiled
  code read such a symbol as a scalar: `2x` compiled to `2 * _.x`, and
  `run({ x: [1, 2] })` gave `null`. Compiled code now declines (falls back to
  the interpreter) when it reads a symbol declared `expression` as an input, as
  it does for a function parameter declared `expression`. A symbol with an
  assigned value is not an input, and still compiles. A symbol declared `any` or
  `value` compiles, with a run-time test of its value.

- **Compiled JavaScript sums a list held by a symbol declared `any` or
  `value`.** With `ce.declare("x", "any")`, `Sum(x)` and `Product(x)` declined
  ("no indexing set"), also in `Sum(x) + 1`, and for a parameter declared `any`
  or `value` of a function literal (`(t: any) ↦ Sum(t)`). They now compile to a
  fold that tests the value at run time, with the interpreter's values:
  `run({ x: [1, 2, 3] })` gives 6, a nested list `[[1, 2], [3, 4]]` gives
  `[4, 6]`, a numeric typed array is summed as a list, and a number gives itself
  (`Sum(5)` is 5). A symbol declared `expression` still declines.

- **A local assigned lists of different shapes is typed by their elements.** In
  a block that assigns `L = [1, 2]` and then `L = [[1, 2]]`, `L` was typed
  `list<integer>`, which does not admit the second value. A callback mapped over
  `L` then had its parameter inferred `integer`, and `Map((t) ↦ 2t, L)` was an
  `incompatible-type` error, while the compiled code gave `[[2, 4]]`. `L` is now
  typed `list<integer | vector<integer^2>>`, and the interpreter also gives
  `[[2, 4]]`. Two lists of the same rank keep their rank: `[1, 2]` and then
  `[1.5, 2, 3]` type the local `vector<real>`, not `list<real>`.

- **A `Product` of a variable reads the value that the variable holds when it is
  evaluated.** With `x` declared `any` and `x := [1, 2]`,
  `ce.box(["Product", "x"])` was canonicalized as `Reduce(x, Multiply, 1)`.
  After `x := 5`, that expression gave an `incompatible-type` error, while the
  same `Product` boxed after the assignment gave `5`. A variable that can be
  assigned a value that is not a collection (one declared with a type that is
  not a collection type, or one with no declaration) now keeps the `Product`
  head, as `Sum` does. A constant, a list literal and a variable declared with a
  collection type (`L: list<integer>`) are still canonicalized as `Reduce`.

- **The product of a list of square matrices is typed as a matrix when the list
  is typed as a tensor.** A variable with no declaration that holds two 2x2
  matrices is typed `tensor<integer^(2x2x2)>`. Its `Product` was typed `number`,
  which its value `[[2, 1], [4, 3]]` is not, and the compilation of the
  `Product` refused it. It is now typed `matrix<integer^(2x2)>`, and the
  compiled code gives the same value as the interpreter.
  `Reduce(L, Multiply, 1)` gets the same type. When the elements can be lists
  whose product the type rules do not describe (a tensor of rank 4, a ragged
  list of matrices and rows), the `Product` is typed `unknown`, as the `Reduce`
  form is, not `number`.

- **A closure returned through two or more calls keeps the call that made it.**
  When a call ended, each closure in its result was rebuilt on the frame of that
  call, also a closure that an inner call had made and already rebuilt on its
  own frame. The closure then lost the parameters and the locals of the inner
  call. With `mk = n ↦ (() ↦ Block(n := n + 1, n))` and `wrap = m ↦ mk(m)`,
  `wrap(5)()` gave `n + 1`; it is now `6`. With
  `mk = n ↦ Block(k := 1, x ↦ x + k)` and `w = () ↦ mk(5)`, `w()(2)` gave
  `k + 2`; it is now `3`. With
  `P2 = (y, w) ↦ (x ↦ Block(s := y, y := 2, s + x))` and
  `wrap = (a, b) ↦ P2(a, b)`, `wrap(q, 1)(5)` gave `7`; it is now `q + 5`, the
  value of `P2(q, 1)(5)`. Now a call rebuilds only a closure that reads its own
  frame, and keeps the frames of the other calls in its chain: with
  `f(n) = Block(k := n, DefineFunction(g, b ↦ (x ↦ k + x)), g(0))`, `f(5)(1)` is
  `6`. Such a closure also keeps the locals of the block that defines the local
  function: with
  `f = n ↦ If(n > 0, Block(Declare(q), q := 10n, DefineFunction(g, b ↦ (x ↦ q + x)), g(0)), 0)`,
  `f(5)(1)` is `51`, also when `f(7)` is made before `f(5)` is applied (it gave
  `71`). A closure that a recursive call makes and that a deeper call of the
  same function returns no longer takes the parameters of the deeper call: with
  `h = (g, k) ↦ If(k = 0, g, h(x ↦ x + k, k − 1))`, `h(x ↦ x, 3)(100)` gave
  `100`; it is now `101`. Also, the result of a call that holds a closure made
  in the call is no longer kept by the memo of the applications of a function:
  two calls `wrap(5)` give two counters, not one shared counter.

- **GLSL and WGSL: `sin(|(x, x, x, x)|)` no longer drops its NaN guard.** The
  absolute value of a vector or point is emitted as `length(…)`, which overflows
  to `+∞` in f32 for a large `x`; the shader used the built-in `sin` anyway and
  could give a number where the result is NaN. Now the guard is dropped only
  when the norm cannot overflow.

- **`Solve` with a float over a discrete domain.** The interpreter compares
  numbers within the tolerance, so `Solve(x = 2.0000000000001, x ∈ ℤ)` gave `[]`
  although the equation is `True` at `x = 2`, and
  `Solve(x = 2.0000000000001, x ∈ Range(0, 10, 0.5))` gave the root
  `2.0000000000001`, which is not an element of the range. Over a domain with
  integer or rational elements or a finite number of elements, such a predicate
  is now checked at each element of the domain when the domain has at most
  10,000 elements (`Range(-10, 10)` gives `[2]`; `x² ≤ 3.9999999999999` over
  `-5..5` gives `[-2, -1, 0, 1, 2]`, where a compiled filter gave `[-1, 0, 1]`).
  Otherwise `Solve` stays unevaluated (`ℤ`, `ℚ`, a larger `Range`). The same
  applies to an unknown declared `integer` or `rational`: `0.5n = 1` stays
  unevaluated, because the tolerance accepts values far from a root when a side
  is flat (`10⁻¹² n = 5·10⁻¹³` holds at every integer from -99 to 100). Over
  `Interval` and `RealNumbers` the result does not change.

- **`Solve` of an equality chain over a domain that cannot be enumerated.** A
  chain `a = b = c` with exact sides over a real `Interval`, `RealNumbers`,
  `ComplexNumbers` or a `Range` too large to enumerate now gives its solutions:
  the roots of one link at which the whole chain is `True`.
  `Solve(x² = 4 = x + 2, x ∈ [-10, 10])` is `[2]`,
  `Solve(sin x = 0 = x, x ∈ [-10, 10])` is `[0]`, and
  `Solve(x = |x| = 2, x ∈ [-10, 10])` is `[2]`. `Solve` stays unevaluated when
  no link gives an answer that the chain can decide, and when the chain has a
  float, because the chain accepts values within the tolerance that are not
  roots of a link. The enumeration of a `Range` no longer compiles a chain: the
  compiled chain compared its sides exactly, so
  `Solve(x = 2 = 2.0000000000001, x ∈ -10..10)` gave `[]`; it is now `[2]`.

- **An access into a value typed `expression` is accepted.** `expression` admits
  a collection, but `At` refused a base typed `expression` (it accepted one
  typed `value`), so a function that reads an element of a parameter declared
  `expression` could not be defined: with
  `leaves := (t: expression) ↦ (1 if t ∈ ℤ else leaves(t[1]) + leaves(t[2]))`,
  the definition was an `incompatible-type` error. It now gives
  `leaves([[0, 0], 0]) = 3`, as for a parameter declared `any` or `value`. The
  value is checked when the access is evaluated: `((t: expression) ↦ t[1])(5)`
  is still an `incompatible-type` error.

- **The type of a call with a list at a declared list parameter holds its
  value.** With `h` declared `(list) -> number` and assigned `t ↦ 2t`,
  `h([1, 2, 3])` evaluates to `[2, 4, 6]`: the parameter receives the list
  whole, and the check of the declared result admits a list of numbers, the
  result computed once per element. The call was typed `number`. It is now typed
  from the body, `vector<integer^3>`, for the named call, for `Apply(h, …)` and
  for a call inside another function body. The same holds for a function
  declared `(list<tuple<number, number>>) -> number` applied to a list of
  points. A body whose type satisfies the declared result (a `Sum` declared
  `(list<integer>) -> integer`) keeps that result.

- **The type of a function literal applied to an argument of a top type holds
  its value.** With `L` declared `list<unknown>` and later assigned `[[1, 2]]`,
  `(t ↦ 2t)(L[1])` evaluates to `[2, 4]`: the element `L[1]` is a list, and the
  call maps over it. The call was typed `number`. It is now typed as the call of
  a named function with the same body,
  `number | tuple | list<number | tuple | list<any>>`, which also holds a ragged
  list and a point. An argument typed `any` (a symbol declared `any`, an element
  of a `list<any>`) types the call `any`. The same holds for
  `Apply(t ↦ 2t, L[1])`, for `L[1] |> (t ↦ 2t)`, and for a symbol of type
  `unknown` with no value that the body of an enclosing function reads from
  outside it. A number argument and a free symbol keep the type `number`.

- **Python: a call of a function literal with the wrong number of arguments no
  longer compiles to code that raises.** `Apply((x, y) ↦ x + y, 1)` compiled to
  `((lambda x, y: x + y))(1)`, which raises a `TypeError` where the interpreter
  gives a function. It is now declined, as on the other targets (see the
  partial-application entry above). A call with too many arguments (an
  `unexpected-argument` error in the interpreter) and a call with arguments of a
  literal with no parameter (the interpreter ignores them) are declined, where
  Python raised a `TypeError`.

- **A held operand keeps `Nothing` as written.** `ce.box()` of a `Hold` replaced
  every `Nothing` and every empty `Sequence` in the held operand with
  `Error('missing')`: `ce.box(['Hold', ['List', 1, 'Nothing']])` gave
  `Hold(List(1, Error('missing')))`, and the `Nothing` bounds of a held
  indefinite `Integrate` became errors. The operand is now kept as written, as
  `ce.function('Hold', …)` already did, and `ReleaseHold` gives the same result
  as boxing the operand directly (`List(1)`). Only an absent operand
  (`['Hold']`) is still reported as missing.

- **A closure returned by a function keeps the local functions of the call.**
  `(y ↦ Block(k := 1, f := z ↦ z + k, x ↦ y·x + f(x)))(3)(2)` gave `k + 8`: the
  local function `f` lost the other locals of the call when the call ended. It
  now gives `9`. A function literal evaluated in the body of a function keeps
  the call frame of that call, and reads the last value of a local that is
  assigned again after it is made. And
  `(w ↦ (x ↦ Block(g := z ↦ 3, x + g(0))))(1)(5)` gave `5 + g(0)`: the returned
  closure did not find the local function that its own body defines. It now
  gives `8`. `evaluateAsync()` gives the same values.

- **A held binder keeps its own index when a parameter has the same name.**
  `(k ↦ Hold(Sum(k·y, Limits(k, 1, 3))))(5)` gave
  `Hold(Sum(5·y, Limits(5, 1, 3)))`; it now keeps the `Sum`, and released it
  gives `6y`. The same holds for a held `Product`, `Comprehension` and definite
  `Integrate`. The bounds of the index's own clause still get the value:
  `(k ↦ Hold(Sum(j·y, Limits(j, 1, k))))(5)` gives
  `Hold(Sum(j·y, Limits(j, 1, 5)))`. The variable of a held `D`, the expansion
  variable of a held `Series` and the variable of a held indefinite `Integrate`
  are free, as for `subs()`: when the parameter is such a variable, the call
  stays unevaluated (`(k ↦ Hold(D(k^2, k)))(3)` gave the invalid
  `Hold(D(9, 3))`), and a parameter in the body only gets its value
  (`(k ↦ Hold(D(k·y, y)))(5)` gives `Hold(D(5·y, y))`).

- **The value of a parameter is put in a returned function that reads it from a
  nested block, and a returned closure that writes a parameter shares it.** With
  `F2 = (y, w) ↦ (x ↦ y^x)`, `F2(x)(5)(y)` gave `y^y`: the partial application
  `F2(x)` left `y` in the inner function. It now gives `x^y`. The same defect
  gave `6a` instead of `6u` for `(a, b) ↦ If(b, Σ_{j=1}^{2} (z ↦ a·j·z)(2), 0)`
  applied to `u`, then to `True`. A returned closure that assigns a parameter
  now keeps that parameter as a variable it shares, as in JavaScript: the
  counter `n ↦ (() ↦ Block(n := n + 1, n))` applied to `5` gives `6`, then `7`,
  where it gave an `incompatible-type` error. With
  `P = (y, w) ↦ (x ↦ Block(s := y, y := 2, s + x))`, `P(q, 1)(5)` gave `7` and
  assigned `2` to the caller's `q`; it now gives `q + 5`, a second application
  gives `7`, and `q` is not changed. When the result cannot keep the parameter
  in a closure (a partial application, a read of the parameter outside the
  closure, or a held write), the call stays unevaluated instead of giving a
  wrong value. For example, `(y, w) ↦ (x ↦ Block(Block(y := 2, y + x)))` applied
  to `q`, then `1`, then `5` gave `7` and now stays unevaluated (ROADMAP
  CE-698). A call that stays unevaluated after its body ran keeps the side
  effects of the body, and each evaluation of the unevaluated call runs the body
  again.

- **GLSL/WGSL: `First`, `Second`, `Third` and `Last` index an array.** They now
  read their element as `At` with a constant index does. A declared list of
  points (`P: list<tuple<real, real>^3>`, a `vec2[3]` in the shader) gave `P.x`,
  which is not a valid shader; it now gives `P[0]`. A list of 5 or more numbers
  is subscripted too, and `Last` of it compiles. A position past the end gives
  NaN, as in the interpreter (`Third` of a pair was `p.z`). A matrix, a list of
  unknown length, a list of strings and a constructed boolean tuple now decline
  where they gave an invalid swizzle. An element of a point that can be absent
  (`First(At(P, k))`, `First(When((x, y), x > 0))`) and a boolean vector
  (`b: tuple<boolean, boolean>`) are still read with a swizzle.

- **GLSL/WGSL: a block local that receives a list of points by its type
  declines.** A copy of a declared `list<tuple<real, real>^3>`, of another such
  local, or the result of a call was declared with the number of points as its
  width (`vec3 Q; Q = P;` over a `vec2[3]`). It now declines, as a written list
  of points already did.

- **GLSL/WGSL: a `Loop` over several `Element` clauses visits every
  combination.** The shader loop read only the first clause, so
  `Loop(s := s + j, Element(i, 1..3), Element(j, 1..3))` read `j` as an input
  and gave `3·j` instead of 18. Each clause now emits a nested `for` loop, the
  first clause outermost, as in the interpreter. The guard of a clause
  (`Element(i, 1..5, i > 2)`) is now tested; it was dropped, on one clause too.
  A body that can `Break`, an inner range that reads an outer index, and two
  clauses with the same index decline.

- **GLSL/WGSL: a free symbol whose tuple type has no shader type declines.** A
  pair of points (`tuple<tuple<real, real>, tuple<real, real>>`), a mixed tuple,
  a tuple of complex numbers, a one-element tuple and the bare `tuple` type were
  emitted as a bare name with `freeSymbolTypes[…].lowered = "point"`. A tuple of
  more than 4 real numbers now reports `float[N]` (`array<f32, N>`).

- **GLSL/WGSL: code supplied by the caller runs once, in order, and only in the
  branch that is taken.** Caller code is a `vars` entry whose string is source
  (`W: 'nextValue()'`), a head mapped through `functions` or `operators`, or an
  operator's own `compile` handler: it can count its calls or change shader
  state. The shader targets repeated it (`Cot(W)` emitted
  `cos(nextValue()) / sin(nextValue())`), moved it ahead of earlier code
  (`W + Max(V)` with `V: 'vec3(nextValue())'` called `V` first), or ran it in a
  branch that is not taken (WGSL `select` in `If(c, W, 0)`). Such a form now
  compiles only where the order is kept: WGSL takes the `if` statement form for
  a branch with caller code, and a hoist of caller code declines when the
  statement reads another `vars` input or caller code before it. Otherwise the
  compile declines. A `vars` entry that is the read of one variable (`u_x`,
  `params.x`) can still be written twice, and a form with no caller code
  compiles as before; one exception is `Cot([r, x, 1])` with `r := Random()`,
  which declines because it drew twice.

- **A compiled comparison chain evaluates the operands that the interpreter
  evaluates.** `Less(√(Random() − ½), √(Random() − ½), 0)` drew only the first
  operand when it was complex; the interpreter draws both and then answers
  `False`, so every later draw of a seeded sequence was different. A chained
  `Equal` or `NotEqual` with an impure operand, such as
  `Equal(0.1, Random(), 0.9, Random())`, drew every operand before the first
  pair, where the interpreter stops at the first `False` pair. An `Equal` chain
  with an operand whose type admits `missing` before an operand with an effect
  now declines. The Python target joins a chain over operands that may be
  complex with `and`; it emitted `&&`.

- **Compiled chained comparisons run caller code once, in operand order.** An
  operand that runs code the caller supplied (a `vars` entry such as
  `W: 'nextValue()'`, or a head mapped through `functions` that is not declared
  pure) is now bound once and evaluated in operand order, and not after a pair
  that is `false`, as the interpreter evaluates it. The JavaScript, interval-js
  and Python targets copied that code into each pair and into the NaN test of an
  absent input, so `x < W < 3` called `nextValue()` up to five times. An earlier
  operand keeps the value it had before the caller code ran. A run-time
  broadcast chain (an operand of unknown type) now evaluates a later operand
  with an effect only after the pairs before it. A chain that cannot keep this
  order falls back to the interpreter: on Python, an element-wise or collection
  `Equal` with such an operand, or one after a pair that may read an absent
  operand.

- **A chained `NotEqual` with an impure middle operand evaluates it once.**
  `1 ≠ Random() ≠ 2` became `And(1 ≠ Random(), Random() ≠ 2)`, which drew two
  values. The chain now stays n-ary when a middle operand is impure (also a
  symbol whose value draws), in the interpreter and in compiled code, and each
  pair keeps the rules for `Missing` and NaN.

- **`simplify()` and `factor()` of a chain of 3 or more operands keep every
  operand.** `Less(x, z, y).simplify()` gave `Less(x, z)`, and `1 < 3 < 2`
  simplified to `True`; it now gives `False`. `Equal(x, y, 1)` and
  `Equal(x, y, 2)` are no longer reported as the same relation.

- **Compiled JavaScript: real-only heads apply the run-time realness rule.**
  `Binomial`, `Choose`, `AGM`, `Degrees`, `EllipticF`, `EllipticPi`, the
  two-operand `EllipticE` and `Hypergeometric1F1` passed the `{re, im}` object
  of an operand such as `√x` to a real kernel: `Binomial(a, √x)` at
  `a = 3, x = 4` gave 0 instead of 3, and `AGM(√x)` gave `Infinity`. The kernel
  now runs on the real part when the imaginary part is exactly zero, and gives
  NaN otherwise. The iteration count of `Mandelbrot` and `Julia` and the seed of
  `WithRandomSeed` accept such an operand when its value is real.

- **A comparison chain counts every link in assumptions and solvers.** A chain
  of three or more operands (`a < b < c`, `a = b = c`) is the conjunction of its
  adjacent pairs; several places read only the first two operands.
  `assume(x = 2 = 3)` is now a contradiction, and `assume(y = 2 = z)` gives `z`
  the value 2; a link that is not a predicate makes the chain
  `'not-a-predicate'`, as in an `And`. `verify(-1 < x < 5)` is no longer `true`
  when only `x > -1` is known. The system solvers split a chain into its links,
  so `[x + y = 1 = x - y]` solves to `x = 1, y = 0`, and `0 ≤ x ≤ 2` bounds an
  inequality region on both sides. The integration of `If` and `Which` accepts a
  chain condition (`∫₋₂² [0 < x < 1] dx = 1`). `DSolve`, `RSolve`, the
  integer-equation solver and `Solve` over a domain no longer solve an equality
  chain as its first equation: they stay unevaluated when they cannot use every
  link (`Solve(x² = 4 = x + 2, x ∈ [-10, 10])` gave the correct `[2]` and now
  stays unevaluated).

- **An `Integrate` whose `Limits` names no variable gives its value.**
  `["Integrate", 2, ["Limits", 0, 1]]` and `\int_0^1 x` gave 0 under
  `evaluate()` (the integral was taken with respect to the placeholder
  `Nothing`) and stayed unevaluated under `N()`. The variable is now the
  parameter of the integrand (a `Typed` parameter too; with mixed named and
  unnamed limits, the parameters that no named limit uses, in order), and an
  integrand with no parameter is a constant `c` whose integral is `c·(b − a)`:
  `\int_0^1 2` is 2, `\int_0^1 x` is 1/2, `\int_0^∞ 10^{-12}` is `+∞`, and equal
  bounds give 0. `evaluate()`, `N()`, `NIntegrate` and compiled code agree, also
  with several limits (`∫₀¹∫₀² x·y` is 1); compiled code now handles an unnamed
  limit with no closed form by quadrature. A bare symbol whose value is a
  function, and an indefinite integral with no variable, stay unevaluated.
  `\int_0^1 x` no longer declares `x` in the enclosing scope.

- **Statistics of one datum or of equal data.** `Skewness` and `Kurtosis` of
  data whose values are all equal, one datum included, are now NaN under `.N()`
  and in compiled JavaScript, as the exact route gives `Indeterminate`. A datum
  such as `√2` gave `+∞`, `-∞` or a tiny number from rounding error. Under
  `.N()`, the sample `Variance` and `StandardDeviation` of `[√2]` are NaN
  instead of `+∞`, and `PopulationVariance` of equal data is exactly 0.
  `Skewness` and `Kurtosis` also no longer lose precision when the mean is large
  compared with the spread: the central moments are accumulated from the
  deviations from the first datum, by the same one-pass update in machine and
  high precision, and not expanded from raw power sums. The machine skewness of
  `[10⁸, 10⁸ + 1, 10⁸ + 3]` was about `1.16·10⁸` and is now `0.3818…`, and
  `[5·10¹⁰², −5·10¹⁰²]` no longer overflows.

- **`evaluateAsync()` of `Apply` and `Pipe` awaits the application.** With an
  operator `AsyncOnly` that has only an `evaluateAsync` handler,
  `["Apply", ["Function", ["Negate", ["AsyncOnly", "y"]], "y"], 1]` stayed
  `-AsyncOnly(1)` under `evaluateAsync()`, while the call `g(1)` of
  `g := y ↦ -AsyncOnly(y)` gave the value. The same was true for a composition
  (`Apply(Composition(Negate, AsyncOnly), 1)`), for each cell of a function
  literal mapped over a list or a tuple (`Apply(y ↦ AsyncOnly(y), [1, 2])` is
  now `[6, 7]`), and for a pipe (`1 |> AsyncOnly`, `1 |> y ↦ -AsyncOnly(y)`, a
  call stage such as `xs |> Take(AsyncOnly(-3))`, and a stage `F()` whose value
  is a function that an asynchronous-only `F` returns). For an expression with
  no such operator, the value of `evaluateAsync()` is the value of `evaluate()`,
  also under `numericApproximation` and for an error argument.

- **`evaluateAsync()` of a collection operator that walks a callback awaits the
  callback.** With the same `AsyncOnly` (it gives `x + 5`),
  `Fold((a, b) ↦ a + AsyncOnly(b), 0, [1, 2])` stayed
  `AsyncOnly(1) + AsyncOnly(2)` and is now `13`. This applies to `Reduce`,
  `Fold` (also its initial value), `Any`, `All` (also without a predicate),
  `MaxBy`, `MinBy`, `ArgMax`, `ArgMin`, `CountIf`, `Find`, `Position`,
  `IndexWhere`, `GroupBy`, `Partition`, `ChunkBy`, `Sort` and `Ordering`.
  Before, a predicate such as `y ↦ AsyncOnly(y) > 6` threw "predicate must
  return True or False" in `CountIf`, `Find`, `Position` and `IndexWhere`. For a
  callback with no such operator, the value of `evaluateAsync()` is the value of
  `evaluate()`, with two exceptions. `Sort` and `Ordering` with a comparator use
  a stable merge sort that awaits each comparison on the asynchronous route, so
  a comparator that is not transitive can give a different order there.
  `IndexWhere` checks whether a predicate step met a collection whose elements
  are not known only up to the first `await` of that step: when the part after
  the first `await` walks such a collection and still answers `True`, it can
  give an index where `evaluate()` gives no answer. Only the callback is
  awaited: these operators read the elements of a lazy source synchronously, so
  `Find(Map(AsyncOnly, [1, 2]), y ↦ y > 6)` gives `AsyncOnly(2)`. The same is
  true of `ChunkBy` on a source larger than the eager limit, of `Count` with a
  predicate, and of the lazy views `Map`, `Filter`, `Scan`, `FlatMap`,
  `TakeWhile`, `DropWhile` and `Tabulate` (ROADMAP CE-111.4). For `Map`,
  `evaluateAsync({ materialization: true })` gives the awaited values.

- **Under `evaluate()`, a predicate that calls an operator with only an
  `evaluateAsync` handler leaves its reader unevaluated, and no longer throws.**
  With the same `AsyncOnly`,
  `Length(Filter(Range(1, 10), y ↦ AsyncOnly(y) > 10))` threw "Filter predicate
  must return "True" or "False"" out of `evaluate()`, because
  `AsyncOnly(1) > 10` has no unknown and was read as a malformed predicate.
  `evaluate()` cannot run `AsyncOnly`, so the verdict is undecided, as for
  `y > n` with `n` free: `Length(…)`, `First(Filter(…))`, `CountIf`, `Find`,
  `Position` and `IndexWhere` stay unevaluated, and `evaluateAsync()` decides
  the eager readers (`CountIf([4, 6, 8], y ↦ AsyncOnly(y) > 10)` is `2`). A call
  of a name with no definition (`Foo(y) > 10`) still throws, with its spelling
  hint.

- **`TakeWhile` and `DropWhile` stay unevaluated when the predicate cannot be
  decided.** With `z` a symbol with no value, `TakeWhile([6, 7, 8], y ↦ y > z)`
  was `[]` and its `Length` was `0`, and `DropWhile` gave `[6, 7, 8]`: an
  undecided verdict was read as `False`, so the leading run was taken to end at
  `6`. The views, their `Length` and their materialization now stay unevaluated,
  as `Filter` does. This also applies to a predicate that calls an operator with
  only an `evaluateAsync` handler, under `evaluate()`.

- **The caller of a compiled function must supply every input.** When an input
  is left out of the vars object of `run()`, the result is not specified, and it
  can differ from the value of the interpreter (`docs/ERROR-MODEL.md`, "An
  unsupplied variable"). The tests that the compiled code makes today for an
  unsupplied variable are kept, but they are not a promise. For example, with
  `z` declared `real` and not supplied, the compiled
  `TakeWhile([6, 7], y ↦ y > z)` gives `[]`, while the interpreter keeps it
  unevaluated. A host that cannot supply every input checks the inputs before it
  runs the function.

- **A numeric integral with a step or a bump next to a singular bound reports an
  error that covers its true error** (ROADMAP CE-691).
  `∫ (x < 0.3 − 1.27·10⁻¹⁰ ? 0 : 1) + 1/√(0.3 − x) dx` on `[0, 0.3]` was
  extrapolated with an error of `1.4e-13`, and its true error was `1.3e-10`. The
  extrapolation next to a singular bound reads the integrand only down to about
  `2²⁰` doubles from the bound, and it took the part nearer than that for a pure
  singularity. The integrand is now also read at 4 points per octave of the
  distance to the bound, and a step, a bump, a zero or a change of sign there
  stops the extrapolation: the result has the error of the Gauss–Kronrod value:
  `± 1.0e-8` here, for a true error of `6.5e-9`. Such results are less accurate
  than before, but their error is correct. An integral with no feature next to
  the bound gives the same result as before. Of 900 such integrals, 187 had an
  error smaller than their true error; none does now.

- **A numeric integral next to a logarithmic singularity reports an error that
  covers its true error when the corner is not extrapolated** (ROADMAP CE-695).
  `∫ dx/(x·ln²x) + (x ≤ 10⁻³ ? 10⁻³ : 0)` on `[0, ½]` reported `± 1.28e-3` for a
  true error of `1.38e-3`, and `∫ du/(u·(−ln u)^1.1)` on `[10⁶ − ¼, 10⁶]`
  (`u = 10⁶ − x`) reported `± 1.24` for a true error of `7.32`. Next to such a
  singularity, most of the integral can be nearer to the bound than the doubles
  allow, and the bound of that part assumed that the integrand decreases like a
  power of the distance. It now also reads the slower decrease of a power of the
  logarithm: `± 2.69e-3` and `± 14.6` for these integrals. Of 302 such integrals
  with and without a step or a bump, 54 more errors cover their true error, and
  no result has a smaller error or loses its convergence.

- **A numeric integral whose integrand is infinite at some doubles next to a
  singular bound has a finite error** (GitHub issue #494). In
  `∫₀^½ cos(t/2)/√(cos t − cos ½) dt`, `cos t − cos ½` is 0 in doubles at ½ and
  at the 2 doubles below it, so the integrand is `+∞` there. The test of a
  singular point some doubles inside a bound read the second of these doubles as
  a second singular point, and the result was
  `2.2214414411509225 ± PositiveInfinity`. A run of consecutive doubles where
  the integrand is not finite is now one singular point, and the result is
  `2.2214414411509225 ± 0.0007`, which covers the true error (`2.8e-8`). A value
  that is not finite farther from the bound, past finite doubles, is still a
  second singular point, and the error is still `+∞`. The value is not the more
  accurate `2.221441469078394` of 0.170.0: the extrapolation of the shells next
  to the bound that gave it can also hide a small step of the integrand near the
  bound, and it is not used here.

- **A comparison with an operand that may be an absent collection is typed with
  a `missing` arm** (GitHub issue #487). With `y` declared
  `collection | integer | missing`, `y < x` was typed `broadcastable<boolean>`,
  but for `y = Missing` and `x = 3` its value is `Missing`. Now it is typed
  `broadcastable<boolean> | missing`, as `y < x` with
  `y: list<integer> | missing` already had the arm. An `If` over such a
  comparison also has the arm: `If(x > y, 1, 2)` is
  `integer | list<integer | list<any>> | missing`. With
  `y: collection | integer | missing` and `x: list<integer>`, the type gains the
  arm too (`list<boolean | missing> | missing`), as it does for a definite list.

- **The application of a curried function literal no longer captures a free
  symbol of an argument** (GitHub issue #489). With `F = y ↦ (x ↦ y^x)`, `F(x)`
  gave `x ↦ x^x`: the `x` of the argument became the parameter of the inner
  literal, so `F(x)(y)` was `y^y`, and `G = y ↦ (x ↦ y + x)` gave
  `G(x)(y) = 2y`. The compiled code gave `x^y` and `x + y`. Now a binder in the
  result that binds a name of the argument is renamed before the argument is put
  in its place: `F(x)` is `x_1 ↦ x^(x_1)`, `F(x)(y)` is `x^y`, and `G(x)(y)` is
  `x + y`. This applies to the parameters of a nested literal, destructuring
  parameters included, and to the index of a scoped operator such as `Sum`: with
  `S = y ↦ (x ↦ Sum(y·x·k, k, 1, 3))`, `S(k)(2)` is `12k`, not `28`. It also
  applies to a local of a `Block` (made by an assignment or a `Declare`), and to
  a `Sum`, `Block` or literal held in `Hold`: with
  `H = y ↦ Hold(Sum(y·k, k, 1, 3))`, `H(k)` released is `6k`, not `14`. A binder
  that captures nothing keeps its names. After a rename, a named argument of the
  renamed parameter must use the new name: `G(x)` accepts
  `NamedArgument("x_1", 2)`, not `NamedArgument("x", 2)`. When a rename cannot
  be decided before the call runs, the call stays unevaluated instead of giving
  a wrong value. Examples: an assignment in a held `Block` to a name that the
  argument holds (the assignment can write a variable declared outside the
  block), and a local declared only by a `Declare` inside an `If` branch (it is
  a local only when that branch runs).

- **Compiled JavaScript and Python: a real-only head with an operand that may be
  complex now evaluates its operands as the interpreter does** (ROADMAP CE-686,
  CE-687). In `auto` mode, `Max`, an ordering comparison and the other real-only
  heads check at run time that a maybe-complex operand is real. The other
  operands were evaluated inside that check, so `Max(Sqrt(x), Random())` with
  `x` declared `real` gave `NaN` at `x = -4` and took no draw, while the
  interpreter takes one, and every later seeded draw was different. Now, when an
  operand has an effect (a draw, an assignment, or a symbol whose value has
  one), every operand is evaluated before the check, once and in source order.
  So `Max(Sqrt(x), y, Assign(y, 1))` reads `y` before the assignment, as the
  interpreter does. One boxed node at two operand positions is evaluated by the
  interpreter once per position. The compiler binds a node once, so such a head
  now declines, with the diagnostic code `shared-impure-operand`, when the node
  has an effect (for `e = Sqrt(Random() - 0.5)`, `Max(e, e)` gave the maximum of
  one draw where the interpreter takes two), or when it reads a symbol that
  another operand may assign (`Max(y, Assign(y, 1), y, Sqrt(x))`). With the
  default fallback, the interpreter then gives the value. A pure node at two
  positions beside a draw (`Max(e, e, Random())` with `e = Sqrt(x)`) still
  compiles. Code that the caller supplies counts as an effect too: a `vars`
  entry that runs code (`vars: { w: '_.draw()' }`), a head mapped through
  `functions` or `operators`, or an operator's own `compile` handler. This also
  holds when that code is reached through the value of a symbol (`r := 2w`), the
  body of a user function, or a function defined in the compiled block, called
  or passed by name (`Apply(f)`). So `Max(Sqrt(x), r)` calls `_.draw()` once
  also at `x = -4`.

- **GLSL and WGSL: a reduction over a vector constructor with fewer operands
  than components reads every component** (ROADMAP CE-684). With `xs` declared
  `list<real^3>` and `y` declared `real`, `PointY(PointList(xs, y))` lowers to
  the splat `vec3(y)`, and the reductions took each operand of the constructor
  as one component. `Sum(PointY(PointList(xs, y)))` gave `y` where the
  interpreter gives `3y` (`6` for `y = 2`), and `Product(...)` gave `y` for
  `y³`. `Sum`, `Product`, `Max`, `Min`, `GCD` and `LCM` now read the components
  of such a constructor through its swizzles (`vec3(y).x`, …), or through a
  temporary when an operand is not a plain name or number. In a place where no
  temporary can be declared (an `If` branch, the body of a `Sum` over an index),
  the constructor is written once per component; it declines there when its
  operands have effects or contain code that the caller supplied through `vars`
  or `functions`. A matrix constructor with fewer operands than elements
  (`mat3(s)` is a diagonal matrix) now declines instead of giving a wrong value.

- **GLSL and WGSL: `freeSymbolTypes` reports a list of points as an array of
  vectors** (ROADMAP CE-685). With `P` declared `list<tuple<real, real>^3>`,
  `At(P, k)` compiles to a helper whose parameter is an array of `vec2`, but
  `freeSymbolTypes.P.lowered` was `float[3]` (`array<f32, 3>` on WGSL), so a
  host that declared its input from this value declared a type that does not
  match the shader. It is now `vec2[3]` (`array<vec2f, 3>`), and the same for
  points of 3 and 4 coordinates. A list of numbers is still `float[N]`.

- **A compiled `Loop` over several `Element` clauses no longer gives a wrong
  value when a `Break` comes after a `Continue` in its body** (ROADMAP CE-688).
  For the body `Block(If(s < 0, Continue()), Assign(s, s + 1), Break())` over
  `Element(i, Range(1, 3))` and `Element(j, Range(1, 3))`, the emitted `break`
  left only the inner loop, so the compiled result was `3` where the interpreter
  gives `1`. The check for a `Break` that must stop the whole loop looked only
  at the first control instruction of the body. It now searches the whole body,
  so such a loop declines on JavaScript, interval-js and Python, and the
  interpreter evaluates it. A `Break` that belongs to a nested `Loop` does not
  make the outer loop decline.

- **A list literal no longer fixes the type of its free symbols as `number`**
  (ROADMAP CE-663, GitHub issue #485). Since 0.170.0, boxing `[p, q]` made `p` a
  `number` for the life of the engine, also when the list was never evaluated or
  assigned, so a later `p ∧ q` was an `incompatible-type` error, and the result
  depended on the order of the uses. Now `p` stays `unknown`, and `p ∧ q` gives
  `p` the type `boolean`. The list is still typed `vector<2>`. A use that
  requires a number still infers the symbol: `p + 1`, or a matrix operator
  applied to the literal. `Determinant`, `PseudoInverse` and `AdjugateMatrix` of
  `[[x, y], [z, w]]` infer the four cells as numbers, and the value of
  `PseudoInverse` is a `matrix<2x2>`. An operator whose parameter is
  `matrix | vector` (`MatrixMultiply`) infers nothing: a cell of its operand
  could be a vector or a number. Other changes:
  - With `L := [u, v]`, `At(L, 1)` is typed `number`, and its value `u` is typed
    `unknown` (it was typed `number`).
  - `At([u, v], 1, 2)` stays unevaluated, as `u` can still be a list (it was an
    `incompatible-dimensions` error).
  - `TupleFrom([p, q])` is typed `tuple` (it was `tuple<number, number>`).
  - In LaTeX, `N(2.3)` after `[N, 1]` is the call of the library `N`, as after
    `(N, 1)` (it was the product `2.3N`).
  - `Reverse([p, q])` and `Sort([p, q])` leave `p` as `unknown`. The type
    variable `T` of their signature was solved from the type `vector<2>` of the
    list, and that `number` was then written back on `p`. At a generic
    parameter, the elements of a list literal now get only what the declared
    bound of the variable requires.
  - In a function literal, `x ↦ [-x, y]` is still typed
    `(x: unknown) -> vector<2>`, and `y` stays `unknown`. A function `g`
    assigned this literal keeps its check: after `y := "abc"`, `g(3)` is an
    `incompatible-type` error, and the compiled `g` is refused.

- **Interval target: a loop over a list input gives the correct value.** With
  `L` declared `list<number>` and `L = [1, 2, 3]`, the `interval-js` code of
  `Block(c := 5, Loop(c := c + k, Element(k, L)), c)` gave an interval whose
  bounds were the string `"5[object Object][object Object][object Object]"`, and
  `[2k for k in L]` gave `empty` for each element. The run converts each element
  of `L` to an interval, and the loop wrapped each element as an interval again.
  The two now give the point intervals `11` and `2`, `4`, `6`, as the
  interpreter does. When the caller leaves out a collection input that the code
  iterates, reduces or indexes, the run now gives `empty` (no value) before any
  code runs, as on the JavaScript target: before, the loop gave `entire` and
  `Sum(L)` gave `undefined`. The `code` of such a result starts with this test.
- **Interval target: a loop over a range with an input bound gives the correct
  value** (ROADMAP CE-655). With `n = 3`, the `interval-js` code of
  `Block(c := 0, Loop(c := c + k, Element(k, Range(1, n))), c)` gave the point
  interval `0`, and `[2k for k in 1..n]` gave an empty list: the code computed
  the length of the range with plain arithmetic on the bound intervals. The two
  now give `6` and `2`, `4`, `6`, as the interpreter does. This also applies to
  a range with a step, a range that counts down, and an inner range whose bound
  is the variable of an outer loop. When the number of elements is not known
  (for example, a bound that is the interval `[2, 4]`), `run()` gives `entire`,
  and a cell of `broadcast()` gives the kind `error`.
- **Interval target: a range with a computed bound has a value when its length
  is known.** At `n = 1`, `n/3` is an interval about one ulp wide around 1/3,
  because interval division rounds outward. The `interval-js` code of
  `Block(c := 0, Loop(c := c + k, Element(k, Range(n/3, 5))), c)` gave `entire`,
  because every bound that is not a single number gave `entire`. Now a range
  whose number of elements is the same for every value inside its bounds gives
  that many elements, each an interval that holds the interpreter's element:
  here the result holds `11.67`, the interpreter's value. A range whose number
  of elements can change inside its bounds still gives `entire`, for example
  `Range(0, 2, n/3)`, where `2 / (n/3)` is near 6.
- **Compiled code: a coordinate of a point-or-point-list symbol with an assigned
  point compiles on `javascript`, `interval-js` and `python`** (ROADMAP CE-658).
  With `P: tuple<number, number> | list<tuple<number, number>>` and
  `P := (3, 4)`, `At(P, 1) + x` and `At(P, 2) - x` failed with "an operand may
  be a point (a tuple) and another operand is a number"; they now compile to
  `x + 3` and `-x + 4`, as on `glsl` and `wgsl`. On `javascript` and
  `interval-js`, a call such as `f(x) + x` with `f(t) := At(P, 1)` compiles too.
  The compiled code holds the value the point had at compile time. A `P` that a
  `vars` entry maps, a `P` with no value, and a `P` that holds a list of points
  behave as before. A call whose head the `operators` option overrides, or whose
  argument reads `vars` source, is not replaced by its body.
- **Shader targets: the NaN guard stays on operands that can overflow f32**
  (ROADMAP CE-619). The proof that an operand of `sin`, `cos`, `min`, `max`,
  `sign` or `clamp` is finite, which lets the GLSL and WGSL targets call the
  built-in instead of the NaN-safe helper, accepted operands that are `+∞` in
  f32 for ordinary inputs: `\sin(Hx)` with `H: real<0..1e30>` (from
  `x ≥ 3.5·10⁸`), `\sin(x/10^{-30})`, `\sin(R+Q)` with `R, Q: real<0..2e38>`,
  `\sin(\operatorname{mod}(R, 10^{-30}))`, and `F(p) := \sin(Hp)` called as
  `F(Hx)`. On Apple GPUs the built-in `sin(+∞)` gives 0, where the helper gives
  NaN. Now:
  - a product is accepted when every factor has a known size (a literal, a
    symbol with a declared range, `sin`, `cos`, `tanh`, `arctan`) and the
    product of the sizes stays within half the largest f32, or when its other
    factors are literals of magnitude at most 1 (`0.5·x`, `x/3`);
  - a sum is accepted when the sizes of its terms add up within that bound, or
    when one term has no known size and the others add up to at most 2¹⁰⁰
    (`x + 1`);
  - a quotient and a `Mod` need a divisor that cannot make the quotient
    overflow;
  - the size of an expression is not read from its static type, which f32
    rounding does not respect (`A − B` of two close large values), and a
    constant gives its value only when it is folded into one literal.

  So `\sin(2x)` with `x` declared `real` and no range now calls `_gpu_sin`; a
  declared range (`x: real<-10..10>`) gives the built-in again. `Random()` was
  also drawn at compile time by this proof, also through an assigned symbol,
  which made the compiled code change from one compilation to the next; now it
  is not.

- **The `evaluate` handler of `Solve` said "no answer" in two ways** (GitHub
  issue #486). Since 0.168.0, when the solver had no answer it returned
  `undefined` for an equation that was already canonical (`Solve(cos x = x, x)`
  from `ce.box()`) and an unevaluated `Solve` with the canonical equation
  otherwise (the same call from `ce.parse()`, or `Solve(e^x = x + 2, x)` from
  `ce.box()`, whose `Exp` canonicalizes to a `Power`). `evaluate()` gave the
  same result either way, but a host that wraps the handler to try its own
  method when the solver gives up read the second shape as an answer. The
  handler now returns the unevaluated `Solve`, with the canonical equation, in
  every no-answer case: a wrapper checks that the operator of the result is
  `Solve`. This is the rule for every lazy operator (`ARCHITECTURE.md`,
  "Evaluation and rules"): a handler that cannot reduce returns the expression
  built from the operands it canonicalized, because an `undefined` makes the
  engine rebuild the expression from the held operands and loses that work.

### Behavior Changes

- **The contract of compiled code.** The compiled value equals the value of the
  interpreter for a well-typed expression whose inputs are supplied and hold
  values of their declared (or inferred) types: with `u: real`, compiled
  `ADD(1, u)` gives `3` at `u = 2`, as the interpreter does. A compilation
  declines when a sub-expression is invalid or has the static type `error`, and
  the result has `ErrorCode` in `unsupported`: `"ab" + u` and `ADD("ab", u)`
  decline. Every other case is unspecified, and the compiled code does not need
  to check for it: it can give any value, `NaN`, or throw. Examples are an error
  that the static type does not show (`If(u > 1, "ab", 1) + 1` has the type
  `integer` and can give `"ab1"`), an input value outside its type (`"ab"` for
  `u`), and an input left out. See `docs/COMPILATION-MODEL.md`, "Fail closed".

- **A curried function is the deferred call of the original function, and its
  value equals the full call.** A call of a function literal with fewer
  arguments than parameters evaluated a body with no effect with the supplied
  arguments, so the body was simplified before the remaining arguments were
  known. Now every partial application is the deferred function that applies the
  literal to all the arguments when the last one arrives (ROADMAP CE-708). The
  printed form changes: `Apply((x, y) ↦ x + y, 1)` was `(_1) ↦ _1 + 1` and is
  now `(_1) ↦ Apply((x, y) ↦ x + y, 1, _1)`. These values change, and are now
  the values of the full call:
  - With `M = (x, y) ↦ x·y`, `Apply(Apply(M, 0), ∞)` was `0` and is
    `Indeterminate`.
  - With `D = (x, y) ↦ x·y/y`, `Apply(Apply(D, 2), 0)` was `2` and is
    `Indeterminate`.
  - A block local that the body reads is read at the full call:
    `Block(c := 3, g := Apply((x, y) ↦ x + y + c, 1), c := 10, g(5))` was `9`
    and is `16`. A supplied argument is still read at the partial application:
    with `c := 3`, `g := Apply((x, y) ↦ x + y, c)`, then `c := 10`, `g(5)` is
    `8`.
  - With `F = (x, y, z) ↦ Block(y := y·z, x + y)`, the chain
    `Apply(Apply(Apply(F, 1), 0), ∞)` was `1` and is `Indeterminate`.
  - A partial application whose result writes a supplied parameter, such as
    `W = (y, w) ↦ (x ↦ Block(y := 2, y + x))` applied to `q`, stayed
    unevaluated, and `W(q)(1)(5)` had no value. It is now a function, and
    `W(q)(1)(5)` is `7`, as `W(q, 1)(5)` is.
  - The static type of a partial application of a function whose signature is
    inferred is the function of the remaining parameters, also when the body is
    an error for the supplied arguments: with `h(a, t) := a[1] + a[2] + t`,
    `h(3)` was typed `error` and evaluated to an error; it is now typed
    `(t: unknown) -> error`, its value is a function, and each call of it gives
    the `incompatible-type` error, as the full call `h(3, 1)` does.
  - A partial application that gives a value of the wrong shape to a
    destructuring parameter is a function: with `L = ((u, v), y) ↦ u + v + y`,
    `Apply(L, 5)` was an `incompatible-type` error; it is now a function, and
    each call of it gives that error (`tuple` expected, `5` given), as the full
    call `Apply(L, 5, 1)` does.
  - A supplied argument whose value is `Nothing` keeps its parameter: with
    `g = () ↦ Nothing` and `G = (a, b) ↦ b + 0·Random()`, `Apply(G(g()), 5)` was
    a function, because the `Nothing` was erased and `5` went to `a`. It is now
    `5`, as `G(g(), 5)` is.
  - A partial application of a function defined by a literal that holds its
    arguments (a `lazy` operator whose `evaluate` is a function literal) is the
    `missing` error. With `hf(a, b) = Head(a)` held and `c := 3`, `hf(c + 1)`
    was a function; it is now `Error("missing")` with the frame of the second
    argument, typed `error`. This is the value it has when the signature of `hf`
    is declared, and the value of a partial application of an Epsil `hold`
    function.
  - A partial application that supplies a free symbol named like a fresh
    parameter keeps it: with `A = (x, y) ↦ x + y`, `Apply(Apply(A, _1), 2)` was
    `4` and is `_1 + 2`.

- **The parameter of a family of roots is a new integer symbol.** It is the
  parameter of `Solve` of a periodic equation, and of diophantine and congruence
  solutions. It is no longer a symbol that the user declared or used, and it is
  declared `integer` in the global scope. Before, after
  `ce.declare('t', 'number')`, `Solve(sin x = 0, x)` returned `[π t]` with the
  user's `t`, and `ce.assign('t', 0.5)` then gave π/2, which is not a root. The
  result is now `[π t_1]`. When the user has no symbol `t`, the result is still
  `[π t]`, and its `t` refuses a value that is not an integer, also when the
  solve ran inside a function call: `ce.assign('t', 0.5)` throws a type error.
  After such a solve, `ce.declare('t', 'number')` in the global scope throws
  "already declared". The free parameter of an identity (`x = x` gives `[t]`) is
  declared `number`.

- **The implicit variable of `Integrate`, `D`, `Series`, `NIntegrate` and `ND`
  no longer depends on the order of boxing and assignment.** It is now chosen
  from the symbols written in the expression, with or without an assigned value,
  as for `Limit`, and it is a bound variable, so it hides the assigned value.
  After `x := 4`, `∫₀¹ √x` is 2/3 (it was 2 when `x` was assigned first), and
  `D(x^3)` is `3x^2` (it stayed unevaluated). A bare-symbol integrand is the
  variable too: `∫₀¹ x` is 1/2 also when `x` has a value. A constant such as
  `Pi`, or a symbol whose type cannot hold a number (a list, a string, a
  function), is not chosen. The two orders give the same result when the
  assigned value is a number, or when the symbol was declared with a type that
  cannot hold a number before boxing. The implicit variable of an `Integrate` is
  no longer reported as an unknown of the integral, and `subs()` no longer
  replaces it in the integrand, so `\int_0^1\int_0^1 xy` is 1/4 (it was `y/2`).
  `D` of a symbol declared `function` is the derivative of that function:
  `D(f, x)` is `f'(x)` (it was 0). With nothing assigned, the variable is the
  same as before.

- **Under `evaluateAsync()`, `Sort` and `Ordering` with a comparator sort with a
  stable merge sort.** Before, they used the synchronous sort of `evaluate()`.
  For a comparator that is transitive, the order is the same as before, also for
  a boolean comparator such as `(a, b) ↦ a < b` over repeated elements. A
  comparator that is not transitive can give a different order than `evaluate()`
  gives. See the Bug Fixes entry on collection operators that await their
  callback.

- **An extra operand of `Hold` is an error.** `Hold` takes one operand, and the
  others were dropped with no error: `ce.box(['Hold', 'x', 1])` and
  `ce.function('Hold', [x, 1])` were the valid `Hold(x)`. Each extra operand is
  now an `unexpected-argument` error, as for any other operator:
  `Hold(x, Error('unexpected-argument', '1'))`, which is not valid, also after
  `evaluate()`, and is not equal to `Hold(x)`.

- **The parser keeps an explicit `\mathrm{Nothing}` in an enclosure.** An
  enclosure whose only content is `\mathrm{Nothing}` was read as empty:
  `f(\mathrm{Nothing})` was `f()`, `(\mathrm{Nothing})` was `()`,
  `\{\mathrm{Nothing}\}` was `EmptySet`, `|\mathrm{Nothing}|` did not parse, and
  `\gcd{\mathrm{Nothing}}` had no argument. Now the authored symbol is kept:
  `["f", "Nothing"]` in the raw form (`["f"]` in the canonical form, where
  `Nothing` is erased from the arguments), `Delimiter(Nothing)`, `Set(Nothing)`,
  `Abs(Nothing)` and `GCD(Nothing)`. The same holds for `[\mathrm{Nothing}]`, a
  row of a matrix (`[1; \mathrm{Nothing}]`), the angle bracket, floor, ceiling
  and norm fences, and a matchfix entry of a custom dictionary. So the LaTeX of
  `Hold(Nothing)`, `\mathrm{Hold}(\mathrm{Nothing})`, parses back to
  `Hold(Nothing)`. An empty enclosure (`f()`, `()`, `[]`) and one that holds
  only decoration (`(\displaystyle)`, `(\phantom{x})`) are still empty.

- **The type of a node of a function body no longer depends on the values of a
  call** (GitHub issue #487). A type computation reads the declared (static)
  bindings only: in the body of a function literal, a parameter is the parameter
  of the literal, with no value, in every call. A type handler that read a
  parameter by name (`lookupDefinition('x')`) inside the body of `g = x ↦ …` saw
  the value of the call, so the type of the same node was `integer` in `g(3)`
  and `string` in `g("ab")`. Now it is the type read outside every call in both.
  Evaluation, and the sign and value of a node, still read the values of the
  call.

- **`Limit` and `NLimit` find their implicit variable whatever the order of
  boxing and assignment.** The two-operand form `Limit(expr, point)` does not
  write its variable. It used only the symbols of `expr` that had no value, so
  after `x := 4`, `Limit(√x, a)` was the limit of the constant 2, and before the
  assignment it was `√a`. The variable is now the first, in sorted order, of the
  symbols that `expr` reads from outside, with or without an assigned value
  (when nothing is assigned this is the variable chosen before), so the result
  is `√a` in both orders. A parenthesized `expr` follows the same rule. The
  function literal now has the variable as its only parameter: `Limit(y·z, 2)`
  canonicalizes to `Limit(Function(y·z, y), 2)` (it was `Function(y·z, y, z)`),
  and `z` is a free symbol, which compiled code now reads as an input (it read
  an unbound parameter and gave NaN).

- **A function parameter declared `any`, `expression` or `value` receives a
  collection argument whole** (GitHub issue #488). These types admit a
  collection, but such a parameter was read as a scalar parameter, and the
  function was mapped over the leaves of a list argument. With
  `f := (t: any) ↦ (0 if t ∈ ℤ else 1)`, `f([[0, 0], 5])` gave `[[0, 0], 0]`;
  now it gives `1`. A recursive function can now descend into a nested list:
  with `leaves := (t: any) ↦ (1 if t ∈ ℤ else leaves(t[1]) + leaves(t[2]))`,
  `leaves([[0, 0], 0])` gave `[[1, 1], 1]`; now it gives `3`. A parameter with
  no declared type, or declared `unknown`, is still mapped, and so is a
  parameter declared with a scalar type such as `number` or `integer`. A call of
  a function declared `(any) -> any` with a list argument is now typed `any` (it
  was `list<any^3>` for a list of 3 elements). An alias of one of these types
  (`type alias A = expression`) has the same effect. A call with a list or tuple
  argument at such a parameter is typed from the body, whatever the declared or
  inferred result: with `g := (t: expression) ↦ 2t`, `g([1, 2, 3])` is typed
  `vector<integer^3>`. When the argument can be a collection but is not
  certainly one (it is declared `any`, `expression`, `value`, or
  `list<integer> | integer`), the call is typed `any`. Compiled code declines
  (falls back to the interpreter) a call where an argument that can be a
  collection reaches a parameter declared `expression`:
  `((t: expression) ↦ 2t)([[1, 2], [3, 4]])` gave `null` in compiled JavaScript,
  and now gives `[[2, 4], [6, 8]]`. A function with such a parameter, literal or
  named, that is compiled as a function value declines too, except at a callback
  consumer such as `Map` whose elements cannot be collections: with
  `h := (t: expression) ↦ 2t`, `Map(h, rows)` over `[[1, 2], [3, 4]]` gave
  `[null, null]`; it now declines, and `Map(h, L)` with `L` declared
  `list<real>` still compiles.

- **A function parameter declared `unknown` is the same as a parameter with no
  declaration** (follow-up of GitHub issue #488). The type of a bare parameter
  comes from the body, but the type of a parameter declared `unknown` stayed
  `unknown`. So a body that reads the parameter as a list did not change how a
  list argument is passed. With
  `leaves := (t: unknown) ↦ (1 if t ∈ ℤ else leaves(t[1]) + leaves(t[2]))`,
  `leaves([[0, 0], 0])` gave `[[1, 1], 1]`; now it gives `3`, as with
  `leaves := t ↦ …`. With `f := (t: unknown) ↦ Count(t)`, `f([[0, 0], 5])` gave
  a list of errors; now it gives `2`. The function literal now does not keep the
  annotation: `(t: unknown) ↦ t + 1` is `t ↦ t + 1`. A transparent alias of
  `unknown` (`type alias U = unknown`) is the same. This applies to a function
  literal, `Apply`, `:=`, `DefineFunction`, a function declared `function` or
  `(unknown) -> unknown` and then assigned with `ce.assign()`, a callback at a
  declared callback slot, a function declared with a value-kind parameter, a
  clause, and a function local to a block. A clause `f(x: unknown) = 1` under
  `let f: (integer) -> integer` is now accepted, as `f(x) = 1` is; before, it
  was an invalid clause definition.

- **Interval target: a loop over a literal list compiles.** On `interval-js`, a
  `Loop` or a `Comprehension` over a `List`, a `Tuple` or a `Map`, written
  inline or held as the value of a symbol, refused to compile ("no lowering"),
  and the interpreter evaluated it. It now compiles, and gives the interpreter's
  value: `Block(c := 0, Loop(c := c + k, Element(k, [1, n, 3])), c)` at `n = 5`
  is the point interval `9`. A loop over a `When`, `If` or `Which` still refuses
  to compile, because its value is not always a list.

- **Interval target: `Linspace` compiles.** On `interval-js`, `Linspace` had no
  lowering, so `Linspace(0, 1, 5)`, `Sum(Linspace(0, 1, 5))` and a loop over a
  `Linspace` refused to compile. A `Linspace` whose count is omitted or is a
  number literal (at most 100 samples) now gives the list of the enclosures of
  its samples, each of which holds the sample that the interpreter computes,
  also when `end − start` overflows (`Linspace(-1e308, 1e308, 3)`). The
  endpoints can be inputs: a wide endpoint gives wide samples. An infinite or
  NaN endpoint gives no value (`empty`). A count that is an input
  (`Linspace(0, 1, m)`) or a NaN count still refuses to compile: the length of
  the list would depend on an interval, or has no value.

- **JavaScript target: a `vars` entry that is the default spelling `_.<name>`
  gets the checks at entry of an unmapped input.** With `L` declared
  `list<number>` and `vars: { L: '_.L' }`, `Sum(L)` and `Length(L)` threw a
  `TypeError` at `run({})`; they now have no value (`NaN`), as with no `vars`
  entry. The type checks of the input apply too: with `x` declared `real` and
  `vars: { x: '_.x' }`, `run({ x: 'abc' })` now throws, and a number for a
  `complex` input is read as a complex number. A `vars` entry with any other
  source text is the caller's own value and is not checked, as before.

### Performance

- **A tuple or a list whose operands share a node evaluates that node once.**
  With `a0 := Map(x => x + d, Range(1, 1000))`, `a1 := (a0, a0)`,
  `a2 := (a1, a1)`, …, each read of the last variable evaluated the shared
  operand again for each path to it, so the time doubled with each level: about
  8 s at 14 levels in a loop and 30 s at 16 levels. The result also held a
  separate copy of each path. Now the evaluation of a `Tuple` or `List` serves
  its result until the next value write, so 20 levels take about 0.2 s and the
  result keeps the sharing. A write to a variable that the tuple reads still
  gives the new value. A tuple or list that reads an impure value (a symbol
  whose value is `Random()`) is evaluated again at each read. The fix is on the
  synchronous route of `evaluate()` only: `N()` and `evaluateAsync()` are not
  changed. A chain where a level uses the two levels below it (`a2 := (a1, a0)`)
  is still slow, and so is a chain over an infinite view with an element memo
  (`Map(f, Range(1, Infinity))`): a result that holds such a view is not kept,
  because the view keeps each element that is read.

- **`subs()` substitutes a node that an expression uses more than once only
  once.** On a non-canonical expression, `subs()` substituted a shared node
  again for each path from the root, so its time doubled with each level of
  sharing: with `e = x` and then
  `e = ce.function('Add', [e, e], { form: 'raw' })` repeated 18 times,
  `e.subs({ x: 3 })` took about 0.5 s, and 30 levels did not finish. Now the
  time grows with the number of distinct nodes (18 or 20 levels take less than a
  millisecond), and a node that is shared in the input is shared in the result.
  A shared node below a binder that binds a substituted name (the parameter of a
  `Function`, the index of a `Sum`, a local of a `Block`) still keeps that name
  there.

- **An assignment whose value shares one list or tuple at several positions
  takes linear time.** In a block `a1 := (a0, a0)`, `a2 := (a1, a1)`, …, the
  value of `a_k` has `k + 1` distinct nodes but `2^k` paths, and the assignment
  listed each node once per path: a depth of 22 took about 0.6 s, and a depth of
  40 did not finish. The assignment now lists each distinct node once, and both
  depths take a few milliseconds.

- **Compiling a callback whose body shares subexpressions takes linear time** (a
  follow-up of GitHub issue #488). A boxed expression can hold the same node
  object at several positions: `b_k = Arctan2(b_(k-1), b_(k-1))` has `k`
  distinct nodes but `2^k` paths. Before the compiler moves the invariant parts
  out of a callback (`Map(t ↦ b_k, [1, 2])`), it looks for the names that the
  body assigns and for the parts that read the parameter. These two walks went
  along every path, so the compilation took 820 ms at depth 26 and twice as long
  at each further level. Now each walk visits a node object once: depth 40
  compiles in about 10 ms. A body built with `Add` is not a shared structure
  after canonicalization, because `Add(b, b)` is flattened into one sum of `2^k`
  terms; its compilation time stays proportional to that number of terms.

- **GLSL and WGSL: a sum over an index with literal bounds that calls user
  functions of that index uses the built-in `sin`, `cos` and `min` again.** In
  `\sum_{j=1}^{300} w(j)\cos\left(\frac{x\cos(\theta(j))}{\cos(\theta(j))^2}\right)`
  with `\theta(j) = -1.35 + 2.7\frac{j-0.5}{300}`, the shader called the
  NaN-safe helpers `_gpu_min`, `_gpu_sin` and `_gpu_cos`, which cost about 10 %
  per draw. Now the finiteness proof knows the bounds of the index, proves a
  call of a user function through its body, and proves that a divisor such as
  `\cos(\theta(j))^2` is not zero. On GLSL, the `cos` part assumes a GPU `cos`
  error of at most 2⁻⁶; see `docs/COMPILATION-MODEL.md`. The helpers stay when a
  value can be NaN or infinite.

- **A call of a function literal no longer makes the engine type the nodes of
  the body again** (GitHub issue #487). Each call declares its parameters in a
  new scope and pops its frame at the end, and both moved the key of every
  cached type. One `Apply` of the issue's function (8 nested `Fold`s, 75 calls
  of function literals) computed 6,332 types again, each to the same result. The
  type cache now has a key of its own, which these two events do not move: that
  `Apply` takes about 19 ms instead of about 100 ms (from source). A type that
  depends on the scope it is read in is still kept for each call frame, and one
  computed while a recursive derivation is in progress is computed again after
  each call.

- **Compiled code computes a value that does not depend on a callback's
  parameter once, not once per element** (GitHub issue #497). In
  `Sum(Map(k ↦ At(u, k) + Length(u), Range(1, Length(u))))` with
  `u = Map(j ↦ Mod(j², 7), Range(1, n))`, the JavaScript code built `u` twice
  for each `k`. The callback of `u` gets the inferred type of its parameter,
  `j: integer`, and the compiler did not share or move any expression that holds
  a callback with a typed parameter. Now `u` is built once, on the first call of
  the callback over `k`: at `n = 32`, one call is about 6 times faster. Two
  copies of such an expression in one body are also computed once now.

- **The count and the elements of a family of points are known before
  evaluation** (ROADMAP CE-661). `count` of a sum or product of a list of points
  and a point is known: `Add(L, PointList(1.8, 0))` with `L` a list of four
  points has the count 4. `PointX`, `PointY` and `PointZ` of a list of points
  have the count of the list, `PointList` with list components has the smallest
  count of them, and a `ListJoin` of such operands has the sum of their counts.
  `at(k)` of a broadcast, of `PointX`, `PointY`, `PointZ` and of `PointList`
  builds the element `k` from the elements of the operands and evaluates only
  that element, instead of evaluating the whole expression, when the count is
  known, the expression is pure, and no evaluation of it is cached. A new
  operator definition hook, `elementAt(expr, k)`, is the `at()` twin of
  `elementCount`.
- **A product of a scalar and a list, or of two lists, no longer evaluates each
  cell a second time** (ROADMAP CE-618). A list of integrals that stay
  unevaluated, such as `y·[∫ f(x, 1) dx, ∫ f(x, 2) dx]`, tried each
  antiderivative twice: once to evaluate the list, and again in each cell
  product. A scalar that is already a value is also not evaluated again for each
  cell. `y·c(y, L, E)` with `E` a list of 6 takes about 85 ms, before 140 ms.
  The values and errors are the same, also for string cells and absent cells.
- **Integer `Binomial` is faster** (GitHub issue #501). For integer `n` and `k`,
  `binomial()` multiplies directly while the product is a safe integer, and
  takes a gcd step only after the product grows past 2⁵³. The compiled
  `Binomial` and `.N()` both use it. Over every `k` with `n ≤ 60`, a call takes
  about 25 ns, before 187 ns. The results are the same, bit for bit.
- **Boxing nested folds whose accumulator type cannot be refined is faster**
  (GitHub issue #487). A fold whose accumulator is joined in a branch of an `If`
  whose condition can be `Missing` (a comparison with a value that may be a
  list) settles on an accumulator type with a `missing` arm, which the binding
  of the accumulator does not admit, so the fold keeps the type it was admitted
  with. Such a fold canonicalized its body four times in every step of every
  fold around it. Now the next step of the enclosing fold canonicalizes it once,
  when its seed has the same or a wider type. The RSK row insertion of the issue
  (8 folds, 4 deep) boxes in 146 to 157 ms instead of 180 to 191 ms (run from
  source; each figure the median of 15 boxes, in separate runs). The types are
  the same.

## 0.175.0 _2026-10-30_

### Performance

- **Compilation: the shared-subexpression pass is linear when a conditional
  branch reads a value computed before it** (ROADMAP CE-595). In
  `e_{k+1} = Arctan2(e_k, If(x > k, e_k, 0))` and
  `e_{k+1} = When(sin(e_k), e_k > k)`, with each `e_k` built once with
  `ce.function()`, the pass made a copy of its analysis of `e_k` for the branch,
  and the copies doubled at each level: 36 seconds at depth 14, for about 1,500
  characters of code. When the analysis grows faster than the number of branches
  and binders in the expression, the branch now reuses the analysis made before
  it: depth 40 compiles in about 10 ms. The code for these two graphs is the
  same as before. For other graphs in this case, the pass can put the
  temporaries at other places than before (the values do not change). An
  expression whose analysis does not grow in this way gives the same code as
  before.

- **Interval target: smaller code for conditional branches over a shared
  graph.** The `interval-js` target compiles each branch of an `If` again over
  the inputs narrowed to where the branch can be selected. A narrowed branch did
  not share its repeated subexpressions, and a branch nested in a narrowed
  branch was compiled again for each path to it: in
  `e_{k+1} = Arctan2(e_k, If(x > k, e_k, 0))` the code doubled at each level
  (314 KB at depth 10, out of memory at depth 20). Now a narrowed branch shares
  its own repeated subexpressions, a narrowing that cannot change a value (the
  branch of `x > k - 1` inside the branch of `x > k`) is not written, and a
  branch nested in a narrowed branch is a local function compiled once. The
  graph above gives 36 KB at depth 20, and
  `e_{k+1} = e_k + If(x > k, e_k, 0) + If(x < -k, sqrt(e_k), 1)` gives 266 KB at
  depth 10 (2 MB at depth 8 before). The results of the compiled code do not
  change.

- **Interval target: a check of block-local functions visits each shared node
  once.** It walked an expression graph once for each path, and
  `e_{k+1} = When(sin(e_k), e_k > k)` took 8 seconds to compile at depth 28. It
  now takes about 15 ms. The result of the check does not change.

- **Non-radian angular unit: a shared value is converted once.** In degree mode,
  the conversion of a stored value to radians walked a shared graph once for
  each path, so a stored point that holds `u_{k+1} = u_k + \sin(u_k)` took 6.8
  seconds at depth 18 and ran out of memory at depth 20. It now takes a few
  milliseconds, and the converted value keeps its sharing.

- **GLSL/WGSL: a small power of a scaled bounded value no longer needs the
  NaN-safe helper.** The base of a power `b^n` (`n` from 2 to 4) proven finite
  for `sin`, `cos`, `sign`, `min`, `max` and `clamp` can now hold a product of
  number literals and one bounded part: with `x, y: real<-10^{15}..10^{15}>` and
  `T: real<-10..10>`, `\min((x - 0.14\cos(T+1.9) + 0.189)^2, y)` and
  `\min((2x)^2, y)` compile to the built-in `min` instead of `_gpu_min`. A
  rational factor (`\frac{2}{3}x`), two symbols (`xy`), or a product whose size
  can overflow keeps the helper.

### Behavior Changes

- **Compilation: an unsupplied collection input gives no value instead of an
  error.** With `L` declared `list<number>`, a compiled
  `Block(c := 5, Loop(c := c + k, Element(k, L)), c)`, `Sum(L)` or `Length(L)`
  threw a `TypeError` (`_.L is not iterable`) at `run({})`. The run now returns
  `NaN` for a number result and `undefined` for other results, before any code
  runs, as the interpreter has no value for `Sum(L)`. The test also covers an
  input read through a user function, a callback, a block-local copy (`M ≔ L`)
  or a folded symbol value, and it applies to stored runtimes and to
  `broadcast()` (the cells are `NaN`, with no failure counted). It is strict:
  `If(c, Sum(L), 0)` with `c` false has no value too. `run({L: null})` still
  throws. In Python, `compileFunction()`, `compileVectorized()` and
  `compileLambda()` return `nan` or `None` for `L = None`; `compile()` and
  `compileToSource()` do not change. See `docs/ERROR-MODEL.md`, "An unsupplied
  collection input".

- **`Series` drops a term whose constant coefficient is an unfolded 0 at every
  call** (CE-659). `Series(sin x + (sin²1 + cos²1 − 1)·x², x, 0, 5)` kept the
  `x²` term in a new engine and dropped it after the engine had tested that
  constant for 0 once (`exactZeroVerdict()` kept its answers for the life of the
  engine). Each constant coefficient is now tested, so the result is always
  `x − 1/6·x³ + 1/120·x⁵ + O(x⁷)`. A coefficient that is not pure is not tested
  and stays in the result. The test costs little on most series: a coefficient
  such as `sin 1 + cos 1` is proved not 0 from the enclosures of its parts, with
  no evaluation, and `Series(eˣ·sin(x + 1), x, 0, 15)` takes about the same time
  as before. A coefficient that is an unfolded 0 runs the exact test at each
  call, and a series whose expansion tests the same constant term in several
  forms (`1/(x² − 3 − 2√2)` at `1 + √2`) takes about 1.3 times as long as
  before.

- **A lazy collection over a call of a user function follows the assignments
  that change the call.** With `f(u) = u + x` and `x := 1`,
  `Reverse(List(1, f(1)))` gave `[2, 1]`, and after `x := 5` it still gave
  `[2, 1]`: the value of the collection was kept as if `f(1)` were a constant.
  It now gives `[6, 1]`. The same holds after `f` is assigned another function,
  for a dictionary that holds such a call, and for a call of an operator that
  the host declared. A collection over calls of the standard library on
  constants (`Reverse(List(1, Sqrt(2)))`) keeps its value as before.

- **JavaScript: a comparison over a variable the caller did not supply has no
  value** (user decision 2026-10-30). With `x` declared `real`,
  `compile("x > 0").run({})` gave `false`; it now gives `undefined`, as the
  interpreter has no value there. The same holds for `Equal`, `NotEqual`, a
  chain (`x < 1 < y`, evaluated pair by pair) and a bare `Not`, `And` or `Or` of
  a variable declared `boolean`. A `NaN` operand still decides (`Less(NaN, x)`
  is `false`). Where only the truth of a numeric comparison is read
  (`Boole(x > 0)`, a `Filter` predicate) the code has no test and no extra cost.
  A branch on such a comparison already took no arm.
- **A comparison that reads a `Block` local tests every input of the block**
  (user decision 2026-10-30). A local that can depend on a caller input
  (`a := n + 1`) makes a comparison of it test every input that the block reads;
  a loop counter or a constant local compares as it is. This can give no value
  where the interpreter has one (`a := 5; If(x > 0, a := n + 1); a < 1` with `n`
  missing and `x = -1`), never a value where the interpreter has none. When this
  test alone leaves a branch condition undecided, the whole run gives no value
  (`NaN` or `undefined`), so that no branch is taken in the wrong way; such an
  expression is not compiled, and the interpreter evaluates it, when the run has
  an effect after the condition (`Random()`) or can return a function.
- **A compiled list recursion stops at `ce.iterationLimit`.** A list-building
  recursion such as
  `F(n) = Which(n = D - 1, [p(n)], True, Join([p(n)], F(n + 1)))` now compiles
  to a loop again (see below); the loop applies the iteration limit, 1,024 by
  default, as the interpreter does. Before, the recursive function returned up
  to about 5,000 elements and then overflowed the stack. The interpreter's
  message is now the same as the compiled one: "Iteration limit of 1024 exceeded
  while evaluating F()".
- **A compiled user function with one clause accepts `NaN` at a numeric
  parameter**, as the interpreter does (decision 2026-09-30 in
  `docs/ERROR-MODEL.md`). With `f: (real) -> number` and `f := x ↦ 7`, the
  compiled `f(y)` with `y = NaN` gave `NaN` without running the body; it now
  gives `7`. A function with several clauses still refuses `NaN`. When an
  argument fails the check, a function with a list or boolean result now gives
  `undefined` (no value), not `NaN`, and a spread of that call
  (`Join([9], f(w))`) gives `undefined` instead of throwing.

### Resolved Issues

- **A derivative of a function whose body calls a host operator followed the
  host state** (CE-628, CE-647). With `h` a host operator that does not state
  `pure: true` and `f(x) = h(2) · x`, `D(f, x)` was computed once and kept for
  the engine, so a change of the state that `h` reads was not seen by the next
  `D(f, x)`, and neither was a new type given to a symbol that the body reads.
  Both now give the derivative of the current state.
- **The Rubi integrator kept a zero test or a simplification made with host
  code** (CE-648). Inside one `Integrate` call, a constant such as `h(1) − 2`
  with a host operator `h` was tested for 0 once; the second test in the same
  call reused the first answer although the host state had changed. Each such
  test is now made again.
- **A derivative, a Rubi zero test, a dictionary value, or the value of a lazy
  collection computed from a provisional answer is not kept.** A read cut short
  by a reference cycle, a stopped sequence read, an iteration limit, or a
  re-entrant type read gives an answer that a later read can give differently;
  every cache of evaluated values now refuses such a value, where before each
  cache tested its own subset of these events.
- **A lazy collection whose element memo was filled while a transient precision
  or angular-unit window was open kept the digits of the window** (CE-645). With
  `a := [1/3]` and `j = Join(Map(x ↦ N(x), a), [9])`, a walk of `j` started
  outside such a window and pulled inside it stored `0.33333`, and a later
  `j.at(1)` gave `0.33333` at the engine precision of 21 digits. The walk is no
  longer stored, and `j.at(1)` gives `0.333333333333333333333`. Only internal
  callers open such a window.
- **A function assigned again inside a `Block` is called with its new value.**
  With `gg := t ↦ t + 1` assigned in the engine,
  `Block(gg := t ↦ t + 10, gg(1))` compiled to `2` on JavaScript and Python; it
  now gives `11`, as the interpreter does.
- **A list with no value no longer makes compiled code throw.** With
  `k: integer` not supplied, `Take(L, k)` and `Drop(L, k)` gave `[]` and the
  whole list; they now give `undefined`, and `First`, `Max`, `Min`, `Second`,
  `GCD`, `Covariance`, `Quartiles`, `Length` and the other operators of such a
  list give no value instead of throwing a `TypeError` or giving a value. `Take`
  and `Drop` of a string do the same. On Python, a count that is a very large
  integer (`2^100`) no longer raises.
- **An `If` takes no branch when its compiled condition is undecided**, also in
  a loop and when the condition is a chain with an effect; before, a statement
  `If` could run its else branch.
- **A chain in an `If` condition is evaluated pair by pair by the interpreter**,
  as a bare chain already was: `If(x < 0.5 < Random(), 1, 2)` with `x = 5` no
  longer draws.

- **GLSL/WGSL: a call of a function that returns a coordinate of a point or a
  list of points.** With
  `P: tuple<number, number> | list<tuple<number, number>>` and `P := (3, 4)`, a
  user function `f(t) := At(P, 1)` has a signature that returns
  `missing | number | tuple<number, number>`, which has no shader type, and
  `f(x) + x` declined with "Could not compile an object-domain absent
  ('missing') position". The call is now replaced by the body of the function
  when that body, with the point in place of `P`, is a number, as it already was
  when the body is a point: `f(x) + x` compiles to `x + 3.0`. When `P` holds a
  list of points, the compilation declines as before.

- **Compiled code: a `Block` local that may have no value is no longer read as
  `undefined`, 0 or an earlier value** (ROADMAP CE-636). With a local declared
  with no value (`Declare(n, integer)`) and assigned on some paths only, at
  `x = 1` the loop
  `Block(s ≔ 0; Loop(Block(Declare(n, integer); If(i > 3, n ≔ 1); If(n ≠ 1, s ≔ s + i)), i ∈ 1..5); s)`
  gave 6 on JavaScript (`undefined != 1` is `true`), where the interpreter gives
  0; WGSL read 0 and GLSL read an undefined value. Each read of such a local is
  now classified at compile time:
  - a read that comes after an assignment on every path compiles with no check,
    as before;
  - a read with no assignment on any path before it fails to compile on every
    target, with a message that names the local;
  - another read is checked when the code runs: JavaScript and interval
    JavaScript throw an error with `read-before-declaration` and the name of the
    local when the read finds no value, and Python raises `UnboundLocalError`
    through the start value `_ce_unset(name)`. GLSL and WGSL cannot raise an
    error, so they refuse to compile such a read.

  On Python, a local whose reads all come after an assignment on every path no
  longer gets the start value `_ce_unset(name)`. A branch whose condition the
  compiled code may not decide runs no branch, so an assignment in both branches
  of such an `If` is not on every path: on JavaScript this is the case for a
  condition that reads an input the caller can leave out (`x > 5`), and for a
  condition that reads a `boolean` input on JavaScript and Python. A `Which`
  whose last condition is `True` always runs a branch. The bounds of a `Sum` or
  a `Product` whose index has the name of the local are reads of the local. A
  local assigned in a loop that can stop early gets a run-time check on
  JavaScript, and so does a read after an early `Return`. An assignment inside
  an operand of an operator other than `Add`, `Subtract`, `Negate`, `List` or
  `Tuple` counts as possible, not certain, because some lowerings skip an
  operand (`x^0` compiles to `1`): a later read gets a run-time check on
  JavaScript, and GLSL and WGSL refuse it.

- **A list-building recursion compiles to a loop again** (ROADMAP CE-579, a
  regression in 0.172.0). With `F` declared `function` and then assigned
  `F(n) = Which(n = D - 1, [p(n)], True, Join([p(n)], F(n + 1)))`, the
  JavaScript target compiled a recursive function, which overflowed the stack at
  `D = 10000`. It now compiles to the `_SYS.listRecursion` loop, also when `F`
  has no declaration or is declared `(real) -> list`. The interpreter uses its
  loop for an `F` with no declaration too, where it stopped with "Recursion
  limit exceeded", and it checks the argument of each step against the declared
  parameter type, as a direct call does: under `(integer) -> list`, a step
  `F(n + 1/2)` gives the `incompatible-type` error of `F(1/2)` instead of a list
  with non-integer elements.
- **`Take` and `Drop` with a `NaN` count have no value in compiled code.** The
  interpreter leaves `Take(xs, NaN)` unevaluated. Compiled JavaScript gave `[]`
  for `Take` and the whole list for `Drop`, and compiled Python raised a
  `ValueError`; they now give `undefined` and `None`. A count typed `integer`
  keeps the same code.
- **A repeated call with a random argument is evaluated at each position.** In
  `Join(F(w·Random()), F(w·Random()))` with a checked list function `F`, the
  compiled code drew once, or threw when the check failed; it now draws twice
  and gives `undefined` when the check fails. `Take(At(x, i), Random())`
  compiles (it was refused) and draws once.

- **WGSL: a list held by a `Block` local is no longer copied at each read**
  (ROADMAP CE-583). A read with a proven index of such a list indexes the local
  directly (`U[k - 1]`), because a `Block` local is a `var`, which WGSL can
  index with a run-time index. Before, each read first copied the list to a new
  local (`var _tv1 = U;`). A free input of the same name is still copied. The
  GLSL output does not change.

- **GLSL/WGSL: a `Block` local can have the name of a function parameter.** On a
  shader target, a local whose name is bound outside its block (a parameter, a
  loop index, a local of an enclosing block) now gets a fresh name. With
  `f := U ↦ …` and a block inside the body that declares a list `U`, GLSL
  emitted `float _fn_f(float U) { float[10] U; …`, a redeclaration of the
  parameter, and WGSL refused the function with "the body assigns the parameter
  "U"". The WGSL check of `compileFunction()` also reads an assignment that
  comes after a `Declare` of the name in the same block as a write of the local,
  not of the parameter.

- **GLSL/WGSL: a nested `Block` used as a statement no longer returns its
  value.** A block that is not the last statement of a block is now emitted as a
  compound statement (`{ … }`). Before, the body
  `Block(Block(Declare(U, list<real^10>); U ≔ C; U), U + 1)` put the statements
  of the inner block in the scope of the function with `return U;` in front of
  `return U + 1.0;`, so the function returned the list. A block whose value is a
  number was stored in a temporary and then written as the statement `_tv1;`,
  which is not valid WGSL.

- **Python: a nested `Block` used as a statement no longer returns its value.**
  Its statements are put in the enclosing statement list, with no `return`, and
  each of its locals gets a fresh name, because Python has no block scope.
  Before, `Block(Block(Declare(V, real); V ≔ x; V); x + 1)` emitted `return V`
  before `return x + 1`.

- **Compilation declines a block that uses a local before its `Declare`.** In
  `Block(U ≔ 2; Declare(U, real); U ≔ 3; U + 1)`, the first statement writes the
  local `U` of the block, which the interpreter reports as
  `read-before-declaration`. Every target now declines such a block, for a write
  or a read before the `Declare`. Before, JavaScript threw a `ReferenceError`
  when the code ran, and GLSL and WGSL wrote a variable before its declaration,
  which is not valid source. The check also runs on a loop body: in
  `Loop(Block(If(k > 1, s ≔ s + U); Declare(U); U ≔ 100), k ∈ 1..2)`, Python
  read the input `U` and gave 100. A use inside a function literal, or in a
  nested block that declares the name again, is not affected.

- **JavaScript and Python: a local of a nested block in a loop body or a branch
  no longer writes an outer variable of the same name.** With
  `Block(Declare(V); V ≔ 1; Loop(Block(Block(Declare(V); V ≔ 100); V ≔ 2V), k ∈ 1..3); V)`,
  JavaScript gave 1 and Python gave 200, where the interpreter gives 8. In a
  JavaScript loop body, a nested block that declares a local is now a block
  statement (`{ … }`). On Python, each local of a block in a loop body or in a
  statement-form `If` branch gets a fresh name
  (`If(x > 0, Block(Declare(V); V ≔ 7), V ≔ 5)` gave 7 instead of 1). A
  `Declare` with a value assigns the value. A `Declare` with no value sets the
  local to the start value `_ce_unset("V")`, and a use of that value raises
  `UnboundLocalError`, so a local of a loop body no longer keeps its value from
  the previous pass (a sum that read such a local gave 5; JavaScript gives NaN).
  A result of the function that is this start value raises too. The start value
  is left out when the next statement assigns the local.

- **Python: a `Declare` whose value is a block declines.** In
  `Declare(t, real, Block(Declare(u, real, i); u + 1))`, the `return` of the
  inner block was put after `t = `, and the function returned at the first pass
  of a loop.

- **Python: a `Loop` index no longer overwrites another variable of the same
  name.** Python has no block scope: a `for` statement assigns its index in the
  scope of the whole function. An index with the name of a parameter, of a local
  of an enclosing block, of a free symbol, or of a name that a `vars` entry
  reads now gets a fresh name. With
  `Block(Declare(s); s ≔ 0; Loop(s ≔ s + x, x ∈ 1..3); s + x)` at x = 2, Python
  gave 9; the interpreter gives 8. The names of the new Python helpers
  (`_ce_unset`, `_ce_unset_type`, `_ce_checked`) start with `_ce_`, so a symbol,
  a parameter or a function with one of these names fails to compile when the
  code uses the helper.

- **GLSL/WGSL: a coordinate of a symbol that can be a point or a list of
  points** (ROADMAP CE-593). With
  `P: list<tuple<number, number>> | tuple<number, number>`, the type of `P.x`
  was `list<number> | missing | number`, and the shader targets declined it with
  an internal message about a "missing" position. The type is now
  `list<number> | number`: the coordinate of a point and the list of coordinates
  of a list of points are never absent. When `P` has an assigned point and no
  `vars` entry maps it, `P.x + y` compiles to `y + 1.0` on GLSL and WGSL, as for
  a symbol declared as a point. Otherwise a shader has no value that can be both
  a point and a list of points, and the compilation declines with a message that
  names `P`, its type, and the declaration to write
  (`ce.declare('P', 'tuple<real, real>')`). `compileFieldFunction()` declines
  such a parameter with the same remedy, because a field of its parameter struct
  has one fixed type.

- **GLSL/WGSL: whole-vector uses of such a symbol** (ROADMAP CE-593). With the
  same `P` and an assigned point, `P + (y, y)`, `2P`, `\sin(xP)`,
  `\Vert P\Vert`, `Dot(P, (x, y))` and `\operatorname{distance}((x,y),P)`
  declined with "an operand lowers to a shader ARRAY", because the compilation
  read the declared type. A user function `f(t) := t P` compiled to
  `float _fn_f(float t) { return vec2(1.0, 2.0) * t; }`, and a `Block` local
  holding `2P` was declared `float`. When the shader computes the value of `P`
  (no `vars` entry maps it), the shader compilation now writes the point in
  place of `P`, in the expression and in the bodies of the user functions that
  it compiles. A call of such a function, whose stored signature returns the
  union, is replaced by its body when that body is then a point: `f(x).x`
  compiles to `(x * vec2(1.0, 2.0)).x`. The stored definitions and signatures do
  not change. A function that returns a list of points through the union
  declines with a message that names the union. A bare `P` with no value
  compiled to the name `P`, which the host then had to declare with a type that
  the compilation cannot decide. A read of `P` as a shader input (no value, or a
  `vars` entry) now declines with the message above.

- **Compiled code: an assigned value in a non-radian angular unit.** The
  compilation writes the value of an assigned symbol in place of the symbol, and
  it did not convert that value to the radian convention of the compiled code.
  In degree mode, `c := \sin(x)` compiled to `Math.sin(_.x)` (0.894 at `x = 90`
  instead of 1) on every target, and `P := (\sin(x), 0)` compiled to
  `vec2(sin(x), 0.0).x` on GLSL. The value is now converted, once. Also,
  `compileToSource()` and `compileFunction()` of the GLSL, WGSL and Python
  targets did not convert their expression at all; they now do, as `compile()`
  does.

- **The coordinate type of a tuple value under an `indexed_collection` option.**
  With `P: indexed_collection<tuple<number, number>> | tuple<number, number>`
  and `P := ((1, 2), (3, 4))`, `PointX(P)` is the point `(1, 2)`, which its type
  `list<number> | number` did not admit. The type is now
  `list<number> | missing | number | tuple<number, number>`.

- **Non-radian angular unit: a compile-time fold or a closed-form integral that
  reads a stored trigonometric value.** The compilation folds a constant
  subtree, and tries the antiderivative of an integral, in the radian
  convention, but it read the stored value of an assigned symbol in the engine's
  unit. In degree mode, with `k := \sin(30)`, `2k` compiled to -1.976 instead of
  1, and `\int_0^x k\,dt` gave -1.976 at `x = 2` instead of 1, on `javascript`,
  `glsl` and `python` (and `interval-js` for the integral). A fold or an
  antiderivative that reads such a stored definition (a symbol value, a function
  literal or the clauses of a function) is now skipped: the structural compile
  converts each value, and the integral uses the numeric route. Python
  `compileLambda()` now converts its expression too.

- **Non-radian angular unit: `AbsArg` declines.** The second component of
  `AbsArg(z)` is an angle in the engine's unit, which the compiled code computed
  in radians: in degree mode, `2·AbsArg(1+i)_2` compiled to 1.5708 instead
  of 90. Every target now declines an expression that reaches `AbsArg`
  (directly, through a stored value or through a function body) when the unit is
  not radians, with a message that suggests `(Abs(z), Argument(z))`. Radian mode
  does not change.

- **`Argument` of a real NaN is NaN.** The `javascript`, `glsl` and `wgsl`
  lowerings of `Argument` for a real operand gave π (180 in degrees) for NaN,
  where the interpreter gives NaN.

- **A declined compilation reports `strict` mode.** When the compilation
  declines and the result runs the interpreter, the result could carry the mode
  and the promotion flag of an earlier compilation of the same engine.

- **Interval target: a narrowed branch inside a `Sum` reads no value computed
  over all the inputs.** A `Sum` binds its loop-invariant subexpressions to
  names. A branch of an `If` in its body, which is compiled over the inputs
  narrowed to where it can be selected, read these names for equal
  subexpressions, so it used values computed over all the inputs:
  `Sum(If(x > 1, ln(k + x), If(x > 1, ln(x - 1), arccos(x))), k = 1..n)` over
  `x ∈ [0.5, 1.5]` gave `partial` (domain clipped). It now gives an `interval`.

- **A written `Missing` value beside a point or a list compiles to the absence
  marker of that shape.** `If(c, (x, y), Missing)` compiled on `glsl` and `wgsl`
  to a ternary with a scalar NaN beside a `vec2`, which is not a valid shader;
  it now gives `vec2(NaN)`, also when the other value is itself a selection that
  may be absent (`If(c, If(d, (x, y), Missing), Missing)`). On `python` it gave
  `nan` where the interpreter gives `Missing`; it now gives `None`. The same
  holds for `Which` and for a list value `[x, y]`.
- **More selections compile on `glsl`, `wgsl` and `interval-js`.** A list of 2
  to 4 numbers that may be absent (`If(c, [x, y])`, `When([x, y], c)`) now
  compiles to a `vecN` on the shader targets. On `interval-js`, an `If` with a
  point or list value now compiles, as `Which` and `When` already did, and a
  value whose condition is a constant `False` is no longer compiled (it made
  `If(False, [Zeta(x), 1], 1)` decline).
- **`interval-js` no longer reports "no value" for a selection of lists of
  different lengths.** With an undecided condition, `If(x > 0, L, [x])` over
  `x ∈ [-1, 1]` gave the empty result, which claims that no value exists; it now
  gives the whole domain (`entire`), also inside an enclosing selection. When
  the lengths are known at compile time to differ, the compile declines.
- **A long conditional with a `Missing` value compiles on `interval-js`.** Past
  2,000 characters of code, a conditional is emitted with closures, and a
  `Missing` value made the generated function a syntax error. A chain of nested
  selections also compiled each value several times per level (depth 10
  overflowed the stack); depth 24 now compiles in a few milliseconds.
- **The type of a compiled `run()` accepts a boolean or a string input.** With
  `c` declared `boolean`,
  `ce.box(['When', 'x', 'c']).compile().run({ x: 2, c: true })` worked on the
  JavaScript target but was a TypeScript error; the input type of `run()` (and
  of a `broadcast()` list input) now admits `boolean` and `string` values.
- **A value of the wrong type for a `string` variable throws.** With `s`
  declared `string`, `If(s = "a", 1, 2)` run with `s = 3` gave `2`; it now
  throws a `TypeError` that names `s`, on `run()` and on `broadcast()`, as a
  string or a boolean for a number variable already did.
- **Boolean inputs on every route.** `broadcast()` on the JavaScript target
  refused a variable declared `boolean` ("must be a Float64Array or a number");
  it now accepts a boolean scalar, an array of booleans and an empty column, on
  the sync, async and worker routes. On `interval-js` a JavaScript boolean was
  read as "maybe"; it is now `'true'` or `'false'`, and `broadcast()` accepts it
  too. A boolean column is checked again on each batch, and `broadcastAsync()`
  refuses a column whose length or contents change during the batch.
- **A bare `Not`, `And` or `Or` of an unsupplied boolean has no value.** With
  `c` declared `boolean`, `compile("\\lnot c").run({})` gave `true`; it now
  gives `undefined`, as the interpreter has no value.

- **`subs()`, `map()` and a recursive `replace()` keep the function each call
  was written with.** With `h := a \mapsto a x`, `e = h(a) + 1`, and then a
  scope that declares `h := a \mapsto 100`, `e.subs({a: k}).evaluate()` gave
  101: the rebuilt call looked `h` up in the current scope, while `e.evaluate()`
  correctly gives `a x + 1`. It now gives `k x + 1`. An integral, a derivative
  or a limit that writes in the body of a function through these operations now
  also reads the function each inner call was written with (an integral of
  `c(x)`, where `c` calls `n` and a scope declares another `c` and `n`, gave 101
  instead of 4/3). `isSame()` and the hash still compare a call by its name, and
  the canonical form of a raw or structural result (a `replace()` rule written
  as LaTeX strings) still binds each call in the current scope
  (`docs/SCOPING-MODEL.md`).

- **An integral written before its function is defined uses that function.**
  `\int_0^1 g(x)\,dx` parsed before `g(t) := t` stayed unevaluated after the
  definition (`.N()` gave 0.5), while `D` and `\sum` written the same way used
  the later `g`. It now evaluates to 1/2, also for
  `\int_0^1 \operatorname{Apply}(f, x)\,dx` and `x \mapsto q(x)` written before
  `q`. Under a scope that declares another `g`, such an integral keeps the `g`
  of the scope where it was written (it gave 100 with `g := t \mapsto 100`). An
  unknown data symbol of an integrand is unchanged.

- **`Contains`, `Unique` and `Element` compile over a list of lists.** On the
  JavaScript target they were refused when the elements were lists
  (`xss: list<list<integer>>`), because the compiled `includes`/`Set` would
  compare the arrays by reference. They now compare the elements structurally,
  as `evaluate()` does, and so do `RangeOf`, `ContainsSequence`, `StartsWith`
  and `EndsWith`. These operators are still refused, and the interpreter
  evaluates them, when the elements are tuples, complex numbers or lists of a
  type that may be absent, when the searched value may be a tuple, and when the
  program (or a value or function that it reads) holds a `Map`, a `Filter` or
  another lazy collection, or a `Range` other than a `Range` of integers with
  literal bounds. The interpreter keeps those apart from a list of the same
  values, and the compiled code would not. On the JavaScript target, `Contains`
  and `IndexOf` over text also no longer fail when a function parameter is named
  `_v`. (#499, contributed by [enumeratio](https://github.com/enumeratio) in
  #500)

## 0.174.0 _2026-10-30_

### Breaking Changes

- The minimum supported Node.js version is now **26.13.0** (LTS).

### Performance

- **An expression that shares a subexpression evaluates it once** (ROADMAP
  CE-601). During one evaluation, a pure subexpression that the expression uses
  at several places (a node built once with `ce.function()` and used twice) is
  evaluated once per evaluation frame, then reused while no state that it reads
  changes. `Max(t, t)` nested 30 deep over `x + y` took longer than 2 minutes
  and now takes about 3 ms, and so does a recursive function whose body is such
  an expression. The exact result and the numeric approximation are kept apart,
  and so are the results under another precision, angular unit, random seed
  frame or entropy handler. An impure subexpression (`Random()`, an assignment)
  is evaluated at each occurrence.

- **GLSL/WGSL: a small power of a bounded value no longer needs the NaN-safe
  helper.** A power `b^n` with `n` from 2 to 4, whose base is a symbol with a
  declared range, a `sin` or `cos` of a real value, or a sum of those, is now
  proven finite when it is the operand of `sin`, `cos`, `sign`, `min`, `max` or
  `clamp`, or a term of a sum there. With `x, y, T: real<-10..10>`,
  `\min((x-\cos(T))^2, y)` compiles to the built-in `min` instead of `_gpu_min`.
  A power elsewhere (a factor of a product, under `\lfloor\rfloor`) and a sum
  whose terms can overflow together keep the helper.

### Behavior Changes

- **A host operator is cached only when it states its purity.** An operator that
  the host declares (with `ce.declare()`, in a library passed to the
  constructor, or with `ce.loadLibrary()`, or a JavaScript function assigned
  with `ce.assign()`) and that does not state its purity is now evaluated at
  each occurrence, on the synchronous and the asynchronous routes (`evaluate`
  and `evaluateAsync` handlers): no memo keeps its result, nor a result computed
  while it ran. Before, such an operator was pure by default and the memos could
  keep a result that it computed: with `R(a)` returning `a` plus the value of
  `x`, read in its handler, and `g(n) := R(n)`, `g(1)` stayed `2` after
  `ce.assign('x', 100)`; it is now `101`. The same applies to:
  - each call of a collection handler (`at`, `iterator` and each step of the
    iterator, `count`, `contains`, …) of a host operator that does not state its
    purity, and of a symbol that the host declares with collection handlers. The
    handlers that describe the collection (`isCollection`, `isLazy`,
    `isEnumerable`, `eltsgn`, `elttype`) are not counted;
  - each call of a host callback of a protocol implementation
    (`ce.declareProtocolImplementation()` with a JavaScript function, getter or
    setter);
  - the `evaluateAsync` handler of a user function, on the asynchronous route;
  - each call of a `subscriptEvaluate` handler that the host gives (a value
    definition cannot state its purity; the handlers of `ce.declareSequence()`
    are not host code).

  The memos that follow this rule are: the memo of shared subexpressions, the
  memo of the applications of a function literal, the memo of the value of a
  lazy collection or an inert expression, the memo of the elements of a
  collection, the memo of the `count`, `isEmpty` and `isFinite` of a collection,
  the evaluated value that `at()` reads for a function expression with no
  collection handlers, the memo of the bounds of a slice, the memo of the value
  of a symbol, the memo of the terms of a sequence, the memos of exact zeros and
  exact complex parts of the series and residue code, the memo of the
  approximations of the comparisons, the compiled probes of `Limit`, the
  compiled functions of `Map`, and the values of the sources of a lazy view that
  its finiteness test evaluates and its operand step reuses.

  A declaration states its purity with `pure: true` (or `pure: false`),
  `drawsRandom: true`, an `effects` set (`effects: []` for a pure operator), or
  an effect specifier on the signature (the `pure` keyword for a pure operator);
  `drawsRandom: false` alone states nothing. An extension
  (`ce.declare(name, patch, { extend: true })`) that states nothing about purity
  keeps the statement of the operator that it extends, and an extension of an
  operator of a standard library that keeps its `evaluate`, `evaluateAsync` and
  collection handlers stays library code. State `pure: true` only for a handler
  that depends on its operands alone. The compiler skips the calls of a host
  `compile` handler only when its definition states `pure: true`. The operators
  of the standard libraries and the user functions keep their purity. A host
  handler that changes state (`ce.assign` of a symbol, also from a collection
  handler such as `at`) stops every memo from keeping a result computed across
  it, even when its operator states `pure: true`. The other host hooks
  (`canonical`, `type`, `sgn`, `eq`, `neq`, `cmp`, `even`, `canEnumerate`,
  `elementCount`, `derivative`, `compile`, the descriptive collection handlers,
  and the function `value` of a constant) describe the operator or the symbol
  and are not counted.

- **A definite integral whose integrand calls a user function with a list
  argument keeps the call in each element.** With
  `c(y, D, e) := \int_{-D}^{D} n(x, y, e)\,dx` and `E` a list,
  `\int_a^b y\,c(y, L, E)\,dy` evaluated to a list of integrals with the body of
  `c` written in (`[∫ y·∫ n(x, y, E_1) dx dy, …]`); each element is now the same
  as the integral with one element of `E`: `[∫ y·c(y, L, E_1) dy, …]`. The
  values do not change, and evaluating it is about 7 to 10 times faster (about
  the time of the integrals of the elements one by one). This applies when the
  integrand calls a user function (defined with `:=`, or declared `function` and
  assigned a function literal), has no side effects, holds no `Sum`, `Product`,
  `D` or other held operator outside the called functions, and the list has at
  most 100 elements; otherwise the integrand is evaluated whole, as before.

### Resolved Issues

- **An integral, a derivative or a limit of a call keeps the function the call
  was written with.** With `g := t ↦ t`, `I = \int_0^1 g(x)\,dx`, and then a
  scope that declares `g := t ↦ 100`, `I.evaluate()` gave 100 instead of 1/2,
  `\lim_{x\to2} g(x)` gave 100, and `D(g(x), x)` gave 0: these routes read the
  function by its name in the current scope. They now use the function that the
  call is bound to, as a plain call `g(3)` does, for a function defined with
  `:=` and for a function held as a value. The numeric value of such an integral
  (`.N()`) is now computed under that scope where it stayed unevaluated; a
  compilation that would need two different functions of the same name is
  refused, and the interpreter runs instead.

- **A compiled integral keeps a parameter named `e`, `i` or `\pi`.** With
  `q(y, e) := \int_0^1 e x\,dx`, the compiled `q(y, 2)` gave 1.359 (Euler's
  number divided by 2) instead of 1: the compiler boxed the operands of a
  closed-form integral again from MathJSON, so a parameter named `e`, `i` or
  `\pi` became the constant, and a parameter named like a global read the
  global. The same names no longer make the compilation of a function over a
  list of points decline.

- **The compiled probes of `Limit` are computed again after a change of state.**
  A limit that the engine computed once kept the compiled probe of its
  expression, with the values of its symbols at that time: with
  `L = Limit(e^(a x)/x^3, x → ∞)`, `L` gave `+∞` for `a = 2`, and still `+∞`
  after `ce.assign('a', -2)`; it now gives `0`. The memos of exact zeros and
  exact complex parts of the series and residue code are computed again after a
  redefinition of an operator.

- **GLSL and WGSL compile a `Map` inside the lambda of another `Map`.** Before,
  `\min(\mathrm{Map}(k\mapsto\max(\mathrm{Map}(j\mapsto j\cdot k,[1,3]))+x,[1,2]))`
  failed on both shader targets with "Could not compile `Map`: … no lowering";
  now it compiles to `min(x + 3.0, x + 6.0)` (with the NaN-safe helper). A `Map`
  over a list of known length whose lambda body binds a name (an inner `Map`, a
  `Sum`, a `Comprehension`) is written out on the shader targets. The shader
  targets still decline when an element of the list would be captured by a name
  the body binds, when an anonymous parameter (`_`, `_1`) is bound again inside
  the body, when an inner length is not known, or when the result would hold
  more than 64 written-out lambda bodies (a larger shader would probably fail in
  the driver). The other targets are unchanged: they compile such a `Map` as a
  loop.

## 0.173.0 _2026-10-28_

### Resolved Issues

- **A one-letter library operator name used as a value is a variable in more
  places.** `N` and `D` are library operators. When one of them appears
  unapplied where a value is expected, it already became a variable in a sum
  (`x + N`). Now this also happens in an integrand (`\int_0^1 N\,dt`), the
  initial value of `Reduce`, `Fold` and `Scan`, a comparison or a chain of
  comparisons (`N = 2`, `2 = 2 = N`, `N \equiv x`), a list, a tuple, a set, the
  branches of `If`/`Which`/`When`, the body of a sum or a product, a limit, a
  statement of a `Block`, and an argument of an undeclared function or of a
  parameter typed as a value. So `unknowns` lists it, and a later `N := 3` is
  used. Before, `ce.parse('y=\\int_0^1 N\\,dt').unknowns` was `["y"]`. The
  variable is declared where an automatic free variable is declared, so an
  assignment reaches it from inside an integral or a sum. A name at a function
  position (`Apply(N, x)`, the function of `Map`, a parameter typed as a
  function) stays the operator, and `N(2.3)` and `D(x^2, x)` still call the
  library operators after a value use. In `Reduce(L, N, N)` the initial value is
  the variable and the fold uses the library `N`. A local of a `Block` and a
  parameter of a function named `N` stay local.

- **Two random draws are no longer merged into one.** Two draws are two
  independent values, and merging them changed the distribution of the result.
  Before: `Random() + Random()` simplified to `2Random()`, `Random()·Random()`
  to `Random()^2`, `Random()/Random()` to `1`, and with `r` declared
  `(number) random -> number`, `r(t) + r(t)` evaluated to `2r(t)`; the trig and
  log identities (`sin²u + cos²u → 1`, `tan u·cot u → 1`, `ln u − ln u → 0`,
  `log_u(u) → 1`, …) and `Factor` (`r(t)² + 2r(t) + 1 → (r(t) + 1)²`, a common
  factor on both sides of a relation) did the same. Now the canonical form,
  `evaluate()`, `simplify()` and `Factor` keep the draws apart. A rule given to
  `simplify()` with a repeated wildcard does not match two draws; the public
  `match()` and `replace()` are unchanged. Pure terms and calls of an undeclared
  function still merge.

- **`Together`, `Factor` and `Cancel` of a sum of calls of an undeclared
  function** (Tycho ledger row 472). `Together(g(t) + g(t))` gave the invalid
  `0 / Error("missing")`: a term not known to be a number was split into the
  symbols `Nothing`, which a guard did not recognize. `Factor` and `Cancel`
  returned `g(t) + g(t)`. All three now give `2g(t)`, as `evaluate()` does. A
  term that draws is still not merged (`Random() + Random()`, a function
  declared with the `random` effect, `g(Random())`), and `Together` leaves a sum
  alone when a denominator draws: `1/Random() + 1/Random()` is not `2/Random()`.

### New Features

- **`ce.stepsLeft`: the steps left in the innermost step budget.** Inside a
  `withStepBudget` span it gives the steps left in that span's budget (negative
  once it is spent), and `undefined` when no step budget is active.
  `steps - ce.stepsLeft` is the number of steps the span used, and
  `ce.stepsLeft < 0` tells that this span's budget, not an enclosing one, is
  spent; `ce.stepBudgetSpent` cannot tell the two apart.

## 0.172.0 _2026-10-28_

### New Features

- **A point parameter of a WGSL field function is a vector field of the
  parameter struct** (ROADMAP CE-591). A parameter of
  `WGSLTarget.compileFieldFunction()` that is a tuple of 2, 3 or 4 real numbers,
  by its declaration (`tuple<real, real, real>`, or `tuple<number, number>`: the
  host writes only real values into the buffer) or by its value
  (`ce.assign('A', ['Tuple', 1, 2])`), is one `vec2f`, `vec3f` or `vec4f` field
  of the struct. The field function reads it as a WGSL vector, so whole-vector
  operations and component reads compile: with `A := (1, 2)` and
  `B := (0.5, -1, 2)`, the field
  `c + \operatorname{distance}((x,y,z),B) + A.x \sin(y) - B.z` gives
  `return ce_params.c + sin(y) * ce_params.A.x + -ce_params.B.z + distance(vec3f(x, y, z), ce_params.B);`
  and the struct `{ c: f32, A: vec2f, B: vec3f }` with the offsets 0, 8 and 16.
  The offsets follow the alignment rules of the uniform address space (`vec2f`
  at a multiple of 8, `vec3f` and `vec4f` at a multiple of 16). A tuple of
  integers is a vector of `f32` too. A change of the point is a buffer write:
  the compiled text does not change. A tuple of 1 or more than 4 components, or
  with a component that is not a real number (complex, `NaN`, a list), declines.
  A list parameter keeps its `array<vec4f, ⌈n/4⌉>` layout. A user-defined
  function that the field calls can read a point declared before its first
  assignment (`ce.declare('A', 'tuple<real, real>')`); with a type inferred from
  integer values (`A := (1, 2)` and then `h(t) := t + A.x`) the field declines
  and names that declaration. A point whose value reads other symbols is not a
  parameter: `A := (a, b)` gives the parameters `a` and `b` and the code
  `vec2f(ce_params.a, ce_params.b)`, and `A := (x, 1)` reads the coordinate `x`.
  Checked on WebGPU (Apple GPU, headless Chromium) against the `javascript`
  target.

- **`ce.timeRemaining` and `ce.stepBudgetSpent`: the state of the current
  span.** `ce.timeRemaining` is the number of milliseconds left before the
  earliest deadline of the active `withTimeLimit` spans (`Infinity` when no span
  has a time limit, `0` or less once the deadline has passed).
  `ce.stepBudgetSpent` is `true` when a step budget of the current span or of an
  enclosing one is spent. A host loop that does its own work inside a span reads
  the first to stop on time; a cache reads the second before it stores a value,
  so that it does not keep a value computed after a caught cancellation. Both
  describe the span of the current synchronous code: after an `await` they read
  `Infinity` and `false`.

- **The global slot `Symbol.for('io.cortexjs.compute-engine')` is documented and
  typed (`ComputeEngineGlobal`).** A component that must work with a copy of the
  Compute Engine loaded by the page finds the `ComputeEngine` class, `version`,
  `LatexSyntax`, `LATEX_DICTIONARY`, `compile`, the type guards, `numericValue`
  and `sym` there. Its contents are an additive contract: a later version can
  add a member, but does not remove or change one. The main entry point and
  `/epsil` store it; `/core` does not.

- **Two runtime helpers of compiled JavaScript are a stable contract for a
  `compile` handler:** `_SYS.atNoWrap(base, index)` (1-based position, no
  wrap-around) and `_SYS.atMask(base, mask)` (the elements where a list of
  booleans is `true`). Every other `_SYS` member stays internal.

- **WGSL field functions for compute shaders:
  `WGSLTarget.compileFieldFunction(expr, { name, coordinates })`** (Tycho ledger
  row 461, ROADMAP CE-571). It returns a function
  `fn <name>(x: f32, y: f32, z: f32) -> f32` that a compute shader of the host
  calls at each grid point, the helper functions it needs by name, and the
  layout of one uniform struct that holds its parameters. Every free symbol that
  is not a coordinate (and every symbol with a value that is not a constant or a
  function) is a parameter, read as `ce_params.<name>`: a real or integer scalar
  is an `f32`, and a numeric list of known length (at most 1024 elements) is
  `array<vec4f, ⌈n/4⌉>`, read by position with the index rules of `At`. The
  result gives the struct declaration (`paramsStructSource`), each field with
  its byte offset and size (`params`), and the buffer size (`paramsSize`, a
  multiple of 16); the host declares the one `var<uniform>`. A change of a
  parameter value is a buffer write: the compiled text does not change, and
  neither the value nor a fact that it gives (its sign) is read. A list with a
  `'storage-buffer'` hint is read from its storage buffer, also in the
  user-defined functions that the field calls: its struct and its
  `var<storage, read>` declaration are in the helpers, and its layout in
  `storageBuffers`. A helper name always has the same source text, so the
  helpers of several field functions merge by name; the one exception is the
  declaration of a storage buffer, which has one text only for one hint and
  element type, so a buffer that several fields read must have the same hint in
  each. The user-defined functions are named after the field
  (`_fn_<k>_<name>_h`, with k the length of the field name). An expression that
  `compile(expr, { to: 'wgsl' })` declines is declined with the same diagnostic;
  a boolean, text, complex or longer-list parameter, a `Return` or a result that
  is not a real scalar, a body that assigns an input, and a user-defined
  function that reads a coordinate it does not take, also decline. A parameter
  declared `real` is read as a finite value, so `sin` and `cos` of an operand
  that reads it are the built-ins, with no `NaN` test. Checked on WebGPU (Apple
  GPU, headless Chromium) against the `javascript` target.

- **A list in a `wgsl` storage buffer, with a length that changes at run time.**
  The hint `storage: { S: { kind: 'storage-buffer', group, binding } }` on
  `compile(…, { to: 'wgsl' })` makes the preamble declare
  `struct CE_List_f32 { len: u32, data: array<f32> }` and
  `@group(G) @binding(B) var<storage, read> S: CE_List_f32;`. The struct is
  named by its element type (`CE_List_f32`, `CE_List_vec2f`, …), so a host that
  merges preambles keeps one copy of each struct and one `var` line per buffer.
  The host writes the logical length `len` at byte 0 and the elements from
  `dataOffset` (4 for numbers, 8 for 2-D points, 16 for 3-D and 4-D points,
  which have a stride of 16 bytes); a change of length is one 4-byte write, with
  no new compilation. `CompilationResult.storageBuffers` gives the layout of
  each buffer the code reads. `At(S, i)` (the index rules of `At`, against
  `len`), `Length(S)`, `Sum`, `Product`, `Max`, `Min` and `Mean` of `S`, and a
  `Sum` or `Product` whose bound is `Length(S)` read the buffer, with no copy;
  on the empty list they give the values of the `javascript` target (0, 1,
  `NaN`, `NaN`, `NaN`). A `len` above the elements the buffer holds gives `NaN`,
  and `Length(S)` is then the number of elements the buffer holds, so that a
  loop bounded by it stops. An expression that uses the whole list otherwise
  (`S + 1`, `Map`) declines, and so do lists of complex numbers, booleans,
  strings or lists. The `glsl` target declines the kind: WebGL2 has no storage
  buffers. Requested by Tycho (row 462, CE-572).

- **Permutation groups, an optional entry:
  `@cortex-js/compute-engine/group-theory`.** `loadGroupTheory(ce)` adds 26
  operators to an engine: permutations and their products, inverses, powers,
  conjugates (b⁻¹ab) and commutators (a⁻¹b⁻¹ab); groups given by generators on
  an explicit action `PermutationAction(n)`; orbits and transversals; the exact
  order, membership, point stabilizers, and the subgroup, index, equality,
  normality and abelian queries. The order and membership queries use an
  incremental Schreier–Sims algorithm: the order of S₁₀₀, generated by a
  transposition and a 100-cycle, takes about 30 ms. The loader options set
  resource limits, and a query can lower them with a named `options` dictionary.
  A query that reaches a limit returns an error such as
  `Error("permutation-chain-orbit-edge-limit")`, never a partial list or a false
  answer. An engine that does not load the entry does not have these operators.
  Contributed by @KingArth0r (#482).

### Behavior Changes

- **The GLSL and WGSL targets refuse an expression whose code would have more
  than 50,000 nodes.** A subexpression that several paths reach is written once
  for each path when the shader cannot compute it once: the paths go through the
  two branches of an `If`, it reads a `vars` source that is not a variable or a
  field of a variable, it is not pure, or `cse: false` is given. A chain of such
  subexpressions doubled the code at each level: 14 levels of
  `If(x > k, e, sin(e))` wrote 2 MB of WGSL in 63 s. The compilation now fails
  with
  `Could not compile: the WGSL code for this expression would have more than 50,000 nodes`
  in less than 0.1 s (with `fallback: true`, the result uses the interpreter).
  The estimate counts each subexpression that the shader computes once only
  once, so no compilation of the Tycho code-generation audit (2,229
  compilations, 1,383 of them on the shader targets) or of the shader tests is
  refused. The limit applies to the body of each user-defined function that the
  code calls, as a shader function of its own or substituted at the call site,
  and to the body statements of `compileShader()`, which has no
  common-subexpression pass: there each path counts, and depth 16 of
  `e_{k+1} = e_k + sin(e_k)` (1.5 MB of WGSL) now throws. A subexpression that
  holds an operator the caller replaces (the `functions` option) or compiles
  with its own `compile` handler counts once for each path too, and a body that
  is written in full at each call site counts once for each site. The estimate
  is a model of the code that the compiler writes, not a copy of it: a rare
  expression shape can still pass it and give large code, in which case the
  compilation is slow, but its result is never wrong.

- **A `vars` source that is a field of a variable the shader declares is refused
  on the GLSL and WGSL targets**, as a bare name already was: with
  `vars: { a: 'k.x' }` and a `Block` that declares its own `k`, the compilation
  fails, because the shader would read the local `k`, not the uniform.

- **`compileShader()` checks the target and the type of each body statement.**
  On the GLSL and WGSL targets, the `variable` of a body statement must be a
  declared output of the shader, in the spelling of the emitted code
  (`fragColor` in GLSL, `output.fragColor` in WGSL), or components of a vector
  output (`fragColor.r`, `output.color.rg`). On WGSL, a target of two or more
  components is written as one assignment per component
  (`let _tv1 = input.uv; output.color.r = _tv1.x; output.color.g = _tv1.y;`),
  because WGSL accepts `output.color.rg = …` only with the `swizzle_assignment`
  language extension. Such a target is refused when the number of components of
  the value cannot be determined (`Clamp` of a vector, for example): assign the
  whole output, or one component in each statement. A GLSL body can also assign
  the built-in outputs of its stage: `gl_Position` and `gl_PointSize` in a
  vertex shader, `gl_FragDepth` in a fragment shader. The value must have the
  type of the target: for example, a body statement `fragColor = 1.0` with
  `out vec4 fragColor` now throws `the value has the type \`float\`, and the target "fragColor" has the type \`vec4\``, and `output.c = input.uv`with a`vec2f`input and an`f32`output is refused in the same way. Neither GLSL ES nor WGSL converts one type to the other in an assignment; desktop GLSL (a`version`such as`330`) converts an integer value to a float, and that is accepted. The type of the value is checked only when it is certain: a declared input, uniform or output, a GLSL built-in variable, a literal, a comparison, a matrix or an array, or arithmetic on scalars. A vector expression such as `s * uv`is checked by its number of components only:`2·uv`with a`vec3`input is refused for a`vec2`target. A float value into an integer output is refused, because the shader computes float values. A body statement in a WGSL compute shader is refused, because such a shader has no outputs: use`compile()`or`WGSLTarget.compileFieldFunction()`to compute values on the GPU. The GLSL`compileShader()`refuses a`type`other than`'vertex'`and`'fragment'`: GLSL ES 3.00 has no compute stage. Before, each of these shaders was emitted and failed only when the GPU compiled it (`gl_FragColor`,
  which GLSL ES 3.00 does not have, was accepted too). (CE-580)

- **`compileShader()` refuses a body that reads an undeclared name.** On the
  GLSL and WGSL targets, a body statement that reads a symbol which is not an
  input, a uniform or (in GLSL) an output of the shader now throws an error that
  names each such symbol, for example
  `the body reads "x", "y", which no input or uniform of the shader declares`.
  Before, the shader was emitted with the bare names and failed only when the
  GPU compiled it. Library constants such as `Pi`, symbols with a value in the
  engine, `Sum` and `Product` indexes, function-literal parameters, `Block`
  locals and user functions are not affected, and a GLSL built-in variable such
  as `gl_FragCoord` is still accepted. On WGSL, the input struct of a fragment
  shader is now `FragmentInput` and that of a compute shader `ComputeInput` (the
  vertex stage keeps `VertexInput`), and a compute shader with `outputs` or with
  an input that has no `builtin` is refused: WGSL accepts neither. Also on WGSL:
  a uniform, input or output with no `location` or `binding` now takes the next
  free one (all of them took 0 before, which WGSL refuses when there are two);
  two declarations given the same location or binding, and a boolean uniform,
  input or output, are refused; and the GLSL type names `ivec2`…`ivec4` and
  `uvec2`…`uvec4` now become `vec2i`… and `vec2u`… (they were written
  unchanged). (CE-575)

- **`run()` refuses an array for a symbol declared with a number type.** On the
  `javascript` target, with `x` declared `real`, `x + 1` called with
  `{ x: [1, 2] }` returned the string `"1,21"`: JavaScript converted the array
  to a string. It now throws a `TypeError` that names `x`. A symbol declared as
  a list, a union with a list member (`real | list<real>`), and an undeclared
  symbol over which the code broadcasts a call still accept an array. (CE-581)

- **`Factor`, `Together` and `Cancel` collect like terms in their result**
  (ROADMAP CE-577), as evaluating the sum does. Before, they returned the sum
  unchanged when they found nothing to rewrite.
  - `Together(a+a)` and `Cancel(a+a)` are `2a` (they were `a+a`), and
    `Factor(\sin(t)+\sin(t))` is `2\sin(t)`. With `g(t) := \sin(t)`,
    `Factor(g(t)+g(t))` is `2\sin(t)`.
  - Without a variable, `Factor` takes out a factor common to every term of a
    sum: `Factor(ax+ay)` is `a(x+y)`. It treats a term that is not a polynomial
    as a variable of its own: `Factor(x\sin(t)+y\sin(t))` is `(x+y)\sin(t)`.
  - `Cancel` with no variable and no single free variable collects the like
    terms of its operand: `Cancel((a+b)(c+d)+(a+b)(c+d))` is `2(a+b)(c+d)`. It
    stayed unevaluated.
  - A sum with an absent term gives `NaN`, as evaluating it does:
    `Factor(Missing+1)` was `1+NaN`.
  - Terms with a random or other impure value are not collected:
    `Together(Random()+Random())` keeps two draws.
- **The join of types does not depend on the order of its operands.**
  `widen(nan, real, missing)` gave `missing | number` and
  `widen(missing, nan, real)` gave `missing | nan | real`. Both now give
  `missing | nan | real`: `nan` beside another number type is kept as its own
  arm (`widen(real, nan)` is `nan | real`, not `number`, which also admits the
  complex numbers). A finite type joined with an infinity is still `number`. The
  join of `+oo` and `-oo` is `signed_infinity`, not `infinity` (which also
  admits `~oo`), and a union of `+oo` and `-oo` no longer drops `-oo`.
  `[NaN, 1]` has the element type `integer | nan` whether it is built with
  `ce.box()` or `ce.list()`.
- **A shader compile refuses a `vars` entry that names a variable of the
  compiled code.** On `glsl` and `wgsl`, `vars: { a: 'k' }` beside a `Block`
  that declares `k` (or a `Sum` index, a loop variable, a function parameter
  named `k`) compiled to code that read the local `k` instead of the uniform.
  The compile now fails with a message that names the entry and the symbol. A
  self-mapped entry (`vars: { T: 'T' }`) is not affected.
- **A list argument at a declared point parameter is refused by the compiled
  code, as by the interpreter.** With `h(p: tuple<real, real>) := p[1] + p[2]`
  and `g(p) := h(p) + 1`, `g([x, y])` is an `incompatible-type` error in the
  interpreter, and compiled to code that gave a value. It now declines on every
  target.
- **A recursive function declared `function` is typed as the same function
  assigned without the declaration.** With `G`, `S` and `R` declared `function`
  and then assigned `G(a,b,c) = |\sin a| - 0.1`,
  `S(a,b,c) = \max(G(a,b,c), c - 3)` and
  `R(i) = \{i = 0: 0, R(i-1) + S(1, 2, R(i-1))\}`, `R(3)` and `R(x)` were typed
  `any` (with a simpler `S`, a union of numbers, tuples and lists). They are now
  typed `number`. A recursive list builder declared `function` is typed
  `list<number>`, not `collection<number>`. The signature of such a function is
  derived as for a declaration `(unknown) -> unknown`, which checks the
  recursion.

### Performance

- **On `glsl` and `wgsl`, `Clamp`, `ElementMax` and `ElementMin` of a vector and
  a number use the built-in `min` and `max` when every operand is finite for
  certain.** `Clamp(v, 0, 1)` with `v` a vector of declared `real` cells
  compiled to the NaN-safe helper `_gpu_clamp3(v, vec3(0.0), vec3(1.0))`; it now
  compiles to `min(max(v, vec3(0.0)), vec3(1.0))`. The helper stays when a cell
  or the number can be NaN or infinite.
- **On the shader targets, the body of a user function uses the built-in `sin`,
  `cos`, `min`, `max`, `clamp` and `sign` for a parameter that every call passes
  a finite value** (ROADMAP CE-565.4, CE-565.1). With `x`, `y` declared `real`
  and `F(a, b) := \sin(a) + \cos(b) + \min(a, b)`, compiling
  `F(x, y) + F(2x, y)` to GLSL gives
  `float _fn_F(float a, float b) { return sin(a) + cos(b) + min(a, b); }`; it
  called the NaN-safe helpers (`_gpu_sin(a)`, …), which cost 2 % to 14 % of a
  frame in Tycho's shaders on WebGL. The proof reads the arguments at the call
  sites, not a declared parameter type: `F(\exp(x), y)` keeps the helper for
  `a`, because `\exp(x)` can overflow to `+\infty` in f32 before the call.
- **On the shader targets, a call that several user functions repeat is computed
  once in more cases.** A large expansion was kept by reference: in Tycho's
  `voronoi-diagram` document, `B`, `H`, `u`, `v` and `Z` each called `F(x, y)`
  and the same sixteen weight terms again, so WebGPU drew the row about 2.1
  times slower than WebGL. The function bodies are now written into the main
  body, where each shared call is computed once per pixel. The shader is also
  smaller (10.8 KB of WGSL instead of 12.3 KB). The size check that counts the
  code written is unchanged.
- **A common subexpression of a restriction's condition is shared with its
  value.** `T_3(t)\{-0.8 < \cos(T_3(t))\}` (`When(T_3(t), …)`) computed `T_3(t)`
  twice on every target; it is now computed once. On the shader targets, a call
  that reads a uniform passed with a renamed `vars` entry (`vars: { s: 'u_s' }`)
  can now be shared too.
- **More shader operands use the built-in `sin`, `cos`, `sign`, `max`, `min` and
  `clamp` instead of the NaN-safe helpers**: a product whose factors have
  declared ranges (`sin(k t)` with `k: real<0..10>`, `t: real<-7..7>`), a
  product with a `sin`, `cos` or `tanh` factor, a symbol with an assigned value
  that is compiled as that value, and a `vec2` to `vec4` operand whose
  components are all finite for certain (`sin([t, k, 1])` with `t`, `k` declared
  `real`). A shader that calls only `gcd` no longer carries the `lcm` helper.
- **A function that reads a symbol holding a long symbolic expression is faster
  to call** (ROADMAP CE-566). With `X(l) := C_0[l]` and `C_0` assigned a `Sum`
  over a chain of lazy `Map` and `Unique` collections, each call of `X` derived
  the type of that chain again, although nothing it reads had changed. The type
  is now remembered until a binding it reads changes: 1 495 calls took 350 ms
  instead of 1 746 ms.

### Resolved Issues

- **Shader code for an expression with shared subexpressions no longer grows
  exponentially when a parameter is a field of a struct.** On the GLSL and WGSL
  targets, a `vars` source that reads a variable through fields or literal
  indexes (`ce_params.c`, `u.x`, `v[0]`) is now a plain read, so a subexpression
  that reads it is computed once and shared, as for a bare name.
  `compileFieldFunction()` maps each parameter this way. For
  `e_{k+1} = e_k + sin(e_k)` with `e_0 = x + c` at depth 20, the field function
  had 24 MB of WGSL and took 25 s; it now has 2,599 characters and takes 27 ms.
  `compile()` with `vars: { c: 'p.c' }` gave 20,467 characters at depth 10 and
  now gives 2,466 at depth 20. In the Tycho audit, one GLSL compilation that
  maps `x` and `y` to `v_pos.x` and `v_pos.y` went from 4,965 to 899 characters.
  A source that is other code (`f()`, `u.x + 1`, `v[i]`) is not shared, as
  before, and every string source stays unshared on the JavaScript and Python
  targets, where a property read can run a getter.

- **Two walks of a GPU compilation visit a shared node once.** The search for
  text-typed symbols and the substitution of collection-valued function calls at
  the root walked the expression once for each path: 22 levels of
  `e_{k+1} = e_k + sin(e_k)` took 1.2 s through `compile(e, { to: 'wgsl' })`
  before any code was written. It now takes 32 ms, and 36 ms at 26 levels.

- **`WGSLTarget.compileFieldFunction()`: parameters that have a value.** A
  symbol whose value reads other symbols or calls a user-defined function is no
  longer a buffer field: with `a := x + 1`, where `x` is a coordinate, the field
  read `ce_params.a` and lost its dependence on `x`. The value is now written
  into the code (`(x + 1.0)`), and each symbol of the value is a coordinate or a
  parameter. Only a symbol whose value is a numeric constant is a parameter. A
  user-defined function reached through such a value that reads a coordinate
  declines, as a function called by the field does. A user function whose
  captured parameter changed type since it was defined (`a := 5`,
  `h(t) := t + a`, `a := 2.5`) declines; the field function threw an error
  before. A user function that reads a parameter whose type was inferred from an
  integer value declines with a message that names the declaration to add
  (`ce.declare('a', 'real')` before the first assignment), also when it reads
  the parameter through a symbol compiled in place (`c := a + 1`) or shadows a
  library function (`\Gamma(t) := A.x`). A symbol compiled in place whose
  inferred type comes from such a parameter (`b := a`), or whose declared type
  its value no longer fits (`b` declared `integer`), declines with the remedy. A
  parameter or a `Sum` index named like a global symbol compiled in place is no
  longer read as that symbol.

- **GLSL and WGSL: a vector expression of a declared vector is typed as a
  vector.** With `in vec2 uv` (a shader input, or a `compileFunction`
  parameter), `Sin(2·uv)` emitted `_gpu_sin(2.0 * uv)`, a `vec2` passed to a
  `float` helper, and a `Block` local assigned `2·uv` was declared `float q;`.
  The value of an arithmetic operator or of a one-argument function such as
  `Sin` now has the width of its vector operands: `_gpu_sin2(2.0 * uv)` and
  `vec2 q;`. A loop `Sum` or `Product` of vectors now has a vector accumulator
  (`vec2 _tv1 = vec2(0.0);`, not `float _tv1 = 0.0;`). In a GLSL
  `compileShader()` body, the outputs and the built-in variables of the stage
  are read with their types: `Sin(gl_FragCoord)` gives
  `_gpu_sin4(gl_FragCoord)`, and `gl_VertexID + 1` gives
  `float(gl_VertexID) + 1.0` (GLSL ES does not add an `int` to a `float`). A
  GLSL qualifier before a declared type (`highp vec2 uv`) no longer hides the
  type. Complex arithmetic with a vector operand is now refused with a message
  that names the operand and says that a list of complex numbers has no GPU
  representation: `q + i` with a `vec2` local `q` emitted `vec2(q, 1.0)`, and
  `compile([x, 2] + i, { to: 'glsl' })` reported success with
  `vec2(vec2(x, 2.0), 1.0)`. Each of these shaders failed when the GPU compiled
  it. (CE-580)

- **A compiled `When(value, condition)` gives no value when the condition is not
  `True`, as the interpreter does.** On `javascript`, an input that the caller
  did not supply made some conditions true: `When(5, x ≠ 0)` with `run({})` gave
  `5`, and so did `When(5, ¬(x > 0))`, `When(5, Heaviside(x) > 0)` and each cell
  of `When(5, [x ≠ 0, ¬(x > 0)])`. A condition that is not a boolean selected
  the value: `When(x, c)` with `c = 1` gave `x` on `javascript` and on `python`.
  A condition of unknown type threw an error for an undecided input. Each of
  these now gives the absence marker (`NaN`), as `If` already did.
- **On `javascript`, an equality over a boolean compiles correctly.**
  `If(c = True, 5, -1)` gave `-1` for `c = true`, because the compiled test
  checked that `c` was a number. An equality or a comparison over a boolean or
  string input that the caller did not supply now gives no value, as the
  interpreter does: `If(c = True, 5, -1)` with `run({})` gave `-1`.
- **After `ce.restore(cp)`, a symbol first declared after `cp` no longer reads a
  later value with its old type.** An expression built before the restore that
  names such a symbol (for example `w + 1` with `w` first used after the
  checkpoint) now stays inert: it reads no value, also after a later declaration
  or assignment of the same name. Before, it read the new value while keeping
  the type and flags of the removed definition. Build the expression again to
  read the new definition.

- **Assigning a call of a recursive function while an assumption is in force no
  longer overflows the stack.** With `F` declared `function`,
  `F := n ↦ \{n = 0: x > 0, F(n - 1)\}` and any assumption (`x > 0`),
  `ce.assign('y', F(m))` threw "Maximum call stack size exceeded": the
  assignment reads the type of `F(m)` with the assumptions hidden, and the
  recursive call typed the body again at each level. It now gives `boolean`, the
  type an engine with no assumptions gives.
- **A `wgsl` read of a long list no longer copies the list.** `At(S, i)` with
  `S` a free list symbol called a helper that copied the whole list into a local
  variable before it read one element, and a `Sum` over `S_k` copied it again on
  each pass of its loop. WGSL guarantees only 8192 bytes of local variables per
  function, so a list of more than 2048 numbers could fail to compile: a 150 ×
  150 board of 22 500 numbers needs 90 KB. When the copy would need more than
  8192 bytes (more than 2048 numbers, 1024 points of 2 coordinates, or 512
  points of 3 or 4), the read now indexes the list where the host declares it:
  `At(S, i)` compiles to `_gpu_at_S_22500(i)`, a helper whose body reads `S`
  directly, and a proven index compiles to `S[k - 1]`. Above that size the
  symbol, or the identifier that `vars` maps it to, must be a `var<storage>`
  declaration (a `var<private>` has the same 8192-byte guarantee as a local
  variable, and a `const` array constructor is guaranteed only 2047 elements);
  the storage kind `'storage-buffer'` is the recommended form. A read of that
  size that cannot index in place (a `vars` mapping to a struct field such as
  `u.S`), a body that writes such an input (which needs a local copy of it), and
  a `Block` local list of more than 8192 bytes now decline, with a message that
  names `'storage-buffer'`. A shorter list keeps the copying helper, which is
  also valid when the host declares the list as a parameter or a local of its
  own function. A written input read with a proven index reads its local copy
  directly instead of copying it again. The index rules do not change (1-based,
  a negative index counts from the end, and any other index gives `NaN`). The
  `glsl` output does not change.

- **The type of `run()` accepts a list argument.** `run({ S: [1, 2, 3] })` for
  `S: list<real>` worked on the `javascript` target, but did not type-check: the
  value type of the runner was `number | ComplexResult`. It is now
  `number | ComplexResult | RunnerListInput`, where `RunnerListInput` is an
  array of numbers, complex values or such arrays. A typed array
  (`Float64Array`) is still refused at run time, with a message. (CE-581)

- **A shader compile no longer writes out a chain of user functions whose
  branches all call the function below.** With
  `h_k(x) = \{x > c_k: 2h_{k-1}(x), 3h_{k-1}(x)\}` (or a `Which` whose later
  conditions call it), the `glsl` and `wgsl` targets wrote the function bodies
  into the main body, where a call shared by two branches is written once in
  each, so the shader doubled at each level: 2.5 MB of GLSL and 388 s of
  compilation at depth 14. Such a chain now stays a set of shader functions that
  call each other.
- **Compiled code gave wrong values for a user function called with a list
  argument at a parameter that the interpreter binds whole.** With `R` declared
  `function` and assigned `(V, θ) ↦ [Σ V·[cos θ, -sin θ], …]`,
  `R([x, y] + [-0.57, 2.8], φ)` gave `NaN` on `javascript` and an empty interval
  on `interval-js`; the interpreter gives the value. The compiler read the
  parameter type that the body's use had narrowed (`number`), not the function's
  own signature. `javascript` now gives the interpreter's value, `glsl` and
  `wgsl` compile a copy of `R` with a `vec2` parameter, and `interval-js`
  compiles a copy of `R` for the list argument, whose interval contains the
  interpreter's value.
- **A recursive function inside `Mod` declined on `interval-js`.**
  `f(x, n) := 1/\operatorname{mod}(f(x, n-1), 1)` with `f(x, 0) = x` declined
  with "an object-domain absent ('missing') position". It compiles again.
- **A call through a parameter typed only by index reads compiles.** In
  `r(p) := (T + \lfloor p[1] \rfloor) \max(0, 0.5 - l(f(p)))` with
  `f(q) := \operatorname{mod}(q, 1) - 0.5`, the reads `p[1]` typed `p` as a
  point, and the compiler passed it to `f` as a point, which `Mod` minus a
  number refuses. Such a type does not prove a point: the call is now compiled
  for the argument's own type (a list), as the interpreter evaluates it.
  `d(B(A(P(x, y))))` in the Tycho document `ra1p9naofs` compiles on
  `javascript`, `interval-js` and `glsl`, and gives the interpreter's value.
- **On `interval-js`, a user function called with a list argument compiles.**
  `interval-js` now compiles a copy of the function for the argument's type, as
  `javascript` does. Before, a call such as `d(B(A(P(x, y))))`, where `B`
  returns a list of two numbers, declined. A parameter declared as a point still
  refuses a list, as the interpreter does.
- **On `glsl` and `wgsl`, a function of a number called with a list of 2 to 4
  numbers compiles.** With `f(p) := \operatorname{mod}(p, 1) - 0.5`, the call
  `f([x, y])` declined with "lowers to vec2 but parameter is declared float";
  the interpreter applies `f` to each element. The shader now calls a wrapper
  that applies `f` to each component. A point argument still declines.
- **A recursive function compiled after an evaluation kept a wide type in its
  body.** With `R(i, x, y)` declared `function` and defined by recursion, the
  sequence evaluate, compile, evaluate, compile (the order of a plotting host)
  declined on `interval-js`: "may be a collection at run time", because the
  recursive call inside the body kept the type it had while the signature was
  derived. It compiles again (Tycho document `ndqj7hupta`).
- **A recursive function's type follows a change to a value its body reads.**
  With `a := 5` and `R(i) := \{i \le 0: 0, R(i-1) + a\}`, the assignment
  `a := [1, 2]` left `R(n)` typed `number`, while `R(2)` is `[2, 4]`.
- **On `interval-js`, a user function whose invariant part is subtracted
  computed it on every term.** In `\sum_{i=1}^{16} n(x, y, i)` with
  `n(x, y, i) := \exp(\ldots - F(x, y))`, `F(x, y)` was computed 17 times per
  sample instead of once.
- **A letter that names a library operator is a free variable in an expression
  parsed in a scope.** `ce.parse('y=x+N', { scope: ce.createScope() })` had the
  unknowns `["x", "y"]`, and the same for `D`; read outside the scope, the name
  `N` found the library operator `N`. It now has `["N", "x", "y"]`, as the
  expression parsed without a scope, and as `evaluate()` and `subs()` already
  treated it.

## 0.171.0 _2026-10-27_

### Behavior Changes

- **`subs()` of the variable of a derivative, a series or an indefinite integral
  gives the value at the point** (ROADMAP CE-538). Before,
  `D(x^2, x).subs({x: 3})` gave an invalid `D(…, Error('expected-a-symbol'))`.
  It is now `EvaluateAt(Function(D(x^2, x), x), 3)`, written
  `\left.\left(\frac{\mathrm{d}x^2}{\mathrm{d}x}\right)\right|_{x=3}`, which
  evaluates to `6` (a float under `.N()`).
  - This also applies inside a scoped expression: `Sum(D(x^k, x), k=1..3)` with
    `x` replaced by `2` evaluates to `17`.
  - `Integrate(a·x, x).subs({x: 3, a: 2})` evaluates to `9`, and
    `D(x^2, x).subs({x: x + 1})` to `2(x + 1)`.
  - Several variables are replaced at the same time, at one point that is a
    `Tuple` (`|_{x=3, y=5}`).
  - Only the variable itself is applied at a point. The replacement of another
    name is put in the derivative, the series or the integral before it is
    computed: `D(x·y, x).subs({y: x})` is `D(x·x, x)`, which evaluates to `2x`.
  - A wildcard (`_f`) is still replaced inside the node. A value with no closed
    form stays an unevaluated `EvaluateAt`. The value of a `Series` at a point
    keeps its `BigO` remainder. A value that keeps a `BigO` term is `NaN` under
    `.N()`; `Normal` drops the remainder, before or after the substitution, and
    `Normal` now strips it before any numeric evaluation
    (`Normal(Series(sin x, x, 0, 3)).N()` was `NaN`).
- **`EvaluateAt` at a point has the value of `Apply`.** The statements of the
  body run in order, and an `If` evaluates only the branch it selects. A point
  is never a partial application: when there are fewer points than required
  parameters, or more than a named callee accepts, the form stays unevaluated. A
  constant is its own value at any point: `EvaluateAt(5, 3)` is `5`, and so is a
  named function that takes no argument.
  - A lazy callee receives the point as written, and the expression it returns
    is not evaluated again: `EvaluateAt(p, Random())` for a lazy `p` that
    returns its operand gives `Random()` without a draw.
  - The form stays unevaluated only when a `D`, a `Series` or an `Integrate`
    with no closed form comes from the BODY: the identity at
    `Series(e^{1/x}, x, 0, 3)` is that series, and `x ↦ x` between `0` and an
    integral with no closed form is that integral.
  - A point that is a symbol whose value is a tuple is read at evaluation: with
    `p := (2, 3)`, `(x·y)|_{p}` is `6`.
  - `EvaluateAt` compiles: `EvaluateAt(f, a)` as the application `f(a)` and
    `EvaluateAt(f, a, b)` as `f(b) − f(a)`, so the result of `subs()` on a
    derivative compiles to JavaScript. `D` of an `EvaluateAt` evaluates it
    first: the derivative in `y` of `(x^2)|_{x=y}` is `2y`.
- **A function literal whose body is a derivative, a series or an indefinite
  integral of one parameter, applied to arguments that name another parameter,
  is a plain application.** `((x, y) ↦ D(x·y, x))(3, x)` is `x` (the derivative
  `y` at `y = x` of the caller); it was `x + 3`, a product rule mixed with the
  caller's `x`. `((x, a) ↦ ∫a·x dx)(x + 1, x)` is `x(x + 1)²/2`; the point was
  lost. A function-valued parameter named like a user function no longer leaks
  its name: with `w(x) := x + 100`, `(w ↦ D(w(x), x))(x ↦ 5·w(x))` is `5`, and
  the same for `Integrate` and `Series`.
- **An indefinite integral under `.N()` computes its antiderivative.**
  `Integrate(Sin(x), x).N()` is `-cos(x)` and `(x ↦ ∫sin x dx)(1).N()` is
  `-0.5403…`; both stayed an unevaluated `Integrate` (the numeric request sent
  the integral to the quadrature route, which has no bounds to use).
- **An `evaluate` handler written with anonymous parameters gets a signature
  with as many parameters.**
  `ce.declare('f', { evaluate: ['Function', ['Add', '_', 1]] })` is
  `(unknown) -> unknown`, not `() -> unknown`.
- **`D(Length([x ↦ x]), x)` is `0`**: an occurrence of the variable that a
  function literal binds as its parameter does not make the expression depend on
  the variable. `Integrate(Apply(t ↦ t², x), x)` is `x³/3`: an applied function
  literal in the integrand is applied before integration.
- **Canonicalizing a function literal whose raw body shares a subtree is linear
  in the number of distinct nodes.** A body that shares the previous node twice
  at each level, at depth 24, took 4.9 s and takes 2 ms: the canonical form of a
  raw node is kept for the duration of one top-level canonicalization (ROADMAP
  CE-548).
- **A function literal whose body is `D`, `Series` or an indefinite `Integrate`
  of its parameter**, applied to an argument that contains the parameter's name,
  gives the value at the argument: `(x ↦ D(x^2, x))(x + 1)` is `2(x + 1)`, not
  `2x`. Under `.N()`, `(x ↦ D(x^2, x))(1 + 2.5)` is `7`, not `2x`.
- **The LaTeX of `EvaluateAt` parses back to the same `EvaluateAt`.**
  `\left.x^2\right|_{x=2}` was `Subscript(EvaluateAt(x^2), x = 2)`. The
  two-point form is now written with the name of the variable,
  `\left.\left(\frac{x^3}{3}\right)\right|_{x=0}^{1}`. In a bracket with no name
  for the variable and more free variables than coordinates in the point, the
  point or the bounds are for `x`: `\left.kx\right|_{2}^{5}` is `3k`, while
  `\left.\left(xy\right)\right|_{(1,2)}` is `2`. `\left.f\right|_{A}` and a
  bound that is a tuple keep their earlier parse.
- **Numeric integration reports an error that bounds the true error in more
  cases** (ROADMAP CE-533, CE-376). The error reported for most integrals
  changes; smooth integrands use the same number of evaluations.
  - The error of a Gauss–Kronrod panel now also comes from null rules
    (Berntsen–Espelid), with no extra evaluations, so a kink or a jump inside a
    panel is counted. For the inner integral `∫₋₁₀¹⁰ n(x, 0.758125) dx` of a
    Tycho document, the result was `± 5.7e-10` with a true error of `1.6e-5`; it
    is now `± 9.3e-10` with a true error of `2.3e-11`.
  - Far from 0, the rounding of the sample points to the doubles is counted:
    `∫ sin(10³·(x − a)) dx` over `[10⁶, 10⁶ + 0.01]` was `converged`,
    `± 2.2e-13`, for a true error of `2.3e-11`; it is now not converged,
    `± 6.3e-10`. Some accurate results are now reported as not converged for
    that reason (`∫ e^(x − a) dx` over `[10⁶, 10⁶ + 0.01]`).
  - With `singularEndpoints`, a singular point that is not exactly a double is
    found: `∫₋₁¹ |x − 0.3|^(−1/2) dx` was `± 3.9e-10` for a true error of
    `1.3e-8` after 28,480 evaluations; it is now `± 4e-13` for `3e-14` after
    6,117. A singular point a few doubles inside or outside an endpoint (for
    example `|t − 0.1·3|^(−1/2)` or `|t − (0.7 − 0.4)|^(−1/2)` on `[0.3, 1]`)
    now gives an error that bounds the true error.
  - An interval is no longer split at a jump, and a step next to a singular
    endpoint is no longer taken for a singularity:
    `(x < 0.3 ? 0 : 1) + |x − c|^(−1/2)` with `c = 0.3 + 10⁻⁶` was `converged`,
    `± 3.1e-12`, for a true error of `1e-6`; it is now not converged, with an
    error that bounds the true error.
  - At a singular endpoint far from 0, the area between the endpoint and the
    first double above it, which no sample reaches, is now counted in the error
    (ROADMAP CE-552): `(x − 10⁶)^(−1/2)` on `[10⁶, 10⁶ + 1]` was `± 1.4e-5` for
    a true error of `2.3e-5` and is `± 5.7e-5`. In a sweep of 180 such cases,
    the error was below the true error in 124 and is in none; the six cases that
    lose their `converged` status had a wrong error. A zero of the smooth factor
    a few doubles from the endpoint gets a fallback bound.
  - A step next to a slowly decaying endpoint singularity
    (`x^(−0.95)·(x < s ? 2 : 1)` on `[0, 1]`) no longer reports `converged` with
    an error below the true error (ROADMAP CE-547): the last panel next to the
    endpoint is compared with the model of the shells.
  - A pole 10⁴ to 10⁵ doubles outside an endpoint is detected (ROADMAP CE-558),
    and the error charged for a pole outside is the area the corner model
    misplaces, not the whole model area: `(x − c)^(−1/4)` on `[10⁶, 10⁶ + 1]`
    with `c` 1000 doubles below was `± 1.3e-7` and is `± 1.3e-10` for a true
    error of `1e-11`. An exact zero of the integrand at the sample that gives
    the exponent of a singularity inside an endpoint no longer gives an infinite
    error (ROADMAP CE-557).
  - The semi-infinite oscillatory quadrature returns a finite estimate with an
    infinite error, not `NaN`, when one lobe cannot bound its error (ROADMAP
    CE-549).
  - The nodes of a Gauss–Kronrod panel are clamped to the panel: on a panel a
    few doubles wide, a node could round one double outside it, and `√(x − 1)`
    on `[1, 1 + ε]` gave `NaN`. An interval one double wide still reports
    `0 ± 0` (ROADMAP CE-561).

- **The interval library gives sound and tighter answers at poles, at domain
  boundaries and for powers** (ROADMAP CE-522). These kernels are the ones that
  the code compiled with `compile(…, { to: 'interval-js' })` calls, so every
  user of that target sees the change. The design review of the `Enclosure`
  value kind (see Features) found them: some answers excluded a true value,
  others were wider than necessary.
  - `mod` with a divisor interval that is not a point: `mod([5, 5], [2, 4])` was
    `[1, 1]`, which excludes `Mod(5, 3) = 2` and `Mod(5, 2.5) = 0`. It is now
    the hull `[0, 4]` (a `singular` result with that value). When the quotient
    has one integer part over the whole box, the answer is the continuous range:
    `mod([5, 5], [2.6, 4])` is `[1, 2.4]`, rounded outward.
  - `atanh` at the boundary of its domain: `atanh([0, 1])` was
    `partial [0, 18.3684…]`, a clip of the argument to `1 − ε`. It is now
    `partial [0, +∞]`, and `atanh([1, 1])` is `empty`.
  - A pole at an ENDPOINT gives a half-line. `tan([0, Math.PI / 2])`,
    `cot([0, 1])`, `sec([0, Math.PI / 2])`, `csc([-1, 0])`, `gamma([0, 1])`,
    `powRational([-1, 0], -2, 3)` and `powRealBranch` with a negative exponent
    were `singular` with no value (the whole line). They are now `partial` with
    the half-line beside the pole: `gamma([0, 1])` is `[1, +∞]` and
    `powRational([-1, 0], -2, 3)` is `[1, +∞]`. A pole inside the interval still
    gives `singular`. A point at a pole has no value: `gamma([0, 0])` and
    `powRational([0, 0], -1, 3)` are `empty`; `tan`, `cot`, `sec` and `csc` at a
    point that is their pole stay `singular`, because the interpreter answers
    `~oo` there.
  - `pow` with a negative integer exponent over a base with a zero endpoint:
    `pow([0, 1], -1)` was `partial [−∞, +∞]` and is now `partial [1, +∞]`;
    `pow([-1, 0], -1)` is `[−∞, −1]`, and `pow([0, 0], -1)` is `empty`.
  - `powInterval` with a negative base over an exponent interval:
    `powInterval([-2, -2], [1, 2])` was `empty`, although `(−2)^1` and `(−2)^2`
    exist. It is now `[−4, 4]`, the symmetric hull `[−M, M]` with
    `M = max(|b|^c, |b|^d)`, which contains every real value of the power, also
    at an exponent that is a fraction with an odd denominator
    (`(−2)^(5/3) ≈ −3.17`). A base that crosses 0 takes the hull of its two
    parts: `[-1, 1]^[1, 2]` was `partial [0, 1]` and is `[−1, 1]`. At an
    exponent that is a POINT and not an integer, a negative base still has no
    value (`powInterval([-2, -2], [1.5, 1.5])` is `empty`). Visible to Tycho's
    adaptive sampler (its rows 260 and 417): a box with `x < 0` and an exponent
    interval that holds an integer is now an undecided hull that the sampler
    subdivides, instead of a blank region; at a non-integer point exponent the
    region stays blank.
  - `pow` with a negative integer exponent rounds outward at each step. For the
    double `x = 1.9678349534779586e-103`, `pow([x, x], -3)` was
    `[1.3123025984121744e308, 1.3123025984121748e308]`, which excludes the true
    value (its nearest double is `1.3123025984121742e308`). It now contains it.
    An exact power stays exact: `pow([2, 2], -1)` is `[0.5, 0.5]`.
  - An angle in degrees, gradians or turns: the `interval-js` target multiplied
    the angle by the double nearest to the factor (`Math.PI / 180`,
    `2 * Math.PI`), which can be below the true factor. In `turn` mode, the
    compiled `cos(x)` at the point `0.25` had two positive bounds and excluded
    the true value `0`. The target now uses the exact factor (`π/180`, `π/200`,
    `2π`, and its reciprocal for the inverse functions), enclosed outward as any
    other exact constant, also in the derivatives that the target compiles. The
    compiled `cos` and `arcsin` now contain the true value at a quarter turn in
    `deg`, `grad` and `turn` mode. The other targets keep the float factors.
  - `fract([-1e-20, -1e-20])` was `[1, 1]`, while the true fractional part is
    below 1. The subtraction `x − floor(x)` is now rounded outward; an exact
    case stays exact.
  - The other kernels with a pole now also give the half-line for a pole at an
    endpoint: `coth([0, 1])` is `[coth(1), +∞]` (was `singular` with no value),
    and the same for `csch`, `acoth`, `acsch` and `asech` at 0 and for `gammaln`
    at a non-positive integer (`gammaln([0, 1])` is `[0, +∞]`). A pole inside
    the interval, or a point at the pole, is still `singular`. `asech([-1, 0])`
    is `empty`.
  - `mod` with a divisor interval: when the quotient has one integer part over
    the whole box, the answer takes no extra outward step: `mod([1, 1], [2, 4])`
    is `[1, 1]` (was one ulp wider on each side).
  - `Root(x, n)` with a symbolic degree `n`, compiled to `interval-js`, reads
    the degree at run time: an integer degree keeps its exact value. With
    `n = 6`, `x = [−64, −1]` gives `empty` (was `[−2, 2]`); with `n = 3`,
    `[−4, −1]` (was `[−4, 4]`); a negative integer degree is the reciprocal root
    (`n = −3`, `x = −8` gives `−1/2`). Another degree takes the power `x^(1/n)`
    as before.
- **`Degrees` refuses a complex number.** An angle is real, and the signature of
  `Degrees` is `(real) -> real`. `Degrees(2 + 3i)` was `(1/90 + i/60)·π`; it is
  now an `incompatible-type` error, as `Degrees((2 + 3i) ± 0.1)` already was. A
  symbol declared `complex` that holds a real number still converts. `NaN` and
  the infinities are not changed.
- **The `interval-js` runner checks the value of an input whose type can hold an
  enclosure.** Before, this target declined every expression with a value kind.
  Now, for a free symbol whose type is `enclosure` or a union with an
  `enclosure` arm, `run()` checks the value BEFORE it converts the inputs: a
  record `{ lo, hi }` must have `lo <= hi`, no `NaN` and not the same infinity
  twice, and a number is a point. A union input is checked by arm: with
  `y: number | enclosure`, `y: Infinity` is accepted by the numeric arm. A
  refused value throws (it is not turned into an `entire` result). `broadcast()`
  and `broadcastAsync()` check every cell before the loop, so one refused cell
  rejects the whole call. The inputs of every other type are not changed,
  including the `NaN` that marks an absent value of a `real | missing` input.
- **On `interval-js`, a decline of an expression with an enclosure is not
  replaced by the interpreter**, also with `fallback: true`: it throws with the
  message of the kind. The fallback of this target gives each input as the
  midpoint of its interval, and would give a number to a symbol typed
  `enclosure`. The other value kinds (`Measurement`, `Quantity`) keep the
  fallback.
- **The target of an `Assign` outside a `Block` is a free variable.** The target
  is a write to a symbol of the enclosing scope, so `unknowns` and
  `freeVariables` list it. Before, any `Assign`, `Declare` or `DefineFunction`
  operand made its target local to the node that held it. Example:
  `y=(k\coloneq2)` (`Equal(y, Assign(k, 2))`) had the free variables `["y"]` and
  now has `["k", "y"]`, as `Assign(k, 2)` alone always had. A `Block` still
  keeps the names it assigns or declares local: `(k\coloneq2; kx)` has the free
  variable `x` only. `If(z > 0, Assign(z, 5), 0)` lists `z`. The `subs()` of
  such a target is still open (ROADMAP CE-537).

### Features

- **`Smoothstep(e0, e1, x)` is defined in the engine.** The shader targets
  already lowered it to the GLSL and WGSL built-in `smoothstep`, but the library
  had no definition: it stayed unevaluated, and the `javascript` target did not
  compile it. It now evaluates to `t² (3 − 2t)` with
  `t = Clamp((x − e0) / (e1 − e0), 0, 1)`, exactly for exact operands
  (`Smoothstep(0, 1, 1/3)` is `7/27`), and broadcasts over lists. The
  `javascript` and `python` targets compile it. When `e0 = e1` the result is the
  step function (0 when `x < e0`, else 1), and when `e0 > e1` the formula
  applies as written. The shader targets now write the formula out instead of
  calling the built-in `smoothstep`, which has no defined result when `e0 ≥ e1`,
  so every target gives the same value.

- **`Enclosure`, an interval value with interval arithmetic** (ROADMAP CE-507
  phase 3, [#416](https://github.com/cortex-js/compute-engine/issues/416)).
  `Enclosure(lo, hi)` is a closed interval that holds ONE real number, whose
  value is somewhere in `[lo, hi]`. It is not the set `Interval(lo, hi)`:
  `Abs(Enclosure(-1, 2))` is `Enclosure(0, 2)`, while `Abs` of the set is its
  cardinality. It is a library value kind, beside `ResidueClass`, `Measurement`
  and `Quantity`, with the kind type `enclosure`, and it is accepted wherever a
  real is accepted (`admittedAs: 'real'`). Its LaTeX is
  `\mathrm{Enclosure}(a, b)`.
  - The canonical form orders the endpoints (`Enclosure(2, 1)` is
    `Enclosure(1, 2)`), reads one operand as a point (`Enclosure(3)` is
    `Enclosure(3, 3)`), and converts a set `Interval`
    (`Enclosure(Interval(0, 1))` is `Enclosure(0, 1)`). An endpoint that is not
    an extended real, or is a value of a kind, is an `incompatible-type` error.
    A `NaN` endpoint, the same infinity twice and an empty set give the
    indeterminate value.
  - The arithmetic hooks compute with the endpoints, and keep them exact under
    `evaluate()`: `Enclosure(0, 1) + Enclosure(1/3, 2)` is `Enclosure(1/3, 3)`,
    `Enclosure(-1, 2) · Enclosure(3, 4)` is `Enclosure(-4, 8)`, and
    `Enclosure(1, 2) − Enclosure(1, 2)` is `Enclosure(-1, 1)` (the two operands
    are independent). A division by an enclosure with a zero endpoint gives a
    half-line (`1 / Enclosure(0, 1)` is `Enclosure(1, +oo)`), and with `0`
    inside the whole line.
  - A numeric function gives its image (the `apply` hook), with the critical
    points of the function: `Sin(Enclosure(0, Pi))` is `Enclosure(0, 1)`,
    `Sin(Enclosure(0, 1))` is `Enclosure(0, Sin(1))`, `Sqrt(Enclosure(-1, 4))`
    is `Enclosure(0, 2)` (the domain is clipped), `Tan(Enclosure(0, Pi/2))` is
    `Enclosure(0, +oo)`, and `Ln(Enclosure(-2, -1))` is indeterminate. Under
    `evaluate()` with exact endpoints the endpoints are exact. Under `.N()`, the
    endpoints are converted to doubles OUTWARD (the largest double below `lo`,
    the smallest above `hi`) and the interval library computes the image:
    `Enclosure(0, Pi).N()` is `Enclosure(0, 3.1415926535897936)`, and
    `Sin(Enclosure(0, 1)).N()` is `Enclosure(0, 0.8414709848078966)`. The
    endpoints under `.N()` are machine doubles at every `ce.precision`. They are
    rigorous for the rational operations and best effort for the transcendental
    functions (ROADMAP CE-522.5).
  - The comparisons use the partial order of intervals:
    `Enclosure(0, 1) < Enclosure(2, 3)` is `True`, and
    `Enclosure(0, 2) < Enclosure(1, 3)` stays unevaluated. Two enclosures that
    touch decide only the non-strict comparison:
    `Enclosure(0, 1) <= Enclosure(1, 2)` is `True` and `>` is `False`, while `<`
    stays unevaluated. `Enclosure(1, 1) = 1` is `True`; two enclosures that
    overlap may hold the same real, so `Equal` stays unevaluated.
  - `Max`, `Min`, `Clamp`, `ElementMax` and `ElementMin` give the hull of the
    extrema: `Max(Enclosure(0, 2), Enclosure(1, 3))` is `Enclosure(1, 3)`, and
    `Max(Enclosure(0, 1), +oo)` is `+oo`.
  - `Sum`, `Product` and `Mean` of a list of enclosures and numbers fold through
    the hooks: `Mean([Enclosure(0, 1), Enclosure(1, 2), 3])` is
    `Enclosure(4/3, 2)`. The other statistics stay unevaluated.
  - The code compiled for the `interval-js` target computes with an enclosure:
    an input typed `enclosure` is a `{ lo, hi }` record, and the compiled code
    calls the same kernel of the interval library as `.N()` for each form, so
    the two give the same doubles. With `x` declared `enclosure`,
    `compile(ce.parse('x + 1'), { to: 'interval-js' })` gives
    `{ kind: 'interval', value: { lo: 1, hi: 2 } }` for
    `run({ x: { lo: 0, hi: 1 } })`. The other targets decline an enclosure with
    the message of the kind.
  - `Measurement(Enclosure(0, 1), 0.1)` and `Quantity(Enclosure(0, 1), m)` are
    `incompatible-type` errors.

  The rules are in `doc/06-guide-augmenting.md`, "Enclosures"; the design is
  section 4.9.2 of `docs/plans/2026-10-26-value-kinds.md`.

- **Two extensions of `ArithmeticDefinition` for a value kind that you
  declare.**
  - The optional `extremum(which, ops, context)` hook gives the maximum (`which`
    is `'max'`) or the minimum of operands of which one at least is a value of
    the kind, for `Max`, `Min`, `Clamp`, `ElementMax` and `ElementMin`. The
    engine asks it before it orders the operands with `compare`, so a kind whose
    values can overlap can answer a value that is not one of the operands.
    `undefined` declines, and the engine orders the operands with `compare` as
    before.
  - `compare` can answer `'<='` or `'>='`: the first value is less than (or
    greater than) or equal to the second, and the hook cannot say which. On a
    `'<='` answer, `LessEqual` is `True` and `Greater` is `False`, `Less` and
    `GreaterEqual` stay unevaluated, and `Equal` asks the `eq` handlers. A
    reader that needs a total order (`Sort`, and `Max`/`Min` without an
    `extremum` hook) reads it as no answer.

### Performance

- **The shader targets call the built-in `sin`, `cos`, `sign`, `max` and `min`,
  and write `clamp` as `min(max(x, lo), hi)`, for an operand that is finite for
  certain.** The NaN-safe helpers that replaced them (`_gpu_sin` and the others)
  cost a bit test and a selection per call, about 10% of the frame time of a
  Tycho document on WebGPU, and on a finite operand they give the same bits as
  the built-in (measured on an Apple M5 Max over WebGPU, 39,200 inputs). An
  operand is finite for certain when its static type is a finite real, each
  symbol it reads has a declared type (a symbol declared `real` holds a finite
  value), it reads no name that the caller maps with `functions` or `operators`
  and no name that `vars` maps to other source, and it cannot overflow in f32:
  it uses only heads whose result does not grow past their operands (`+`, `−`, a
  product or quotient by a literal, `sin`, `floor`, `abs`, …). A name that
  `vars` maps to its own identifier (`vars: { T: 'T' }`, the way a host passes a
  uniform), with a declared type and not a constant, counts as a declared
  symbol. `sin(x)` and `cos(T + 1.9k)` with declared real symbols are now the
  built-ins, also with `vars: { T: 'T' }`; `sin(u)` with `u: number`,
  `sin(x/y)`, `sin(√x)`, `sin(e^x)`, `sin(xy)`, `vars: { T: 'uT' }`, a mapped
  constant and the parameter of a function whose type is inferred keep the
  helper. One limit: a sum or a product by a literal of values within that
  factor of the largest f32 (3.4·10³⁸) overflows, and the built-in then gives 0
  on Apple GPUs where the helper gave NaN.

- **The unit of a quantity is decoded once for each boxed value.** The
  arithmetic and the comparisons of quantities read the unit expression, its
  dimension and its scale from a cache on the boxed unit, and do not walk the
  unit again at each operation. The cache is public as `decodedPayload()`: the
  hooks of a value kind that you declare can decode the operands of a kind value
  once for each boxed expression in the same way.
- **The canonicalization of a binder keeps the cached types** (ROADMAP CE-535).
  `D`, `Sum`, `Integrate` and the other binders declare their bound variable in
  a scope created for them. That declaration no longer invalidates the cached
  types and signs of every expression, because no name was read through the new
  scope before. A row of a Tycho document with `D(PointY(S(u)), u)`, where `S`
  is a user function with a large body, typed `S(u)` again after each `D`; the
  replay of the canonical rebinds of the document `2ki2hjsouf` went from 848 ms
  to 664 ms (median of 5).

### Resolved Issues

- **A sign cached during a call of a function literal is not kept after the
  call.** With `f := x ↦ …(x + 1)…`, a sign of the body node `x + 1` computed
  during `f(3)` (positive) was still served after the call returned, where `x`
  has no value. The removal of the call scope that holds the parameter values
  now invalidates the cached types, signs and values that are keyed on the
  engine's cache version.
- **A `Block` that declares a name and calls a function that reads the same name
  no longer prints "error canonicalizing `Block`: Cannot read properties of
  undefined (reading 'parent')"**, and the function's derived signature is
  correct (ROADMAP CE-542). Example: `b` is declared `real`, `f` is declared
  `(real) -> unknown` and assigned `p ↦ sin(b·p)`, and
  `Block(Declare(b), Assign(b, 1), f(0.5))` is boxed. The call reads the
  signature of `f`, which is derived by boxing `f`'s body again in the scope
  where `f` is defined. That boxing read the names of the block being
  canonicalized, so the free `b` of `f` was taken for the block's local: the
  signature of `f` became `(real) -> number` instead of `(real) -> real`, and
  when the block was boxed in a scope from `ce.createScope()` the name
  resolution walked past the root scope and threw. The value was not affected:
  `f` reads the `b` of its own scope. A signature is now derived with none of
  the names of the construct being canonicalized, and those names shadow only
  inside the scopes of that construct. Found on the Tycho document
  `g(x) with b = 1`, where `g` calls `f(x) = sin(b·x)`.

- **On Apple GPUs, the complex shader helpers gave a finite value for a NaN
  part.** The built-ins `sin` and `cos` of a NaN give 0 on WebGL2 over ANGLE
  Metal and on WebGPU over Metal, so `exp(1 + NaN·i)` was `(0, 0)` on both
  shader targets, and so were `sin`, `cos`, `sinh` and `cosh` of a complex value
  with a NaN part (measured on an Apple M5 Max). The helpers (`_gpu_cexp`,
  `_gpu_csin`, `_gpu_ccos`, `_gpu_csinh`, `_gpu_ccosh`, and also `_gpu_csqrt`
  and `_gpu_cln`) now test each part first and give NaN, as the interpreter and
  the `javascript` target do.

- **A function body over a value kind keeps `x/x` in two more cases** (ROADMAP
  CE-507.3 and CE-507.4). A parameter that the declared signature types with a
  value kind is typed so in the body, so that `x/x` is not folded to `1` before
  a kind value arrives. This did not happen with an overloaded signature: with
  `g: ((residue) -> residue) & ((integer) -> integer)` and the body `x ↦ x/x`,
  `g(ResidueClass(2, 5))` was `1` and is now `ResidueClass(1, 5)` (the parameter
  is typed with the union of its types in the arms). It also did not happen for
  a recursive function literal assigned to a symbol declared with a function
  type: the literal was boxed again to bind its call to itself, and that step
  dropped the type.
- **`N()` of an integral whose integrand restricts a list gives one integral per
  element** (Tycho row 459). With `E = [0.1, 0.5]`,
  `∫_0^1 y·When(∫_{−1}^{1} 1/ElementMax(E, |x|) dx, 0 ≤ y ≤ 5) dy` gave `NaN`,
  and `∫_0^1 \{0 ≤ y ≤ 5: 1/ElementMax(E, y+1)\} dy` stayed unevaluated. Both
  now give a list, here `[1 + ln 10, 1 + ln 2]`. A `When(L, c)` or a `Which`
  with list values, alone or in a product, is distributed over the elements of
  the list before the integration. A condition that is a list of booleans is a
  mask, as before.

- **A nested numeric integral of piecewise functions converges.** The body
  `∫_0^1 y·∫_{−10}^{10} n(x, y, ε) dx dy` of Tycho's document
  `neyret/2agcgxq87y`, where `n` has a jump and kinks, took about 25 s under
  `N()` and stopped at a relative uncertainty of 3e-4, which did not always
  contain the true error. It now takes about 0.3 s and is correct to 1e-9, for
  six values of ε. Two causes: a Gauss–Kronrod panel did not see a jump or a
  kink between its last node and its end, and reported an error near zero; and
  the error of an inner integral was not added to the error of the outer one. A
  single integral now makes 15 more evaluations of its integrand.

- **The exact integral of a piecewise with a `Nothing` branch is no longer
  wrong.** `∫_0^1 Which(y < 1/2, y, True, Nothing) dy` gave `5/8`, because the
  antiderivative of `Nothing` was taken as that of a constant. It now stays
  unevaluated, and `N()` gives `NaN`, as for a `Which` with no default clause.
  `N()` of `∫_0^1 Nothing dx` is `NaN`, as for `Missing`.

- **A list combined with a piecewise evaluates to a list** (Tycho row 452).
  `[0, 1, 2, 3]·Which(x > 1, 0, True, 1)` with `x` free evaluated to
  `Which(1 < x, [0, 0, 0, 0], True, [0, 1, 2, 3])`, which is not a `List`. It
  now evaluates to `[Which(1 < x, 0, True, 0), Which(1 < x, 0, True, 1), …]`,
  the same values at each `x`. The same applies under `Add`, `Abs` and a bounded
  `Sum`, and to a `Which` or an `If` whose values are lists of one length, when
  the condition is undecided. A `Which` with no default clause is not changed.
  When such a `Which` is combined with an operand, the result now has a last
  branch for "no condition holds": `3 + Which(x > 1, 0)` is
  `Which(1 < x, 3, True, NaN)`, the value that substituting `x` first gives.

- **`subs()` replaces only the free occurrences of a name** (Tycho row 464).
  `Comprehension(j + 1, Element(j, Range(0, 2))).subs({j: [4, 4, 5]})` replaced
  the index and its binding site, and the index of a `Sum`, the parameter of a
  `Function` and a `Block` local became `Error` nodes. A binder now keeps its
  bound variables: `j + Sum(j, Limits(j, 1, 3))` with `{j: 10}` gives
  `10 + Sum(j, Limits(j, 1, 3))`. The occurrences replaced are exactly those
  that `freeVariables` reports, so the bounds of a `Limits` clause, which read
  the enclosing binding, are still replaced. A substitution can still capture a
  name: `Sum(j + k, Limits(k, 1, 3))` with `{j: k}` gives `Sum(2k, …)`; rename
  the index first to avoid this.

- **On `wgsl` and `glsl`, a call that several user functions repeat with the
  same arguments is computed once per pixel** (Tycho row 467). Each user
  function was emitted as its own shader function, and the common-subexpression
  pass worked inside one function only. The Metal compiler under WebGPU does not
  merge identical calls across functions, so Tycho's `voronoi-diagram` drew
  about 2.2 times slower on WebGPU than on WebGL. The pure, non-recursive user
  functions of a shader are now substituted at the root, and a sum with literal
  bounds that calls one is written out, so the existing pass computes each
  shared call once. On that row, `sqrt` is computed 16 times per pixel (was 560)
  and `sin` 32 times (was 544). The shader text is about 50% larger. An
  expression that draws a random number, or a sum that stays a loop, is compiled
  as before.

- **A recursive function whose step passes its own call to `Max` or `Min` is no
  longer typed `any`** (Tycho row 468, a regression in 0.170.0). With
  `S(a, b) = Max(a, b)` and
  `R(i) = Which(i = 0, 0, True, R(i − 1) + S(1, R(i − 1)))`, `R(3)` was typed
  `any`. The type of a call whose body is `Max` or `Min` over numbers and tuples
  is now `number` on its tuple arm, since `Max` and `Min` read the coordinates
  of a tuple (`Max(1, (2, 3))` is 3), so `R(3)` gets the same type as `R`
  without the call to `S`.

- **Compiling a `Sum` or a `Product` whose bounds are above 2^53 no longer
  hangs.** `compile(\sum_{k=2^{53}}^{2^{53}+2} \sin(x+k))` never returned on
  `javascript`, `glsl`, `wgsl` and `interval-js`, because at 2^53 the index
  `k + 1` is `k` again. The compile now declines with `out-of-range`, the answer
  the interpreter gives for the same bounds.

- **Reading a chain of lazy `Map`/`Zip` collections through index lists is
  linear in the depth of the chain** (Tycho row 453). A read such as `C[1]` of
  `Map(W ↦ max(W[1], W[2]), Zip(A[I], Map(…)))`, nested 4 deep over 20 elements,
  computed 282 560 inner elements (about 17 s). It now computes 160. A pure lazy
  collection keeps each element that a read by index computes, until a symbol it
  depends on is assigned again.

- **On `interval-js`, `run()` throws a `ReferenceError` instead of answering
  `entire`.** A `ReferenceError` means that the compiled code names something
  that is not defined, for example a helper of an operator's `compileHelpers`
  that reads a variable from outside its own body. The `compileHelpers`
  documentation says that such a read throws on every thread, and the
  `javascript` target already threw. The function that
  `createIntervalRuntime().load()` returns for a stored result does the same.
  Other run-time errors still answer `entire` ("cannot bound"). A helper of
  `compileHelpers` is defined for `run()` on `interval-js`, which is now tested.

- **On `wgsl`, a piecewise branch that draws a random value compiles to an `if`
  statement** when the branch draws once and nothing else in the same statement
  draws (Tycho row 466), so only the branch that is taken draws, as in the
  interpreter and on `glsl`.
  `\operatorname{WithRandomSeed}(s, \{x<0: \operatorname{Random}(), 0\})`
  compiles, and so does `1 +` it. Other shapes still decline, because a hoisted
  `if` runs ahead of the rest of its statement and could change the order of the
  draws. 0.170.0 already used the `if` form, but also for a branch that draws
  twice, such as `(\operatorname{Random}(), \cot(\operatorname{Random}()))`,
  where it drew the second value first; that shape declines again. (The 0.170.0
  note that such a branch no longer compiles on `wgsl` describes the release
  before.)
- **On `glsl` and `wgsl`, a random draw bound to a temporary no longer comes
  before a draw written before it.** A lowering that uses an operand twice
  (`\cot`, `\operatorname{Remainder}`, the components of a vector in `\max`)
  binds an operand that draws to a temporary ahead of its statement, and a `Sum`
  or `Product` hoists its loop or its terms the same way. So
  `(\operatorname{Random}(), \cot(\operatorname{Random}()))` drew the operand of
  `\cot` first, and
  `(\operatorname{Random}(), \sum_{k=1}^{n} \operatorname{Random}())` drew the
  loop first, unlike the interpreter and the `javascript` target. Such a shape
  now declines, and the interpreter evaluates it; a statement whose draws are
  bound in their written order (`\operatorname{Variance}` of a list of draws, a
  `Sum` that is written first) still compiles.

- **An interval value for interval arithmetic**
  ([#416](https://github.com/cortex-js/compute-engine/issues/416)): the
  `Enclosure` value kind (see Features). With this third phase, the value kinds
  of [#477](https://github.com/cortex-js/compute-engine/issues/477) are
  complete: the mechanism and `ResidueClass` (phase 1), `Measurement` and
  `Quantity` (phase 2), and `Enclosure` (phase 3).

## 0.170.0 _2026-10-26_

### Breaking Changes

- **The package is ESM only, and Node 22.12 or later is required.** The UMD
  builds (`dist/umd-min/*.cjs`), the `require` conditions of the `exports` map
  and the `ComputeEngine` script-tag global are gone. A CommonJS consumer keeps
  calling `require('@cortex-js/compute-engine')`: Node loads the ESM entry
  through `require()` since Node 22.12 (and 20.19), and no entry has a top-level
  `await`. `engines.node` is `>=22.12.0` (it was `>=22.3.0`). A CommonJS Jest
  setup that imports the package loads it through Jest's own module loader, not
  Node's, and needs a transform exception for the package or an ESM-capable
  runner. The published files drop from 61 MB to 24 MB.
- **A program that loads only `@cortex-js/compute-engine/core` has the
  `javascript` and `interval-js` compilation targets.** The GPU targets (`glsl`,
  `wgsl`) and the source-only `python` target are no longer bundled in that
  entry (together 408 KB minified). To use one there, import the target class
  from `@cortex-js/compute-engine/compile` and register it:
  `ce.registerCompilationTarget('glsl', new GLSLTarget())`. Once the full entry,
  `…/epsil` or the `epsil` CLI is loaded anywhere in the program, every engine
  has all five targets, an engine made earlier from `…/core` included. An
  unregistered target name fails with a message that lists the registered ones.

### Packaging

- **One copy of each class across the entries.** Every entry except `runtime`
  and `kernel-worker` is now built in one code-splitting invocation, so the
  engine and the modules it shares with `…/numerics`, `…/latex-syntax` and
  `…/interval` are emitted once into shared chunks. A host that imported
  `…/core` and `…/compile` loaded two copies of the engine (`compile.js` was 3.5
  MB on its own), and a `NumericValue` made from `…/numerics` failed the
  engine's `instanceof` checks. One effect: a `JavaScriptTarget` imported from
  `…/compile` compiled `n(n-1)(n-2)/6`, boxed by the main entry, to
  `0.16666666666666666 * …` (`559.9999999999999` at `n = 16`); it is now
  `(…) / 6`, which gives `560` (#480, reported by
  [enumeratio](https://github.com/enumeratio)). `runtime` and `kernel-worker`
  stay single self-contained files.
- **`ce.registerCompilationTarget(name, target)` and
  `ce.unregisterCompilationTarget(name)` are public.** The compile guide
  documented the first under that name, but only the internal
  `_registerCompilationTarget` existed.

### Behavior Changes

- **The code that a caller's operator `compile` handler writes no longer goes to
  the worker pool** (ROADMAP CE-518, Tycho row 460). Such code can call a
  function that exists only on the thread that compiled it, for example
  `globalThis.myFloorIndex(…)`. The result had `shippable: true`, so
  `broadcastAsync()` sent it to the workers, where every cell threw: each value
  was `NaN`, and the batch still reported every cell as done. Now a result with
  code from a caller handler has `shippable: false` and runs on the calling
  thread (`reason: 'not-shippable'`). This also holds for a handler attached in
  place to a built-in definition
  (`ce.lookupDefinition('At').operator.compile = …`). The handlers of the
  standard library are not affected. To send such code to the pool again, set
  `compileShippable: true` on the definition, and give the functions that the
  code calls in `compileHelpers` (see Features).
- **A point parameter accepts a list that can hold both points and lists.** With
  `k: (tuple<number, number>) -> number` and `y` declared `list<P | list<P>>`,
  `type A = list<A | P>` or `type B = list<B> | P` (`P` is
  `tuple<number, number>`), `k(y)` maps by the depth of the value: a point gives
  a number, `[(1, 2), (3, 4)]` gives `[3, 7]` and `[[(1, 2)]]` gives `[[3]]`.
  These calls were refused for every value. A value in which one list holds both
  a point and a list, such as `[(1, 2), [(3, 4)]]`, still gives an
  `incompatible-type` error (the compiled call gives `NaN`), and the type of the
  call includes `error` for it.
- **A point parameter accepts an empty list.** `k([])` is typed `list<number>`
  (it was `number`, for the value `[]`), and a symbol declared `list<never>`
  that holds `[]` gives `[]` (it was refused).
- **A point beside an operand that may be a list is typed as a point or a list
  of points** (CE-504). With `L: list<unknown>`, `(x, y)·(2·L[1])` was typed
  `tuple<number, number>`, while `L := [[1, 2]]` gives `[(6, 8), (12, 16)]`; it
  is now `tuple<number, number> | list<tuple<number, number> | list<any>>`. With
  `b: broadcastable<number>`, `(x, y)·b` and `(x, y)/b` are
  `broadcastable<tuple<number, number>>`, and `(x, y) + b` is
  `broadcastable<error>`. A list of points beside a collection pairs each point
  with an element: `p·t` with `t: tensor<integer>` is
  `list<broadcastable<tuple<…>>>`; `p·v` with `v: vector<integer^2>` is
  `list<tuple<…>>`. Compiled JavaScript gives the interpreter's value for a list
  of points times or divided by a tensor of numbers (it gave wrong values for a
  matrix), and refuses an operand whose cells may be points.
- **A list of ranges of the same length is accepted as a matrix by the
  linear-algebra functions.** `Determinant([1..2, 3..4])` is `-2`, and
  `Inverse`, `MatrixMultiply`, `Dot`, `LinearSolve` and the other functions
  whose parameter is a matrix read each range as a row; they refused the list
  with `incompatible-type`. The list keeps its `list<range>` type, so
  `[1..2, 3..4]^{-1}` and `\cdot` still apply element by element.
- **A recursive alias of lists of points is accepted at a point parameter.**
  With `A = list<A> | list<tuple<number, number>>` and `y: A`, `k(y)` maps by
  the depth of the value (`[(1, 2), (3, 4)]` gives `[3, 7]`); it was refused. A
  union of a list of points and a list of lists of points
  (`list<P> | list<list<P>>`) also maps by the depth of the value, and the
  compiled call of a point-or-point-list union now gives the same values as the
  interpreter (it was refused).
- **An element-wise operation over an operand of type `unknown` holds a ragged
  list or a point** (CE-502). With `L: list<unknown>`, `2·L[1]` was typed
  `broadcastable<number>`, which does not hold `[[1], [2, 3]]` or `(1, 2)` in
  `L[1]`; it is now `list<list<any> | number | tuple> | number | tuple`. The
  same holds for `k(L[1])` with `k: (real) -> real`, and for a call of an
  undeclared function. A comparison over such an operand can be one boolean
  (`[1, 2] = L[1]` compares two whole lists). Compiled code is unchanged. A
  valueless symbol used as a number is still inferred `number`.
- **A function with an inferred signature, called with a string or a boolean, is
  typed from its body** (CE-490). With `f := x ↦ (-x, x)`, `f("s")` was typed
  `tuple<number, number>` and is `error`; with `g := x ↦ x + 1`, `g("s")` was
  `number` and is `error`.
- **A parameter used in arithmetic before an index read has a sound signature**
  (CE-503). `(P, t) ↦ t·P/(P[1] − 1)` was `(P: unknown, t: unknown) -> never`
  and is `(P: indexed_collection<number>, t: unknown) -> list<number>`; applied
  to `([3, 2], 2)` it gives `[3, 2]`, not a list of errors.
- **A product of a list of points and a point is one `no-product-between-points`
  error at evaluation**, as it already was when boxed (CE-491). With
  `pd := x ↦ x·x[1]`, `pd([(3, 2), (1, 4)])` was a list of two errors.
- **The terms of a sum or a product with a residue class that are not classes
  are combined by `evaluate()`** (CE-507). `x + x + ResidueClass(1, 5)`
  evaluates to `2x + ResidueClass(1, 5)` (it was returned as written; only
  `simplify()` combined it), and `(√2 + π + ResidueClass(1, 5)).N()` is
  `4.5558… + ResidueClass(1, 5)` (the two floats were left apart). The rules for
  the classes themselves do not change.
- **The signatures of the arithmetic operators no longer name `residue`.**
  `Multiply` is `(number*) -> number` again (it was
  `((number | residue)*) -> number`), and `Divide`, `Negate`, `Power`, `Root`,
  `Sqrt`, `Square` and `Subtract` lost their `residue` arm in the same way. They
  accept a residue class, and a value of any kind that has the matching hook, by
  a rule that reads the declared kinds, not by their signature. A host that
  reads these signature strings sees the change, and an `incompatible-type`
  error of these operators no longer names `residue` as an expected type. An
  engine built without the `ResidueClass` definition no longer accepts a
  `residue` operand at these operators.
- **Two values of a kind written next to each other are a product**, as two
  residue classes are: with `GF8` a head of the kind type `gf8`,
  `\operatorname{GF8}(3)\operatorname{GF8}(5)` parses to a `Multiply`, not to a
  `Tuple`. A list of such values is typed `list<gf8^2>` (it was `list<gf8>`).
- **`Sum`, `Product` and `Reduce` over residue classes are typed `residue`.**
  `Sum([c1, c2])` was typed `number` and `Map(Negate, [c1, c2])` `vector<2>`;
  they are `residue` and `list<residue^2>`.
- **A measurement is typed `measurement`, and a quantity is typed `quantity`**
  (CE-507). `Measurement(2.5, 0.1)` was typed with the type of its nominal
  (`real`; `integer`, `rational` or `complex` for other nominals), and
  `Quantity(2, m)` was typed `value`. `measurement` and `quantity` are new
  primitive types of the type language. They are kind types: each one is a
  subtype of `value` and is disjoint from the number types, so
  `ce.type('measurement').matches('real')` is `false`. A host that compares type
  strings sees the change, and a host that declared a type named `measurement`
  or `quantity` must rename it. The result type of an operator with a
  measurement operand changes in the same way: `Floor(2.5 ± 0.1)` was typed
  `integer` and is `measurement | number` (a propagated uncertainty of 0 gives a
  plain number), `2 + (2.5 ± 0.1)` is `measurement`, and `Max(2 ± 0.1, 2)` is
  `integer<2..2> | measurement`.
- **A symbol or a function with a body that is declared over a number type
  refuses a measurement.** With `s: real` (or `number`, `integer`),
  `ce.assign('s', Measurement(2, 0.1))` throws; it assigned the measurement.
  With `f: (real) -> real` and `f := x ↦ x^2`, `f(2 ± 0.1)` is an
  `incompatible-type` error; it was `4 ± 0.4`, from a body that the canonical
  form could have changed (`x/x` is `1` for a `real` parameter). Declare the
  parameter `real | measurement` to accept one. An operator of your own declared
  over `real` with an `evaluate` handler (`h`) now leaves `h(5 ± 0.1)`
  unevaluated: the measurement does not know the derivative of `h`, so it does
  not call the handler (it gave `2 · (5 ± 0.1)` for
  `evaluate: ([x]) => x.mul(2)`). An operator that handles a measurement itself
  names `measurement` in its parameter type, and its handler runs.
- **A quantity is refused at every operator that does not accept it by type.**
  The arithmetic operators, the comparisons, `Max`, `Min`, `Clamp`, `Sort`, the
  operators with a `value` parameter (`UnitConvert`, `List`), the 24
  trigonometric functions and `Abs` accept a quantity. Every other operator
  gives an `incompatible-type` error at boxing: `Round(2.7 m)`, `Floor(2 m)`,
  `Sign(2 m)`, `Exp(2 m)`, `Hypot(2 m, 3)` and `InverseHaversine(2 m)` stayed
  unevaluated or gave a wrong value, and `Mean([2 m, 4 m])` stayed unevaluated.
- **The trigonometric functions and `Abs` name `quantity` in their signatures.**
  The 24 trigonometric, hyperbolic and inverse functions (`Sin` to `Arcsch`) are
  `(complex | quantity) -> number` (a function that accepted `infinity` or
  `signed_infinity` keeps that arm), and `Abs` is
  `(complex | infinity | quantity) -> number`. So `Arctan(2 deg)` folds the
  angle to `Arctan(π/90)` as the other functions do (it stayed `Arctan(2 deg)`),
  `Abs(-2 m)` is `2 m`, typed `quantity` (it stayed unevaluated, typed `value`),
  and `Sin(2 m)` is typed `number` (it was `value`) and stays unevaluated. The
  `incompatible-type` error of these functions names the `quantity` arm as an
  expected type (`Sin("a")` expects `complex | quantity`), and so does the type
  of `Derivative(Sin)`.
- **A measurement propagates its uncertainty through every operator with a known
  derivative, and stays unevaluated where the rule has no answer.** The rule is
  `f(a) ± |f′(a)|·σ`, and the quadrature `√(Σ |∂f/∂xᵢ|²·σᵢ²)` for several
  uncertain operands, with the modulus of each partial derivative. A propagated
  uncertainty of 0 gives the bare value (`Cos(0 ± 0.1)` is `1`, as before). The
  rules by operator:
  - A step function (`Floor`, `Ceil`, `Round`, `Truncate`, `Sign`, `Heaviside`,
    `PrimePi`) of a real measurement gives the bare value of the function at the
    nominal: `Floor(2.5 ± 0.1)` is `2`. When a jump of the function lies within
    one σ of the nominal, the call stays unevaluated: `Floor(2.95 ± 0.1)` was
    `2`. A complex nominal at `Sign` stays unevaluated.
  - `Mod` and `Fract` propagate with the slope between their jumps:
    `Mod(5 ± 0.1, 3)` is `2 ± 0.1` (it was `2`), and `Mod(7, 3 ± 0.1)` is
    `1 ± 0.2`. A jump within one σ leaves the call unevaluated.
  - An infinite value or an infinite derivative at the nominal leaves the call
    unevaluated: `Sqrt(0 ± 0.1)` was `0`, `Arcsin(1 ± 0.1)` was `π/2`;
    `Ln(0 ± 0.1)`, `Gamma(0 ± 0.1)` and `Tan(π/2 ± 0.1)` are unevaluated too. A
    float nominal near a pole (`Tan(1.5707963 ± 0.1)`) gives the large finite
    value with its large uncertainty.
  - A real nominal whose value is not real keeps an uncertainty:
    `Arccos(2.5 ± 0.1)` is `1.5668i ± 0.0436` (it was the bare `1.5668i`), and
    `Ln(-1 ± 0.1)` is `πi ± 0.1`.
  - `Hypot`, `Degrees`, `Haversine`, `InverseHaversine`, `Factorial`, `Log` with
    an uncertain base, `Arctan2`, `Root` with an uncertain index, `Norm` with an
    uncertain order, `Round` with an uncertain step, `PreIncrement`,
    `PreDecrement`, and the multilinear operators `Dot`, `Cross`,
    `MatrixMultiply`, `HadamardProduct` and `Trace` propagate every uncertain
    operand. `Dot([2.5 ± 0.1, 2, 3], [1, 2, 3])` is `15.5 ± 0.1`.
  - `Binomial`, `Choose`, `Pochhammer`, `Determinant`, `Inverse`, `Eigenvalues`,
    `ContinuedFraction`, `ComplexRoots`, `Arg`, `Argument` and `BaseForm` stay
    unevaluated with a measurement operand, and so does an operator whose
    derivative the engine does not know (`Zeta`, `Beta`, the order of
    `BesselJ`). `Binomial(5 ± 0.1, 2)` was `(5 ± 0.1)·((5 ± 0.1) − 1)/2` and
    `Determinant([[1 ± 0.1, 2], [3, 4]])` was `-2 ± 0.4`: these formulas use the
    same measurement more than once, and the arithmetic of measurements counts
    each occurrence as an independent error.
  - `Mean`, `Median`, `Variance`, `PopulationVariance`, `StandardDeviation` and
    `PopulationStandardDeviation` of a list that holds measurements give the
    statistic of the nominals with the propagated uncertainty of the independent
    data. The other statistics (`Skewness`, `Kurtosis`, …) stay unevaluated.
  - `Real`, `Imaginary`, `Conjugate` and `Abs` keep the uncertainty of the
    operand: `Abs(0 ± 0.1)` is `0 ± 0.1`.
- **A comparison of measurements uses the nominals.** The uncertainties take no
  part: `1 ± 0.1 = 1 ± 0.5` is `True`, as before.
  - `Max` and `Min` decide by nominal and keep the first operand of a tie:
    `Max(1 ± 0.1, 1 ± 0.5)` is `1 ± 0.1` (it stayed unevaluated), and
    `Max(2 ± 0.1, 2)` is `2 ± 0.1` (it was `2`).
  - `Clamp(x, lo, hi)` returns `x` when `x` equals a bound:
    `Clamp(3 ± 0.1, 0, 3)` is `3 ± 0.1` (it was `3`).
  - `ElementMax` and `ElementMin` compare as `Max` and `Min` do.
  - A measurement with a complex nominal has no order: `(2 + 3i) ± 0.1 < 3` is
    `False`, as `2 + 3i < 3` is, and `Max` of it stays unevaluated. Its equality
    is the equality of the nominal: `Equal((2 + 3i) ± 0.1, 2 + 3i)` is `True`.
  - A measurement is not exact: `Max(3/2 ± 1/10, Indeterminate)` is `NaN`, not
    `Indeterminate`.
- **A comparison of quantities converts to the finer unit and uses the engine
  tolerance there**, also in `Max`, `Min`, `Clamp`, `ElementMax`, `ElementMin`
  and `Sort`. `Max(1 m, 1.000000000001 m)` is `1 m`: the extrema compared with a
  tolerance of zero. The tolerance applies in the finer of the two units, so
  `Equal(1 m, 100.0000000001 cm)` stays `False`. A quantity with a magnitude
  that is a float is not exact: `Max(1.5 m, Indeterminate)` is `NaN`.
- **The methods `.add()`, `.mul()`, `.div()`, `.pow()`, `.sub()` and `.sqrt()`
  combine measurements and quantities** as the evaluation does. `M.add(M2)` for
  `M = 3 ± 0.1` and `M2 = 2 ± 0.1` is `5 ± 0.141` (it was the sum
  `(3 ± 0.1) + (2 ± 0.1)`), and `(2 m).add(30 cm)` is `2.3 m` (it was
  `30 cm + 2 m`). `.neg()` does not call the `negate` hook of a kind: `c.neg()`
  is `Negate(c)`, and `Negate(c).evaluate()` negates the value.
- **`.re` and `.im` of a measurement are the parts of its nominal**, as before:
  `Measurement(2.5, 0.1).re` is `2.5`. The numeric facts of a measurement
  (`isPositive`, `sgn`, `isInteger`) are `undefined`; they were the facts of the
  nominal (`Measurement(4, 0.1).isInteger` was `true`). So the canonical forms
  of the numbers do not apply to a measurement.
- **The uncertainties of several occurrences of one measurement are
  independent.** The engine does not know that two occurrences of `M` are the
  same measurement: with `M = 1 ± 0.1`, `Sin(M)^2 + Cos(M)^2` simplifies to
  `1 ± 0.13` (it simplified to `1`), and `M − M` is `0 ± 0.141`. The operators
  that use an operand more than once in their own formula (`Binomial`,
  `Determinant`, …) stay unevaluated for this reason.
- **A physical constant opens the quantity rules only when it is read.** The
  value of `SpeedOfLight` and of the other physical constants is a quantity. An
  engine that never makes a quantity does not pay the cost of the quantity
  rules: the constants made while the libraries load do not count, and each
  constant makes its value again when it is first read.
- **Compiling an expression with a measurement or a quantity fails with a
  message that names the kind type** ("holds a value of the kind type
  'measurement'"). It failed before with "Could not compile `Measurement`".
  Neither kind has a compiled representation.

### Features

- **An operator `compile` handler can give the functions its code calls**
  (ROADMAP CE-518). The new `compileHelpers` field of an operator definition
  maps a name to a function. The engine copies the source of each function into
  the compiled code, as `const <name> = (<source>);`, so the code carries its
  helpers to a worker of the pool and to a stored result. With
  `compileShippable: true`, the result can then run on the pool:

  ```ts
  ce.declare('Wrap', {
    signature: '(number, number) -> number',
    compileShippable: true,
    compileHelpers: { wrapIndex: (i, n) => ((i % n) + n) % n },
    compile: (args, compile, { language }) =>
      language === 'javascript'
        ? `wrapIndex(${compile(args[0])}, ${compile(args[1])})`
        : undefined,
  });
  ```

  A helper must not read a variable from outside its own body, and its name is
  an identifier that does not start with `_`. A built-in function, a bound
  function or a method has no source that can be copied, and the declaration
  refuses it. The compile contract of a value kind has the same field,
  `arithmetic.compile.type.helpers` (ROADMAP CE-507.1); `hostNames` there now
  names only the functions of the host that the code does not carry.

- **`broadcastAsync()` reports the cells that threw.** The new `failed` field of
  `BroadcastAsyncResult` counts the cells, among the first `done`, whose
  evaluation threw, on the calling thread and on the workers. The value of such
  a cell is `NaN`, as for a cell whose value is not a number, so this count is
  the only way to tell the two apart. `done` keeps its meaning: a cell that
  threw was evaluated.
- **An operator can declare the arithmetic of the values it constructs: a value
  kind** (ROADMAP CE-507,
  [#477](https://github.com/cortex-js/compute-engine/issues/477)). With `MyMod`
  declared `(integer, integer) -> residue`, `x + MyMod(2, 4) + MyMod(1, 4)` and
  `MyMod(2, 4) - MyMod(2, 4)` stayed as they were: only `ResidueClass` values
  were combined, and no definition could give the arithmetic of another head.
  The new `arithmetic` field of an operator definition gives it:
  - The field (`ArithmeticDefinition`) has the hooks `add` and `multiply` (they
    answer folds, `KindFold`: the operands they combined and the value they
    make), `negate`, `divide`, `power` (also called for `Sqrt`, `Root` and
    `Square`), `compare` (one order for the comparisons, `Max`, `Min`, `Sort`,
    `Clamp` and the methods `isEqual()`, `isLess()`, …), `apply` (called in
    place of the handler of another operator that accepted the value as a
    number), and the fields `admittedAs`, `resultType` and `compile`. The new
    public types are `ArithmeticDefinition`, `KindOperands`, `KindOperand`,
    `KindFold`, `ArithmeticContext` and `ArithmeticCompile`. With `MyMod`
    declared with `add`, `multiply` and `negate`,
    `x + MyMod(2, 4) + MyMod(1, 4)` is `x + MyMod(3, 4)`, and
    `MyMod(2, 4) - MyMod(2, 4)` is `MyMod(0, 4)`, in `evaluate()` and
    `simplify()`.
  - The result type of an operator with an `arithmetic` field must be a **kind
    type**: `residue`, or a nominal type defined as exactly `value` and declared
    with `{ mint: false }`, such as
    `ce.declareType('gf8', 'value', { mint: false })`. Such a nominal type is a
    subtype of `value` and `expression`, and is disjoint from every other type,
    as `residue` is: the engine keeps the number rules (`x - x = 0`, `x/x = 1`,
    like terms) away from its values and from a symbol declared with it. Any
    other result type (`integer`, `value`, `residue | integer`, a nominal type
    with another definition) is refused when the operator is declared, with an
    error that names the rule.
  - The `mint` option of `ce.declareType()` is public. `{ mint: false }`
    declares a type without a constructor of the same name; a kind uses it,
    because its values are made by its own operator.
  - `admittedAs: 'real'` or `'number'` lets every operator that accepts a `real`
    (or a `number`) accept the values, and `apply` then computes the result: a
    measurement kind can propagate its error through `Sin` and `Floor`.
    `admittedAs: 'none'` (the default, and the rule of `residue`) admits the
    values at the arithmetic operators only.
  - `compile` gives a compiled representation to a kind type (`compile.type`)
    and to the literals of a head (`compile.value`). Code compiled with it
    reports the kind types in the new `CompilationResult.valueKinds`, and the
    bindings of a kind type in `StoredEntryPlan.kinds`; it is returned without
    the number conversion of `run()`, and `createJavaScriptRuntime().load()`
    refuses it, because the run-time check of a kind is a function of the host.
    Without `compile`, an expression with a value of a kind declines, as a
    residue class does.

  `ResidueClass` now declares its arithmetic with this field. The design, which
  also covers `Quantity`, `Measurement` and an interval value
  ([#416](https://github.com/cortex-js/compute-engine/issues/416)) in later
  phases, is `docs/plans/2026-10-26-value-kinds.md`. The guide is
  `doc/06-guide-augmenting.md`, "Declaring a Value Kind"; the type rules are in
  `doc/08-guide-types.md`, "Kind Types".

- **`Measurement` and `Quantity` are value kinds** (ROADMAP CE-507 phase 2,
  CE-508, [#477](https://github.com/cortex-js/compute-engine/issues/477)). Their
  arithmetic, their order and their propagation of an uncertainty are now the
  hooks of their `arithmetic` field, and the operators no longer test the names
  `Measurement` and `Quantity`. The visible changes are listed under Behavior
  Changes and Resolved Issues.
  - `Measurement` has the kind type `measurement` and is accepted where a number
    is accepted (`admittedAs: 'number'`). An operator that accepted the
    measurement as a number calls the `apply` hook of the kind, which computes
    the value at the nominal and propagates the uncertainty.
  - `Quantity` has the kind type `quantity` and is accepted only by the
    arithmetic operators, the comparisons, the operators that name `quantity`
    and the operators with a `value` parameter (`admittedAs: 'none'`). Its `add`
    hook makes one sum for each physical dimension, in the unit with the largest
    scale, and reads how each term was written to add temperatures with an
    offset: `20 degC − 5 degC` is `15 K`, and `20 degC + 5 degC` is `571.3 K`,
    as before.
  - `ArithmeticDefinition.compare` can answer `'unordered'`: the two values are
    known and have no order (a measurement with a complex nominal). The order
    operators then answer `False`, `Equal` and `NotEqual` ask the `eq` handlers,
    and `Max`, `Min` and `Sort` stay unevaluated.
  - `ArithmeticDefinition.isExact(value)` says whether a value of the kind is
    exact, for the rule that an inexact operand turns `Indeterminate` into
    `NaN`. Absent: the values are exact.
  - `ArithmeticDefinition.isNaN(value)` says whether a value of the kind stands
    for no value, as the number `NaN` does (a measurement with a `NaN` nominal,
    a quantity with a `NaN` magnitude). Such a value follows the rule of `NaN`:
    `Max`, `Min`, `ElementMax`, `ElementMin` and `Clamp` give `NaN`, the order
    operators give `False`, and `Equal` gives `False`, also for the value and
    itself. Absent: no value of the kind is `NaN`.
  - `KindOperands.written` holds the operands as they were written on every
    route: under `simplify()`, the operands before their simplification. So a
    kind whose `negate` gives a value and whose `add` reads `Negate(b)` in
    `written` gives the same difference under `evaluate()`, `.N()` and
    `simplify()`.
  - `ArithmeticDefinition.numericValue(value)` gives the number that a value of
    the kind stands for. `re`, `im`, `bignumRe`, `bignumIm` and `valueOf()` of
    the value read it. The fact queries (`isPositive`, `sgn`, …) do not.
  - `ArithmeticContext.tolerance` gives the `compare` hook the tolerance of
    `.is()`: the `tolerance` argument of the call, or `engine.tolerance`. So
    `M.is(2.6, 0.2)` for `M = 2.5 ± 0.1` uses the tolerance `0.2`. It is
    `undefined` for the other comparisons.

  The rules are in `doc/06-guide-augmenting.md`, "Measurements and Quantities";
  the decisions are in section 13 of `docs/plans/2026-10-26-value-kinds.md`.

- **`factor()` accepts `variable` and `generator` options, and a new
  `factorDetailed()` returns a structured result.**
  `factor(p, { variable, generator })` factors over an explicit number field, as
  `Factor(p, x, generator)` does. `factorDetailed()` returns the exact factors
  with their multiplicities, the scalar content, whether the factorization is
  complete, and the reason and stage of a refusal; with `statistics: true` it
  also returns the work counts of each step. Both are exported from the main and
  the `core` entry points. No MathJSON operator is added.
- **Number-field factoring lifts at unramified prime ideals of any residue
  degree.** It used to need an inert prime, and ten inputs of the extended
  number-field corpus were refused because none was found. The factors are
  recovered with an exact lattice reduction and the recombination is certified.
  A weighted scaling of the generator and the variable and tighter bounds on the
  coefficients of a divisor reduce coefficient growth. When the coefficients are
  rational, the norm fallback skips the unshifted norm, which is always
  repeated. The statistics keep the reason the direct method failed before a
  norm fallback.
- **Number-field factoring reads `x^n` monomials directly** when it converts an
  expanded polynomial of high degree, and no longer refuses such an input
  because the conversion went over its budget.

### Resolved Issues

- **A coordinate of a list of points inside `PointList` compiles to a list**
  (CE-514, Tycho row 447). On the `javascript` target,
  `(v ↦ PointList(PointY(v), PointX(v)))([(1, 2, 3), (4, 5, 6)])` compiled to
  `[NaN, NaN]`; it now gives `[[2, 1], [5, 4]]`, as `evaluate()` does. The same
  holds for a named function called with a list of points. A
  `PointX`/`PointY`/`PointZ` component whose operand is not provably one point
  is a zip source when its value is an array and one slot otherwise, decided at
  run time. The type of the call is now a list of points too: `f(L)` for a list
  `L` of two points with integer coordinates is a
  `list<tuple<integer, integer>^2>`, where it was `tuple<unknown, unknown>`.
- **A call of a function whose signature was inferred is typed from its body**
  with each parameter typed as its argument, when the type inferred for the
  result does not describe the call (CE-514). The result inferred for
  `v ↦ PointList(PointY(v), PointX(v))` is one point, and a call with a list of
  points evaluates to a list of points. The call was typed one point; it is now
  typed from the body. This applies only when the inferred result is not a
  scalar and the walk of the body bounded by it gives no type, and only for
  arguments that are numbers or lists of numbers or points. A result type that
  the host declares, or that the literal writes, stays the bound, and a function
  that reads a symbol from outside its parameters keeps its inferred result, so
  a call after that symbol changes type is still refused (CE-473).
- **Five shader fixes found by comparing WebGL2 and WebGPU on a GPU** (CE-509 to
  CE-513, Tycho rows 454 to 458).
  - On `wgsl`, `tanh` calls a helper that answers `sign(x)` when `|x| > 10`. On
    WebGPU over Metal the built-in returned 0 at x = 44 and NaN from x = 45,
    where the value is 1. `Coth` is `1.0 / tanh(x)` on both targets: the
    quotient `cosh(x) / sinh(x)` was NaN above about 89 in f32.
  - On `wgsl`, a constant above the f32 maximum (`\exp(100) + x`, `10^{40} + x`)
    is written `_gpu_inf()`, and a constant that rounds to the maximum is
    written as the maximum. WebGPU rejected the whole shader for such a literal.
  - On `glsl`, `Mod` stays in the range of the divisor. The built-in `mod` gave
    `mod(1e8, 3.0) = -2` and `mod(-1e6, 1000.0) = 1000` on WebGL2 over ANGLE
    Metal; they are now 1 and 0. On both targets `Mod(x, 1)` is
    `fract(fract(x))`, so a tiny negative `x` gives 0 instead of 1.0.
  - On both targets, `Mod` calls a `_gpu_fmod` helper, which receives each
    operand once. On `wgsl` the inline formula wrote the dividend three times
    and the divisor five times.
  - On `wgsl`, a piecewise arm that calls a user function, or a special function
    with a loop (`Zeta`, `HurwitzZeta`, `PolyLog`, `LerchPhi`, `BesselJ`,
    `Mandelbrot`, …), becomes a branch of an `if` statement. `select` computes
    both arms: with `g(x) = \sum_{i=1}^{300}\cos(ix)`, `\{x<0 : g(x), 0\}` took
    5.05 ms on WebGPU against 2.36 ms with an `if`.
- **`sin`, `cos` and `tan` of a quotient `π·u / d` compile to the exact
  half-turn forms** (`sinpi`, `cospi`, `tanpi`) on every target, as `π·u`
  already did. `\sin(2\pi s / P)` at `s = 2`, `P = -2` is now exactly 0 in the
  compiled code; it was `2.4e-16` in JavaScript, so a test `\sin(…) > 0` was
  true in the compiled code and false in the interpreter. `e^{i\pi u/d}` and the
  hyperbolic functions of `i\pi u/d` take the exact forms too.
- **On `wgsl`, a piecewise branch that draws a random value no longer compiles**
  (it is evaluated by the interpreter instead). WGSL `select` computes every
  branch, so a draw in a branch that was not taken still advanced the random
  stream and changed every later draw in the shader. `glsl` is unchanged: its
  `?:` evaluates only the branch that is taken.
- **On `glsl`, `Mod` of a scalar by a vector compiles** (`Mod(1, v)` broadcasts
  the scalar); the built-in `mod` has no such overload, and it was refused.
- **On `glsl` and `wgsl`, `Sin`, `Cos`, `Sec`, `Csc`, `Cot`, `Sign`,
  `Smoothstep` and `Heaviside` give NaN when the operand is NaN** (CE-520), as
  the `javascript` target does. On Apple GPUs the built-ins `sin`, `cos`, `sign`
  and `smoothstep` of a NaN gave 0 (so `\sec x` gave +∞), and the GLSL
  `Heaviside` gave 0.5. They now call helpers that test the bit pattern of the
  operand, as `Max` and `Min` do (CE-519). `\tan(\pi x)` on the shader targets
  is now +∞ at every pole, as on the other compiled targets; it was +∞ or −∞
  depending on the sign of the zero cosine, and not the same on WebGL2 and
  WebGPU.
- **On `glsl` and `wgsl`, `Max`, `Min`, `Clamp`, `ElementMax` and `ElementMin`
  give NaN when an operand is NaN** (CE-519, Tycho row 465), as the interpreter
  and the `javascript` target do. The shader built-ins return the other operand
  on Apple GPUs, so `\max(0, \sqrt{1 - x^2})` at `x = 2` was 0. The targets now
  call helpers that test the bit pattern of each operand (a test `a != a` was
  removed by the compiler on WebGPU over Metal) and return the NaN operand
  itself. `Clamp(x, lo, hi)` with `lo > hi` now gives `hi` on `glsl` as on the
  other targets (the built-in `clamp` left it undefined). A vector `Clamp` with
  scalar bounds, and an `ElementMax` or `ElementMin` of a vector and a scalar in
  any position, now compile on both targets: the scalar is broadcast, as in the
  interpreter. They were refused on `wgsl`, and on `glsl` when the scalar came
  first.
- **A part of a loop body printed or evaluated outside its operator keeps its
  index** (CE-498). `ReplaceAt([1,2,3], i, 9)` taken from
  `Loop(…, Element(i, Range(1, 3)))` printed an `incompatible-type` error, with
  `i` read as the imaginary unit; it now prints `ReplaceAt([1,2,3], i, 9)`.
- **An undeclared recursive pair that builds a list is typed `-> list<number>`
  in every install order** (CE-38). Assigning `G := (n, K) ↦ F(n, K)` before `F`
  gave `-> list<any>`.
- **A symbol declared `list<residue>` is accepted by the arithmetic operators**
  (CE-507). With `L: list<residue>`, `L + L`, `-L` and `L · 2` were
  `incompatible-type` errors when boxed, while a list literal of classes was
  accepted. They are typed `list<residue>` and are computed element by element.
- **A boxed function literal mapped over residue classes keeps the rules of the
  classes** (CE-507).
  `ce.function('Map', [ce.box(x ↦ x/x), [ResidueClass(2, 4), ResidueClass(3, 4)]])`
  gave `[1, 1]`: the body was simplified to `1` before the type of the elements
  was known, and 2 has no inverse modulo 4. It now gives
  `[ResidueClass(2, 4) / ResidueClass(2, 4), ResidueClass(1, 4)]`, as `ce.box()`
  and `ce.parse()` of the same expression do.
- **Measurements and quantities: wrong values and wrong types** (CE-508, fixed
  by making `Measurement` and `Quantity` value kinds, CE-507).
  - `Quantity(2, m) − Quantity(2, m)` simplifies to `0 m`. It simplified to the
    number `0`, without the unit.
  - `Quantity(2, m) + Quantity(30, cm)` simplifies to `2.3 m`, and
    `Quantity(2, m) · Quantity(3, s)` to `6 m·s`. `simplify()` returned them
    unchanged.
  - `x + Quantity(2, m) + Quantity(3, m)` evaluates to `x + 5 m`. It stayed
    unchanged, because one operand was not a quantity.
  - `Measurement(2, 0.1) − Measurement(2, 0.1)` simplifies to
    `Measurement(0, 0.141…)`, as it evaluates. It simplified to `0`.
  - `ResidueClass(2, 5) + Quantity(3, m)` is typed `quantity | residue`. It was
    typed `list<list<any> | residue> | residue`.
  - A comparison that is not decided keeps the measurement:
    `Less(Measurement(2, 0.1), x)` evaluates to itself. It evaluated to
    `Less(2, x)`, without the uncertainty, and `Equal` did the same.
  - A measurement with a complex nominal at an operator whose parameter is real
    is an `incompatible-type` error at evaluation:
    `ContinuedFraction((2 + 3i) ± 0.1)` was `[2]`, and `Floor`, `Mod`, `Hypot`,
    `Degrees` and the other operators with a real parameter read the real part.
  - A unit is no longer read as a free symbol:
    `InverseHaversine(Quantity(2, m))` evaluated to `2·arcsin(√2·√m)`. A
    quantity at an operator that does not accept it is now an
    `incompatible-type` error at boxing.
  - `Measurement(2, 0.1).isLess(3)` is `true` and `.isEqual(2)` is `true`. The
    methods answered `undefined`, while `Less` and `Equal` answered `True`.
  - A complex nominal keeps its uncertainty through every operator with a
    derivative: `Arctan((2 + 3i) ± 0.1)` is `(1.4099 + 0.2291i) ± 0.0079`. The
    uncertainty was dropped for some operators and kept for others, depending on
    how the derivative was printed.
  - `Log2(Measurement(2 + 3i, 0.1))` is `(1.8502 + 1.4179i) ± 0.0400`. It was
    `1`, a wrong value: the logarithms read only the real part of a complex
    nominal.
  - Two uncertain complex operands add the moduli of their contributions:
    `Measurement(1, 0.1) · Measurement(i, 0.1)` is `i ± 0.1414`. The two
    contributions cancelled, and the result was the bare `i`.
  - `Power(-2, Measurement(2, 0.1))` is `4 ± 1.3`, propagated with the principal
    logarithm of the base. It was the exact `4`, without an uncertainty. An
    uncertain exponent of the base `0` leaves the power unevaluated.

## 0.169.2 _2026-10-26_

### Behavior Changes

- **An open record type is no longer a dictionary of its listed field types**
  (CE-4, CE-10). `record{a: integer}` was a subtype of `dictionary<integer>` and
  is not now, because the record can hold other fields; the relation is now
  transitive. A dictionary value such as `{a: 1}` still matches
  `dictionary<integer>`. A read by a key known only at evaluation on an open
  record is typed `any`.
- **A declared type with `unknown` at a nested position refines from each
  assignment** (CE-3.5): `t: tuple<unknown, integer> := ("x", 2)` was
  `tuple<unknown, integer>` and is `tuple<string, integer>`.
- **The static type of a block local no longer depends on statement order**
  (CE-43): `mutate(v); v = [1.5, 2]` typed `v` as `list<real>`; it is
  `vector<real^2>`, as in the other order. An assignment inside a `match` case
  or a `while let` body widens the local:
  `let xs = [1,2,3]; while let [h, ...] = xs { xs = Rest(xs) }; xs` was typed
  `vector<integer^3>` for the value `[]`, and is `list<integer>`.
- **A `let`-bound function literal's effects follow a later conformance**
  (CE-62.2), and so do its callers.
- **A numeric tuple at a scalar parameter is a tuple of numbers** (CE-47):
  `h((1, 2))` with `h := x ↦ 2x` was `any` and is `tuple<number, number>`. A
  tuple with a tuple or string component is `any`; `h(((1, 2), 3))` was typed
  `number` for the value `((2, 4), 6)`.
- **`Map` over elements whose depth the type does not state admits nested
  lists**: `Map(k, L)` with `k: (real) -> real` and `L: list<unknown>` (or
  `list<any>`, `list<list<unknown>>`) was typed `list<real>`, which did not hold
  a ragged or nested element, and is `list<indexed_collection<any> | real>`. An
  operand typed `any` at a declared scalar parameter types the same on the box
  and derived routes (CE-485).
- **A nominal list-of-points type is not read through its definition** (CE-488):
  `k(x)` with `k: (tuple<number, number>) -> number` and `x` of a nominal
  `list<tuple<…>>` type was typed `list<number>` and is `error`, as its value
  is.
- **An access proved to be out of range is typed by its marker alone**
  (CE-42.3): `At(["a","b"], 9)` was `missing | string` and is `missing`;
  `M[7][1]` over a matrix was `integer | nan` and is `nan`. Arithmetic over a
  proved-absent row or point is `Missing`.
- **A local declared `any` keeps its type** (CE-444), and an operand typed `any`
  at a generic collection parameter no longer fixes the element type from the
  other operands: `ReplaceAt(ys, 2, "z")` with `ys: any` was `list<string>` and
  is `list<any>`.
- **An absent value of a symbol declared `any` gives `NaN` in arithmetic** on
  every route: with `p: any` assigned `Missing`, `p + 1` was `Missing` and is
  `NaN`, as `subs` and compiled code already gave.

### Resolved Issues

- **`subs()` on a structural expression that is a lone symbol keeps a constant
  name in the replacement.** With `x` declared `real`, the structural `x` with
  `x` replaced by the structural `t + i` gave `t + (0 + 1i)` in 0.168.0 to
  0.169.1, so a sum with an index `i` over an inlined `f(x) = x` gave complex
  values: with `X = [1, 2, 3]`, `Σ_{i=1}^{3} f(X + i)` gave
  `[3+3i, 6+3i, 9+3i]`. It gives `[9, 12, 15]` again. A requested form
  (`subs(…, { canonical: true })`) is still honored.

- **The count of a comprehension matches its cells when a clause can fail.**
  `[j for i in 1..3 if bad(i), j in []]`, where the guard gives an error, had a
  count of 0 but yields 3 error cells; its count is now 3.
- **Testing whether a comprehension is finite no longer runs user code.** The
  test does not evaluate a guard or an impure domain, so
  `let r = [i for i in 1..3, j in filter(1..i, keep)]` no longer calls `keep`.
- **A `Map`, `Filter` or `Reduce` callback follows a reassignment of its
  source.** With `L := [1, 2]` and `m = Map(x ↦ x + 1, L)`, a later
  `L := [["a"]]` made `m.evaluate()` a list of `incompatible-type` errors; it
  now gives the value that a fresh `Map` gives.
- **`Range(n)` with `n < 1` counts down from 1 on every route.** A raw
  `Range(0)` and the compiled JavaScript `Range(0)` were empty; they are now
  `[1, 0]`, as the canonical form already was.
- **A coefficient times an ellipsis product keeps the product whole.**
  `3(2·4·…·2n)` evaluated, expanded and simplified to `3·2·4·…·2·n` or `48·…·n`;
  it now stays `3·(2·4·…·2n)`. The same holds in a sum: `x + 3(2·4·…·2n)` was
  `x + 48·(…·n)`, and like terms still collect (`(2·4·…·2n) + (2·4·…·2n)` is
  `2(2·4·…·2n)`).
- **The type of `Negate`, `Sqrt` and the other element-wise functions of a list
  of range rows holds its value.** `Negate([1..3, 4..6])` was typed
  `list<range>` for a matrix of integers; it is now `list<list<integer>>`.
  `Sum([1..2, 3..4])` is typed `integer | list<integer>` (it was `number`, for
  the value `[4, 6]`).

- **An undeclared recursive pair that builds a list is typed `-> list<number>`**
  (CE-38), and a function literal boxed before the function it calls is typed
  once that function is assigned: `g := (n, K) ↦ f(n, K)` boxed before
  `f := (n, K) ↦ n + K` was `-> unknown` and is `-> number`.
- **A polymorphic callback over rows** (CE-30): `Map(k, [[x ↦ x + 1]])` with
  `k: ((integer) -> T) -> T` was `matrix<unknown^(1x1)>` and is
  `matrix<number^(1x1)>`.
- **The meet and overlap of chains of list, set and tuple aliases** (CE-449)
  finish in under 0.25 s at depth 32; they took several seconds, or did not
  finish.

## 0.169.1 _2026-10-25_

### Behavior Changes

- **`references` and `referencedFunctions` list a name that already has a value
  or a definition.** They give the dependencies of an expression, for example
  the edges between the cells of a notebook, and they lost an edge as soon as
  the cell it points to was evaluated. After `ce.assign('a', 5)`,
  `g(x) := x + a` references `a` (it gave `[]`). Once `f` is defined by
  `f(x) := …`, by `ce.assign('f', …)` or declared with `{ signature: … }`,
  `g(x) := f(x) + a` references `a` and `f` (it gave `["a"]`), and
  `referencedFunctions` is `["f"]`. A user function passed as an operand is
  referenced too: `Map(L, f)` references `L` and `f`. The names of a library
  (`Add`, `Sin`, `Pi`, …: the standard library, a library given to the
  constructor, or one loaded with `ce.loadLibrary()`) and constants are still
  left out. `unknowns` and `freeVariables` are unchanged: they list only the
  symbols with no value.

### Resolved Issues

- **`subs()` on a structural expression keeps a constant name in the
  replacement.** With `x` declared `real`, the structural `x + 1` with `x`
  replaced by the structural `X + i` gave `X + (0 + 1i) + 1` in 0.168.0 and
  0.169.0: a declared symbol of a structural expression is bound, and its
  replacement was boxed canonically. It gives `X + i + 1` again, in the
  structural form. An undeclared `x` was not affected.
- **A function that reads a function declared with an `unknown` result
  compiles.** With `f` declared `(real | signed_infinity | nan) -> unknown` and
  assigned `x ↦ x + A cos(x) + d`, the compile of a function whose body reads
  `f` as a value (`g(t) := f'(t) + 1`) was refused: "the symbol 'f' that its
  body reads holds a value of type `(ceArg_0: unknown) -> number`". The check
  now reads the signature that the definition derives with the declared
  parameter types, `-> nan | real | signed_infinity`, which is the type
  `ce.assign()` accepted. A later change of the type of a symbol that `f` reads
  (`A` assigned `2i`) is still refused.

## 0.169.0 _2026-10-25_

### Behavior Changes

- **A finite range of integers and the list of its integers are the same element
  of a collection.** `Set(Range(1, 3), [1, 2, 3])` has one element, `[1, 2, 3]`
  is an element of `[Range(1, 3)]`, and `IndexOf`, `Unique`, `Tally`, `Union`
  and `Contains` treat the two as one. `Range(1, 3)`, `Range(1, 3, 1)` and
  `[1, 2, 3]` are the same for `isSame` and have the same hash. The rule applies
  to a range whose bounds and step are integer literals and that has at most
  10,000 elements. `Equal` is unchanged.
- **A range that is an element of a collection stays a range.** `[1..3, 4]`
  evaluates to `[Range(1, 3), 4]` (it was `[[1,2,3], 4]`), and
  `Tuple(Range(1, 3), 4)` to `(Range(1, 3), 4)`, so the value agrees with the
  type `tuple<range, integer>`. A symbol declared `list<range>` holds
  `[Range(1, 3)]` (it held `[[1, 2, 3]]`, which is not a list of ranges). The
  same applies to a `Set` element, a cell of a broadcast result
  (`g(s) = 1..s; g([2, 3])` is `[Range(1, 2), Range(1, 3)]`) and a spread
  element. A range on its own is unchanged, and `Length`, `At`, `Flatten`, `Sum`
  and `Map` give the same values. Other lazy elements, such as a `Map` or a
  comprehension, are still listed.
- **`LUDecomposition`, `QRDecomposition` and `CholeskyDecomposition` of a matrix
  of exact rational entries give exact factors under `evaluate()`.** The LU of
  `[[4, 3], [6, 3]]` is `([[0,1],[1,0]], [[1,0],[2/3,1]], [[6,3],[0,1]])` (the
  lower factor held `0.6666666666666666`), and the QR of `[[3, 4], [4, 3]]` is
  `([[3/5,4/5],[4/5,-3/5]], [[5,24/5],[0,7/5]])`. `.N()` and a matrix with a
  float entry still give floats, with the same permutation. A matrix with an
  exact entry that is not rational, such as `√2`, now stays unevaluated under
  `evaluate()` (it gave floats); `.N()` decomposes it. The result types state
  the exact cells: `rational` for the LU factors, `real` for QR and Cholesky.
- **The `R` factor of `QRDecomposition` has a non-negative diagonal** on the
  exact and the float route. The float route gave `R[0][0] = -5` for
  `[[3, 4], [4, 3]]`, with `Q` negated to match; it now gives `5`.
- **`CholeskyDecomposition` of a matrix that is not symmetric is the error
  `expected-symmetric-matrix`.** It read only the lower triangle, so
  `[[4, 0], [2, 3]]` gave a factor `L` with `L·Lᵀ = [[4, 2], [2, 3]]`. A float
  matrix that is symmetric within rounding error is accepted.
- **`Inverse`, `MatrixPower` and `Determinant` no longer claim `rational`
  cells.** A float that holds a whole number (`2.0`) is typed as an integer, so
  the claim was wrong for `Inverse([[2.0, 1], [1, 3]])`, typed
  `matrix<rational^(2x2)>` with float cells. The inverse of an integer matrix is
  now typed `matrix<real^(2x2)>`, and the determinant of a rational matrix
  `real`. The values do not change.
- **A type alias with no fixed point is refused when it is declared.**
  `ce.declareType('nn', '!nn', { alias: true })` throws the error
  `alias-without-fixed-point`, and the `DeclareType` and Epsil `type alias`
  routes give an `invalid-type-declaration` error. Recursive aliases such as
  `tree = list<tree> | integer`, and aliases that have a fixed point such as
  `!a | any`, are still accepted.
- **An Epsil program whose result is a finite comprehension gives a `List`.**
  `[do { k * 2 } for k in 1..3]` and
  `let xs = [if k > 1 { k } else { 0 } for k in 1..3]; xs` gave an unevaluated
  `Comprehension`; they give `[2, 4, 6]` and `[0, 2, 3]`. An infinite
  comprehension stays as it is.
- **`\operatorname{implies}` and `\operatorname{iff}` parse as `Implies` and
  `Equivalent`.** `p \operatorname{implies} q` was a product of the symbols
  `implies`, `p` and `q`. `\mathrm{…}`, `\text{…}` and `\keyword{…}` spellings
  of the two words parse the same way.
- **The type of a call checks the arguments against a declared signature on
  every route.** With `k` declared `(tuple<number, number>) -> number`, the type
  of a function whose body calls `k(3)` is `error`, as the value is; it was
  `number`. A list of points at a declared point parameter maps on that route
  too, so the derived type of `k(P)` is `list<number>`.

### New Features

- **A type handler can read whether the engine is strict.** The engine view that
  a `type` handler receives (`PureEngineView`) has a `strict` property, the same
  value as `ce.strict`.

### Resolved Issues

- **The structural form keeps a constant name as written again.** In 0.168.0,
  `ce.box(['Power', 'i', 2], { form: 'structural' })` gave
  `Power(Complex(0, 1), 2)`, `e` became `ExponentialE`, and `Half` became `1/2`,
  so `M(i) = i^2` read structurally had no parameter named `i`. A symbol whose
  canonical form is another expression (`i`, `ImaginaryUnit`, `e`, `Half`) now
  keeps its name and is unbound, typed `unknown`, as in 0.167.0. Every other
  symbol still binds to its definition: `["Add", "t", "t"]` with
  `t: tuple<integer, integer>` is typed `tuple<integer, integer>`. The canonical
  form and the value are unchanged: the canonical form of the structural `i^2`
  is `-1`.
- **A compile refused because a captured symbol changed type names that
  symbol.** The message gives the symbol and both of its types, for example "the
  symbol 'd' that its body reads has the type `real`, but the body of 'x_0' was
  typed when 'd' had the type `integer`".
- **A partial application keeps its argument inside a held operand.** With
  `f(a, b) := If(b, a[1] + a[2], 42)`, `f((1, 2))` gave
  `(_) => If(_, At(a, 1) + At(a, 2), 42)`, and applying it to `True` gave
  `a[1] + a[2]` instead of `3`. With `m(a, b) := a + b`, `m(b)` applied to `1`
  gave `2` instead of `b + 1`: the free parameter was renamed by name and
  captured the argument `b`.
- **The type of a call holds its value in more cases.**
  - The derived type of `At` is `error` for a base that cannot be indexed (a
    number, a boolean, a set, an interval), as the boxed `At` is. So with
    `h(a, t) := a[1] + a[2] + t`, the partial application `h(3)` is typed
    `error`, as its value is, not `(t: unknown) -> number`.
  - With `k` declared `(tuple<number, number>) -> number` and
    `U(L) := k(First(L))`, `U([[(1, 2), (3, 4)]])` was typed `number` for the
    value `[3, 7]`. A call whose argument is outside an inferred parameter type
    is now typed from the body.
  - A union of lists of points maps at a declared point parameter, so
    `Map(L ↦ k(L), [[(1, 2), (3, 4)], [(5, 6)]])` is typed `list<list<number>>`
    (it was `list<number>`).
  - The type of a call in the body of a function refuses a matrix at a declared
    `list<integer>` parameter, as the boxed call does.
- **A `Text` run whose words are a keyword round-trips through LaTeX.**
  `Text(p, "and", q)` was written `p\text{and}q`, which parses as `And(p, q)`.
  It is now written `p\text{{}and}q`, which prints the same and parses back as
  text.
- **An intersection with a `never` arm is a subtype of `never`.**
  `integer & never` was not a subtype of `never`, nor of itself, so
  `ce.declareType('q', 'integer & never', { alias: true })` threw
  `signature "(integer & never) -> integer & never" does not match`.
- **A product with a scalar factor of inferred or `unknown` type has `number`
  cells** (CE-481). `L·u` with `L: list<integer>` and `u` inferred `number` was
  `list<integer>` and is `list<number>`; `x ↦ a·x` with `a := [1, 2, 3]` was
  `(x: unknown) -> vector<integer^3>`, which did not hold `[0.5, 1, 1.5]`, and
  is `(x: unknown) -> vector<3>`.
- **A call over a captured symbol of type `unknown` no longer claims a scalar
  result** (CE-478). With `g := s ↦ 2s` and `f := t ↦ g(y)`, `f` was typed
  `(t: unknown) -> number`, and after `y := [1, 2, 3]` the value of `f(1)` was
  `[2, 4, 6]`. It is now `(t: unknown) -> any`, which holds a list, a tuple or a
  ragged list in `y`.
- **The signature of a function that calls itself from a `Map` callback holds
  its values** (CE-479). `m(n) := Map(x ↦ If(x < 1, 0, m(x − 1)), [n])` was
  `-> list<number>` (`m(1)` is `[[0]]`) and is `-> list<integer | list>`. The
  same holds for a mutually recursive pair, in either assignment order.
- **Epsil: a function called before a later `let` of a name its body reads is
  typed for both bindings** (CE-480). In
  `let a = g(); let i = 2; function g() { i^2 }`, `g` was typed
  `() -> integer<0..>` for the value `-1` (the first call reads the constant
  `i`); it is now `() -> number`.

## 0.168.0 _2026-10-25_

### Breaking Changes

- **The `complexPromotion` compile option is removed.** It was deprecated in
  0.115.0 as an alias of `mode: 'complex'`, with a one-time console warning. The
  option is no longer on `CompilationOptions`, `CompileTarget` or the options of
  `compile()`, and a JavaScript caller that still passes it gets no warning: the
  key is ignored and the compilation runs in the default `mode: 'auto'`. That
  mode promotes an unknown-sign `Sqrt`, `Ln`, `Log` or `Power` through the
  complex kernels, but unlike `mode: 'complex'` it does not treat every wide
  numeric binding as complex, so the emitted code and the reported `mode` can
  differ from what `complexPromotion: true` gave. Pass `mode: 'complex'` to keep
  the old behavior, or `mode: 'strict'` to forbid promotion.

- **The warning for the removed `realOnly` compile option is gone.** The option
  itself was removed earlier. A JavaScript caller that still passes the key no
  longer gets a console warning; the key is ignored.

- **Deprecated type aliases are removed.** Use the name on the right:

  | Removed                   | Use               |
  | :------------------------ | :---------------- |
  | `BoxedExpression`         | `Expression`      |
  | `SemiBoxedExpression`     | `ExpressionInput` |
  | `ExpressionComputeEngine` | `ComputeEngine`   |

  The three were identical to their replacements, so a rename is the whole
  migration.

- **The `fractionalDigits` serialization option is removed** from
  `toMathJson()`, `toLatex()` and the LaTeX number format
  (`JsonSerializationOptions`, `NumberSerializationFormat` and the options of
  `LatexSyntax`). Use `digits` instead: `fractionalDigits: n` becomes
  `digits: { fractional: n }`, and `'auto'` and `'max'` keep their names.

  With `toMathJson()`, the replacement gives the same output as before. With
  `toLatex()`, it does not:

  | Call                       | Before (`fractionalDigits`) | Now (`digits`) |
  | :------------------------- | :-------------------------- | :------------- |
  | π, `toMathJson`, 6 digits  | `3.141593`                  | `3.141593`     |
  | π, `toLatex`, 3 digits     | `3.141\ldots`               | `3.142`        |
  | `2.0`, `toLatex`, 2 digits | `2`                         | `2.00`         |

  `toLatex({ fractionalDigits: n })` cut the digits after the `n`th, wrote a
  `\ldots` marker when a digit was cut, and dropped trailing zeros.
  `toLatex({ digits: { fractional: n } })` rounds to exactly `n` digits after
  the decimal point and writes no marker. The `truncationMarker` option is now
  read only by the parser.

  An engine-wide `digits` (`ce.latexOptions = { …, digits: { fractional: 2 } }`)
  now applies to `.latex` and `toLatex()`, as an engine-wide `fractionalDigits`
  did. Before, only `fractionalDigits` was read from the engine-wide settings.

  A standalone `LatexSyntax` serializer (one used without an engine) now accepts
  `digits`, in its constructor and per call:
  `new LatexSyntax({ digits: { fractional: 3 } })` writes
  `{ num: "3.14159265" }` as `3.142`. It rounds a float and writes an exact
  number in full. With `"auto"` or `"max"` it writes every digit, since it has
  no engine precision to round to.

- **A bare number is no longer a `digits` value.** `toLatex({ digits: -4 })` and
  `toMathJson({ digits: 6 })` were accepted at runtime, although the
  `DisplayDigits` type does not allow a number: `n ≥ 0` meant
  `{ fractional: n }` and `n < 0` meant `{ significant: -n }`. Such a call now
  throws an error that names the accepted values, in `toMathJson()`, `toLatex()`
  and a standalone `LatexSyntax`. An invalid `digits` set on `ce.latexOptions`
  throws when it is set. Write `{ fractional: n }` or `{ significant: n }`.

- **The `canonical` option of `replace()` is removed.** Use `form`:
  `canonical: true` becomes `form: 'canonical'`, `canonical: false` becomes
  `form: 'raw'`, and a canonical form or a list of forms is passed to `form`
  unchanged.

- **The `broadcast()` batch body is built on request** (ROADMAP CE-423, user
  decision 2026-10-25). Since 0.166.0, `compile()` of an expression that reads a
  shared list of numbers at a scalar index (`F_{i+1}` with `F: list<number>`)
  also compiled the batch body that makes `broadcast()` up to 15 times faster, a
  second compilation of the same size as the first (about 45 % of the compile
  time of such a kernel). It is now compiled only with
  `compile(expr, { broadcast: true })`. Without the option the result has no
  `batch` field, and `broadcast()`, `broadcastAsync()` and a kernel worker run
  the ordinary body for every cell, with the same values. A caller that
  broadcasts such a kernel over many cells passes the option; a caller that only
  calls `run()` saves the second compilation. A consumer that reads both `run()`
  and `broadcast()` from one result (Tycho's plot rows) passes the option at its
  compile site, or its implicit plots lose the 0.166.0 speed.

- **A product written by juxtaposition now types its symbols as numbers**
  (ROADMAP CE-32). `ce.parse('2t')`, `ce.parse('x y')` and
  `ce.box(['InvisibleOperator', 2, 't'])` left a symbol with no value and no
  declaration `unknown`, where `2\cdot t` types it `number`. They now type it
  `number` too. The product itself (its factors, their order and its LaTeX) is
  unchanged, and a function application such as `f(x)` keeps its reading. Types
  derived from such a product change: `t ↦ (t, 2t)` is
  `(unknown) -> tuple<number, number>` (it was
  `(unknown) -> tuple<unknown, number>`) and `t ↦ [t, 2t]` is
  `(unknown) -> vector<2>`. The inferred type stays for the lifetime of the
  engine, so in an engine used for several expressions, a symbol used as a
  factor is a number in later expressions: after `\mathrm{B}x`,
  `\mathrm{B}(x+1)` is a product, and after `EG`, `x \in G \setminus H` reports
  an error, as it already did after `E\cdot G`. Use a fresh engine, or declare
  the symbol, when a name has two roles.

- **Compiled Python reads a `None` input as `NaN` in arithmetic** (ROADMAP
  CE-395 and CE-460, user decisions 2026-10-25). `None` is the Python spelling
  of `Missing`; `p + 1`, `1 / p`, `np.sin(p)` and `r^2 + 1` raised `TypeError`
  for it, and now give `nan`, as the interpreter and compiled JavaScript do. The
  conversion applies to an input whose type admits `missing`
  (`number | missing`, `any`), is `unknown` (a free symbol of a parsed
  expression, `r` in `2\pi r`), or was inferred as `number` (`r` in `\sin(r)`).
  The generated code changes for those inputs: each read is
  `(float('nan') if r is None else r)`, which costs about 6 to 15 % in a hot
  loop. An input declared `number` (`ce.declare('r', 'number')`) compiles to the
  same code as before and pays nothing; declare an input to keep the previous
  code. A comparison still reads the absent value (`p ≠ 0` stays undecided). A
  `vars` source that is a number literal is not wrapped.

### Resolved Issues

- **A float plus a fraction was written as a mixed number** (CE-471).
  `["Add", {"num": "2.0"}, ["Rational", 1, 3]]` was written `2.0\frac{1}{3}`,
  which reads back as a product (0.666…). It is now `2.0+\frac{1}{3}`.
  `Add(2, 1/3)` is still `2\frac{1}{3}`.
- **A point function with a second argument was typed `any`** (CE-469). With
  `f: (broadcastable<tuple<real, real>>, tuple<real, real>) -> real`,
  `f([[(1,2),(3,4)],[(5,6),(7,8)]], (1,1))` is typed `matrix<real^(2x2)>`, and
  `f((1,2), (1,1))` is `real`.
- **A function literal with a rest parameter is accepted as a callback.**
  `Map((a, ...xs) => …, …)` was refused with a `callback-arity` error that
  counted the rest parameter as required.

- **The interval target wrote a constant list out one term per element at any
  width**, and `Max`, `Min`, `Sum` or `Reduce` over a list of 2,000 numbers
  overflowed the stack of the compiler. A list wider than 100 numbers is now one
  table read at run time: `Sin(x + 4·L)` over 2,000 numbers compiles to 135
  characters, where it was 60,876.
- **Compiled `Reduce` and `Scan` used the library kernel for a combiner that
  only had the same name.** With a user-declared `Max(a, b) = 2a + b`,
  `Reduce([1, 2, 3], Max)` compiled to `Math.max` and gave 3, where the
  interpreter gives 11; the same held for a parameter or a block-local function
  named `Max`, for a `Max` given in the `functions` option, and on the Python
  and interval targets. Such a fold now takes the route of a custom combiner or
  declines.

- **A function literal that passes a list to a function with an inferred point
  parameter was typed `-> error`.** With `d(a) := a[1] + a[2]`, `x ↦ d([x, x])`
  is now typed `(unknown) -> number`; it evaluates. A signature that the engine
  inferred is not a contract, so the derived type of a call no longer checks the
  arguments against it. A call that passes a list of lists there is typed from
  the body: `d([[1, 2], [3, 4]])` evaluates to `[4, 6]` and is now typed
  `vector<integer^2>`, not `number`. Compiled code accepts a number or a list of
  numbers at such a parameter (`d(S(x), [1, 1])` on interval-js), and the
  message of a call that still fails says whether the point type was inferred or
  declared.

- **The type of a broadcast over a list whose elements have different ranks
  repeated an element arm.** `M + C` with `M: list<list<integer> | number>` and
  `C: broadcastable<number>` was typed
  `list<list<integer> | list<list<integer> | number> | number>`; an arm that
  another arm holds is now dropped, and a union inside the element union is
  flattened: `list<list<list<integer> | number> | number>`.

- **Compiling nested `Sum` and `Product` was exponential in the nesting.** The
  unrolled form of a clause is now limited to 10,000 nodes in total, and a
  larger clause is emitted as a loop:
  `Σ_{a=1}^{60}Σ_{b=1}^{60}Σ_{c=1}^{60} abcx` compiled in 12.7 s to 18 MB of
  code, and now in a few milliseconds. A body shared by a `Sum` and a `Product`
  at each of 10 levels compiles in 1.7 s instead of 55 s.

- **Compiled Python gave another absence value than the interpreter for an
  element read of an absent tuple.** With `b: list<tuple<number, string>>` and
  `b = []`, `At(At(b, 1), 1)` was `None` (`Missing`); it is now `nan`, as in the
  interpreter. A read past the end of a tuple with an `unknown` slot picks the
  value from the elements, as the interpreter does.

- **Compiled `Last` declined an operand that `First` compiles**, such as
  `At(tup(x), 1)` with `x: any`. It now compiles as `At(…, -1)`.

- **The ASCII `toString()` of a `Limit` left out the variable**: `lim_(a) …`. It
  now prints `lim_(x -> a) …`.

- **`NLimit` of a function that decays to `0` gave a tiny residue** such as
  `−2e-22` for `7t/(t² + 9)` at infinity. A result whose magnitude is below its
  error estimate is now extrapolated again with a tighter tolerance and snapped
  to `0` when it stays below the estimate; a small true limit such as
  `1e-20·(1 + 2/t)` is kept.

- **`simplify()` did not collect like terms of a numerator over a sum
  denominator**: `(t − t + 1)/(y + z)` stayed as written; it is now `1/(y + z)`.

- **`simplify()` did not collect constant cofactors of like terms**:
  `π(√2 − 1) + π(√2 + 1)` is now `2π√2`, so the integral
  `∫ (x² − 1)/((x − 1)(x⁴ + 1)) dx` over the real line gives `π/√2`.

- **Infinite sums and products**: a two-term body whose second term is not a
  `Negate` now telescopes (`Σ 1/(k+x) − 1/(k+x+1)` from `1` to `∞` is
  `1/(x+1)`); `evaluate()` and `.N()` now give the limit of a divergent or
  vanishing infinite product of a rational body (`Π k` and `Π (k+1)/k` are `+∞`,
  `Π k/(k+1)` is `0`); the shifted-factorial rule no longer simplifies
  `Π_{k=1}^n (k − 3)` to `0`.

- **An unevaluated `Solve` from a parse kept `InvisibleOperator` and `Delimiter`
  in its MathJSON.** It now holds the canonical equation, so the parse route and
  the box route give the same result.

- **`simplify()` of `−(2·4·…·2n)` distributed the sign into the product** and
  folded it to `−16·…·n`. An ellipsis product is no longer expanded, and
  `−(1 + 2 + … + n)` keeps its pattern order.

- **`Map(x ↦ x + 1, [[(1, 2)], Missing])` gave `[NaN, NaN]`.** The first cell is
  now a list holding the `incompatible-type` error, as without the `Missing`.

- **`Mean`, `Median`, `Variance` and `StandardDeviation` of an exact `Range`
  under `.N()`** walked the float range and gave `-8.50000000000000060577` for
  `Mean(Range(-17, 0, 1/3))`. They now read the held operand and use the closed
  form: `-8.5`.

- **The display preview of an unevaluated `Dedup`, `Reverse` or `Filter` of a
  string-typed symbol printed a list**, while the value was a string. The
  preview now evaluates its source.

- **A base case assigned in a closure could record a pending sequence definition
  under a discarded scope**, which stayed in the map and in every checkpoint. A
  discarded scope is now skipped.

- **A qualified call on an unknown protocol name**
  (`Comparable.compare("a", "b")` with `Comparable` undeclared) gave an arity
  error. It now gives a `protocol-unknown` error that names the symbol.

- **`IdentityMatrix(n)`, `ZeroMatrix(2, n)` and `OnesMatrix(n)` with a symbolic
  extent** gave an `expected-positive-integer` error; `Kernel(n)` for a
  valueless `n: integer` gave `[]`; `Shape(m)` for an unassigned
  `m: matrix<integer>` gave `(-1, -1)`, and `Shape(q)`/`Rank(q)` of a free
  symbol gave `()`/`0`. Each now stays unevaluated.

- **`Sum(Rest(g(3)))` and `Reduce(Rest(g(3)), Add, 0)` with `g(t) = [t, 2t]`
  stayed unevaluated.** A lazy view over a held call is now resolved before the
  reduction; `Most`, `Reverse`, `Filter` and `Join` over `g(3)` too.

- **The entry type of a declared open record left out its undeclared fields**,
  so `FlatMap(ra, x ↦ [At(x, 2)])` with `ra: record{a: integer}` holding
  `{a: 1, b: Missing}` was an `incompatible-type` error. A declared record now
  reads `tuple<string, any>` entries and `Values(ra)` is `list<any>`; a
  dictionary literal keeps its field types.

- **`Tabulate(w, 3)` with `w` holding an error** gave three copies of the error;
  it is now the error once, as `Map(w, …)` is.

- **Static types that did not hold the value of the expression.** In each case
  the type is now a type of the value:
  - `Length([1, Error("x")])`, `Count` and `IsEmpty` over a list with a failed
    cell were typed `error` for the value `2`; `First`, `Last`, `At`, `IsError`,
    `Element`, `Contains` and `IndexOf` over such a list are now `unknown`, and
    `Sin([1, err, 3])` and `[1, err, 3] + 1` are typed as lists over the valid
    cells.
  - `PointY([(1, Missing), (2, 3)])` keeps its length:
    `list<integer | missing^2>`.
  - A type derived from operand descriptors now refuses what boxing refuses:
    `derive('Add', [string, integer])` is `error`, so
    `Map((a, b) ↦ a + b, ss, ys)` over strings and integers is `list<unknown>`;
    `Simplify(Sin(r)·P)` with `P: boolean` is `error`; `Sin` over a
    `list<string>` is `error`.
  - `Map(Abs, [1, Missing, 2])` and `Map(Negate, …)` are
    `list<integer | nan^3>`, as the lambda form is; `Abs(w)` with `w: nan` is
    `nan`.
  - An undeclared self-recursive numeric function
    (`fact := n ↦ If(n ≤ 1, 1, n·fact(n − 1))`) is typed `(unknown) -> number`,
    as when declared.
  - A conditional with a branch typed `unknown` from a parameter is typed
    `unknown` instead of by its other branch:
    `f := (n, s) ↦ If(n = 0, s[1], [1, 2])` applied to `(0, [7])` gives `7`,
    which `vector<integer^2>` did not hold.

- **A component read of a tuple local did not type the parameter**:
  `g(s) = do { let q = (s, 0); take(q[1], 2) }` applied to `[1, 2, 3]` gave
  element-wise errors. `q[1]` now aliases `s`, which is read as a list.

- **`\keyword{if} x > 0 \keyword{then} x` without `else`** parsed to text next
  to the operands and reported no error. It now parses to the two-operand `If`,
  which is `Missing` when the condition is false, and it stops at an outer comma
  or semicolon.

- **`\int dx` and `\int (dx)` were an `unexpected-command` error.** They now
  parse to `Integrate(1, x)`.

- **LaTeX parser cases that were marked `@fixme`**: a chained `\over`
  (`1\over 2\over 3`) now gives a `non-associative-operator` error, as TeX
  rejects it; `\tan(90-0.000001)\degree` applies the degree sign to the
  argument; a differential inside a denominator (`\int\frac{3x}{5dx}`, also
  inside a sum, a product or a function argument) gives an
  `unexpected-differential` error.

- **The compiled `Map` element function found the functions its callback calls
  by name in the drain scope.** With an outer `h(x) = sin(x) + 1.5`, a callback
  `f(x) = N(h(x))` and a block that declares `h(x) = sin(x) + 2.5`, the compiled
  sum used the inner `h`. The callees of a named or literal callback are now
  resolved through the callback's lexical binding, and the drain falls back to
  the interpreter when they differ.

- **A sum or product with one bound** (`\sum_{k=1} k`) failed to compile with a
  message about `Nothing`; it now declines on every target with a message that
  says the form has no value.

- **Python target: `Power` with a float exponent** was emitted as `t ** 0.3` in
  `auto` mode while the analysis read it as promoted. It is now
  `np.emath.power(t, 0.3)`, as the analysis says.

- **Shader targets: a trigonometric argument with a constant term that calls a
  library function** (`\sin(x + \Gamma(20))`) was not reduced by whole periods,
  so its float32 value was far from the JavaScript value. A pure constant term
  is now folded for the reduction unless it reaches a function mapped through
  the `functions` option or a `vars` input.

- **Compiled JavaScript gave another absence value than the interpreter for an
  element read of an absent tuple.** With `tup := t ↦ (t, 2t)`, `x: any` and
  `x = []`, compiled `At(At(tup(x), 1), 2)` gave `Missing`; it now gives `NaN`,
  as the interpreter does. The compiled code now takes the value from the slot
  types of the tuple, so a slot typed `unknown` is no longer read as a number
  (`Missing`, not `NaN`), and a numeric slot of `tuple<number, string>`, or a
  position outside the tuple, gives `NaN`.

- **Compiled JavaScript over a symbol declared `any` that holds a list** gave
  wrong values: with `p = [1, 2]` and `q = [3, 4]`, `p + q` was the string
  `"1,23,4"`, `p·q` was `NaN`, `Max(p, q)` was `NaN`, and `p < q` was one
  boolean. Such an operand is now tested at run time, and a list takes the list
  code (`[4, 6]`, `[True, True]`, `4`). A value that is not a list runs the same
  code as before, and other types are not affected. `Multiply` and `Power` of
  such a list are entry-wise, as for a bare `list`.

- **Compiled `PointX`, `PointY` and `PointZ` of a value that is not a point** (a
  number, a boolean, a string) gave `NaN`. They now throw a `RangeError`, as the
  interpreter gives an `incompatible-type` error. An absent value or `NaN` still
  gives `NaN`.

- **The type of a call that maps a function with a list result over an operand
  of unknown depth did not hold its value.** With `h := (t: number) ↦ [t, 2t]`
  and `x: any`, `h(x)` was typed `broadcastable<vector<2>>`, which does not hold
  the list of matrices that `x = [[1, 2], [3]]` gives. It is now
  `R | list<R | list<any>>` over an operand of a top type and
  `R | tensor<cells of R>` over a tensor operand (`R` is the result for one
  element). A function with a boolean, string or tuple result over an operand
  typed `any` is typed the same way. A compiled `Max` or `Min` of `h(x)[1]` now
  declines, as for any operand that may hold `Nothing`.

- **interval-js: `≠` with an operand that has no value over the whole cell**
  (`\sqrt{x} \ne 0` over `x = [-1, -1]`) gave `'maybe'`. It now gives `'true'`,
  as the interpreter and the other targets give `True` for `NaN ≠ 0`.

- **`.N()` did not check a value assigned to a callback parameter.** The
  parameter of a `Map` callback is typed from the source elements, and
  `evaluate()` refuses an assignment of another type. Under `.N()`,
  `evaluate({numericApproximation: true})` and `N(…)`, the check was skipped:
  `Map(q ↦ (q := q + 0.5; q + 1), 1..3).N()` gave `[2.5, 3.5, 4.5]`, and a list
  or a string was accepted too. It now gives an `incompatible-type` error for
  each element, as `evaluate()` does.

- **Static types that did not hold the value of the expression.** In each case
  below the type of the expression was not a type of its value; it now is.
  - `Map(g, t)` with `g := x ↦ x + 10` and `t := ([1, 2], 3)` is typed
    `list<number | vector<2>>` (it was `list<number>`, for the value
    `[[11, 12], 13]`) (CE-5). A function literal with an untyped parameter over
    a `list<any>` gets a `list<any>` arm in its result: `(x ↦ (x, x))(A)` is
    `list<list<any> | tuple<…>>` (CE-16).
  - `(1, 2) + q` and `(1, 2)·q` with `q: unknown` have `number` components (they
    kept `integer`, and the value for `q = 0.5` is `(1.5, 2.5)`) (CE-373).
  - With `tv: tuple<number, number> | vector<number^2>`, `Sin(tv)`, `Sqrt(tv)`
    and `Power(tv, 2)` are typed `tuple<number, number> | vector<2>` (they were
    `number`) (CE-7).
  - `Sort(tu)` with `tu: tuple<unknown, missing> := (1, Missing)` is typed
    `list<missing | unknown>` (it was `list<missing>`) (CE-3).
  - A tuple whose coordinate is a list with a failed cell has the same type
    inside a list as alone (it was `error` inside a list) (CE-367).
  - A `Fold` whose body assigns its accumulator is typed `unknown`, not from its
    seed alone (CE-11).
  - `Any` and `All` are typed `boolean | missing` when a cell can be absent:
    `Any([1, Missing], x ↦ x > 2)` evaluates to `Missing` (CE-8).
  - With the alias `cyc = cyc | list<integer>` and `k: cyc := [1, 2]`,
    `Map(x ↦ x + 10, k)` is typed `list<integer>` and evaluates to `[11, 12]`.
    It was typed `collection<integer>` and evaluated to `Set(11, 12)` (CE-31).
  - `If(c, 1, 0)` with `c` of unknown type is typed
    `integer | list<integer | list<any>>`: `c` can hold a mask. A condition that
    can be undecided (`[1, 2] = [1, Missing]`) adds `missing` to the type of
    `If` and `Which` (CE-22).
  - `MatrixMultiply` of two vectors is typed as a scalar (`integer` for integer
    vectors). A lazy `IdentityMatrix(101)` is typed `matrix<integer^(101x101)>`,
    and `Tabulate` with literal extents has a shape. `TrigExpand`, `TrigToExp`
    and `TrigReduce` of `Missing` or of an untyped symbol keep the operand's
    type, not `value` (CE-39).
  - With `f(n, s) = s if n == 0 else f(n - 1, [1, 2])`, `f(1, [0])` keeps the
    declared result; it was typed `vector<integer^1>` for the value `[1, 2]`
    (CE-34).
  - `ce.box(expr, { form: 'structural' })` binds symbols to their definitions,
    as `ce.function()` does: with `t: tuple<integer, integer>`, `Add(t, t)` is
    typed `tuple<integer, integer>` (it was `unknown`) (CE-29).

- **More precise static types.**
  - An operand that may be absent adds `nan` to a numeric result type, instead
    of widening the type to `number`: `Length(At(xs, 1))` is
    `integer | nan | signed_infinity`, and `Sin(m)` with `m: real | missing` is
    `nan | real` (CE-41). `[-2, NaN, Missing]` is typed
    `list<integer | missing | nan^3>`.
  - `v / g(1)` with `v: vector<integer^2>` and an integer-valued `g` is typed
    `vector<rational^2>`, as the tuple route gives (CE-59).
  - A list literal of points of different tuple types keeps its length:
    `[(1/2, 1), (~oo, ~oo)]` is `list<(tuple<…> | tuple<…>)^2>` (CE-28).
  - `First(Rest(xs))` and `First(Take(xs, 2))` over a list literal have no
    absent member, and a numeric position proved not to exist
    (`At([7, 8, 9], 99)`) is typed `nan` (CE-42).
  - `Map(Sqrt, x)` over a union of vector types is typed arm by arm, and
    `Map(Add, xs, ys)` over two `list<integer>` is typed `list<integer>` (it was
    `list<value>`) (CE-31, CE-45).
  - An undeclared self-recursive function that builds a list is typed
    `-> list<number>`, and so is a declared mutually recursive pair (they were
    `collection<number>` or `-> unknown`) (CE-37, CE-38).
  - `Simplify` and the other lazy operators type the operands of a held
    application from their bindings (CE-40).
  - `assume(t ∈ ExtendedRealNumbers)` types `t` as `real | signed_infinity` (it
    left `t` typed `unknown`); the other extended sets work the same way
    (CE-50).
  - `q: integer := uu`, with `uu` an undeclared symbol, narrows `uu` to
    `integer` (CE-39).

- **Arguments and values that were admitted and now are refused when boxed.**
  - `g(S)` with `g: (integer) -> integer` and `S: list<string>` (declared, no
    value) is an `incompatible-type` error, and so is `f(S)` with
    `f: (matrix<2x2>) -> integer`. `h(S)` with `h: (list<integer>) -> integer`
    stays valid, because the empty list is a value of both types (CE-24).
  - `Map(h, s)` with `h: (T) -> T where T: number` and `s: list<string>` is
    refused; it failed on each element (CE-30).
  - `Q + M` with `Q` a list of lists of points and `M` a list of lists of
    integers is one `incompatible-type` error, not a nested list of errors
    (CE-28).
  - After `ce.declareType("Row", "vector<integer^3>", {alias: true})`,
    `ce.declare("R2", "list<Row^2>")` is refused with the same message as
    `list<vector<integer^3>^2>` (CE-17).

- **A value-bounded type variable accepts its own literal** (CE-52). With
  `f: (x: T) -> T where T: 5`, `f(5)` is typed `5`; it was an
  `incompatible-type` error. In the same way `where T: real<0..10>` accepts
  `g(3)`.

- **Setting `.value` follows the rules of `ce.assign()`** (CE-49). `n.value = 5`
  types `n` as `integer` (it stayed `unknown`), a value that does not fit a
  declared type is refused, and `m.value = "hi"` on an inferred `integer` symbol
  changes the type as `ce.assign` does (the type stayed `integer`). On a boxed
  symbol whose name a nested scope declares again, the setter writes the
  symbol's own binding, not the inner one.

- **A destructured local aliases the parameter it came from** (CE-35).
  `g(s) = do { let (a, b) = (s, 0); take(a, 2) }` gave three `incompatible-type`
  errors for `g([1, 2, 3])`; it gives `[1, 2]`.

- **A value-bound function with a declared effects contract refuses a rebuild
  that makes it effectful** (CE-62). With `g: (number) pure -> number` bound to
  `x ↦ 2h(x)` and then `h := x ↦ x + Random()`, the body of `g` was silently
  rebuilt into a random call; the rebuild now throws `EffectContractError` and
  keeps the old body.

- **Epsil: an alias of a binding that holds a function literal is checked like
  the binding** (CE-61). After `let k = (n: integer) => n + 1` and `let g = k`,
  `g(1.5)` is reported by the static check, as `k(1.5)` is.

- **A float coefficient times a power of a reciprocal was written with a factor
  `1\times`** (CE-439). `Multiply(0.5, y, Power(Divide(1, x), 2))` was written
  `\frac{1\times0.5y}{x^2}`, and its prettified MathJSON had the numerator
  `["Multiply", 1, 0.5, "y"]`. The numerator of `1/x` is `1`, raised to the
  power 2, and the split of the product into a numerator and a denominator kept
  that `1^2` as a factor, which does not fold with a float coefficient. It is
  now `\frac{0.5y}{x^2}`. A long numerator over a single power of `x` is still
  written with a solidus, `(0.5\vert x\vert x^{n})/x^2`, as before.

- **The LaTeX of a function whose parameter is `_1` showed an empty parameter
  list** (CE-417). `["Function", ["Divide", "_1", "n"], "_1"]` was written
  `()\mapsto\frac{\operatorname{\_1}}{n}`, which looks like a function of no
  argument. A function literal whose parameters are the wildcards of its body
  now writes them: `\operatorname{\_1}\mapsto\frac{\operatorname{\_1}}{n}`, and
  `(\operatorname{\_1}, \operatorname{\_2})\mapsto\operatorname{\_1}+\operatorname{\_2}`
  for two. Both read back as the same function, as before. A body that uses a
  bare `_` keeps `()\mapsto`.

- **The type of a call whose argument may be absent did not hold the value of
  the call** (CE-422). The type of a call of a user function is derived from its
  body, a second time with the parameter typed `missing` when the argument may
  be absent. The parameter is now typed as the call binds the absent value. With
  `P: tuple<number, number> | missing`:
  - At a parameter declared `broadcastable<tuple<number, number>>`, a string, a
    boolean or a list, an absent argument is an `incompatible-type` error, and
    it adds nothing to the type. With `f := a ↦ (a.x + 1, a.y + 1)`, `f(P)` was
    typed `tuple<missing, missing> | tuple<number, number>` and is now
    `tuple<number, number>`, as at a parameter declared `tuple<number, number>`.
  - At a parameter declared `real` or `integer`, the absent value is read as
    `NaN`. With `f := a ↦ (a, 1)` and `f: (real) -> unknown`, the call was typed
    `tuple<real, integer>`, and its value `(NaN, 1)` did not fit. It is now
    typed `tuple<nan, integer> | tuple<real, integer>`, and `f(Missing)` is
    typed `tuple<nan, integer>` (it was `tuple<missing, integer>`).

- **Compiled `Digamma`, `Trigamma` and `PolyGamma` gave `NaN` at a pole.** The
  interpreter answers `~oo` at a non-positive integer, and compiled code spells
  that pole `Infinity`, as it does for `Gamma`. With a variable argument the
  compiled JavaScript gave `NaN`; it now gives `Infinity`. Compiled
  `PolyGamma(-1, x)` gave `NaN`; it is now `LogGamma(x)`, as in the interpreter,
  for x > 0 and at a pole.

- **The GPU `LerchPhi` and `PolyLog` gave ±Infinity for some finite values** at
  a large negative order, for example `Φ(−0.5, −30, 10) = 8.0e28`. They now give
  the value.

- **The colour reference showed wrong results.** `Color` returns an `Oklch`
  expression, not a tuple, and `ColorFromColorspace` returns the colour
  expression of its space (`Hsl(0, 1, 0.5)`). `doc/86-reference-colors.md` now
  shows the real results.

- **GLSL and WGSL: a product with a derivative or with a one-operand function
  lost its grouping.** `3·h'(x)` with `h(x) = x³ + sin x` compiled to
  `9.0 * (x * x) + cos(x)`, not `9x² + 3cos x`, and `3·Binomial(x + 1, 1)`, and
  `ElementMax`, `ElementMin` or `Median` with one operand, compiled to `3x + 1`.
  The substituted body is now in parentheses, so the code of a derivative at the
  root is also in parentheses, for example `(-sin(t))`.

- **GLSL and WGSL: `Oklch` and `Oklab` with an infinite or NaN channel** gave
  the raw channels. They now give the NaN colour, as compiled JavaScript does.

- **WGSL: `ContrastingColor` with a tuple background and colour candidates**
  (`ContrastingColor((u, 1, 1), Rgb(1, 0, 0), Rgb(0, 0, 1))`) declined. It now
  compiles, as on GLSL.

- **GLSL: a loop-invariant declaration that no code reads** is no longer
  emitted.

- **Compiled Python: `And`, `Or` and `Not` over a list of booleans** read the
  list as one truth value (`And(L, q)` gave `True` for `L = [True, False]`).
  They are now computed element by element, as in the interpreter. Other list
  shapes are not compiled.

- **Compiled Python: `\arg(x - iy)` at `y = 0`** gave −π for a negative `x`. It
  now gives π, as the interpreter does.

- **Compiled Python: a string at a parameter of a list type** was read as a list
  of code points, so `Length` counted `"e\u0301x"` as 3 where the interpreter
  counts 2 characters. The compiled function now refuses a string there with a
  `TypeError`, as compiled JavaScript does.

- **A one-operand `Subtract`, `ElementMax` or `ElementMin` from raw MathJSON**
  compiled to a wrong value: `3·Subtract(x + 1)` was `3 * (-x + 1)`, and
  `3·ElementMax(x + 1)` was `3 * x + 1` on Python. A one-operand `Divide` or
  `Power`, and a `Clamp` with fewer than three operands, gave invalid code or
  `NaN`. They now compile to the operand, or are not compiled, as the
  interpreter gives an error for them.

- **Compiled `Max` and `Min` of a nested list of unknown type** gave `NaN`
  (`Max(g(x)[1], 1)` with `g := t ↦ [t, 2t]` and a matrix element). They now
  flatten every level, as the interpreter does.

- **Compiled JavaScript added a number to a point**: `At(P, 1) + 1` with
  `P: broadcastable<tuple<number, number>>` gave `[4, 5]`, where the interpreter
  gives an `incompatible-type` error. It is now not compiled.

- **A compiled power with a list exponent with a fractional cell** gave `NaN`
  for a negative base (`p^[2, 0.5]` for `(-4)^0.5`). It now takes the complex
  lane, as a scalar exponent does, and gives `2i`.

- **A compiled `Root` whose degree is known only at run time** (`Root(p, 3)`
  over a list, or `Root(x, n)`) gave `NaN` for a negative radicand. It now gives
  the real root where the interpreter does (`Root(-8, 3)` is `-2`).

- **A compiled complex function of `NaN`** (`√` of a sum with an absent cell)
  gave `{re: 0, im: NaN}`. It now gives `NaN`.

- **A compiled user function read a free name of its body in the scope of the
  compilation.** With a global `a := 2`, `G := x ↦ x + a`, and `a` assigned 1000
  in a new scope, compiled `G(1)` gave 1001; the interpreter gives 3. Compiled
  code now declines a call whose body reads a name that the scope of the
  compilation binds to a different definition.

- **`vars: { g: '…' }` did not replace a user function `g`** at its calls in
  compiled code. It now does, on JavaScript and interval-js. On GLSL and WGSL a
  `vars` entry names a uniform, which cannot be called, so a user function keeps
  its own definition there; the `functions` option replaces it.

- **A list of points at a parameter with no type annotation** declined, and two
  forms gave the string `"1,21"`: a list held by a `let` local at a point
  parameter, and the same call of a function assigned in the engine. They now
  compile and give the interpreter's value.

- **Compiled arithmetic on a function value** (`g + 1` with a block-local `g`)
  gave a string or `null`. It is now not compiled.

- **Compiled code did not check some parameter types.** An argument at a `list`
  or `tuple` parameter is now tested for its shape, and the arguments of an
  annotated function literal applied directly are tested too; a failed test
  gives `NaN`, as the test of an `integer` parameter does. An assignment to a
  typed parameter of a value outside its type is now not compiled.

- **`freeSymbols` listed names that the program binds**: a library function
  passed by name (`reduce(1..20, lcm, 1)`), the index of a comprehension read by
  its condition, and the names of a destructuring loop index. The compiled Epsil
  programs that read them now run.

- **Evaluating a dictionary that holds the same dictionary under several keys**
  took exponential time (30 levels did not finish in 25 s). Each shared value is
  now evaluated once: 30 levels take about 1 ms.

- **A compiled power read a symbol in its exponent as unknown.** With `k = 1`,
  `y^{k/2-1}` stayed on the real lane and gave `NaN` for a negative `y`, where
  `y^{-1/2}` gives the complex value. The value of an assigned symbol in the
  exponent is now used, so the two forms agree; the interpreted integral of such
  an integrand is complex too. A free symbol keeps the real lane.

- **A compiled ordering with a constant pole** (`x < 1/0`, `x < (-1)!`) was
  `true` at `x = 1`, because `1/0` compiled to IEEE infinity. The interpreter
  gives `False`, and compiled code now does too, on every target.

- **`When(v, C)` with a mask of rank 2 or more** now selects cell by cell at
  every level, as `If` and `Which` do, in the interpreter and in compiled code.
  Before, compiled JavaScript read each row as one condition and gave
  `[NaN, NaN]`, and the interpreter kept the `When` unevaluated.

- **A compiled selection whose arm is a point or a list of points** read one
  point as a list. One point is now lifted whole, as in the interpreter.

### Improvements

- **A comparison over a string or a tensor of strings**
  (`S: broadcastable<string>`, `matrix<string>`) compiles again on JavaScript.

- **`When(B, B < 0)` with `B: broadcastable<number>` compiles.**

- **`mode: 'complex'` compiles an operand that may be a number or a list**
  (`broadcastable<number>`, `number | list<number>`). Before, it declined.

- **A function declared with a real result stays on the real lane** in
  `mode: 'complex'` when its definition is emitted, and when it reads an
  assigned value that is complex only by promotion.

- **Compiled code calls a function returned by a call**: `let a = mk(2)` then
  `a(1)`, when `mk` returns a function literal on every path.

- **interval-js compiles an index into the tuple that a block-local function
  returns** (`At(f(x), 1)` with `f := (u) ↦ (u + 1, 2)`).

- **Compiled Python: `Equal` and `NotEqual` with one list of numbers** compile
  to a list of booleans, as the interpreter answers. Before, they were not
  compiled.

- **Compiled Python: a function defined in a block** (`const h = (k) => k + 1`,
  `function h(k)`) can be called when its arguments are numbers, booleans or
  strings.

- **GLSL and WGSL: `Mod(v, 1)` and `2^v` over a vector** compile to `fract(v)`
  and `exp2(v)`. Before, these forms applied to a scalar only.

- **GLSL and WGSL: `GCD` and `LCM` of any number of operands**, a vector or a
  literal list included, compile as a fold over the components. Before, `GCD`
  took exactly two scalars and `LCM` did not compile.

- **GLSL and WGSL: a `Match` whose case body holds a loop-form `Sum` or
  `Product`** compiles to an `if … else` chain. Before, it declined.

- **GLSL and WGSL compile `Digamma`, `Trigamma` and `PolyGamma`** (order 0
  to 24) of a real argument. Before, these heads fell back to the interpreter
  (#340). The relative error in float32 is about 1e-6 for `Digamma` and
  `Trigamma` and 1e-5 for `PolyGamma`.

- **The GPU `Zeta(s)` answers down to s = −63.** It answered `NaN` below s =
  −24.5.

### New Features

- **`epsil --workers <n>`** (also in the REPL and in `epsil mcp`) gives the
  engine a pool of `n` worker threads (at most 256) and runs each program
  asynchronously, so a `findFit` with a global search scans on the workers and
  gives the same values. Without the option, nothing changes. `--workers auto`
  picks the default pool size (the count of cores minus 1, from 1 to 8). With a
  pool, Ctrl-C in the REPL stops the entry that runs and gives the prompt back;
  the declarations of the session stay, and a second Ctrl-C ends the process if
  the entry does not stop.
- **`IsPrime` compiles to JavaScript.**

### Performance

- **Derivatives of order 3 or more of nested expressions are faster and
  shorter**: each intermediate derivative is simplified before it is
  differentiated again. The third derivative of `√(x+√(x+√(x+√(x+x))))` takes
  about a third of the time and prints 37% shorter.

- **A coordinate of point arithmetic over a list of points held by a symbol**
  (`PointX(4·P + 0.3·(t, t))` with `P: list<tuple<number, number>>`) is compiled
  as `4·PointX(P) + 0.3·t` on the JavaScript and interval targets, so the points
  are not built. `Reduce(L, Add)` (also `Multiply`, `Max`, `Min`) compiles on
  the interval target when `L` is not written out but its width is known from
  its structure.

- **A `Map` whose element function is a tree of integer operations is compiled
  with exact results** when the bounds prove that no step leaves the safe
  integers: `sum(map(x => x^2 + 1, 1..100000))` takes 0.12 s, it took about 10
  s. `map(f, xs)` with a named user function `f` uses the same compiled element
  function as a lambda: exact results for an integer body, and machine floats
  for an `N(…)` body when the engine runs at machine precision.
- **A list or a tuple of string literals evaluates to itself**, as a list of
  numbers already did. A recursion that passes a list of 3,000 strings at each
  call is about 30 times faster, and the cost of a call no longer grows with the
  length of the list.
- **A symbol that holds a tuple expression**, such as a point `(f(u), g(u))`,
  evaluates its elements once and gives the remembered value at the next reads,
  until a name it reads changes.
- **A symbol assigned a seeded random draw is memoized again**
  (`WithRandomSeed(…)`, also inside other arithmetic). Each element read drew
  and computed the whole list again.
- **`evaluateAsync()` of a list or a tuple of numbers returns the same
  expression at once**, as `evaluate()` does: about 2 ms in place of 180 to 350
  ms for 20,000 points. The data preparation of `FindFit.evaluateAsync()` is 2
  to 3 times faster, and the asynchronous evaluation of a large list gives the
  event loop a turn about every 8 ms: a timer can run, and an `AbortSignal`
  aborted during the evaluation rejects it with a `CancellationError`.
- **The compile-time constant fold no longer walks more than 10,000 elements or
  iterations**, and `CountIf`, `Any`, `Reduce` and `Fold` are priced per
  element: `sum(filter(1..99999, isPrime))` compiles in about 0.1 s (it took 6.9
  s) and runs as compiled code.
- **Compiling in degree, grad or turn mode no longer resets the caches of the
  engine** for each constant subexpression that is folded (about 30% faster for
  60 angular constants).
- **Compiled JavaScript**: `Min`/`Max` of a scalar and a list, or of two lists,
  no longer copies the lists (7 to 9 times faster at 10,000 elements); `Re`,
  `Im`, `Abs` and `Arg` of the square or the cube of `x + iy` read the parts
  directly, with no complex object; a block-local function that the block only
  calls has no broadcast wrapper; a loop that replaces elements of a local list
  (`xs = ReplaceAt(xs, i, v)`) copies the list once and then writes in place,
  O(n) in place of O(n²), with no change to the array of the caller (#386).
  `Map(Sin, [a, b, c, d, e])` and other one-parameter library operators over a
  written-out list of five or more elements compile to separate calls on every
  target, glsl, wgsl and interval-js included.
- **`.N()` of an infinite sum whose convergence cannot be established declines
  in milliseconds**, not in up to 30 seconds: the walk first evaluates the terms
  with the compiled body (#326). Values above machine precision are unchanged.
- **The Python target computes the index-independent collection work of a `Sum`
  or a `Product` once**, not at each iteration (n = 10,000: 34 → 1.4 ms).
- **A misordered nested call of a callback operator** (`Map(Map(xs, f), g)`,
  `Filter(p, …)`, `Fold(xs, f, 0)`, `TakeWhile`, `DropWhile`, `FlatMap`,
  `MaxBy`, `MinBy`) takes a time linear in its depth (it was exponential: 5 s at
  depth 10). Canonicalizing deeply nested function literals is faster (a `Map`
  80 levels deep: 434 → 156 ms), and arithmetic on symbols of type
  `real | +oo | -oo` no longer builds that type again for each result.
- **The test suite runs 6 to 9 times faster**: a custom jest environment
  (`config/jest-environment.cjs`) makes the `vm` context of each test file with
  an ordinary global object, so a read of `Math` or `Number` is no longer a
  proxy trap.

### Behavior Changes

- **A `Map` of a named function whose body is in `N(…)` compiles at machine
  precision also when the body holds a loop or an inner collection**, as the
  same body written as a lambda already did. `map(g, 1..200)` with
  `g(x) = N(h(x) + 1)` and `h(x) = Sum(x/k, k = 1..10)` is now compiled; its
  values can differ from the interpreted values in the last digits. A body whose
  nested loops do more than 100,000 turns in total stays interpreted.
- **`Σ 1/(n (ln n)^p)` with `p ≤ 1` evaluates to `+∞`** under `evaluate()` and
  `.N()`, and so do other series that diverge as slowly as `Σ 1/(n ln n)` (a
  limit comparison with `Σ 1/(n ln n)`). They stayed symbolic.
- **Compiled JavaScript `Arg` of a square or a cube** now gives a zero imaginary
  part as `+0`, so `arg((0 − i)^2)` is `π`, as in the interpreter (it was `−π`).
- **Setting `.value` on a symbol checks the value as `ce.assign()` does.**
  `n.value = "hi"` for `n` declared `integer` now throws a
  `TypeCompatibilityError`; before, the value was written and the type stayed
  `integer`.
- **A numeric result whose operand may be absent keeps its handler's type and
  adds `nan`**, instead of becoming `number`. `Sin(m)` with `m: real | missing`
  is typed `nan | real`; `Length(At(xs, 1))` is
  `integer | nan | signed_infinity`. Code that compares a type string with
  `number` sees the narrower spelling.
- **`Any` and `All` can be typed `boolean | missing`**, when a cell can be
  absent or the predicate can answer `Missing`.
- **The declared result of `MatrixMultiply` is `matrix | vector | number`.** The
  product of two vectors is a number, which the old signature `matrix | vector`
  did not admit.
- **More calls are refused when they are boxed**, where they failed on each
  element at evaluation: a declared function applied to a symbol whose type
  shares no value with the parameter (CE-24), and `Map` with a polymorphic
  callback whose type-variable bound refuses the element type (CE-30).
- **An inferred signature keeps its parameter names** (CE-60). `(x) => x + 1`
  has the type `(x: unknown) -> number`; it printed `(unknown) -> number`. A
  wildcard parameter (`_`, `_1`) and a destructuring pattern have no name. The
  names do not change how types compare. So a named call to an unannotated
  function literal held in a binding works:
  `f := (a, b) => a - b; f(b: 2, a: 10)` gives `8` (it was
  `argument-name-unknown`), and in Epsil `ns.D(k: 1, x: 10)` with
  `const ns = {D -> ((x, k) => x - k)}` no longer reports
  `argument-names-unavailable`. When a call names a parameter that the function
  does not have, the error lists the declared names.
- **A library operator given by name to `Map` is typed by its own type handler**
  (CE-45.2), as `x ↦ f(x)` is. With `xs: list<integer>`, `Map(Abs, xs)` was
  `list<number>` and is `list<integer<0..>>`; `Map(Sin, xs)` was `list<number>`
  and is `list<real>`; `Map(Conjugate, xs)` was `list<unknown>` and is
  `list<integer>`. A function you declare keeps its declared result. A more
  precise type can change a value: with `L: list<vector<number>>`,
  `Map(Reverse, L) · Map(Reverse, L)` was an entry-by-entry product and is now
  the matrix product, as `L · L` and the lambda form `Map(x ↦ Reverse(x), L)`
  give.
- **A free symbol in a list literal is inferred as a number** (CE-39.4), as in
  `x + 1`. With `L := [u, v]`, the value of `At(L, 1)` was typed `unknown` and
  is `number`. A symbol used in a list literal and later used as a boolean
  condition gives an `incompatible-type` error. A parameter of a function
  literal is not affected (`x ↦ [x]` keeps the result `list<unknown>`).
  Arithmetic over free symbols in a list literal is read as a number too
  (CE-39.6): `AdjugateMatrix([[x, y], [z, w]])` evaluated to a value typed
  `list<list<unknown>>` and is a `matrix<2x2>`.
- **A function with a point parameter maps over a matrix or tensor of points**
  (CE-448). With `g: (tuple<real, real>) -> real` and
  `P := [[(1,2),(3,4)],[(5,6),(7,8)]]`, `g(P)` was an `incompatible-type` error
  and is the 2×2 matrix of `g` at each point, as `PointX` and `Abs` give. For
  `P: broadcastable<tuple<real, real>>`, `g(P)` was typed `list<real> | real`
  and is `broadcastable<real>`; for `T: tensor<tuple<real, real>>`, `g(T)` was
  typed `error` and is `tensor<real>`. Compiled JavaScript maps the same calls;
  it threw "not a point" at rank 2.
- **A captured free symbol of a function literal is inferred on its outer
  binding, and a call checks the captured values** (CE-473). In
  `g := x ↦ [-x, y]`, `y` was left `unknown` outside the literal; it is now
  inferred `number` where it is declared. After `y := "abc"`, a call of a named
  function whose captured value no longer fits the type its signature relied on
  (`g(3)` was `[-3, "abc"]`, typed `vector<2>`) gives `incompatible-type`;
  `Apply` of the literal is typed from the current value; compiled JavaScript
  refuses such a call. A symbol read as the head of a provisional product
  (`(g)(t)` before `g` is a function) is not narrowed outside the literal.
- **A call never maps over the arguments of a rest parameter.**
  `h(...xs) = Length(xs)` with `h([1,2,3])` gave `[1,1,1]` and is `1`;
  `h([1,2],[3])` gave `[2,2]` and is `2`. A fixed parameter before the rest
  parameter still maps a list. The same holds for `Apply` and `Map`.
- **A rest parameter is typed `tuple` in the body** (CE-470), and `Length` and
  `Count` of a tuple are `integer`: `h(a, ...rest) = Length(rest)` was typed
  `-> integer | signed_infinity` and is `-> integer`.
- **A point-function call over a collection symbol with no value stays
  symbolic** (CE-468). With `g: (tuple<real, real>) -> real` and a valueless
  `L: list<tuple<real, real>>`, `g(L).evaluate()` gave `incompatible-type` and
  is now `g(L)`; after `L` has a value, it maps.

## 0.167.0 _2026-10-24_

### Behavior Changes

- **`FixedPoint(f, x)` stays unevaluated when the default iteration limit is
  reached without converging**
  ([#474](https://github.com/cortex-js/compute-engine/issues/474), contributed
  by [enumeratio](https://github.com/enumeratio)). `FixedPoint(x ↦ 1 - x, 0.3)`
  cycles between `0.3` and `0.7`, and used to return whichever it held after
  `ce.iterationLimit` applications, a value that is not a fixed point. The call
  now stays unevaluated, as the divergence guards of `FixedPoint` and `Any` over
  an unbounded source already do. This also applies to an iteration that
  converges too slowly for the limit: at a precision of 200 digits,
  `FixedPoint(Cos, 1.0)` needs about 1170 steps, and it used to return a value
  correct to about 175 digits. A larger `ce.iterationLimit` lets such an
  iteration converge. With an explicit maximum, the last value is still
  returned, as in Wolfram's `FixedPoint[f, x, n]`.

### New Features

- **A worker pool for a kernel loaded with the runtime entry** (CE-436, Tycho
  row 445). The light entry `@cortex-js/compute-engine/runtime` now exports
  `createKernelPool`, and its runtime has
  `loadBroadcastAsync(stored, { workers })`: the `broadcastAsync()` of the
  compilation result, for code that a host stored and loads without an engine.
  It takes the same options (`out`, `deadline`, `signal`, `chunk`, `inline`, …)
  and gives the same result (`done`, `route`, `reason`); the function also has
  `willUsePool(cells)` and `shippable`. Only stored code that keeps the
  `shippable: true` field of its compilation result goes to a worker; other code
  runs on the calling thread (`reason: 'not-shippable'`). A worker that loads
  stored kernels can now run them on a pool of its own without importing the
  engine bundle. The runtime entry grows by about 15 KB minified (5 KB gzipped).

  ```js
  import {
    createJavaScriptRuntime,
    createKernelPool,
  } from '@cortex-js/compute-engine/runtime';
  const workers = createKernelPool({
    create: () =>
      new Worker(
        new URL('@cortex-js/compute-engine/kernel-worker', import.meta.url),
        { type: 'module' }
      ),
  });
  const run = createJavaScriptRuntime().loadBroadcastAsync(stored, { workers });
  const { out, done, route } = await run({ x: xs }, { deadline: 100 });
  ```

- **Index axes in the `grid` layout of `broadcast`** (ROADMAP CE-421, Tycho row
  440). The `indexes` option names the inputs that are index axes: the input of
  each is the axis length `n`, and at each cell the variable is the cell's
  position along that axis, `0` to `n − 1`.
  `f.broadcast({ m: 64, n: 64, F }, { layout: 'grid', indexes: ['m', 'n'] })`
  gives the values of the same grid with the columns `0 … 63`, with no column to
  build, send to a worker or read. On a marching kernel that reads eight values
  of a shared list per cell, a 64 × 64 × 64 grid takes 3.5 ms instead of 4.05
  ms.

- **`executeEpsilAsync()`** (ROADMAP CE-314.1, Tycho row 441). Runs an Epsil
  program as `executeEpsil()` does and returns a promise of the same result.
  Each top-level statement is evaluated with `evaluateAsync()`, so a `findFit`
  whose search runs on the worker pool, or an operator with only an
  `evaluateAsync` handler, takes its asynchronous route. The `signal` option
  stops the program: the promise rejects with a `CancellationError`. A
  `withTimeLimit()` span around the call applies to the whole program.

### Bug Fixes

- **A chain of mixed comparisons serializes as a chain** (CE-433). Since
  0.166.0, `0 < M \le 5` parses to
  `["And", ["Less", 0, "M"], ["LessEqual", "M", 5]]`, and the serializer wrote
  that `And` as `0\lt M\land M\le5`. It now writes `0\lt M\le5`, which parses
  back to the same MathJSON. An `And` is written as a chain only when the chain
  spelling parses back to it: each link starts with the term the previous link
  ends with, and two adjacent links have different operators (`a<b \land b<c`
  keeps its `\land`, since `a<b<c` is one `Less`). A chain inside an `\land`
  needs no parentheses: `0\lt x\le1\land y\gt2`.

- **`broadcastAsync()` with a `deadline` settles when the workers never start**
  (CE-434). A batch that waited for a worker that never posts `ready` (for
  example a worker that fails only when it gets a message) never settled, even
  with a `deadline`: the pool started to watch the deadline only when it sent
  the task to a worker. A task that still waits at its deadline now settles with
  no cells done, and the batch resolves at about the deadline.

- **`ReplaceAll` in a function body reads a parameter as its argument**
  ([#476](https://github.com/cortex-js/compute-engine/issues/476)). `ReplaceAll`
  holds its target, so in `x ↦ ReplaceAll(x, a → b)` the rules were matched
  against the symbol `x`, and the call returned its argument unchanged:
  `FixedPoint`, `Map` or a call over a rewriting step did nothing. A parameter
  of a running call, in the target or in a rule, now means the value the call
  bound to it, as `Function[x, x /. a -> b][a]` does in Wolfram:

  ```js
  const f = ['Function', ['ReplaceAll', 'x', ['List', ['Rule', 'a', 'b']]], 'x'];
  ce.box(['Apply', f, ['Add', 'a', 1]]).evaluate();
  // Before → a + 1    Now → b + 1
  ce.box(['FixedPoint', f, 'a']).evaluate();
  // Before → a        Now → b
  ```

  Outside a function nothing changes: a held target keeps a symbol with an
  assigned value as the symbol (`x := 5; ReplaceAll(x^2, x → 3)` is `9`), and so
  does a `let` local of a function body.

- **`Assign` and `Declare` evaluate their value on the asynchronous route.**
  With `evaluateAsync()`, `x = FindFit(…)` and `let x = FindFit(…)` ran the
  synchronous `FindFit`, and an operator with only an `evaluateAsync` handler
  stayed unevaluated in the value. Both now await the asynchronous evaluation of
  the value; the results of the synchronous route do not change.

### Performance

- **`expr.latex` keeps its string, and prettified serialization is cheaper**
  (ROADMAP CE-438, Tycho row 444). A second read of `.latex` on the same boxed
  expression returns the string of the first read while nothing that can change
  it has changed (a declaration, an assignment, an assumption, the precision or
  another engine setting, the LaTeX options or dictionary): about 0.3 µs instead
  of about 200 µs for a 20-node expression. The prettified MathJSON that
  `.latex` and `toLatex()` use no longer splits a product with no factor that
  can go to a denominator into a numerator and a denominator, which built and
  canonicalized new expressions: a first `.latex` of such an expression takes
  about 180 µs instead of 280 to 360 µs. The output does not change.
  `toLatex({ prettify: false })` stays the fastest form for a string used as a
  key; `expr.digest` is the key to use for a cache.

- **The sum of a compiled `Map` is computed on doubles** (ROADMAP CE-432). At
  machine precision, `Sum(Map(f, xs))` whose element function the
  auto-compilation compiles now adds the doubles of the elements, with the rules
  of the element-by-element sum, instead of boxing each element:
  `sum(map(x => N(sin(x) + x^2), 1..100000))` takes about 45 ms instead of about
  190 ms, with the same value. The asynchronous route takes the same path in
  steps that give the event loop a turn. A `Map` over a set, an impure `Map`,
  and any element that the interpreter must compute keep the element-by-element
  sum.

- **`FindFit.evaluateAsync()` no longer blocks the calling thread for long**
  (ROADMAP CE-429). One grid point of the separable scan and the setup (the data
  rows, the compilation of the model and of its derivatives) now give the event
  loop a turn, about every 8 ms, and an abort during the setup stops it. For an
  interpreted model over 200 rows, the longest block went from about 110 ms to
  12 ms; the results do not change.

- **A product of decimal values no longer keeps every digit** (ROADMAP CE-319.4
  and CE-319.5). The product of two decimal values is rounded to twice the
  working precision plus 20 digits when it has more. It kept every digit of the
  exact product, so a value multiplied by itself at each step of a loop doubled
  its digits at each step: at precision 50, `FixedPoint(x ↦ 2.8·x·(1 − x), 0.2)`
  did not finish in 2 minutes, and now takes about 40 ms. `.N()` of a product of
  64,000 factors went from 43 s to 0.9 s. The digits past the working precision
  are kept as guard digits, so the printed values do not change.

- **A product of many distinct factors takes a time proportional to its size**
  (ROADMAP CE-319.3). A product looked for each new factor among all the factors
  it already held, and `.N()` also built a new product for each factor. A
  product of 2,000 distinct symbols took 18 ms on `evaluate()` and 8.6 s on
  `.N()`; it now takes 12 ms and 7 ms, and 64,000 symbols take about 250 ms on
  both routes. This also fixes the float coefficient of such a product under
  `.N()`: the coefficients were multiplied from the right, so
  `10⁻²⁰⁰·10⁻¹²³·10²⁰⁰·x` went through a subnormal value and gave
  `9.88·10⁻¹²⁴·x`, and some orders of large and small factors gave a coefficient
  of `0`. It is now `10⁻¹²³·x`.

- **Compiling an expression with shared subexpressions and constant folding on
  takes a time proportional to its distinct parts** (ROADMAP CE-319.1). Before
  it folds a constant, the compiler checks the whole expression for a name bound
  by the compilation, a `Sum` or `Product` with a non-finite bound, and a free
  symbol reached through an assigned value. Each check visited a shared
  subexpression once for each place it appears, so `e = e + e` repeated 24 times
  over `2 + √3` took 3.9 s to compile. Each check now visits a subexpression
  once: the same expression compiles in about 110 ms, and at 60 levels in about
  200 ms. The compiled code does not change.

- **A more deeply nested expression compiles** (ROADMAP CE-320.2). The compiler
  is recursive, and each level of a nested expression uses stack. A chain of
  `Sin` and `Cos` compiled up to a depth of about 280, and a polynomial in
  Horner form, `a₀ + x(a₁ + x(a₂ + …))`, up to a degree of about 120; past that,
  `compile()` answered `success: false` and the call ran in the interpreter.
  Each level now uses less stack, and the two limits are about 420 and 205. The
  compiled code does not change.

## 0.166.0 _2026-10-24_

### Breaking Changes

- **A parsed comparison chain is no longer a nested tree** (ROADMAP CE-411,
  Tycho row 433). The LaTeX and Epsil parsers wrote `a < b \le c` as
  `LessEqual(Less(a, b), c)`, and `a = b = c` as `Equal(a, Equal(b, c))`. A run
  of one operator is now one n-ary node, `Equal(a, b, c)`, and a run of mixed
  operators is an `And` of links that share their boundary term: `a < b \le c`
  is `And(Less(a, b), LessEqual(b, c))`, in the raw form too. MathJSON input
  that nests a comparison inside another comparison, such as
  `["Less", "a", ["Less", "b", "c"]]`, now means a comparison of the inner truth
  value, not a chain. The serializers put parentheses around a comparison inside
  a comparison.

### Behavior Changes

- **A declared type of a batch input is trusted** (ROADMAP CE-410). In the batch
  body, a read `At(F, i)` whose index type proves an integer of at least 1 (for
  example `i + 1` with `i` declared `integer<0..>`) is a direct read with no
  run-time test; a read past the end still gives `NaN`. When an input breaks its
  declared type (a fractional `i` for `integer`, a string in a list declared
  `list<number>`), the result is not defined. A plain array that passed the
  check once is not checked again while its length is unchanged.

- **A list at an untyped parameter beside a point parameter maps** (ROADMAP
  CE-414.2). A parameter with no type (`unknown`, `any`, no annotation) of a
  function that also has a point parameter now follows the rule of a
  one-parameter function: its type is refined from the body, and it maps a list
  unless the body uses it as a collection. With `f := (P, t) ↦ (P.x + t, P.y)`
  declared `(tuple<number, number>, unknown) -> unknown`, `f((1, 2), [0, 1, 2])`
  is `[(1, 2), (2, 2), (3, 2)]`, typed `list<tuple<number, number>>`; it was
  `([1, 2, 3], 2)`. With `(P, L) ↦ Length(L)`, `L` is refined to `collection`
  and the list is still taken whole. Compiled JavaScript gives the same values.

- **An absent point at a `broadcastable<tuple<…>>` parameter gives `Missing`**
  (ROADMAP CE-420), as at a `tuple<…>` parameter. With
  `f := (a, b) ↦ (a.x + b.x, a.y + b.y)`,
  `f([(1, 2), (3, 4)], [(10, 20), Missing])` is `[(11, 22), Missing]` for every
  mix of the two declarations; with `broadcastable<…>` parameters the second
  element was an `incompatible-type` error. A list of only absent points,
  `[Missing, Missing]`, now gives `[Missing, Missing]` for every declaration; at
  a `tuple<…>` parameter the call was an `incompatible-type` error. A list of
  points that is absent as a whole (`P: list<tuple<…>> | missing` holding
  `Missing`) now gives `Missing` at a `broadcastable<tuple<…>>` parameter too,
  and the call's type has the `missing` option; it was an `incompatible-type`
  error. Compiled JavaScript gives `undefined` for an absent point, and for an
  absent list, at a `broadcastable<tuple<…>>` parameter; it declined.

- **A time limit applies to an asynchronous evaluation** (ROADMAP CE-424,
  Tycho's CE-314 feedback).
  `ce.withTimeLimit(20, () => { p = expr.evaluateAsync(); })` had no effect: the
  limit was removed when the callback returned, before the evaluation went on
  after its first `await`. A `FindFit` global search ran to its end (270 ms).
  The evaluation now keeps the limit (and a `withStepBudget` budget) that is in
  force when `evaluateAsync()` is called, until it ends. A timeout is reported
  as by `evaluate()`: the `FindFit` search answers its best point so far with
  `timedOut: True` after 21 ms, and the time left is given to the workers of a
  kernel pool.

- **`broadcastAsync()` evaluates no cell before it returns** (ROADMAP CE-425.2,
  Tycho's CE-314 feedback). A batch that stays on the calling thread (no pool, a
  result that cannot run on a worker, or fewer cells than the inline threshold)
  ran its first slice, up to 16 384 cells, before the call returned. The batch
  now yields to the event loop (a macrotask turn) before its first slice, as it
  already did between two slices. A signal aborted right after the call now
  stops the batch before its first cell.

### New Features

- **The record of `FindFit.evaluateAsync()` says where the search ran** (ROADMAP
  CE-428, Tycho's CE-314 feedback). The record of the asynchronous route of
  `FindFit` and `FindRoot` has a `route` entry: `"pool"` when the workers of the
  engine's kernel pool solved the grid points, or `"calling-thread"`. With
  `"calling-thread"`, a `reason` entry says why the pool did not take the
  search: `"no-pool"`, `"no-global-search"`, `"not-separable"`,
  `"not-compilable"`, `"pool-declined"` (the pool rejected every slice),
  `"no-points-to-ship"` or `"setup-timeout"`. The record of `evaluate()` has
  neither entry.

- **`broadcastAsync({ …, inline: false })` refuses the calling thread** (ROADMAP
  CE-426). When the batch would not go to the worker pool, the call resolves at
  once with `done: 0` and evaluates no cell; when a worker fails during the
  batch, the call keeps the cells that the workers did and does not complete the
  rest on the calling thread. `result.willUsePool(cells)` of a compiled result
  says before the call whether a batch of that many cells would go to the pool
  now.

- **`result.shippable` says whether a compiled result can run on a worker**
  (ROADMAP CE-427). It is `false` when the compiled code draws random numbers
  from the engine, names a host global (a `vars` or `functions` entry given by
  name), or has a caller `preamble`; such a result always runs on the calling
  thread. It is present where `broadcastAsync` is.

- **The result of `broadcastAsync()` says where the batch ran** (ROADMAP
  CE-428). `route` is `'pool'` or `'calling-thread'`, and `reason`, present when
  the pool did not take the whole batch, is one of `'no-pool'`,
  `'pool-unusable'`, `'not-shippable'`, `'below-threshold'` and
  `'pool-declined'`. The types `BroadcastAsyncRoute` and `BroadcastAsyncReason`
  are exported. `route` is a required field of `BroadcastAsyncResult`: code that
  builds such an object itself (a mock, for example) must set it.

### Bug Fixes

- **`FindFit.evaluateAsync()` lets timers run during a search on the calling
  thread** (ROADMAP CE-425.1, Tycho's CE-314 feedback). With no kernel pool, or
  when the pool does not take the search (a model that does not compile, a
  search that is not separable, no `global` option), the whole search ran in one
  piece: a 5-point fit of `a cos(b x + c) + d LogGamma(x + c)` blocked the
  thread for more than 4 s, so a page did not respond and an `AbortSignal`
  aborted by a timer was not seen until the end. The search now gives the event
  loop a turn about every 8 ms (between grid points, solver starts, solver
  iterations and groups of 8 data rows); the longest block of that fit is now
  about 25 ms. The results do not change; a short fit is up to about 5 % slower,
  near the noise of the measurement.

- **`Equal` and `NotEqual` of two relations compare their truth values**
  (ROADMAP CE-411, Tycho row 433).
  `["Equal", ["LessEqual", "a", 0], ["LessEqual", "b", 0]]` was boxed as the
  chain `a ≤ 0 = b ≤ 0`, and the LaTeX `(a\le0)=(b\le0)` evaluated as that chain
  after a substitution: both gave `False` for `a = b = 1`. Both now give `True`
  when the two conditions are both true or both false.

- **A negated relation in a comparison chain negates only its own link**
  (ROADMAP CE-411). `a < b \not\le c` is
  `And(Less(a, b), Not(LessEqual(b, c)))`; it was
  `Not(And(Less(a, b), LessEqual(b, c)))`. The LaTeX commands `\nleq`,
  `\nleqslant`, `\ngeq`, `\ngeqslant`, `\not\lt` and `\not\gt` are now parsed;
  they gave an `unexpected-command` error.

- **A call of a function with a `broadcastable<tuple<…>>` parameter over a list
  of points compiles** (ROADMAP CE-412, Tycho row 437). With
  `f := a ↦ (a.x + 1, a.y + 1)` and `P` a list of points, or a point or a list
  of points, `compile(f(P))` declined. It now compiles to one call per point, as
  a bare `tuple<…>` parameter does, and gives the interpreter's values.

- **A bare `tuple<…>` parameter maps a list of points of unknown length**
  (ROADMAP CE-413, Tycho row 438). With `n` unbound, a call over
  `Map((u, v) ↦ (u, v), \frac{1}{n}[0...n], \frac{1}{n}[0...n])` was an
  `incompatible-type` error. It now maps one point per call, lazily, as for a
  list of known length.

- **A list in a scalar slot beside a point parameter maps** (ROADMAP CE-414,
  Tycho row 439). With `h := (P, t) ↦ P.x + t` and `t` declared `real`,
  `h((1, 2), [0, 1, 2])` was an `incompatible-type` error. It is now
  `[1, 2, 3]`, typed as a list, in the interpreter and in compiled JavaScript.
  This applies when the slot's type cannot hold a list (`real`, `number`,
  `boolean`, `string`); for a slot typed `unknown`, see Behavior Changes.

- **A compiled call with an argument declared `broadcastable<tuple<…>>` that
  holds one point compiles** (ROADMAP CE-415). It declined; it now gives the
  interpreter's value.

- **Printing a function whose parameter is `_1` no longer defines `_`** (ROADMAP
  CE-416). `toString()` renamed the parameter with a substitution that created
  the symbol `_` in the engine's scope, so a later lazy `Map` printed
  `Error(incompatible-type …)` in place of a call.

- **`broadcastAsync` reads an input that shares memory with `out` as it was
  given.** When an input array was a view of the output buffer, each slice read
  it after earlier slices had written their results there: with
  `Tuple(x + 1, 10x)`, `x = [1, 2, 3, 4]` in the first half of `out` and
  `chunk: 1`, the result was `[2, 10, 11, 100, 12, 110, 101, 1000]` instead of
  `[2, 10, 3, 20, 4, 30, 5, 40]`. `broadcast` was correct. Such inputs are now
  copied once before the first slice.

### Performance

- **A `broadcast` kernel runs up to 15 times faster** (ROADMAP CE-410, Tycho row
  432). For a kernel that reads two values of a shared `list<number>` and
  returns a tuple, 250 000 cells take about 0.55 ms instead of 8.3 ms when the
  index is declared `integer<0..>`, and about 0.95 ms when it is declared
  `integer`. A kernel that reads a shared list gets a second compiled body for
  batches: the list is checked once per batch (a `Float64Array`, or a plain
  array of numbers) and then read directly, and the inputs are passed as
  arguments. A shared `Float64Array` is read in place; it was copied into a
  plain array on every batch. The cell loop is generated for each compiled body,
  `And`/`Or` of plain comparisons compile to a conditional, and the per-cell
  call is direct.

## 0.165.0 _2026-10-24_

### Breaking Changes

- **The `IntervalValue` type includes the answer strings of a comparison**
  (ROADMAP CE-210, Tycho row 411). A compiled `interval-js` runner returns
  `'true'`, `'false'` or `'maybe'` for a boolean expression, but the public type
  `IntervalValue` was `IntervalResult | Interval | IntervalValue[]`. It is now
  `IntervalResult | BoolInterval | Interval | IntervalValue[]`. Code that
  narrows an `IntervalValue` with a check on `kind` must first test for a
  string.

### Behavior Changes

- **Compiled JavaScript keeps an absent value whose type is not known through a
  point accessor and arithmetic** (ROADMAP CE-229). With
  `W = (p, s) ↦ (s·PointX(p), s·PointY(p), s·PointZ(p))` and `L` a list of two
  points, the interpreter gives `(Missing, Missing, Missing)` for `W(L[5], 2)`,
  and compiled JavaScript gave `[NaN, NaN, NaN]`. The interpreter answers the
  marker of the codomain for an absent operand: `NaN` when the operation is
  provably a number, `Missing` otherwise. Compiled code now does the same: a
  coordinate accessor whose type is `any` or `unknown` gives `undefined` (the
  compiled spelling of `Missing`) for an absent point, and an element-wise
  `Add`, `Multiply` (and the other arithmetic) whose type is not provably a
  number keeps an `undefined` operand of type `any` or `unknown`. `W(L[5], 2)`
  compiles to `[undefined, undefined, undefined]`. Beside an operand that is a
  list at run time the absence lands in each cell, as in the interpreter:
  `[1, 2] + PointX(p)` with `p` absent is `[NaN, NaN]`. A numeric operation,
  such as `2·x` with `x` absent, is still `NaN`.

- **A parameter declared `broadcastable<T>` maps to the cells when `T` cannot
  hold a list** (ROADMAP CE-405, Tycho row 434). With
  `f: (broadcastable<number>) -> number` and `f := x ↦ x + 1`,
  `f([[1, 2], [3, 4]])` is `[[2, 3], [4, 5]]`, typed `matrix<2x2>`. It was a
  list of two `incompatible-type` errors, one for each row, while the call was
  typed `matrix<2x2>`: the declared parameter mapped exactly one level down and
  checked each row against `number`. Since 0.162.0 `broadcastable<T>` is
  `T | tensor<T>`, and an undeclared function and the compiled targets already
  map to the cells. This applies when `T` is a number, a boolean, a string or a
  tuple; a tuple is not mapped into, so a list of points maps one point per
  call. A parameter declared `broadcastable<value>` keeps the one-level rule,
  and so does a call that maps such a parameter. An element that is neither a
  `T` nor a collection is an `incompatible-type` error that names
  `broadcastable<T>`. Such a function now compiles to JavaScript through the
  element-wise call, with each cell checked against `T`, where it declined. A
  call that maps a `broadcastable<value>` parameter is typed with one list level
  around the result (`list<value>`; it was typed from the whole shape of the
  argument).

- **Every result of the MCP server says which engine computed it** (ROADMAP
  CE-406). A server loads the engine when it starts and keeps it, so after an
  upgrade a running server answered with the old engine, and nothing in its
  results showed it. A JSON result now has `engineVersion`, and an error message
  ends with a line `Engine version: …`. When the package installed on disk has
  another version, the result also has an `engineWarning` (or a line in an error
  message) that says to restart the server.

- **The `interval-js` fallback answers a comparison, and does not read a wide
  input as its midpoint** (ROADMAP CE-210). When the target cannot compile an
  expression (`Greater(Fibonacci(x), 0)`: `Fibonacci` has no interval lowering),
  the result runs the interpreter at the midpoint of each interval input. A
  boolean value was `{ kind: 'entire' }`; it is now the answer string, `'true'`
  or `'false'`, as compiled code gives it. When an input is wider than a point,
  the value at its midpoint does not bound the values over it, and was returned
  as if it did: `Fibonacci(x)` over `[1, 10]` was `{ kind: 'empty' }` (no value
  at 5.5), although it takes the values 1 to 55 there. Over such an input a
  boolean expression is now `'maybe'` and a number is `{ kind: 'entire' }`. At a
  point the answers are exact, as before.

- **A declared collection that shares only the empty collection with a
  collection parameter is refused when the expression is boxed** (ROADMAP
  CE-402). With `R: list<list<number>>` or `B: list<boolean>`, `Mean(R)` and
  `Mean(B)` were valid and were refused only when evaluated, while
  `Histogram(R, 2)` was refused when boxed: the empty list is both a
  `list<list<number>>` and a `collection<number>`. A collection argument is now
  admitted at a collection parameter only when their element types can match, so
  `Mean(R)`, `Mean(B)` and `Mean([Missing, "a"])` are refused when they are
  boxed. A collection whose elements are not known yet (`list`, `list<any>`,
  `set<unknown>`, `tensor`) is still admitted.

### Resolved Issues

- **A compiled call with an argument that is one point or a list of points gave
  a wrong value** (ROADMAP CE-407, Tycho row 435). With
  `f: (tuple<number, number>) -> tuple<number, number>`,
  `f := a ↦ (a.x + 1, a.y + 1)` and
  `L: tuple<number, number> | list<tuple<number, number>>`, the interpreter maps
  `f(L)` over the points when `L` holds a list, and gives one point when `L`
  holds a point. The call was typed `tuple<number, number>`, and compiled
  JavaScript called `f` once on the whole list: for `[(1, 2), (3, 4)]` it gave
  `["1,21", "3,41"]` and reported success. The call is now typed
  `list<tuple<number, number>> | tuple<number, number>`, and compiled JavaScript
  tests the value at run time: it maps over a list of points and gives a point
  whole. The same applies to an argument declared
  `broadcastable<tuple<number, number>>`, which was typed and compiled as a list
  of points only, so compiled code read one point as a list; a matrix of points
  there throws at run time, as the interpreter gives an `incompatible-type`
  error. An absent argument of such a type (`… | missing`) gives `Missing`, as
  an absent list of points does; it was an `incompatible-type` error. A union
  that also admits another collection (`… | list<list<tuple<…>>>`, `… | list`),
  and a parameter with a coordinate that is not a number, a boolean or a string
  (`tuple<list<number>, number>`), are now declined by the compiler: a point and
  a list of points cannot be told apart at run time there.

- **A generic parameter declared `broadcastable<T>` with a number bound refused
  a matrix** (ROADMAP CE-409). With
  `w: (x: broadcastable<T>) -> list<T> where T: number` and `w := x ↦ [x]`,
  `w([[1, 2], [3, 4]])` was the error `incompatible-type` when boxed, while the
  same declaration without a type variable, `broadcastable<number>`, maps to the
  cells (ROADMAP CE-405). The type solver read the matrix one level down and
  bound `T` to the rows. It now binds `T` to the cells when the bound cannot
  hold a list, also for a list with rows of different lengths:
  `w([[1, 2], [3, 4]])` is `[[[1], [2]], [[3], [4]]]`, typed
  `list<list<list<integer>>>`, and compiled code gives the same value. A type
  variable with no bound (`where T`) now maps each row whole, as
  `where T: value` does; each row was an `incompatible-type` error naming `T`.

- **A parameter named `Return` can be called in the body of `Sum`, `Integrate`
  and the other operators that take an expression** (ROADMAP CE-401). Since
  0.164.0 a `Return` statement in such a body is the error
  `return-in-expression-body`. The check also refused a call of a parameter of
  the enclosing function literal named `Return`:
  `["Function", ["Sum", ["Return"], ["Limits", "k", 1, 3]], ["Typed", "Return", "() -> real"]]`
  was invalid. The call is now allowed, with or without a type on the parameter,
  and the function applied to `() ↦ 2` gives 6. A `Return` that calls a bare
  parameter, of the function or of an enclosing function, also no longer adds
  `nothing` to the result type of the function: `Return ↦ 1 + Return()` is typed
  `(unknown) -> broadcastable<number>`, not
  `(unknown) -> broadcastable<number> | nothing`.

- **The result of a function whose parameter is declared `broadcastable<T>` was
  typed for a whole collection** (ROADMAP CE-408, Tycho row 436). With
  `l: (broadcastable<tuple<number, number>>) -> unknown` and
  `l := A ↦ √(A.x² + A.y²)`, the signature was refined to
  `-> broadcastable<number>`, so `l(P)` over a list of points was typed
  `list<broadcastable<number>>` and `P / l(P)` had a `tensor` arm. Each call of
  the body receives one `T`, so the result is now typed with the parameter read
  as `T`: `-> number`, and `l(P)` is `list<number> | number`.

- **The LaTeX serialization of `Reduce` and `Fold` keeps the initial value**
  (ROADMAP CE-292). `Reduce([1, 2], Add, 10)` serialized as `\sum` of the list
  without the seed, so the LaTeX parsed back as an expression whose value is
  `3`, not `13`. A seeded reduction now writes its third operand, and the
  `\sum`/`\prod` shorthand is used only when there is no seed.

- **A symbol declared with the type `error` parses** (ROADMAP CE-294). With
  `w: error`, `w`, `w+1` and `\int_0^1 w\,dw` gave an `unexpected-symbol` error.
  They now parse as terms. A symbol of type `never` also parses now.

- **In lenient mode, `ab√x..5` reports `ambiguous-radical`** (ROADMAP CE-298),
  as `ab√x` and `5..ab√x` already did. The line-level ambiguity checks now read
  the tree after the range-precedence repair.

- **`Declare` with a type string that does not parse returns an error** (ROADMAP
  CE-101). `["Declare", "r", {str: "integer<<"}]` threw when it was evaluated.
  It now gives `Error("invalid-type-declaration", …)` with the message of the
  type parser.

- **`Hold` around a `Function` with no body does not throw** (ROADMAP CE-106).
  Reading the type of `Hold(Function())`, or evaluating it, threw from the
  signature of the function literal. The bodyless function literal is now typed
  `error`.

- **A `ce.declare()` of a value that is refused leaves no placeholder** (ROADMAP
  CE-116, issue #394). When the value does not fit its type, a new name stays
  undeclared and a redeclaration keeps its previous binding, as the operator
  route already did.

- **More boolean identities fold beside an unknown** (ROADMAP CE-119).
  `Nand(True, A)`, `Nor(False, A)`, `Nand(A, A)` and `Nor(A, A)` evaluate to
  `¬A`, `Implies(True, A)` to `A`, `Implies(A, False)` to `¬A`, and
  `Implies(A, A)` and `Equivalent(A, A)` to `True`. An absent operand gives the
  same results as before.

- **`isEqual()` of a symbol reads the bounds that pin it to a value** (ROADMAP
  CE-104). With `b ≥ 0` and `b ≤ 0` assumed, `b.isEqual(0)` is `true`; it was
  `undefined`, and `ce.number(0).isEqual(b)` agrees. The `Equal` operator does
  not read bounds.

- **`Limit` of a function whose body is `Return(v)`** (ROADMAP CE-400) gives the
  limit of `v`. It gave a `Return` expression as its value. A `Return` inside a
  statement block or a branch leaves the limit unevaluated.

- **A divergent improper integral with a symbolic exponent stays unevaluated**
  (ROADMAP CE-383). `∫₀^∞ xⁿ dx` gave a value under the condition
  `0 < n ∧ n < 0`, which no `n` satisfies.

- **The limit at infinity of a ratio of logarithms** (ROADMAP CE-147).
  `ln(3x)/ln(x)` and `ln(3x)/ln(x^π)` give `1` and `1/π`; they stayed
  unevaluated. A ratio that is not an indeterminate form, such as
  `(2 + sin x)/(3 + sin x)`, still has no limit.

- **`Determinant` and `CharacteristicPolynomial` of a matrix with float entries
  fold their constants** (ROADMAP CE-145). `Determinant([[x + 1.5, 1], [1, 2]])`
  is `2x + 2`; it was `2x - 1 + 3`.

- **A telescoping sum with an infinite bound and a parameter** (ROADMAP CE-142).
  `\sum_{k=1}^\infty ((x+k+1)^2-(x+k)^2)` is `+oo`; it was
  `(x + 1 + oo)^2 - (x + 1)^2`. The product `\prod_{k=1}^\infty (x+k+1)/(x+k)`,
  whose sign depends on `x`, stays unevaluated. A sum whose term at the finite
  bound is a pole stays unevaluated.

- **Reducers over a `Range` held by a symbol use the closed form** (ROADMAP
  CE-80). With `r := Range(1, 10^20)`, `Sum(r)`, `Mean(r)`, `Median(r)`,
  `Variance(r)`, `Max(r)` and `Min(r)` return at once; they walked every
  element.

- **`Dot` of two empty lists** (ROADMAP CE-220) is `0` for two numeric vectors
  and `[]` for two lists of points, as the compiled code gives. It stayed
  unevaluated.

- **Compiled `Max`, `Min` and the ordering comparisons decline an operand of
  type `color`, `regexp` or `object`** (ROADMAP CE-393). The compiled code read
  such a value as a number, while the interpreter leaves the call unevaluated.
  With a `fallback`, the interpreter now runs. A custom compile handler of the
  operator still takes precedence.

- **The WGSL `Mod` keeps the sign of the divisor when the quotient underflows**
  (ROADMAP CE-246). `floor(r / b)` gave `-0` for a tiny remainder of the
  opposite sign, so the divisor was not added.

- **`NLimit` of a function that rises before it decays** (ROADMAP CE-184).
  `NLimit(t ↦ 7t/(t² + 9), ∞)` is about `0` (`−2e-22`); it was `NaN`. The
  numeric limit retries from a start closer to the target when the first
  extrapolation is rejected.

- **`narrow()` of two collection types of different kinds that share values**
  (ROADMAP CE-12). `matrix<number>` and `collection<vector<integer>>` narrow to
  `matrix<integer>`; the result was `never`. A pair that cannot be reduced is
  kept as an intersection.

- **The empty tuple type prints as `tuple<>`** (ROADMAP CE-23), which parses
  back to the empty tuple. It printed as the bare `tuple`, which means a tuple
  of any length.

- **`Abs` of a list or a matrix of numbers is typed from its cells** (ROADMAP
  CE-18). `Abs([1, 2])` is typed `list<integer<0..>^2>`; the type had a
  `signed_infinity` arm that the value cannot take.

- **Epsil: the hint of a type error in an annotation is shown** (ROADMAP
  CE-307). `let v: vector<integer^(2x3)>` now says to write `matrix<…>` for two
  dimensions.

- **Epsil: an error in the body of a `match` case is underlined on that case**
  (ROADMAP CE-308), not on the whole statement. The error frame names the case
  (`in Match argument 3`).

- **Epsil: a loop over a range whose bound is an unassigned local reports the
  error** (ROADMAP CE-309). In a function, `for k in 1..t { t = 2 }` gives
  `read-before-declaration`, as compiled code does; it ran zero times. A lambda
  in a pipe stage that assigns a new name,
  `(1..3) |> map((k) => do { t = k * 2; t })`, no longer needs the `scope`
  effect.

- **Faster type checks and set operations** (ROADMAP CE-315, CE-316).
  `isSubtype` on a union whose arms are the same type node took exponential time
  in the nesting depth. Duplicate removal in a set comprehension, in
  `Intersection` and in `SymmetricDifference` compares an element only with the
  elements of the same hash: 3,604 comparisons in place of 812,704 for a
  comprehension over `Range(1, 900)`.

- **The structural hash of a deeply nested expression does not repeat** (ROADMAP
  CE-318). The hash of a function expression, and of a dictionary, repeated
  every 32 or 64 levels of nesting, so different deep expressions fell into one
  hash bucket. Hash values of all function expressions change.

- **Compiled code: seven more corrections** (ROADMAP CE-224, CE-226, CE-230,
  CE-243, CE-251, CE-262, CE-282).
  - GLSL and WGSL decline a point component typed `indexed_collection` or
    `collection`, as they decline a list; such a value was put in a `vecN`.
  - A comprehension whose term assigns its own index declines to compile, and
    the interpreter runs it. The compiled code threw "Assignment to constant
    variable".
  - A branch of `If` or `Which` behind a condition that is constant by its type
    no longer moves the compiled result to the complex lane:
    `x + Which(1 > 0, y, True, √(y − 1))` compiles to real code.
  - The GLSL and WGSL integer-power helpers of a vector give `+∞`, not `NaN`,
    for a zero component under a negative odd exponent, as the scalar helper
    does.
  - A one-operand `Add`, `Multiply`, `And` or `Or`, and `Power(x, 1)`, from
    non-canonical input compile with correct grouping on JavaScript and the GPU
    targets. `3·(x+1)^1` compiled as `3·x + 1`.
  - Compiled JavaScript `\arg(x − iy)` is `π` at `y = 0` and a negative `x`, as
    the interpreter gives; it was `−π`.
  - `compileShader` on GLSL and WGSL converts the arguments and results of
    trigonometric functions in degree, grad and turn modes, as `compile` does.

- **Evaluation: six corrections** (ROADMAP CE-99, CE-105, CE-108, CE-115,
  CE-121, CE-129).
  - A dictionary that holds an `Error` value reports `isValid === false`, as a
    list and a tuple do, and `has()` of an object reads its field values.
  - A symbol that holds an error gives that error when it is called: `w(1)`,
    `Apply(w, 1)` and `Pipe(3, w)` stayed unevaluated, while `Map(w, …)` gave
    the error.
  - An error passed to a function declared with a typed signature carries the
    frame of that call.
  - `Sum` and `Product` with several `Limits` clauses, where a bound depends on
    another index, evaluate in either clause order:
    `Sum(k, Limits(k, 1, n), Limits(n, 1, 10))` is `220`.
  - The `.mul()` method no longer stores the current value of a variable in a
    point or a list: with `w := 4`, `2·(w, 2)` keeps `(2w, 4)` and follows a
    later assignment of `w`.
  - A callback written `InverseFunction(f)` or `Derivative(f, n)` is accepted by
    the lazy collection operators: `Map(InverseFunction(Sin), xs)`.

- **Numeric evaluation: more values and better accuracy** (ROADMAP CE-180,
  CE-185, CE-189, CE-192, CE-197).
  - `.N()` of a divergent integral next to a singular bound, `∫₀¹ t⁻³⁰⁰ dt`, is
    `+oo`; it was a `Measurement` of `+oo` with a `NaN` error.
  - A `Measurement` whose error is below `1e-100` prints in exponential
    notation; it printed the text of a `RangeError`.
  - `Gamma` and `Factorial` at an argument whose value is past the exponent
    range stay unevaluated, and no longer give `0` to internal callers.
  - `Arcoth`, `Arcosh` and the other inverse functions with a branch point at ±1
    read an exact sum next to ±1 (`1 + 10⁻¹⁰`) exactly at machine precision:
    `Arcoth(1 + 10⁻¹⁰)` is `11.8594990552752`; it was `11.8594990139`, the value
    at the double.
  - The complex `Gamma` is about 100 times more accurate for an argument with
    `Re z` above 2 (relative error 1.6e-15 on the real axis, it was 2e-13), so
    `Hypergeometric2F1` with a complex `z` is more accurate too.
  - `PolyGamma(m, z)` of an order from 100 to 400 close to a half-integer on the
    real axis has a value: `PolyGamma(120, -1/2 + 10⁻⁵i)`.
  - `GammaRegularized(n, z)` for an integer `n` up to 200 and a negative `z` has
    a value under `.N()`.

- **More precise static types** (ROADMAP CE-17, CE-44).
  - The meet of a fixed-length list with a plain list of lists is `never` (the
    empty list for an open length). It was a type such as `list<list^3>`, which
    the type parser refuses.
  - An element-wise comparison over a list that can be absent as a whole,
    `L < 3` with `L: list<integer> | missing`, is typed
    `list<boolean> | missing`; it was `list<boolean | missing>`.

- **Symbolic computation: nine corrections and capabilities** (ROADMAP CE-137,
  CE-138, CE-141, CE-152, CE-154, CE-155, CE-156, CE-157, CE-158).
  - `Solve` finds the roots of equations with sines and cosines of multiples of
    the unknown: `sin x + sin 2x = 0`, `cos 2x + cos x = 0`, `sin 2x = cos x`.
  - `D` and `Integrate` over a parameter of a user function use the argument of
    the call: with `g(f) := \frac{d}{dx} f`, `g(x^2)` is `2x`; it was `0`. This
    also holds when a global symbol has the name of the parameter, and for an
    argument that holds it: with `g(f) := \int f\,dx`, `g(f + x)` is
    `f·x + x²/2`.
  - The definite integral of `sin(x − Round(x))/(x − Round(x))` is no longer
    evaluated through an antiderivative that ignores the jumps of `Round`; it
    gave `0`. `.N()` gives `63.1177…` on `[0, 64]`.
  - A definite integral of `|u|` or `sgn(u)` with a quadratic `u` is split at
    the real roots of `u`: `\int_{-1}^{1} |x^2 - 1/4|\,dx` is `1/2`.
  - `TrigReduce` reduces each element of a list and each side of an equation (it
    rewrote them in exponential form), and `TrigReduce(Missing)` stays
    `Missing`.
  - `Sum` and `Product` over `Element(j, Range(1, k))` read the value of `k`, as
    `Limits` does.
  - `simplify()` rationalizes a quotient by a constant inside a sum or a
    product: `1/(2−√2) − 1/(2+√2)` is `√2`.
  - `simplify()` reads a negative imaginary literal as a negation, so
    `sin(−i) + sin(i)` is `0`, and simplifies the numerator of a quotient as a
    term of a sum: `(Si(1) − Si(−1))/y` is `2Si(1)/y`.

## 0.164.0 _2026-10-23_

### Behavior Changes

- **The structural form of `ce.parse()` leaves out a spacing command between the
  operands of a juxtaposition** (ROADMAP CE-403, Tycho row 431).
  `ce.parse("\\,d=2", { form: "structural" })` was
  `["Equal", ["InvisibleOperator", ["HorizontalSpacing", 3], "d"], 2]`, a
  product of a space and `d` on the left side, while `d=\,2` was
  `["Equal", "d", 2]`: the shape depended on where the space was. It is now
  `["Equal", "d", 2]`, as `d\,=2`, `\quad d=2` and `x\,+\,y`
  (`["Add", "x", "y"]`) are. The canonical form already left the spacing out.
  The raw form keeps it, and so does the `structural` property of a raw
  expression. A space still separates two tokens: `x\,.75e2` is `x` times `75`.

- **`Mean` and the other statistics refuse a matrix when the expression is
  boxed** (ROADMAP CE-13). `Mean([[1, 2], [3, 4]])` was a valid expression that
  failed only when it was evaluated. The data parameter of `Mean`, `Median`,
  `Mode`, `Variance`, `PopulationVariance`, `StandardDeviation`,
  `PopulationStandardDeviation`, `Kurtosis`, `Skewness`, `Quartiles`,
  `InterquartileRange`, `Histogram`, `BinCounts`, `Covariance`,
  `PopulationCovariance` and `Correlation` is now a collection of numbers,
  `collection<nothing | number>` (`collection<nothing | number | tuple>` for the
  first operand of the bivariate statistics, which also take a collection of
  `(x, y)` pairs), in place of `collection<any>`. A matrix, a symbol declared
  `matrix`, a ragged list, a collection of booleans, strings or residue classes,
  and a dictionary are now invalid when they are boxed, with an
  `incompatible-type` error that names the data parameter. Vectors, sets,
  ranges, tuples, data with `Missing` or `Nothing` cells, measurements and
  symbolic data are accepted as before. The validation now reads the rank of a
  `collection<T>` parameter whose elements cannot be lists as 1, so any operator
  with such a parameter refuses an argument of rank 2 or more. Related changes:
  - A symbol with no value used as statistics data (`Mean(q)`) is inferred
    `collection<nothing | number> | distribution | number`.
  - In `Histogram(P + 0.5, 1/100)` with `P` of unknown type, `P` is inferred
    `list<number>` (it was `matrix`).
  - The inferred parameter of a user function `xs ↦ Mean(xs)` is
    `collection<nothing | number> | value`.

- **A `Return` in an operand of `Sum`, `Product`, `Integrate`, `D`, `ND`,
  `NIntegrate`, `Limit` or `NLimit` is an error** (ROADMAP CE-96). These
  operands (the body, a bound, a variable) are expressions, computed once per
  index value or integration point, not statement blocks of the enclosing
  function, so a `Return` there has no function to end. It stayed in the value:
  `Sum(1 + Return("q"), (k, 1, 2))` was `2 + 2Return("q")`, and
  `D(Return(x^2), x)` was `2x·Apply(Derivative("Return", 1), x^2)`. The
  expression is now invalid, with the error `return-in-expression-body` naming
  the operator. A `Return` inside a function literal in the body ends that
  function, as before, and a `Return` inside `Hold` is data.

- **`x/0` waits for the value of `x`** (ROADMAP CE-95, Tycho row 413). With
  `x: real` and no value, `x/0` was canonicalized to `ComplexInfinity`, so
  `\{x/0 > 0: 1, 0\}` compiled to `(0 < Infinity) ? 1 : 0` and gave 1 at every
  `x`, including `x = 0`, where the value is `0/0`. A quotient by the number 0
  now folds to `ComplexInfinity` only when the numerator is provably not zero: a
  number other than 0 (`5/0`, `π/0`, `i/0`), or an expression whose sign is
  known from its type and the assumptions (`(x^2+1)/0`, `e^x/0`). Otherwise the
  quotient stays `x/0` through `evaluate()`, `.N()` and `simplify()`, and the
  value decides: `Indeterminate` at `x = 0`, `ComplexInfinity` elsewhere. A
  numerator that reads a variable with an assigned value is not folded when it
  is boxed, so the answer follows a later assignment. The compiled branch above
  now gives 0 at `x = 0`. A limit does not take such a quotient as its value:
  `lim_{x→a⁺} x/(x−a)` with no assumption on `a` stays unevaluated.

- **A vector plus a matrix adds the vector to the rows** (ROADMAP CE-399). A sum
  of tensors whose shapes nest (the shape of each one is the start of the shape
  of the deepest) adds element `i` of the vector to row `i` of the matrix:
  `[1, 2] + [[1, 2, 3], [4, 5, 6]]` is `[[2, 3, 4], [6, 7, 8]]`, typed
  `matrix<integer^(2x3)>`. It was `Error("incompatible-dimensions", "2 vs 2x3")`
  for two list literals, while the same sum of symbols that held these values
  gave the matrix, as compiled JavaScript and `Less` did. The value is now the
  same on every route; a compiled `Sum` over a list that holds a matrix and a
  row gives it too, where it threw. Shapes that do not nest
  (`[1, 2, 3] + [[1, 2], [3, 4]]`, a 2 by 2 plus a 2 by 3 matrix) are still an
  `incompatible-dimensions` error. A product is not changed: a vector times a
  matrix is the matrix product.

### New Features

- **`couldMatch(other, { nonEmpty: true })`** (ROADMAP CE-397, Tycho row 429).
  `couldMatch()` answers `true` for two list types with no dimensions whatever
  their elements, because the empty list is a value of both. With the option, it
  answers whether a value that is not an empty collection has both types, so it
  tells a list of numbers from a list of points:
  `ce.type('list<number>').couldMatch('list<tuple<number, number>>', { nonEmpty: true })`
  is `false`, and `couldMatch('list<integer>', { nonEmpty: true })` is `true`.
  Only the outer collection must be non-empty: `[[]]` is a value of both
  `list<list<number>>` and `list<list<string>>`. The `couldMatch` documentation
  no longer says that `list<integer>` could not be a `list<string>`.

### Resolved Issues

- **`FindFit` with `global: true` searches an even function of a periodic term
  on a fine enough grid** (ROADMAP CE-176, Tycho row 407). The grid spaces a
  searched frequency by the period of the expression around the periodic
  function. An even outer function (`Cos`, `Sec`, `Cosh`, `Sech`) of a term that
  changes sign under a half-period shift has half the period of the term:
  `cos(cos θ)` and `sec(sin θ)` have the period π, `cos(sin θ cos θ)` has π/2.
  The grid recorded 2π (or π), so it was twice as coarse as the basins of the
  residual. `cos(sin θ + 1)`, `cos(sin² θ)` and `sin(cos θ)` keep their period.

- **The type of an element-wise operation over a list of tensors or a
  `broadcastable` operand** (ROADMAP CE-398, Tycho row 430). Three kinds of
  static type did not hold the value, or said less than they could:
  - A list whose elements are each a number or a tensor
    (`list<broadcastable<number>>`, `list<tensor<number>>`) is not one tensor,
    because two elements can have different ranks (`[1, [2, 3], [[4]]]`). An
    element-wise operation over it is now typed `list<broadcastable<…>>`: with
    `U: vector<real^3>` and `M: list<broadcastable<number>>`, `U + M` is
    `list<broadcastable<number>>`. It was
    `list<broadcastable<number> | list<any>>`, an arm with no layout on the
    compiled routes. `Sin(T)` with `T: list<tensor<number>>` was typed `tensor`,
    which `[[sin 1, sin 2], [[sin 3]]]` is not.
  - An operand declared `broadcastable<number>` may hold a matrix. Beside a
    vector, the result was typed as if the operand was a number: with
    `B: broadcastable<number>` holding a 3 by 2 matrix, `U + B`, `U^B` and
    `U < B` evaluate to 3 by 2 matrices, but were typed `vector<3>` and
    `list<boolean^3>`. They are now typed `tensor` and `tensor<boolean>`. A
    union with a `broadcastable` arm (`broadcastable<real> | integer`) is read
    the same way.
  - `U·B` was typed `broadcastable<real>`, the cells of `U`: with `B = i` it is
    `[i, 2i, 3i]`. A product with a `broadcastable<E>` factor beside a
    collection now takes the tier of `E` (`tensor` here). A product of a list
    literal and such a factor (`[1, 2]·b`) is `broadcastable<number>`, not
    `vector<2>`: when `b` holds a matrix the product is a matrix product
    (`[1, 2]·[[1, 2, 3], [4, 5, 6]]` is `[9, 12, 15]`).

  A comparison of an element-wise application over an abstract collection with a
  list (`Sin(P) < [1, 2]` with `P: collection<number>`) is now typed
  `tensor<boolean>`, not `list<boolean^2>`: `Sin(P)` is typed
  `broadcastable<number>`, which admits a matrix.

## 0.163.0 _2026-10-23_

### Breaking Changes

- **Residue classes have a type of their own, `residue`** (ROADMAP CE-136,
  [#471](https://github.com/cortex-js/compute-engine/issues/471)). A residue
  class, an element of ℤ/nℤ, had the type `value`, and the engine kept the
  number rules (`c/c` is 1, `c - c` is 0) away from it by looking for an
  operator named `ResidueClass`. A head with another name got no protection:
  with `MyMod` declared `(any, any) -> value`, `MyMod(2, 4)/MyMod(2, 4)`
  simplified to `1`, although 2 has no inverse modulo 4. The type now does what
  the name did:
  - `ResidueClass(k, n)` is typed `residue`, arithmetic over classes too
    (`c · [1, 2]` is a `list<residue^2>`, `NaN + c` is `nan | residue`), and
    `ℤ/nℤ` is a `set<residue>`. `residue` is a value, not a number: it is
    disjoint from every numeric type, `residue | integer` is a union, and a
    symbol declared `residue` refuses an integer (`ce.assign('r', 2)` throws; an
    integer is a representative of a class, not the class).
  - The arithmetic operators that have residue arithmetic (`Add`, `Subtract`,
    `Multiply`, `Divide`, `Negate`, `Power`, `Square`, `Sqrt`, `Root`) name
    `residue` in their parameter types. Every other operator refuses a class at
    boxing with an `incompatible-type` error: `Sin(c)`, `Floor(c)`, `Mod(c, 5)`
    were admitted and stayed unevaluated. The `incompatible-type` error of these
    nine operators names the new parameter type: `Sqrt("banana")` reports
    "expected `complex | infinity | residue`", where it reported
    `complex | infinity`. `Max(c, x)` and `Min(c, x)` refuse a class too, as an
    operand, an element of a list or an element of `ℤ/nℤ`: classes have no
    order. The call is typed `error` when it is boxed and evaluates to an
    `incompatible-type` error (`Max(c, x)` was typed `number` and stayed
    unevaluated).
  - The protection reads the type: an operator declared to return `residue`
    (`ce.declare('MyMod', { signature: '(any, any) -> residue' })`), a function
    whose inferred signature returns it (`g := k ↦ ResidueClass(k, 4)` is
    `(unknown) -> residue`), and a symbol declared `residue`, which is protected
    before it has a value (`r/r` stays `r/r`). A head with another name gets the
    admission and the protection, not the arithmetic of `ResidueClass`: a sum or
    a product of its values stays unevaluated (a hook for the head to supply
    that arithmetic is planned, ROADMAP CE-507). A symbol typed `value` or left
    undeclared is still read as a possible number: `w/w` is `1` for it.
  - A juxtaposed class is a product: `\overline{3}_{7}x` parses to `Multiply`,
    not to a tuple. `compile()` declines an expression typed `residue` or one
    that holds a class; an expression that only may hold one (a parameter typed
    `number | residue`) compiles. The documentation lists the type in
    `doc/08-guide-types.md`, the rules in `docs/TYPE-SYSTEM.md`, and how an
    operator declares it in `doc/06-guide-augmenting.md`.

- **A comparison with an absent number is absent** (ROADMAP CE-93, Tycho row
  411). With `w: number | missing` holding `Missing`, `w > 0` was `False`: a
  numeric slot read its absent value as `NaN`. But `If(w > 0, 1, 0)` had no
  value (the absent-condition error), so the two forms disagreed. A comparison
  (`<`, `≤`, `>`, `≥`, `=`, `≠`, chained or not) with an absent operand is now
  `Missing`, in a numeric slot too, and it is typed `boolean | missing`. The
  broadcast form agrees: `[1, 2] < w` is `[Missing, Missing]`. A `NaN` is a
  value, and a comparison with it keeps the IEEE answer; arithmetic still reads
  an absent number as `NaN` (`w + 1 < 2` is `False`). Compiled JavaScript and
  Python give the absent value (`undefined`, `None`) when such an operand is
  passed absent, where JavaScript gave `false` and Python raised a `TypeError`;
  a chain is read link by link, so `5 < 0 < w` is `false`. On GLSL and WGSL an
  absent number can only be `NaN`, and these comparisons compile as before, with
  the IEEE answer. A chained comparison with an operand that has an effect
  (`0 < w < Random()`) and an operand that may be absent no longer compiles;
  with `fallback` (the default) `compile()` runs the interpreter. One case
  compiled numeric code cannot tell apart: a local variable that holds the `NaN`
  of an `If` with no else branch is read as a value. Rule:
  `docs/ERROR-MODEL.md`.

### New Features

- **Factoring over a number field** (contributed by KingArth0r, #469).
  `Factor(polynomial, variable, generator)` factors over the algebraic extension
  of the rationals that `generator` selects. The generator can be an exact
  radical (`√2`, `∛2`), `ImaginaryUnit`, or the new
  `AlgebraicGenerator(List(c₀, c₁, …))`: a root of the irreducible polynomial
  with these rational coefficients in ascending order, with no numerical
  embedding chosen. `Factor(x^2 - 2, x, √2)` is `(x - √2)(x + √2)`; over the
  rationals, `x^2 - 2` stays irreducible. The result is exact, also under
  `.N()`. A request that the engine cannot answer within its limits (a
  coefficient it cannot read, an unsupported generator, the operation budget)
  stays unevaluated; it is never factored over the rationals instead, and an
  unevaluated result is not a proof of irreducibility. A power of a generator at
  or above the degree of its polynomial is reduced, as `(√2)^2` is 2: for α a
  root of t² - 2, `α^2` is 2 and `Expand((x - α)(x + α))` is `x^2 - 2`. The one-
  and two-argument forms of `Factor` are unchanged. Examples and limits:
  [number-field factoring](https://github.com/cortex-js/compute-engine/blob/main/docs/number-field-factoring.md).

### Performance

- **`Solve` of a polynomial whose roots have closed forms is about 4 times
  faster** (ROADMAP CE-385). `x^4 + x^2 - 1 = 0` takes 1.0 ms, where it took 4.1
  ms in 0.162.0 and 1.9 ms in 0.133.0. The roots that the closed-form formulas
  give for the equation itself (a quadratic, a pure power `a·xⁿ + b`, or a
  polynomial in `xᵍ` that reduces to one of these) are exact by construction, so
  they are no longer substituted back into the equation, and repeated roots
  among them are found by comparing the expressions. Before, each root was
  substituted and the residual, an exact constant such as
  `(-1/2 + √5/2)^2 + (-1/2 + √5/2) - 1`, was proved zero by refining it at
  increasing precision. The roots of every other route (squaring, a change of
  variable, the rational-root search, the numeric root finder) are still
  checked.
- **Symbolic operations are 10% to 30% faster** (ROADMAP CE-385). Compared with
  0.162.0: `D(x^3, x)` and `Expand((x + 1)^3)` take about 0.7 of the time,
  `evaluate()` and `simplify()` of small expressions about 0.8, and
  antiderivatives and definite integrals 0.7 to 0.8. The type of a new
  expression is derived with less work when its operands are numbers: the check
  for an element-wise application over a list is skipped, and fewer objects are
  created for each operand. A product with no sum, no `Negate`, no `Divide` and
  no matrix among its factors is built once instead of twice. An indefinite
  integral no longer prepares the residue method, which applies only to some
  definite integrals, and the check of a function type is done once per type.
  The results are the same.

### Behavior Changes

- **A branch on `NaN ≠ x` takes its first arm** (ROADMAP CE-125). `NaN ≠ 2` is
  `True`, but `If(NaN ≠ 2, 1, 0)` and, with `b` holding `NaN`,
  `Which(b ≠ 2, 1, True, 0)` took no arm: `Missing` in the interpreter, `NaN` in
  compiled JavaScript and Python. A statement-form `If` ran neither branch. The
  element-wise form gave the IEEE answer, so `Which([1, b, 3] ≠ 2, 1, True, 0)`
  was `[1, 1, 1]` and its second element did not match the scalar form. A branch
  now uses the value `True` of a `≠` with a `NaN` operand, as it already used
  the value `False` of `<`, `≤`, `>`, `≥` and `=`: the examples give `1` on the
  interpreter, JavaScript and Python. An absent operand (`Missing`, an input the
  caller leaves out) still leaves the branch without an arm. Rule:
  `docs/ERROR-MODEL.md`.

- **A chained comparison with a `NaN` pair is `False`** (ROADMAP CE-94, Tycho
  row 413). `0 < NaN < Missing` was `Missing`, while `0 < i < Missing` was
  `False`: a pair with no order stopped the chain, but a `NaN` pair did not, and
  the absent operand won. A pair with a `NaN` operand now makes the chain
  `False`, wherever the absent operand sits (`Missing < 0 < NaN` is `False`
  too), on the interpreter and in compiled JavaScript and Python, which gave
  `undefined`/`None`. A chain whose every pair has the absent operand stays
  absent: `NaN < Missing < 0` is `Missing`. `Undefined` is read as absent in a
  chain as `Missing` is: `NaN < Undefined < 0` and `i < Undefined < 0` are
  `Missing`, where they were `False`. Also fixed: compiled code decides a branch
  over a chain link by link, as the interpreter does, so with `x = 1` and `w`
  (`number | missing`) absent, `If(x < 0 < w, 1, 2)` gives `2`, where it gave
  `NaN`. Rule: `docs/ERROR-MODEL.md`.

- **`.N()` of an integral whose integrand has no value is `NaN`** (ROADMAP
  CE-177, Tycho row 411). `Integrate(Which(t > 5, 1), Limits(t, 0, 1)).N()`
  stayed unevaluated: no sample of the integrand was a number, and the integral
  was kept as if the integrand held an unknown symbol. `NIntegrate` and the
  compiled routes gave `NaN`. When every sample is the undefined value (`NaN`, a
  selection with no selected arm, arithmetic with `Missing`), the integral is
  now `NaN` under `.N()`, also for a double integral; `∫₀¹ t·Missing dt` is
  `NaN` too. An integrand that still holds a free symbol (`∫₀¹ t·D dt`, an
  undeclared `g(t)`) stays symbolic.

### Resolved Issues

- **A product over a list of elements of unknown type, or over rows, was typed
  `unknown`** (ROADMAP CE-374). `Product(L)` of an operand that is not a list
  literal becomes `Reduce(L, Multiply, 1)` at canonicalization, and the type of
  a `Reduce` is the reducer's own result type, which is `unknown` for `Multiply`
  over an element of unknown type: with `L: list<unknown>`, `Sum(Rest(L))` was a
  `broadcastable<number>` and `Product(Rest(L))` was `unknown`; with
  `V: list<vector<2>>`, `Product(Rest(V))` was `unknown` too. A seeded `Add` or
  `Multiply` fold with the identity as its seed is now typed as `Sum` or
  `Product` type the collection when the elements are of unknown type or are
  numbers or rows: `Product(Rest(L))` is a `broadcastable<number>` and
  `Product(Rest(V))` is `integer | vector<2>` (the seed for an empty list, or a
  row). A tuple arm keeps the reducer's typing, and `Scan` keeps its running
  values.
- **Compiled `Equal` and `NotEqual` read a `NaN` operand as absent and answered
  `Missing` where the interpreter answers `False` or `True`** (ROADMAP CE-386).
  With `g := t ↦ [t, 2t]` and `x: any`, the element `g(x)[5]` at `x = 3` is
  `NaN` (an index past the end of a list of numbers), and the interpreter
  answers `False` for `g(x)[5] = 1` and `True` for `g(x)[5] ≠ 1`. The compiled
  equality over an operand that may hold an object-domain absence (here typed
  `missing | number | vector<2>`) carried a guard that read `NaN` as absent, and
  answered `Missing`. The guard now tests the object absence only (`undefined`):
  a `NaN` operand compares as IEEE says on both routes, and `g(x)[5] = 1` at
  `x = "a"`, where the element is the object absence, still answers `Missing` on
  both. `IsMissing` and `Coalesce` keep reading `NaN` as absent. The guard is
  also emitted for an element read or a call typed `any` or `unknown`, which
  admits the absent value without a `missing` arm (a declared symbol of such a
  type stays the scalar the host passes): with `g: (unknown) -> list`, the
  element `g(x)[1]` is typed `any`, and `g(x)[1] = 1` at `x = []` answered `NaN`
  where the interpreter answers `Missing`. Each operand of the guarded
  comparison that is a call or an element read, or that is impure, is now
  evaluated once: `Equal(g(x)[1], Random())` drew twice, in the absence test and
  in the comparison.
- **`.N()` of an integral that diverges at an infinite bound gave a random value
  or `NaN`** (ROADMAP CE-391). `evaluate()` gives `+∞` for `∫₀^∞ eˣ dx`, but
  `.N()` gave a Monte-Carlo estimate that changed at each run
  (`5007912 ± 2900000`), and `NaN` for `∫₀^∞ x dx`. When the integrand has one
  sign on the interval and does not decay faster than `1/x` (or overflows) on
  the infinite tail, `.N()`, `NIntegrate` and a compiled integral now give `+∞`
  or `−∞`. When the sign changes, `.N()` and `NIntegrate` take the answer of the
  exact route, as compiled code already did with the closed form:
  `∫₀^∞ (x − 1) dx` is `+∞` and `∫₀^∞ (eˣ − 5) dx` is `+∞` (it was a Monte-Carlo
  value). An integral with no value (`∫₀^∞ sin x dx`, `∫_{−∞}^∞ x dx`) still
  gives `NaN`.
- **`.N()` of `∫₀^∞ x¹⁰⁰·e⁻ˣ dx` was wrong by 45 orders of magnitude** (ROADMAP
  CE-394). It gave `1.9·10¹¹² ± 1.8·10¹¹²`; the value is `100! ≈ 9.3·10¹⁵⁷`. In
  double precision `x¹⁰⁰` is `∞` and `e⁻ˣ` is `0` past `x ≈ 1200`, so the
  integrand was `NaN` on the tail, the quadrature did not converge, and Monte
  Carlo missed the peak. Where a product of powers and exponentials is not
  finite, it is now computed again as `exp(100·ln x − x)`, on `.N()`,
  `NIntegrate` and compiled code: the result is `100!` to 10 digits. An integral
  too large for the change of variable of the quadrature (`170!`) is `NaN`, not
  a random value.
- **A definite integral over a half-infinite interval with a pole at its finite
  bound was `ComplexInfinity`** (ROADMAP CE-391). `∫₀^∞ (x − 1)/x³ dx` and
  `∫₀^∞ −1/x³ dx` gave `ComplexInfinity`, which is not the value of a real
  integral. They are now `−∞`: the sign of the integrand next to the pole
  decides, and the antiderivative at the infinite bound tells whether the tail
  adds a divergence of its own. When it adds one of the other sign
  (`∫₀^∞ (x − 1)/x² dx`), the integral has no value and is `Indeterminate`.
- **A function that receives itself as an argument and recurses through a lazy
  `Map` stayed unevaluated** (a regression in 0.160.0,
  [#470](https://github.com/cortex-js/compute-engine/issues/470), ROADMAP
  CE-387). With
  `G = (self, t) ↦ If(Length(t) = 0, 0, Max(Map(c ↦ self(self, c), t)) + 1)`,
  the height of a tree given as nested lists, `Apply(G, G, [[[], []]])` gave the
  `Apply(…)` back, where 0.159.0 gave `2`; `Reduce` and `Sum` in place of `Max`
  failed the same way. The body scope of a function literal is shared by its
  applications, and an application hides its parameters there, so that the body
  reads the values of its call frame. A nested application of the same literal
  put the parameters back when it ended, and a canonicalization of the literal
  during an application declared them again, while an enclosing application
  still read its parameters through that scope: the next element of the lazy
  `Map` then read `self` with no value. The parameters now come back when the
  last application ends, and a canonicalization during an application uses the
  hidden bindings.

- **The signature of a function literal read a captured parameter as a number
  cell in a nested literal** (ROADMAP CE-379). With `g := x ↦ (() ↦ [x])`, the
  signature was `(unknown) -> () -> vector<1>`: the nested literal has a type of
  its own, and its own typing read the captured `x` as a number cell, while
  `x ↦ [x]` is `(unknown) -> list<unknown>` since 0.162.0. The value `["a"]` of
  `g("a")()` does not fit a `vector<1>`. The derivation of a signature now types
  a nested literal again with the parameters of the enclosing literals added to
  its own: `g` is `(unknown) -> () -> list<unknown>`, `x ↦ (() ↦ [[x]])` is
  `(unknown) -> () -> list<list<unknown>>`, and a parameter of the nested
  literal that shadows the captured name is read as its own
  (`x ↦ ((x: real) ↦ [x])` keeps `(real) -> vector<real^1>`). A use that narrows
  the parameter keeps the number cell (`x ↦ (() ↦ [x + 1])` is
  `(unknown) -> () -> vector<1>`). An ascribed result of the nested literal is
  kept, and so are the arms of an early `Return` of its body; a call of the
  nested literal inside the body is typed from the derived result.
- **`Solve` of a polynomial with large terms gave a root that is not a root, or
  lost a root.** The rational-root search tested each candidate by the value of
  the polynomial at 21 digits, and a candidate was taken for a root when the
  terms were large: `x³ − 10¹²x² + 10¹² = 0` gave the root `10¹²`, whose value
  is `10¹²`, and the true root next to it was then removed as its duplicate, so
  the list held 2 of the 3 roots; `x⁹ − 1000x⁸ + 1000 = 0` held 8 of its 9
  roots. A candidate is now an exact rational, tested with exact arithmetic. A
  root found by the numeric root finder whose value is an integer is now a float
  (`1000000000000.0`), not an exact integer, so the exact check no longer
  rejects the root that it approximates. A rational root of a polynomial of
  degree 3 or more is now exact: `2x³ − 3x² − 3x + 2 = 0` gives `−1`, `1/2` and
  `2` (it gave `0.5`).

- **Compiled code declined a call of a user function whose argument is an
  untyped free input** (ROADMAP CE-377). With `g := t ↦ [t, 2]` and `x` free,
  the signature of `g` is `(unknown) -> list<unknown>`, so the engine types
  `g(x)[1]` as `unknown`, and the complex lane of the JavaScript target declined
  `g(x)[1] + g(x)[2]` ("scalar arithmetic over a list-valued operand");
  `Trace(m(x)) + 1` with `m := t ↦ [[t, 1], [2, 3]]` declined the same way, and
  `Sum(1 + v(x)[2], k from 1 to 3)` with `v := s ↦ [s, k]` and `k = i` declined
  in every mode. The emitted code reads an untyped free input as one scalar
  (`x + 1` is `_.x + 1`), so the compiler now types an operand with each such
  input read as a number, with the engine's own derivation: `g(x)` is a
  `vector<2>`, `g(x)[1]` is a `number`, and the operand is a scalar. The three
  expressions compile in every mode, with the interpreter's values; a call keeps
  its run-time broadcast, so an input that holds a list at run time still maps
  the call over it. The shader targets read the static length of such a call's
  result the same way: `v(x)[2] + 1` with `v := s ↦ [s, 2s]` compiles to
  `(_fn_v(x)).y + 1.0` on GLSL and WGSL, where it declined ("the base (type
  `list<unknown>`) has no statically known length"); a list with a complex
  element still has no shader value, and the decline now names that element. The
  decline of an operand that only may be a list at run time, `h(x) + 1` with
  `h: (unknown) -> unknown` and no body, names the operand and its type ("a
  possibly list-valued operand (`h(x)`, of type `unknown`)"), where it said "a
  list-valued operand".
- **Compiled JavaScript gave `NaN` or `false` for an absent element where the
  interpreter gives `Missing`** (ROADMAP CE-368). With `g := t ↦ [t, 2t]` and
  `x: any`, the element `g(x)[5]` is absent at `x = [1, 2, 3]` (the index is
  past the end) and at `x = []`, and the interpreter answers `Missing` for
  `g(x)[5] + 1`, `Sin(g(x)[5])`, `-g(x)[5]`, `g(x)[5]·g(x)[5]` and
  `g(x)[5] < 1`. The compiled code spelled the absent element `undefined` and
  applied the scalar function to it: `NaN`, or `false` for the comparison. The
  run-time broadcast (`_SYS.bcast`) and the checked product (`_SYS.mulChecked`)
  now answer `undefined` when an operand is absent beside scalars only, and a
  compiled comparison answers `undefined` for an absent cell. Beside a present
  list the absent operand is still `NaN` in each cell (`g(x)[5] + [1, 2]` is
  `[NaN, NaN]` on both routes, and so is `g(x)[5] + g(x)[1]` at `x = [1, 2]`),
  and a comparison with a list answers an absent cell for each
  (`g(x)[5] < [1, 2]` is `[Missing, Missing]`). The compiled `Sum` of a list
  with an absent element is unchanged (`NaN`, a numeric slot, as in the
  interpreter). The ten tests of
  `tycho-row-425-index-of-broadcastable-call.test.ts` that recorded the
  divergence are agreement checks again.

- **A surplus tuple operand of `Numerator`, `Denominator` or
  `NumeratorDenominator` gave a tuple of errors**
  ([#467](https://github.com/cortex-js/compute-engine/issues/467), contributed
  by [enumeratio](https://github.com/enumeratio)). A call with an operand past
  the declared arity is one `unexpected-argument` error when the surplus operand
  is a tuple, as it is for a list: `Numerator(3/2, (1, 2))` was
  `(Error, Error)`, a tuple of two errors, and is now the one error. The type of
  the call is no longer lifted over a surplus list or tuple (it was `list<…>` or
  `tuple<…>`): it keeps the declared result type of the operator,
  `nothing | number` for `Numerator` and `Denominator` and
  `nothing | tuple<number, number>` for `NumeratorDenominator`.

- **`simplify()` gave `False` for a relation whose two sides are the same
  function call.** `f(a) = f(a)`, `sin(a) = sin(a)` and `g(x) + 1 = g(x) + 1`
  simplified to `False`, and `f(a) ≠ f(a)` to `True`; `evaluate()` gave the
  correct values. The simplifier rewrote the relation as `f(a) - f(a) = 0`, that
  is `0 = 0`, and the factoring step then divided both sides by their common
  coefficient, 0, which gave `NaN = NaN`. Such a relation now stays as it is, as
  `x = x` does, and `Factor(0 = 0)` is `0 = 0` (it was `NaN = NaN`). The same
  error made `Equal(c, c)` `False` for a value `c` of an extension head
  ([#471](https://github.com/cortex-js/compute-engine/issues/471)).

- **Compiled folds over elements of unknown type, absent elements, and
  booleans** (ROADMAP CE-380, CE-381, CE-382). Three kinds of compiled
  JavaScript folds (`Sum`, `Product`, `Reduce`, `Scan`, and `Max`, `Mean` and
  the other statistics) disagreed with the interpreter:
  - With `L: list<unknown>`, `Sum(L) + 1` and `Product(L) · 2` did not compile,
    although `L` usually holds real numbers. They now compile, and a complex
    entry of the fold is added as complex: over `[[1, 2], [i, 3]]`, `Sum(L) + 1`
    is `[2 + i, 6]` and `Reduce(L, Add, 0) + 1` is `[2 + i, 6]`; the second gave
    `["[object Object]1", 6]`. In the `complex` mode, the same parents over
    `list<list<number>>` compile too, and a bare `list` is read as a list whose
    cells may be complex, as `list<unknown>` is: `L + 1` over `[i, 2]` gave
    `["[object Object]1", 3]`. In the default mode, a complex entry in a list
    input that the code reads as real is still the host's responsibility.
  - JavaScript reads `null` as 0 in `+`, `*` and `Math.min`. With
    `L: list<number | missing>` and `[2, null, 3]`, `Scan(L, Multiply, 1)` gave
    `[2, 0, 0]`, `Reduce(L, Add, 0)` gave `5` and `Reduce(L, Min)` gave `0`;
    `Reduce(L, Multiply, ImaginaryUnit)` threw. Each is now `NaN` from the
    absent element on, as in the interpreter (`[2, NaN, NaN]`, `NaN`). The
    `Product` and `Sum` of rows with an absent entry (`[[2, null], [3, 4]]`) are
    `[6, NaN]` and `[5, NaN]` (they were `[6, 0]` and `[5, 4]`), and a matrix
    product reads an absent cell as `NaN`.
  - The `Sum` and `Product` of a list of booleans or strings (`list<boolean>`,
    `list<list<string>>`), the `Reduce` and `Scan` of a list of booleans with
    `Add`, `Multiply`, `Min` or `Max`, and the `Max`, `Min` and `Mean` of a list
    of booleans no longer compile; the interpreter gives an `incompatible-type`
    error or leaves `Max(True, False)` unevaluated. The compiled `Sum` of
    `[[true], [false]]` was `[1]`. With `fallback` (the default), `compile()`
    runs the interpreter for these.

- **Compiled `Multiply` of a fold and a matrix did not compile** (ROADMAP
  CE-388). With `M: matrix<number>` and `L: list<matrix<number>>` (or
  `list<tensor<number>>`, or `list<unknown>`), `Sum(L)·M`, `M·Reduce(L, Add, 0)`
  and `2·Sum(L)·M` were refused at compile time, so `compile()` ran the
  interpreter. They now compile to the matrix product, decided on the shapes of
  the values as in the interpreter: `Sum(L)·M` is `[[2, 2], [5, 3]]` for
  `L = [[[1, 2], [3, 4]], [[1, 0], [0, 1]]]` and `M = [[0, 1], [1, 0]]`. With
  complex entries (`L: list<matrix<complex>>`, or an `At(P, 1)` of complex
  matrices) the product is computed as complex; such products were refused too.
  A factor that may hold points (`Sum(L)` over a list of lists of points, or
  over `list<list<unknown>>`) beside a matrix is still refused: compiled code
  holds a point as an array, and the interpreter scales the matrix by the point.

- **`Multiply` of a lazy collection and a matrix paired their elements**
  (ROADMAP CE-390). The value of `Scan`, `Reverse` or `Map` is a lazy
  collection, and `Multiply` read it as a plain collection: beside a matrix, it
  paired each element with a row of the matrix. With `L` holding the vectors
  `[1, 2]` and `[3, 4]` and `M = [[0, 1], [1, 0]]`, `Reverse(L)·M` was
  `[[0, 4], [1, 0]]`; it is now the matrix product `[[4, 3], [2, 1]]`, as for
  the list literal `[[3, 4], [1, 2]]`. A lazy collection of vectors or matrices
  is read as the tensor of its elements: `Scan(L, Add, 0)·M` over a list of
  matrices now stays unevaluated (a tensor of rank 3 beside a matrix), as the
  same list literal does, where it gave a value. A lazy collection whose
  elements have no known type (`Map(Reverse, L)`) is read from its values when a
  matrix is beside it; two such collections keep the product of each entry, as
  compiled code computes it. A point in such a collection stays a point.

- **A list literal with an absent cell had no dimensions** (ROADMAP CE-389).
  `[[2, Missing], [3, 4]]` was typed `list<list<integer | missing>>`, while
  `[[2, 3], [3, 4]]` is a `matrix<integer^(2x2)>`. So it could not be assigned
  to a symbol declared `matrix<(number | missing)^(2x2)>`, `Shape` and `Rank` of
  it were `()` and `0`, `Multiply` of two such matrices paired their rows, and
  `Determinant` and `Inverse` were an `incompatible-type` error. A literal whose
  cells are numbers that may be absent now has the dimensions of its shape
  (`matrix<(integer | missing)^(2x2)>`, `Shape` `(2, 2)`), and an absent cell is
  read as `NaN` where a number is needed, as for an absent operand:
  `[[2, Missing], [3, 4]]·[[1, 0], [0, 1]]` is `[[NaN, NaN], [3, 4]]` (the value
  compiled code gives), its `Determinant` is `NaN`, and its `Trace`, which reads
  the diagonal only, is `6`. `Transpose`, `Flatten` and the other operators that
  move cells keep the absent cell. The type of such a literal, and of a
  broadcast over it, now carries its length: `[1, Missing]` is typed
  `list<(integer | missing)^2>`, and `Sin([Missing, 1])` `vector<2>`.

## 0.162.0 _2026-10-23_

### Breaking Changes

- **`Multiply` of two matrices is the matrix product, however the factors are
  written** (ROADMAP CE-98). A product of two matrix values is now the matrix
  product, as `MatrixMultiply`, also when the factors are symbols typed
  `tensor<number>`, `list<list<number>>`, `list`, `any`, `broadcastable<number>`
  or `number | matrix`, and under `.N()`. Before, a product of two such symbols
  multiplied each entry (and `.N()` did so even for `matrix<number>` symbols),
  while a literal or computed factor gave the matrix product; so `p·p` now
  equals `p^2`. **Migration:** use `HadamardProduct(p, q)` for the product of
  each entry. Unchanged: a vector or a plain list times a vector or a plain list
  multiplies each entry, and a number times a matrix scales each entry. Related
  changes:
  - The canonical form keeps the written order of factors that may be matrices
    (`q·p` stays `q·p`; `p·q − q·p` is no longer 0), and `isSame()` and the hash
    tell them apart. `simplify()`, `Expand`, `Factor` and `D` keep that order:
    `(A·B)^2` is no longer `A^2·B^2`, the product rule of `D` keeps each factor
    in place, and `D(f^n)` for a matrix-valued `f` uses the matrix rules
    (`D(f^-1) = -f^-1·f'·f^-1`). A sum with a term that may be a number beside a
    term that may be a matrix is not expanded, because a number added to a
    matrix is added to each entry.
  - Matrices whose dimensions do not agree give
    `Error("incompatible-dimensions", …)` (the product stayed unevaluated), and
    the result type of a product of matrices has the dimensions of the matrix
    product (`matrix<2x3>·matrix<3x4>` is `matrix<2x4>`).
  - Two tensors of rank 3 of the same length multiply each pair of matrices, as
    `Power` does; a tensor of rank 3 beside a matrix or a vector stays
    unevaluated; a number times a tensor of rank 3 scales every cell; a `Range`
    beside a matrix is read as a vector.
  - Compiled JavaScript: `matrix<…>` operands call the matrix product;
    `tensor<number>`, `list<list<number>>` and `broadcastable<number>` choose by
    the shape of the values when the code runs. Python uses `np.matmul` for
    matrix types. interval-js throws (its result is then `entire`) for a list of
    lists times another list. Types that may hold points (bare `list`,
    `list<unknown>`, `any`, `list<tuple<…>>`) keep the product of each entry,
    because compiled code stores a list of points and a matrix as the same array
    (ROADMAP CE-216.1); their compiled operand order now follows the written
    order. A list whose rows have different lengths, or that mixes numbers and
    lists (`[[1], [2, 3]]`), is not a matrix: its elements are paired with the
    elements of the other factors, as in the interpreter
    (`[[1], [2, 3]]·[[4], [5, 6]]` is `[[4], [10, 18]]`; it was `null` or wrong
    values). Two tensors of rank 3 multiply each pair of matrices, as in the
    interpreter (it threw, and a compiled `Product` gave `NaN` entries); a
    tensor of rank 3 beside a matrix or a vector throws when the code runs.
    Where the interpreter gives an `incompatible-dimensions` error, compiled
    code gives `NaN`. A compiled `Multiply` fold (`Product`,
    `Reduce(L, Multiply, 1)`, `Scan`) over elements of several shapes (numbers
    beside lists, a matrix beside a row, rows of different lengths) compiles and
    multiplies each step as the interpreter does; it was refused, or threw "the
    elements have incompatible dimensions" for a matrix beside a row. A compiled
    `Sum` still checks that its elements have one shape.
  - A product boxed while its symbols are `unknown` is still sorted: declare a
    matrix-capable type for the written order to be kept. `Divide(p, q)` of two
    matrices still divides each entry (`p·q^-1` is the matrix product).
  - The `Derivative` of a function declared with codomain `any` keeps that
    signature (it was typed `(any*) -> number`), so expressions built on it are
    typed `any` too.

- **`has()` on a dictionary is the symbol test; the key test is `hasKey()`.**
  `has(v)` asks whether the symbol (or function operator) `v` occurs in an
  expression, and a dictionary now answers that over the values of its entries,
  as every other expression does. Before, a dictionary replaced it with a key
  test: `ce.box({ dict: { a: { sym: 'u' } } }).has('u')` was `false` and
  `.has('a')` was `true`; now `.has('u')` is `true`, `.has('a')` is `false` (a
  key is a string, not a symbol, unless `a` also occurs in a value), and
  `.has('Dictionary')` is `true`. The key test moves to the new method
  `hasKey(key)` of `DictionaryInterface` (records included). **Migration:**
  replace `dict.has(key)` with `dict.hasKey(key)` wherever you test whether a
  dictionary or a record has a key. A call `dict.has(key)` still compiles,
  because `has()` exists on every expression, and now returns a different
  answer. The other symbol queries read dictionary values too: `.symbols`,
  `.unknowns`, `.freeVariables`, `.subexpressions`, `.errors` and the references
  of a dictionary, or of an expression that holds one, now include what its
  values hold (`.errors` of `{"a" -> Error("oops")}` lists the error, though the
  dictionary stays valid). `has()`, `.subexpressions` and these queries visit a
  value shared by several entries once.

- **A declared type is a contract on every value the symbol takes.** `s: string`
  now refuses `Missing` and `Undefined` as it refuses `5`, on the engine's
  assignment route and in Epsil (static check and run time alike); a declared
  element contract is checked too, so `xs: list<string>` refuses
  `["a", Missing]`. An author who wants absence writes it: `string | missing`,
  `list<string | missing>`, or a refining declaration (`list`, `list<unknown>`).
  A `number` declaration still admits `NaN`, the numeric absence marker, so a
  numeric restriction such as `3 {a > 0}` (typed `integer | nan`) binds to
  `n: number` as before; a restricted non-numeric value such as `(1, 2) {a > 0}`
  (typed `missing | tuple<integer, integer>`) needs
  `tuple<number, number> | missing`. This reverses the rule of 2026-09-09 under
  which a declared type described the successes only and a symbol declared
  `string` could report `string` while holding `Missing`. Decision P1 and P1b of
  `docs/plans/2026-10-21-presence-contracts-and-assertion.md`.

- **One default for an absent argument at a library parameter that excludes
  absence: it is refused.** An operator with no absence behavior of its own now
  answers an `incompatible-type` error naming the parameter when an absent value
  (`Missing`, `Undefined`) reaches a parameter typed as data that excludes
  absence (`string`, `boolean`, `value`, a color, …), as a user function does
  for the same argument. Before, the handler received the marker and answered as
  it happened to: `Parse(Missing)` and `IsSquareMatrix(Missing)` computed a
  value from it, `ToUpperCase(Missing)` was already an error. Unchanged: numeric
  and collection operators answer the marker of their result (`Sin(Missing)` is
  `NaN`, `Reverse(Missing)` is `Missing`), operators that own their absence
  semantics (`Length`, `Equal`, the reducers, `Coalesce`, `IsMissing`),
  operators that hold their operands (`Expand`, `Integrate`, `ForAll`), and a
  parameter typed `expression`, `symbol`, `any` or `unknown`. Decision P2.

- **A list type with no dimensions is read by its elements. A vector, a matrix
  and a tensor are read by their cells.** `list<T>` and `set<T>` now read `T` as
  the type of the elements, the values that indexing returns. A matrix of
  integers is a `list<vector<integer>>` and a `list<list<integer>>`. It is no
  longer a `list<integer>`. Before, the subtype relation also read `T` as the
  type of the cells (a list type with no dimensions "admitted any shape"), while
  indexing, the library and the compiler read `T` as the element type. The two
  readings together let a wrong value through: with `L: list<number>`, the
  assignment `L := [[1, 2], [3, 4]]` was accepted, `L[1] + 1` was typed `number`
  and gave `[2, 3]`, `Mean(L)` was accepted and failed at run time, and a
  compiled `Sum(L)` gave the string `"01,23,4"`. Now the assignment is refused:
  a value of type `matrix<integer^(2x2)>` is not compatible with `list<number>`.
  `list<integer>` and `list<list<integer>>` are not related. Their meet is
  `list<never>`, the type of the empty list `[]`, which is a value of both. For
  the same reason `couldMatch()` and `typesOverlap()` answer `true` for two
  lists with no dimensions, whatever their elements.

  `vector<U>`, `matrix<U>`, `tensor<U>` and `list<U^dims>` read `U` as the type
  of the cells, the values at the depth of the rank. The elements of a matrix
  are its rows: `matrix<integer>` is a `list<vector<integer>>`. A
  `list<vector<integer>>` is not a matrix, because its rows can have different
  lengths. A list has elements and may have a length (`list<T^n>`); `vector`,
  `matrix` and `tensor` have cells and may have a shape, written in one place:
  two rows of three integers are `matrix<integer^(2x3)>`, and a 2×3×4 array is
  `tensor<integer^(2x3x4)>`. Two spellings are now parse errors:
  - A list with two or more axes: `list<integer^(2x3)>`, `list<integer^2x3>`,
    `list<boolean^(2x?)>`, `list<T^(MxN)>`, `list<2x3>`. The message names the
    spelling to use: `list<boolean^(2x2)>` gives "A list type has one axis at
    most, its length (`list<T^n>`), but this type has 2 axes. Write
    `matrix<boolean^(2x2)>` instead". `list<U^n>` with one axis is valid.
  - A list with a length, a vector, a matrix or a tensor whose cells are lists:
    `list<list<integer>^2>`, `list<vector<integer^3>^2>`, `list<list^2>`,
    `matrix<list<integer>>`, `tensor<list<integer>>`. The message names the
    spelling with one shape (`list<list<integer^3>^2>` gives "Write
    `matrix<integer^(2x3)>`, with the shape in one place"); write
    `list<list<integer>>` for rows of any lengths.

  `vector`, `matrix` and `tensor` accept every cell type that is not a list:
  `matrix<boolean>`, `matrix<string^(2x2)>`, `vector<string^2>` (printed
  `list<string^2>`), `tensor<boolean>` and `tensor<tuple<number, number>>` are
  valid. Before, a `vector` or a `matrix` cell had to be able to hold a number,
  so `matrix<boolean>` was a parse error while `matrix<any>` was not. The bare
  names `vector`, `matrix` and `tensor` still mean number cells, so the
  linear-algebra operators, whose signatures use the bare names, still refuse a
  matrix of booleans. A printed type takes its head from its rank: rank 1 is
  `vector<…>` when the cells can hold a number and `list<E^n>` otherwise, rank 2
  is `matrix<…>`, rank 3 or more is `tensor<U^(…)>`, and an unknown rank is
  `tensor<U>`. The types themselves do not change, only their spelling:

  | Value                                 | Before                                | Now                                     |
  | ------------------------------------- | ------------------------------------- | --------------------------------------- |
  | `[True, False]`                       | `list<boolean^2>`                     | `list<boolean^2>` (same)                |
  | `[[1, 2], [3, 4]]`                    | `matrix<integer^(2x2)>`               | `matrix<integer^(2x2)>` (same)          |
  | `M < 3`, with `M := [[1, 2], [3, 4]]` | `list<boolean^(2x2)>`                 | `matrix<boolean^(2x2)>`                 |
  | `(1, 2) * M`                          | `list<tuple<integer, integer>^(2x2)>` | `matrix<tuple<integer, integer>^(2x2)>` |
  | `[["a", "b"], ["c", "d"]]`            | `list<string^(2x2)>`                  | `matrix<string^(2x2)>`                  |
  | a 2×3×4 array of integers             | `list<integer^(2x3x4)>`               | `tensor<integer^(2x3x4)>`               |
  | `Determinant` of a matrix of booleans | refused                               | refused (same)                          |

  `[(1, 2), (3, 4)]` is still `list<tuple<integer, integer>^2>`, and `Sin(M)` is
  `matrix<2x2>`.

  `tensor<U>` is an array of any rank (1 or more) with cells of type `U`, and
  bare `tensor` is a numeric array of any rank. Before, `tensor<U>` meant
  `list<U>` (`tensor<boolean>` was `list<boolean>`, which does not hold a matrix
  of booleans), and bare `tensor` meant `list<number>`. The element type of a
  `tensor<U>` is `U | tensor<U>`: a cell, or a tensor of a lower rank. A matrix
  of integers matches `tensor<integer>`, but not `list<integer>`. A `list<U>`
  with a number type `U` and a `vector<U>` denote the same values:
  `list<integer>` matches `vector<integer>`, and `vector<integer>` matches
  `list<integer>`.

  `broadcastable<T>` is `T | tensor<T>` for a `T` that cannot hold a list (a
  number type, `boolean`, `string`, a tuple, `integer | missing`). A matrix of
  numbers matches `broadcastable<number>`, a matrix of integers matches
  `broadcastable<integer | missing>`, and a `list<list<number>>` does not match
  `broadcastable<number>` (its rows can have different lengths).
  `broadcastable<boolean>` is `boolean | tensor<boolean>`, so the matrix of
  booleans that a comparison over a matrix gives is one of its values, and
  `broadcastable<tuple<number, number>>` is a point or an array of points of any
  rank. `broadcastable<T>` no longer matches `T | list<T>`: to accept a number
  or a numeric array of any rank, write `number | tensor`, and for booleans
  `boolean | tensor<boolean>`.

  The relation is covariant again: `vector<value>` matches `vector<any>`, and
  `list<expression^3>` matches `list<any^3>`. They did not match before. The
  meet of two lists with no dimensions is the list of the meet of their
  elements: `list<integer> & list<string>` is `list<never>`. A meet of two list
  types is `never` only when their shapes cannot be the same:
  `vector<integer^2> & vector<integer^3>` is `never`.

  Some result types change:
  - A broadcast over operands of different ranks, over an operand whose type is
    a union of ranks, or over a tensor of unknown rank, is typed `tensor<R>`,
    for a result `R` that cannot hold a list. With
    `U: list<integer> | matrix<integer>`, `U + 1` is `tensor<integer>` (it was
    `list<integer | vector<integer>>`). With `T: tensor<integer>`, `T < 3` is
    `tensor<boolean>`. With an operator declared `broadcastable: true` and the
    signature `(number, number) -> number`, the call with `[[1, 2], [3, 4]]` and
    `[10, 20]` is `tensor` (it was `list<number>`).
  - `Map` over a matrix whose function keeps the length of the rows keeps the
    shape of the matrix: with `h: (real) -> real`,
    `map(x ↦ h(x), [[1,2],[3,4]])` is `matrix<real^(2x2)>` (it was
    `list<vector<real^2>^2>`, a spelling that is now a parse error).
  - A generic function literal over a matrix keeps the shape of the operand:
    with `g` the literal `(x: T) -> tuple<T, T> where T` with the body `(x, x)`,
    `g([[1, 2], [3, 4]])` is `matrix<tuple<integer, integer>^(2x2)>` (it was
    `list<tuple<integer, integer>>`). Over a ragged list, see Resolved Issues.
  - A conditional protocol conformance `type list<T> is P where …` binds `T` to
    the elements of the receiver, as the generic solver does. For a matrix, the
    elements are the rows. With `type list<T> is Named where T: number`,
    `name([1, 2])` uses the conformance as before, but `name([[1, 2], [3, 4]])`
    now gives a `protocol-implementation-missing` error: `T` is
    `vector<integer^2>`, which is not a `number` (before, `T` was the cell type
    `integer`).
  - A cell pattern `vector<T>` or `list<T^N>` in a generic signature binds `T`
    to the cells of a tensor of rank 1, and a matrix no longer matches it:
    `first: (x: list<T^N>) -> T where T, N` applied to `[[1, 2], [3, 4]]` is an
    `incompatible-type` error (it was typed `vector<integer^2>`). A plain
    pattern `list<T>` binds `T` to the rows of the matrix.
  - `Norm` and `Trace` spell their tensor parameter `tensor` and accept a matrix
    as before. The result of `Integrate` spells its array arm `tensor`. `Mean`
    and the other statistics functions still accept a matrix when the expression
    is boxed, and refuse it when it is evaluated.
  - A broadcast over an operand that may hold a list of any depth is typed so.
    With `b: broadcastable<number>` holding a list, `-b` is `tensor` (it was
    `list<number>`, which does not hold a matrix value of `b`); with no value,
    it is `broadcastable<number>` as before. With `C: indexed_collection`,
    `C < 2` is `list<boolean | list<any>>` (it was `list<boolean>`): an element
    of `C` may be a list, which the comparison maps at its leaves.
  - A generic function applied to a union whose options the broadcast reads
    differently is typed one option at a time. With
    `f: (x: T) -> tuple<T, T> where T` and `u: list<integer> | set<integer>`,
    `f(u)` is
    `list<tuple<integer, integer>> | tuple<set<integer>, set<integer>>` (it was
    `list<tuple<list<integer> | set<integer>, …>>`, which holds neither value).
    An operand of type `collection<integer>`, which may be mapped or passed
    whole, gets both answers.
  - `PointX`, `PointY` and `PointZ` of a list of points have the type of the
    coordinate: `PointX` of a `list<tuple<string, number>>` is `list<string>`
    (it was `list<number>`), and of a `list<tuple<integer, integer>>` it is
    `list<integer>`. Over rows of points whose first row is empty,
    `PointX([[], [(1, 2), (3, 4)]])` is `[[], [1, 3]]` (it was
    `[Missing, (1, 2)]`). The compiled JavaScript refuses a point accessor over
    points whose coordinates may not be numbers, and throws a `RangeError` at
    run time on a value whose shape its type does not decide (numbers of rank 3
    or more beside points).

  This entry replaces these entries of 0.160.0, where they describe the reading
  of a list type:
  - "The type `broadcastable<T>` is now `T | list<T>`": for a `T` that cannot
    hold a list, the collection part is now `tensor<T>`. Every subtype of
    `list<T>` is still a `broadcastable<T>`, and a tuple is still not a
    `broadcastable<number>`.
  - "The meet (intersection) of two collection types of different kinds is the
    narrower kind with the meet of the elements": `list<number>` and
    `collection<list<integer>>` no longer share a matrix. The type reducer now
    gives `list<never>` for their meet.
  - "The overlap test of types (`typesOverlap()`)": two lists with no dimensions
    now always overlap, because the empty list is a value of both.
    `list<list<list<real>>>` and `list<number>` still overlap, but only through
    the empty list: they no longer share a tensor of rank 3.
  - "A list with dimensions whose element type is a top type (`vector<unknown>`,
    …) holds scalars, not lists": `list<list^2>` and `list<list<integer>^2>` are
    now parse errors. A matrix is still not a `vector<unknown>`, because the
    ranks are different.
  - "The meet of two collection types of the same kind no longer drops values
    that are in both": `list<number> & list<list<integer>>` is `list<never>`
    again, since no matrix is a `list<number>`, and the example
    `matrix<number^(2x2)> & list<list<integer>^2>` is now a parse error.
  - "The subtype relation of lists now reads a value in every way it can be
    read": the nested spelling read as its flat shape, the removal of outer axes
    by `collection<E>`, and `list<vector<integer^3>>` as a `list<integer>` are
    removed. `matrix<string>` and `vector<collection>` are now parse errors,
    `list<vector<integer^1>^2>` is a parse error, and `list<vector<integer^3>>`
    is not a `list<integer>`.
  - In Resolved Issues, "Subtype relation: `matrix<T>` is a subtype of
    `broadcastable<T>`": still true. `couldMatch()` still answers `true` for
    `list<integer>` and `list<list<integer>>`, but the reason is now the empty
    list: a matrix is not a value of `list<integer>`.

  The rules are in `docs/TYPE-SYSTEM.md`, section "Lists, tensors and
  `broadcastable`".

### New Features

- **`FixedPoint(f, x)` applies `f` from `x` until two successive values are the
  same.** It was declared but did nothing: a call stayed unevaluated.
  `FixedPoint(x => (x + 2/x)/2, 1.0)` is `1.414213562373095…`, and
  `FixedPoint(Cos, 1.0)` is `0.739085133…`, correct to the working precision.
  Two values are the same when they are identical, when they are numbers, one of
  them a float, that agree to the working precision, or when they are lists or
  tuples whose elements are the same. An optional third argument is the maximum
  number of applications (the engine iteration limit by default); when it is
  reached, the last value is returned. Without a maximum, a call that cannot
  converge stays unevaluated: `FixedPoint(Cos, 1)` (`Cos(1)` is exact, and each
  step nests it) and an exact iteration whose terms gain digits; `N` gives their
  numeric fixed point. The result type is the result type of `f`.

- **The presence assertion `x?!`** (`AssertPresent(x)` in MathJSON, `⁈` is an
  alias): the value of `x`, or an `expected-present` error naming the operand
  when `x` is absent (`Missing`, `Undefined`, `NaN`, `Indeterminate`, the set
  `isMissing` recognizes). `Nothing` passes through, an error operand
  propagates. Its type is the present part of the operand's type: `xs[i]?!` with
  `xs: list<string>` is a `string`, so `f(xs[i]?!)` is accepted at a parameter
  that excludes absence, and `let y: string = xs[i]?!` too. It is a postfix
  operator at the factorial's precedence and must abut its operand; as for
  `3! + 1`, write `x?! + 1`, not `x?!+1`. Compiled: JavaScript, the interval
  JavaScript target and Python raise with the message
  `expected-present: <operand> is absent`; the check is omitted when the
  operand's type already excludes absence (a declared length and a literal
  index, a type without `nan`); a shader target compiles the identity and does
  not read the assertion as a proof, so a later absence test on the value keeps
  its own rule (decision P5). Decision P4.

- **The Epsil static check narrows a symbol an `isMissing` guard proves
  present.** `if isMissing(v) { "none" } else { f(v) }`,
  `if !isMissing(v) && v != "b" { f(v) }` and `isMissing(v) || f(v) == "a"` are
  no longer reported at a parameter that excludes absence. A reassignment inside
  the region ends it; a function literal in the region is not entered.

- **The Epsil static check reports a possibly absent value wherever the run time
  refuses it**: at a library parameter that excludes absence (`trim(xs[i])`, as
  it already did at a `function`'s annotated parameter) and as the initializer
  of a declaration that excludes absence (`let y: string = xs[i]`). The
  discharges are the same everywhere: `xs[i]?!`, `xs[i] ?? fallback`, a guard,
  or a type that admits absence. Decision P3. A numeric read at a `real`,
  `integer` or `complex` declaration is reported too, since these types exclude
  `NaN`: `let r: real = zs[i]` for `zs: list<real>` (typed `nan | real`) was
  refused only when the program ran; write `zs[i]?!`, `zs[i] ?? 0`, or declare
  `real | nan`. A value with another type outside the declaration, such as
  `a / b` (`infinity | nan | real`), is not reported.

### Improvements

- **A Gaussian with a symbolic coefficient integrates to an error function**
  (Tycho row 428). `∫ exp(−z²/(2s²)) dz` is now
  `√(π/2)·√(s²)·Erf(z/(√2·√(s²)))`, and `∫ exp(z²/(2s²)) dz` the same form with
  `Erfi`; before, only a numeric coefficient (`∫ e^{−3z²} dz`) had a closed
  form. The sign of the coefficient is read as written when what remains after
  the sign is positive wherever it is defined, for every real value of the
  symbols (`1/(2s²)`, `e^a`): `∫ e^{−a z²} dz` with a bare `a` stays
  unevaluated, because at `a < 0` the `Erf` form needs an imaginary argument,
  which the compile targets do not have, and so do `∫ e^{−s² z²} dz` and
  `∫ e^{−|a| z²} dz`, whose closed form is `0/0` at `s = 0` or `a = 0` while the
  integrand is 1. A symbol declared `complex` disqualifies the reading. A
  definite integral with an infinite bound carries the condition the way
  `∫₀^∞ e^{−cx} dx` is `1/c {0 < c}`: `∫_{−∞}^{∞} exp(−z²/(2s²)) dz` is
  `√(2π)·√(s²) {0 < √(s⁻²)}`, and the normal distribution function
  `1/(√(2π)s) ∫_{−∞}^{x} exp(−½ z²/s²) dz`, with or without a mean, is a guarded
  closed form in `Erf`. Its compiled JavaScript calls `erf` instead of running a
  numerical quadrature at every call: 2 469 calls take 2 ms instead of 3.2 s,
  with the same values to 2e-15.

- **More operators have a precise static result type.** A type handler now
  derives the result from the operand types, where the declared result was a
  bare `dictionary`, `tuple`, `list`, `matrix`, `value` or `unknown`. Each type
  contains every value the operator can return for operands of those types; when
  the operand types do not decide it, the declared result stays.
  - `FindRoot` and `FindFit` are typed as their result record:
    `FindRoot(x^2 - 2, [(x, 1)])` is
    `record{parameters: record{x: real}, converged: boolean, residualNorm: nan | real | signed_infinity, iterations: integer, stationary: boolean}`
    (`FindFit` has no `stationary`). So the Epsil static check reports
    `let c: string = r.converged`.
  - The linear-algebra operators `Shape`, `PseudoInverse`, `LinearSolve`,
    `AdjugateMatrix`, `Kernel`, `MatrixMultiply`, `HadamardProduct`,
    `RowReduce`, `Diagonal`, `IdentityMatrix`, `ZeroMatrix`, `OnesMatrix`,
    `Eigenvalues`, `Eigenvectors`, `Eigen`, `LUDecomposition`,
    `QRDecomposition`, `CholeskyDecomposition`, `SingularValues` and
    `CharacteristicPolynomial` carry the dimensions and the cell type of the
    result: `PseudoInverse` of a 3×2 matrix is a 2×3 matrix, and
    `IdentityMatrix(3)` is `matrix<integer^(3x3)>`.
  - `TrigExpand`, `TrigToExp` and `TrigReduce` of a numeric operand are
    `number`; `TupleFrom` of a list of known length is a tuple of that many
    components (`TupleFrom([1, 2, 3])` is `tuple<integer, integer, integer>`).
  - A pipe whose stage is the name of a library operator is typed as the call:
    `16 |> Sqrt` is `real` (it was `unknown`), and `[3, 1, 2] |> Sort` is
    `list<integer>`. So the static check reports `let s: string = 16 |> sqrt`. A
    stage that names a user function is not typed: a function parameter with the
    same name may be the function that is called.

### Behavior Changes

- **The signature of a function literal says only what its body proves about a
  parameter of unknown type.** `g := x ↦ [x]` had the signature
  `(unknown) -> vector<1>`, which says that the element is a number, but
  `g(Set(1, 2))` is `[Set(1, 2)]` and `g("a")` is `["a"]`. The signature is now
  `(unknown) -> list<unknown>`: `x ↦ [x, 1]` and `(x, y) ↦ [x, y]` give
  `list<unknown>`, and `x ↦ [[x]]` gives `list<list<unknown>>`. A parameter that
  a use types as a number (`x ↦ [x + 1]`) and an annotated parameter
  (`(x: real) ↦ [x]`) keep the shape of the list. A call with a typed argument
  is typed from the body: with `m := t ↦ [[t, 1], [2, 3]]`, `m(2)` is a
  `matrix<integer^(2x2)>` and `m(r)` with `r: real` a `matrix<real^(2x2)>`; a
  call with a free symbol is typed by the signature, `list<list<unknown>>`. The
  reading of an operand typed `unknown` as a number stays where an operation
  demands a number: `x ↦ x + 1` is still `(unknown) -> number`. Consequences for
  a function with such a signature called with a free or an `any`-typed
  argument: an index into the call is typed `missing | unknown` (it was
  `missing | number | vector<2>`), a sum of its elements
  `broadcastable<number>`, and `Dot` of such an index the wide
  `missing | value`; the values are unchanged, and each type holds its value.
  With `f(x) := (-x, x)`, `h(a) := f([a, a])` is typed
  `(unknown) -> list<tuple<number, number>>` as before (the call maps `f` over
  the list), and an integral over a list integrand keeps its shape
  (`∫₀¹ [x, 2x] dx` is a `vector<2>`: the integration variable is a real).
  Compiled code that cannot tell whether an element of unknown type is a number
  declines in eight cases that compiled before: `Trace(g(x)) + 1` with
  `g := t ↦ [[t, 1], [2, 3]]` and a free `x` in the complex lane,
  `Sum(1 + v(x)[2], …)` with `v := s ↦ [s, k]` on the JavaScript and GLSL
  targets, `Product(Rest(g(x)))` and `Max(At(m(x), 1))`. The workaround is a
  declaration, `x: number` or `g: (number) -> matrix`; ROADMAP CE-377 records
  the compiler change that removes the declines. ROADMAP CE-25; the rationale is
  in `docs/TYPE-SYSTEM.md`, "The inferred signature of a function literal".

- **The type of a list or set literal that holds an error value describes its
  other elements.** A type describes the successful values, so an element whose
  type is `error` (an `Error` expression, or a failed application such as
  `1/"a"`) is left out of the element type when another element of the same
  level succeeded. `[1, 1/"a", 3]` is now typed `vector<integer^3>`, as
  `[1, 2, 3]` is; it was `list<unknown>`. `[[1, 1/"a"], [3, 4]]` is
  `matrix<integer^(2x2)>` (it was `list<list<unknown>>`), and `Set(1, 1/"a")` is
  `set<integer>` (it was `set<unknown>`). A level whose elements all failed
  keeps its type: `[1/"a", 1/"a"]` is still `list<unknown>`, and a set whose
  elements all failed is still `set<unknown>`. The error is still in the
  expression: `isValid` is `false` and `errors` lists it. As a result, the value
  of an element-wise `If` or `Which` with at least one successful cell matches
  the static type of the expression: `If([True, Missing, False], 1, 0)` is typed
  `list<integer>` and evaluates to `[1, Error(…), 0]`, typed
  `vector<integer^3>`; that value was typed `list<unknown>`. A tuple is
  unchanged: `(1, 1/"a")` is still typed `error`.

  A variable with a declared type still refuses a collection that holds an error
  element, at any depth (also inside a tuple slot or a dictionary value, and
  through a symbol that holds the collection), unless the declared element type
  admits `error` (`any`, `unknown`, or an explicit `error` arm). With
  `s: list<number>`, `s := [1, Error("oops")]` throws, and the `Assign` and
  `Declare` operators give an `incompatible-type` error. The message now names
  the failed element ("The value holds the failed element `Error("oops")`…"),
  and it no longer states the type of the value when that type matches the
  declared type. A declared union is read arm by arm: `list<number> | set<any>`
  refuses `[1, Error("oops")]`. `list<number | error>` now admits that value; it
  was refused, because the value was typed `list<unknown>`. A parameter binding
  does not refuse it: a function whose parameter is declared `list<number>` runs
  when called with `[1, Error("oops")]`, as before. A symbol without a declared
  type takes the value, as before.

- **An applied function literal is typed by its body** (Tycho row 426).
  `Apply(literal, args)`, and `xs |> literal` when the literal takes its
  argument whole, are now typed as the body with each parameter set to the
  argument's type, as a call of a named function already was: with
  `M: list<real>` and `p(n) = s·n`, `Apply(a ↦ Map(p, a), M)` is `list<number>`
  (it was `collection<unknown>`), and `'abc' |> (s ↦ s)` is `string`. The
  derivation stops (and keeps the literal's own result type) for a body with an
  early `Return`, a loop, an assignment that is not at the top of the body, or a
  nested function that reads an outer parameter. A call of a named function
  whose body passes an inline callback (`Map(u ↦ 2u, a)`) is also refined. Other
  type changes in the same area:
  - A function literal's result type includes its early `Return` values, and
    `Nothing` when it can return nothing (`Return()`, or a final empty `Block`):
    `x ↦ Block(If(x > 1, Return('big')), 2x)` is `-> number | string`.
  - A `Sum` or `Product` index with the same name as a parameter no longer sets
    that parameter's type.
  - `Map` with a callback whose result type is `unknown` has elements of type
    `unknown`: `Map(u ↦ Q, M)` is `list<unknown>` (it was `list<real>`).

- **Inside a function or a `Block`, a stored value takes the current values of
  the variables it names; a closure keeps the variable**. When `Assign`,
  `Declare` with a value, or a destructuring stores a value that names a
  parameter or a block local, those names are replaced by their values at that
  moment: with
  `f := x ↦ Block(Declare(r), Assign(r, If(x > y, x, 0)), Assign(x, 100), r)`,
  `f(3)` is `If(y < 3, 3, 0)`, and a block local no longer escapes its block
  unbound (it gave `If(y < 3, b, 0)`). A destructuring reads every variable as
  it was before the statement. A function literal in the value is not changed:
  it reads the variable when it is called, so a closure returned after a
  parameter is reassigned sees the last value (`u ↦ u + 10`, it was
  `u ↦ u + 3`), as closures over globals and block locals already did. When a
  function reassigns a parameter, a result that still names it uses its last
  value: `a ↦ Block(Assign(a, [7, 8]), Map(u ↦ 2u, a))` gives `[14, 16]` (it
  mapped the original argument), and `Filter` likewise.

- **Compiled `Power` of a value whose depth is not known follows the
  interpreter's matrix power.** For a base typed `tensor<number>`, `tensor`,
  `list<list<number>>` or `broadcastable<number>`, the compiled JavaScript
  checks the value's shape when it runs: a square matrix with an exact integer
  exponent gives the matrix power (`[[1, 2], [3, -4]]^2` is
  `[[7, -6], [-9, 22]]`; it was `[[1, 4], [9, 16]]`), also for each matrix of a
  tensor of rank 3 or more, and a vector or a float exponent keeps the power of
  each entry. A non-square matrix to an integer power other than 1 throws
  `expected-square-matrix`, as the interpreter answers; this now also holds for
  `MatrixPower`, `Inverse` and `Power` over `matrix<…>`, which returned `NaN`.
  When compiled code cannot tell whether the exponent is exact (for example
  `p^(2x)` with `x: real`, or a float within 1e-12 of an integer, such as
  `√n·√n`), it throws instead of guessing. A base that may hold points (bare
  `list`, `list<unknown>`, `any`, `list<tuple<…>>`) keeps the power of each
  entry, unchanged, because compiled code stores a list of points and a matrix
  as the same array. A function the caller maps with `functions` takes
  precedence, as before.

- **An index into a `broadcastable<T>` whose `T` is a tuple, a string, a record
  or a dictionary is typed by what it can return.** With
  `p: broadcastable<tuple<number, number>>` holding `(1, 2)`, `At(p, 1)` is `1`,
  but it was typed
  `missing | tensor<tuple<number, number>> | tuple<number, number>`, and
  `Take(p, 1)` is `[1]`, but it was typed `list<tuple<number, number>>`. With
  `p: broadcastable<string>` holding `"abc"`, `At(p, 1)` is the character `"a"`,
  but it was typed `missing | string | tensor<string>`. The element readers
  (`At`, `First`, `Second`, `Third`, `Last`) and the selectors (`Take`, `Drop`,
  `Rest`, `Most`, `Slice`) now also include what an index into one value of `T`
  returns: the slots of a tuple (a `nothing` slot included), `character` for a
  string, the field types of a record (an `unknown` field included) and the
  value type of a dictionary, also for such an arm of a union `T`. `At(p, 1)` is
  now typed
  `missing | number | tensor<tuple<number, number>> | tuple<number, number>`,
  and a selector over `broadcastable<string>` is typed
  `list<string | tensor<string>> | string`, which holds the rows of a 2-D array
  of strings. A tuple and a string are still one cell for broadcasting, and the
  aggregates (`Sum`, `Max`, `Reduce`) read the elements as before.

  Compiled code: the JavaScript `At(p, 3)` of the one point `(1, 2)` gave
  `Missing`; it now gives `NaN`, as the interpreter does. The JavaScript and
  Python element readers and selectors of an operand that may be a string
  without proof that it is a list (`broadcastable<string>`, a `broadcastable` of
  one, an alias of one, `string | list<string>` on Python) now decline, so the
  `fallback` option decides: they read a string by UTF-16 code unit or by code
  point, so `At(p, 1)` of `"abc"` gave `undefined` (JavaScript) or `NaN`
  (Python), and `First(p)` of `"😀b"` half of a surrogate pair. Such an operand
  that holds a list of strings, which compiled correctly, now declines too.
  JavaScript `First`, `Second` and `Third` of an operand typed `any`, `value` or
  `broadcastable<any>` decline, as `At` and `Last` already did.

- **An index into a `broadcastable<T>` value is typed by what it can return**
  (Tycho row 425). With `g(t) = [t, 2t]` and `x: any`, `g(x)` is typed
  `broadcastable<vector<2>>`: a number `x` gives a vector, a list `x` a list of
  vectors. `g(x)[1]` is now typed `missing | number | vector<2>` (it was
  `missing | vector<2>`, which does not hold the number that `g(3)[1]` gives),
  so `Repeat(0, g(x)[1])` is valid. The same reading applies to `First`,
  `Second`, `Third`, `Last` and `At` with a list of indices, and to the elements
  of `Take`, `Drop`, `Rest`, `Most` and `Slice` of such a value. Other changes
  that follow:
  - `Sum`, `Product`, and `Reduce` with `Add` and 0 or `Multiply` and 1, over
    elements that may be numbers or rows are typed as a number or a row
    (`Sum(Rest(m(x)))` with `m(t) = [[t, 2t], [3t, 4t]]` is
    `integer | matrix<2x2> | vector<2>`; it was `number`), with `nan` when the
    operand may be absent.
  - Arithmetic on a union of lists with dimensions maps over the list: `2·vv`
    for `vv: vector<2> | vector<3>` is `list<number>` (it was `number`).
  - `Product`, `Reduce` and `Fold` with `Multiply` over elements that are
    matrices or vectors are accepted (they were `incompatible-type`).
  - `PointX`/`PointY` and `Dot` of a union of numbers and vectors are typed from
    the vector arms; `PointX` of `string | list<string>` reads the character or
    element at the position.
  - Compiled JavaScript `At`, `First`, `Second`, `Third` and `Last` over
    elements that may be numbers or lists choose the out-of-range value from the
    value read, as the interpreter does: `NaN` for a list of numbers, `Missing`
    otherwise. `Last([])` of a list that is not of numbers (a matrix included)
    is now `Missing` (it was `NaN`).
  - Compiled `Sum` and `Reduce` with `Add` over elements that may differ in
    shape throw when two elements have different shapes, as the interpreter
    answers `incompatible-dimensions`; compiled `Product` over such elements
    declines.
  - Compiled `Repeat` throws when its count is not an integer when the code runs
    (it rounded the count, or returned `[]`).
  - Compiled JavaScript `Max`, `Min`, `Mean`, `Median` and `Variance` over
    elements that may be numbers or lists, or over an operand that may be absent
    and holds lists, decline (they gave `NaN`). Python `Mean`, `Median` and
    `Variance` of a `tensor` or `broadcastable` operand check the rank when the
    code runs and raise for a matrix; Python folds over a `tensor<number>`
    decline.

- **Element-wise `If` and `Which` over a mask of any rank.** A condition that is
  a nested list of `True`/`False`/`Missing` now selects at every level. It
  stayed unevaluated before. With `M := [[1, 2], [3, 4]]`:
  - `If(M < 3, M, 0)` is `[[1, 2], [0, 0]]`, typed `matrix<integer^(2x2)>`.
  - `Which(M < 2, 10, M < 4, M, True, 0)` is `[[10, 2], [3, 0]]`.
  - The mask may be uneven: `If([[True], [False, True]], 7, 0)` is
    `[[7], [0, 7]]`.

  At each level, a list condition and a list arm must have the same length, and
  a scalar is used at every position. A position decided by a scalar condition
  takes the arm's value there whole. Results for a mask of rank 1 do not change.

  An arm of lower rank than the mask is refused, as `Add` refuses it:
  `If(M < 3, [10, 20], 0)` is `Error("incompatible-dimensions", "2x2 vs 2")`.

  The compiled JavaScript gives the same values. Before, it compiled, and then
  threw `Condition must evaluate to "True" or "False"` at run time. Under a mask
  of rank 2 or more, compiled code cannot tell a point from a row of numbers, so
  an arm whose type does not say where its points are (`list`, `list<any>`,
  `tensor<tuple<…>>`) throws a `RangeError` at run time when a nested mask meets
  an array element. Declare such an arm `matrix` or `list<tuple<…>>` to avoid
  it. A mask that is flat at run time is not affected.

- **The types of `If` and `Which` hold every value they can give.**
  - A condition of unknown rank types the result `list<C | list<any>>`, where
    `C` joins the arms: `Which(C < 2, 1, True, 0)` with `C: indexed_collection`
    is `list<integer | list<any>>` (it was `list<integer>`).
  - A `broadcastable<T>` arm contributes `T`: with `B: broadcastable<number>`,
    `If(B < 0, -B, B)` is `broadcastable<number> | list<list<any> | number>`. It
    was `broadcastable<broadcastable<number>>`, a type with no meaning. The
    `list` option holds the uneven value of a mask of lower rank than an arm
    (`[[1, 2], 0]`).
  - A condition typed `boolean | list<boolean>` types the result like a
    condition that may be a mask: it typed as a scalar before.

- **The Python and interval-JavaScript targets refuse a condition that may be a
  list** in `If`, `Which` and `When`, so the `fallback` option decides. With
  `B: broadcastable<number>`, Python emitted `0 if np.less(B, 0) else B`, which
  raises for an array of two or more elements, and the interval target gave
  `empty` for `If(B < 0, 0, B)`. The compile of `B < 0` on its own on Python no
  longer overflows the stack. GLSL and WGSL do not change. On JavaScript,
  `When(v, B < 0)` with `B: broadcastable<number>` now restricts element by
  element when `B` holds a list: it compiled as one scalar test and gave `v` for
  `B = [-1, 2]`, where the interpreter gives `[v, NaN]`.

- **The derivative of an element selector, and of a list with a constant point**
  (follow-up of Tycho row 424). `First`, `Second`, `Third`, `Last`, `Rest`,
  `Most`, `Reverse`, `Take`, `Drop`, `DeleteAt`, `RotateLeft`, `RotateRight`,
  `Slice` and `At` (also with several indices) are linear in their container for
  a fixed selection, as `PointX`/`PointY`/`PointZ` already were: the derivative
  is the selector applied to the derivative of the container. This holds when
  the selection does not depend on the variable or is constant between its jumps
  (`\lceil u\rceil`); a selection that varies with the variable declines.
  `D(Last(h(u)), u)` over a path of 29 pieces is a closed form in about 0.1 s
  (it declined after about 1.1 s). A selector that reads by value (`Sort`,
  `Filter`, `Unique`, `Max`, …) is not linear and keeps the generic rule. In the
  derivative of a list, a tuple or a piecewise branch, a constant element that
  is a point now gets the zero point of its arity, not the scalar `0`: with
  `Q := (1, 2)`, `D([(t, t^2), Q], t)` is `[(1, 2t), (0, 0)]` (it was
  `[(1, 2t), 0]`). A selection of a constant container gives the zero of the
  selection's shape (`D(Take([1,2,3], 2), u)` is `[0, 0]`), an absent element
  stays absent (`Missing`), and an index past the end gives the same value as
  the original selection.

- **A call of a user function that shadows a library operator compiles** (Tycho
  row 423; the fix is under Resolved Issues). On the `javascript`,
  `interval-js`, GLSL and WGSL targets, a call bound to a user definition with a
  library name (`Gamma := x ↦ (x-1)!`, `Sin`, `Sqrt`, `Square`) compiles as a
  call of that user function, where `compile()` declined and the interpreter ran
  it. Before the target compiles, such a call is renamed to a private name
  declared in a temporary scope, so no part of the compiler reads it as the
  library operator (the angular-unit rewrite, sign rules, scalar facts,
  derivative recurrences, lazy streams). Decline messages still name the user's
  function. These keep the decline and run interpreted: a user definition of an
  operator the language builds by name (`Add`, `Less`, `And`, `If`, `Sum`, …), a
  multi-clause function, a definition with its own `compile` handler, stated
  `derivative`, `lazy`, `broadcastable` or declared effects, a node bound to the
  library operator, and every user function on the Python target. A declaration
  in a scratch scope of a name that no binding outside the scratch scopes holds
  now advances no state version, so such a compile leaves the engine's type,
  sign and memo caches as they were.

- **A numerical integral answers `NaN` at once when its integrand has no real
  value on part of the range** (Tycho row 422; the fix is under Resolved
  Issues). The adaptive quadrature, on both the interpreted and the compiled
  route, stops with `NaN` when a panel and both of its halves have a majority of
  `NaN` samples, and the integrand next to the `NaN` set is not of rounding
  size, so the integrand has no real value there: the Monte-Carlo fallback is
  not run. `\int_{-1}^{1}\sqrt{x}\,dx` on the compiled real route was `0.6667`
  (the part below 0 was left out) and is now `NaN`, as the interpreter's real
  route is. Removable points no longer stop the quadrature:
  `\int_0^{64}\frac{u}{u}dx` with `u = x - \lfloor x\rfloor` gives 64, where the
  quadrature gave `NaN` and only the Monte-Carlo fallback gave an approximate
  value. An integrand that overflows to `NaN` in a tail it has decayed in (the
  logistic density on [0, ∞)) keeps its earlier result.

- **A `D` that has no closed form is not worked out again** (Tycho row 424; the
  fix is under Resolved Issues). When the derivative of a `D` node gives no
  closed form, the node is returned as it is, and the attempt is recorded:
  evaluating the same node again, or reading a parameter that holds it, does not
  differentiate again. A write to a symbol the derivative reads (a value, a
  type, a definition of a function it calls), a change of the type of the
  variable, an assumption, or a change of the configuration makes the record
  invalid. A decline made inside another differentiation, under a temporary
  precision or angular unit, or for a node that is not pure, is not recorded.

- **A `Sum` or `Product` bound may be a type that could be a number** (Tycho row
  421; the fix is under Resolved Issues). A bound whose type is a union with a
  number arm (`number | string`, `broadcastable<number | tuple>`) or a top type
  (`value`, `expression`) is now accepted, where it was an `incompatible-type`
  error; `string`, `boolean`, a list or a tuple type, and a literal string,
  `NaN` or `Missing`, are still refused. Such a bound gets no closed form and no
  fold of two equal bounds, so the operator evaluates only when its value is a
  number: with `y: number | tuple` holding `(3, 4)`, `\prod_{n=1}^{y} n` stays
  unevaluated, where a closed form would have given `Factorial((3, 4))`, a
  tuple. Its `javascript` compile answers `NaN` for a value that is not a
  number, where `Math.floor` read the string `"3"` as 3 and `true` as 1; a bound
  typed as a number, `unknown` or `any` compiles as before.

- **A numerical derivative narrows its window until the value settles** (Tycho
  row 420; the fix is under Resolved Issues). The numerical derivative of an
  expression that stays symbolic (its `javascript` compile, `ND`, and a
  derivative of a function with no closed form under `N()`) is an 8th-order
  centered stencil whose samples reach 0.4 on each side of the point. It now
  halves its step until the values of successive steps agree (to 10⁻⁶ at order
  1, a looser part at higher orders) or converge at the rate of the stencil, and
  is `NaN` when they never do, at a jump of the function. A smooth function
  keeps its value bit for bit, and the compiled and interpreted values stay
  identical. Other values change: `ND` of `\cos(20x)` at 0.05 is −16.829419, the
  derivative, where it was −14.55; `ND` of `\sqrt{x}` at 0.05 is 2.236068 where
  a sample below 0 made it `NaN`; `ND` of `x\lfloor x\rfloor` at 2, a jump,
  stays unevaluated where it was 14.19. A smooth function costs 12 calls of the
  function at order 1 instead of 8, fewer than before at orders 2 to 4 (44, 67
  and 154 instead of 64, 512 and 4096), and a point at a jump up to 72 at
  order 1.

- **`FindRoot` polishes a steep equation to its root** (Tycho row 419; the fix
  is under Resolved Issues). A root solve whose accepted step was below the
  relative step tolerance stopped there, even when the step had removed most of
  the residual: on a steep equation the step to the root is that small relative
  to the parameter. It now goes on while its steps more than halve the sum of
  squared residuals. `a^2 = 10^{12}` from `a = 1` ends at `a = 10^6` exactly (it
  stopped at a residual of 0.14), and `\sin(10^8 a) = 0.5` at a residual of 6e-9
  instead of 3e-5. `FindFit` is unchanged.

- **`FindFit` and `FindRoot` stop polishing at the tolerance's precision**
  (Tycho row 418; the fix is under Resolved Issues). A solve within its
  tolerance ends once an accepted step moves every parameter by less than
  `tolerance · max(1, |θ_j|)` while the cost is at its rounding floor, where it
  went on to the gradient test or to the iteration cap: a badly scaled exact fit
  takes 5 iterations instead of 200, and its `stationary` key can be true
  without the gradient test. The `converged` key of a `FindFit` record now reads
  the engine's tolerance (`ce.tolerance`, never below 64 machine epsilons),
  which it ignored before: a fit whose every residual is within the tolerance of
  the terms its row computes is converged, stationary or not. Setting a looser
  engine tolerance makes more fits exact.

### Resolved Issues

- **Collection fixes listed for 0.160.0 were not in the 0.160.0 and 0.161.0
  packages.** A later change removed them before 0.160.0 was published, and they
  are back in this release:
  - `Dedup`, `Filter` and `TakeWhile` of a string held by a symbol of a wider
    type give a string: with `c: list<integer> | string` holding `"aab"`,
    `Dedup(c)` is `"ab"`, not `["a", "b"]`, and so is `Dedup(Filter(c, p))`.
  - `Filter` and `Dedup` over a dictionary give a `Dictionary`, not a `Set` of
    entry tuples, also when the dictionary is an arm of a union type and through
    nested `Filter` and `Dedup` views. A view over a dictionary of more than
    five entries prints as written (`Dedup(d)`).
  - The preview of `Map(x ↦ x + 10, c)`, with `c` declared
    `missing | list<integer>`, is the list `[11, 12]`, not `Set(11, 12)`.
  - `Map` of a function literal whose parameter is annotated as a scalar
    (`(x: integer) ↦ x + 1`) over a list of lists is refused when it is boxed;
    it was typed `list<integer>` and gave an error for each row.
  - `Map(Sqrt, [[1, 4], [9]])` is typed `list<vector<1> | vector<2>>`; it was
    `list<list<number>>`.
  - The types of `FlatMap` over a source with absent cells, of `Map` of an
    operator whose declared result is `any` (`First`, `PointX`), of `Map` over
    an alias of a tuple (`list<number>`, was `collection<number>`), and of `Map`
    over a dictionary arm of a union hold their values again.

- **The type of a `Map` did not hold its value in two cases.**
  `Map(x ↦ If(x = 1, "x", x), [1, 2])` was typed `list<integer | string^2>`, and
  its value `["x", 2]` is a `list<integer | string>`: a list whose elements are
  a union that is not a number type now states no length, as a list literal
  does. `Map(First, [[], [3]])` was typed `list<integer | nan>` for the value
  `["Missing", 3]`: `First([])` is `Missing`, since the element `[]` states no
  element type, and the type is now `list<integer | missing | nan>`.

- **A sum with an infinite term of unknown sign folded to that infinity.**
  `∞·c + 1` evaluated to `+∞` for a `c` with no known sign: the sum read the
  coefficient `∞` of the term and ignored `c`, although the sum is `−∞` at
  `c < 0` and `0·∞` at `c = 0`. Such a term now stays in the sum, also beside a
  pure infinity (`∞·c + ∞` is `∞ − ∞` at `c < 0`), `∞·c − ∞·c` is
  `Indeterminate`, and a term whose cofactor has a known sign still folds
  (`−∞·3 + 1` is `−∞`). Found while fixing Tycho row 428: the value of
  `∫_{−∞}^{x} exp(−(z−m)²/(2s²)) dz` at its lower bound,
  `Erf(−∞·√(s⁻²) − m·√(s⁻²))`, folded to `−1` and lost the condition
  `√(s⁻²) > 0` that the same integral carries at `m = 0`.

- **A use of a call at a typed parameter rewrote the signature of the called
  function.** With `g := t ↦ [[t, 1], [2, 3]]`, whose signature is
  `(unknown) -> list<list<unknown>>`, boxing `Trace(g(2))` (the parameter of
  `Trace` is `number | tensor`) widened the result of `g` to
  `list<list<unknown>> | number | tensor`, and `Determinant(g(x)) + 1` then
  declined to compile ("operand is not an indexed collection"). A use now
  refines only a result that the body leaves `unknown` (`k := x ↦ x` used in
  `k(1) + 2` gets the result `real`, as before); a result that the body states,
  and that may fit the parameter, is kept.

- **`D` of the inverse of a matrix function stayed unevaluated.** With
  `f: (real) -> tensor<number>` and `f := x ↦ [[1, x], [x, 2]]`, the call `f(x)`
  is now typed `matrix<real^(2x2)>` from the body, so `f(x)^{-1}` canonicalizes
  to `Inverse(f(x))`, and `D(f(x)^{-1}, x)` was an unevaluated derivative of
  `Inverse` (it was differentiated as a negative matrix power while the call was
  typed `tensor`). `D(Inverse(f), x)` is now `-Inverse(f) · f' · Inverse(f)`,
  and agrees with a finite difference.

- **`At` and `First` refused an operand that may be absent or of unknown type,
  and `PointX` of such an operand was typed `missing`.** With
  `g: (unknown) -> list<unknown>` and `x: any`, `g(x)[1][2]` was an
  `incompatible-type` error (at `x = [1, 2]` its value is `2`), and
  `PointX(g(x)[1])` was typed `missing`, as if always absent; it is
  `missing | unknown`.

- **Compiled `Sum`, `Product` and `Reduce` over a list of elements of unknown
  type gave `null` or a string when the elements are lists.** With
  `L: list<unknown>` and `L = [[0, 1], [2, 3], [4]]`, the compiled `Sum(L)` was
  the string `"01,23,4"` (the interpreter gives an `incompatible-dimensions`
  error: the rows have different lengths), and with `L = [[1, 2], [3, 4]]` the
  compiled `Product(L)` was `null` (the interpreter gives `[3, 8]`). The fold
  now dispatches on each element: `Sum(L)` is `[6, 9]` for
  `[[0, 1], [2, 3], [4, 5]]` and throws for rows of different shapes, and
  `Product(L)` is the product of the elements, `[3, 8]`, `[17, 39]` for a matrix
  beside a row (the matrix product), and `[[4], [10, 18]]` for ragged rows. A
  `Multiply` fold over elements typed as lists of cells of unknown type
  (`list<unknown> | unknown`, the elements of `Rest(g(x))`) still declines
  (ROADMAP CE-98.3).

- **The compiled statistics over a `list<unknown>` read each row as a number.**
  With `L: list<unknown>` and `L = [[1, 2], [3, 4]]`, the compiled `Max(L)` was
  `NaN` (the interpreter gives 4). `Max`, `Min`, `Mean`, `Median` and the other
  statistics now decline such an operand, as they decline a bare `list` and a
  `list<any>`, and the interpreter evaluates it.

- **`Product`, `Reduce` and `Map` over a list of ragged lists that hold matrices
  were an `incompatible-type` error.** With `L: list<unknown>` and
  `L = [[M, [5]], [N, [2]]]` (`M`, `N` 2×2 matrices), the elements of `L` are
  typed `list<matrix<integer^(2x2)> | vector<integer^1>>`, and the check of the
  callback refused `Multiply` and `Negate` for them, so `Product(L)` was
  `Reduce(L, Error(incompatible-type), 1)`, while the product of the two
  elements written as `p·q` had a value. A union of tensors and numbers below
  one or more list levels of an element is now read arm by arm, as a union at
  the top of the element already was: `Product(L)` is `[M·N, [10]]`.

- **An element of a `list<unknown>` result was read as a number.** With
  `g: (unknown) -> list<unknown>` and `x: any`, the element `g(x)[1]` is typed
  `missing | unknown`, and it is a list when `x` is a list. Compiled
  `g(x)[1] + 1` gave the string `"1,21"` at `x = [1, 2]`, a product gave `NaN`,
  `g(x)[1] < 1` gave one `false`, and `Sin(g(x)[1])` was typed `number`, so
  `Sin(g(x)[1]) + 1` also joined strings. A value typed by `unknown`, `any` or
  `value` beside `missing` or `nothing` only is now read as that type, both when
  typing and when compiling: `Sin(g(x)[1])` is typed
  `broadcastable<number> | missing`, and compiled arithmetic, the cell functions
  (`Sin`, `Sqrt`, `Abs`, `Floor`, …), the comparisons, an `If` that selects the
  element, and a `Block` local that holds it broadcast at run time, as they
  already did for a `g` declared `(unknown) -> list`. They give the
  interpreter's values: `[2, 3]` and `[false, false]`. A `Block` local that
  holds the element is read the same way, also inside a cell function:
  `Block(Assign(y, g(x)[1]), Sin(y) + 1)` gave a string, and `Sin(y)` was typed
  `number`. A symbol the user declared `any`, a global with an assigned value
  and a free variable stay scalar code, as before. A number `x` gives the same
  values as before. The cost: an index into a list whose elements are typed
  `unknown | missing` (`L[i] + 1` with `L: list<unknown | missing>`) now
  compiles to the run-time broadcast `_SYS.bcast`, as an index into a
  `list<unknown>` or a `list<any>` already did. An index into a list of numbers
  stays scalar code.
- **A call of a function literal over a list had a different type inside the
  body of another function.** With `f := x ↦ (-x, x)`, the call `f(L)` for a
  list `L` evaluates to a list of pairs and is typed
  `list<tuple<number, number>>`. The same call typed from the types of its
  arguments, which is how the engine types a call in the body of another
  function and how a custom `type` handler derives a call (`context.derive`),
  was typed `tuple<number, number>`, the type of one element. Both now give the
  same type, for a list, a matrix (each cell is mapped), a
  `broadcastable<number>` argument and a function with a declared signature such
  as `(real) -> real`; a scalar argument and a parameter typed as a collection
  are not mapped, as before. A call with fewer arguments than parameters is now
  typed as the function of the remaining parameters in both cases. Some inferred
  types become narrower: with `h := a ↦ f([a, a])`, `h(1)` is typed
  `list<tuple<integer, integer>>` (it was `list<tuple<number, number>>`), and
  with `g: (T) -> T where T` (or `where T: number`), `Map(g, rows)` over a
  `list<list<integer>>` is typed `list<list<integer>>`. A generic function whose
  type variable has a bound no longer takes its result from a list element that
  breaks the bound: with `g: (T) -> T where T: number` and a list of strings
  `L`, `g(L)` was typed `list<string>`; each element of its value is an
  `incompatible-type` error, and the call is now typed `list<number>`, and so is
  the list option of an argument typed `number | list<string>` (the call is
  typed `list<number> | number`).
- **`Sum` of elements that may be lists was typed `number`.** With
  `g(t) = [t, 2t]` declared `(unknown) -> list<unknown>` and `x` declared `any`,
  `Sum(Rest(g(x)))` was typed `number`, but at `x = [1, 2]` it is `[2, 4]`.
  `Sum` and `Product` now give a type that holds a list when their terms may be
  lists: `broadcastable<number>` for terms typed `unknown` (the type `Add` gives
  for such operands), as in `Sum(L)` for `L: list<unknown>` or `L: list`; `any`
  for terms that have an `any` option, as with `g` declared `(unknown) -> list`;
  `list<any> | number` for rows whose cells are not typed, as in `Sum(M)` for
  `M: list<list<unknown>>`; and `number | vector<2>` for `Sum(g(x))` when `g(x)`
  is typed `broadcastable<vector<2>>`. This applies to the `Sum(body, limits)`
  form too: `Sum(L[k], k, 1, 2)`. Terms typed as numbers, points or rows of
  numbers keep their type. A compiled `Sum(g(x))` or `Product(g(x))` over such a
  `g` now compiles to the interpreter's value (it declined before), and a
  compiled `Sum(L) + 1` for `L: list<unknown>` now declines (it gave `null` for
  a list of rows).
- **Arithmetic over a cell of unknown type took the tier of the other operand.**
  With `u: broadcastable<unknown>`, `2 · u` and `2 + u` were typed
  `broadcastable<integer>` and `0.9 · u` `broadcastable<real>`, although a cell
  of `u` may be any number. They are now typed `broadcastable<number>`, and so
  are `[1, 2] · u`, `[1, 2] + u` and `[1, 2] - u` (they were
  `vector<integer^2>`, but `u` may hold a matrix). A free symbol in a list
  literal is now narrowed to `number`, as the same symbol in a scalar product
  is: `2 · [y]` is typed `vector<1>` and `y` is inferred `number` (they were
  `vector<real^1>` and `real`). With `w := x ↦ 2 · [x]`, `w(i)` was typed
  `vector<real^1>` with the value `[2i]`.
- **The `complex` compile mode did not reach the cells of a list input.** With
  `mode: 'complex'`, a scalar input declared `number` used complex arithmetic,
  but a `list<number>`, `tensor<number>`, `matrix<number>` or `list<unknown>`
  input did not: `Add(p, 1)` with a cell `1 + i` gave the string
  `"[object Object]1"`. Element-wise arithmetic, cell functions and the
  orderings over such inputs now use complex arithmetic in that mode (an
  ordering of a non-real cell is `false`). The default and `strict` modes emit
  the same code as before.

- **Compiled statistics of complex data gave `NaN`.** Compiled `Mean`,
  `Variance`, `StandardDeviation`, `PopulationVariance` and
  `PopulationStandardDeviation` over complex data now give the interpreter's
  values in the default and `complex` modes: `Mean([3, 4i])` is `1.5 + 2i`, and
  the variance family is real. The `strict` mode still declines. Real data gives
  the same bits as before in every mode.

- **The variance of large values of opposite signs overflowed.** In compiled
  code and in the interpreter at machine precision, `Variance([1e308, -1e308])`
  was `-Infinity`; it is now `+Infinity`, and
  `StandardDeviation([1e200, -1e200])` is `1.414e200` (it was `+Infinity`).
  Ordinary data gives the same bits as before.

- **Compiled folds and reads over elements that mix numbers and lists gave wrong
  values.** For a list whose elements may be numbers or vectors
  (`list<number | vector<2>>`, a `tensor`, or the selectors of a
  `broadcastable<vector<2>>`), compiled `Sum`, and `Reduce` with `Add` or
  `Multiply`, joined the rows as strings (`"01,22,43,6"`) or gave `NaN`; they
  now combine element by element, as the interpreter does. Compiled `Max`,
  `Mean` and `Reduce(…, Max)` over such elements gave `NaN` or compared rows as
  strings; they now decline. Python `Max`/`Min` of an operand that may be absent
  or a list returned the operand itself; they now reduce it, and give `NaN` for
  an absent or empty operand.

- **`HadamardProduct`, and the element-wise sum, difference, quotient and power
  of two tensors, gave `undefined` cells when the two tensors had different data
  types.** `HadamardProduct([[0.5, 1], [1, 3]], [[1, 2], [3, 4]])` threw a
  `TypeError` when the type of the result was read. The operation was taken from
  the first tensor's arithmetic before the two tensors were converted to a
  common data type; it is now taken after. The product is `[[0.5, 2], [3, 12]]`.
- **`TrigExpand`, `TrigToExp` and `TrigReduce` bind their operand when they are
  canonicalized**, as the other operators do. The operand is still not evaluated
  before the rewrite. So `Nothing` is removed from the argument list:
  `TrigExpand(Nothing)` is the error of a missing argument, as `Sin(Nothing)` is
  (it was `Nothing`, and `TrigReduce(Nothing)` was `0`).
- **A `FindFit` evaluated with `evaluateAsync` and cut short by the deadline
  while its data was evaluated reported no parameters** (`parameters: {}`). It
  reports the parameters at their starts, as the synchronous route does. On that
  route a malformed parameter spec is now an error before the data is evaluated,
  and a start such as `Random()` is evaluated once, as on the synchronous route
  (it was evaluated twice).

- **An index that occurred only in a dictionary value was left in a `Sum` or
  `Product`.** Every check of the form "does this expression mention `k`?" asked
  a dictionary for a key named `k` (see the `has()`/`hasKey()` entry under
  Breaking Changes), so `\sum_{k=1}^{2} \mathrm{If}(x<1, \{"v"\to k\}, 0)`
  evaluated to `2 \cdot \mathrm{If}(x<1, \{"v"\to k\}, 0)` with the bound `k`
  left in, and `simplify()` gave `3\,\mathrm{If}(\dots k \dots)` for the sum to
  3 and `\mathrm{If}(\dots k \dots)^3` for the product. The terms are now
  evaluated one by one, and `simplify()` keeps the sum. The compiler checks that
  look for a function literal or a `Return` now see one in a dictionary value.

- **The compiler declined a call of a user function that shadows a library
  operator** (Tycho row 423). A Desmos document defines its own Gamma,
  `\Gamma(x)=(x-1)!`; with `Gamma := x ↦ x + 100`, the interpreter gave
  `\Gamma(0.5) = 100.5`, and the `javascript` and `interval-js` compiles of any
  expression that called it failed ("a user definition shadows the library
  operator `Gamma`"), while the same function named `G` compiled. Both
  `declare(name, "function")` and `declare(name, { signature })` followed by
  `assign` now compile `\Gamma(\frac{1}{2}) + x` to 101.5 at x = 1.

- **A numerical integral took 0.5 to 2 s to answer `NaN`** (Tycho row 422). The
  chi-square tail
  `\int_{x}^{\infty}\frac{y^{\frac{k}{2}-1}e^{-\frac{y}{2}}}{2^{\frac{k}{2}}\Gamma(\frac{k}{2})}dy`
  with `k = 1` has no real value at x < 0, where the integrand is not real on
  `[x, 0)`. The adaptive quadrature bisected the `NaN` panels until its budget
  of 1500 panels was spent, and then each route drew 10⁷ Monte-Carlo samples,
  whose mean was `NaN` again. Now x = −0.2 and x = −1 answer `NaN` in under 15
  ms on both routes, and x = 1 still gives 0.3173105. Written with the number
  `-\frac{1}{2}` as the exponent, the interpreted value at x = −0.2 is the
  complex `1.0000 − 0.3691i` (the principal value, which the interpreter
  integrates in two parts) and the compiled real value is `NaN`; that is not
  changed.

- **A compiled numerical integral of a divergent integrand took 200 to 400 ms
  and answered an arbitrary finite number** (Tycho row 427). The absolute moment
  of the normal distribution
  `\int_{-50}^{50}|t|^{x}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}t^2}dt` diverges at
  t = 0 for x ≤ −1. The interpreter answered `+∞`, because it finds the pole
  from the expression with the value of `x`, but the compiled function gave a
  different number at each call (647, 708, 7249 at x = −1.5), and
  `\int_{-1}^{2}\frac{1}{(t-x)^2}dt` at x = 0.3 gave `8.9e16`. The adaptive
  quadrature looked for a divergence only at the two bounds. When its bisection
  goes deep at a point inside the interval, it now finds the singular point and
  splits the interval there, so that each half has the singularity at a bound.
  The compiled function now answers `NaN` in under 5 ms for x = −1, −1.5 and
  −2.5, and the interpreter still answers `+∞`. A convergent moment is also more
  accurate: at x = −0.9 the error was `5.7e-10`, and it is now `2.6e-12`. A
  smooth integrand, a kink, a jump and a narrow peak are not split.

- **`D(PointY(h(u)), u)` took seconds, and was worked out again at each
  evaluation** (Tycho row 424). With `h` a path joined from 29 linear pieces,
  the derivative went through the generic chain rule, which reads `PointY` as an
  unknown scalar function and multiplied by the derivative of the path, a list
  of 29 points, until a size limit declined: 0.6 to 3.6 s, paid again at each
  evaluation and at each read of a parameter holding the value (9 reads: 30 s).
  `PointX`, `PointY`, `PointZ` and `At` (with an index that does not depend on
  the variable, or that is constant between its jumps, such as `\lceil u\rceil`)
  are now differentiated as linear accessors: the accessor of the derivative of
  the container, with a constant point element of a list given the zero point.
  The derivative of the row is a closed form in 60 ms, and 9 reads cost what 1
  does. The generic rule gave wrong values too: with `g := t ↦ (t, t^2)`,
  `D(PointY(g(u)), u)` was a tuple, and is now `2u`. `PointZ` of a list of 2-D
  points whose elements may be absent reports the dimension error, as for
  present points.

- **Two typing defects of 0.161.0, fixed by the change to the reading of list
  types (see Breaking Changes).** A symbol declared
  `(broadcastable<unknown>) -> unknown` refused the function literal
  `(x) => (x, x)`: `ce.assign` threw a type error, because
  `provablyAdmits('nothing', 'broadcastable<unknown>')` answered `true`, as if
  the type stated that a `Nothing` value is possible. A `broadcastable<T>` is
  now read as the union of its two parts, so `broadcastable<unknown>` states
  nothing about `Nothing`, as `unknown` does not, and the assignment is
  accepted. A generic function literal over a ragged list gave a type that does
  not hold the value: with `g` the literal `(x: T) -> tuple<T, T> where T` with
  the body `(x, x)`, `g([[1], [2, 3]])` was typed
  `list<tuple<vector<integer^1> | vector<integer^2>, vector<integer^1> | vector<integer^2>>>`,
  and its value is `[[(1, 1)], [(2, 2), (3, 3)]]`. It is now typed
  `list<list<tuple<integer, integer>>>`, which holds the value.

- **A `Sum` or `Product` bound refused a union type with a number arm** (Tycho
  row 421). With `x` declared `broadcastable<number | tuple>`,
  `\sum_{n=1}^{x} n^2`, `\sum_{n=x}^{5} n` and `\prod_{n=1}^{x} n` were invalid,
  so a function such as `s(a) = \sum_{k=1}^{a} k` over that declaration never
  registered, while the bound of an integral and the operands of `Mod` and `Max`
  accepted the same declaration. The check of a bound said it refuses only a
  bound that cannot be a number, but it accepted only a type below `number`. Now
  `s(3)` is 6 and `s([1, 2, 3])` is `[1, 3, 6]`, as over a parameter declared
  `any`.

- **The derivative of a sum whose bound is `⌊x⌋`** (Tycho row 420).
  `D(Sum(Cos(i x), Limits(i, 1, Floor(x))), x)` stayed unevaluated, because a
  bound that depends on the variable declined the rule for a sum, and the
  numerical derivative of its compile read across the jumps of the sum at the
  integers: −5.308 at x = 1.9, where the derivative is −0.946. A bound of a
  `Sum` whose derivative is 0, a step of the variable (`Floor`, `Ceil`, `Round`,
  `Truncate` or `Sign` of it, also through a call of a function), now keeps the
  rule: between two jumps the set of terms is fixed, and the derivative is
  `Σ_{i=1}^{⌊x⌋} −i sin(i x)`, which compiles to `javascript` and `interval-js`;
  the derivative of order 2 closes too. At a jump the result is the value of
  that sum, as `D(⌊x⌋)` is 0 at an integer. A bound that is not a step (`x`) or
  not pure keeps the derivative unevaluated. A `Product` with such a bound still
  stays unevaluated, and its numerical derivative is now right between the jumps
  and `NaN` at them (the change under Behavior Changes):
  `D(Product(x + i, Limits(i, 1, Floor(x))), x)` at 1.9 is 1, where it was 57.3.
  `D(Truncate(x), x)` is 0, as for `Floor`; it stayed unevaluated.

- **`FindRoot` reports `converged: false` far from a root of a steep equation**
  (Tycho row 419). The root test of 0.161.0 allows each residual
  `tolerance · (1 + Σ_j |J_ij| · max(1, |θ_j|))`. Its Jacobian part is a
  first-order claim, that a zero lies within a relative change of `tolerance` of
  the parameters, and it had no check: `2 - \sin(10^{18} a) = 0` has no real
  root, and its Jacobian, up to 10^18, let a residual of 1 to 3 pass at every
  point (`converged: true` from `a = 1`, from `a = 0` and under the bound
  `a \le 0`). An equation whose residual is above `tolerance` is now a root only
  when the residual confirms the claim. Each parameter is moved by
  `±2 · tolerance · max(1, |θ_j|)` toward and away from the zero. The central
  difference of the residual must be the change the Jacobian predicts to within
  half, and the parabola through the three values must reach `tolerance`, change
  sign, or touch 0 to within the rounding of the parameters (a root of even
  multiplicity, such as `10^{24}(a^2-2)^2 = 0`). At a bound, the side inside the
  bounds is checked and a zero just past the bound is accepted. Over 100 starts,
  `2 - \sin(10^{18} a) = 0`, `\sin(10^{12} a) = 0.5` and
  `\sin(10^{10} a) = 0.5`, which oscillate faster than the tolerance can
  resolve, go from 100, 100 and 93 starts reported `converged` to none;
  `\sin(10^8 a) = 0.5`, `a^3 - 2a = 10^9`, `10^{12} a = 1` and `e^a = 10^{30}`
  stay converged. The check costs at most two residual evaluations per equation,
  at the points where the solve would stop.

- **`FindFit` reports `converged: true` at an exact fit** (Tycho row 418). A
  degree-10 polynomial through 11 points is an exact interpolation whose
  constant term is 0. The fit reached the rounding floor (a residual norm of
  3e-10) and reported `converged: false` after 200 iterations, since the record
  of a fit read `converged` from the solver's stationarity tests alone, and
  neither can pass on a problem scaled that badly: the Jacobian columns reach
  10^10, so a residual at the rounding floor still has a gradient far above the
  absolute gradient tolerance, and the constant term, whose true value is 0,
  never takes a step that is small relative to itself (the per-component stall
  test of 0.161.0; the whole-vector stall test it replaced reported this fit
  converged after one iteration). A fit whose every residual is within the
  engine's tolerance of the terms its row computes,
  `|r_i| ≤ tolerance · (1 + Σ_j |J_ij · θ_j|)`, is now `converged`, whatever the
  gradient and the parameters' magnitudes; a fit with a misfit is converged at a
  stationary point as before. The scale is the model's terms, not the
  `max(1, |θ_j|)` of the root test of `FindRoot`, under which a degree-10
  polynomial over `x` in [10, 20] would tolerate a residual of 1 at data of
  magnitude 1. A root solve or a fit within its tolerance stops polishing once
  an accepted step moves every parameter by less than the tolerance of its own
  scale (`tolerance · max(1, |θ_j|)`, the precision to which the tolerance test
  says the parameters are determined) while the cost is at its rounding floor,
  so the same fit now takes 5 iterations from the exact coefficients and 44 from
  a start of 1, and the stacked `FindRoot` form 4 and 39 instead of 20 and 92; a
  point whose residual is still dropping (`1 + (10^{12} a)^2 = 0` from
  `a = 10^{-11}`, within the root tolerance of its steep equation at a residual
  of 101) goes on to its minimum as before. A solve cut short by a deadline
  reports `converged: false` beside `timedOut: true`, as the record's contract
  says; a root solve that timed out while polishing a root reported both true.
  The `FindFit` record still has no `stationary` key.

## 0.161.0 _2026-10-21_

### New Features

- **`FindRoot` takes the options dictionary of `FindFit`** (Tycho row 408). A
  third argument `{global: {b: [lo, hi]}}` searches the named parameters (at
  most two) over the range for the lowest sum of squared residuals of the whole
  system, equations included, as `FindFit` does for a model over data: the
  separable scan when the system is linear in the other parameters, a
  multi-start otherwise, with `[lo, hi, step]` for a caller-given grid step. A
  stacked system of fit rows next to a plain equation
  (`a cos(b x_i + c) + d x_i + e = y_i` for each data point, and `d = 0`) is
  searched for its best frequency; the constant phase coefficients of the
  equations (`3.22` in `cos(3.22 b + c)`) space the grid as the span of a
  variable does for a fit, so a point falls in every basin of the residual. An
  equation built from a row at `x = 0` reads `a cos(0 · b + c) + 0 · d`, which
  canonicalization keeps; such a parameter is no longer read as a step function
  of the system, which turned the scan into the coarse multi-start. The record
  is the usual one (see the `stationary` entry below). With a kernel pool on the
  engine (`ce.workers`), `evaluateAsync()` scans the grid on the workers, as
  `FindFit` does.

- **`Parser.binderSymbol()` and `Parser.rebindSubscripts()` are public**, for a
  custom LaTeX dictionary entry that binds a name (a `with` clause, a loop
  form). Since 0.160.0 a subscripted name in a binder position is a new name
  also when its base is declared as a list (`n_{0}` with `n: list<number>` is
  `At(n, 0)` elsewhere); the two parser methods that the built-in binders use
  for that were internal, so a custom clause could not: with `n` a list,
  `n_{0} + 1 \operatorname{with} n_{0} = 2` through a custom infix entry that
  read the binder with `parseSymbol()` was a parse error. `binderSymbol(expr)`
  gives the name that an expression declares in a binder position (`n_0` for the
  `At(n, 0)` that the symbol parser made from `n_{0}`; a symbol is its own name;
  `null` otherwise), and `rebindSubscripts(expr, names)` rewrites those element
  accesses in a body, including a body parsed before the clause. See "Binding a
  Name in a Custom Entry" in the LaTeX syntax guide.

### Improvements

- `Factor` uses certified univariate factorization over the rationals, including
  nonlinear factors such as `Factor(x^4+4) = (x^2-2x+2)(x^2+2x+2)`. The
  `numerics` entry point exposes `factorRationalPolynomial` and its types for
  structured exact factors, multiplicities and explicit incomplete results when
  resource limits or certificate checks prevent completion.

- `.N()` of `Power`, `Exp`, `Ln` and the other numeric heads of a number operand
  is about 1.6x faster at `ce.precision = 30`: the check for a collection
  operand no longer runs a type match on a number literal (#465, contributed by
  [enumeratio](https://github.com/enumeratio)).

- **`GammaLn` of a complex argument is the principal logarithm of Γ(z) in every
  region,** as documented, and `LogGamma` stays the continuous branch (#463,
  contributed by [enumeratio](https://github.com/enumeratio)).
  `GammaLn(0.5 - 11i)` was `-16.3598 - 15.3806i`, the continuous value (the
  principal log is `-16.3598 - 2.8143i`), while `GammaLn(-2.5 + 0.1i)` was
  already principal, `-0.1031 - 3.0313i`. The imaginary part is now reduced to
  `(-π, π]`, so `GammaLn(-7.3 + 2i)` is `-13.3277 - 1.5238i` (it was
  `-13.3277 - 20.3734i`), and `GammaLn(25.5 - 40i)` is `31.7745 - 1.2258i` (it
  was `31.7745 - 139.4559i`). Real arguments are unchanged: `GammaLn(-2.5)` is
  still `ln|Γ(-2.5)|`.

- **Compiled `GammaLn` of a negative real is `ln|Γ(x)|` on JavaScript and the
  shader targets,** as the interpreter gives (#463, contributed by
  [enumeratio](https://github.com/enumeratio)). `GammaLn(-2.5)` compiled to
  JavaScript gave `NaN`; it is now `-0.0562`, and `GammaLn(-7.3)` is `-7.7791`.
  A pole (`0`, `-1`, `-4`) is `+Infinity`. The GLSL and WGSL `_gpu_gammaln` used
  the Stirling series, which is meaningless for x < 0; it now reflects
  (`ln π - ln|sin πx| - ln Γ(1 - x)`) and answers `+Infinity` at a pole, as
  `_gpu_gamma` does.

### Behavior Changes

- **`unknown` is an inference marker, not a content type.** Every type is now a
  subtype of `unknown`, the absence markers, `error` and `any` included:
  `ce.type("missing").matches("unknown")` and
  `ce.type("any").matches("unknown")` are `true`, and `list<integer | missing>`
  matches `list<unknown>`. `unknown` still proves no contract: it matches only
  `any` and itself. Bare `list`, `list<unknown>` and `list<any>` denote one set
  of values and differ as declarations: the bare name and the explicit
  `<unknown>` ask inference to refine the element type from each assignment
  (`xs: list<unknown> := [1, Missing]` reports `list<integer | missing>`, where
  it stayed `list<unknown>`), `list<any>` is a contract that never moves. Bare
  `tuple` and `record` refine their slots and fields the same way
  (`t: tuple := (1, Missing)` reports `tuple<integer, missing>`), and a
  transparent alias of a bare name (`type L = list`) carries the instruction. A
  type derived from a value keeps an unresolved cell: `ListJoin(fs, [2])` with
  `fs: list<unknown>` is `list<unknown>` (it was `list<integer>` for a value
  that could hold an error), and `Filter(tu, p)` over
  `tu: tuple<unknown, missing>` is `list<missing | unknown>` (it was
  `list<missing>` for the value `[1]`). A union keeps an absence arm beside
  `unknown` (`missing | unknown`) and absorbs a value arm (`integer | unknown`
  is `unknown`); a union with an `error` arm reduces to `error`, as before. An
  `incompatible-type` diagnostic shows a generic parameter whose variable got no
  bound by the variable's name, `indexed_collection<T>`, instead of
  `indexed_collection<unknown>`. A lambda whose parameters are not inferred yet,
  `(unknown) -> number`, still does not satisfy `(any) -> number`. `expression`
  and `value` are the contracts that exclude the immediate markers. Design and
  decisions: `docs/plans/2026-10-21-unknown-inference-marker.md`.

- **`FindRoot` reports `converged` only at a root** (Tycho row 414).
  `FindRoot(a^2 + 1 = 0, a)` gave `converged: True` with `residualNorm: 1`: the
  solver's stop test is a stationary point of the sum of squared residuals,
  which is a minimum of the misfit for a fit but a root only when the residual
  is zero. `converged` is now true only when every residual is within the
  engine's tolerance scaled by its own equation,
  `|r_i| ≤ tolerance · (1 + Σ_j |J_ij| · max(1, |θ_j|))` with `J` the Jacobian
  and `θ` the parameters: an absolute part for a residual that is zero to within
  the tolerance, a relative part that says the parameters the equation reads are
  determined to that relative precision (`a^2 = 10^{12}` from `a = 1` is a root;
  `a^2 + 10^{-7} = 0` is not; a steep equation or a large parameter does not
  hide another equation's residual). The tolerance is never below 64 machine
  epsilons, and a non-finite residual or Jacobian is never a root. The solver's
  stall test is now per component: the system `a^2 = 4, b = 10^{11}` stalled
  after one step at `a = 2.5`, which was reported as converged, because a step
  of 1 in `a` was negligible next to the norm of the whole parameter vector. The
  record gains `stationary`, the solver's own stop test, which is true at such a
  minimum too: a stacked system of data rows next to an equation, whose misfit
  is not zero, reads it where it read `converged`. The gradient test alone no
  longer stops a root solve: `FindRoot(10^{-6} (a^2 - 4) = 0, a)` from `a = 1`
  stopped at its start point as converged, since the absolute gradient tolerance
  passes everywhere on a residual scaled small, and now reaches `a = 2`. The
  `FindFit` record and its convergence test are unchanged.

- A call between a typed declaration with no value and the definition of the
  function now resolves. With `let g: (integer) -> integer`, then
  `let a = String(g(2))`, then `function g(k) { 2k }`, `a` was `"g(2)"` on the
  Epsil runner and on the whole-block route; it is now `"4"`, and the call is
  checked against the declared signature (`String(g(1.5))` gives the
  `incompatible-type` error). This also holds on each iteration of a loop body,
  when a block is evaluated again (with `evaluate()` or `evaluateAsync()`), and
  when a program runs again on the same engine. A program that stopped (time or
  step budget) before its definition ran no longer leaves that definition to a
  later program that declares the same name. Inside a function body the declared
  signature is still not checked (recorded in `ROADMAP.md`).

- An `evaluateAsync()` call started by the host, or by a handler that passes no
  options, now runs on its own copy of the engine's evaluation-context stack,
  not on the engine's array. A scope that the host pushes or pops while the call
  is pending no longer reaches it. Example: start
  `Block(Tick(), w + 1).evaluateAsync()` with `Tick()` an operator that only has
  an `evaluateAsync` handler, then run
  `ce.pushScope(); ce.declare('w', 'integer'); ce.assign('w', 5)` before
  awaiting it. The result was `6`; it is now `w + 1`. Pending asynchronous
  evaluations no longer see each other's scopes or the host's later scopes, as
  was already the case for scopes that an evaluation pushes itself.

### Resolved Issues

- **On the `interval-js` target, `0^x` over an exponent interval has the value
  0** (Tycho row 417). `compile(ce.parse('0^{x}'), {to: 'interval-js'})`
  answered `empty` for every exponent interval, as did a declared base holding
  0, so a plot that reads a row through the interval leg drew nothing for a
  slider at 0. The interval-exponent power read a base whose upper end is
  exactly 0 as a negative base. A base whose only point in the domain is 0 now
  answers `[0, 0]` for a positive exponent interval, `[0, 1]` for one that
  reaches 0 (`x^0` is 1 in the interval library), a clipped enclosure for one
  that reaches below 0, and `empty` for a wholly negative one, where no point of
  the box is defined; the scalar-exponent power answered a clipped enclosure
  `[+∞, +∞]` there and now also answers `empty`. The literal bounds 0 and 1 are
  certified exact, so the export does not move them one ulp outward.

- **A subscripted binder is a new name in a `cases` block and in a set-builder
  whose variable appears only in the condition** (the two residues of Tycho row
  410). With `n` declared a list, the first row of
  `\begin{cases} n_{0}\coloneq 3\\ n_{0}+1\end{cases}` was read before the
  parser knew the environment is a block, so the target was the element access
  `At(n, 0)` and the block declared a function `At`; such a row of a `cases`,
  `dcases` or `rcases` environment now gets a second reading, the declaration of
  the local `n_0`, which the block swaps in for its first, middle and last rows
  alike (a single row, a row with a condition and a matrix keep the top-level
  reading). `\{2n_{0} \mid n_{0}\in\Z\}` read its variable as `At(n, 0)` because
  the body names no variable; a membership of the condition (`v \in S`, alone or
  in a conjunction) whose variable the body reads now names it, while a side
  condition on another subscript keeps its index. Both parse as with `n`
  undeclared. The parser's `environmentName()` gives a dictionary entry the
  innermost environment being read, and `blockRowAlternative()` the second
  reading of a row.

- `Solve` no longer lets a called user function's global take the place of the
  unknown. With `h := a ↦ a − k`, `Solve(h(k) = 1, k)` gives `[k + 1]`, and
  `[3]` with `k := 2`; it stayed unevaluated, and before that it gave `[]`. The
  unknown is renamed in the equation and in the specs, as `Integrate` and
  `Limit` already rename their variable. This covers domain specs, a bundled
  `{h(k) = 1, k ∈ 1..3}`, systems and `NSolve`. An assumption about the unknown
  (`assume(k ≠ −1)`) and a declared or use-inferred type still restrict the
  solutions.

- `Solve(t·x = 1, t)` gives `[1/x]` when `t` is declared `real`; it stayed
  unevaluated. The root `1/x` is the pole `~oo` at `x = 0`, but each of its
  finite values is real.

- An unknown that has an assigned value is no longer restricted by the type
  inferred from that value. With `x := 5`, `Solve(2x = 1, x)` gives `[1/2]` and
  `Solve(x^2 = 2, x)` gives `[√2, −√2]`; both gave `[]`. With `x := 3, y := 4`,
  `Solve(2x + 4y = 1, [x, y])` is no longer sent to the integer solver, which
  gave `[]`. A declared type still restricts the roots.

- A `Solve` over a finite domain whose equation or predicate has a free
  parameter stays unevaluated: `Solve(x − a = 0, x ∈ 1..5)` and
  `Solve(x > a, x ∈ 1..5)` were `[]`.

- The bounds of a `Limits` clause and the collection of an `Element` clause of
  `Sum`, `Product`, `Integrate` and `NDSolveFunction` read the enclosing symbol,
  not the clause's own index. With `k := 2`, `∫₀ᵏ k dk` gives `2` (was `k²/2`),
  `∏_{k=1}^{k} k` gives `2` (was `k!`), `Σ_{k=1}^{k} k` gives `3` (stayed
  unevaluated) and `Σ_{k ∈ [1, k]} k` gives `3`. Also
  `Σ_{k=1}^{3} Σ_{k=1}^{k} k` gives `10` on every route (was `3·Σ_{k=1}^{k} k`),
  and `∫₀ᵏ k dk` with a free `k` reports `k` as an unknown.

- `FindFit` with the `global` option now spaces the grid of a frequency by the
  period of the expression its periodic function is part of, not by the period
  of the function alone. A square, an absolute value or a product of periodic
  functions of the same argument can have a shorter period: `a cos(b x + c)²`,
  `a |cos(b x)|`, `a sin(b x) cos(b x)` and `sin(b x) / cos(b x)` have the
  period π, and `(sin(b x) cos(b x))²` has π/2. Their basins in `b` are half or
  a quarter as wide as those of `a cos(b x)`. The grid was spaced for the period
  2π, so the search could return a wrong frequency with a large residual: for
  example `b` over [0.3, 300] on 200 points over [0, 10], with the true `b`
  between two grid points. `tan(b x)²` keeps the period π of `tan`, because
  `tan(θ + π/2) = −cot θ`.

- **`FindRoot` did not move a parameter read through `PointX` of a point**
  (Tycho row 415). On `PointX(PointList(2a, 2)) = 4` the solver stopped after
  one iteration at the start value: the symbolic derivative of the residual was
  the generic chain rule's
  `PointList(2, 0) · Apply(Derivative("PointX", 1), …)`, a product of a point
  and a number that is a type error, which compiled to a Jacobian of NaN. `D`
  now differentiates an accessor of a literal container through the operand it
  selects: `PointX`, `PointY` and `PointZ` of a `Tuple` or a `PointList`, and
  `At` of a `Tuple`, a `PointList` or a `List` with a literal index
  (`D(PointY((2a, a^2)), a)` is `2a`, `D(At([2a, a^2], -1), a)` is `2a`); over a
  `PointList` that zips (a component is a collection) the accessor reads the
  differentiated `PointList`, so `D(At(PointList([a, 2a], 5), 1), a)` is the
  point `(1, 0)`; and `FindFit`/`FindRoot` take a finite difference for a
  derivative that is not valid.

- Boxing nested folds whose accumulator is read by index no longer takes about
  three times longer for every level of nesting (#462). Since 0.158.0 such an
  accumulator is typed to the fixpoint of its seed and its body's result, which
  canonicalizes the combiner once per fixpoint step, and a fold nested in the
  body was refined from scratch inside each of those canonicalizations. Now a
  nested fold is not refined while the enclosing fold only admits its callback,
  and the fixpoint found for it in one step of the enclosing fold is the
  starting point of the next step, where one canonicalization settles it. Six
  nested folds of the shape reported box in 66 ms instead of 1.4 s (0.156.0: 47
  ms); eight in 121 ms instead of 13 s. Types and values are unchanged, and a
  chain of numeric folds costs what it did.

- A comparison with a long exact sum whose coefficients have many distinct
  denominators no longer throws. `0 < \sum_{k=1}^{300} \ln(-k)/k^2` evaluated by
  extracting the content of the sum, whose denominator (the least common
  multiple of `k²` over the terms) is past the double range; `lcm` gave
  `Infinity` and the next call threw
  `RangeError: The number Infinity cannot be converted to a BigInt`.
  `rationalGcd` now uses the bigint form past the safe integer range (with a
  non-negative denominator), and the public `lcm` of the `numerics` entry point
  answers `NaN` for a non-integer or non-finite operand, as `gcd` does, instead
  of throwing.

- The presence test of a compiled branch condition no longer follows a global's
  value through a bound name of the same name. With `k := 2m` in the engine,
  `\{\sum_{k=1}^{3} k > 0: 1, 0\}` compiled to a test of `m`
  (`_.m !== undefined`), so an unsupplied `m` made the branch take no arm; the
  `Sum` index `k` is not a read of the global, and the compiled code is now
  `(0 < 6) ? 1 : 0`. The same held for a parameter of a called function literal
  named like a valued global. A global that the condition does read (directly,
  or through the body of a called function) is still tested.

- A chain of `\text{for all}` or `\text{there exists}` clauses that have no
  condition, such as
  `x_0 \text{ for all } y_0 \; x_1 \text{ for all } y_1 \; …`, parsed in
  exponential time: 12 clauses took 10 to 30 seconds, and a `(` after the chain
  (`… + (z > 0)`) made it slow too. A quantifier parsed the rest of the input up
  to three times, to find a `(` that starts its body and then for its condition,
  and each parse reached the next quantifier. Now a quantifier parses its
  condition again only when its own `(` test stopped the parse, so 12 clauses
  take less than 30 ms, or about 100 ms with a `(` after the chain. The parse
  results are unchanged.

- An aborted `broadcastAsync()` or `FindFit.evaluateAsync()` no longer keeps a
  worker of the kernel pool busy. Before, a slice that a worker was running when
  the signal aborted ran to its end, and its result was dropped. Now the pool
  tells the worker to stop through a cancel flag in shared memory; the worker
  reads it every 64 cells, or at each grid point of a `FindFit` scan, and is
  free again at once. A slice also stops within 64 cells of its deadline, so a
  heavy kernel keeps the cells it computed, and a slice whose deadline has
  passed before its turn is not sent to a worker. A worker that has not answered
  within the new `cancelGrace` option of `createKernelPool()` (default 250 ms,
  at most 2147483647; `Infinity` turns it off) after an abort, or after the
  deadline of its task, is terminated and replaced by a new one from `create`;
  the tasks that waited for it run on the new worker. Without
  `SharedArrayBuffer` (a browser page that is not cross-origin isolated), or on
  a host that cannot send the flag, only the termination applies.

- Each asynchronous evaluation now has its own top-level evaluation number,
  carried by its evaluation-context stack. Before, all pending asynchronous
  evaluations of an engine shared one number. So with
  `B(h) = Block(r := h(k), h := z ↦ 2z, r)`,
  `Promise.all([B(h).evaluateAsync(), B(q).evaluateAsync()])` gave `h(k)` and
  `q(k)`, where the same two evaluations awaited one after the other gave `2k`
  and `2k`. A synchronous evaluation of such a block while an asynchronous one
  was pending also gave `q(k)`. Both now give `2k`. Related fixes: when a symbol
  holds such a block (`p`), `ce.symbol('p').evaluateAsync()` now gives `2k`, as
  `evaluate()` does; a block in an operand of a function application stays a
  nested block on the asynchronous route, as on the synchronous route (with
  `f(a, b) = (a, b)`, `f(Tick(), B(h))` gave `(0, 2k)` and now gives
  `(0, h(k))`); a sticky unresolved call read again after an `await` in one
  asynchronous evaluation stays unresolved (it could resolve too early); and the
  locals of a block are kept separately for each evaluation, so a synchronous
  evaluation of a block between two iterations of a pending asynchronous loop
  over the same block no longer removes the loop's locals (`t + 2` instead of
  `t + 3`), and two evaluations whose runs of one block alternate no longer lose
  each other's locals (`t + 1` instead of `t + 3`).

## 0.160.0 _2026-10-21_

### Behavior Changes

- A call evaluated while its function had no definition stays symbolic for the
  rest of the top-level evaluation that produced it, even when the name is
  assigned later in that evaluation.
  `Sum(Block(If(k = 2, h := z ↦ 2z), h(k)), k, 1, 3)` is `10 + h(1)`: the `h(1)`
  computed at `k = 1` is not resolved by the assignment at `k = 2` (the
  unreleased callable-binding change had made it `12`). A later evaluation
  resolves the stored call as before: `r = ce.parse('g(3)').evaluate()`, then
  `ce.assign('g', …)`, then `r.evaluate()` is `9`. A `Block` evaluated directly
  by the host counts each statement as its own evaluation, as the Epsil runner
  does, so `Block(r := fn(3), fn := Function(2z, z), (r, fn(3)))` is still
  `(6, 6)`, while the same block nested in another expression, or a `do` block
  in an Epsil statement, keeps `fn(3)`.

- In an Epsil program, a `function` statement is installed before the first
  statement runs when a statement before it calls the function:
  `let a = String(g(3))` then `function g(k) { k^2 }` gives `"9"` (it gave
  `"g(3)"`; `let a = g(3)` gave `9` on both routes already, by resolving the
  stored call when `a` was read). The installation is skipped, and the program
  behaves as before, when a `type` statement comes before the function, when an
  earlier statement gives the name a value, when the body reads an earlier
  variable whose type cannot be read statically, or when the function is
  generic. An assignment of a function literal (`g = (k) => k^2`) takes effect
  when it runs, as before.

- On the whole-block route, a `let g: (integer) -> integer` statement followed
  by `function g(k) { 2k }` now checks a call written before the `let`: `g(1.5)`
  is `incompatible-type` on every route (it was `3` on the block route, which
  ran the clause installed before the declaration).

- The closure documentation now states what the engine does: a function literal
  captures the binding of a free variable, and reads the value that binding
  holds when the function is called; the user guides describe how a call
  resolves its head lexically and how a call before the definition behaves.

- Bare `list`, `set`, `dictionary`, `collection`, and `indexed_collection` now
  admit arbitrary contents, matching their `<any>` forms. Bare `tuple` accepts
  every arity and slot type, including absent coordinates; `tuple<any>` still
  has one slot. Bare `record` covers records with absent fields. Explicit
  element constraints remain restrictive, and explicit `<unknown>` no longer
  collapses to the broader bare name. Numeric vector/matrix defaults are
  unchanged. Compiled omission-sensitive operations require evidence that raw
  Nothing positions cannot occur; use an explicit content constraint when the
  broader bare family no longer provides that evidence.

- Raw `Tabulate` / `Table`, `Scan`, and `Iterate` results retain possible
  `Nothing` in their element types. A two-dimensional tabulation returns lazy
  rows: accessing a row or its count does not evaluate its cells or erase
  omitted positions. `Shape` preserves raw extents, including omitted cells and
  empty axes. `ListFrom(row)` explicitly collects and omits those entries.
  Compilation refuses omission-capable tabulations and scans until targets can
  represent omission distinctly.

- The type `broadcastable<T>` is now `T | list<T>`. It was `T` or an indexed
  collection of `T` other than a tuple or a string, so the subtype relation was
  not transitive: `tuple<integer>` is an `indexed_collection<integer>`, which
  was a `broadcastable<integer>`, but `tuple<integer>` was not one. Now every
  subtype of `list<T>` (a vector, a matrix, a `Range`) is a `broadcastable<T>`,
  and a tuple, a string, a set and a value typed only `indexed_collection<T>`
  are not. A tuple is now provably disjoint from `broadcastable<number>`, as the
  rule that a tuple argument is passed whole requires. Evaluation does not
  change, with two exceptions that follow from the new meaning: `ce.assign` of a
  value typed `indexed_collection<T>` to a symbol declared `broadcastable<T>` is
  refused, as it is for a symbol declared `list<T>`; and
  `Map(f, [(1, 2), (3, 4)])` with `f: (broadcastable<number>) -> number` is one
  `incompatible-type` error instead of a list of errors, one for each point.

- The meet (intersection) of two collection types of different kinds is the
  narrower kind with the meet of the elements, not `never`:
  `list<number> & indexed_collection<integer>` is `list<integer>`,
  `set<number> & collection<integer>` is `set<integer>`, and
  `tuple<number, number> & indexed_collection<integer>` is
  `tuple<integer, integer>`. So is the meet of a list with dimensions and a list
  with none: `list<number^2> & list<integer>` is `list<integer^2>`. A pair that
  can share a matrix by different readings
  (`list<number> & collection<list<integer>>`, which an integer matrix
  inhabits), and a pair with two transparent aliases, are kept as written unless
  they are provably disjoint; a single transparent alias is met through its
  definition. One effect: with `type alias json = list<json> | integer`,
  `Norm(j)` for `j: json` is valid (it was refused when boxed), and with `j = 5`
  it evaluates to `5`.

- The overlap test of types (`typesOverlap()`), used to admit arguments and to
  detect protocol conformances that collide, compares the arms of a union one by
  one, and two collections that share only the empty collection do not overlap
  at any level, as for a parameter that is not a union. So a call is refused
  when the argument type and a union parameter share only empty collections:
  `f: (list<string> | string) -> integer` refuses an argument typed
  `list<integer> | integer`, as `f: (list<string>) -> integer` refuses an
  argument typed `list<integer>`. Two collections whose elements are at
  different depths now overlap when a tensor can be in both:
  `list<list<list<real>>>` and `list<number>` share a rank-3 tensor of reals.

- A list with dimensions whose element type is a top type (`vector<unknown>`,
  `list<any^3>`, `list<(any | integer)^3>`) holds scalars, not lists:
  `list<list^2>` and `list<list<integer>^2>` are no longer subtypes of
  `vector<unknown>` and `list<any^2>`, as `list<integer^(2x2)>` already was not.
  The relation was not transitive: `list<integer^(2x2x2)>` is a `list<list^2>`,
  which was a `vector<unknown>`, but `list<integer^(2x2x2)>` is not a
  `vector<unknown>`. The meet follows: `list<any^3> & list<list^3>` is `never`
  (it was `list<list^3>`), and the two types do not overlap. A list with no
  dimensions is unchanged: `list<list^2>` is a `list<unknown>`.

- The meet of two collection types of the same kind no longer drops values that
  are in both. Two lists, two indexed collections or two collections whose
  elements are at different depths are kept as written:
  `list<number> & list<list<integer>>` was `list<never>`, although an integer
  matrix is in both. Two lists with different fixed shapes are met row by row:
  `list<number^(2x2)> & list<list<integer>^2>` is `list<integer^(2x2)>` (it was
  `never`), and `list<number^2> & list<integer^-1>` is `list<integer^2>` (it was
  `never`). A list with a fixed length and no common element is `never`:
  `list<number^2> & list<string^2>` was `list<never^2>`. A bare `list` is read
  as `list<unknown>`: `list<any^3> & list` is `list<unknown^3>` (it was
  `never`). The overlap test follows: `list<number^(2x2)>` and
  `list<list<integer>^2>` now overlap, which two protocol conformances on these
  types would show as a collision.

- Two recursive aliases that can share no finite value are disjoint: with
  `type alias A = tuple<A> | integer` and `type alias B = tuple<B> | string`,
  `A & B` is `never` and the two types do not overlap (they were kept as written
  and overlapped). `couldMatch()` reads the arms of a recursive alias: with
  `type alias json = list<json> | integer`, `couldMatch(number, json)` is `true`
  (it was `false`). The test reads recursive aliases by their finite values,
  while the subtype relation reads them coinductively: with
  `type alias V = tuple<V>`, `V` is a subtype of `A` and of `B` although `A & B`
  is `never`. `V` has no value, so no value is lost.

- A generic alias whose arguments grow at each unfold
  (`A<T> = B<list<T>> | integer` with `B<T> = A<T>`) no longer overflows the
  stack in the subtype, overlap and meet tests: past a limit on the open
  unfolds, the answer is the conservative one.

- The meet, the overlap test, `couldMatch()` and `provablyDisjoint()` of types
  built from a chain of aliases with two branches at each level
  (`Aₙ = list<Aₙ₋₁^2> | list<Aₙ₋₁^3>`) take a time that grows with the depth of
  the chain. The work doubled at each level: at depth 20, the overlap test took
  about 7 s and the meet did not finish in 10 minutes.

- A literal empty list at a required or optional point parameter is accepted and
  maps to `[]` without invoking the function, matching evaluation.

- Interpreted calls and collection callbacks now use their captured lexical
  binding, including lazy and asynchronous evaluation. Updating that binding
  remains visible; an unrelated declaration with the same name cannot redirect
  the call. Forward calls resolve in their original lexical environment.

- The coordinates of a point divided by a number that may be zero are typed
  `real | infinity | nan`, as a scalar quotient has been since 0.121.0: with
  `p: tuple<integer, integer>` and `x: integer`, `p / x` was typed
  `tuple<rational, rational>`, but `x = 0` gives `(~oo, ~oo)`. The same applies
  to a list of points and to a value typed `broadcastable<vector<…>>`. A divisor
  proven not to be zero keeps the precise type: `p / 4` and `p / n` with
  `n: integer<1..>` are `tuple<rational, rational>`. Also, `i / x` is typed
  `imaginary | infinity` (was `imaginary`), and `(1 + 2i) / x` is typed `number`
  (was `complex`). An imaginary divisor is never zero, so `w / j` with
  `w: complex` and `j: imaginary` stays `complex`.

- A collection divided by itself is no longer folded to `1`: `L / L` with
  `L: list<integer>` stays `L / L`, and with `L = [1, 2]` it evaluates to
  `[1, 1]`. The fold `x / x → 1` still applies to a symbol that is not declared
  as a collection.

- A structural `Divide(a, b, c)` is typed as `(a / b) / c`. Only the first
  divisor was read: `Divide(1, 2, x)` was typed `rational` although `x = 0`
  gives `~oo`. A real numerator that may be infinite, divided by an imaginary
  number, is typed `number` (was `complex`): `+∞ / i` is `~oo`.

- Calls through callback parameters retain their lexical contracts, including
  inside nested lambdas such as `Map(x ↦ h(x), xs)`. A same-named global no
  longer supplies the call's result type or introduces `Nothing`. A parameter
  first used as a call head now keeps its annotation and validates arguments
  against it. Ordinary calls and captured operators follow the same binding rule
  during body-based type inference. Compilation refuses a known captured
  function body when lowering it would substitute a different ambient binding.

- Bare Map callbacks such as `Map(h, xs)` follow the callback's lexical binding.
  A parameter named after a global function or library operator now uses its own
  declared result type and argument contract. An opaque callback result stays
  `any`; a shadowed global cannot supply a narrower result or introduce
  `Nothing` into this callback's result. Reducer parameters also retain their
  own result type when named after a built-in arithmetic operator.

- Corrected Map inference to retain possible nested collections and missing data
  when it excludes `Nothing` from callback inputs. Opaque `any` callback results
  remain `any`; they no longer copy the source element type. Positional
  callbacks over strings report character data. Compilation again accepts tuple
  mappings whose callback bodies prove they cannot return `Nothing`.
  Omission-capable sources remain refused; numeric collection annotations
  restore compilation for affected aggregate and predicate code. Explicit
  numeric callback contracts also compile for mutable local functions and
  callback parameters; opaque runtime callbacks remain refused.

- Data tuples preserve `Nothing` coordinates: `(1, Nothing, 3)` has three
  positions. A tuple whose coordinates are all missing remains a tuple. `Zip`
  preserves these coordinates and all-missing rows, so source positions stay
  aligned. JavaScript and Python compiled tuples retain all-missing tuples;
  compilation refuses possible `Nothing` coordinates until targets can represent
  omission distinctly. Lists and `TupleFrom` retain their existing immediate
  omission behavior.

- Numeric aggregates skip `Nothing` yielded by raw lazy views. `Mean` of a view
  exposing `1, Nothing, 3` now returns `2` instead of an incompatible-type
  error; its denominator counts only retained data. The other univariate
  statistics follow the same rule, and extrema such as `Min` now finish
  evaluating after an omitted datum. All-omitted input follows each operator's
  ordinary empty-input rule (`Sum` gives `0`, `Product` gives `1`). Source
  counts and positions are unchanged; `Missing` still propagates normally.
  Aggregate compilation refuses omission-capable source types, including
  `collection<any>`, until targets can distinguish omission from missing data.

- `Filter` drops immediate `Nothing` inputs without calling its predicate.
  Filtering a raw view yielding `1, Nothing, 3` with an always-true predicate
  now yields `1, 3`, rather than an incompatible-type error cell or a retained
  omission. `Count(source, predicate)` follows the same selection rule.
  `Missing` and nested markers still reach the predicate. Result types exclude
  immediate `nothing`; compilation refuses sources that might contain it until
  targets can distinguish omission from missing data.

- `Map` bypasses its callback for immediate `Nothing` inputs and preserves their
  positions. A strict numeric callback over a view yielding `1, Nothing, 3` now
  yields its two results and `Nothing`, rather than an incompatible-type error
  cell. Multi-source maps bypass the whole row if any input is `Nothing`.
  `Missing` and markers nested inside a datum still reach the callback.
- `Covariance`, `PopulationCovariance`, and `Correlation` skip whole aligned
  observations containing `Nothing`, instead of rejecting them. Raw source
  lengths must still match; all terms use the same retained observations.
  Compilation refuses these statistics and maps whose inputs or map results may
  contain `Nothing` until targets can preserve its distinct representation.
- `Dedup`, `Filter` and `TakeWhile` of a string held by a symbol of a wider type
  give a string, as they do for a string literal: with
  `c: list<integer> | string := "aab"`, `Dedup(c)` was `["a", "b"]` and is now
  `"ab"`; `Dedup(Filter(c, p))` is a string too.
- `Filter` and `Dedup` over a dictionary give a `Dictionary` (also when the
  dictionary is an arm of a union type, through nested `Filter`/`Dedup` views,
  and for a bare `record`); they gave a `Set` of entry tuples (`Set(("a", 1))`).
  `Filter` over a record is typed `dictionary<any>`.
- `Map` of a user function with scalar parameters over a list of lists is typed
  with lists as elements (`Map(f, pr)` with `f: (number) -> number` is
  `list<list<number>>`, was `list<number>`), as the call broadcasts over each
  row; a polymorphic callback with one parameter (`(T) -> T where T`) is typed
  the same way (`list<list<integer>>`). `Map` of a function literal written in
  place whose parameter is annotated as a scalar (`(x: integer) ↦ x + 1`) over a
  list of lists is refused when it is boxed; it was admitted and gave an error
  for each row. Over a source that can hold `Missing`, such a literal is typed
  with the `NaN` it gives for an absent cell:
  `Map((x: integer) ↦ x + 1, [1, Missing])` is `list<number>` (was
  `list<integer>`, value `[2, NaN]`). A `Missing` that the body returns for a
  present cell stays in the type, also for several sources of an abstract
  collection type.
- A view whose source can be absent (`Map(x ↦ x + 10, c)` with
  `c: missing | list<integer>`) previews as a list; it previewed as a `Set`. The
  preview, and a bounded materialization, of `Dedup`, `Filter`, `Join` or
  `Append` over more than five dictionary entries show the expression as written
  (`Dedup(d)`); they showed an `incompatible-type` error.
- Two mutually recursive aliases that describe the same values are subtypes of
  each other: with `a = list<b>` and `b = list<a>`, `a <: b` is now `true` (it
  was `false`, a conservative cutoff). A self-referential alias such as
  `R = list<R>` is a subtype of `list`, `list<unknown>`, `list<list<unknown>>`
  and `value`; `J = list<J> | missing` is still not a subtype of `unknown`.
- `Dedup`, `Filter` and `Map` accept a source typed `missing | string` (typed
  `missing | string` or `list<character> | missing`); it was an
  `incompatible-type` error. `Map` of a broadcastable operator over ragged rows
  (`Map(Sqrt, [[1, 4], [9]])`) gives `list<vector<1> | vector<2>>`; it was an
  `incompatible-type` error.

- A comparison with an undefined operand is false in a branch condition too, as
  in Desmos and IEEE 754. An ordered comparison (`<`, `≤`, `>`, `≥`) or an
  equality (`=`) whose operand is `NaN` or `Indeterminate` already evaluated to
  `False` on its own; an `If` or a `Which` on it now takes the next arm (the
  else arm) instead of no arm. This holds in the interpreter and on the
  `javascript`, `python` and `interval-js` targets. Before and after:
  - `\left\{\frac{0}{0}>0:1,0\right\}` (also with `<`, `≤`, `≥`, `=`), and
    `If(0/0 > 0, 1, 0)`: `Missing` before, `0` now.
  - `\left\{x > 0: 1, 0\right\}` compiled to JavaScript and run at `{x: NaN}`:
    `NaN` before, `0` now. The same on the Python target. The compiled guard no
    longer tests the operand for NaN (`_.x === _.x`); it still tests for a
    variable the caller did not supply (`_.x !== undefined`), which still gives
    `NaN`, also through arithmetic (`2x > 0`). The guard tests a variable of any
    type (`p.x > 0` tests `p`), and a variable read through an assigned value
    (`a := \sin x`, then `\cos a > 0`) or through the body of a called user
    function. It does not test a variable read only by an arm of a nested `If`,
    `Which` or `When`: `If(If(x > 0, y, 1) > 0, 1, 0)` at `x = -1` is `1` with
    `y` not supplied.
  - `0 < \sqrt{x}` compiled to `interval-js` at `x = [-1, -1]`, where the root
    has no value (`empty`): `'maybe'` before, `'false'` now. The same for `≤`,
    `>`, `≥` and `=`.
  - On `interval-js`, a comparison with an operand that has a value over only
    part of the cell (`partial`) is now at most `'maybe'`: `\sqrt{x} \ge 0` at
    `x = [-1, 1]` was `'true'`. `0 < \sqrt{x}` there stays `'maybe'`.
  - A sum of such a piecewise, `\sum_{n=0}^{10000} M(n)` with
    `M(n) := \{K(n) > 0: 1, 0\}` and `K(0)` undefined, is now `10000` instead of
    `NaN`.

  Not changed: `≠` keeps its behavior (`\mathrm{NaN} \ne 0` is `True`, and a
  branch on a `≠` with a `NaN` operand still takes no arm: `Missing` in the
  interpreter, `NaN` on `javascript` and `python`, `'maybe'` on `interval-js`).
  `Missing` keeps its Kleene reading (`Less(Missing, 1)` is `Missing`): a
  comparison with a nested else-less `If` or default-less `Which` that selects
  no arm still takes no arm (`If(If(c > 0, 1) > 0, 1, 0)` at `c = -1` is `NaN`
  compiled), and on `interval-js` that value is an `empty` with a `missing`
  flag, so `Which(x > 5, 1) > 0` over `x = [0, 1]` stays `'maybe'`. A comparison
  of two collections with an absent cell still takes no arm. The GPU targets
  (`glsl`, `wgsl`) already took the else arm. This reverses the rule of
  2026-09-03, under which a `NaN` operand of any comparison made the branch take
  no arm (`docs/ERROR-MODEL.md`).

- A value that has no order also makes a comparison false: the pole
  `ComplexInfinity` (`~oo`, the value of `1/0`) and a number that is not real
  (`i`, `\sqrt{-1}`, `\ln(-1)`, any value with a nonzero imaginary part). An
  ordered comparison (`<`, `≤`, `>`, `≥`) with such an operand is now `False`,
  alone and in the condition of an `If` or a `Which`, which then takes its next
  arm. `+∞` and `−∞` are real and keep their order. An equality with the pole is
  `False` (the pole has no value, as `NaN` has none), but an equality with a
  complex number keeps its meaning. An exact constant such as `\ln(-1)` is
  approximated to find its imaginary part (not when it holds an infinite `Sum`
  or `Product` or a `Limit`), and the imaginary part of a number literal is read
  exactly (`1 + 10^{-800}i` is not real). A comparison stays unevaluated only
  when its operands are free symbols or forms that depend on one (`0 < x`,
  `0 < ix`): a value with no order decides `False` also next to a free symbol
  (`x < i`, `x < \frac{1}{0}`), as `NaN` does. A chain stops at its first pair
  that is `False`. Before and after:
  - `0 < \frac{1}{0}`, `0 < i`, `0 < \ln(-1)`, `\pi + i < 4 + i`, `x < i`:
    unevaluated before, `False` now.
  - `\frac{1}{0} = \frac{1}{0}` and `\ln(-1) \le \ln(-1)`: `True` before,
    `False` now.
  - `0 < i < \mathrm{Missing}`: `Missing` before, `False` now.
  - `\int_0^1 x^{i\pi} dx`: `\frac{1}{1+i\pi}` with the condition `0 < 1 + i\pi`
    before, `\frac{1}{1+i\pi}` now (the convergence condition is on the real
    part of the exponent), and the same for the other convergent integrals of a
    power or an exponential with a complex exponent.
  - `\log_{1+i}(x) = 2`: the root `2i` with the condition `0 < 1 + i` before,
    `2i` now (a base that is not real has the conditions `b \ne 0` and
    `b \ne 1`).
  - `\left\{\frac{1}{0} > 0: 1, 0\right\}` and
    `\left\{\sqrt{-1} > 0: 1, 0\right\}`: a held `Which` before, `0` now.
  - `\sum_{n=0}^{10} M(n)` with `M(n) := \left\{\frac{1}{n} > 0: 1, 0\right\}`:
    a held expression before, `10` now.

  Not changed: `\frac{1}{0} = 0` is `False`, `i = i` is `True`, `i = 0` is
  `False`, `\frac{1}{0} \ne 0` is `True` (`≠` is not part of the decision),
  `0 < \infty` and `\infty = \infty` are `True`, and `Missing` keeps its Kleene
  reading. The methods `isLess()`, `isGreater()` and the others still answer
  `undefined` for a complex operand.

  Compiled code: the arithmetic does not change, so a pole computed at run time
  is the IEEE `Infinity`, which has an order.
  `\left\{\frac{1}{x} > 0: 1, 0\right\}` at `x = 0` gives `1` on `javascript`
  and on `python` (with a NumPy `x`; a plain Python float raises
  `ZeroDivisionError`), where the interpreter gives `0`;
  `\frac{1}{x} = \frac{1}{x}` at `x = 0` is `true` there. On `interval-js`,
  `\frac{1}{x}` over the point `[0, 0]` is `empty`, so that branch already gives
  `0`. A non-real value at run time already gave `false`
  (`\left\{\sqrt{x} > 0: 1, 0\right\}` at `x = -1` is `0`). A closed comparison
  with such an operand now folds to the value of the interpreter on
  `javascript`, `glsl`, `wgsl` and `python`, with or without `constantFold`:
  `\left\{\frac{1}{0} > 0: 1, 0\right\}` compiles to `0` (it was `1`), and
  `0 < \frac{1}{0}` and `\frac{1}{0} = \frac{1}{0}` to `false` (they were
  `true`). `i < 2` compiles to `false` (it was a compile-time decline; `i < x`
  still is one). `interval-js` does not fold a comparison: `0 < \frac{1}{0}` and
  `\frac{1}{0} = \frac{1}{0}` there are still `'true'`. The constant pole next
  to a variable is the IEEE `Infinity`: `x < \frac{1}{0}` at `x = 1` is `true`
  on `javascript`, `python` and `interval-js`, where the interpreter gives
  `False`.

- The subtype relation of lists now reads a value in every way it can be read,
  so the relation is transitive and a union or a meet of list types no longer
  drops values. Three rules changed. The rows of a list with dimensions are read
  whether or not its scalar element matches the target's element:
  `matrix<string>` is a `vector<collection>` as `matrix<integer>` always was (a
  string is a collection, so only its rank was read before), and
  `matrix<integer>` is a `vector<integer | list>`; the elements of a
  `vector<unknown>` or `vector<any>` stay scalars, and `matrix<unknown>` is not
  a `vector<unknown>`. A list declared in the nested spelling answers as its
  flat spelling toward every target: `list<vector<integer^1>^2>` is a
  `list<number>`, a `collection<number>` and an `indexed_collection<real>`, as
  `list<integer^(2x1)>` is (it was a `matrix` only). `collection<E>` and
  `indexed_collection<E>` peel any number of outer axes, as `list<E>` does:
  `list<boolean^(2x2x2)>` is a `collection<vector<boolean^2>>`. The meet
  follows: `list<string> & vector<collection>` keeps the string matrices (it was
  `vector<string>`). An outer list with no dimensions admits any shape of its
  rows, so its flat spelling has no dimensions: `list<vector<integer^3>>` is a
  `list<integer>` and a `collection<integer>` but not a `matrix<integer>` (its
  missing length was read as one axis of any length, which made it a matrix
  although it holds a 2×2 arrangement of 3-vectors), and at a `matrix<T^(MxN)>`
  parameter it pins no length (it pinned `N`). A random check of 72,000 pairs of
  list and collection types against concrete values finds no loss (it found 18).

### Resolved Issues

- `Factor` merges equal factors into a power and finds every copy of a repeated
  root:

- `Factor((x^2-1)(x+1))` is `(x-1)(x+1)^2`; it was `(x-1)(x+1)(x+1)`.
- `Factor(x^3+3x^2+3x+1)` is `(x+1)^3`; it was `(x+1)(x+1)(x+1)`.
- `Factor(x^5-x^4-2x^3+2x^2+x-1)` is `(x-1)^3(x+1)^2`; it was
  `(x^3-x^2-x+1)(x-1)(x+1)`.
- `Factor(x^4-2x^2+1)` is `(x-1)^2(x+1)^2`; it was `(x^2-1)^2`.
- A rational root is used in lowest terms, so `Factor(4x^4+12x^3+x^2-12x+4)` is
  `(2x-1)^2(x+2)^2`; it was `(x+2)(x-\frac{1}{2})(2x-1)(2x+4)`.

With `A` and `B` matrices, `Factor(A·B·A)` keeps the product as written: matrix
factors are not merged. `PartialFraction` now decomposes these denominators when
they are given expanded, also with a negative leading coefficient
(`1/(-x^3+3x-2)`). Before, it returned them unchanged.

- A `Multiply` declared not commutative
  (`ce.declare('Multiply', { commutative: false }, { extend: true })`) removes
  its factors 1: `a·1·b` is `a·b`, and `Factor(a·b·a)` is `a·b·a`. They were
  kept, and `Factor(a·b·a)` gave `a·1·b·1·a·1`. No other operand moves, and no
  other simplification is applied to such a product.
- Result types of broadcast arithmetic over nested lists hold their values. Rows
  of different lengths are no longer typed `matrix`: `Sin(L)` with
  `L: list<list<integer>> := [[1, 2], [3]]`, and `Sin([[1, 2], [3]])`, are
  `list<list<number>>` (they were `matrix` and `list<number>`). A nested list of
  points plus a number (`L + 0.5` with `L: list<list<tuple<integer, integer>>>`)
  is refused as an `error`, as a flat list of points is. Rows of points beside
  numbers keep point cells for `Divide`, `Power`, `Mod`, `Root`, `Log`, `Round`,
  `Remainder` and `Arctan2`, with the rank of the deepest operand
  (`Power(NQ, V)` is `list<list<tuple<number, number>>>`, was `list<number>`),
  also when the numbers can be absent; a divisor cell that may be zero gives
  `number` coordinates. On the derive route, `Subtract` of a nested list is no
  longer one level too deep, and `Divide` of a nested list of points keeps its
  points.
- Subtype relation: `matrix<T>` is a subtype of `broadcastable<T>`, and
  `couldMatch` no longer answers `false` for pairs that share a subtype (tuples
  with an `any` slot against `indexed_collection`, `tuple` against `tuple<any>`,
  `record{a: any}` against `dictionary<integer>`, a flat list against a nested
  list such as `list<integer>` against `list<list<integer>>`, which a matrix
  matches both, and others). An operand typed with an alias is unfolded before
  the type variables are solved: `Sort(a)` with `a: L`, `L` an alias of
  `list<integer | missing>`, is `list<integer | missing>`; it was
  `list<unknown>`. A self-referential alias (`cyc = cyc | list<integer>`) no
  longer overflows the stack.
- `Total` no longer builds the union `any | unknown`.
  `Zip([1, Undefined], [2, Undefined])` is typed with `missing` elements, as
  with `Missing`.
- Collection operator types: `FlatMap` over a source with absent cells keeps the
  absent cell (`FlatMap(l, x ↦ [x, x])` with `l: list<integer | missing>` is
  `list<integer | missing>`, was `list<number>`; with an annotated parameter,
  the `NaN` of an absent cell is in the type; a callback that can answer a list
  or `Missing` is spliced arm by arm, so
  `FlatMap([[1, 2], Missing], x ↦ Reverse(x))` is `list<integer | missing>`).
  `couldMatch` of a record against a collection of entries compares each
  required field with its own key (`record{a: integer}` cannot match
  `collection<tuple<"b", integer>>`). `Map` over an alias is a `list` (was
  `collection<number>`). `Map` of an operator whose declared result is `any`
  (`Map(PointX, ["a", "b"])`) is `list<any^2>`, not a copy of the source type.
  `Map` of a function literal over `any` elements whose body can return a
  collection (`x ↦ Sqrt(x)`) allows a collection element. `Map` over mixed
  non-numeric elements no longer states a length. A `Map` over a union with a
  dictionary or record arm types that arm as a collection of entries.

- The derivative of a `Sum` no longer reads a global symbol as the index of the
  sum when a function called in the sum reads a symbol with the name of the
  index. With `k := 2` and `g := a ↦ a·k·x`, `Σ_{k=1}^{5} g(k)` is `30x`, but
  its derivative in `x` was `55` (the sum of `k²`, the global `k` read as the
  index): it is now `30`, as it is for the same sum with the index `j`. When `k`
  has no value, the derivative was `55` too: it is now `15k`. When this occurs,
  the derivative renames the index to a fresh name, such as `k_1`: the
  derivative of `Σ_{k=1}^{n} g(k)` is `Σ_{k_1=1}^{n} k·k_1`.

- `\int \sin x + 1` parsed to `Integrate(0) + sin(x) + 1`: the integrand was
  lost. It now parses to `Integrate(sin(x) + 1)`. A differential inside one term
  of a sum or a difference now ends the integrand at that term, and the terms
  after it keep their sign: `\int \frac{x\,dx}{2} - 1` parses to
  `Integrate(x/2, x) - 1` (it was `Integrate(x/2, x) + 1`), and
  `\int 1 - \frac{dx}{x}` to `Integrate(1 - 1/x, x)` (the `dx` stayed in the
  integrand). A parenthesized term in such a sum (`\int (\sin x\,dx) + 1`) no
  longer becomes a tuple, and with `diagnostics: true` the variable of the
  integration is no longer reported as undeclared in the integrand of such a
  sum.

- **A subscripted name in a binder position is a new name, also when its base is
  a list.** With `n` declared as `list<number>`, a subscript on `n` is an index:
  `n_{0}` is `At(n, 0)`. The parser read a binder spelled that way the same way,
  so `\sum_{n_{0}=1}^{3}n_{0}` was
  `["Sum", ["At", "n", 0], ["Tuple", "Nothing", 1, 3]]` (a sum with no index)
  and it evaluated to `3·At(n, 0)`. It is now
  `["Sum", "n_0", ["Tuple", "n_0", 1, 3]]` and evaluates to `6`, as when `n` is
  not declared. The same applies to a product index, a comprehension variable
  (`[n_{0}^2 \operatorname{for} n_{0} = [1,2,3]]`), a local of a `where` clause
  or of a `;` block (`n_{0} \coloneq 3; n_{0}+1` is `4`, not an assignment to a
  function named `At`), a function parameter (`n_{0} \mapsto n_{0}^2`,
  `f(n_{0}) \coloneq n_{0}^2`, which were a parse error and an invalid
  function), a `for … from … to … do` index, a limit variable, a quantified
  variable, the variable of a set-builder (`\{n_{0} \mid n_{0}>0\}`), an
  integration variable (`dn_{0}`) and a differentiation variable
  (`\frac{d}{dn_{0}}`, `\partial n_{0}` in a denominator). The occurrences of
  the binder in its scope are the new name too. Elsewhere, a subscript on a list
  is still an index: in `\sum_{k=1}^{3}n_{k}`, the body is `At(n, k)`, and in
  `\frac{\partial n_{0}}{\partial x}`, the differentiand is `At(n, 0)`. A
  top-level assignment `n_{0} \coloneq 3` is not a binder: it is still the error
  `expected-a-symbol`, as before.

- **The variable of `Integrate` and `Limit` no longer reads a symbol of the same
  name inside a called user function.** With `k := 2` and `g := a ↦ a·k·x`,
  `\int_0^1 g(k)\,dk` was `x/3` and is now `x`, the value of
  `\int_0^1 g(t)\,dt`; `\lim_{k\to 1} g(k)` was `x` and is now `2x`;
  `\int g(k)\,dk` was `-x k^3/6 + k x k^2/2` and is now `x k^2`. When `k` has no
  value, `\lim_{k\to 1} g(k)` is now `k x` (it was `x`) and `\int_0^1 g(k)\,dk`
  is `k x/2` (it was `x/3`). These operators inline the body of `g` and select
  the variable by its name, so the `k` of the body became the variable. The
  variable is now renamed to a fresh name first. The fresh name is not a name of
  the expression and not the name of a declared symbol, with or without a value.
  The bounds of the integral and the point of the limit keep their symbols:
  `\sum_{k=1}^{2} \int_0^k g(k)\,dk` is `5x` (the bound is the index of the
  sum), and `\int_0^{k_1} g(k)\,dk` is `x k_1^2`. An indefinite integral whose
  result also holds the global `k` keeps the fresh name, and the printed result
  shows it: `\int g(k)\,dk` is `\frac{1}{2}k x k_1^2` when `k` has no value
  (`k_2` when `k_1` is declared). That result is correct: the `k` of `g` and the
  variable of the antiderivative are different symbols. `Sum` and `Product`
  already gave these answers. `Solve(g(k) = 1, k)` and
  `Solve(\{g(k) = 1, k \in 1..3\})` had the same capture and answered `[]` (no
  solution); they now stay unsolved.
- **`Integrate` and `Solve` inline a function that is declared with a function
  type and then assigned** (`g: (real) -> real`, then `g := a ↦ a·x`), as they
  do for a function that is only assigned. `\int_0^1 g(t)\,dt` stayed
  unevaluated and is now `x/2`. With `g := a ↦ 2a + x`, `Solve(g(t) = 1, t)`
  stayed unevaluated and is now `[(1 − x)/2]`.
- **A recursive user function is no longer inlined by `Integrate`, `Limit` and
  `Solve`.** With `r(x) := r(x − 1) + 1`, `\int_0^1 x^2 + r(3)\,dx` ran for
  about 11 seconds and ended with a stack overflow (`RangeError`). The call now
  stays as it is, and its evaluation stops at the recursion limit with a
  `CancellationError` at once, as it already did for a function declared with a
  function type.
- An element read over a collection whose element type is `any`, or over a
  symbol declared `any` or `value`, is typed `any`. It was `unknown`, and
  arithmetic reads an `unknown` operand as a number: with `P: any` (or
  `P: list<any>`), `P[i]` was `unknown` and `P[i] - P[j]` was
  `broadcastable<number>`, although `P` can hold points and `(3, 4) - (1, 1)` is
  `(2, 3)`. Now `P[i]` and `P[i] - P[j]` are `any`. This applies to `At` (a
  single index, a gather, several indices, a dictionary key, a dynamic index
  into a tuple or a record with an `any` field), `First`, `Second`, `Third`,
  `Last` and `Field` (`D.a` with `D: dictionary<any>` is `any`, was `unknown`).
  A function of such a read is `any` too: `Sqrt(P[i])`, `Sin(P[i])` and
  `h(P[i])` with `h: (number) -> number` were `broadcastable<number>`. A symbol
  whose type is inferred from its uses is not changed: with `P` undeclared,
  `P[i]` is still `unknown` and `P[i] - P[j]` still makes `P` an
  `indexed_collection<number>` (and a read of `Rest(P)`, `Take(P, 2)`,
  `Sort(P)`, … is `unknown` as well). A bare `list` (a synonym of
  `list<unknown>`) still gives `unknown`. A tuple of such reads still compiles:
  `(P[1], P[2])` with `P: list<any>` or `P: collection<any> | tuple` compiles to
  JavaScript, since a list element is never `Nothing`.
- `Sum` and `Product` of terms typed `any` or `value` are typed `any`. They were
  `number`: with `P: any := [(3, 4), (1, 1), (0, 0)]`, `Sum(P[k], k, 1, 3)` and
  `Sum(P)` evaluate to the point `(4, 5)`.
- A read of `Take(P, 2)`, `Rest(P)`, `Drop(P, 2)`, `Most(P)` or `Reverse(P)`
  with `P` undeclared is `unknown`. It was `character | missing`, the element of
  the `string` option of the type `list<unknown> | string`, so `Rest(P)[i] + 1`
  was an `incompatible-type` error.

### New Features

- **`broadcast()` and `broadcastAsync()` of a `javascript` result take shared
  inputs and write several values per cell** (Tycho row 416). Two additions, for
  a kernel that reads the field values around a cell and writes several numbers
  per cell (the corners and edges of a 3-D implicit surface):
  - A shared input is bound once for the whole batch and read by index in the
    expression: with `F: list<number>` and `i: integer`, `F_{i+1}` over
    `{ i: Float64Array [0, 1, 2], F: [1, 2, 3, 4] }` gives `[1, 2, 3]`. A
    variable whose declared type is a list is shared; the new `shared` option
    names any other one (`{ shared: ['G'] }`). A shared input is a plain array
    of numbers or a `Float64Array`, is not a column of the `cells` layout and
    not an axis of the `grid` layout, and goes to each worker of the pool once
    per `broadcastAsync()` call instead of once per slice. A variable read as a
    list was refused before ("cannot be broadcast"); a plain array for any other
    variable throws.
  - An expression whose type is a tuple of two or more elements that can be
    numbers (an element typed `unknown`, such as an undeclared symbol, counts)
    writes that many values per cell into one output array: `(i, 2i)` over
    `{ i: Float64Array [1, 2, 3] }` gives `[1, 2, 2, 4, 3, 6]`. The result
    reports the count as `broadcastOutputs`, which a stored result keeps for
    `createJavaScriptRuntime().loadBroadcast()` and the pool's workers; the new
    `outputs` option overrides it. An element missing from an array answer is
    `NaN`, and a non-array answer or a thrown cell is `NaN` in every slot.
    `done` of `broadcastAsync()` is still a count of cells.

  An `interval-js` result throws a `TypeError` for either option.

- **The grid of the `global` option of `FindFit` now has a point in every basin
  of a frequency** (Tycho row 407). The search sampled a searched parameter at a
  fixed number of points (400 for one parameter, 40 × 40 for two), so a wide
  range for a frequency found the best fit only when a point fell near it by
  chance. With `a cos(b x + c) + d x + e` on 200 points over `x ∈ [0, 10]` (true
  `b = 2.2`), `b` over `[0.3, 120]` and `c` over `[0, 2π]` gave a sum of squared
  residuals of 390 at `b = 0.3`; it now finds `b = 2.2` (about `1e-27`). Three
  changes:
  - A parameter that multiplies a variable inside `Sin`, `Cos`, `Tan`, `Cot`,
    `Sec` or `Csc` (`b` in `cos(b x + c)`) gets grid points
    `π / (rate · span of x)` apart (half that for `Tan` and `Cot`), up to 4,000
    points, in every angular unit (`ce.angularUnit`). A parameter whose phase
    rate is not a constant (`cos(b² x)`) and a non-periodic model keep the
    previous grid.
  - A phase that is only added to the argument of a `Sin` or `Cos` multiplied by
    a linear amplitude (`c` in `a cos(b x + c)`), searched over at least one
    period, is solved by least squares with the linear parameters, since
    `a cos(b x + c) = p cos(b x) + q sin(b x)`. It is then no longer sampled,
    and the search over `b` and `c` costs as much as a search over `b` alone.
    The fitted phase is in its range. Otherwise two searched parameters share a
    budget of 8,000 grid points.
  - A range can give the grid step as a third element:
    `{global: {b: [0.3, 120, 0.05]}}`. It sets the grid of the scan that solves
    the linear parameters; when the model is not linear in the other parameters,
    the solver still runs from each point of the coarse grid (24 points, or 6 ×
    6). A step on a phase keeps that phase on the grid instead of solving it by
    least squares. A step that is not a finite positive number is an
    `unexpected-argument` error, as is a pair of steps that asks for more than
    8,000 points of the grid of that scan.

  With more than 300 data rows, the grid is scanned on a stratified sample of
  300 rows (the same rows for the same data, not a regular sub-grid, so that an
  alias of the true frequency does not fit the sample), the 24 best grid points
  are solved again on every row, and the 6 best of those are refined on every
  row. When the deadline of the evaluation expires during the scan of the
  sample, the record (`timedOut: True`) has the best scanned parameters and
  `residualNorm: NaN`, since their residual over every row was not computed. On
  1,000 rows with `b` over `[0.3, 628]` the search took about 410 ms and missed
  the fit (residual sum 1,947); it now takes about 260 to 330 ms and finds it.
  On 200 rows the deciding cases take about 45 to 70 ms (they took about 90 to
  100 ms).

- **`FindFit` with the `global` option runs its grid scan on the engine's worker
  pool on the asynchronous route.** When the engine has a kernel pool
  (`ce.workers`, see `createKernelPool()`), `expr.evaluateAsync()` sends the
  grid points of the scan to the workers in one slice per worker; the
  refinements by the solver stay on the calling thread. Each worker solves its
  points with the code the calling thread uses, on the same numbers, so the
  record is the record of `evaluate()`. The pool is used only when the model and
  the derivatives the scan reads compile to JavaScript that a worker can run (a
  model with a function that does not compile, such as `LogGamma`, runs on the
  calling thread), and only for a model that is linear in the parameters that
  are not searched (otherwise each grid point is a solver run, on the calling
  thread). A worker that fails or refuses the problem is replaced by the calling
  thread for its points, with the same result. The engine's `iterationLimit`
  applies on the workers too. An abort of the `signal` of `evaluateAsync()`
  rejects the evaluation with a `CancellationError`, whatever the reason given
  to `abort()`; the fit on the calling thread stops within a data row, and a
  slice that a worker runs finishes there and its result is dropped. On the
  asynchronous route, with or without a pool, the data operand is evaluated with
  `evaluateAsync()`, so data from an operator that has only an asynchronous
  handler is read. `evaluate()` does not use the pool. Measured with
  `a cos(b x + c) + d x + e` (`benchmarks/workers/fit-parallel.mts`, load
  average 6 on 18 cores): 1,000 rows with `b` over `[0.3, 628]` take 62 ms with
  8 workers and 76 ms with 4, against 230 ms for `evaluate()`; the 200-row cases
  take 13 to 23 ms with 8 workers, against 34 to 42 ms.

## 0.159.0 _2026-10-20_

### Behavior Changes

- Absence checks treat both numeric markers alike: `IsMissing(Indeterminate)` is
  now `True`, and `Indeterminate ?? 5` returns `5`, as for `NaN`. Exact
  arithmetic and reducers still produce `Indeterminate` where they did before.
  `Nothing` passes through fallbacks and is not missing data.
- `Coalesce(x, RuntimeError("absent"))` retains the successful type of `x`
  instead of becoming `never`. Coalescing removes only whole-value absence: a
  list's missing cells and a possible `Nothing` result remain in its type.
  Compilation refuses absence tests that might confuse `Nothing` with missing
  data until the target can represent that distinction.

- LaTeX: an authored `\mathrm{Nothing}` (or `\operatorname{Nothing}`, also in
  braces or in `\smash{…}`) is an operand. Before, the parser skipped it, as it
  skips a presentational command, which lost the argument and broke the comma
  list around it: `\mathrm{If}(x > 1, \mathrm{Nothing}, x)` was
  `If(Error(incompatible-type), x)` and is now `If(x > 1, Nothing, x)`, as on
  the `ce.box` route. `f(a, \mathrm{Nothing}, b)` gives the same arguments as
  `f(a,,b)`.
- LaTeX: a style switch (`\displaystyle`, `\large`, …), `\color{…}`, a strut or
  an invisible box (`\phantom{…}`, `\vphantom{…}`, `\hphantom{…}`) between an
  operand and an infix operator no longer changes the expression:
  `x \displaystyle + 1` was the product `x·1` and is now `x + 1`;
  `x\vphantom{y} + 1` was `x·1` and is now `x + 1`;
  `a \cdot b \displaystyle + c` is `ab + c`. The style of such a switch is not
  kept. The body of a switch now ends where the expression that holds it ends:
  `x \displaystyle y + 1` was `x·(y + 1)` and is now `x·y + 1`, and
  `2 \displaystyle \frac{1}{2} + 1` was `3` and is now `2`. A switch at the
  start of a group still applies to the whole group (`{\displaystyle x+y}`).
- LaTeX: `\smash{x}` gives `x`; before, its content was discarded (`\smash{x}+1`
  was `1`). The option of `\smash[b]{…}` and of `\placeholder[…]{…}` is read as
  text, not as math.
- LaTeX: an element of a comma list or a matrix cell that holds only a
  presentational command (`f(a, \phantom{x}, b)`,
  `\begin{pmatrix} a & \phantom{0} \\ c & d\end{pmatrix}`) is an empty element.
  Before, the list ended there (`f((a,), b)`), and the matrix lost its row
  break. `\phantom{y} x`, with a space, was an `unexpected-token` error and is
  now `x`.
- LaTeX: a keyword that does not apply is text, as a word that is not a keyword
  is. `x \text{where}` (no binding after `where`), `x \text{for} y` (no
  comprehension or condition after `for`) and `x \text{if}` (no `then`) were a
  `Sequence` of `x` and an `unexpected-operator` error; they are now `x`
  followed by the text, as `x \text{hello}` is. `\operatorname{where}` and
  `\mathrm{for}` that do not apply are symbols, as `\operatorname{foo}` is. Such
  a keyword in a group no longer breaks the group: `\{x \text{where}\}` is a set
  and `\frac{x \text{ where }}{2}` a fraction. A statement keyword that applies
  after an operand starts another expression for the `\text` spelling too:
  `x \text{return} y` was an error and is now `x` followed by `Return(y)`, as
  `x \operatorname{return} y` already was. The input after such a statement is
  read too: `a \text{return} b \text{return} c` was `a` followed by `Return(b)`,
  without `c`, and `x \operatorname{break} y` lost `y`. The same applies after a
  prefix operator that ends an operand: `x \neg y \neg z` lost `Not(z)`, and
  `x \lnot y )` dropped the `)` with no error; it now reports an
  `unexpected-delimiter` error, so that input is no longer valid.
- LaTeX: a keyword operator with nothing after it has a `missing` right operand,
  as the symbol operators have: `x \text{and}` is `And(x, Error("missing"))`, as
  `x \land` is. The right operand was `Nothing`, so `x \text{and}` became
  `And(x)` and the error was lost. The same applies to `or`, `iff`,
  `if and only if` and `such that`.

### Resolved Issues

- **Compiled `GammaRegularized(a, z)` is correct for a non-positive order `a`**,
  as `.N()` is ([#457](https://github.com/cortex-js/compute-engine/issues/457),
  contributed by [enumeratio](https://github.com/enumeratio)). With `a` and `z`
  declared real, `compile(GammaRegularized(a, z)).run({a: -1.5, z: 0.001})` was
  `NaN` and is now `8894.8453395772…`. At a non-positive integer `a` the
  compiled value is `0` for `z > 0` and `NaN` at `z = 0`, as the interpreter
  answers; at `z = 0` and a negative non-integer `a` it is `±Infinity` by the
  sign of `Γ(a)`. The kernel works in logarithms at a large negative order, so
  `GammaRegularized(-150.5, 120)` is `-7.65e-105`, not `0`. A value outside the
  double range is `±Infinity`, or a signed `0`, as the IEEE rules give it. The
  machine kernels were also made more accurate in related places, each checked
  against mpmath:
  - The Python target gives the same values. `GammaRegularized(a, z)` lowered to
    `scipy.special.gammaincc`, which is `nan` for every `a < 0`, and the
    two-operand `Gamma(s, z)` refused to compile for a constant `s ≤ 0`. Both
    now use a helper that keeps SciPy for a positive order and computes a
    non-positive order itself; the helper also fixes `Gamma(200, 1000)`, which
    overflowed to `inf` (its value is `6.3e162`). `compileLambda()` cannot hold
    the helper, as for `Power`. A lambda keeps the inline lowering only where it
    is correct: `GammaRegularized` with a constant order of at least `1e-20`,
    and `Gamma(s, z)` with a constant order from `2.5e-4` to `7.5`. Any other
    order fails with "use compileFunction"; before, such a lambda gave `nan` or
    a wrong value.
  - `Gamma`, `Digamma`, `Trigamma` and `ln|Γ|` near a negative integer: the
    reflection formula now takes the sine of the exact remainder, so
    `Gamma(-10.000000001)` has at least 12 correct digits instead of 7. The
    interval enclosure of `Gamma(-1.000001)` is under `1e-12` wide (relative),
    not `3.5e-9`.
  - `GammaRegularized(a, z)` for `|a| ≤ 1/2` and `Gamma(s, z)` for
    `-1 < s < 1/2` and a small `z`: `GammaRegularized(1e-9, 0.99)` had five
    correct digits, and `Gamma(-0.9999, 0.001)` was `NaN`.
  - `Binomial(n, k)` for an `n` close to a negative integer:
    `Binomial(-51.999999999999986, 87)` was `0` (its interval enclosure was
    `[0, 0]`, which did not hold the true value `-2.1e38`), and
    `Binomial(-426.1545291590769, 635.8454312348206)` was `-Infinity`, not
    `-1.18e305`.

- **`Log(1, base)` threads over a list of bases** instead of folding to the
  scalar `0`: `Log(1, [-10, e, 27])` was `0` and is now `[0, 0, 0]`, as
  `Log(8, [2, 4])` is `[3, 3/2]`. The `Log(1, b) = 0` fold now applies only to a
  base that cannot be a collection, so a symbol declared `real | list<real>` is
  not folded either. A tuple base threads, as it already did for
  `Log(8, (2, 3))`: `Log(1, (2, 3))` is `(0, 0)`. A set base is an
  `incompatible-type` error, as it already was for `Log(8, Set(2, 3))`, where it
  was the scalar `0` before
  ([#455](https://github.com/cortex-js/compute-engine/issues/455), contributed
  by [enumeratio](https://github.com/enumeratio)).

- LaTeX: a chain of `\text` keyword operators such as
  `a \cdot b \text{and} a \cdot b \text{and} …` took time that grows
  exponentially with the number of keywords (14 keywords: about 0.2 s; each two
  more: about 3.4 times longer). The parser now compares the braced text with
  the keywords instead of parsing the right operand to find out whether the
  keyword matches.
- LaTeX: a chain of `\text{ for }` or `\text{ where }` clauses that do not apply
  (`x_0 \text{ for } y_0 \; x_1 \text{ for } y_1 …`) took time that doubles with
  each clause (12 clauses: about 0.3 s). Two dictionary entries read
  `\text{for}`, and each one parsed the rest of the input. The parser now calls
  the handler of a keyword once at each position, and keeps the result when it
  declines; 64 clauses take about 0.5 s. A chain of `\text{for}` clauses with
  `\text{from} … \text{to} … \text{do} …` at its end took about 3.7 s for 16
  clauses (each four more: about 15 times longer); it takes about 0.06 s for 16
  clauses and 0.5 s for 32. A chain of `\text{for all}` clauses is faster too
  (10 clauses: 1.7 s, was 21 s), but still grows exponentially.

- The derivative of a `Sum` follows a call in a term or a bound into the body of
  the called function (Tycho ledger row 405). With `g := a ↦ a·x`,
  `D(Sum(g(k), Limits(k, 1, 5)), x)` was `0`: the rule read only the names
  written in the term, and `x` is not one of them. It is now `15`, the value
  that the derivative of each call (`D(g(2), x)` is `2`) gives. A bound that
  calls a function whose body reads the variable (`N := a ↦ ⌊a·x⌋`,
  `Limits(i, 1, N(1))`) depends on the variable, so the derivative stays
  unevaluated, as for the bound `⌊x⌋`; it was differentiated term by term. A
  function passed as an argument (`G(h, k)` with `h` a function) is followed
  too. A call of a function that is not pure (its body draws a random number) is
  not evaluated to find its body, and a call of a function whose body is not
  known that way is taken to depend on the variable: a bound with such a call
  keeps the derivative unevaluated.

- The derivative of a call of a user function no longer reads an assigned value
  of its variable. With `h := a ↦ a·x²` and `x := 5`, `D(h(k), x)` was `0`: the
  body of `h` was found by evaluating `h`, which gave `25k`. The body is now
  taken from the function literal, with the arguments in place of the
  parameters, and is not evaluated, so `D(h(k), x)` is `2kx` with and without a
  value of `x`. The derivative follows the name of its variable into the body of
  a called function in both cases; `Integrate`, `Limit`, `Solve` and `Sum` keep
  the rule of 2026-09-21, under which their variable does not reach into a
  called function. A free symbol of the body that is not the variable still
  reads its value: the derivative of `q` in its parameter, with `q(a) := a x²`
  and `x := 5`, is `25`.

- A parameter used as the name of a called function now takes a function
  argument in a derivative. With `G := (f, a) ↦ f(a)`, `D(G(h, k), x)` stayed
  unevaluated, because the body of `G` applied to wildcards was an `Error`; it
  is now the derivative of `h(k)`. `D(G(Sin, x), x)` is `cos(x)`, and a function
  literal argument is applied: `D(G(t ↦ t·x, k), x)` is `k`. The derivative of
  `Apply(t ↦ t·x, k)` is `k`; it was
  `t * Apply(Derivative("Apply", 1, 0), (t) => t * x, k)`, with the parameter
  `t` free in it. A recursive function (`f(x) := x·f(x−1)`, or two functions
  that call each other) is not expanded: its derivative stays
  `Apply(Derivative(f, 1), x)`, as before. A function composed with itself is
  expanded: with `h := a ↦ a·x²`, `D(h(h(x)), x)` is `5x⁴`. A call in an
  argument is never taken for the parameter (`G(h, f(x))` is `h(f(x))`), and a
  function with no body passed as an argument keeps its own name
  (`D(G(u, x), x)` is `u′(x)`).

- The derivative of a power, an exponential and the other operators sees a
  variable that a call reads in the body of the called function. With
  `g := t ↦ t·x`, `D(g(k)², x)` and `D(e^{g(k)}, x)` were `0`: the rules tested
  only the names written in the operand. They are now `2k²x` and `k·e^{kx}`.

- On the `interval-js` target, a negative base under a float exponent that the
  interpreter reads as a rational with an odd denominator, but that is not the
  double nearest to that rational, has its real root (Tycho ledger row 406).
  `x^{0.4545454545454545}` (16 digits, read as `5/11`) over `[−1.1, −0.9]` was
  `empty`, while `evaluate()` and the `javascript` target give `−1` at `x = −1`;
  it is now `[−1.0443, −0.9532]`. The same holds for `x^{0.6000000000000001}`, a
  negative such exponent, and a root index such as
  `\sqrt[2.2000000000000006]{x}`. The new routine
  `_IA.powRealBranch(x, e, oddNumerator)` encloses `±|x|^e` with the float `e`,
  the value the interpreter computes. An exponent that is the double of its
  rational (`0.4`, `1/2.2`) still uses `_IA.powRational`.

- A tuple with an absent slot is accepted as the source of `Map`, `Filter`,
  `Reduce`, `Fold`, `Scan`, `TakeWhile`, `DropWhile`, `FlatMap`, `Any`, `All`,
  `MaxBy`, `MinBy`, `ArgMax`, `ArgMin`, `Dedup` and `Differences`, as a list
  with an absent element already was. `Map(x ↦ x + 10, t)` with
  `t: tuple<integer, missing>` was an `incompatible-type` error; it is now typed
  `list<number>`. An alias of `list<integer | missing>` is accepted there too.
  The result of these operators and of `Take`, `Reverse`, `Sort` and `Unique`
  over a source that can be absent as a whole keeps its absent elements in its
  type: with `w: missing | list<integer | missing>`, `Dedup(w)` was typed
  `list<number> | missing` and is now `list<integer | missing> | missing`, and
  `MaxBy(w, …)` is `missing | number`. `Dedup` over a tuple or a list with a
  stated length is typed `list<…>`: `Dedup([1, 1, 2])` was typed
  `vector<integer^3>`, which does not hold its value `[1, 2]`.

### New Features

- **Batch evaluation of compiled functions.** A `javascript` or `interval-js`
  compilation result has `broadcast(inputs, options)`: the inputs of every cell
  at once, one `Float64Array` per free variable (a `lo, hi` pair per cell for
  `interval-js`) or one number for every cell, and one `Float64Array` of
  results: one value per cell, or a `lo, hi, kind` triple per cell with the
  `INTERVAL_KIND` codes (`interval`, `empty`, `entire`, `singularPole`,
  `singularJump`, `partial`, `boolTrue`, `boolFalse`, `boolMaybe`, `error`). A
  `grid` layout takes the arrays as the axes of a regular grid, and `out` is a
  caller-owned output array. Cell for cell, the value is the one `run()` gives;
  the conversions run once per batch instead of once per cell, which measured 20
  % faster than `run()` per cell on the main thread.

- **Worker threads.** `broadcastAsync(inputs, options)` runs a batch on a pool
  of worker threads when the host gives the engine one
  (`ce.workers = createKernelPool({ create, size, prewarm })`), and inline in
  slices between yields to the event loop otherwise or when the batch is too
  small to pay for the transfer. It takes a `signal`, a `deadline` in
  milliseconds and a `chunk` size, and resolves to `{ out, done }`, the output
  and the number of leading cells that are valid. The worker is the new entry
  `@cortex-js/compute-engine/kernel-worker`, one self-contained file that holds
  the compiled-code runtime and the interval runtime and no engine; it rebuilds
  each compiled function from its text and runs the same loop as the main
  thread. Measured on an 18-core machine: an implicit plot of 512×512 interval
  cells takes 175 ms inline and 34 ms on 8 workers. The engine creates no worker
  on its own. Design and measurements:
  `docs/plans/2026-10-20-worker-kernel-pool.md`.

- **The interval runtime.** `createIntervalRuntime()` from
  `@cortex-js/compute-engine/interval` rebuilds a stored `interval-js`
  compilation result with no engine behind it, as `createJavaScriptRuntime()`
  does for `javascript` code; the result now carries `runtimeVersion`,
  `preambleOnce` and `preamblePerCall`. Both runtimes gain `loadBroadcast()`.

## 0.158.0 _2026-10-20_

### Behavior Changes

- A read past the end of a declared numeric list that holds no element is `NaN`,
  taken from the declared element type. With `E: list<integer>` assigned `[]`,
  `First(E)`, `Last(E)`, `At(E, 5)` and `E[1]` were `Missing`, which their type
  `integer | nan` does not hold; they are now `NaN`, as a read past the end of a
  non-empty numeric list already was. A list of strings, an undeclared `E := []`
  and the literal `First([])` stay `Missing`.

- A lazy view keeps a `Nothing` result in its own display, and erases it when it
  becomes a list. With `m = Map(x ↦ If(x > 1, Nothing, x), [1, 2])`,
  `m.toString()` was `[1]` while `m` counted 2 elements and `m.at(2)` was
  `Nothing`; it now prints `[1, Nothing]`. The same holds for `Tabulate`,
  `Table`, `Scan` and `Iterate`. A list built from the view erases `Nothing` as
  a list literal does, and its count agrees: `ListFrom(m)`,
  `m.evaluate({ materialization: true })`, `[...m, 9]`, `ListJoin(m, [9])`,
  `Sort(m)` and `Tally(m)` hold only `1`, and `Length(Sort(m))` is `1` (it was
  `3`). A set-kind view does not count `Nothing`:
  `Map(x ↦ If(x > 1, Nothing, x), Set(1, 2, 3))` has 1 element.

- An overloaded function now accepts a symbol declared `error` that has no
  value, as a function with one signature does. With `ce.declare('e', 'error')`
  and `ov` declared `((number) -> number) & ((string) -> string)`, `ov(e)` is
  valid, typed `number | string`, and evaluates to `ov(e)`. Before, it was the
  error "expected `number | string`, got `error`", while `g(e)` with `g`
  declared `(number) -> number` was valid. The same applies to a call typed
  `error` only by its declared result type (`h(2)` with `h` declared
  `(number) -> error`), and to an overload with a generic arm
  (`((string) -> string) & ((T) -> T where T: number)`, also typed
  `number | string`). An arm whose parameter is a collection (`list`,
  `tuple<…>`) or a function still refuses such an argument. A function with
  several clauses selects no clause for it: with `f(a: number) = a + 1` and
  `f(a: string) = "s"`, `f(e)` stays `f(e)`; it was the `no-matching-clause`
  error. A clause whose parameter is typed `error` or `any` is still selected
  for it. The library operators that have a string form as well as a collection
  form (`Reverse`, `Sort`, `Take`, `Drop`, `Slice`, `Unique`, `Most`, `Rest`,
  `RotateLeft`, `RotateRight`, `Permutations`, `Combinations`, `SlidingWindow`,
  `RandomSample`, `RandomShuffle`, `DeleteAt`, `StringSplit`, `Chunk`) now
  accept such an argument through their string form: `Reverse(e)` is valid,
  typed `string`, and evaluates to `Reverse(e)`; it was refused. A parameter
  typed `unknown` now accepts such an argument on every route: a library
  operator with the signature `(unknown) -> unknown` and a function literal
  `(a: unknown) ↦ a` refused it.
- A valid call of an overloaded function where no arm is selected is typed by
  the arms that the call can take at run time. With `r` declared `real` and `G`
  declared `((T) -> T where T: integer) & ((string) -> string)`, `G(r)` is typed
  `integer`, as with the ground form
  `((integer) -> integer) & ((string) -> string)`. It was typed `string`.

- A sum or a product written with no bounds (`\sum_k f`, `\prod_k f`) runs over
  `k = 1, 2, 3, …` with every method: `evaluate()`, `N()`, `simplify()` and the
  derivative give the same result as for `\sum_{k=1}^{\infty} f`. Only `N()` did
  this before; `evaluate()` and `simplify()` kept the sum as it was. Now
  `\sum_k \frac{1}{k^2}` evaluates to `\frac{\pi^2}{6}`, `\sum_k x^k` to
  `\frac{x}{1-x}` when `|x| < 1`, `\sum_k \frac{x^k}{k!}` to `e^x - 1`,
  `\sum_k k` to `\infty` and `\prod_k (1 + \frac{1}{k^2})` to
  `\frac{\sinh(\pi)}{\pi}`. `\sum_k y` stays as it is under `evaluate()` and
  `simplify()`, as `\sum_{k=1}^{\infty} y` does: its value depends on the sign
  of `y`. The derivative of `\sum_k x^k` is `\frac{1}{(1-x)^2}` when `|x| < 1`.
  The expression keeps its form with no bounds (`\sum_{k}y` is still written
  `\sum_{k}y`). A sum or a product with one bound only (`\sum_{k=1} f`) still
  stays unevaluated with every method.
- A symbol whose name has a superscript part (`__`) is written in
  `\operatorname{}`, and reads back as the same symbol. Before, `x__a` was
  written `x^{a}`, which reads back as the power `Power(x, a)`, and
  `aleph__plus` was written `\aleph^{+}`, which reads back as
  `PseudoInverse(aleph)`. Now `x__a` is `\operatorname{x^{a}}` and `aleph__plus`
  is `\operatorname{\aleph^{+}}`. The superscripts and the subscripts are
  written in the order of the name, with a brace group where the order or valid
  LaTeX needs one: `x__a_1` is `\operatorname{x^{a}_1}`, `x_1__a` is
  `\operatorname{{x_1}^{a}}` (it was `x^{a}_1`, the same as `x__a_1`), and two
  superscripts are nested, `R_doublestruck__0__plus` is
  `\operatorname{{\mathbb{R}^0}^{+}}` (it was `\mathbb{R^{0,+}}`, which does not
  parse). A style on the base stays on the base: `x_bold__a` is
  `\operatorname{\mathbf{x}^{a}}` (it was `\mathbf{x^{a}}`, which reads back as
  `x__a_bold`). A name with a base of more than one letter is written in
  `\operatorname{}` too: `mass__earth` is `\operatorname{mass^{earth}}` (it was
  `\mathrm{mass^{earth}}`, which also read back).
- A wildcard name with a style or an accent reads back as the same name: the
  `\_` is inside the style. `_x_bold` is `\operatorname{\mathbf{\_x}}` and
  `_x_hat` is `\operatorname{\hat{\_x}}` (they were
  `\operatorname{\_\mathbf{x}}` and `\operatorname{\_\hat{x}}`, which do not
  parse), and `_x_1_bold` is `\operatorname{\mathbf{\_x_1}}` (it was
  `\operatorname{\_x_{\mathbf{1}}}`, which reads back as `_x_one_bold`).
- A name with a style on its base and a style after a subscript of digits reads
  back: `x_bold_1_bold` is `\mathbf{\mathbf{x}_1}` (it was
  `\mathbf{x}_{\mathbf{1}}`, which reads back as `x_bold_one_bold`). A name with
  two such subscripts is written in `\operatorname{}`: `x_1_bold_1_bold` is
  `\operatorname{\mathbf{\mathbf{x_1}_1}}`.
- A symbol whose name has a subscript part that is a symbol (`plus`, `minus`,
  `star`, `dag`, `circle`, …) is written in `\operatorname{}`, and reads back as
  the same symbol. Before, `x_plus` was written `x_{+}`, which reads back as
  `Subplus(x)`; `x_1_plus` was `{x_1}_{+}` (`Subplus(x_1)`), and `x_a_dag` was
  `{x_{a}}_{\dag}`, which is a parse error. Now they are `\operatorname{x_{+}}`,
  `\operatorname{{x_1}_{+}}` and `\operatorname{{x_{a}}_{\dag}}`. `x_star` is
  `\operatorname{x_{\star}}` (it was `x_{\star}`, which also read back). The
  operators do not change: `Subplus(x)` is still `x_+`. The parser reads `\circ`
  in a name as `circle`, so `x_{\circ}` is the symbol `x_circle` (it was a parse
  error).
- A unicode escape in a symbol name stays in the part where it is:
  `x_a____002012` (the parse of `x_{a\unicode{"2012}}`) is written
  `x_{a\unicode{"2012}}`. It was `\operatorname{x\unicode{"2012}_{a}}`, which
  reads back as `x____002012_a`. A subscript that starts with an escape,
  `x_____002012`, is written `x_{\unicode{"2012}}` (it was `x^{,}_{002012}`,
  which does not parse).
- A name with the `deg` accent reads back: the parser reads `\degree` in the
  body of `\mathrm{}` or `\operatorname{}` as the accent, so `\mathrm{x\degree}`
  is the symbol `x_deg` (it was a parse error). Outside of a name, `x\degree` is
  still `Degrees(x)`.
- A subscript of digits with only the `upright` style is written without the
  style: `x_1_upright` is written `x_1` (it was `x_{\mathrm{1}}`, which reads
  back as `x_one`). No spelling reads back as `x_1_upright`, and `x_1` is the
  nearest name.
- The term of `Table` is a function body: a name that a branch of the term
  assigns is `read-before-declaration` in a cell where the branch did not run
  (`Table(Block(If(k = 2, h ≔ (z ↦ 2z)), h(k)), (k, 1, 3))` is
  `[Error(…), 4, Error(…)]`; it was `[h(1), 4, h(3)]`). The term of `Sum` and
  `Product` keeps its value from one index to the next, as before.
- An assignment to a loop variable in the loop body changes it for the rest of
  that iteration only, and is no longer the `scope` effect:
  `function g() { s = 0; for k in 1..2 { k = k * 10; s = s + k }; s }` gives
  `30` (it was refused). Compiled code does not compile such a loop.
- Compiled JavaScript and interval code throws `read-before-declaration` when a
  function-body local is read before any assignment gave it a value (after a
  branch that did not run), as the interpreter reports; it gave `undefined`. A
  read that follows an assignment on every path compiles without a check, and
  other targets refuse such a body.

- In an Epsil function body, an assignment to a name that no enclosing scope
  declares makes a local of the whole body, also when the assignment is in a
  branch of an `if`, a loop body or a `do` block, as in Python:
  `function g(c) { if c { t = 1 }; t }` gives `1` for `g(true)` and the
  `read-before-declaration` error for `g(false)` (both gave the symbol `t`). A
  `let` in a nested block still declares a local of that block only, and a
  function literal owns the names of its own body. `epsil check` reports a read
  before the first assignment in a nested block, and does not report a read
  after an `if` that assigns in only one branch.
- In a program evaluated as one block, a `let` of a library constant name (`i`,
  `e`, `Pi`, `ExponentialE`, …) shadows the constant only from its statement on:
  with `function g() { i + 1 }`, then `let i = 2`, `g()` gives `1 + i` on every
  route (the block and compiled routes gave `3`). A later `let` of a name that
  is not a constant is still visible to a function defined before it.

- A negative integer power of an operand that can be a matrix stays a power:
  `g(x)^{-1}`, with `g` a function that was not declared, is `Power(g(x), -1)`.
  It was the quotient `1/g(x)`, which is the element-wise reciprocal when `g(x)`
  is a matrix. When `g(x)` has a matrix value, the power is now the matrix
  inverse: with `g` returning `[[2, 1], [1, 1]]`, `g(x)^{-1}` is
  `[[1, -1], [-1, 2]]` (it was `[[1/2, 1], [1, 1]]`). This applies to the call
  of a function that was not declared or that returns `any`, to a symbol
  declared `any`, and to a value of a type such as `number | matrix`. In a
  product with a matrix the power keeps its position: `A·g(x)^{-1}·A` stays as
  it is. The negative power of a scalar (`x^{-1}` for an undeclared symbol or a
  real symbol, `\sin(x)^{-1}`) and of a list of numbers is still a quotient
  (`1/x`), and the negative power of a matrix is still `Inverse(M)` or
  `MatrixPower(M, -n)`. `evaluate()` and `simplify()` of a product keep the
  power: `2g(x)^{-1}` stays `2g(x)^{-1}` (it was `2/g(x)`), and with the value
  above it is `[[2, -2], [-2, 4]]`. The quotient `1/g(x)` is still a quotient.
  The LaTeX of the power is `g(x)^{-1}`, which reads back as the same power:
  `y g(x)^{-1}` is written `yg(x)^{-1}`, not `\frac{y}{g(x)}`. `simplify()`
  combines the integer powers of such an operand as `evaluate()` does: in a
  product with no matrix, `f(x)^2 f(x)^{-1}` is `f(x)` and `f(x)^{-1} f(x)^{-1}`
  is `f(x)^{-2}`; in a product with a matrix, only adjacent powers with
  exponents of the same sign are combined.
- A power with the exponent 1 is its base for any base: `g(x)^1` is `g(x)`, and
  `(f(x)^{-1})^{-1}` is `f(x)` (it was `f(x)^1`, which evaluated to
  `\sqrt[1]{f(x)}`).

- A sum of quantities where at least one operand is a temperature with an offset
  (`degC` or `degF`) now converts each operand to kelvin, with its offset, and
  adds the values in kelvin. The result is in `K`. Before, the result had the
  unit with the largest scale and the sum was wrong:
  `Quantity(0, degC) + Quantity(0, degF)` gave `-17.78 degC`; it is now
  `47567/90 K` (273.15 K + 255.372… K = 528.522… K). An exact magnitude stays
  exact. The rule also applies when all the operands are in `degC`:
  `10 degC + 10 degC` was `20 degC` and is now `566.3 K` (283.15 K + 283.15 K).
  A difference of two temperatures is the difference of their values in kelvin:
  `20 degC - 10 degC` was `10 degC` (which reads as 283.15 K) and is now `10 K`;
  `20 degC - 10 degF` was `-3.33 degC` and is now `290/9 K` (32.22 K). A sum of
  temperatures with no offset (`10 K + 10 K`) does not change. A scalar multiple
  (`2 · 10 degC`) and a negation (`-(10 degC)`) are not changed: they keep the
  unit `degC`. So `20 degC - 2 · 10 degC` is `20 degC - 20 degC`, that is `0 K`.

- `\sum_k y` and `\prod_k y`, a sum or a product with no bounds whose body does
  not use the index, now keep their indexing clause in the canonical form:
  `Sum(y, Limits(k, Nothing, Nothing))`. They were `y`.
- An Epsil program that is compiled, or evaluated as one `Block`, follows the
  order of its top-level statements for the names a function body owns: in
  `function g(k) { t = k + 1; t }`, then `let t = 0`, then `[g(1), g(2), t]`,
  every route gives `[2, 3, 0]`. The compiled program gave `[2, 3, 3]`, and the
  block evaluation gave the `scope` effect error. A read of a later name, and
  the order of declarations inside a nested block, do not change.

- In a function body, a read of a name before the first assignment that makes it
  a local of the body is the `read-before-declaration` error, as for a `let`
  local read before its `let`: `function g(k) { t = t + 1; t }` gave `t + 1` for
  `g(1)`. Each call starts with no value for such a local, a loop body keeps the
  local from one turn to the next within a call, and a closure reads the local
  when it is called. `epsil check` reports the read before the program runs when
  the order is certain from the source. A block outside every function (a host
  `Block`, or a top-level `do` block or loop body) is not changed:
  `Block(x ≔ x + 1; 2x)` is still `2(x + 1)`. A call of a local that has no
  value yet is the same error: `function g() { u = h(1); h = (x) => x; u }` gave
  `1`. A `for` loop whose collection evaluates to an error stops, and the error
  is its value (the loop ran no turn and the error was lost). `epsil check` also
  reports a `let` local used before its `let` when the order is certain from the
  source, and the run does not report the same use a second time.

- A quantity with a dimensionless unit (`percent`, `ppm`, `rad`, `deg`, `grad`,
  `turn`, `arcmin`, `arcsec`) compares with a number as a value:
  `6 percent = 0.06`, `180 deg = π` and `30 deg = π/6` are `True`, and
  `6 percent < 0.07` is `True` (they stayed unevaluated). Two exact values are
  compared exactly, and a float within the tolerance. `isEqual()`, `is()`,
  `isIdenticallyEqual()`, the order methods, `Equal`, `NotEqual`, `Less` and the
  other relations, `Max`, `Min`, `Sort` and `Clamp` agree
  (`Max(6 percent, 0.05)` is `6 percent`). A quantity with a logarithmic unit
  (`dB`, `Np`) is not compared with a number.
- In LaTeX, a numeric constant expression written before a unit is a quantity:
  `\pi\,\mathrm{rad}` is `Quantity(Pi, rad)` (it was a product), and so are
  `10^{-30}\,\mathrm{rad}`, `\frac{1}{2}\,\mathrm{m}`, `\sqrt{2}\,\mathrm{m}`
  and `2\pi\,\mathrm{rad}`. A magnitude with a variable (`x\,\mathrm{m}`) is
  still a product.

- The `reciprocal` and `factor` fraction styles no longer put a symbol, a number
  or a function in parentheses. `a/b` was `a\times(b)^{-1}` and
  `\frac{1}{b}(a)`; it is now `a\times b^{-1}` and `\frac{1}{b}a`. In the
  `reciprocal` style the denominator gets parentheses where the base of a power
  does (a sum, a product, a power: `a\times(2b)^{-1}`). In the `factor` style
  the numerator gets parentheses where a factor of a product does (a sum, a
  negative value: `\frac{1}{b}(a+c)`, `\frac{1}{b}(-a)`), and a numerator that
  starts with a digit gets an explicit `\times` (`\frac{1}{3}\times2`). A
  numerator 1 is no longer written in the `factor` style (`\frac{1}{b}`, not
  `\frac{1}{b}(1)`). The default style uses the `factor` style for a long
  numerator over a short denominator, so the default output changes too:
  `\frac{1}{2}\mathrm{StieltjesGamma}(2)(x-1)^2`. Every output parses back to
  the same value.

- In Epsil, an assignment in a function body to a name that no enclosing scope
  declares when the function is defined makes a local of the function, with a
  new binding at each call. `function g(k) { t = k + 1; t }` then `[g(1), g(2)]`
  gives `[2, 3]`; the definition was refused with "writes outside a function
  require a declared `scope` effect". A declaration of the same name made later
  is not written: with `let t = 0` after the function, `[g(1), t]` is `[2, 0]`,
  also when `t` is declared by a later program on the same engine or with
  `ce.assign()`. An assignment to a name declared before the function (a
  top-level `let` or assignment, a parameter or a local of an enclosing
  function) still writes that binding and is the `scope` effect. A function
  defined before a top-level `const` does not write the constant, and
  `epsil check` does not report it; a function defined before a `const` of the
  same block is still reported.

- `Or`, `And`, `Nand`, `Nor`, `Implies`, `Any` and `All` do not depend on the
  order of their operands when an operand fails. A `True` operand of `Or` or
  `Nor`, a `False` operand of `And` or `Nand`, a `False` antecedent or a `True`
  consequent of `Implies`, and a deciding element of `Any` or `All` decide the
  answer wherever they are, also after a failed operand: `Or(1/"a" > 0, True)`
  is `True`, as `Or(True, 1/"a" > 0)` already was, `And(1, False)` is `False`,
  and `Any([1, 1/"a", 3], u ↦ u > 2)` is `True` (they were the error). When no
  operand decides, the answer is the error of the first failed operand.
  Evaluation still stops at the first deciding operand, but the operands after a
  failed operand are now evaluated, with their side effects (also Epsil `&&` and
  `||`). `Xor` and `Equivalent` need every operand and are not changed.
  `ForAll`, `Exists` and `ExistsUnique` over a finite domain follow the same
  rule: `Exists(x ∈ [1, 2], …)` whose body fails at `x = 2` and is `False` at
  `x = 1` gives the error (it was `False`), `Exists(x ∈ [1, 2], x > n)` stays
  unevaluated (it was `False`), and `ForAll` over `{1, 2, 3}` and over
  `[3, 2, 1]` give the same answer.
- `Any` and `All` over a source that is not known to be finite (`Range(1, +oo)`,
  `Repeat(5)`) read at most `iterationLimit` elements (1024 by default) and then
  stay unevaluated, as `IndexOf` does. Before, a walk with no decision did not
  end; a decision after the limit, such as `Any(Range(1, +oo), u ↦ u > 5000)`,
  was found after a long walk and now needs a larger `ce.iterationLimit`. A
  source known to be finite is still read to its end.

- Two quantities whose units have different physical dimensions are not equal:
  `6 W = 6 m` and `0 m = 0 s` are `False`, `6 W ≠ 6 m` is `True`, and
  `isEqual()` and `isIdenticallyEqual()` return `false` (they stayed unevaluated
  or gave `undefined`). A quantity with a dimension and a number are not equal
  either: `6 m = 6` is `False`, and a quantity is never equal to a string or a
  boolean (`6 m = "a"` and `6 percent = True` are `False`). Order has no meaning
  across dimensions, so `Less`, `isLess()`, `Max`, `Min`, `Sort` and `Clamp`
  stay unevaluated for such operands. A unit that is not in the unit table, and
  a dimensionless quantity compared with a number (`6 percent = 0.06`), stay
  undecided.

- In a block written in LaTeX, `k \coloneq v` still declares a local `k`. A new
  keyword, `let` (`\operatorname{let}`, `\text{let}`), writes a declaration with
  a type, `\operatorname{let} s\colon integer\coloneq 1`, and a declaration with
  no value, `\operatorname{let} s`. A bare `Assign` in a block, which changes a
  `k` outside the block, is written `\mathrm{Assign}(k, v)` and reads back
  without a `Declare`: it was written `k\coloneq v`, which read back as a local,
  so a LaTeX round trip left the outer `k` unchanged. A typed `Declare` in a
  block was dropped and is written with `let`. `let` also works in a `where`
  clause and in a row of a one-column `cases` block. A function defined as
  `f(x)\coloneq\left(j\coloneq x; j\right)` has the block as its body; the body
  was a block inside a block. `\mathrm{let}` is now a keyword, so a symbol named
  `let` is read as one, as `if` and `where` already are. After `let`, `=` is
  also the assignment, as in Epsil (`\operatorname{let} k = 2`), and a type that
  is not one (`\operatorname{let} s\colon\mathbb{Z}`) is an `invalid-type`
  error. A name is declared once per block: `x\coloneq 1; x\coloneq x+1; x` is
  `2` (it was a `variable-redeclaration` error). The rows of a one-column
  `cases` block are read as a `;` list is, so a `k\coloneq v` row declares a
  local `k` (it changed the `k` outside).

- Assigning a value to a constant has a stable error code, and `epsil check`
  reports it. `ce.assign()` and the `Assign` operator still throw
  `Cannot assign a value to the constant "c"`, and the error now has
  `code: 'constant-assignment'` and `constantName`. In Epsil, `const c = 1` then
  `c = 2` is reported before the program runs, as a static error with the code
  `constant-assignment` and a note on the `const`; before, `epsil check`
  reported nothing and the run reported a `runtime-error` whose code was the
  message text. The check covers a `const` of the program at any depth and each
  name of a destructuring `const`, wherever the assignment is, also in the body
  of a function defined before the `const`. A `let`, a parameter or a loop
  variable that shadows the constant is not reported. The run reports each
  assignment once: it does not repeat an assignment that the check reported, and
  it reports an assignment that the check could not see, such as an assignment
  to a library constant (`Pi`) or to a constant of an earlier program. The error
  value is `["Error", ["ErrorCode", "constant-assignment", "c"]]`.

- A unit has one canonical form: its unit symbols with exact exponents, those
  with a positive exponent over those with a negative exponent, in the canonical
  order. Quantity arithmetic, `Quantity`, `UnitConvert` and the LaTeX parser
  give this form, so an evaluated quantity and the parse of its LaTeX are the
  same expression: `(4 m)^(-1/2)` is `Quantity(1/2, Divide(1, Sqrt(m)))` (it was
  `Power(Power(m, 1/2), -1)`), `(m/s)^2` is `m^2/s^2`, and `m^(2/3)·m^(2/3)` is
  `m^(4/3)` (it was `m^1.3333333333333333`). The unit of `AvogadroConstant` is
  `Divide(1, mol)`, and the text form writes a reciprocal unit with a negative
  exponent (`3 m^-1`).
- Quantity arithmetic keeps the units it combines and no longer replaces them
  with a named derived unit: `(2 V)·(3 A)` is `6 A·V` (it was `6 W`),
  `(2 N)·(3 m)` is `6 N·m` (it was `6 J`), and `(1 J)/(1 kg)` stays `J/kg`.
  `UnitSimplify` still gives the named unit (`UnitSimplify(6 A·V)` is `6 W`),
  and equality is not changed: `6 A·V` equals `6 W`.
- A `List` or `Set` literal that keeps a failed cell (`[1, Error(…), 3]`) is
  typed `list<unknown>` (it was `error`, so a variable that held it was a
  scalar): with `fs := [Error(…)]`, `ListJoin(fs, [2])` is `[Error(…), 2]` (it
  was `[[Error(…)], 2]`), and a variable declared `list` accepts the value. An
  absent cell keeps its arm: `[Error(…), Missing]` is typed
  `list<unknown | missing>`.
- A `List` or `Set` that holds a failed cell can be iterated. In Epsil, with
  `g(x) = 1/x` and `xs = [1, g("a"), 3]`, a `for` loop runs one turn for each
  cell, and `Map`, `Filter`, a comprehension and an arithmetic broadcast give
  the failed cell to the body as the value of that element:
  `map((u) => u + 1, xs)` is `[2, Error(…), 4]`. Before, the loop ran no turn,
  `Map` returned the list unchanged, and the comprehension stayed unevaluated.
  `Length` and `Count` give the number of cells (`3`), and `First`, `At`,
  `Reverse` and `Take` keep the failed cell in its position. An operator that
  needs the value of every cell gives the error of the failed cell: `Sum`,
  `Product`, `Max`, `Min`, `Mean` and the other statistics, `Sort`, `ArgMax` and
  `MaxBy`. A comprehension guard that fails on an element keeps the error in
  that position, as `Filter` does; before, the element was removed. The same
  rules apply when the failed cell is a list that holds the error:
  `Mean([[1, 1/"a"], 2])` is the error, and `Map(u ↦ 1, [[1, 1/"a"], [3]])` is
  `[1, 1]`. Membership and equality give the error when the answer depends on a
  failed cell: `2 ∈ [1, 1/"a"]` and `[1, 1/"a"] = [1, 1/"a"]` are the error,
  while `1 ∈ [1, 1/"a"]` is `True` and `[1, 1/"a"] = [2, 1/"a"]` is `False`. The
  equality of two collections first checks the facts that decide the equality of
  valid collections (a set and a list, different counts, a finite and an
  infinite collection), then reads the cells only as far as needed, so
  `[1, 1/"a"] = Range(1, 10^12)` is `False`. `IndexOf`, `Count` with a value,
  `Union`, `Intersection`, `SetMinus` and `SymmetricDifference` follow the same
  rule. `Unique`, `Tally` and `Dedup` follow it when there is another element to
  compare: `Dedup([1, 1/"a", 1])` is the error, because whether a neighbor is a
  duplicate depends on the value of the failed cell, while `Unique([1/"a"])` is
  `[1/"a"]`. The list still carries its error (`isValid` is `false`), and it
  still does not compile. A `Tuple` or `Dictionary` with a failed cell is not
  changed.
- A point divided by a matrix is the matrix of the point divided by each cell,
  as a point times a matrix is: `(1, 2) / [[1, 2], [3, 4]]` is
  `[[(1, 2), (1/2, 1)], [(1/3, 2/3), (1/4, 1/2)]]` (it stayed unevaluated and
  was typed `number`).
- `isGreater`, `isGreaterEqual`, `isLess`, `isLessEqual` and the operators
  `Greater`, `GreaterEqual`, `Less`, `LessEqual` read the range of a declared
  type: with `p: integer<0..>`, `p.isGreaterEqual(0)` and `p ≥ 0` are `true`
  (they were `undefined`). A float within the tolerance of a number is not
  ordered strictly against it: `ce.number(1e-12).isGreater(0)` is `false`, as
  `isEqual(0)` is `true` (it was `true`); an exact value is still ordered
  exactly (`10^{-30} > 0`).

### Resolved Issues

- A `Table` whose term assigns a variable gives its list in a function body too:
  `Apply(Function(Block(Table(Block(Assign(a, k), a), (k, 1, 3)))))` gave an
  unevaluated `Tabulate(…)`, and gives `[1, 2, 3]`, as at the top level.
- A closure created in a branch or a loop body of a function, whose own body
  assigns a name, is no longer refused with the `scope` effect error: its body
  keeps its own locals.
- A numeric type with an excluded bound excludes it when a value is checked:
  with `g` declared `(real<0<..>) -> real`, `g(0)` is an `incompatible-type`
  error (it gave a value), on `evaluate()`, `.N()` and a symbol holding `0`; the
  compiled JavaScript call gives `NaN` and the interval call gives `empty`.
- A compiled call of a function whose parameter has a declared type agrees with
  the interpreter. With `let g: (integer) -> integer` then
  `function g(k) { k + 1 }` (or `g = (k) => k + 1`), the compiled `g(1.5)` gave
  `2.5` where the interpreter gives an `incompatible-type` error, and `g(x)`
  with `x = 1.5` did the same. An argument that cannot be of the declared type
  now fails the compilation. An argument whose type is not proven is tested when
  the code runs: the JavaScript call gives `NaN` and the interval call gives
  `empty` for a value outside the type. The GLSL, WGSL and Python targets, which
  have no such test, refuse the call when the type allows only some real numbers
  (an integer type, a bounded real type, `rational`). An argument whose type is
  declared, or a constant, compiles with no test.
- A product of a number and a number to a negative integer power, such as
  `3·10^-30`, `(3/7)·10^-30` or `3·2^-3`, is written so that it parses back to
  the same expression (`3\times(10^{-30})`, `\frac{3}{7}\times10^{-30}`,
  `3\times2^{-3}`). It was written `\frac{3}{10^{30}}`, which parses back as a
  rational.
- A product nested in a product that has a matrix keeps the order of its
  factors. With `A` a matrix and `g`, `k` functions that were not declared,
  `['Multiply', 'A', ['Multiply', g(x), k(x), g(x)]]`,
  `A\cdot(g(x)\cdot k(x)\cdot g(x))` and `A(g(x)k(x)g(x))` were
  `A·k(x)·g(x)·g(x)`, because the nested product was sorted on its own before
  the matrix was seen. They are now `A·g(x)·k(x)·g(x)`, like the product written
  without the nesting. A negation of a nested product and a nested product
  divided by an integer are spliced too: `A\cdot(-g(x)k(x))` is
  `-(A·g(x)·k(x))`. A product with no factor that can be a matrix has the same
  canonical form as before, and a juxtaposition in parentheses that is not a
  product (a mixed number such as `A(2\frac{1}{3})`, an imaginary number such as
  `A(2i)`) is read as before.
- Parsing a nested juxtaposition in parentheses takes a time proportional to its
  depth. `(g(x)(g(x)(…)A)A)A` with 8 levels took about 7 seconds, because each
  level was made canonical several times.
- The empty numerator of a product whose factors are all negative powers is
  written `1`: `x^{-1}y^{-1}` in raw form is `\frac{1}{xy}`, not `\frac{}{xy}`.
- On the `glsl` and `wgsl` targets, the product of the imaginary unit and a
  complex value is a rotation of that value: `iz` with `z` complex compiles to
  `vec2(-z.y, z.x)`, `i\tanh(z)` to `_gpu_cmul(vec2(0.0, 1.0), _gpu_ctanh(z))`
  and `t + i\tanh(z)` adds the two complex terms. They compiled to
  `vec2(0.0, z)`, `vec2(0.0, _gpu_ctanh(z))` and `vec2(t, _gpu_ctanh(z))`, and a
  shader `vec2` constructor reads only the first component of a `vec2` argument,
  so the value was `(0, Re w)` where `i·w` is `(−Im w, Re w)`. The product with
  a real value (`it` is `vec2(0.0, t)`) is unchanged.
- A negative base under a decimal exponent, or a decimal root degree, that reads
  as a rational with an odd denominator compiles to the real signed root on
  every target, as it evaluates: `x^{\frac{1}{2.2}}` (5/11) at x = −1 is −1 on
  `javascript`, `interval-js` (`_IA.powRational(x, 5, 11)`; it answered an empty
  interval), `glsl`, `wgsl` and `python`, and `\sqrt[2.2]{x}` gives the same (it
  compiled to `Math.pow`, NaN for a negative x), and `\sqrt[2.5]{x}` (x^\{2/5\},
  an even numerator) compiles to the positive real `|x|^{0.4}`. The compiled
  code uses the exponent reading of the interpreter, so an exponent such as
  `0.3` keeps its complex value. On `interval-js` the rational power is used
  only when the literal is the double of that rational (`0.6`, `1/2.2`); a
  literal that is not (`0.6000000000000001`) keeps the previous lowering. In the
  interpreter, `Root` of a negative radicand under a non-integer degree is
  `a^(1/b)` as `Power` reads it: `Root(-8, 0.5)` is `64` (it was −64),
  `Root(-8, 2.5)` is `(-8)^{2/5}` = 2.297 (it was −2.297) and `Root(-8, 2.4)` is
  the complex principal value.
- `At` with a NaN, indeterminate or infinite member in a list index gives the
  hole in that member's slot and reads the other members:
  `At([10, 20, 30], [NaN, 1])` is `[NaN, 10]` and
  `At([(1, 2), (3, 4)], [NaN, 1])` is `[Missing, (1, 2)]`, the same hole an
  out-of-range member gives. The call stayed unevaluated. The compiled
  `javascript` `_SYS.at` agrees (it gave a whole-result NaN).
- A compiled Epsil program checks a function definition against the effects that
  an earlier declaration of its name states: with
  `let g: (integer) pure -> real` then `function g(k) { Random() }`, the
  compilation is refused, as the interpreter refuses the definition
  (`incompatible-type`). The compiled program ran the definition.
- A call argument that is a symbol declared without a value in the caller's
  scope keeps that declaration when the function body is evaluated: with
  `g := a ↦ a·x` and `c := 5` in the global scope, after `pushScope()` and
  `declare("c", "real")`, `g(c)` is `c·x` (it was `5x`), and with
  `declare("i", "real")` in the pushed scope, `g(i)` is `i·x` (it was
  `ImaginaryUnit·x`). A call frame's parent is the scope that defined the
  function, so the body's read of the argument found the outer `c` or the
  library `i` by name. A free symbol of the body still reads the definition
  scope, and a loop or sum index still reads by name.
- A symbol with two or more subscripts is written with nested subscripts, so it
  reads back as the same symbol. The symbol `x_1_2` (the parse of `x_1_2`, of
  `{x_1}_2`, and the canonical form of `Subscript(Subscript(x, 1), 2)`) is now
  written `{x_1}_2`; it was `x_{1,2}`, which reads back as
  `Subscript(x, Sequence(1, 2))`. Three subscripts give `{{x_1}_2}_3`. A name
  with an upright base keeps the second subscript outside the `\mathrm{}`:
  `speed_1_2` is `{\mathrm{speed_1}}_2` (it was `\mathrm{speed_{1,2}}`, which
  did not parse). A name with digits before a subscript keeps them in the name:
  `x1_2` is `\mathrm{x1_2}` (it was `x_{1,2}`). A single subscript (`x_1`,
  `x_{12}`), a subscript with a comma list typed as `x_{1,2}`, and a matrix
  element (`M[1, 2]`) are written as before. A name whose base is an indexed
  collection does not read back in either spelling: with `A` a matrix, the
  symbol `A_1_2` is written `{A_1}_2`, which reads back as
  `Subscript(At(A, 1), 2)` (`A_{1,2}` read back as `At(A, 1, 2)`).
- A symbol with a style and a subscript reads back as the same symbol.
  `\mathbf{x}_1` (the symbol `x_bold_1`) was written `\mathbf{x_1}`, which reads
  back as the different symbol `x_1_bold`; it is now written `\mathbf{x}_1`, and
  `x_bold_1_2` is written `{\mathbf{x}_1}_2`. The parse of `\mathbf{x_1}`, the
  symbol `x_1_bold`, was written `x_{\mathbf{1}}`, which reads back as
  `x_one_bold`; it is now written `\mathbf{x_1}`, and `x_1_2_bold` is written
  `\mathbf{{x_1}_2}`. The other styles work the same way (`\mathit`, `\mathbb`,
  `\mathcal`, …). The upright style is the exception for a style after a digit
  subscript: `x_1_upright` is still written `x_{\mathrm{1}}`, which does not
  read back.
- Two braced subscripts inside `\mathrm{}`, `\mathbf{}` or `\operatorname{}` are
  two parts of the name: `\mathrm{x_{1}_{2}}` is the symbol `x_1_2`, as
  `x_{1}_{2}` is. It was `x_12`. The body of such a command can also start with
  a brace group that has its own subscripts: `\mathbf{{x_1}_2}` is the symbol
  `x_1_2_bold`.
- A sum or a product written with no bounds (`\sum_k x^k`, which is
  `Sum(x^k, Limits(k, Nothing, Nothing))`) is no longer read as a sum over the
  single point `k = Nothing`: `\sum_k x^{k-1}` evaluated to `\frac{1}{x}`,
  `\sum_k x^k` and `\prod_k x^k` to an error, and `\sum_k y` and `\prod_k y`
  became `y`. It runs over `k = 1, 2, 3, …`; see the entry about sums with no
  bounds under "Behavior Changes". `simplify()` keeps a sum or a product with
  one bound only as it is: `\sum_{k=1} k` gave `\frac{1}{2}`.
- `\sum_{k=1}^{\infty} \frac{x^k}{k!}` evaluates to `e^x - 1`. It was
  `e^x - x^0`, which has no value at `x = 0`, where the sum is 0. The same
  applies to the sum from any lower bound above 0.
- `simplify()` of a geometric series with an infinite upper bound and a free
  ratio keeps the sum as it is: `\sum_{k=1}^{\infty} x^k` simplified to
  `\frac{x - x^{\infty}}{1 - x}`, and `x^{\infty}` is not a value. `evaluate()`
  still gives `\frac{x}{1-x}` when `|x| < 1`. With a number ratio the closed
  form still applies: `\sum_{k=0}^{\infty} (\frac{1}{2})^k` simplifies to `2`.
- `simplify()` of a sum or a product over an infinite range
  (`\sum_{k=1}^{\infty} f`, or `\sum_k f` with no bounds) no longer puts the
  infinite bound into a closed form when the result depends on a symbol of
  unknown sign or has no value:
  - `\sum_k 0` simplified to `Indeterminate`; it is `0`, also under
    `evaluate()`.
  - `\sum_k y` simplified to `\infty \cdot y`, which is wrong for `y = 0`; it
    stays as it is. A body of known sign gives `\infty` or `-\infty` (`\sum_k 3`
    is `\infty`).
  - `\prod_k 1` simplified to `Indeterminate`; it is `1`. A product of a
    constant `c` is the limit of `c^n`: `0` for `|c| < 1`, `\infty` for `c > 1`.
    `evaluate()` and `N()` now give the same values (`\prod_k \frac{1}{2}` is
    `0`; it stayed unevaluated). For `c ≤ -1`, and for a free body (`\prod_k y`
    simplified to `y^{\infty}`), the product stays as it is. The comparison with
    1 uses no tolerance: an exact number is compared exactly, and a float within
    the engine tolerance of 1 (`1.000000000001`) keeps the product as it is,
    since the float does not tell on which side of 1 the value is. A body that
    is not pure (`\mathrm{Random}()`) is not compared, and an empty range (`k`
    from `\infty` to 5) is not read as an infinite one.
  - `\sum_k (1 + xk)` simplified to `\infty`, which is wrong for `x < 0`, and
    `\sum_k kx` to `\infty \cdot x`; both stay as they are. With no free symbol
    the closed form still applies: `\sum_k (1 + 2k)` is `\infty`.
  - `\sum_{k=0}^{\infty} (-1)^k` simplified to `Indeterminate`; it stays as it
    is, as under `evaluate()`.
- `simplify()` of a geometric series with an exact ratio keeps it exact:
  `\sum_{k=1}^{\infty} (\frac{1}{\sqrt{2}})^k` simplified to the float `2.414…`;
  it is now `1 + \sqrt{2}`, as under `evaluate()`. The finite form
  `\sum_{k=0}^{n} (\frac{1}{\sqrt{2}})^k` keeps the exact ratio too.
- The derivative of a sum over an infinite range is no longer the series of the
  derivatives when that series has no closed form: the derivative of
  `\sum_{k=1}^{\infty} \frac{\sin(kx)}{k}` was `\sum_{k=1}^{\infty} \cos(kx)`,
  which diverges, while the derivative is `-\frac{1}{2}` on `(0, 2\pi)`. It now
  stays unevaluated. A sum with a closed form is differentiated through it: the
  derivative of `\sum_{k=1}^{\infty} \frac{x^k}{k!}` is `e^x`, and the
  derivative of `\sum_{k=1}^{\infty} x^{k-1}` is `\frac{1}{(1-x)^2}` when
  `|x| < 1`. `explain('D')` shows the rewrite of the sum to its closed form as a
  step before the steps of its derivative. A finite range is still
  differentiated term by term.
- `compile()` of a sum or a product with no bounds reports the infinite upper
  bound, as for `\sum_{k=1}^{\infty} f`. It reported that the `Nothing` marker
  cannot be read as a variable. Both fall back to the interpreter.
- `simplify()` of a sum or a product with more than one indexing clause no
  longer reads the second index as a free symbol and drops its clause:
  `Sum(i·j, Limits(i, 1, 3), Limits(j, 1, 2))` gave `6j`. It now stays as it is
  under `simplify()`, and `evaluate()` still gives 18.
- Reading a variable whose value is an expression with no canonical form
  (`r = Map(t, (x) => x * 2)`, with the arguments in the wrong order) no longer
  loops forever: it gives the same result as the expression written in place.
- In a comprehension, an element that does not match a tuple pattern
  (`[p + q for (p, q) in [(1, 2), 5, (3, 4)]]`) is the `incompatible-type` error
  in its position, and the other elements are kept (`[3, Error(…), 7]`); the
  comprehension stopped at that element. A `for` loop still stops on it.
- A trigonometric function of an angle quantity with an exact magnitude is
  exact: `\sin(30\,\mathrm{deg})` evaluates to `1/2` (it was
  `0.4999999999999999`), because the angle is converted with the exact factor of
  its unit (`30 deg` is `π/6`).
- A comprehension whose domain evaluates to an error has that error as its
  value: `Length`, `Count`, `Sum` and an element read of it give the error.
- An Epsil function declared with a type and then defined
  (`let g: (integer) -> integer`, then `function g(k) { k + 1 }`) compiles on
  JavaScript and interval-js and gives the interpreter's value; the compilation
  failed with `Unknown operator \`g\``.
- Compiled code refuses a named function definition that the interpreter refuses
  because of its effects: a body that writes a variable declared before the
  function without the `scope` effect, or a body whose effects are not in the
  stated effects (`pure`). With `let t = 0` before
  `function g(k) { t = k + 1; t }`, the compiled program gave `[2, 2]` for
  `[g(1), t]`; it now fails with the interpreter's message, on every target.
- A quantity whose compound unit cancels is the plain number of its magnitude:
  `["Quantity", 2, ["Divide", "m", "m"]]` and `2\,\mathrm{m/m}` are `2` (they
  were `Quantity(2, 1)`, written `\mathrm{Quantity}(2, 1)`). A named unit
  (`percent`, `rad`) and a compound unit that does not cancel (`in/ft`) stay
  units.
- A number raised to a negative integer is written as a power in LaTeX:
  `10^{-30}` and `2^{-3}` (they were `\frac{1}{1\cdot10^{30}}` and
  `\frac{1}{8}`), and the LaTeX parses back as the same expression.
- `isEqual()`, `is()`, `isIdenticallyEqual()` and the order methods compare a
  quantity whose magnitude is an expression with no unknowns by its value, as
  `Equal` does: `Quantity(2, m).isEqual(Quantity(1.5 + 0.5, m))` is `true` (it
  was `undefined`).
- Quantity arithmetic and unit conversion of float magnitudes use the working
  precision: `(π·(1 rad)).N()` is `3.14159265358979323846 rad` (it was
  `3.141592653589793 rad`), and `1.1 m + 1.3 cm` is `1.113 m`. At
  `precision = 'machine'`, machine numbers are used as before.
- Two quantities with different logarithmic units are not equal: `1 dB = 1 Np`
  was `True`, because both units have a nominal scale of 1.
- A mixed number such as `2\frac{1}{3}` is read only when the integer, the
  numerator and the denominator are exact integers: `2\frac{1.0}{3}` and
  `2.0\frac{1}{3}` are the inexact product 2/3, and a float numerator keeps all
  its digits when it is serialized.
- Serializing a juxtaposition no longer changes its value when a factor-style
  fraction that ends in a digit comes before a fraction
  (`\frac{1}{x}\times3\times\frac{1}{2}`), or when a negative fraction follows
  another factor (`2(-\frac{3}{4})`; it was `2-\frac{3}{4}`, which reads back as
  `5/4`).
- The subscript of a function application written as a name with parentheses
  (`(g(x+1))_{k}`, `(\Gamma(x))_{1}`), or of a base that ends in a superscript
  (`(\exponentialE^{x})_{1}`, `(f^{\prime})_{1}`), is written in parentheses, so
  it reads back as written. `g(x+1)_{k}` read back as `g·(x+1)_k`.
- An argument whose value is an error gives that error at every parameter type.
  With `let w = Ln("a")`, `function op(a: unknown) { a }` and `op(w)` gave a new
  error, "expected `unknown`, got `error` at `w`". So did a parameter typed as a
  collection (`list`, `tuple<…>`) or as `function`, a parameter typed by a type
  variable with a bound (`Conjugate(w)`, `Remainder(w, 2)`, a function declared
  `(T) -> T where T: number`), and the condition of `if` and `Which`. A function
  with several clauses (`op(a: number)`, `op(a: string)`) gave "expected
  `number | string`, got `error`". The callback of a collection operator gave
  "expected `function`, got `error`": `Any(xs, w)`, `All(xs, w)`,
  `Filter(xs, w)`, `Reduce(xs, w)`, `Scan(xs, w)`, `TakeWhile(xs, w)`,
  `MaxBy(xs, w)` and `Map(w, xs)`. The call now evaluates to the error of `Ln`,
  with the frame of the call, as it already did for a parameter typed `number`
  or with no type, and for `Sort(xs, w)`. An element read directly
  (`Map(w, xs).at(1)`, a walk of `Filter(xs, w)`) is that error too. An operator
  that binds or reads such an operand as an expression is not changed:
  `Integrate(w, Limits(w, 0, 1))` is still `1/2`. An argument of the wrong type
  is still refused, and `Map(w, f)`, with the arguments in the wrong order,
  still reports the wrong order.
- A symbol declared `error` that has no value, and a call typed `error` only by
  its declared result type (`g(2)` with `g: (number) -> error`), are checked by
  the same rule at a parameter typed by a type variable as at a ground
  parameter. Neither holds an error value, so the call evaluates to itself.
  `Conjugate(e)` and a function declared `(T) -> T where T: number` applied to
  `e` gave "expected `number`, got `error`"; they are now valid, as `Sqrt(e)`
  and a function declared `(number) -> number` applied to `e` are. The condition
  of `If` and `Which` admits them too, as a parameter typed `boolean` does, and
  selects no branch. A collection parameter (`list`, or a type variable bounded
  by a collection) still refuses them, and so does an overloaded function, with
  ground or generic arms.
- `Map(f, xs)` with a callback known to be a function with no known result type
  (`f` declared `function`), or with a symbol that holds an error, is typed with
  `unknown` elements: `Map(f, [1, 2])` is `list<unknown^2>`. It was typed as the
  source, `vector<integer^2>`. A callback that is not declared still gives the
  type of the source.
- An integer followed by a fraction is read as a mixed number only when the
  numerator and the denominator of the fraction are number literals.
  `2\frac{1+1}{3}` was read as `2 + 2/3`; it is now the product `4/3`, as
  `2\frac{x}{3}` is a product. `2\frac{1}{3}` is still `7/3`. A mixed number in
  raw form (`["InvisibleOperator", 2, ["Divide", 1, 3]]`) is written
  `2\frac{1}{3}` with every fraction style; with the `reciprocal` style it was
  `2\times3^{-1}`, which reads back as `2/3`.
- In a product that has a matrix, a factor that can be a matrix keeps its
  position. This covers the call of a function that was not declared (`g(A)`,
  `g(x)`), a symbol declared `any`, and a value of a type such as
  `number | matrix`. Before, such a factor was sorted in front of the matrices,
  and the powers of a matrix on each side of it were merged: with `A` a 2×2
  matrix, `A·g(A)·A` evaluated to `A^2·g(A)`, and `A^2·g(A)·A^3` to `A^5·g(A)`.
  Both are wrong when `g` returns a matrix that does not commute with `A`.
  `evaluate()`, `simplify()` and `Expand` now keep `A·g(A)·A`. A quotient whose
  denominator can be a matrix also keeps its position, because the quotient is
  element-wise: `(A/g(x))·A` evaluated to `A^2/g(x)`, `A·(1/g(x))·g(x)·A` to
  `A^2`, and, with `B` a matrix, `(A/B)·A` to `A^2/B`. Factors of a scalar type
  (`real`, `integer`, an undeclared symbol) still move to the front, and a
  product with no matrix is unchanged.
- `Expand` does not distribute a product with a matrix over a sum that has a
  scalar term. The sum of a matrix and a scalar adds the scalar to each element,
  so `A·(B + r)` is not `A·B + r·A`: `Expand(A·(B + r))` gave `A·B + A·r`, and
  now stays `A·(B + r)`. A sum of matrices is still distributed, and each term
  keeps the order of its factors: `Expand(A·(B + C)·g(x))` is
  `A·B·g(x) + A·C·g(x)`.
- In Epsil, the source range of an expression includes the parentheses of its
  operands. The range of `(a) + (b)` was `a) + (b`, and the range of the
  statement `let v = (1) + (2)` ended before the last `)`, so an error reported
  on that statement did not underline the last `)`. This applies to every
  operator, call, member access, index, `if … else`, `is`, loop collection,
  comprehension and pattern with a parenthesized operand. A single parenthesized
  expression `(a)` keeps the range of `a`.
- In Epsil, an error in an operand of a call that canonicalization reorders is
  underlined on the right operand. With `let w: any = "s"`, the statement
  `let v = Ln(w) * 2` underlined `2`, because `Ln(w) * 2` is `2·Ln(w)` in
  canonical form; it now underlines `Ln(w)`. This also applies to a library
  operator such as `Xor` and to a user function marked `commutative` or
  `associative`: with `w = Ln("a")` and `op` commutative, `op(z, w)` underlined
  `z`. When the operand is not sure, as in `Ln(w) + Ln(w)`, the whole call is
  underlined.
- A function marked `commutative` or `associative` passes an error value
  through, as the same function without the word does. With `w = Ln("a")` and
  `function op(a, b) commutative { [a, b] }`, `op(z, w)` gave a new error,
  "expected `unknown`, got `error`", in place of the error of `Ln`. A parameter
  without a type is now checked as `any` at the call, as it is without the word.
- In the unit argument of the siunitx commands `\qty`, `\SI`, `\unit` and `\si`,
  a `.` or a `~` between two units is a product of the units, as in siunitx.
  `\qty{3}{m.s^{-1}}` and `\qty{3}{m~s^{-1}}` are the quantity 3 m/s, the same
  as `\qty{3}{m\cdot s^{-1}}`, and `\qty{3}{kg.m^2.s^{-2}}` is 3 kg·m²/s². The
  `.` form gave parse errors, and the `~` form gave 3 per millisecond. A decimal
  point in an exponent (`\qty{2}{m^{1.5}}`) is not a separator, and a space is
  still not a product: `\qty{3}{m s^{-1}}` is 3 per millisecond, as LaTeX prints
  it.
- A siunitx unit argument that is not a unit gives an `unknown-unit` error with
  the text of the argument: `\qty{3}{foo}` is
  `["Quantity", 3, ["Error", "'unknown-unit'", ["LatexString", "'foo'"]]]`. It
  was an `unexpected-command` error on `\qty`, and the arguments were parsed as
  a list.
- The derivative of a sum or a product is computed. It stayed unevaluated:
  `\frac{d}{dx}\sum_{k=1}^{3} k x^k` gave the same expression back, and now
  gives `9x^2 + 4x + 1`. A sum is differentiated term by term when its bounds do
  not depend on the variable, also with a symbolic or infinite bound:
  `\frac{d}{dx}\sum_{k=0}^{n} x^k` is `\sum_{k=0}^{n} k x^{k-1}`. A product with
  integer bounds and at most 24 factors is expanded, then differentiated:
  `\frac{d}{dx}\prod_{k=1}^{2} (x+k)` is `2x + 3`. A product with a symbolic
  bound or more factors stays unevaluated. When the index of the sum or product
  is the variable (`\frac{d}{dx}\sum_{x=1}^{3} x`), the derivative is `0`. When
  a bound depends on the variable, the derivative stays unevaluated.
- A fraction written with the `nice-solidus` fraction style reads back as the
  same division.
  `ce.parse('x/10').toLatex({ fractionStyle: () => 'nice-solidus' })` gives
  `{}^{x}\!\!/\!{}_{10}`, and parsing this LaTeX gave
  `Superscript(Error('missing'), x)`; it now gives `Divide(x, 10)`. The parser
  reads only this exact shape as a division: `{}^{a}`, any number of `\!`, `/`,
  any number of `\!`, `{}_{b}`. A `{}^{a}` or a `{}_{b}` alone keeps its
  reading.
- The base of a subscript is written in parentheses when it is compound, as the
  base of a power is, so the LaTeX reads back as the same expression.
  `Subscript(x+1, 2)` was written `x+1_{2}`, which reads back as
  `x + BaseForm(1, 2)`; it is now written `(x+1)_{2}`. A product, a negation, a
  negative number, a power, a fraction and a factorial are also fenced:
  `(2x)_{1}`, `(-2)_{k}`, `(x^2)_{1}`, `(\frac{x}{y})_{1}`.
- The limit at infinity of a difference of two radicals that grow at the same
  rate has a value: `\lim_{t\to\infty} (\sqrt{t+1} - \sqrt{t})` is `0`, and
  `\sqrt{t^2+3t} - \sqrt{t^2+t}` gives `1` (they stayed unevaluated). The same
  is true for a radical minus a term that grows at the same rate:
  `\sqrt{t^2+t} - t` gives `1/2` at `+\infty`, `\sqrt{t^2+t} + t` gives `-1/2`
  at `-\infty`, and `\sqrt[3]{t^3+t^2} - t` gives `1/3`. The limit code
  multiplies the difference by its conjugate,
  `\sqrt{u} - \sqrt{v} = (u - v)/(\sqrt{u} + \sqrt{v})`. A difference that grows
  without bound, such as `\sqrt{2t} - \sqrt{t}`, still gives `+\infty`. The
  limit of an absolute value at infinity also has a value: `\sqrt{t^2+1}` is
  `+\infty` (it stayed unevaluated) and `|(1 - 2t)/(t + 3)|` is `2`. A limit at
  infinity whose value is a ratio of radicals is exact:
  `\lim_{t\to\infty} \frac{\sqrt{2t^2+1}}{t}` is `\sqrt{2}` and
  `\lim_{t\to-\infty} \frac{\sqrt{3t^2+1}}{t+1}` is `-\sqrt{3}` (they were the
  floats `1.414…` and `-1.732…`).
- A limit at infinity of the form `x·f(c/x)` is exact:
  `\lim_{x\to\infty} x\ln(1+\frac{\pi}{x})` is `π` (it was the float
  `3.14159265356268`, with wrong last digits), `x\sin(\frac{\sqrt{2}}{x})` is
  `\sqrt{2}`, `x^2(1-\cos(\frac{\sqrt{3}}{x}))` is `3/2` (it was
  `1.4999999839369884`), and `x(e^{1/x}-1)` is `1` (it stayed unevaluated). The
  limit code reads the value from the series of the function with `x = 1/u` at
  `u = 0`. `evaluate()` no longer returns a float for a limit whose value it
  cannot find exactly: the limit stays unevaluated, and `.N()` gives the float.
- Whole-number powers of one matrix combine. With `A` declared `matrix<2x2>`,
  `A^2 A^3` evaluates and simplifies to `MatrixPower(A, 5)`, and `A A^2` to
  `MatrixPower(A, 3)` (they stayed products, such as
  `MatrixPower(A, 2) * MatrixPower(A, 3)`). `A^2 A^2` is `MatrixPower(A, 4)` (it
  was `MatrixPower(MatrixPower(A, 2), 2)`), and `(A^2)^3` is
  `MatrixPower(A, 6)`. Only positive whole-number exponents combine, and only
  for powers that no other matrix separates, because the product of matrices is
  not commutative: `A^2 B A^3` stays as it is. `A^2 A^{-1}` stays as it is too,
  because `A^2 A^{-1} = A` is true only when `A` is invertible.
- `Solve` answers an equation with a trig function of a periodic argument, such
  as `sin(sin(x)) = 0`. Such an equation is periodic, with the period of the
  inner trig function. `Solve(sin(sin(x)) = 0, x)` is `[πt]`,
  `ce.parse('\sin(\sin(x))=0').solve('x')` is `[0, π]`, and over `[-7, 7]` the
  roots are `-2π, -π, 0, π, 2π` (there was no answer since 0.148.0). An equation
  with no real root gives the empty list: `cos(sin(x)) = 0` is `[]`, because
  `|sin(x)| ≤ 1 < π/2`. The solver uses each period of the outer function that
  the inner `sin` or `cos` reaches: `sin(4·sin(x)) = 0` holds for
  `4·sin(x) = 0`, `π` and `-π`, and the roots of `sin(x) = -π/4` are now in the
  answer. A scan of one period with an interval proof checks each list.
  `tan(4·sin(x)) = 1` and `cot(4·sin(x)) = 1` are answered the same way, with
  the half-turn period of `tan` and `cot`. When the inner function reaches so
  many periods of the outer one that more than 16 roots would be added, there is
  no answer, and it comes quickly (`sin(200·sin(x)) = 1/3`,
  `sin(1000·sin(x)) = 0`). A trig function of an argument that is not periodic
  (`sin(x²) = 0`, `sin(eˣ) = 0`) still gives no answer.
- For an unknown declared `real`, a root written with `arcsin` or `arccos` of a
  constant in `[-1, 1]` is kept. With `x` declared `real`,
  `sin(x) = arccos(9/10)` gives
  `[arcsin(arccos(9/10)), π − arcsin(arccos(9/10))]`, and `cos(sin(x)) = 9/10`
  gives its four roots; both gave no answer, because the type of `arcsin(c)` is
  `complex` when it does not use the value of `c`. `sin(x) = 2` still gives
  `[]`.
- `Solve(cos(x)^2 = 1/9, x)` is `[πt − arccos(1/3), πt + arccos(1/3)]` (it
  stayed unevaluated). The roots `-arccos(-1/3)` and `arccos(1/3) − π` are in
  the same family, but their difference did not evaluate to 0: the solver now
  uses `arccos(-c) = π − arccos(c)` to compare them.
- `expr.solve()` no longer lists one root twice for a periodic equation. It
  gives one root of each family in one period, but `sin(x) = -1` gave
  `[-π/2, 3π/2]` and `3cos(x) + 3 = 0` gave `[π, -π]`, two roots that differ by
  the period `2π`. They now give `[-π/2]` and `[π]`: of two roots that differ by
  a multiple of the period, the first one is kept. `expr.explain('solve')` gives
  the same list, with a step that names each root it removes.
- `subs()` reads only the own properties of the substitution object. A symbol
  named like a property of a JavaScript object, such as `constructor` or
  `toString`, was replaced by that inherited property:
  `ce.box(["Add", "x", "constructor"]).subs({ x: 1 })` gave `"Undefined" + 1`.
  It now gives `constructor + 1`.
- A comprehension or a lazy collection that calls a parameter or a local
  function applies that function after it leaves the function or block that made
  it: `function g(f) { [f(x) for x in [1, 2]] }` applied to `(a) => a + 1` gives
  `[2, 3]`, and so does `do { let f = (a) => a + 1; [f(x) for x in [1, 2]] }`;
  both stayed unevaluated. A `map` or `filter` callback that calls a parameter
  works the same way, also when the collection is passed to a function that has
  a parameter with the same name (it used that other function). A call of a
  function parameter inside a `Sum`, a `Product` or a comprehension in a
  function body calls the parameter: `(g) ↦ Σ_{k=1}^{3} g(k)` applied to
  `a ↦ a + 1` is `9` (it was `g(1) + g(2) + g(3)`), and `Σ_{k=1}^{3} h(k)` uses
  a function `h` assigned after the sum was written.
- A comprehension over library functions or pure user functions prints its
  elements: `[f(0) for f in [Sin, Cos]]` prints `[0, 1]`.
- In LaTeX, a bracket pair of two function literals after `\in` is a list, not
  an interval: `\prod_{q\in [a\mapsto a+1, a\mapsto 2a]} q(3)` is `24`.
- In a function body, an assignment in an `if` branch to a local that a later
  statement of the body assigns writes that local: with
  `function g(k) { if k > 1 { t = 5 }; t = t + 1; t }`, `g(2)` is `6` (it was
  `t + 1`).
- A function held by the index of a comprehension is applied where the index is
  the callback of a lazy collection operator:
  `[Map(q, [1]) for q in [a ↦ a + 1]]` is `[[2]]` (it was `[[q(1)]]`), and
  `Filter([1, 2], q)` with the same kind of index no longer throws. A call of
  such an index in an inner comprehension uses the function of its own element,
  also when the elements are read in another order. Evaluating a comprehension
  whose index is called like a function, such as
  `[k(1) for k in [a ↦ 0, a ↦ 1]]`, no longer declares `k` in the global scope.
- A view whose callback holds an error under a selection, such as
  `Map(u ↦ If(u = 2, 1/"a", u), Range(1, 5))`, is a collection whose second
  element is the error: `Sum` and `Mean` over it give the error, `Length` gives
  `5` and `First` gives `1`. Before, `Sum` gave back the view itself and
  `Length` stayed unevaluated.
- A pipe into `Map` over a list with a failed cell gives the same value as the
  direct call: `[1, 1/"a", 3] |> Map(f, _)` and
  `Apply(z ↦ Map(f, z), [1, 1/"a", 3])` stayed an unevaluated `Map`, and a loop
  over that value ran no turn. Substituting such a list with `subs()` also keeps
  the expression bound. In Epsil, a statement whose value is a `map` or `filter`
  over a list literal with a failed cell, such as
  `let ys = map((u) => u, [1, g("a"), 3])`, is reported as a `runtime-error`; a
  cell with an effect is not evaluated for this check.
- Angle quantities with exact magnitudes compare exactly. The scale of `deg`,
  `grad`, `turn`, `arcmin` and `arcsec` is a rational multiple of π, so
  `180 deg = π rad` is `True` with no rounding, and
  `1 deg < (π/180 + 10^-30) rad` is `True` (it was `False`, a tie within the
  tolerance). A quantity in daltons compares exactly with the value stored in
  the unit table (CODATA 2018). Unit conversion results do not change.
- In Epsil, a failed cell in the collection of a `for` loop or comprehension
  header is reported. With `g(x) = 1/x`, `for x in [1, g("a"), 3] { n = n + 1 }`
  ran 3 turns and reported nothing, because the body does not use `x` and a
  header is not a statement. The loop still runs 3 turns, and the list gets a
  `runtime-error` with the same message and code as the statement
  `let xs = [1, g("a"), 3]`. Each header is reported once, also in a nested loop
  or in a function that is called more than once. A header that is a variable
  (`for x in xs`) is not reported again, because the statement that gave `xs`
  its value is. A comprehension header is reported when the program reads the
  list.
- A tuple whose type has an absent slot, such as a symbol declared
  `tuple<integer, missing>`, is treated as a tuple. It was not, because the bare
  type `tuple` admits value slots only. So `[...t, 5]` and `{...t, 5}` spread it
  (they are now the `spread-tuple` error, as for any tuple), and
  `Join(t, [3, 4])` with `t := (1, Missing)` had 4 elements (it now has 3, the
  first of which is the tuple). `(1, 2) = p`, with `p` declared
  `tuple<integer, integer | missing>` and no value, was `False`; it now stays
  undecided, as for a tuple with value slots. A union of a number and such a
  tuple joins with a list (`Join([3, 4], s)`), where it was an
  `incompatible-type` error. A compiled `Dot` of a tuple of such tuples is
  declined, as for other tuples of tuples.

- A tuple or list literal compared with a value whose type only may be a tuple
  or a list stays undecided. `(1, 2) = x` with an undeclared `x` was `False`,
  and so was the comparison with a symbol declared
  `tuple<integer, integer> | missing` or `integer | tuple<integer, integer>`.
  `[1, 2].isEqual(x)` was `false` for an undeclared `x` or for a symbol declared
  `list<integer> | integer`; it is now `undefined`. A literal is still unequal
  to a value that cannot have its kind: `[1, 2] = (1, 2)` and `(1, 2) = 5` are
  `False`, and so is a tuple literal compared with a value of a nominal type.

- A type alias that names itself as an arm of its own union, such as
  `cyc = cyc | tuple<number, number>`, no longer overflows the stack. Spread,
  `Join`, arithmetic, comparisons and `At` of a symbol of such a type threw or
  logged `Maximum call stack size exceeded`. Such an alias is now a subtype of
  what its other arms are subtypes of: with `cyc = cyc | 0`, `Norm(c)` is valid
  and evaluates to `|c|`, where it was an `incompatible-type` error, and
  `Join([3, 4], c)` with `cyc = cyc | tuple<number, number>` appends `c` as one
  element. An alias that names itself inside a constructor, such as
  `json = list<json> | integer`, is unchanged.

- The static type of a list plus or times a number contains the result when an
  element of the list is itself a collection. `[[1, 2], 3] + 0.5` was typed
  `list<integer | list<integer> | real>`, which does not hold its value
  `[[1.5, 2.5], 3.5]`; it is now typed `list<list<real> | real>`. The same holds
  for an element whose type is an alias of a list (`list<myints> + 0.5` is
  `list<list<real>>`), for a list of ranges (`[1..3, 5] · 0.5`), and for a list
  of tuples with an imaginary component times `i`. A sum or product that stays
  an integer keeps its type: `[[1, 2], 3] + 1` is still
  `list<integer | list<integer>>`.

- The static type of a collection operator keeps the `missing` element of an
  operand whose cells can be absent. With `L: list<integer | missing>`,
  `Join(L, [2])` and `ListJoin(L, [2])` were typed `list<number>`, which
  excludes the `Missing` cell of the value; they are now typed
  `list<integer | missing>`, as `Append(L, 2)` already was. The same holds for
  `DeleteAt`, `Partition`, `Chunk`, `ChunkBy`, `GroupBy`, `Zip`, `TakeWhile`,
  `DropWhile`, `RandomShuffle`, `Dedup`, `Cycle`, `ListFrom`, `SetFrom`,
  `DictionaryFrom`, `Values`, `Map` with a function literal, `Find`, `MaxBy`,
  `MinBy`, and the set operations (`Union(S, {2})` with
  `S: set<integer | missing>` is `set<integer | missing>`, where it was the bare
  `set`). A position or a count over such a list is an integer: `IndexWhere`,
  `ArgMax`, `ArgMin` and `CountIf` were typed `number`, and `Position`
  `list<number>`. `Flatten` of such a list is `list<any>`, where it was the bare
  `list`. An operand typed with `any` elements is treated the same way, because
  `any` admits an absent value: `Flatten(M)` with `M: list<list<any>>` and
  `Union(A, {2})` with `A: set<any>` are `list<any>` and `set<any>`, where they
  were the bare `list` and `set`.

- A sum or product whose operand type has an imaginary member is typed
  `complex`, because neither is closed over the imaginary numbers
  (`i + (-i) = 0`, `i · i = -1`). With `r: imaginary | integer`, `r + 1` was
  typed `imaginary | integer`, which excludes its value `1 + i`; it is now
  `complex`. The same holds for an alias of such a union, for list and tuple
  cells (`[i] + [-i]` is `vector<complex^1>`, where it was `vector<imaginary^1>`
  with the value `[0]`), for a list of points plus a point, and for
  `imaginary | nan`, which becomes `complex | nan`. A sum of two lists of
  ranges, `[1..3] + [1..3]`, is typed `list<list<integer>^1>`, where it was
  `list<range^1>`.

- Arithmetic over a list whose element can be a list or absent has a static type
  that holds the result. With `L: list<list<integer> | missing>` and
  `L := [[1, 2], Missing]`, `L + 1` was typed `list<list<number>>`, but the
  absent element becomes `NaN`; it is now typed `list<list<number> | nan>`. A
  function over a list of rows and numbers keeps the rows: `Sin(L)` with
  `L: list<list<integer> | integer>` was typed `list<number>` and is now
  `list<list<number> | number>`. An absent row of points stays `Missing`, also
  when the point type is the bare `tuple` (it was `NaN`).

- Collection operators whose result can hold `Missing` say so in their type.
  `Iterate(f, Missing)` and an `Iterate` whose callback can return `Missing` are
  typed `list<any>`, where they were the values-only `list`. `First([])`,
  `Last([])` and `At([], 2)` are typed `missing`, where they were `unknown`.
  `Map` with a callback that is declared for numbers or booleans over a source
  whose elements can be collections (`Map(Sqrt, U)` with `U: any`) admits a
  collection element; with a callback such as `IsPrime` or `Not` over a list
  that can hold `Missing`, the element type has a `missing` arm. `Map` with a
  user function that has no declared result types the call: with
  `g := c ↦ If(c == "a", "zz", c)`, `Map(g, ["a", "b"])` was typed as the source
  and is now typed by what `g` returns. A `Zip` element whose items are all
  absent is `Missing` through `.at()` and iteration too, as it already was in
  the printed value, and compiled JavaScript writes it as an absent value; the
  Python target declines such a `Zip`.

- A complex number whose imaginary coefficient is written as an inline fraction
  keeps its value in a LaTeX round trip. At a deep level, or with an inline
  `fractionStyle`, `Complex(1/10, 1/10)` was written `1/10+1/10\imaginaryI`,
  which reads back as `1/10 + 1/(10i)`, the opposite imaginary part. It is
  written `1/10+(1/10)\imaginaryI` (found by Tycho's round-trip audit of its
  Desmos corpus, whose failing trees are now part of `npm run check:roundtrip`).

- A mixed number keeps its tree in a LaTeX round trip (Tycho ledger row 390).
  `2\frac{1}{2}` is the sum `Add(2, 1/2)`, which was written `2+\frac{1}{2}`
  with `prettify: false` and read back as `5/2`. It is written as the mixed
  number whenever the parser rebuilds the same sum from it, with or without
  `prettify`: `-2\frac{1}{2}` was written `-\frac{1}{2}-2`, and
  `500\frac{999}{1000}` was written `500+\frac{999}{1000}`. The pretty MathJSON
  of `-3\frac{1}{4}` is `["Add", -3, ["Rational", -1, 4]]` (it was
  `["Subtract", ["Rational", -1, 4], 3]`). The fraction of a mixed number is
  always written `\frac{…}{…}`: with an inline fraction style, `-2\frac{1}{2}`
  was written `-21/2`. A fraction that is an integer is not a mixed number:
  `2\frac{4}{2}` is `4` (it was the sum `Add(2, 2)`), and
  `Add(2, Rational(3, 1))` is no longer written `2\frac{3}{1}`, which read back
  as 6.

- Printing an unevaluated lazy view does not run a side effect. `toString()`,
  the `latex` getter and `toLatex()` evaluated the cells of a view over a list
  literal to show a preview: printing `Dedup([1, H(1), 2])`, with `H` declared
  `pure: false`, called `H` twice, a view over `Random()` printed a different
  list each time, and a comprehension whose body assigns an outside variable did
  the assignment. Such a view now prints as written (`Reverse([1, H(1), 2])`),
  and its value comes from `.evaluate()`. A view over pure functions, or one
  that writes only to its own local variables, still shows its preview. The same
  holds when the view calls a comprehension index or a callback parameter whose
  functions can be impure: `[q(1) for q in [a ↦ H(a)]]` and `Map(w ↦ w(1), fs)`,
  with `fs` holding such functions, print as written.
- In Epsil, a `function` statement in a function body works when its name is
  also the name of a library constant.
  `function o() { function i() { 2 }; i() }` then `o()` gave
  `Error(ErrorCode("constant-assignment", "i"))` instead of `2`; the same
  happened for `e`, `Pi` and the other library constants. The definition was
  written to the library constant instead of making a binding local to the call.
  It is now local to each call of the outer function, as at the top level, and
  the library constant outside the body does not change.
- Two quantities whose units have the same dimension compare by their physical
  value on every route. `isEqual()`, `isIdenticallyEqual()`, `is()`, `isLess()`,
  `isLessEqual()`, `isGreater()` and `isGreaterEqual()` gave `undefined` or
  `false` for `1000 m` and `1 km`, because the unit symbols counted as unknowns;
  now they agree with `Equal`. `NotEqual` is the negation of `Equal`
  (`1000 m ≠ 1 km` is `False`, `6 W ≠ 7 W` is `True`; both stayed unevaluated).
  `Max`, `Min`, `Clamp` and `Sort` order such quantities with no tolerance:
  `Max(1 km, 999 m)` and `Max([1 km, 999 m])` are `1 km` (they stayed
  unevaluated). The comparison converts both quantities to the finer of the two
  units, so `1 eV = 2 eV` is `False` (it was `True`, because the difference in
  joules was smaller than the tolerance). It applies temperature offsets:
  `0 °C = 273.15 K` is `True` and `0 °C < 1 K` is `False` (they were `False` and
  `True`). Two exact magnitudes are compared with exact arithmetic, also when
  they are too large for a double (`10^400 m < 10^401 m`) or when their double
  cancels: `1 m = (1 + 10^-16) m` is `False`. Under `.N()`, the exact magnitude
  of a quantity decides, as it does for a number: `1 m < (1 + 10^-30) m` is
  `True`. The conversion is exact between two identical units and for every unit
  defined by an exact decimal number (`in`, `ft`, `mi`, `lb`, `eV` and all SI
  prefixes); the angle units and `Da` are compared within the tolerance. A
  magnitude with no numeric value or a complex value, even with a very small
  imaginary part, leaves the comparison unevaluated: `x m = y m` was `True` and
  `x m < y m` was `False`. Quantities of different dimensions, and a quantity
  and a plain number, stay unevaluated.
- `Sort` and `Ordering` of a lazy source give the error of an element that
  fails: with `h(2)` an error, `Sort(Map(h, [2]))` was `[Error(…)]` and
  `Sort(Map(h, [3, 2, 1]))` stayed unevaluated. Each element of the source is
  read once. A membership test (`Element`, `NotElement`, `Contains`) over a lazy
  source that computes a failed element gives that element's error when it finds
  no match: `5 ∈ Map(h, [1, 2])` was `False`. A `Range` or an `Interval` keeps
  its arithmetic test, and an infinite source is not walked.
- `Count(xs, p)` gives the error when the predicate fails on an element, as
  `CountIf` does. Before, it counted that element as selected: with `h(2)`
  failing, `Count([1, 2, 3], (u) => h(u) > 0)` was `3`.
- On `interval-js`, a `Which` or an `If` arm is also narrowed by a decimal bound
  written in LaTeX (`x \ge 0.5`) and by an exact bound that a double holds
  (`\frac{1}{2}`) (Tycho ledger row 397). Over [0.49, 0.51],
  `\begin{cases}0 & x\ge0.5\\ \arccos(2x) & \text{otherwise}\end{cases}` was
  `partial` (domain clipped) and is an interval. A bound that no double holds
  (`\frac{1}{3}`) is compiled to an enclosure of its value and still does not
  narrow.

- **#454** A `Fold` whose step reads its accumulator by index, such as `q(s[1])`
  with `q: (integer) -> list<integer>`, is typed from its seed again. The index
  read had typed the accumulator as a tuple of one integer, and the fold as
  `broadcastable<tuple<integer>>`, so compiling the fold at a `list<integer>`
  parameter, or compiling `acc + fold[1]`, threw. The fold with seed `[1, 0, 1]`
  from the issue is now typed `list<integer | nan^3> | vector<integer^2>`.
- An `If` or `Which` whose condition may be a list of booleans or a single
  boolean keeps, in its type, each branch whose element type is not known. With
  `u: list`, `If(u[2] != 0, p, u)` was typed `broadcastable<tuple<integer>>` for
  `p: tuple<integer>`, but returns `u` itself when the condition is a single
  `False`.
- A seeded `Fold` or `Reduce` over a collection that can be empty includes the
  type of the seed in its type: `Fold((a, k) => "x", 0, Range(1, n, 1))` was
  typed `string`, but is `0` for `n = 0`.

- Assumptions in nested scopes combine: with `assume(b ≥ 0)` and, in a nested
  scope, `assume(b > 0)`, `b.isPositive` and `b.isGreater(0)` are `true` (they
  were `undefined`), whatever the order of the two facts. With `p: integer<1..>`
  and `assume(p ≥ 0)`, `p.isPositive` is `true`.
- On the asynchronous route, a user function whose argument contains a free
  symbol awaits its body: with `f := x ↦ AsyncOnly(x)`, where `AsyncOnly` has
  only an `evaluateAsync` handler, `f(1 {0<t})` gives the value of
  `AsyncOnly(1 {0<t})` (it gave `AsyncOnly(1) {0 < t}`). The application memo, a
  list-producing recursion and a numeric evaluation no longer give the
  synchronous answer for a body that applies such an operator. A recursion over
  a free symbol still stays inert.
- After a quantity with the unit newton (`\mathrm{N/A^{2}}`) is parsed, the
  operator `N` still evaluates, and `(2 m)^n` is written `(2\,\mathrm{m})^{n}`,
  so it parses back as the same expression.
- A list of rows of points whose components have different types
  (`[[(1, 1/2), (1/2, 1)], [(1, 4/3), (3/4, 1)]]`) is typed as a 2×2 matrix of
  points (it was typed as a list of points), and a matrix of points plus a point
  is typed as a matrix of points (its type held an extra `| tuple<…>`). A point
  divided by a vector or matrix with a cell that can be zero has a type that
  admits the division by zero: `(1, 2) / [1, 0]` is `[(1, 2), (~oo, ~oo)]`,
  typed `list<tuple<infinity, infinity> | tuple<rational, rational>>`. The
  product of a point and a tensor of rank 3 evaluates, as their quotient does,
  and a product of a list of points, a matrix and scalar factors is typed as a
  matrix of points.
- A `Union` with more than 100 elements counts and lists a repeated element of a
  list operand once (`Union(L, S).count` gave 297 for 150 distinct values).
- Epsil: an error in the branch of an `else if`, or in any call whose operator
  occurs more than once in the statement, is underlined on the branch or
  argument that holds it (it was the whole statement). When the source does not
  show which operand of a sum or product holds the error, the whole sum or
  product is underlined, never an operand that cannot cause it. `epsil check`
  reports a `function` statement for a name that an earlier `const` bound, with
  the code `invalid-clause-definition`, and the run does not report it a second
  time.

- With the Rubi rules loaded (`loadIntegrationRules`), a definite integral of an
  integrand that is real on the interval no longer gives a complex value:
  `∫₁²⁰¹¹ √x/(√(2012−x)+√x) dx` is `1005` (it was
  `1005 − 503 ln(−1005) + 503 ln(1005)`, which is `1005 − 1580.2i`). When the
  integrand is proven real on a finite interval and the difference of the values
  of the antiderivative at the bounds has an imaginary part, that value is
  refused: the built-in antiderivative or an exact reduction gives the value,
  and otherwise the integral stays unevaluated. A correct complex value is kept:
  `∫₋₁³ √x dx` is `2√3 + (2/3)i`.

- `simplify()` reduces more exact constants:
  - A sum of logarithms of positive rationals or surds with rational
    coefficients: `−2 ln 2 − 2 ln(3/2) + 2 ln 3` is `0` (it stayed as it was),
    and `ln 2 + (1/2) ln 3` is `(1/2) ln 12`.
  - A quotient whose denominator is a power or a product of `a + b√c`:
    `(12 − 7√3)/(3 − 2√3)²` is `−√3/3`, and `−π(12 − 7√3)/(3 − 2√3)²` is
    `(√3/3)·π`. So the value of `∫₀^π 1/(2 + cos x) dx` simplifies to `π√3/3`.
  - An odd or even function of a negative constant that is not one number:
    `arctan(−3 + 2√2)` is `−arctan(3 − 2√2)`, so
    `arctan(−3 + 2√2) + arctan(3 − 2√2)` is `0`.
- With the Rubi rules loaded, a definite integral whose Rubi value is real but
  written with terms that are not real gets the form of the built-in
  antiderivative: `∫₂^∞ 1/(x² − 1) dx` is `ln(3)/2` (it was `iπ/2 + artanh(2)`).

### Performance

- On the `javascript` target, a seeded random draw that reads no input of the
  compiled function, such as
  `WithRandomSeed(191268, RandomChoice([0, 1], 6561))`, is computed once per
  compiled function, on its first call, and the stored value is read after that:
  the draw is a pure function of its seed. It was drawn again at every call,
  about 6,561 numbers per sample of a surface indexed by `9θ + 8φ` (0.027 ms per
  call against 0.0002 ms for `sin(9θ + 8φ)`; now 0.0003 ms). A draw whose seed
  or body reads an input, a loop index or a caller function, and an unseeded
  draw, are still per call.
- A type string that names a type declared with `ce.declareType`, such as the
  signature `(integer_partition) -> number`, is parsed once and then read from a
  cache. Before, it was parsed twice at every `ce.declare`. Declaring 1000
  functions with such a signature takes about 10 ms, where it took about 47 ms
  ([#453](https://github.com/cortex-js/compute-engine/issues/453)).

- `Equal` of two sets, the duplicate removal of `Union`, and membership in a
  literal set or list of 32 or more elements group the elements by hash: with
  20,000 elements, set equality takes about 4 ms (it took 1.6 s), and the count
  of a `Union` of two sets about 50 ms (it took about 3 minutes).
- A list in which every cell failed is data: it evaluates to itself and is not
  walked again at each use. In Epsil, 3200 turns of `fs = [...fs, g("a")]` with
  a failing `g("a")` take about 3 s (they took about 20 s).

### New Features

- `FindFit` takes an optional fifth argument, a dictionary of options. The
  `global` option,
  `FindFit(data, model, params, vars, {global: {b: [0.1, 6]}})`, searches the
  named parameters (at most two) over the given range for the lowest sum of
  squared residuals, instead of returning the local minimum nearest the start.
  In the MathJSON `dict` spelling the range is a two-element array. When the
  model is linear in every other parameter, the range is scanned on a grid, the
  other parameters are solved by linear least squares at each grid point, and
  the lowest grid minima are refined by the bounded Levenberg–Marquardt solver;
  otherwise the solver runs from each point of a coarser grid and the lowest
  residual wins. The searched parameter stays inside the range; a range is
  intersected with the parameter's own `(a, a0, lo, hi)` bounds. The result
  record is unchanged; its `iterations` is the total over every solver run, and
  a deadline that expires during the search returns the best point found with
  `timedOut: True`. An unknown option key, a name that is not a parameter, or a
  range that is not two finite numbers with `lo < hi` is an
  `unexpected-argument` error. Example: on the five points
  `(1, 4.3), (3.22, 1.18), (5.27, 0.01), (10.49, 1.48), (7.12, 3.44)` with the
  model `a\cos(bx+c)+dx+e`, the fit from the default start has period 8.0 and a
  sum of squared residuals of 0.36; with `b` searched over `(0.1, 6)` it has
  period 2.9 and 0.0057.
- `Integrate` gives exact values for more families of definite integrals:
  substitutions that it composes with the existing solver, Beta and Beta-prime
  forms with logarithmic moments, rational functions of trigonometric and
  hyperbolic functions, products of `Floor`, `Ceil` and `FractionalPart` with
  polynomials, polynomially weighted series and telescoping products, and
  reciprocal pairs of high-degree rational functions. For example,
  `∫₀¹ x(1−x)^99 dx` is `1/10100`, `∫₁²⁰¹¹ √x/(√(2012−x)+√x) dx` is `1005`, and
  `∫_{1/5}^{5} (1+x²)/(x²+x⁹) dx` is `24/5`. Most of these reductions run only
  when the existing routes give no exact value; the splitting at
  discontinuities, the high-degree reciprocal pairs and the Beta forms with a
  large power run first, because the existing routes would expand them. Each
  reduction proves its domain and convergence conditions before it returns a
  value. The Rubi rules also gain three substitution utilities
  (`SubstForFractionalPowerOfLinear`, `InverseFunctionOfLinear`,
  `SubstForInverseFunction`)
  ([#445](https://github.com/cortex-js/compute-engine/pull/445), contributed by
  [KingArth0r](https://github.com/KingArth0r)).

## 0.157.0 _2026-10-19_

### New Features

- `NSolve(eq, x)` accepts the same arguments as `Solve` and returns numeric
  approximations of the solutions.
- `Sum`, `Product` and `Table` accept the shorthand iterator `{i, n}`, from 1 to
  `n`: `Sum(k^2, {k, 3})` is `14`. LaTeX tuple iterators such as
  `\mathrm{Integrate}(x, (x,0,1))` also parse correctly.
- More number theory and combinatorics functions operate element by element on
  lists: `NthPrime([1, 2, 3])` is `[2, 3, 5]`, and `Divisors([6, 8])` is
  `[[1, 2, 3, 6], [1, 2, 4, 8]]`. `Boole`, `Degrees` and `DMS` also accept
  lists.
- Collections can provide three optional handlers, `countOf`, `indexOf` and
  `atBigint`. `Permutations` and `Combinations` use them to answer `Element`,
  `At`, `IndexOf` and `Count` without enumerating their elements.

### Behavior Changes

- **Sets are unordered.** Equivalent sets now have the same canonical order and
  compare equal with `isSame`: `{2, 1}` prints as `{1, 2}`, and
  `ListFrom({2, 1})` is `[1, 2]`. Set patterns match in any order. Set builders,
  ellipsis notation, and structural or raw sets retain their written order;
  effects in a canonical set run in canonical order.
- Operations that depend on position, including `Take`, `Reverse`, `Sort`,
  `Insert`, `Find`, `Partition` and `Scan`, consistently reject sets. Convert a
  set to a list before using these operations.
- `Solve` returns families for periodic equations: `Solve(sin(x) = 1/2, x)`
  gives `[2πt + π/6, 2πt + 5π/6]`, with integer `t`. Substitute integers for `t`
  or supply a bounded domain to obtain individual values. `expr.solve()` still
  returns principal solutions. Cases whose full families cannot be represented
  remain unevaluated, including unsupported complex families and families
  requiring additional restrictions.
- `Factorial2` supports negative integers: `(−1)!! = 1`, `(−3)!! = −1`, and
  `(−5)!! = 1/3`. Negative even integers give `~oo` instead of `NaN`.
- Quantity arithmetic preserves exact magnitudes: `Quantity(3, m)·π` is `3π m`,
  and `3 m / 2 m` is `3/2`. Use `.N()` for approximations. Conversions by
  integer factors preserve exactness; other conversion factors give floats.
- Integer functions preserve float inputs in their results: `Fibonacci(5.0)` is
  `5.0`, and `Divisors(12.0)` contains floats. Non-integer inputs remain errors
  where integers are required.
- Values supplied as `complex.js` objects are inexact. For an exact Gaussian
  integer, use `ce.number({ re: 2, im: 3 })` or `ce.box(["Complex", 2, 3])`.
- Global declarations cannot replace library constants such as `Pi` or `True`.
  Parameters and local scopes can still use these names. Sequence definitions
  also cannot replace constants.
- Float serialization preserves float values through LaTeX and MathJSON round
  trips. Repeating decimal marks are automatic only for exact values in LaTeX;
  `toMathJson()` now defaults `repeatingDecimal` to `false`.
- `SVD` and `SingularValues` generally leave exact matrices symbolic under
  `evaluate()`; use `.N()` for numeric decompositions. Small matrices with
  supported exact singular values retain those results.
- Rounding functions accept poles: `Floor(~oo)` is `~oo`. Complex numbers with
  an infinite real part and finite imaginary part become signed real infinity.
  `Sum([1+i, +oo])` and `Mean([1+i, +oo])` both give `+oo`.
- Epsil reports errors in nested statements, once per source location. Block
  locals belong to each execution; reading or writing a `let` or `const` before
  its declaration reports `read-before-declaration`.
- Products and quotients of square roots stay exact when the combined radicand
  is above 10⁶: `\sqrt{1009}\sqrt{1013}` is `√1009·√1013` instead of the float
  `1010.998…`, and `√1009/√1013` is no longer evaluated to `0.998…`. Use `.N()`
  for a float. `(√−13)^3` evaluates to `−13√13·i`.
- An element-wise `Which` or else-less `If` with a point branch gives `Missing`
  at a position that no clause selects: `Which([1, 5] < 3, (1, 2))` is
  `[(1, 2), Missing]` instead of `[(1, 2), NaN]`. A number branch still gives
  `NaN`.
- `D(x ↦ a+b, x)` canonicalizes to `D(a+b, x)`, so a LaTeX round trip keeps the
  same tree. A function literal whose body is a single symbol is kept (Tycho row
  391).
- After `f(x)` is parsed, `fy` and `2f` report the same `incompatible-type`
  error as `f\times y` and `2\times f`; they were products. An application such
  as `2f(x)` does not change.
- `IsSquare`, `IsTriangular`, `IsOctahedral`, `IsCenteredSquare`, `IsHappy` and
  `IsAbundant` of a symbol stay unevaluated; they answered `False`.
- An ordering comparison of a set and a list, such as `Less(Set(5, 6), [1, 2])`,
  is an `incompatible-type` error; it was compared element by element.
- `Join` or `Append` of a dictionary and an element that can never be a
  key-value entry is an `incompatible-type` error when boxed:
  `Join(Dictionary(x: 1), [2, 3])` stayed an unevaluated `Join`.
- After `ce.declare()` gives a function a signature, an Epsil `function`
  statement for that name replaces the body and keeps the declared signature; it
  added a clause. A statement with parameters outside the declaration reports
  `invalid-clause-definition`.
- `cantorEnumerateComplexNumbers()` yields pairs of fractions
  `[[n, d], [n, d]]`. The exported `factorial2()` gives the recurrence value for
  an odd negative integer.

### Issues Resolved

- Numeric evaluation of user functions, blocks and lazy `Map` now agrees with
  direct evaluation, including exact arguments near a rounding boundary:
  `Map(Sin, [Pi]).N()` is `[0]`, and `Map(Floor, [(25! − 1)/24!]).N()` is
  `[24]`.
- Improved rounding of elementary and special functions at high precision,
  including exact rational arguments, complex angles and incomplete gamma and
  beta functions. Very small probability tails retain their significant digits
  ([#450](https://github.com/cortex-js/compute-engine/issues/450), contributed
  by [enumeratio](https://github.com/enumeratio)).
- `Solve` handles integer-valued float exponents, rejects extraneous roots more
  reliably, and finds numeric polynomial roots up to degree 1000 within its
  complexity limits. `x^{2.0} = 4` gives `2.0` and `-2.0`; real-domain pure
  powers avoid computing complex roots.
- Improved `Series`, `Limit` and `Residue` at algebraic and symbolic points,
  including `1 + √2` and `π/2`. One-sided limits retain their direction;
  parameter-dependent discontinuities and unsupported branch cuts remain
  symbolic. For example, `lim_{x→a⁺} 1/(x−a)` is `+∞`.
- Derivatives of blocks with pure local assignments now evaluate:
  `D(Block(k ≔ 2; kx²), x)` is `4x`.
- Lazy collections with unknown lengths support more positional reads and
  reductions: `Last(FlatMap([1, 2, 3], x ↦ [x, x]))` is `3`. Incomplete
  collections remain symbolic rather than returning partial results, and
  operations requiring all elements respect `maxCollectionSize`.
- Filtering and deduplication use evaluated elements: with `x := 5`,
  `Dedup([x, 5])` is `[5]`. Sorting rejects comparators that cannot accept every
  element. Operations on restricted collections preserve their conditions.
- `Tabulate` with a non-positive dimension and ascending `Table` ranges with no
  elements return `[]`: `Table(k², {k, 2, 0})` is `[]`. Use an explicit negative
  step to count down.
- Large `Permutations`, `Combinations` and `PowerSet` no longer overflow the
  stack or stop early. Permutations and combinations support direct indexing,
  membership and position queries without enumerating every element.
- Quantity LaTeX round trips preserve symbolic magnitudes, fractional unit
  powers, compound units and non-ASCII names such as `µm`, `Å` and `Ω`. Exact
  magnitudes use siunitx, for example `\qty[parse-numbers=false]{2\sqrt{2}}{m}`;
  unsupported unit notation uses `Quantity(...)`. Temperature conversion gives
  `20 °C = 68 °F` accurately.
- LaTeX round trips preserve derivatives, range steps, blocks, products after
  sums or limits, and `If` without an else branch. Small negative numbers and
  unit exponents print correctly, including with `prettify: false` (Tycho rows
  387–390 and 393–395).
- Corrected result types for nested list broadcasting, absent points, logical
  operations, float arithmetic, poles and zero-length collections. Invalid point
  products and divisions consistently report errors.
- Compiled assignments preserve caller inputs and the caller's `vars` object.
  Python and shader targets handle more blocks, chained assignments and
  conditionals; unsupported forms decline compilation instead of producing
  invalid code. Python also handles Unicode name collisions and real sum bounds.
- Python supports `Sum` and `Product` bodies containing statements in supported
  statement positions. WGSL supports assignment branches used as statements.
- Compiled functions validate argument counts and preserve absent values during
  interpreter fallback. Interval results consistently use
  `{ kind: 'interval', value: { lo, hi } }` or `{ kind: 'empty' }`; conditionals
  report `partial` when some inputs have no value and respect branch domains
  (Tycho row 392).
- Shader trigonometry is more accurate with large constant offsets. Supported
  GLSL sine hashes have improved accuracy within the reported `float32Bounds`;
  inputs outside those bounds give NaN. Other sensitive `Mod`/`Fract`
  expressions report `float32-unsafe-argument` warnings. `compileFunction()` and
  `compileShader()` return code without this metadata (Tycho rows 382 and 384).
- Asynchronous evaluation preserves conditions, awaits operators with only async
  handlers, and isolates concurrent call and block state. Function redefinitions
  update dependent expressions consistently.
- Epsil handles recursive callbacks, standalone `do` scopes and lists containing
  errors without host exceptions. Unbounded recursion reports the engine's
  recursion limit consistently.
- Operator extensions correctly apply changes to associativity, commutativity
  and effects. Removing commutativity preserves canonical operand order.
- Compiled `Floor`, `Ceil`, `Round`, `Truncate`, `Fract`, `Mod`, `Sign`,
  `Heaviside` and comparisons of an exact constant give the interpreter's value,
  also with `constantFold: false`: `Floor((25! − 1)/24!)` compiled to `25` and
  now gives `24`. A rounding function of an integer variable that cannot be
  rewritten, such as `Floor(k·π)`, declines compilation.
- An assignment used as an operand compiles correctly: `(t ≔ 1) + 2` compiled to
  `t = 1 + 2`, which assigned 3. JavaScript and GLSL write `(t = 1) + 2`; Python
  and WGSL decline.
- Sums and products with more than about 120,000 operands no longer throw,
  `NotGreater` evaluates, `Map` accepts `Subtract`, `Negate`, `Multiply` and
  `Divide` over points, and `-3\,\mathrm{m}` parses as the quantity `−3 m`.

### Performance

- Faster construction of large sets, matching of large sums, and compilation of
  expressions with shared subexpressions.
- Faster numeric evaluation of lazy maps and long sums, with repeated work
  reused in compiled functions. A 6,000-term numeric sum inside a mapped `Sin`
  takes about 60 ms instead of 5.6 s.
- Faster high precision incomplete gamma and beta evaluation; for example,
  `Gamma(10⁴, 10001)` at 524 digits takes about 36 ms instead of 4 s.

## 0.156.0 _2026-10-17_

### Issues Resolved

- User functions preserve exact arguments for rounding and comparisons under
  `.N()`: a function applying `Floor` to `(25! − 1)/24!` returns `24`.
- Lazy `Map` and `Filter` evaluate impure list elements correctly. Numeric
  rounding functions also preserve exact surviving elements when a list drops an
  element that evaluates to `Nothing`.
- `Range` membership and integer-grid `Linspace` samples remain exact beyond the
  safe integer range.
- Inverse trigonometric functions near complex branch points and `HurwitzZeta`
  with severe cancellation remain symbolic when machine precision cannot produce
  a reliable answer.
- Corrected types for arithmetic on unions of numbers, points and lists,
  coordinate accessors, and parameters inferred from index reads.
- Float half powers retain their float spelling in text output: `2^0.5` prints
  as `2^(0.5)`.
- Declarations inside blocks correctly update dependent expressions.

### Performance

- Faster repeated evaluation of symbolic function results and lazy broadcasts.

## 0.155.0 _2026-10-17_

### New Features

- `ce.undeclare(name)` removes a value or function binding from the current
  scope, including functions defined by multiple clauses.
- `ce.tolerance = "auto"` makes tolerance follow the working precision. An
  explicitly numeric tolerance now survives precision changes
  ([#449](https://github.com/cortex-js/compute-engine/issues/449)).
- A new broadcast exemption, `'surplus-operands'`, makes a call with extra
  operands one error before any broadcast. `Numerator`, `Denominator` and
  `NumeratorDenominator` use it: `Denominator(5, [])` is an error, not `[]`.

### Behavior Changes

- Numeric element-wise operations on symbols typed `any` or `value` retain types
  that allow point and collection results.
- Compiled predicates must return booleans. Invalid predicates fail compilation
  or report an error at run time instead of using truthiness.
- Compiled numeric parameters receive a NaN default for absent arguments; this
  can change the returned JavaScript function's `length` property.
- Unit names such as `m`, `s` and `K` are no longer declared in the system
  scope, and a `Quantity` no longer declares its unit names. A function defined
  in a parent scope does not see a value that a host assigns to one of these
  names in a child scope unless the parent scope declares the name first, for
  example with `ce.declare('s', 'number')`.
- `Sum(a)` and `a = [1, 2]` stay unevaluated until `a` has a value when `a` is
  declared `any`. Operator extensions can change associativity and effects. The
  type setter refuses a function signature on a constant.

### Issues Resolved

- Functions inferred from index reads accept list arguments again, including
  `p ↦ p[1] + p[2]`
  ([#448](https://github.com/cortex-js/compute-engine/issues/448)). Improved
  tuple, point, type-alias and overload handling throughout calls.
- Async user functions, including multi-clause and recursive functions, await
  their bodies and preserve arguments across overlapping calls. Materializing
  async maps evaluates their elements asynchronously.
- Lazy views evaluate their sources once; folds that build lazy accumulators no
  longer become exponentially slower
  ([#444](https://github.com/cortex-js/compute-engine/issues/444)).
- Quantity arithmetic preserves symbols and exact roots: `3 m · x` is
  `Quantity(3x, m)`, and `sqrt(2 m²)` is `√2 m`. Repeated unit factors combine
  into powers.
- Corrected float division, powers and result types. `Sqrt(-13)/3` gives
  `(√13/3)i` instead of `NaN`, and `DivisorSigma(1, -12)` is `28`
  ([#446](https://github.com/cortex-js/compute-engine/issues/446), contributed
  by [enumeratio](https://github.com/enumeratio);
  [#449](https://github.com/cortex-js/compute-engine/issues/449)).
- Improved incomplete gamma accuracy for negative non-integer orders and small
  positive arguments. Numeric integration handles slowly converging endpoint
  singularities more accurately and detects poles in exponential denominators.
- Invalid `If` arity is reported correctly. Derivatives of unsupported blocks
  and lazy operators stay symbolic without executing their bodies.
- Sequence definitions respect scopes and constants; removed sequences no longer
  appear in `isSequence()` or `listSequences()`.
- Named and field calls follow redefinitions, parameter names and current
  bindings. Epsil static checks agree with these rules.
- Shader sums and products support complex bodies. JavaScript complex mode
  handles real powers with complex results, and compiled sum indices no longer
  collide with block locals.
- Python compiles blocks ending in assignments correctly and rejects reserved
  names. Reusing a compilation target respects current variable mappings.
- Point division by a list works in the interpreter and compiled JavaScript:
  `(1, 2)/[1, 2]` is `[(1, 2), (1/2, 1)]`.
- Collection errors include their source trace without reporting failed operands
  twice. Numerator and denominator operations report extra arguments
  ([#442](https://github.com/cortex-js/compute-engine/issues/442), contributed
  by [enumeratio](https://github.com/enumeratio)).
- Compiled JavaScript `Gamma(x, y)` computed `Γ(x)`; it now computes the upper
  incomplete gamma. The interval target declines the two-argument form
  ([#446](https://github.com/cortex-js/compute-engine/issues/446), contributed
  by [enumeratio](https://github.com/enumeratio)).
- `At` over a collection of infinite count whose handler declines a position
  stays unevaluated instead of giving `NaN`
  ([#449](https://github.com/cortex-js/compute-engine/issues/449)).
- LaTeX derivatives with a symbolic order parse as `D(f, {x, n})`:
  `\partial_x^{n} f` was read as a first derivative. `\partial_x` takes the
  expression that follows it: `\partial_x f + g` is `D(f + g, x)`.

### Performance

- Faster repeated evaluation of symbolic values and nested user functions.

## 0.154.0 _2026-10-15_

### New Features

- `LatexSyntax.dictionary` returns the entries of an instance.

### Behavior Changes

- A tuple with only absent coordinates evaluates to `Missing`.
- Functions that consume whole collections keep list arguments whole even
  through arithmetic or local aliases: with `h(xs) := mean(xs^2)`,
  `h([1, 2, 3])` is `14/3`.
- Measurements propagate uncertainty through more numeric functions and
  statistics. Sorting, extrema and clamping compare their nominal values.
- Matrix operations preserve float results when any entry is a float. Exact
  integer powers are matrix powers; float powers are element-wise:
  `[[1,2],[3,4]]^2.0` is `[[1,4],[9,16]]` with float entries.
- Float exponents retain their inexact meaning in simplification and polynomial
  operations; `0 / 2.5` is `0.0`.
- Function results are checked against their declared result types.
- `Append` and `Join` over a source whose type does not fix its kind are typed
  `collection<T>`, not `list`: with `a` declared `any`, `Append(a, 1)` is typed
  `collection<any>`.
- Comparisons with a `Measurement` use its nominal value:
  `Less(Measurement(0.7468, 0.001), 1)` is `True`. `Floor`, `Ceil`, `Round`,
  `Truncate` and `Mod` of a measurement return the bare result for its nominal:
  `Floor(Measurement(0.7468, 0.001))` is `0`.
- `ce.declare()` throws `The symbol "Sq" is already declared in this scope` when
  `Sq` is an operator declared earlier without a `signature` (the second
  declaration replaced the first). To change an existing definition, use
  `ce.declare(name, patch, { extend: true })`.
- The `add` and `mul` rational helpers exported by
  `@cortex-js/compute-engine/numerics` return `[±Infinity, 1]` for an infinite
  operand times a finite non-zero one (they returned `[NaN, 1]`). `pow` of an
  infinite base follows IEEE 754 (it threw a `RangeError`).
- In Epsil, a bare `name -> value` call argument is a rule in every position:
  `f(GridLines -> [10, 10])` round-trips. `map(x -> x^2, xs)` reports
  `mapsto-arrow-expected`, with a fixit that replaces `->` by `=>`
  ([#435](https://github.com/cortex-js/compute-engine/issues/435)).

### Issues Resolved

- Definite integrals preserve convergence conditions, detect interior and
  endpoint divergences more reliably, and evaluate more absolute-value and
  piecewise integrands exactly: `∫₀^{2π} |sin x| dx` is `4` (contributed by
  [KingArth0r](https://github.com/KingArth0r)).
- Symbolic integration respects angular units: in degree mode,
  `∫₀^{180} sin x dx` is `360/π`.
- Numeric integration handles near-divergent but convergent powers correctly;
  `∫₀¹ x^{-0.9999} dx` is `10000`. Limits compare exponential and algebraic
  growth correctly: `lim_{t→∞} t/e^{√t}` is `0`.
- Complex special functions select the correct branch, including
  `LerchPhi(0, 1/3, -8)`. `Argument` supports the requested numeric precision,
  and compiled `Gamma` handles complex arguments
  ([#428](https://github.com/cortex-js/compute-engine/issues/428),
  [#439](https://github.com/cortex-js/compute-engine/issues/439), contributed by
  [enumeratio](https://github.com/enumeratio)).
- Matrix powers follow later assignments of matrix values, preserve matrix
  shapes, and reject non-square matrices. Empty axes remain in shape types:
  `[[], []]` has a 2×0 matrix type.
- Function calls and named arguments follow redefinitions and updated parameter
  names. Indexed parameters infer each coordinate separately, and async sums
  preserve the index captured by callbacks.
- Lazy collection operations evaluate computed sources correctly. Nested maps
  and folds preserve accumulator values
  ([#438](https://github.com/cortex-js/compute-engine/issues/438)).
- Epsil reports errors inside pipe stages, with diagnostics on the relevant
  argument. Serialized rules preserve library names.
- Custom LaTeX notation applies inside rewrite rules. Delimiter groups and
  sequences round-trip correctly, and logarithms stop before an integral's
  differential. Kronecker delta indices accept spacing and commas.
- Shader loops follow positive and negative range steps. Compiled calls check
  parameter types, and compilation metadata describes the emitted numeric mode.
- Numeric infinities, sequence validation and operator redeclarations report
  consistent results and errors. Simplifying an unbounded recursive call keeps
  it symbolic.
- Compiled `HurwitzZeta`, `LerchPhi`, `PolyLog`, `EllipticK`, the complete
  `EllipticE`, `Hypergeometric2F1` and `LambertW` return complex values in
  `auto` and `complex` mode, where they returned `NaN`: compiled
  `LerchPhi(3, 2, 1)` is `0.7734 - 1.1505i`. The GLSL and WGSL targets decline a
  provably complex value
  ([#434](https://github.com/cortex-js/compute-engine/issues/434), contributed
  by [enumeratio](https://github.com/enumeratio)).
- `Transpose` of an operand with no known shape is typed `unknown`, so
  `MatrixMultiply(q, Transpose(q))` with a free `q` stays unevaluated instead of
  returning an `incompatible-type` error
  ([#439](https://github.com/cortex-js/compute-engine/issues/439), contributed
  by [enumeratio](https://github.com/enumeratio)).

### Performance

- Faster arithmetic with complex factors and type queries for very large integer
  literals ([#431](https://github.com/cortex-js/compute-engine/issues/431),
  contributed by [enumeratio](https://github.com/enumeratio)).

## 0.153.0 _2026-10-13_

### New Features

- A host that replaces the `At` lowering on the `javascript` target can read a
  list through a boolean mask with the runtime helper `_SYS.atMask(base, mask)`.
  Any other index is read by `_SYS.atNoWrap`.

### Behavior Changes

- Compiled JavaScript `run()` expects inputs in the declared shape and returns
  results that callers must treat as read-only. Pass plain arrays; convert typed
  arrays once with `Array.from()`. Keep entries numeric for real list inputs,
  and copy returned arrays or complex objects before modifying them.
- `simplify()` folds pure constant subexpressions whose evaluation gives a
  numeric literal, with default rules, custom rules or `rules: null`. Exact
  symbolic values such as `Ln(2)` stay symbolic. Numeric relations simplify to
  truth values: `(3 < 4).simplify()` is `True`
  ([#306](https://github.com/cortex-js/compute-engine/issues/306)).
- `Gamma(n)` evaluates exactly for positive integers: `Gamma(4)` is `6`
  ([#429](https://github.com/cortex-js/compute-engine/issues/429)).
- Numeric evaluation reaches single-statement user-function bodies directly.
- `code` of compiled JavaScript reads a constant list of three or more finite
  real numbers from a `_lit_<n>` local defined in `preamble`. A host that
  evaluates `code` without `run()` must include `preamble` (or `preambleOnce`
  once and `preamblePerCall` on every call). A `compile` hook must treat an
  array operand as read-only.
- `CompilationResult.entryPlan` no longer has the per-entry checks (`entries`).
  A runtime that loads an older stored plan ignores the field.
- The `.pow()` method evaluates the root it builds from two number literals:
  `ce.number(-8).pow(ce.number([1, 3]))` is `-2`, not `Root(-8, 3)`
  ([#430](https://github.com/cortex-js/compute-engine/issues/430)).

### Issues Resolved

- Wallis-like products with symbolic bounds evaluate to closed forms:
  `∏_{k=2}^{n} (1 − 1/k²)` is `(n+1)/(2n)`.
- Roots evaluate in one pass with list exponents or assigned fractional
  exponents: `(-8)^{[1/3, 5]}` is `[-2, -32768]`
  ([#430](https://github.com/cortex-js/compute-engine/issues/430)).
- Async `N(x, p)` and numeric accuracy goals yield and honor cancellation
  ([#392](https://github.com/cortex-js/compute-engine/issues/392)).
- Higher-order maps use the callback passed as an argument under `.N()`.
  Functions reading stored random expressions retain independent draws.
- Calls with list arguments have result types derived from their bodies,
  including parameters passed through unchanged (Tycho row 373).

### Performance

- Constant lists and matrices in compiled JavaScript are reused across calls.

## 0.152.0 _2026-10-11_

### New Features

- An operator definition can set `evaluatesOperands: true` when its handler
  evaluates every held operand and reads nothing else of them. Under
  `evaluateAsync`, the operands are then awaited in order and the handler runs
  on the values.

### Behavior Changes

- Provably divergent series evaluate to signed infinity: `Σ_{n=1}^{∞} 1/n` is
  `+∞`. Comparisons with infinity remain undecided when the other operand is not
  known to be finite
  ([#326](https://github.com/cortex-js/compute-engine/issues/326)).
- `Reduce(…).N()` respects the engine's working precision.
- An engine constructed with `precision: 'machine'` keeps the faster
  double-precision fold for `Reduce(…).N()`.

### Issues Resolved

- Infinite telescoping sums and Wallis products evaluate and simplify correctly:
  `Σ_{k=1}^{∞} 1/(k(k+1))` is `1`, and `2∏_{n=1}^{∞} 4n²/(4n²−1)` is `π`
  ([#323](https://github.com/cortex-js/compute-engine/issues/323), reported by
  [314systems](https://github.com/314systems)).
- Equivalent spellings of sum and product bodies produce the same closed forms.
- Empty folds and reductions evaluate their initial value. Numeric reductions
  evaluate elements such as `Ln(2)` before combining them
  ([#425](https://github.com/cortex-js/compute-engine/issues/425), reported by
  [enumeratio](https://github.com/enumeratio)).
- Compiled folds support accumulators indexed by their own elements
  ([#425](https://github.com/cortex-js/compute-engine/issues/425), reported by
  [enumeratio](https://github.com/enumeratio)).
- Async evaluation yields and honors cancellation inside relations, user
  functions and more lazy operators
  ([#392](https://github.com/cortex-js/compute-engine/issues/392), contributed
  by [enumeratio](https://github.com/enumeratio)).

## 0.151.0 _2026-10-08_

### Behavior Changes

- Lists and tuples evaluate finite lazy elements while preserving nesting:
  `[map(x => x + 1, [1, 2])]` remains `[[2, 3]]`, including when materialized.
- Integer operations preserve exact integer arguments under `.N()`:
  `DigitSum(2^1000).N()` is `1366`.
- `Mod` of exact radicals remains exact: `Mod(√2, 1)` is `√2 − 1`.

### Issues Resolved

- `GCD` and `LCM` return exact results for large integers: `GCD(2^100, 2^50)` is
  `2^50`.
- Mapping lambdas preserves errors and absent values consistently with named
  callbacks. Mapping a list of functions applies each function correctly.
- Substitution reaches dictionary values, and dictionaries containing functions
  round-trip through LaTeX.
- Parse diagnostics have correct spans after Unicode scripts. Missing scripts
  retain their bases; Greek names, spaced subscripts and script ordering parse
  consistently.
- Loops with symbolic range bounds compile, and literal bounds give indices
  ranged types. Functions declared to return real values use real arithmetic.
- `If` result types retain unknown branches. Errors caused by incorrectly shaped
  compiled inputs identify the binding.

### Performance

- Faster interval evaluation of constant subexpressions inside user functions.

## 0.150.0 _2026-10-08_

### New Features

- New `ce.withEvaluationContext(options, fn)`, for the synchronous work that an
  `evaluateAsync` handler does after an `await`:
  `ce.withEvaluationContext(options, () => x.canonical).evaluateAsync(options)`.

### Behavior Changes

- `Solve` returns every complex polynomial root when no domain is specified, or
  when solving over the complex numbers. Supported closed forms remain exact:
  `x³ − 2x + 1 = 0` gives `[1, (-1 + √5)/2, (-1 − √5)/2]`.
- Compiled integer operations reject values outside the safe integer range
  instead of returning rounded answers. Compiled collection parameters reject
  unsupported string inputs.
- Shader targets reject constant collections with more than 256 elements.
- List literals with lazy spreads evaluate to ordinary lists.
- Synchronous work that an `evaluateAsync` handler does after its first `await`
  (`ce.box()`, `ce.parse()`, `evaluate()`, canonicalizing a held operand) sees
  the global scope, not the index of an enclosing `Sum`. Run it inside
  `ce.withEvaluationContext(options, fn)`.
- `DSolve` writes a complex characteristic root and its conjugate as real modes:
  `y''' - y = 0` gives `c₂·e^(-x/2)·cos(√3x/2) + c₃·e^(-x/2)·sin(√3x/2)`.
- In the lenient grammar, `√2 √3` and `√2 ∞` report `ambiguous-radical` (Tycho
  row 367).
- A shader target declines a constant collection of more than 256 elements with
  the diagnostic code `inline-collection-too-large`, whose message names the
  element count and the limit (Tycho row 368).

### Issues Resolved

- Concurrent async evaluations keep separate scopes, and async handlers resume
  in the correct scope. `N`, arithmetic, `Evaluate` and `ReleaseHold` yield and
  await async-only operations
  ([#392](https://github.com/cortex-js/compute-engine/issues/392)).
- Recursive functions accept whole collection arguments, lazy arguments retain
  caller bindings, and callbacks over named functions retain computed elements.
- Exact `Range` elements remain distinct beyond 2^53. `Append` permits forward
  indexing into an infinite source
  ([#422](https://github.com/cortex-js/compute-engine/issues/422)).
- Seeded random collections retain their seed inside dictionaries, and spreading
  a map over a set runs its callback once per element.
- Improved contour and residue integration with float bounds, affine circle
  notation, exact complex poles and trigonometric multiple angles. Poles inside
  infinite integration intervals no longer produce finite answers.
- Contour integrals respect user functions that shadow library names and detect
  nearby singularities exactly.
- `Series(Zeta(s), s, 1, n)` returns the requested Laurent expansion using
  Stieltjes constants. `EllipticPi` supports more complex arguments
  ([#421](https://github.com/cortex-js/compute-engine/issues/421),
  [#422](https://github.com/cortex-js/compute-engine/issues/422)).
- Improved types for odd real roots, `Zip`, `Repeat`, and collections whose
  elements may be absent.

### Performance

- Numeric sums and products scale better with many terms. Constant numeric lists
  are cheaper to compile for interval evaluation.

## 0.149.0 _2026-10-07_

### Breaking Changes

- **`Round(x, step)` now rounds to a multiple of `step`.** `Round(226, 10)` is
  `230`; `Round(3.14159, 2)` is now `4`. To round to two decimal places, use
  `Round(3.14159, 1/100)` for exact `157/50`, or `Round(3.14159, 0.01)` for
  float `3.14`. Translate decimal-place arguments from other tools accordingly
  ([#417](https://github.com/cortex-js/compute-engine/issues/417)).
- **Negative `Take` and `Drop` counts work from the end.**
  `Take([1, 2, 3, 4, 5], -2)` is `[4, 5]`, and `Drop(..., -2)` is `[1, 2, 3]`.
  Strings behave similarly: `Take("hello", -2)` is `"lo"`. Negative counts over
  infinite or unknown-length sources remain unevaluated
  ([#414](https://github.com/cortex-js/compute-engine/issues/414), reported by
  [enumeratio](https://github.com/enumeratio)).
- **`expr.count` can return a `bigint`.** Its type is now
  `number | bigint | undefined`; large finite counts use `bigint`, while
  infinite counts use `Infinity`. Check the type before arithmetic with a
  JavaScript number. For example, `Count(Range(1, 10^20 + 1))` is exactly
  `100000000000000000001`. Indexing from the end of collections with bigint
  counts is not yet supported
  ([#416](https://github.com/cortex-js/compute-engine/issues/416), reported by
  [enumeratio](https://github.com/enumeratio)).
- **Public complex types now use `complex.js` 2.4.** Update imports of the
  `Complex` class from `complex-esm` to `complex.js`.

### New Features

- `ce.roundingTies` selects the tie rule for `Round`: `"away-from-zero"`
  (default), `"to-even"`, `"toward-zero"`, `"toward-positive-infinity"`, or
  `"toward-negative-infinity"`. Compiled functions retain the rule selected at
  compilation. `Remainder` keeps its existing tie rule
  ([#417](https://github.com/cortex-js/compute-engine/issues/417), requested by
  [enumeratio](https://github.com/enumeratio)).
- `Floor`, `Ceil` and `Truncate` accept a step: `Floor(226, 10)` is `220`,
  `Ceil(226, 10)` is `230`, and `Truncate(-226, 10)` is `-220`. Exact steps give
  exact results; float steps give floats
  ([#417](https://github.com/cortex-js/compute-engine/issues/417), requested by
  [enumeratio](https://github.com/enumeratio)).
- Definite integration supports more piecewise functions, including `If`,
  `Which`, extrema and rounding functions: `∫₋₁¹ max(x, 0) dx` is `1/2`, and
  `∫₀³ floor(x) dx` is `3`
  ([#413](https://github.com/cortex-js/compute-engine/pull/413), contributed by
  [KingArth0r](https://github.com/KingArth0r)).
- A `count` collection handler can return a `bigint` for any count; `expr.count`
  converts a safe integer to a `number`
  ([#416](https://github.com/cortex-js/compute-engine/issues/416)).

### Behavior Changes

- Running an Epsil program with `executeEpsil` or the `epsil` command removes
  the engine's default iteration limit, so a loop runs until it ends. The engine
  then keeps no limit for later evaluations, Epsil or not. To keep a bound,
  assign `ce.iterationLimit` before running a program.
- The branch `k` of `LambertW(z, k)` must be an integer: `LambertW(-1, -0.1)` is
  an `incompatible-type` error. The branch can be named:
  `lambertW(-0.1, branch: -1)` in Epsil, or
  `["LambertW", -0.1, ["NamedArgument", "'branch'", -1]]` in MathJSON
  ([#418](https://github.com/cortex-js/compute-engine/issues/418), reported by
  [enumeratio](https://github.com/enumeratio)).
- `simplify()` combines powers with the same base in a product, as it does in a
  quotient: `x^a·x^b` is `x^(a+b)`. `evaluate()` is unchanged
  ([#415](https://github.com/cortex-js/compute-engine/issues/415), reported by
  [enumeratio](https://github.com/enumeratio)).
- String operators accept a `character` wherever they accept a string:
  `ToUpperCase(s[1])` is no longer a type error. A symbol with no declared type
  used at such a parameter is inferred `character | string`, not `string`.
- When the operand types do not select one signature of an overloaded operator,
  the result type is the union of the possible results: with `s` of unknown
  type, `Slice(s, 1, 2)` is typed `list | string`, not `list`.
- Effect inference is more precise. A local that nested functions only read
  needs no `scope` effect, a function has the effects of its `let` values
  (`let x = Random()` makes it `random`), and a dictionary has the effects of
  its values (`{"a" -> Random()}` is `random`, not pure).

### Issues Resolved

- Exact range counts, extrema and statistics no longer depend on rounded bounds.
  Large range statistics avoid enumeration: `Sum(Range(1, 10^20))` can return
  its exact closed form.
- `Take` and `Drop` clamp very large or infinite counts to a finite source's
  length. Collection queries stay symbolic when elements cannot be determined.
- Improved numeric stability for very small or large norms and complex values:
  `Norm([3e-200, 4e-200])` is `5e-200` at machine precision.
- Float division avoids an extra rounding: `0.3/0.3` is `1`. Compiled rounding
  of large integers and `Remainder` ties agrees with the interpreter.
- Exact list sums and differences, irrational integration bounds and
  determinants retain exact values: `[√2, 2] + [1, 1]` is `[1 + √2, 3]`. Matrix
  power rules no longer combine element-wise and matrix operations
  ([#415](https://github.com/cortex-js/compute-engine/issues/415)).
- Polynomial operators read assigned values. Type inference narrows unions
  correctly and no longer mistakes collection parameters for matrices.
- Improved `PolyLog` and `LerchPhi` at large orders and arguments; unsupported
  cases remain symbolic instead of returning inaccurate values
  ([#412](https://github.com/cortex-js/compute-engine/issues/412), reported by
  [enumeratio](https://github.com/enumeratio)).
- LaTeX preserves parentheses around primed expressions, recognizes Unicode
  number-set letters, and accepts spaces before postfix operators. Epsil reports
  `->` used in place of a lambda's `=>`
  ([#420](https://github.com/cortex-js/compute-engine/issues/420), reported by
  [enumeratio](https://github.com/enumeratio)).
- Lenient parsing reports `ambiguous-radical` for `√2 x` (Tycho row 366).
  `\mathbb{Z}^-` and `\mathbb{R}^-` name `NegativeIntegers` and
  `NegativeNumbers`.

## 0.148.0 _2026-10-05_

### New Features

- `N(x, [p, a])` accepts significant-digit and absolute-accuracy goals, stopping
  when either is met. Use `PositiveInfinity` to disable one goal:
  `N([π, 1000π], [PositiveInfinity, 3])` is `[3.142, 3141.593]`. The engine's
  precision is preserved; results remain symbolic if a goal cannot be met
  ([#391](https://github.com/cortex-js/compute-engine/issues/391)).
- Compiled JavaScript can run without a Compute Engine instance. Import
  `createJavaScriptRuntime` from `@cortex-js/compute-engine/runtime` and use
  `runtime.load(result)` to load a compilation artifact. Runtime versions must
  match. Functions supplied as source cannot retain enclosing closures
  ([#372](https://github.com/cortex-js/compute-engine/issues/372), contributed
  by [enumeratio](https://github.com/enumeratio)).
- `ResidueClass(k, n)` represents modular values: `ResidueClass(7, 5)` is
  `ResidueClass(2, 5)`, and `1/ResidueClass(3, 7)` is `ResidueClass(5, 7)`.
  Arithmetic requires compatible moduli and invertible divisors.
  `QuotientRing(Integers, n)` now contains residue classes rather than integers
  ([#399](https://github.com/cortex-js/compute-engine/issues/399),
  [#411](https://github.com/cortex-js/compute-engine/issues/411), contributed by
  [enumeratio](https://github.com/enumeratio)).
- Contour integration supports circles, rectangles and simple polygons through
  `ce.contourIntegrate()`, `ContourIntegrate`, and LaTeX `\oint` notation.
  Reports include poles, residues and the integral. A pole on the contour gives
  `Indeterminate`; unsupported cases remain symbolic
  ([#410](https://github.com/cortex-js/compute-engine/pull/410)).
- More real integrals evaluate exactly using residues: `∫_{−∞}^{∞} sin(x)/x dx`
  is `π`, and `∫₀^{2π} dx/(2 + cos x)` is `2π/√3`. Principal values must be
  requested explicitly with `RealLineContour(True)`.
- Complex numeric evaluation now covers Bessel and Airy functions, `Sinc`,
  Fresnel functions, and every integer branch of `LambertW`. Error functions and
  trigonometric integrals also support imaginary-axis arguments.
- `CompilationResult` has the new fields `runtimeVersion`, `preambleOnce`,
  `preamblePerCall`, `callCode`, `entryPlan` and `reconstructionDigits`.
  `createJavaScriptRuntime()` accepts the options `random`, `frame`,
  `iterationLimit` and `deadline`. With `random: null`, a draw throws a
  `CapabilityDeniedError`; test `e.name`, not `instanceof`
  ([#372](https://github.com/cortex-js/compute-engine/issues/372)).

### Behavior Changes

- Absolute-value bars on a set or string give its size: `|{1, 2}|` is `2`.
- `Solve` returns a list only when it can establish completeness. Otherwise it
  stays unevaluated, and `expr.solve()` returns `null`. Unsupported computed
  collections are type errors rather than empty solution lists.
- `N` consistently returns inexact numbers, preserves `ce.precision`, and rounds
  collection elements: `N([1/3, Pi], 4)` is `[0.3333, 3.142]`
  ([#391](https://github.com/cortex-js/compute-engine/issues/391),
  [#409](https://github.com/cortex-js/compute-engine/issues/409)).
- Numeric operations reject set operands rather than pairing them by position.
  Scalar function parameters broadcast over tuple components:
  `Apply((u: real) ↦ 2u, (a, b))` is `(2a, 2b)`.
- Calls awaiting a list's value remain symbolic until it is known, preserving
  future broadcasting. Invalid scalar arguments give consistent type errors.
- `Argument`/`Arg` returns angles in the engine's angular unit.
- Lenient parsing reads `√12` as `√(12)`, multi-digit subscripts as whole
  subscripts, and `sin^{-1}(x)` as `arcsin(x)`. It adds ambiguity diagnostics
  for inputs with another common interpretation.
- The default time limit for `loadIntegrationRules()` is now 120 seconds.
- `evaluate()` returns a sequence term that is exact but not a number literal:
  for `B_n = π·B_{n−1}/n` with `B_0 = 1`, `B_10` is `π^10/10!`; it stayed
  unevaluated. `ce.getSequenceTerms()` returns such terms, and
  `ce.getSequenceCache()` holds only exact terms.
- When the unknown has no declared type and no domain is given, `Solve` gives
  all roots of a polynomial, complex roots included (`x^2 + 1 = 0` is
  `[i, −i]`), and only the real solutions of other equations. A parameter of the
  equation with no declared type is real.
- `N(Measurement(v, δ), p)` keeps the uncertainty and rounds `v`, so
  `N(Integrate(…), p)` is a `Measurement`.
- `Derivative(f)` is a function literal also when its closed form holds the
  derivative of another function: with `h(x) := g(x)·x`, `Derivative(h)` is
  `(x) ↦ x·Apply(Derivative(g, 1), x) + g(x)`.

### Issues Resolved

- Dictionaries and strings containing special characters round-trip through
  LaTeX and MathJSON. Fractions, negative terms, derivatives and compound powers
  serialize with the grouping needed to preserve their meaning
  ([#345](https://github.com/cortex-js/compute-engine/issues/345)).
- Lenient parsing preserves digits, Greek names, function subscripts and script
  order. Epsil accepts `f(x) := body` as a function definition
  ([#400](https://github.com/cortex-js/compute-engine/issues/400), contributed
  by [enumeratio](https://github.com/enumeratio)).
- `Solve` respects bounded domains and angular units, solves more systems and
  avoids incomplete root lists. Lambert W templates retain only real roots where
  real solutions are required.
- Improved real and complex special-function accuracy, including Bessel,
  Fresnel, error and integral functions. `LambertW(-1/e)` and
  `LambertW(-1/e, -1)` are exactly `-1`.
- Limits at infinity respect complex values and unknown coefficient signs;
  `NLimit` at `−∞` samples negative arguments. Divergent integrals and numeric
  error estimates are handled more reliably
  ([#396](https://github.com/cortex-js/compute-engine/issues/396),
  [#405](https://github.com/cortex-js/compute-engine/issues/405)).
- Lazy collections retain local bindings and update when sequence dependencies
  change. Unavailable elements no longer make finite collections appear empty.
- Point norms validate component lengths, handle empty point lists and compile
  on more targets. Function literals and named calls enforce parameter types
  consistently.
- Added symbolic derivatives for `Arctan2` and more multi-argument functions;
  partial derivatives compile and evaluate more efficiently.
- Simplification preserves list shape, respects user replacements of library
  functions, and applies angular identities only in radians. Integration also
  respects user function definitions and avoids unbounded searches.
- Shader compilation supports function primes, fixed-length maps, vector squares
  and more applied derivatives.
- A memoized sequence term is computed again when a symbol that its recurrence
  reads changes. A first read of a large index no longer overflows the call
  stack: `F_2000` of the Fibonacci recurrence gives its 418 digits.
- `Arcosh(0)` and `Arcoth(0)` evaluate to `iπ/2`, and `EllipticK(0)` and
  `EllipticE(0)` to `π/2`. A sum whose radical-coefficient terms cancel is `0`:
  `(√2/4·x).sub(√2/4·x)` was `0·x`
  ([#409](https://github.com/cortex-js/compute-engine/issues/409)).
- `Count` of set operations is correct:
  `Count(SymmetricDifference({1, 2, 3}, {2, 3, 4}))` is `2`; it was `1`.
- With a user value of `Pi`, `evaluate()` no longer uses the library π: with
  `Pi` equal to `3`, `sin(π)` is `sin(3)`; it was `0`.
- `D(f(x), f)` stays symbolic; it was `0`.
- A product whose LaTeX ends with a symbol keeps a `\times` before a
  parenthesized factor: `2v\times(x+1)`. The form `2v(x+1)` read back as a call
  of `v`.
- Compiled JavaScript calls the current value of a block-local function that is
  assigned again: `let h = (k) => k + 1; h := (k) => k + 2; h(3)` gives `5`, as
  in the interpreter. It gave `4`.

## 0.147.0 _2026-10-02_

### New Features

- Added Wolfram Language aliases `EulerPhi`, `PartitionsP` and `Det`.
- Lenient parsing reports more ambiguous notation, including inverse functions,
  primes and scripts.

### Behavior Changes

- `Totient` and `NPartition` evaluate at zero and negative integers.
- Exact non-integer factorials remain symbolic under `evaluate()`; `.N()`
  follows the working precision and supports factorials beyond float64 range.
- Host complex values with integer parts are exact; computed complex floats
  retain their inexactness, including very small components.
- `Arctan` and `Arccot` use branch-cut values consistent with odd symmetry:
  `Arctan(-2i)` is approximately `−π/2 − 0.549i`.
- Lenient parsing gives `**` the same precedence as `^`: `-x**2` is `-(x²)`.
  Chains containing only `**` still associate from the right.
- An exact complex number divided by an exact number is one exact complex
  literal: `i/3` is `["Complex", 0, ["Rational", 1, 3]]`, and `2/i` is `-2i`.
- Numeric routines return floats also when the value is an integer:
  `NIntegrate(1, 0, 2)` is `2.0`, not `2`. This also applies to `NLimit`, `ND`,
  `NDSolve`, `FindFit` and `FindRoot`.
- The rational eigenvalues of an exact matrix larger than 3×3 are exact, and
  `Eigenvectors` then gives exact vectors.

### Issues Resolved

- Exact multiples of π reduce correctly under `.N()` and in compiled code.
  Compiled negative-base powers agree with the interpreter's real-root rules.
- Improved complex `Gamma`, `Factorial`, `BarnesG` and inverse trigonometric
  evaluation beyond the double range. Branch cuts, small imaginary parts and
  high precision complex results are preserved.
- Compiled JavaScript retains small complex components and consistently
  represents complex infinity. Compiled `StieltjesGamma` is accurate through
  order 30.
- Numeric functions evaluate random operands once. NaN components propagate
  correctly through complex results.
- Lenient parsing handles spaces and duplicate superscripts consistently; primed
  function names and factorials serialize with correct grouping.

## 0.146.0 _2026-10-02_

### New Features

- Added modular roots and reconstruction: `PowerModList(3, 1/2, 11)` is
  `[5, 6]`, `PowerMod(4, 1/2, 7)` is `2`, and `RationalReconstruction(6, 11)` is
  `1/2`. Also added `PrimitiveRootList` and a target-list form of
  `MultiplicativeOrder`.
- Added `DirichletEta`, `DirichletBeta`, `DirichletCharacter` and `DirichletL`:
  `DirichletEta(1)` is `ln 2`, `DirichletBeta(1)` is `π/4`, and
  `DirichletCharacter(5, 2, 2)` is `i`.
- Added generalized Stieltjes constants: `StieltjesGamma(0)` is `EulerGamma`;
  `StieltjesGamma(n, a)` supports orders through 30.
- Added `LogGamma`, `BarnesG` and `LogBarnesG`. `LogGamma` is the analytic
  continuation of log gamma, with branch values distinct from `GammaLn`.
  `BarnesG(5)` is exactly `12`; `PolyGamma(-1, z)` is `LogGamma(z)`.
- Added `ClausenCl(n, θ)`: `ClausenCl(2, π/2)` is `CatalanConstant`.
- Added `StirlingS2` as an alias for `Stirling`.

These additions were contributed by [enumeratio](https://github.com/enumeratio)
([#395](https://github.com/cortex-js/compute-engine/issues/395)).

### Behavior Changes

- Integrals, sums and products with only one bound remain unevaluated.
- Divergent definite integrals return signed infinity or `Indeterminate` when
  divergence is established. Unresolved pole locations remain symbolic.
- `NIntegrate` tries quadrature first, and constant numeric integrals can be
  folded during compilation.
- `PrimitiveRoot` and `MultiplicativeOrder` ignore the modulus sign.
- In `\sum_{k=1}` and `\prod_{k=1}`, the subscript is the lower bound, not the
  upper bound.
- A sum with a lower bound and no upper bound is no longer a sum to infinity
  under `.N()`. For an infinite sum, write the upper bound `+∞`
  (`\sum_{k=1}^{\infty}`).
- The signature of `NIntegrate` is
  `(function, lower:number, upper:number) -> number`. A `Tuple` of bounds or a
  missing bound is an error. For a multiple integral, use
  `Integrate(f, Limits(x, …), Limits(y, …)).N()`.
- Compiled Python inverse trigonometric and inverse hyperbolic functions of a
  complex argument always return a Python `complex`, also when the value is
  real.

### Issues Resolved

- Numeric integration handles endpoint singularities, moving poles, nested
  divergent integrals and reversed bounds more reliably. Slowly converging
  integrals have improved values and error estimates.
- Oscillatory semi-infinite integrals work in interpreted and compiled code:
  `∫₀^∞ sin x/x dx` is `π/2` to about 11 decimal places.
- Definite integration detects poles from assigned values, constants and
  logarithmic denominators. Flat MathJSON bounds parse consistently for
  integrals, sums and products.
- Improved inverse trigonometric and hyperbolic accuracy for large, small and
  complex arguments. Python and shader targets follow the correct branch cuts.
- `GammaLn` is more accurate near 0, 1 and 2. Compiled JavaScript preserves
  small complex results.
- `FromDigits` and `ChineseRemainder` reject non-integer elements; infinite
  input collections no longer exhaust memory. Stirling and Eulerian numbers
  outside their valid triangle return `0`.
- Redefined control operators compile as user definitions. Copies of library
  operators retain their names and supported derivatives.
- Missing arguments and invalid logarithm arity report normal expression errors.
  Restrictions with infinite condition lists no longer run out of memory.
- `∫ ln(x + 1) dx` is `(x + 1)·ln(x + 1) − x`. It was `(x + 1)·ln(x) − x + 1`,
  and `∫₀¹ ln(x + 1) dx` was `+∞`.
- Compiled Python `Arccot` of a complex argument with a negative real part is no
  longer off by `π`.

## 0.145.0 _2026-10-01_

### New Features

- Add notation after engine construction with
  `ce.latexSyntax.addEntries(entries)`
  ([#393](https://github.com/cortex-js/compute-engine/issues/393)).
- Load custom libraries with `ce.loadLibrary(library)`, and query a definition's
  library with `ce.libraryOf(name)`
  ([#393](https://github.com/cortex-js/compute-engine/issues/393)).
- Extend an operator with `ce.declare(name, patch, { extend: true })`.
  Unspecified fields are retained; `addSignature` adds an overload
  ([#394](https://github.com/cortex-js/compute-engine/issues/394)).
- Operator definitions can provide partial derivatives with the `derivative`
  key. Evaluation handlers receive a `precision` option for numeric requests
  ([#393](https://github.com/cortex-js/compute-engine/issues/393)).
- Lenient parsing reports more `ambiguous-*` diagnostics for notation such as
  `x^2y`, `sin x y`, `1..10..2` and `log(x, 2)`. Use
  `ce.parse(text, { strict: false, onAmbiguity: 'error' })` to turn ambiguous
  readings into expression errors; the default is `'report'`.
- The new `exponentialE` serialization option sets how `ExponentialE` and `Exp`
  are written. The `imaginaryUnit` option now also sets how `ImaginaryUnit` and
  complex numbers are written. The defaults are `\exponentialE` and
  `\imaginaryI`.

### Behavior Changes

- A name in parentheses is a factor: `(f)(x)` is a product.
- Lenient parsing accepts `+-` as `±` and `-+` as `∓`.
- Four diagnostic codes are renamed; update handlers that match them:
  `letter-run-split` → `ambiguous-letter-run`, `implicit-product-in-denominator`
  → `ambiguous-denominator`, `spaced-digit-groups` → `ambiguous-digit-groups`,
  and `letter-before-decimal` → `ambiguous-letter-decimal`.
- LaTeX output uses standard notation for `LCM`, `Log2`, `Log10`, number sets
  and `Degrees` ([#345](https://github.com/cortex-js/compute-engine/issues/345),
  contributed by [enumeratio](https://github.com/enumeratio)).
- A named call through a variable whose declared type gives no parameter names
  is the error `argument-names-unavailable`. For a variable declared with an
  unnamed signature, the error code was `argument-name-unknown`. Call such a
  variable with positional arguments, or declare it with a signature that names
  its parameters.
- Lenient parsing reads `mod`, `pow`, `trunc`, `Re` and `Im` before a
  parenthesis as `Mod`, `Power`, `Truncate`, `Real` and `Imaginary`: `mod(7, 3)`
  evaluates to `1`.

### Issues Resolved

- Declared symbols mapped with `vars` remain run-time inputs even when they have
  assigned values. Integrals over mapped inputs retain closed forms. To force
  numeric quadrature with a mapping, use source other than a plain read, such as
  `{ a: '(_.a)' }`.
- Python and shader targets reject reserved identifier mappings and names.
- Calls through record and dictionary fields respect declarations and named
  arguments. Caller symbols sharing parameter names retain their meaning
  ([#390](https://github.com/cortex-js/compute-engine/issues/390)).
- Custom libraries load in the requested dependency order, and standard-library
  selection includes required dependencies. Failed declarations restore the
  previous binding.
- Derivatives and compilation respect unchanged copies of library definitions
  ([#394](https://github.com/cortex-js/compute-engine/issues/394)). Minimal
  library configurations can construct function literals.
- Numeric integration uses adaptive quadrature even when an integrand cannot
  compile. Imaginary factors serialize without unnecessary parentheses.
- A prefix `\mp` or `∓` has a reading: `\mp 1` is `MinusPlus(0, 1)`. Calls whose
  arguments contain `Floor`, `Ceil`, `Round` or `Truncate` are no longer much
  slower than in 0.141.0.

## 0.144.0 _2026-10-01_

### New Features

- Lenient parsing accepts more plain-text notation: signed and compound
  exponents, full letter subscripts, `in`, `infinity`, `sign`, `sgn`, chained
  comparisons and `√(x+1)`. Optional diagnostics flag ambiguous readings.
- `About` reports examples and keywords, and lists operator attributes,
  including laziness
  ([#398](https://github.com/cortex-js/compute-engine/issues/398)).

### Behavior Changes

- `Solve` returns a free parameter for identities and remains symbolic when it
  has no justified candidate root
  ([#397](https://github.com/cortex-js/compute-engine/issues/397)).
- Exact rational `Range` bounds and steps produce exact elements
  ([#397](https://github.com/cortex-js/compute-engine/issues/397)).
- Logarithm combination and splitting require provably non-negative arguments
  ([#397](https://github.com/cortex-js/compute-engine/issues/397)).
- The `attributes` entry of `About` is a list of strings, not one string:
  `About(Add)` gives `["commutative", "associative", "idempotent", "lazy"]`. A
  program that read the entry as a string must read it as a list.

### Issues Resolved

- `Solve` handles more linear and logarithmic equations and preserves exact
  exponential roots: `Solve(eˣ = 3, x)` gives `ln(3)`.
- Derivatives respect custom library definitions and user replacements: after
  `Sinh(x) := 3x`, `D(Sinh(t), t)` is `3`
  ([#393](https://github.com/cortex-js/compute-engine/issues/393)).
- Library loading order and operator signature extensions behave consistently
  ([#393](https://github.com/cortex-js/compute-engine/issues/393),
  [#394](https://github.com/cortex-js/compute-engine/issues/394)).
- Corrected definition metadata and exact zero cases of `LerchPhi`
  ([#397](https://github.com/cortex-js/compute-engine/issues/397)).
- LaTeX avoids duplicate grouping, recognizes `arccot`, and reads scientific
  notation with a braced base 10. The `resolveApplication` hook sees names
  before parentheses consistently in lenient mode.

### Performance

- Faster compiled JavaScript range processing and scalar callbacks
  ([#387](https://github.com/cortex-js/compute-engine/issues/387),
  [#388](https://github.com/cortex-js/compute-engine/issues/388)). Deeply nested
  lenient exponents parse quickly.

## 0.143.0 _2026-10-01_

### New Features

- `ReplaceAt`, `DeleteAt` and `Insert` compile to JavaScript and Python
  ([#386](https://github.com/cortex-js/compute-engine/issues/386)).
- `Max`, `Min`, `Length`, `Count`, `Sum` and `Product` of an operand typed as an
  abstract collection compile to JavaScript
  ([#385](https://github.com/cortex-js/compute-engine/issues/385)).

### Behavior Changes

- Nested list types describe their corresponding matrix shapes.
- `Sum` and `Product` preserve point, row and matrix result types.
- Extrema of dictionaries and sums of nonnumeric scalar elements report type
  errors consistently.
- A symbol declared with a nested list type is a matrix: with `x` declared
  `list<list<integer^2>^2>`, `x^2` is the matrix power, not the square of each
  element.

### Issues Resolved

- Compiled sums, products and reductions handle real and complex collections
  correctly, or decline unsupported shapes instead of returning NaN or strings.
- Numeric `Reduce` over rows works without an initial value:
  `Reduce([[1, 2], [3, 4]], Add).N()` is `[4, 6]`.
- Compiled statistics no longer return incorrect values for nested lists, and
  annotated parameters validate absent arguments.
- Arithmetic methods preserve assigned-variable dependencies; multiplication by
  zero no longer hides an assigned NaN.
- Corrected function assignment for parameters that admit missing values,
  dictionary-join diagnostics and missing operands of `Sum`/`Product`.
- `HurwitzZeta` supports integer orders with arguments far left of the imaginary
  axis. Simplification propagates NaN through extrema.

### Performance

- Registering chains of dependent functions no longer takes exponential time.

## 0.142.0 _2026-09-30_

### New Features

- `ce.conformsTo(type, protocol)` queries protocol conformance
  ([#362](https://github.com/cortex-js/compute-engine/issues/362), contributed
  by [enumeratio](https://github.com/enumeratio)).
- Collection length slots accept type variables. DMS angles accept additional
  arc-minute and arc-second spellings and can omit minutes
  ([#364](https://github.com/cortex-js/compute-engine/issues/364), proposed by
  [enumeratio](https://github.com/enumeratio);
  [#338](https://github.com/cortex-js/compute-engine/pull/338), contributed by
  [yelliver](https://github.com/yelliver)).

### Behavior Changes

- Rounding, step functions and comparisons use exact operands under `.N()`. Two
  exact numbers compare without tolerance, including near boundaries.
- Full materialization returns every element of a finite lazy collection
  ([#380](https://github.com/cortex-js/compute-engine/issues/380), reported by
  [enumeratio](https://github.com/enumeratio)).
- Functions enforce explicitly annotated parameters, while unannotated
  parameters retain inferred behavior. Absent arguments at annotated parameters
  are errors; numeric parameters still accept NaN.
- Assignments store the current elements of lazy collections that depend on
  variables. Known valid literal indices no longer add an absent result type.
- `Range`, `Linspace`, comprehensions and `Tabulate` are typed `list<T>` (Tycho
  row 337).
- A rounding function, `Fract`, `Mod`, `Sign`, `Heaviside` or a comparison of an
  exact constant expression is resolved under `evaluate()` by raising the
  precision: `Floor(π·10³⁰)` is the exact integer
  `3141592653589793238462643383279`, and `Fract(π)` is `π − 3`.
- To get the display preview from `evaluate()`, pass `materialization: [5, 5]`.
  `toString()` and `.latex` still print the preview.
- To accept an absent argument at an annotated parameter, annotate it
  `T | missing` and test `isMissing(p)`, or remove the absent case at the call
  (`first(…) ?? fallback`).
- A function declared with `ce.declare(name, { signature })` checks its
  evaluated arguments against the scalar parameter types. With `f` declared
  `(integer) -> unknown` and assigned `x ↦ x + 1`, `f(1.5)` gave `2.5` and is
  now an `incompatible-type` error.
- A parenthesized derivative operand ends at its closing parenthesis:
  `\frac{d}{dx}(x)+1` is `D(x, x) + 1`, where it was `D(x + 1, x)`. A factor
  written after the parenthesis is outside the derivative:
  `\frac{d}{dx}(x+1)(x-1)` is `D(x+1, x)·(x-1)`
  ([#336](https://github.com/cortex-js/compute-engine/issues/336)).

### Issues Resolved

- Improved `HurwitzZeta`, `Zeta`, `LerchPhi`, `PolyLog`, incomplete gamma and
  high-order polygamma evaluation near poles, branch boundaries and difficult
  orders. More real arguments follow working precision; unreliable cases stay
  symbolic. More special functions broadcast over lists
  ([#374](https://github.com/cortex-js/compute-engine/issues/374), contributed
  by [enumeratio](https://github.com/enumeratio)).
- Interval enclosures for `Gamma`, `GammaLn`, `Binomial` and `Factorial` contain
  their true values. Compiled binomial values agree outside `0 ≤ k ≤ n`
  ([#384](https://github.com/cortex-js/compute-engine/issues/384), reported by
  [enumeratio](https://github.com/enumeratio)).
- Lazy operators and compiled JavaScript handle collections that may be absent.
  Sums of points and rows retain their shape
  ([#383](https://github.com/cortex-js/compute-engine/issues/383)).
- Folds that build lists compile and preserve accumulator types. Recursive
  collection functions and destructuring loop declarations compile correctly
  ([#369](https://github.com/cortex-js/compute-engine/issues/369), reported by
  [enumeratio](https://github.com/enumeratio); Tycho rows 338 and 339).
- WGSL shaders using NaN or infinity compile in browsers. Shader `LerchPhi` and
  `PolyLog` support more arguments and improved accuracy.
- Unsupported searches remain symbolic instead of reporting index `0`. Invalid
  infinite indices and indeterminate integrands return consistent values
  ([#368](https://github.com/cortex-js/compute-engine/issues/368), reported by
  [enumeratio](https://github.com/enumeratio)).
- Epsil serialization scales linearly with nesting depth. Nested function slots,
  complex literals, NaN patterns and absent set spreads behave consistently
  ([#379](https://github.com/cortex-js/compute-engine/issues/379),
  [#381](https://github.com/cortex-js/compute-engine/issues/381), reported by
  [enumeratio](https://github.com/enumeratio)).
- Protocol dispatch binds `Self` to the selected implementation's type. Compiled
  ranges no longer capture user variables named `i` or `_e`
  ([#362](https://github.com/cortex-js/compute-engine/issues/362), contributed
  by [enumeratio](https://github.com/enumeratio);
  [#367](https://github.com/cortex-js/compute-engine/issues/367), reported by
  [enumeratio](https://github.com/enumeratio)).
- `Floor`, `Ceil`, `Round`, `Truncate` and `Fract` of an exact number are exact:
  `Floor((25! − 1)/24!)` was `25` and is now `24`, and `Fract((25! − 1)/3)` was
  `−1/3` and is now `2/3`
  ([#382](https://github.com/cortex-js/compute-engine/issues/382), reported by
  [enumeratio](https://github.com/enumeratio)).
- A `Pipe` stage that uses no topic slot and whose value is not a function is an
  `incompatible-type` error: `5 |> Max(3)` gave `3`.
- `ce.number([n, 0])` is `~oo` for `n ≠ 0`, as `ce.box(["Rational", n, 0])` is;
  it was `NaN`. `ce.number([0, 0])` is `Indeterminate`.
- The `materialization` option no longer truncates the operands of an eager
  operator: `Length(Range(1, 5000)).evaluate({ materialization: true })` was
  `11`.
- A fold's accumulator is typed from its seed and its combiner's result. `Map`
  and `Filter` over a fold that builds a list give a list: they gave a set
  (`Set(7, 3, 5)` where the fold's value is the list `[6, 2, 4]`).

### Performance

- A predicate over a finite `Range` compiles to a counting loop on the
  JavaScript target, without building the range: `Count`, `CountIf`, `Any`,
  `All`, `Length(Filter(…))` and `Filter` over a range
  ([#373](https://github.com/cortex-js/compute-engine/issues/373)).
- A protocol member call no longer parses the member's signature again at each
  call. A call on a scalar receiver costs about 1.3× an equivalent plain
  function, where it cost about 12×
  ([#363](https://github.com/cortex-js/compute-engine/issues/363), contributed
  by [enumeratio](https://github.com/enumeratio)).

## 0.141.0 _2026-09-29_

### New Features

- Added `Indeterminate` and `isIndeterminate` for exact indeterminate forms.
  `0/0` and other exact indeterminate calculations now use this value; `.N()`
  and compiled code use NaN. It is distinct from an absent value:
  `IsMissing(Indeterminate)` is `False`
  ([#355](https://github.com/cortex-js/compute-engine/issues/355)).
- `epsil --compile` compiles and runs JavaScript, using machine arithmetic.
  Unsupported constructs and unbound symbols report runtime errors.
- `ce.withStepBudget({ steps, label }, fn)` bounds cooperative engine work.
  Exhaustion throws `CancellationError` with cause `'step-budget'` (Tycho row
  326).
- Added `LerchPhi(z, s, a)`, the Lerch transcendent, and support for non-integer
  and complex orders of `PolyLog`: `PolyLog(2.5, 0.5).N()` is about
  `0.5549972787175124`. Unsupported numeric cases remain symbolic
  ([#340](https://github.com/cortex-js/compute-engine/issues/340), contributed
  by [enumeratio](https://github.com/enumeratio)).
- `PolyGamma`, `Digamma` and `Trigamma` support complex arguments
  ([#340](https://github.com/cortex-js/compute-engine/issues/340), contributed
  by [enumeratio](https://github.com/enumeratio)).
- Added exact eigenvalues for supported 2×2 and 3×3 matrices, plus evaluation of
  `AdjugateMatrix` and `PseudoInverse`.
- `PolyLog` and `LerchPhi` compile to JavaScript, GLSL and WGSL for real
  operands.
- `CancellationCause` gains `'step-budget'`, and `isTimeoutCancellation` is
  `true` for both a timeout and a spent step budget.

### Behavior Changes

- Decimal spellings preserve floats through Epsil and LaTeX round trips,
  including integer-valued floats. Rounding a float produces an exact number
  ([#351](https://github.com/cortex-js/compute-engine/issues/351)).
- User functions that pass parameters to whole-collection operators receive
  lists whole. Operations on abstract collection types preserve possible
  broadcast result types.
- Restricted infinite or unknown-length collections pair with list conditions
  over the conditions' length. List literals with spreads remain lists.
- `Indeterminate` is a reserved name.
- Code that tests a result with `x.isSame(ce.NaN)` no longer matches an exact
  indeterminate form: use `x.isNaN`, which is `true` for both values, or
  `x.isIndeterminate`. `["Divide", 0, 0]` canonicalizes to `Indeterminate`.
- A list literal with a spread canonicalizes to the new operator `ListJoin`:
  `[...a, 0]` is `ListJoin(a, [0])`, where it was `Join(a, [0])`.
- An integer-valued float serializes as `2.0` in LaTeX and `{num: "2.0"}` in
  MathJSON, so it reads back as a float; it was `2`. With `fractionalDigits: 0`
  (LaTeX) or `digits: {fractional: 0}` (MathJSON) the integer spelling is kept.
- `-(2x)` canonicalizes to `Multiply(-2, x)`; it was `Negate(Multiply(2, x))`.
  `-\frac{x}{2}` is `Multiply(-1/2, x)`, the same expression as `-\frac{1}{2}x`
  ([#345](https://github.com/cortex-js/compute-engine/issues/345), contributed
  by [enumeratio](https://github.com/enumeratio)).
- `Beta(2, 3)`, `Zeta(3)` and `Lb(x)` serialize to LaTeX as `\mathrm{B}(2, 3)`,
  `\zeta(3)` and `\log_2(x)`. A negative numeric fraction writes its sign in
  front: `Rational(-1, 2)` is `-\frac{1}{2}`, `Divide(x, -4)` is `-\frac{x}{4}`.
- `Map`, `Filter` and `Scan` over a symbol declared `collection<T>` that holds a
  list give a list: `Map(x ↦ 2x, P)` for `P = [3, 1, 1]` is `[6, 2, 2]`, where
  it was `Set(6, 2)`.
- `ce.Zero.div(ce.PositiveInfinity)` is `0`, as the `Divide` operator gives; it
  was `NaN`. A float numerator over an infinity is the float `0`.

### Issues Resolved

- Closures preserve nested block locals and each loop iteration's variable.
  Recursion no longer overwrites caller indices or locals (Tycho row 330).
- Unannotated Epsil helpers and collection-building recursion compile to
  JavaScript. `Count(xs, predicate)` also compiles (Tycho row 332).
- `vars` mappings remain dynamic when reached through assigned expressions;
  program-defined functions are excluded from free symbols (Tycho row 328).
- Definite integration handles absolute values and signs of linear arguments,
  integration by parts, and integration variables with assigned values
  ([#352](https://github.com/cortex-js/compute-engine/issues/352)).
- Improved hypergeometric accuracy and high precision real zeta evaluation.
  Complex `Arcosh` and incomplete gamma select correct values
  ([#353](https://github.com/cortex-js/compute-engine/issues/353),
  [#354](https://github.com/cortex-js/compute-engine/issues/354);
  [#340](https://github.com/cortex-js/compute-engine/issues/340), contributed by
  [enumeratio](https://github.com/enumeratio)).
- Unknown-length indexing stays symbolic, collection restrictions retain their
  types, and list and set spreads use the supplied argument's elements (Tycho
  rows 331, 334 and 335).
- Derivatives, negative large numbers, beta and zeta functions, logarithms and
  matrix rank serialize correctly. Epsil handles `a * 2n` and library names in
  the MCP compile tool
  ([#345](https://github.com/cortex-js/compute-engine/issues/345), contributed
  by [enumeratio](https://github.com/enumeratio); Tycho row 333).
- A compiled `for` loop over a list of complex values reads the loop variable as
  complex. It read it as real, so comparisons on it were false and divisions
  gave `NaN` (Tycho row 332).
- More exact special values: `Log(1/8, 2)` and `Lb(1/8)` are `-3`, `Sinc(Pi)` is
  exactly `0`, `Arccot(1)` is `π/4`, and `ComplexRoots(1, 4)` is
  `[1, i, -1, -i]`.

### Performance

- Type queries and declarations for nested dependent functions no longer take
  exponential time (Tycho rows 329 and 336).

## 0.140.0 _2026-09-27_

### New Features

- `ce.number({ re, im })` accepts JavaScript numbers or `BigDecimal` values for
  each component.
- `isComplex` is public on the number-literal interface.

### Behavior Changes

- Decimal spellings consistently produce floats at machine precision, and a
  float operand makes numeric results inexact.
- `Integrate` applies coordinate by coordinate to tuples.
- More logical connectives use three-valued logic for absent operands. Compiled
  absent points, tuples and lists use `undefined` in arithmetic.
- User bindings shadow capitalized library names. Binding `Nothing`, `Missing`
  or `Undefined` is an error.
- `Length` of an infinite collection is `+oo`. `StringFrom` of text or a symbol
  returns its text.
- `serializeEpsil` writes the lowercase spelling of a library name:
  `["Sin", "x"]` is `sin(x)` and `"Pi"` is `pi`. The new option
  `libraryNames: 'mathjson'` restores the previous output, and the new `isBound`
  option reports names bound outside the expression.
- A round trip through `parseEpsil` alone gives the raw lowercase head
  (`["sin", "x"]`). Run `resolveLibraryNames` to read it back to `Sin`.
- `isMachineNumeric` is `false` for a number or list that holds an
  integer-valued float such as `2.0`.
- `Timing` returns an unnamed tuple, `tuple<number, value>`: read the parts as
  `Timing(expr)[1]` and `Timing(expr)[2]`. `Timing(expr).result` was an
  `incompatible-type` error.
- `x^{0.5}` stays `Power(x, 0.5)`. Only an exact `1/2` becomes `\sqrt{x}`.

### Issues Resolved

- Complex results retain working precision and imaginary components outside
  double range. `Exp(Ln(−2)).N()` is `−2`.
- `Mod` retains remainders for floats near the double range. Compiled logical
  operations preserve three-valued results.
- `GroupBy` supports character keys. Epsil serializes library names and
  dictionaries containing lists correctly.

## 0.139.0 _2026-09-27_

### New Features

- Epsil comprehensions build lists, sets and dictionaries:
  `[x^2 for x in 1..10 if x % 2 == 1]`, `{x % 3 for x in 1..10}`, and
  `{s -> length(s) for s in ["ab", "cde"]}`. Later clauses can use earlier
  bindings, and tuple patterns can destructure elements.
- `Comprehension` and `Loop` clauses accept guards.
- `SVD` supports complex matrices under `.N()`.

### Behavior Changes

- Decimal literals such as `1.0` and `0.0` consistently remain floats. `1.0/3`
  is a float, and `x^1.0` retains its exponent. Integer-valued `BigDecimal`
  inputs to `ce.number()` are exact.
- Derivative LaTeX puts the differentiand in the numerator: `D(x², x)` is
  `\frac{\mathrm{d}x^2}{\mathrm{d}x}`, preserving the meaning when other terms
  follow it.
- A float `0` or `±1` produced by a computation is kept: `0.5·2x` evaluates to
  `1x` (it was `x`), `0.5x + 0.5x` is `1.0·x`, and `0.0 + x` stays `x + 0.0`. A
  float `0` still absorbs a product: `0.0x` is the float `0`.
- `GCD`, `LCM` and `Factorial2` of big integers are exact at the default
  precision. They were floats.
- Compiled comparisons with a `Missing` or `Undefined` operand give the
  undecided value (`undefined`, Python `None`). They answered `false`. An `If`
  or `Which` over such a comparison takes no branch and gives `NaN`.
- A lazy collection whose element type has a `nan` member from an element read
  is accepted at a list, collection or indexed-collection parameter when its
  element type without `nan` fits. An eager list that holds `NaN` is still
  rejected.

### Issues Resolved

- Complex division avoids overflow and underflow, including in compiled
  JavaScript. Real and imaginary components retain working precision.
- Compiled comparison chains preserve decided links with absent operands;
  interpreter fallback uses the target's absent-value representation.
- Lazy collection operators evaluate computed sources and retain absent element
  types. `Map` with a named callback uses its signature.
- List-valued integrands integrate element by element. Hyperbolic and angular
  special values evaluate consistently.
- `Xor` and `Equivalent` accept absent operands, and failed operands preserve
  their error type.
- Comprehension clauses see only earlier indices; free-symbol reporting and
  Epsil set-builder serialization follow clause order.
- An exact base raised to a rational power stays exact: `8^{2/3}` is `4`, and
  `(8x+8)^{2/3}·y` no longer gives a float. A root that is not exact stays a
  symbolic factor. `(-8)^{2/3}` is `4`, the real root (it was `8^{2/3}·i`).

## 0.138.0 _2026-09-27_

### New Features

- `Zeta` supports complex orders and a second argument; added `HurwitzZeta`. For
  positive real base points, `Zeta(s, a)` agrees with `HurwitzZeta(s, a)`.
  `Zeta(2, 1/2)` is exactly `π²/2`. Complex and two-argument numeric values use
  machine precision in this release. Both compile for real operands
  ([#340](https://github.com/cortex-js/compute-engine/issues/340), contributed
  by [enumeratio](https://github.com/enumeratio)).

### Issues Resolved

- Hyperbolic special values evaluate and simplify: `Sinh(0)` is `0`, `Cosh(0)`
  is `1`, and `Coth(0)` and `Csch(0)` are `ComplexInfinity`
  ([#341](https://github.com/cortex-js/compute-engine/issues/341), contributed
  by [enumeratio](https://github.com/enumeratio)).
- More number theory functions evaluate on large prime squares.
  `ModularInverse(3, -7)` is `-2`, and large multiplicative orders are faster
  ([#339](https://github.com/cortex-js/compute-engine/issues/339), contributed
  by [enumeratio](https://github.com/enumeratio)).
- Corrected complex and incomplete `EllipticE`, including large arguments
  ([#346](https://github.com/cortex-js/compute-engine/issues/346), contributed
  by [enumeratio](https://github.com/enumeratio)).
- Powers, nested quotients, factorials and derivatives serialize with grouping
  that preserves their meaning: `(1+i)^2` retains its parentheses
  ([#345](https://github.com/cortex-js/compute-engine/issues/345), contributed
  by [enumeratio](https://github.com/enumeratio)).
- Corrected three Chebyshev identities used by `loadIdentities()`
  ([#343](https://github.com/cortex-js/compute-engine/issues/343), contributed
  by [enumeratio](https://github.com/enumeratio)).

## 0.137.3 _2026-09-26_

### Issues Resolved

- Function result types update when the functions they call change.

## 0.137.2 _2026-09-26_

### Performance

- Functions with `unknown` parameters no longer cause slow type updates in other
  functions.

## 0.137.1 _2026-09-26_

### Issues Resolved

- Functions declared with an `unknown` result infer current result types,
  including recursive functions.
- Declaring mutually dependent functions no longer takes minutes.

## 0.137.0 _2026-09-26_

### Behavior Changes

- Arithmetic and numeric functions have more precise types for infinities,
  poles, bounds, scalar-or-list unions and absent results. Functions declared
  with an `unknown` result report the type inferred from their body.
- Function literals broadcast over collections like named functions. Tuple
  arguments remain whole where appropriate, and unequal list lengths report
  dimension errors. Pipe stages follow the same rules as direct calls.
- Absent numeric collection reads return NaN; operations over absent collections
  return the appropriate absent result. Searches find explicit NaN, `Missing`
  and `Undefined` entries.
- A predicate returning `Missing` does not select an element. Membership remains
  symbolic when an unknown element could change the result.
- A user function mapped over lists of different lengths reports
  `incompatible-dimensions`: for `f := (x, y) ↦ x + y`, `f([1, 2], [1, 2, 3])`
  was `[2, 4]`. Use `Zip` to truncate.

### Issues Resolved

- Numeric powers, roots and exponentials retain very small complex results and
  handle exact values beyond double range. At machine precision, integers beyond
  double range approximate to signed infinity.
- Nonconvergent infinite series remain symbolic. Range extrema and membership
  handle endpoints correctly.
- Matrix norms and eigenvalue routines handle extreme entry magnitudes; repeated
  eigenvalues receive a basis of eigenvectors.
- Reductions preserve absent entries, sorting by a key puts them last, and joins
  with unresolved conditional operands remain symbolic.
- Multiple integrals evaluate scalar bounds once. Rebuilt sums, products, loops
  and comprehensions retain index types.
- Compiled JavaScript handles complex division and recursive complex matrices.
  Python norm, coordinate and absent-operand handling is more consistent; shader
  and interval targets handle poles and tiny angles more reliably.
- `((2·10^{30}+1)/10^{30})·2^x` no longer simplifies to `2^{x+1}`.
- Compiled JavaScript: a `Sum` with a square root that is real by its type no
  longer gives `NaN`.

## 0.136.2 _2026-09-25_

### Issues Resolved

- Function result types follow their bodies for `nan | real` arguments.
- Multiplying a list by a factor that may be NaN retains NaN in the element
  type.

## 0.136.1 _2026-09-25_

### Behavior Changes

- Arithmetic methods treat `Missing` and `Undefined` as NaN rather than dropping
  them. Numeric out-of-range reads and traces of absent values also return NaN.
- `Sort` and `Ordering` put absent elements last.
- `SVD` returns singular values in descending order and handles a wider range of
  entry magnitudes.
- Canonicalization no longer removes an absent operand from arithmetic:
  `Multiply(0, 2, Missing)` and `Divide(Missing, Missing)` are `NaN` (they were
  `0` and `1`).

### Issues Resolved

- Small singular values are retained for matrices with widely varying entries.
- Negative even roots preserve their principal complex values;
  `ce.number(-8).root(-3)` is `−1/2`.
- Point subtraction propagates absent values as `Missing`. Collection selection
  and reordering preserve absent entries in their result types.
- Restricted points, lists and point lists compile correctly for interval
  evaluation. JavaScript sorting, out-of-range reads and restricted point
  arithmetic agree with the interpreter.
- Arithmetic retains existing errors instead of replacing them with new ones.
- At high precision, the square root of a negative real is imaginary: `√(−4)` is
  `2i` (it was `NaN`).

## 0.136.0 _2026-09-25_

### Improvements

- Functions consuming whole lists infer and compile their results from the
  actual arguments. Seeded list draws compile on `interval-js`.

### Behavior Changes

- A false numeric restriction gives NaN; an undecided restriction over a list
  remains a single restricted value. Operations on absent collections return the
  absent value appropriate to their result.
- `Undefined` elements and arithmetic operands are typed as absent.
- `Dot([1, Missing], [1, 1])` is NaN.
- `Csc` and `Cot` of a tiny nonzero angle give a signed infinity: `Csc(5e-324)`
  is `+oo` and `Csc(-5e-324)` is `-oo` (both were `~oo`), also in compiled
  JavaScript and Python.

### Issues Resolved

- Exact complex roots and exponentials retain symbolic values: `√i` is
  `(√2/2)(1+i)`. Imaginary integer literals are exact.
- Rational numeric approximation is correctly rounded at machine precision.
  Trigonometric functions handle large exact integers, large multiples of π and
  exact special angles correctly.
- Number literals follow precision changes, large doubles use exponent notation,
  and `ComplexInfinity` has a consistent MathJSON form.
- Perfect-power roots of large integers evaluate. `Artanh` near zero and `Zeta`
  near its pole retain small differences.
- Points, matrices and lists preserve absent coordinates and elements;
  coordinate operations, norms and mapped functions return NaN or `Missing`
  consistently with their result types.
- `Range` retains endpoints on its step grid. Compiled ranges respect compound
  bounds and steps, and shader coordinate access handles absent points.
- `Map` consistently rejects reversed argument order. Parenthesized list
  arguments and products before comprehensions parse correctly.
- Large nested delimiters no longer overflow the stack. Seeded interval draws
  and numeric operations over measurements evaluate correctly.
- On `interval-js`, a point within rounding error of a pole of `Tan`, `Cot`,
  `Sec` or `Csc` is `singular`. It gave a very large finite interval, which
  plotted as a wrong segment.
- A bare `function` over a list compiled to wrong values: `s(L)` returned
  `{ re: NaN, im: NaN }` objects instead of numbers.

## 0.135.0 _2026-09-25_

### Improvements

- Custom operators can set `threadsConditionals` to preserve restrictions around
  whole-value operations: `f(When(v, c))` becomes `When(f(v), c)`.
- `simplify()` applies more loaded Fungrim identities, including
  `Hypergeometric0F1(3/2, -z²/4) → Sinc(z)`, and retains simpler results.
- The Epsil CLI accepts LaTeX input and output:
  `epsil --from latex --latex -e '\frac{1}{2}+\frac{1}{3}'` prints
  `\frac{5}{6}`.
- Epsil MCP tools accept and serialize LaTeX. The `compile` tool generates
  JavaScript, GLSL, WGSL, Python or interval code with free-symbol types.
- The Epsil MCP server serves a Compute Engine guide for AI agents as the
  resource `epsil://docs/compute-engine-api`.

### Behavior Changes

- A parenthesized point with list coordinates represents a list of points.
- Point arithmetic rejects invalid scalar additions, point products and
  divisions consistently, including restricted values and lists of points.
- `Map` over a range or indexed collection has type `list<T>`, and rational
  products have rational types.
- With `A` and `B` lists, `(A, B)` canonicalizes to `PointList(A, B)` and
  serializes as `\operatorname{PointList}(A, B)`.
- Arithmetic or a function such as `Sin` applied to a `Tuple` with a list
  coordinate is an `incompatible-type` error: `Sin(Tuple([1, 2], 3))` was
  `([sin(1), sin(2)], sin(3))`. Use `PointList(A, B)` for a list of points.
- In strict mode, `[1,2,3][1:2]` is an `incompatible-type` error (it stayed
  unevaluated). Use `[1,2,3][1...2]`.
- `Sin`, `Power` and a scalar factor of a restricted point whose condition is
  false give `Missing`, not `NaN`. Test the result for `Missing` instead of
  using `isNaN`.
- Compilation error messages start with what could not be compiled, then give
  the reason. Code that matched the old text must match the new text;
  `diagnostic.code` is unchanged.

### Issues Resolved

- Restricted points and point lists work with `Distance`, `Norm`, `Dot`, `Cross`
  and coordinate accessors. False restrictions give `Missing`; numeric
  restrictions applied element by element preserve absent cells.
- Compiled point arithmetic, norms and distance agree with the interpreter.
  Free-symbol reports correctly exclude block locals, and compilation failures
  give clearer reasons.
- Error functions broadcast over lists. Types of large element-wise results
  preserve the expression's declared result and possible missing values.
- Bracketed lists, spaced indices and point-list coordinates parse and
  round-trip correctly. Empty collections serialize compactly.
- Polynomial GCD and simplification avoid unreliable calculations over long
  floats. Invalid function assignments report errors consistently.

### Performance

- Faster scalar interpretation, ordering of nearby constants and repeated
  numeric derivative evaluation.

## 0.134.0 _2026-09-24_

### Behavior Changes

- Ordering functions distinguish nearby values without tolerance:
  `Max(1e-12, 2e-12)` is `2e-12`. Relational comparisons retain their tolerance.
  `Sort` and `Ordering` stay symbolic when order is undecidable and put NaN
  last.
- `Rgb` preserves extended sRGB channels. Color output uses gamut mapping:
  `ColorToString(Oklch(0.7, 0.4, 30))` is `#ff5843`. Added
  `GamutMap(color, gamut?)` and Display P3 output. `Hsv` and `Hsl` clamp
  saturation, value and lightness and normalize hue.
- Only safe JavaScript integers are boxed as exact integers. Use a bigint or
  numeric string for an exact large integer. Float trigonometric arguments
  remain inexact; use `Sin(Pi)` for an exact special value.
- `Norm(A, 2)` is the matrix spectral norm. Use `Norm(A)` or
  `Norm(A, "Frobenius")` for the Frobenius norm.
- Compiled JavaScript linear algebra checks whether real inputs contain complex
  entries. `mode: 'complex'` selects complex computation; `entryChecks: false`
  disables entry checks.
- Symbolic integration supports a `stepBudget` option in `loadIntegrationRules`.
  Caller deadlines propagate as cancellation errors through compilation,
  integration and differentiation.
- `timeLimitMs` defaults to 30 s (it was 10 s) and guards only against a hang.
- On a shader, wrap a final color in `_gpu_gamut_map_oklch()` instead of
  `_gpu_oklch_to_srgb()`.
- A value is a pole of `Tan`, `Cot`, `Sec` or `Csc` when the argument is within
  about 100 ulps of a pole: `Cot(1e-13)` is `1e13` (it was `~oo`), and
  `cot(1000π)` is `~oo`. Compiled code gives `Infinity` (JavaScript) or `np.inf`
  (Python) at a pole.
- On GLSL and WGSL, `Mandelbrot` and `Julia` take `complex` points, passed as
  `vec2`.

### Improvements

- Compile results include `freeSymbolTypes`. Set `strictTypes: true` to reject
  undeclared free symbols.
- Shader user functions accept complex arguments. Interval compilation supports
  more point-list coordinate operations.

### Issues Resolved

- Exact complex arithmetic and matrix entries retain exact values: `√2·(1+i)` is
  `√2 + √2i`, and `(√2(1+i))²` is `4i`.
- Very small differences and exact values outside float64 range are preserved;
  values near integers are no longer silently rounded to them.
- Matrix decompositions retain imaginary components and handle extreme entry
  magnitudes more reliably. Unsupported complex decompositions stay symbolic.
- Statistics accept real constants: `Median([π, 3, e])` is `3`. `Mode` breaks
  ties by the smallest value under `.N()` as well.
- Degree literals evaluate correctly in every angular mode. Equality proofs,
  dictionary equality and dependent expression types update consistently.
- Compiled code preserves global bindings, evaluates random operands once and
  validates unsupported complex operands. Python complex operations and branch
  handling, shader complex roots and interval degree literals are corrected.
- Numeric integration of an everywhere-NaN integrand returns NaN promptly. Color
  conversion no longer rounds channels prematurely to 8 bits.
- `Timing` consistently documents its result as time in microseconds, then
  value.
- Compiled Python gave `2 * x + z` for `2(x + z)`.
- `determinant()` of the `numerics` entry point no longer throws a `TypeError`
  for a matrix of size 3 or more.

### Performance

- Faster symbolic sums, expansion, numeric arithmetic over large lists and
  repeated derivatives. `Expand((x+y+z+1)^32)` is about 2.7× faster.
- Monte Carlo integration of 10 million samples takes about 0.4 s instead of 3.6
  s.

## 0.133.0 _2026-09-22_

### Breaking Changes

- **`StringFrom` decodes non-negative integers as Unicode code points.**
  `StringFrom(65)` is `"A"`, and `StringFrom([127467, 127479])` is `"🇫🇷"`. Use
  `StringFrom(65, "default")` for decimal text. The empty list gives `""`.
- **Collection equality propagates absent elements.**
  `Equal([1, Missing], [1, Missing])` is `Missing`, as is `NotEqual`. A length
  mismatch remains `False`; `.isEqual()` and `IdenticallyEqual` still recognize
  structurally identical collections.

### Behavior Changes

- `Undefined` behaves as an absent value like `Missing`: numeric operations
  return NaN, `IsMissing(Undefined)` is `True`, and `Coalesce(Undefined, 2)` is
  `2`.
- Scalar callbacks broadcast over collection elements in more collection
  operations: with `f(x) := 2x` declared `(number) -> number`,
  `Map(f, [[1, 2], [3, 4]])` is `[[2, 4], [6, 8]]`. Predicates requiring a
  single boolean still reject collection results.
- Element-wise operations preserve empty lists: `Sin([])` is `[]`.
- `RandomChoice` on a string returns a string: `RandomChoice("abc", 5)` has five
  characters. Use `Characters(...)` to recover a list of characters.
- Stored expressions preserve their original bindings inside functions and
  loops, including in compiled code.
- At machine precision, element-wise operations over lists of more than a
  hundred numbers give a `List` of numbers, not a lazy `Map(f, L)`, so
  `Norm(2·L)` is a number. Some values can change in the last digit.

### Issues Resolved

- Deep expressions parse and evaluate without stack overflow.
- `Round` uses ties away from zero at every precision: `Round(-0.5)` is `-1`.
  `Exp` agrees across evaluation routes at machine precision.
- `Linspace(-1e308, 1e308, 3)` gives `[-1e308, 0, 1e308]`, and large float
  products retain their inexactness.
- `Dot` broadcasts over point lists and checks dimensions. Extrema and ordering
  preserve undecided and absent values correctly.
- Compiled `Missing` and `Undefined` use the target's absent value rather than
  becoming free variables. Functions with unknown signatures track their bodies.
- Restricted assignments respect assumptions. Nested function-call notation and
  repeated ellipses parse correctly.
- Epsil sum types can implement protocols under the sum type's name. `FindFit`
  and `FindRoot` attribute setup timeouts to the setup phase.

### Performance

- Faster arithmetic and coordinate access over large lists: `Sum(Sin(L))` over
  10,000 numbers takes about 2 ms instead of 58 ms.
- Faster factoring of deeply nested quotients.

## 0.132.3 _2026-09-20_

### Improvements

- `Max` and `Min` of scalars and collections compile on `interval-js`, including
  `Max(0, Min(1, L))`. Empty collections contribute no elements: `Min(1, [])` is
  `1`.
- Faster point-coordinate access; `PointZ` over 10,000 points takes about 79 ms
  instead of 165 ms.
- Recompiling an integral after a symbolic search timeout avoids repeating the
  search across compatible type declarations and scopes.

### Issues Resolved

- Integrals such as `∫ xⁿeˣ dx` with a symbolic exponent return unevaluated
  promptly instead of hanging. Positive integer exponents are unaffected.

## 0.132.2 _2026-09-19_

### Improvements

- Faster compiled arithmetic over point lists: a 7,225-point coordinate
  calculation takes about 0.14 ms instead of 2.55 ms. Shader targets support
  more point lists with coordinates computed at run time.
- Repeated compilation of an integral skips a symbolic search that already timed
  out, then uses numeric integration. Changes to assignments, assumptions,
  angular units or precision permit a new search.

### Issues Resolved

- More JavaScript operations compile over lists mixing real and complex values,
  including `Abs`, `Divide`, `Power`, `Real`, `Exp` and `Sign`.
- Compiled complex arithmetic agrees with the interpreter at poles: `1/(0·i)` is
  `~oo`, its absolute value is `+∞`, and its reciprocal is `0`.
- Compiled coordinate reads detect incompatible point dimensions and preserve
  user variable mappings and operator overrides.

## 0.132.1 _2026-09-19_

### Resolved Issues

- `resolveApplication` callbacks preserve range precedence, including offsets in
  range bounds. Returning `undefined` no longer changes `f(x)+1...n` into
  `f(x)+(1...n)`.

## 0.132.0 _2026-09-19_

### New Features

- `resolveApplication(context)` lets a parser host choose whether `f(x)` is a
  call or a product. Return `apply`, `multiply` or `undefined`; explicit
  declarations, parameters and `resolveSymbol` facts take precedence.

### Behavior Changes

- Explicit declarations, including `unknown`, take precedence over
  `resolveSymbol`. Inferred types can still be overridden. Resolution facts
  apply to the parsed expression without declaring names in the caller's scope.

### Resolved Issues

- Lenient parsing reads a letter run before parentheses as one name: `foo(x)` is
  `["foo", "x"]`. Without parentheses, `foo` remains `f·o·o`; Greek constants
  retain their splitting rules, as in `pix(3)`.

## 0.131.3 _2026-09-18_

### Resolved Issues

- **The static type of `PointList` includes the width of a matrix component.**
  `PointList(M, V)` with `M` a `matrix<3x2>` and `V` a `vector<3>` now has the
  type `list<tuple<vector<2>, number>^3>`. The width was missing before.

## 0.131.2 _2026-09-18_

### Resolved Issues

- **The `resolveSymbol` handler is also used outside `ce.parse()`, and takes
  precedence over a function declaration the engine inferred.** A raw or
  structural result canonicalized later now also uses the engine-wide
  `latexOptions.resolveSymbol`. Before, `b(\cos(NX)-1)`, with a handler that
  says `b` is a value, could be read as an application of `b`. A declaration
  made by the host, or one that holds a value, still takes precedence.
- **The static type of `PointList` over list components includes the list
  width.** `PointList([0.1, 0.4, 0.8], [0.2, 0.7, 0.3])` now has the type
  `list<tuple<real, real>^3>`, so `PointX` of it has the type `vector<3>`. When
  the components have different widths, the smallest one is used. On the shader
  targets, `2 · PointX(PointList(-6, v))` over a `vector<3>` now compiles to
  `2.0 * vec3(-6.0)`.
- **`ce.appliedNonFunctions()` reports a head that is a function only because of
  an earlier application.** After the first parse of `g(x)`, the call returned
  `[]` for `g`. Only a host declaration or an assigned body now makes `g` a
  function for this call.

## 0.131.1 _2026-09-18_

### Breaking Changes

- **`\overline{z}` is the complex conjugate.** `\overline{…}` now parses as
  `Conjugate` (it was `OverBar`), and `Conjugate` serializes as `\overline{z}`.
  It used to serialize as `z^\star`, which parses as `ConjugateTranspose`, so a
  conjugate did not round-trip through LaTeX. `OverBar` built as MathJSON still
  serializes as `\overline{…}`. The repeating decimal `0.\overline{3}` and the
  extended sets `\overline\C`, `\overline\R`, `\overline\Z` and `\overline\Q`
  are unchanged. `z^\star` still parses as `ConjugateTranspose`.

### Resolved Issues

- **The `resolveSymbol` handler decides between a product and an application, as
  a declaration does.** With a handler that answers `{ type: "number" }` for
  `s`, `ce.parse("s(x+1)")` was an application of `s`, which then made `s + 1`
  an error. It is now a product. A function type gives an application, and a
  head the handler does not resolve uses the scope.
  `ce.parse(latex, { speculative: true })` now reads a head declared `unknown`
  as a normal parse does.
- **A head declared `unknown` by the host is read as a product.** In 0.131.0,
  `k(1 - w)` was an application whenever `k` was declared `unknown`. An explicit
  `unknown` declaration says `k` is a value whose type is not known yet, so
  `k(1 - w)` is now `k·(1 - w)`, as for a declared number. Only an undeclared
  head, or one with a type inferred from use, is applied.
- **`ConjugateTranspose` over a vector of more than 100 elements evaluates.**
  `z^\star` over a 200-element vector stayed unevaluated, while `Conjugate` of
  the same vector evaluated.

## 0.131.0 _2026-09-18_

### Breaking Changes

- **A symbol with no type information followed by a parenthesized argument is an
  application.** `f(x)` with `f` undeclared, or declared with an unknown type,
  now parses as `["f", "x"]`, not as the product `f·x`. The product reading gave
  silent wrong results: `\int f(x) g(x) dx` took `g` out of the integral as a
  constant. A wrong application stays visible (`f(2)` evaluates to itself), and
  a later value for `f` overrides the inferred declaration.
  - `2f(x)` is `2·f(x)`, and `f(3)^2` is `f(3)²`.
  - The product reading remains for a head that is a value: declared with a
    concrete type (`a: real`), assigned a value, a constant (`\pi(x+1)`), a
    parameter of the enclosing function (`(x, N) \mapsto x(N+1)`), or a head
    that its own argument refers to (`x(x+1)`).
  - A function defined before the head gets a value is read again: with
    `g(t) := 2x(t+1)` then `x := 5`, `g(3)` is `40`.
  - `Multiply(s, x+1)` now serializes as `s\times(x+1)`, so it round-trips.
  - With `strict: false`, `foo(x)` is still `f·o·o(x)`.

### New Features

- **Host capabilities: `ce.effects` and `ce.withEffects()`.** The application
  can replace or deny the handlers the engine uses to reach the host, one engine
  at a time. The `console` handler is used by `Print` and `Input` (Epsil `print`
  and `input`):

  ```ts
  const lines: string[] = [];
  ce.effects = {
    console: { log: (line) => lines.push(line), readLine: () => "Ada" },
  };
  ```

  `readLine(prompt)` returns the line read, `null` at end of input (`Input`
  evaluates to `Nothing`), or `undefined` when there is no interactive input
  (`Input` stays unevaluated). The defaults are the real console in Node and the
  `prompt()` dialog in a browser. `ce.effects = {}` restores the defaults.

  A handler set to `null` denies the capability: the operator evaluates to
  `Error("capability-denied", "console")`. `ce.withEffects(overrides, fn)`
  applies a change for one callback (also an async one). Use it to evaluate an
  expression that is not trusted:

  ```ts
  const result = ce.withEffects({ console: null }, () => expr.evaluate());
  ```

  The `entropy` handler, `{ random(): number }`, is the unseeded source of
  randomness (`Math.random` by default). `RandomExpression` and the random
  operators use it outside a `WithRandomSeed` frame. A constant handler makes
  them reproducible in tests; `entropy: null` makes them evaluate to
  `Error("capability-denied", "entropy")`, and a compiled function throws
  `CapabilityDeniedError`.

  A change made while an evaluation runs does not affect that evaluation.
  Operator handlers receive the handlers as `options.effects`; a custom operator
  may use `console` or `entropy` if its signature declares that effect.
  `EvaluateHandlerOptions` has a new required member, `effects`: code that
  builds its own options object to call a handler directly must add it.

### Resolved Issues

- **`\operatorname{conj}(z)` parses as `Conjugate(z)`.** It was the product
  `conj·z`. Over a list, it was an unknown function that did not broadcast.
  `Conjugate` still serializes as `z^\star`.
- **The square of a base that ends with a superscript serializes with braces.**
  `Power(Transpose(A), 2)` serialized as `A^T^2`, which is invalid TeX. It is
  now `{A^T}^2`, and `Power(Conjugate(z), 2)` is `{z^\star}^2`.
- **`At` with an index that is not an integer returns the missing-element
  value.** `L[2.5]`, `L[3/2]` and `L[5 + √17]` stayed unevaluated. They now
  return `NaN` for a numeric collection and `Missing` otherwise, as for an
  out-of-range index and as compiled code already did. An index whose value
  cannot be decided, such as a symbol with no value, stays unevaluated.
- **More expressions compile on the `interval-js` target:**
  - Missing values: a restriction over a list or a relation, a `Which` whose
    branches are lists, and `IsMissing` and `Coalesce`, which gave wrong
    results. A type that is not numeric, such as a string, still does not
    compile.
  - `PointX`, `PointY` and `PointZ` over a list of points, and over a value that
    is either a point or a list of points. A helper function that reads a
    coordinate of its parameter can be called with one point or a list of
    points.
  - Point arithmetic: `Add`, `Subtract`, `Negate`, `Multiply` and `Divide` with
    point operands, for example `V.x·(cos a, sin a) + V.y·(−sin a, cos a)`.
    Operations the interpreter rejects, such as point + number, still do not
    compile.
  - A `Which` whose branches return a list in one case and a number in another.
- **`sqrt`, `abs`, `ln` and `gamma` on the `interval-js` target keep a missing
  value missing.** They returned an interval such as `[0, ∞)` for it.

### Epsil

- **The MCP server captures `print` and `input` with a `console` handler.** It
  no longer replaces global functions such as `console.log` during an
  evaluation. The output of the `evaluate` tool is unchanged.
- **A denied `print` or `input` is a `capability-denied` runtime error** (see
  `epsil doc capability-denied`). The program continues after it.
- **The VS Code extension supports type names and named-argument labels.** Go to
  Definition, Find All References and Rename now work on a type name used in an
  annotation such as `let p: point`. Renaming a parameter also renames its
  labels in calls such as `g(a: 2)`. A rename is refused when not every use can
  be resolved.
- **`epsil check` checks calls to a function literal bound with `let`, `const`
  or `:=`.** `let k = (n: integer) => n + 1` followed by `k(1.5)` now reports
  the same diagnostic as a declared signature. A named call such as `k(n: 2)` no
  longer reports a false `argument-names-unavailable`.
- **A constant bound to a function literal can no longer be redefined.**
  `const k = (n) => n + 1` followed by `k = (s) => s`, or by `k(x) = x * 2`,
  replaced `k` without an error. It is now refused, as `const c = 5` then
  `c = 6` is. From the host, `ce.assign('Pi', (x) => 2x)` is also refused; it
  replaced `Pi` on that engine.

## 0.130.0 _2026-09-17_

### New Features

- **New `expr.digest` property: a 128-bit digest of the expression's structure,
  usable as an in-memory cache key.** Unlike `expr.hash` (a 32-bit bucket that
  needs an `isSame()` check on a hit), two expressions have the same digest
  exactly when their MathJSON is the same tree. It is much faster than
  `JSON.stringify(expr.json)` on expressions that share sub-expressions. It is
  not an `isSame` key: `1/2` and `0.5` digest differently. The value is 32
  lowercase hexadecimal characters, stable only within one release, and not
  cryptographic. Do not persist it.

### Resolved Issues

- **`expr.hash` now agrees with `isSame` on number literals.** The exact
  rational `1/2` and the float `0.5` hashed differently, so `Unique`, `Tally`
  and set membership could fail to match them.
- **Compiled callbacks compute repeated sub-expressions and loop invariants
  once.** This applies to the callback of a numeric derivative and to the
  integrand of a compiled `Integrate` (for example `Γ(k/2)·√2^k` in a chi-square
  tail is no longer computed at every sample). One measured case went from 84 µs
  to 4 µs per call.
- **On the `interval-js` target, a constant list is built once, and a constant
  index selects its element at compile time.** A sum over a 400-element assigned
  list no longer builds a new array at each read.

## 0.129.2 _2026-09-17_

### Resolved Issues

- **`ce.rebind()` now gives the same result as `ce.expr(expr.json, …)` for an
  expression that already contains an `Error`.** Type errors below an existing
  error were not reported again.

## 0.129.0 _2026-09-17_

### New Features

- **New `ce.rebind(expr, { form, scope })` rebuilds a boxed expression as if it
  was boxed from its MathJSON, without producing the MathJSON.**
  `ce.expr(expr, { scope })` keeps the existing bindings of a boxed expression.
  To read it under other declarations you had to serialize it and box it again,
  which can exhaust memory for an expression with many shared sub-expressions.
  `rebind` copies each distinct node once. See "Rebinding a Boxed Expression in
  Another Scope" in the structural-forms guide.

### Resolved Issues

- **A sum, a product or a literal collection with a few hundred thousand
  operands no longer overflows the call stack**
  (`RangeError: Maximum call stack size exceeded`).
- **Compiling an expression with many shared sub-expressions no longer runs out
  of memory.** The analysis of free symbols and unsupported operators visited
  shared nodes once per path. A custom `compile` handler is also no longer
  called twice for each node.
- **Lazy collections and assigned symbols evaluate faster.**
  `[l[i] for i = 1…Length(l)]` over a lazy list `l` recomputed from the first
  element at each step (quadratic time). A symbol assigned an unevaluated
  expression now keeps its evaluated value until a dependency changes. One
  measured chain of list helpers went from 16.7 s to 0.24 s.
- **A symbol that holds a lazy `Map` or `Range` value compiles on the
  `interval-js` target.** `R[k]` and `length(R)` with
  `R = mod(10⁴ sin(10⁴ · [0...100]), 1)` failed with "`Map`: no lowering".

## 0.128.13 _2026-09-16_

### Resolved Issues

- **Collection values compile on the `interval-js` target.** A list is compiled
  as an array of intervals. Previously, a list outside a comprehension failed
  with "`List`: no lowering". The target now:
  - applies scalar functions element by element to an operand whose type is a
    list of numbers (`sin(L)`, `L + 1`, `sin(L) · M`);
  - passes lists into and out of user functions, and maps a scalar-parameter
    function over a list argument (`f([1, 2, 3])` with `f(x) := x²`). This call
    used to return an incorrect result with `success: true`;
  - supports a `Range` with literal or symbolic bounds;
  - supports `Sum`, `Product`, `Max` and `Min` over a list computed at run time;
  - returns a list of numbers, a range or a `Map` at the root as an array.

  Also fixed: `Σ_{k=1}^{x} k` with `x ∈ [2.5, 3.5]` returned `[6, 6]`, which is
  not an enclosure. A bound that is not constant over the interval now returns
  `entire`.

- **A restriction with a list of conditions compiles on the JavaScript target.**
  `u\{[1, 2, 3] v < 2\}` compiles element by element (`[u, NaN, NaN]` for
  `v = 1`). In the interpreter, a point under a list of conditions is now kept
  whole at each position: `(1, 2)\{[1, 2, 3] < 2\}` is
  `[(1, 2), Missing, Missing]` (it was `[1, Missing]`). The shader and interval
  targets still do not compile a list-valued condition.

## 0.128.12 _2026-09-15_

### Resolved Issues

- **A comprehension or a sum evaluated in a child scope uses that scope's
  values.** With `n` declared in the root scope and `n = 4` in a child scope,
  `[k/n for k in 1..n]` and `\sum_{k=1}^{n} k` stayed unevaluated, while `90n`
  returned 360.
- **Compiled JavaScript: a point with a complex coordinate passed to a user
  function no longer gives `NaN`.** The call is inlined when possible, or the
  compilation fails with an error message. `1 + g((x, i x))` with `g(P) = P.y`
  returned the string `"[object Object]1"`.
- **A coordinate of a written-out point keeps the type of that component.**
  `PointX((1, \sqrt{1 - e^2}))` is typed `integer | nan` instead of
  `complex | nan`, so a division by it compiles correctly.
- **A coordinate accessor over a union of numbers, points and lists gets a
  precise type.** `PointX(P)` typed `collection<number>`, so arithmetic on it
  did not compile to JavaScript. It is now
  `number | tuple<number, number> | list<number>`.
- **Juxtaposition with a union-typed operand is multiplication.**
  `2\mathrm{PointX}(P)` with a `number | list<number>` coordinate parsed as the
  tuple `(2, PointX(P))`. A union with a non-numeric member (`string | number`)
  still parses as a `Tuple`.

## 0.128.11 _2026-09-14_

### Resolved Issues

- **A function that builds a list by recursion compiles to a loop on the
  JavaScript target.** For example
  `F(n) = \{n = D - 1: [P(n)], [P(n)].join(F(n + 1))\}` overflowed the stack
  near 5,000 levels. It now builds a 10,000-point list in about 35 ms. The loop
  obeys `ce.iterationLimit` (default 1024), like the interpreter: raise the
  limit for longer lists. The shader targets still do not compile recursion.

## 0.128.10 _2026-09-14_

### Behavior Changes

- **The cross product of two points is a point.** `Cross((1, 2, 3), (4, 5, 6))`
  returned the list `[-3, 6, -3]`, so `Cross(A, B) + P` failed. It now returns a
  point typed `tuple<number, number, number>`. A list operand still gives a
  list.
- **`Map` over a tuple returns a list.** The result is typed `list<R>`. It was
  typed as the tuple or as `collection`, and could become a `Set` that removed
  duplicates: `Map(x ↦ 0, (1, 2))` had one element.

### Resolved Issues

#### Arithmetic and Evaluation

- **A function that builds a list by recursion evaluates iteratively.** It no
  longer grows the JavaScript stack. It obeys `ce.iterationLimit`: a missing
  base case throws a `CancellationError` with cause `iteration-limit-exceeded`.
  Raise the limit for larger builds, such as a 10,000-point list.
- **The numeric derivative of a point-valued function has a value.** `.N()` of
  the derivative of `F_0(t) = f'(t)/|f'(t)|` for a space curve `f` returned an
  incomplete symbolic result; compiled JavaScript returned `NaN`. Both now
  differentiate each component and return a point. `ND` also supports functions
  that return points or lists.
- **The norm of a point with an empty list coordinate is the empty list.**
  `Norm(([], 3))`, `Abs(([], 3))` and `Hypot(([], 3), 4)` now evaluate to `[]`.
  They returned `√10` and `√(16 + []²)`.

#### LaTeX Parsing

- **A list method with arguments parses as a function call with the list as
  first argument.** `L.\operatorname{join}\left(M\right)` parses as
  `Join(L, M)`, and `[1].join(2, 3)` as `Join([1], 2, 3)`. Before, it did not
  parse. Methods without arguments (`.x`, `.total`) are unchanged.

#### Types

- **A coordinate accessor over a point-or-point-list union has a precise type.**
  `PointX` over `list<tuple<…>> | tuple<…>` is typed `number | list<number>`
  instead of `collection<number>`, so arithmetic on it compiles to JavaScript.

#### Compilation

- **More point and list expressions compile to JavaScript:**
  - a point multiplied by a symbol bound to a list of numbers (for example
    `R × (cos t, sin t)` with `R` built from a `Range`);
  - a call to a function with a list argument next to a point argument;
  - a value that can be a point or a list of points, added to a list of points.
    It returned `NaN` for every element with `success: true`. When the declared
    type cannot tell the two apart, the compilation now fails with a message;
  - `Norm`, `Abs` and `Hypot` of a point with a list coordinate return one norm
    per element: `|([1, 2], 3) − (4, 0)|` is `[4.24, 3.61]`. Before, the result
    was a single wrong number;
  - `Which([T, F, F], (1, 2))` returns `[(1, 2), NaN, NaN]` instead of `NaN`.
- **A literal index into a list expression computes only the selected element.**
  This applies to element-wise `Which`/`If`, relations, `Mod`, list arithmetic,
  a literal `Range` and a `PointList` built from columns, on every target. For
  example `(0.1·[a, b, c] + 0.4)[2]` compiles to `0.1·b + 0.4`, and `[a, b][1]`
  compiles to `a`. Likewise `PointX` of a `PointList` built from columns
  compiles to the first column.
- **More list expressions compile on the `interval-js` target.** Lists of any
  width and helpers that return lists are written out, so `F(x, y)[1]` and
  `Total(f(x + 1, y) + f(x − 1, y))` compile.
- **More expressions compile on the GLSL and WGSL targets:**
  - a comprehension over literal ranges or lists, up to 64 elements, compiles to
    an array of vectors;
  - a helper function that returns a list;
  - a `Which`, `If` or `When` whose branch contains a loop-form `Sum` or a
    block. The loop runs only when its branch is selected;
  - a block with local variables used as a `Sum` term or an operand.
- **Fixed a shader miscompile of a reduction assigned to a block local.** On
  GLSL and WGSL, `a := Σ…` in a function or `Loop` body produced invalid code
  that was reported as a success.
- **Shader code is smaller.** Repeated sub-expressions in a conditional branch
  are computed once. A deeply nested `Max(e, e)` no longer expands into
  megabytes of code.
- **Shader helper names are valid.** They no longer contain two consecutive
  underscores or dollar signs.
- **Color helpers in shaders keep a three-channel return type.**

### Performance

- **Compiled code reuses more calculations.** A user function called from each
  term of a `Sum` with the same argument computes the parts that depend only on
  that argument once, on all compile targets. The `interval-js` target also
  reuses small repeated operations, such as a reciprocal.
- **Nested element-wise operations on a list run in one loop in compiled
  JavaScript.** One measured case went from 21 µs to 3.6 µs per sample.

### Benchmarks

Median time per call at 200-digit precision, in microseconds (lower is better):

| Expression         | CE (current) | CE 0.128.9 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | ---------: | ----: | ------: | ----------: |
| $\pi^2$            |           11 |         13 |   179 |     143 |         3.9 |
| $\sin 1$           |           23 |         23 |   221 |     449 |         5.1 |
| $\ln 2$            |           18 |         18 |   357 |   4,460 |         3.7 |
| $\zeta(3)$         |        1,584 |      1,588 |   281 |       — |          50 |
| $\Gamma(\tfrac13)$ |          841 |        848 |   368 |       — |         204 |

On the symbolic cases that both solve (antiderivatives, simplification, limits,
definite integrals, equation solving), Compute Engine is a median 3.1× faster
than Mathematica.

## 0.128.9 _2026-09-11_

### Performance

- **Compiled JavaScript skips redundant shape checks on constructed vectors and
  point lists.** Helpers with a fixed-size collection return type, and
  `PointList` over constructed sources, no longer emit shape checks and
  broadcast fallbacks that the compiler can prove unnecessary. Runtime inputs
  keep their validation.

## 0.128.8 _2026-09-11_

### Resolved Issues

- **Compiling nested point helpers to JavaScript no longer repeats the same
  analysis.** This removes a compile-time slowdown in composed point helpers.
- **List-valued point coordinates are kept in compiled JavaScript helpers.**
  `Dot` broadcasts across a list in any coordinate of a runtime tuple input.
- **Compiled products over a one-element list are correct.** The element is
  emitted directly and evaluated once, and negative zero is preserved. An empty
  product is still `1`.

## 0.128.7 _2026-09-11_

### Resolved Issues

- **Colors in GLSL and WGSL keep their vector representation** in locals, helper
  parameters, return values and shared temporaries. Converted colors are
  normalized to OKLCh, so the shader types are valid and the colors are kept.
- **A caller parameter with the same name as a global no longer changes how a
  compiled helper result is classified.** List-valued coordinates keep
  broadcasting when called through such a helper.

### Performance

- **Compiled JavaScript uses direct arithmetic for vectors and points of known
  width.** Scalar lists returned by helpers or held in local variables, and
  points passed to specialized helpers, skip redundant shape checks, broadcast
  fallbacks and small `.reduce` calls. `Dot` of two points with proven scalar
  coordinates is a direct multiply-add. Runtime inputs keep their checks.

## 0.128.6 _2026-09-10_

### Resolved Issues

- **Compiling nested shared scalar functions to JavaScript no longer takes
  excessive time.**

### Performance

- **Compiled JavaScript sums and products use direct arithmetic when their terms
  are proven scalar**, even when the declared result of a block permits
  collections. Collection terms still broadcast.

## 0.128.5 _2026-09-10_

### Performance

- **Faster compiled JavaScript for reductions and helper chains.**
  - Sums and products use real square roots and logarithms when a known lower
    bound proves the argument non-negative.
  - `Sum(Map(f, xs))` and `Product(Map(f, xs))` run in one pass, without an
    intermediate array, when the source and callback are pure.
  - Nested helper calls avoid unnecessary broadcasting when local variables and
    loop counters are proven scalar.

## 0.128.4 _2026-09-10_

### Improvements

- **The `interval-js` target compiles applications of small closed-form
  derivatives**, such as `Apply(Derivative(f, n), x)`.

### Resolved Issues

- **Compiled derivatives of odd roots stay real at negative inputs.** For
  `f(x) := ∛x`, compiled `f''(-1.2)` now returns approximately `0.16399052`
  instead of a complex value, as the interpreter does. This applies to all
  compile targets.
- **Compiled closed-form derivatives handle complex arguments.** `f''(z)` for
  `f(x) := x^3` now uses complex arithmetic when `z` is complex, instead of
  returning `NaN`.
- **Compiled `Dot` broadcasts list-valued point coordinates.** For points
  declared as `tuple<broadcastable<number>, broadcastable<number>>`, `Dot(a, b)`
  with `a = [1, [1, 2]]` and `b = [3, 4]` now returns `[7, 11]` instead of
  `NaN`. Complex point coordinates are not compiled.

### Performance

- **Repeated `Sum` or `Product` over the same range slice `P[a...b]` computes
  the result once** in compiled code.

## 0.128.3 _2026-09-10_

### Improvements

- **`Dot` of points whose coordinates may be lists returns the broadcast inner
  product.** With `L := [1, 2]`, `Dot((1, L), (3, 4))` is `[7, 11]`; it stayed
  symbolic before. `Dot(c, d)` for two `tuple<real, real>` symbols is now typed
  `real` instead of `number`.

### Resolved Issues

#### Compilation

- **Scalar calls keep their types through user-function chains and local
  variables.** A function that accepts points or lists can compile a scalar
  point call to shared JavaScript, GLSL and WGSL helpers without losing its list
  inputs.
- **A point built from a symbol that holds a number no longer compiles to code
  that throws.** `(⌊x⌋, ⌊y⌋, s)` with `s` assigned `2.41` emitted
  `[…, ...2.41]`, and each call raised "2.41 is not iterable".
- **A point plus a scalar is no longer compiled.** `(x, y) + 3` returned
  `[3.3, 3.7]` at `x = 0.3, y = 0.7`, while the interpreter reports
  `incompatible-type`. The expression is now left to the interpreter.
- **A compiled element-wise comparison marks an absent element with `NaN`
  instead of `false`.** `Equal([1, Missing], 1)` compiles to `[true, NaN]`, as
  the interpreter returns `[True, Missing]`. A piecewise over such a condition
  gives an absent result at that position instead of taking a branch. A `NaN`
  operand still equals nothing, and the scalar comparison still returns a
  boolean.

#### Types

- **`Dot` no longer reads the operands of any tuple-typed expression as
  coordinates.** `Dot(P + (0, 0), Q)` was typed `tuple<real, real>` and
  `Dot(2P, Q)` a union with a tuple, although both values are numbers.

### Performance

- **Point arithmetic and `Dot` compile to per-component code on the `javascript`
  target** when the width of the points is known. `2 · (1, 2)` compiles to
  `[(2 * 1), (2 * 2)]`.
- **Fewer runtime broadcasts in compiled user functions.** Calls that take
  points or use a bounded `Sum` can now be proven scalar. On one noise kernel,
  the time per sample went from 15.5 to 2.5 microseconds.

## 0.128.2 _2026-09-10_

### Behavior Changes

- **An absent value in a function with an undeclared result is `Missing`, not
  `NaN`.** With `g(t) := \begin{cases} t & t > 5\end{cases}`, `g(3) + 1` is now
  `Missing`. Declare the function, for example `g: (number) -> number`, to get
  `NaN`.

### Resolved Issues

- **Point accessors read a list whose element type is a union of tuple types as
  a list of points.** For `Q = [(a, 1), (2, b)]` with `a` and `b` declared
  `number`, `PointY(Q)` is typed `list<number>`. Before, `PointY(Q) + 1` had the
  wrong type and compiled JavaScript returned the string `"1,71"`.
- **A scalar cannot be added to a point that can be absent.** For a point with a
  restriction, such as `h(t) := (t, t+1)\{t > 0\}`, `h(1) + 2` was accepted, and
  compiled code returned the string `"21,2"`. It is now rejected as for a plain
  `tuple<number, number>`. A scalar multiple of such a point is still accepted.
- **An absent point stays absent instead of becoming `NaN`.** With `P` declared
  `list<tuple<number, number, number>>`, `2 \cdot P[0]` returned `NaN`, and
  `2 \cdot P[0] + (1, 1, 1)` then failed with `incompatible-type`. It is now
  `Missing`. `Add(Missing, (1, 1, 1))` and `Multiply(Missing, (1, 1, 1))` are
  also `Missing`. An operation typed as a number still returns `NaN`:
  `2 \cdot Missing` and `\sin(Missing)` are unchanged.

## 0.128.1 _2026-09-10_

### Breaking Changes

- **Compiled `Equal` and `NotEqual` are exact.** A compiled comparison of two
  numbers uses the IEEE 754 test (`===` in `javascript`, `==` in `python`), with
  no tolerance. The interpreter still compares within `engine.tolerance`, so
  `0.1 + 0.2 = 0.3` evaluates to `True` but compiles to `false`. This also
  applies to `KroneckerDelta` and to comparisons of collections. `NotEqual` is
  still `true` for `NaN`. For tolerant equality, evaluate with the interpreter.

### Resolved Issues

#### LaTeX Parsing and Serialization

- **Nested absolute values round-trip.** An `Abs` whose body contains a vertical
  bar serialized as `\vert\vert x\vert-0.5\vert`, which did not parse. It now
  serializes with `\left\vert … \right\vert`. The parser also accepts nested
  bars such as `\vert\vert x\vert-0.5\vert`, `|x-|y||`, `|\frac{|x|}{2}|` and
  `|x^{|y|}|`.
- **`\operatorname{real}`, `\operatorname{imag}`, `\operatorname{erf}` and
  `\operatorname{erfc}` parse** as `Real`, `Imaginary`, `Erf` and `Erfc`.

#### Compilation

- **An integer exponent over a possibly negative base is correct in GLSL and
  WGSL.** `(-1)^n` with a runtime `n` returned `NaN` on most drivers, because
  `pow(x, y)` is undefined for a negative `x`. The sign is now kept for an odd
  exponent.
- **A compiled point accessor treats a row with non-numeric cells as not a
  point.** `PointX(L)` over `[[1, "a"], [3, "b"]]` returned `[1, 3]`; it now
  returns `[1, "a"]`, as the interpreter does.

#### Types and Assignment

- **A value with a restriction can again be assigned to a declared symbol.** In
  0.128.0 this threw a `TypeCompatibilityError`:

  ```js
  ce.declare("P", "tuple<number, number>");
  ce.assign("P", ce.parse("(1,2)\\left\\{a>0\\right\\}"));
  ```

  It works again, with `ce.assign`, `ce.declare`, `Assign`, `:=` and
  destructuring declarations. `P.type` stays `tuple<number, number>`. With
  `a := -1`, `P` evaluates to `Missing`. `missing <: number` is still false, so
  the type of an undeclared symbol or of an expression still includes `missing`.

#### Collections

- **A point accessor over an empty list of points returns the empty list.**
  `PointX([])`, and `PointY`, `PointZ` over any empty collection, returned
  `Missing`, and `2 · PointX([])` returned `NaN`. `PointX([])` is now `[]`,
  typed `list<never>`. The empty case follows the element type:
  - a point element type (`list<tuple<number, number>>`), an unknown element
    type, or the literal `[]` returns `[]`;
  - a numeric element type (`list<number>`) is one point, so an empty one still
    returns `Missing` (`NaN` in compiled JavaScript);
  - any other element type (`list<string>`) returns `Missing`.

  Compiled JavaScript returns the same values. `PointX(s)` for `s` declared
  `string` now compiles to its first character instead of `NaN`.

### Performance

- **Higher-order derivatives of user functions (`f''(x)`, `f'''(x)`) compile
  much faster in JavaScript.** They use automatic differentiation: the third
  derivative of a nested radical went from 28.7 s and 392 KB of code to 1 ms and
  174 B. This also fixed `(x-e)·f'(e)`, which compiled to `NaN` when the body
  has a complex value.
- **Faster compiled complex arithmetic in JavaScript.** Complex operations no
  longer allocate a closure each. `i · b` compiles to `{ re: 0, im: b }`.
- **More constant folding in compiled code.** `\sum_{k=1}^{3}(-1)^{k}x` compiles
  to `(-x + x + -x)` instead of three `pow` calls. In GLSL and WGSL this also
  fixed a wrong value: a literal `pow(-1.0, 1.0)` is undefined in both
  languages.
- **Better common-subexpression elimination in compiled code.**
  `(sin(u)+1)^2 + 1/(sin(u)+1)` called `Math.sin` twice and now calls it once.
  Values moved out of a loop also share their subexpressions.
- **Element-wise arithmetic over lists of known width compiles to per-component
  code in JavaScript**, instead of a runtime broadcast. A reduction over a real
  vector no longer uses complex arithmetic.
- **A reduction over a range slice compiles to a loop.** `Sum`, `Product`,
  `Mean`, `Max`, `Min` and `Length` over `P[a...b]` no longer build the slice. A
  source that is not an array, or a bound that is not an integer, now returns
  `NaN` instead of throwing a `TypeError`.
- **`interval-js` kernels no longer rebuild constant intervals on each call.** A
  plotted `cases` expression is 25–40% faster per sample.

## 0.128.0 _2026-09-09_

### Breaking Changes

- **A false restriction evaluates to `Missing`, not `Undefined`.** When `c` is
  false, `When(e, c)` (the `e\{c\}` restriction) now evaluates to `Missing`, the
  same value as a `Which` with no selected clause or an `If` with no else
  branch. The element-wise form masks each element: `[10,20,30]\{[1,2,3] > 2\}`
  is `[Missing, Missing, 30]`. Compiled output is unchanged. Code that tested
  for `"Undefined"` must test for `"Missing"` (or use `IsMissing`, which now
  returns `True` for a masked value).

  The type of a restriction now includes the absent case: `When(5, x > 0)` is
  `integer | missing`, and a list with a masked element is
  `list<integer | missing>`. Only a restriction whose condition is the literal
  `True` keeps the bare type. Code that checks `type.matches("number")` must
  remove the `missing` member first.

- **On the JavaScript target, a compiled color is an object, not an array.**
  `compile()` now returns a color as `{ space, c0, c1, c2, alpha }`, where
  `space` is `'oklch'`, `'rgb'`, `'hsv'`, `'hsl'` or `'oklab'`, the channels are
  in that space, and `alpha` is `undefined` when there is none. Before, a color
  was a flat `[L, C, H]` (or `[L, C, H, alpha]`) OKLCh array, and a conversion
  such as `AsRgb` returned a flat array in its own space, with no way to tell
  them apart. Read `raw.space` and `raw.c0`…`raw.c2` instead of
  `raw[0]`…`raw[2]`. The color helpers throw a `TypeError` for a numeric array
  or an unknown `space`. A list of colors is an array of these objects; a color
  string is still a string. `ColorToColorspace` is not affected: it returns
  components, and its compiled value is still a plain array.

  Nested conversions are now correct: `AsRgb(AsRgb(c))` equals `AsRgb(c)` and
  `ColorDelta(AsRgb(a), b)` equals `ColorDelta(a, b)`. The interpreter fallback
  returns the same object and accepts one as a `vars` value. The GLSL and WGSL
  targets are unchanged: a color is still a `vec3` in OKLCh.

- **`ColorFromColorspace` returns a color.** Its signature is now
  `(color | tuple, string) -> color`.
  `ColorFromColorspace((0.5, 0.1, 20), "oklch")` is `Oklch(0.5, 0.1, 20)`; it
  was the sRGB components tuple `(0.58, 0.29, 0.29)`, while the compiled code
  returned a color. To get the old components, use
  `ColorToColorspace(color, "rgb")`. Passing the result to another color
  operator needs no change. Indexing the result (`At(result, 1)`) is now an
  `incompatible-type` error, because a color is not a collection. On the
  JavaScript target the compiled color keeps the space it was built in; on GLSL
  and WGSL, a shader whose whole expression is `ColorFromColorspace` and that
  expects OKLCh must wrap it in `AsOklch`.

### New Features

- **`Arg` compiles on the `interval-js` target** when the complex value is built
  in the expression (`a + ib`), for example `\arg((x - 0.3127) + i(y - 0.329))`.
  A box that crosses the branch cut on the negative real axis reports the jump.
  Other complex operands, such as `Sin(z)`, still fall back to the interpreter.

- **More fixed-width list expressions compile to straight-line code.**
  `Map(h, [e1, …, eN])` with a user function `h` becomes `[h(e1), …, h(eN)]`, so
  `Min(Map(h, list))` now compiles on `interval-js`. `Product([a, …])` and a
  `Reduce` over `Add`, `Multiply`, `Min` or `Max` compile to an n-ary operation:
  the JavaScript target emits `_.a * _.b * …` instead of a `reduce` over an
  array.

- **On the JavaScript target, the loop-invariant part of a `Reduce`/`Scan`
  combiner is computed once.** In
  `Reduce(list, (acc, x) ↦ acc + x·Sin(u)·Cos(v), 0)`, `Sin(u)·Cos(v)` was
  computed again for each element.

- **A point compiles on `interval-js` when it is the whole expression.**
  `Tuple(a, b)` and an all-scalar `PointList(a, b)` compile, and `run()` returns
  one `{lo, hi}` interval per coordinate. A point inside a larger expression
  (`2·(a, b)`) still does not compile on this target.

### Resolved Issues

#### Compilation

- **Compiled `Equal` and `NotEqual` are correct for `NaN` and for two infinities
  of the same sign** (JavaScript and Python). `NotEqual(NaN, 3)` compiled to
  `false`, for example `r \ne 3` when `r` was not given to `run()`; it is now
  `true`, as in the interpreter. `Equal(oo, oo)` compiled to `false`; it is now
  `true`. An impure operand (the `Random` family) is evaluated once.

- **An else-less `If` compiles.** `\mathrm{If}(x > 0, x + 1)` was refused by
  every target. It now compiles on all targets and returns `NaN` (for a number)
  when the condition is false. An `If` whose branch is a statement is unchanged.

- **A selection with no selected value compiles to the same absent value on a
  target.** A `Which` with no matching clause, an `If` with no else branch and a
  false restriction return `NaN` when the value is a number or of unknown type,
  and `undefined` (JavaScript) or `None` (Python) only when the value is
  provably not a number, such as a string. Before, `Which` and `If` could return
  `undefined` for a number, and Python always returned `float('nan')`, so a
  compiled `IsMissing` over a string selection disagreed with the interpreter.

- **A point passed to a user function whose parameter has no declared type
  compiles correctly.** With `r(P) := 2·P`, compiled `r((a, b))` returned `NaN`
  on JavaScript instead of `(2a, 2b)`. Such a call now compiles correctly on
  every target. When that is not possible (an impure argument, a recursive
  callee, or a body the interpreter rejects for a point), compilation fails and
  `fallback: true` uses the interpreter; before, it could return a wrong list.

- **A user function whose body uses an inner lambda parameter with the same name
  as a variable of the caller now compiles inline.** For example, a body that
  contains `Map(p ↦ …, list)` called from a definition that binds `p`.

- **A `Sum` or `Product` over a collection (`Sum(2n, Element(n, [3, 5, 7]))`)
  fails to compile with a clear message** instead of an internal error about
  `Nothing`. It still falls back to the interpreter.

- **An unrolled `Sum` or `Product` no longer uses complex arithmetic for a
  square root whose argument is a non-negative constant in each term.** For
  example `\sum_{i=1}^{6} (1 - j(1 - \sqrt{1 - 0.025^2(i - 0.5)^2}))\cdot s`
  compiled to six complex square roots.

- **A `Range` with a non-integer upper bound has integer elements.**
  `Range(1, 2.5)` and `Range(1, n)` with `n` declared `real` were typed
  `indexed_collection<real>`; they are now `indexed_collection<integer>`. An
  equality against such an index now compiles to `k === 9543` instead of a
  tolerance test.

- **An equality with an operand of type `integer | nan` (such as an element read
  `P[i]`) compiles to `===`/`!==`**, which gives the interpreter's result for
  `NaN`.

- **Shader float literals use the shortest single-precision spelling.** `2π` was
  emitted as `6.2831854820251465`; it is now `6.2831855`.

- **Constant factors inside parentheses are folded.** `\frac{2\pi s}{P}` with
  `P` assigned 100 emitted `(2 * Math.PI * s) / 100`; it now emits
  `(6.283185307179586 * s) / 100`.

#### Interval Arithmetic

- **Interval `sign` and `heaviside` are tighter.** `sign([0, 0.5])` returned
  `[-1, 1]`; it now returns `[0, 1]`. `heaviside` (with `H(0) = 1/2`) returns
  `[0.5, 1]` for an input with no negative part and `[0, 0.5]` for an input with
  no positive part. Only an input that spans zero keeps the full range.

- **Interval `atan2` reports a jump along its `x` operand.**
  `atan2([0, 0], [-1, 1])` returned the bounded interval `[0, π]`; it is now
  `singular` with the same enclosure. A `singular` result has a new optional
  `atOperand` field: the index of the operand that the `at` location refers to
  (absent for the first operand). `-0` is read as zero:
  `atan2([0, 0], [-1, -1])` is `+π`.

#### Colors

- **A tuple variable is no longer read as a color by compiled code.** With `v`
  declared `tuple<number, number, number>`, `ColorMix(v, Rgb(0, 0, 1), 0.5)`
  compiled but threw `Not a color` at run time on JavaScript, and gave a wrong
  color on the shader targets. Operators that take a color (`ColorMix`,
  `ColorDelta`, `ColorContrast`, `ContrastingColor`, `ColorToString`) now do not
  compile such an operand and fall back to the interpreter; the message suggests
  `AsRgb((r, g, b))`. The `As*` conversions and `ColorToColorspace` read it as
  0-1 sRGB components, as the interpreter does.

- **Color conversions of a possible list of colors compile again on
  JavaScript.** `AsRgb(w)` with `w` declared `broadcastable<color>` did not
  compile in 0.127.0, and before that converted one color channel by channel.
  `AsRgb("red")` compiles again too.

- **Nested color conversions give the interpreter's color in compiled code.**
  `AsRgb(AsRgb(Hsv(0.3, 0.5, 0.5)))` compiled to `[0.7137, 0, 0.3686]` instead
  of `Rgb(0.5, 0.2513, 0.25)`. This applies to all color operators. On GLSL and
  WGSL, a `Which` or `If` whose branches return colors in different spaces does
  not compile.

- **Compiled `ContrastingColor` returns an OKLCh color on JavaScript.** Before,
  `AsOklch(ContrastingColor(bg, AsRgb(a), AsRgb(b)))` read sRGB channels as
  OKLCh.

- **Compiled `AsHsv` and `AsHsl` of a non-finite color return `NaN` for all
  channels.** They returned a hue of `0` (red).

#### Absent Values and Types

- **`Add` and `Multiply` return `NaN` for an operand that evaluates to
  `Missing`.** With `g(3)` evaluating to `Missing`, `g(3) + 1` stayed
  `Add(Missing, 1)`; it is now `NaN`. A list operand gives `NaN` per element
  (`Add(Missing, [3, 4])` is `[NaN, NaN]`).

- **A juxtaposition with a maybe-absent operand is a product.** With
  `g(t) := \begin{cases} 0.5 & t < 1 \end{cases}`, `2g(0)` parsed as the tuple
  `(2, g(0))`; it is now `2 \cdot g(0)`. The same applies to `2x\{x>0\}`,
  `2\,\mathrm{If}(c, x)` and `t P\{0 \le t \le 1\}`. A non-numeric operand, such
  as a string, still gives a `Tuple`.

- **A maybe-absent `Sum`/`Product` bound is accepted.** `\sum_{x=g(0)}^{3} x`
  was an `incompatible-type` error; an absent value is now handled at
  evaluation. A non-numeric bound (`"lo"`) is still an error.

- **A bound written as the literal `NaN` is an error**, like one written as
  `Missing`: `Sum(x, (x, NaN, 3))` now reports `incompatible-type`.

- **`Partition` accepts a maybe-absent chunk size**, like `Take`, `Drop` and
  `Chunk`. `Partition([1,2,3,4], k(0))` with `k(0)` typed `integer | missing`
  was an `incompatible-type` error; it now returns `[[1,2],[3,4]]`.

- **A function with a `missing | T` result keeps its result type when it is
  assigned to a symbol declared `function`.** After
  `ce.declare('l', 'function')`, assigning a piecewise function without a
  default made `l(t)` of type `unknown`, so `\sin(l(t))` was typed
  `broadcastable<number>` instead of `number`.

### Performance

- **Faster compiled JavaScript.** A repeated `Min`/`Max` call is computed once;
  `Mod(a, 1)` uses a shorter formula; a factor of `1` is removed from a product;
  `PointX(PointList(a, b))` emits `a`; and `√a³` and `a^(3/2)` emit
  `a * Math.sqrt(a)` instead of `Math.pow` (also more accurate). Loop indexes
  and unrolled sums that cannot be `NaN` skip their run-time `NaN` tests. A
  product with one complex factor uses real multiplication for the real factors.

- **Faster compiled `interval-js` code.** Multiplying or dividing by a constant
  uses a cheaper operation; a constant such as `π/50` in `2πs/100` is computed
  at compile time; and a constant interval in a function or loop body is created
  once per call instead of once per use.

## 0.127.0 _2026-09-09_

### New Features

- **Fixed-width collections compile to scalar code on every target.** A
  collection whose width is known at compile time (a literal `List`, possibly
  exposed by inlining a user function) compiled to runtime array code on the
  JavaScript target and did not compile on `glsl`, `wgsl` and `interval-js`. The
  compiler now unrolls `Map(f, List(…))`, `PointX`/`PointY`/`PointZ` over a list
  of points, `Min`/`Max`/`Sum`/`Product` over a literal list, and scalar-list
  arithmetic. On JavaScript, a loop-invariant part of a `Map`, `Filter`,
  `CountIf` or `Find` callback is computed once instead of once per element. A
  nine-point Voronoi row written as user functions went from 58 to 2 µs per
  sample on JavaScript and now compiles on `glsl`, `wgsl` and `interval-js`.
- **Texture-backed `At` on the WGSL target.** With the `storage` compile option
  (`{ storage: { S: 'sampler2D' } }`), `At(S, k)` now compiles on WGSL. On GLSL
  and WGSL, a literal index and a gather of several indexes over a texture also
  compile (an out-of-range literal index gives NaN). These cases did not compile
  before.
- **Rest parameters on function literals.** The last parameter can collect all
  remaining arguments: `(a, ...rest) => …` in Epsil,
  `["Function", body, "a", ["Spread", "rest"]]` in MathJSON. `rest` is a `Tuple`
  of the trailing arguments (empty when there are none), and the function types
  as `(unknown, any*) -> R`. Spreading it back into a call passes the arguments
  on: `(...args) => Conjugate(g(...args))` applied to `(1, 2)` gives
  `Conjugate(g(1, 2))`. The rest parameter cannot have a type annotation.
  `compile()` refuses a function with a rest parameter. Named Epsil definitions
  accept one too: `h(a, ...rest) = Length(rest)` and
  `function h(a, ...rest) { Length(rest) }`.
- **`Primes`, the set of all prime numbers.** A lazy, infinite set like
  `Integers`: `Element(7, Primes)` is `True`, iteration yields 2, 3, 5, …, and
  `\sum_{p \in \mathbb{P}} p^{-2}` stays symbolic with an integer index.
  `\mathbb{P}` parses to `Primes` and serializes back.

### Resolved Issues

#### Compilation

- **User functions passed as values compile correctly.** A user function used as
  the callback of `Map`, `Filter`, `Reduce`, `CountIf`, `Find`, `Tabulate` and
  similar operators:
  - if its definition could not be compiled, the output compiled with
    `success: true` and then threw `TypeError: _f is not a function`. It is now
    refused at compile time with a message that names the function, and the
    default `fallback: true` uses the interpreter.
  - now broadcasts over an element that is itself a collection, as the
    interpreter does. For `f(x) := 2x`, the compiled `Map(f, [[1, 2], [3, 4]])`
    gave `[NaN, NaN]` and now gives `[[2, 4], [6, 8]]`. A multi-clause function
    gave strings such as `["3,61", "91"]`. A function with a collection
    parameter still receives the element whole, and a function whose parameters
    are declared scalar gives NaN for a collection element.
- **Built-in operators and inline function literals used as callbacks broadcast
  over a collection element.** Over `[[1, 2], [], [3]]`, `Map(Sin, xs)` now
  gives `[[sin 1, sin 2], NaN, [sin 3]]` and `Map((x) ↦ 2x, xs)` gives
  `[[2, 4], [], [6]]`; they gave NaN before.
- **A function parameter with the same name as a user function no longer
  compiles as a call of that user function.** With `gsh(t) := sin t + t²` and
  `psh(gsh, t) := gsh(t) + 1`, `psh(u, u)` compiled to a call of the global
  `gsh` and ignored its first argument. It is now refused.
- **`angularUnit = 'deg'` applies inside inlined user functions.** A `Sin` in a
  user function body inlined at a call site compiled without the degree
  conversion.
- **The compile targets respect `broadcastExemptions: ['tuples']`.** A tuple
  argument written at the call site was mapped element by element even for an
  operator that takes a tuple whole, so `AsRgb((1, 0, 0))` did not compile on
  JavaScript.
- **Infix operands of identity operations keep their parentheses.** `Abs` of a
  non-negative value, `Floor`/`Round` of an integer, `Re` of a real, `Identity`
  and similar operations inserted their operand without parentheses:
  `3·Re(x + 1)` compiled to `3 * _.x + 1`. Fixed on the JavaScript, GLSL, WGSL
  and Python targets.
- **WGSL emitted a two-argument `atan`, which WGSL does not have.** `Arctan2`
  and the argument of a complex value now emit `atan2`.
- **A compiled `Mod` with a non-literal divisor evaluated the divisor three
  times** (`2 mod sin(0.2θ)`, or `Random()`). It is now evaluated once.
- **Division by an exact rational compiles as a division.** `x/49` compiled to
  `0.02040816326530612 * x`, which is not correctly rounded: `floor(x/49)` gave
  0 at `x = 49`. The JavaScript, GLSL, WGSL, Python and interval-js targets now
  emit `x / 49`. A power-of-two denominator (`x/2`) still compiles to `0.5 * x`.

#### Interval Arithmetic

- **The `interval-js` target rounds every result outward.** Results were
  computed in round-to-nearest, so a product, a quotient or a transcendental
  function could give an interval that did not contain the true value. Inexact
  endpoints are now widened outward; exact results (an integer, `2 · 0.5`,
  `49/49`, `cos = 1`) stay points. Irrational constants (`\pi`, `e`), rationals
  such as `1/3` and radicals such as `\sqrt{2}` compile to two-ulp enclosures
  instead of a single point. `atan2` across its branch cut now contains π. A
  40-term sum went from 32 to 72 µs per call.
- **Rational powers and roots on `interval-js` are correct enclosures.** A
  rational power did not contain the true value in about 5% of random cases, and
  `Root` of a large operand failed in most cases. Exact results stay points:
  `8^(2/3)` is 4, `27^(2/3)` is 9 (it was 8.999999999999998), `Root(64, 3)` is 4
  and `Root(1000, 3)` is 10.
- **`Round(x, n)` on `interval-js` with a negative `n` scales exactly**, so an
  exact multiple of the step stays a point.

#### Types

- **Rest parameters type as variadic.** `f := (a, ...rest) => Length(rest)` was
  typed `(unknown, unknown) -> integer`; it is now `(unknown, any*) -> integer`,
  so `f(1)` and `f(1, 2, 3)` are valid. A literal with a rest parameter matches
  a variadic declaration such as `(integer, any*) -> integer`. An Epsil
  definition with a type parameter, `function h<T>(x: T, ...rest) -> T { … }`,
  is typed `(x: T, any*) -> T where T`; `h(1)` and `h(1, 2, 3)` were errors.
- **`f(L) := Sum(L)` treats `L` as a collection, so `f([1, 2, 3])` is 6.** It
  gave `[1, 2, 3]`, because `L` had type `unknown` and the call was mapped over
  the list. A `Sum(L)` or `Product(L)` with no index over a symbol with no other
  type information now types the symbol as a `collection`.
- **The index of a `Sum`/`Product` over an `Element` clause has the element type
  of the collection.** It was always `integer`, so
  `Sum(2x, Element(x, [0.5, 1.5]))` threw, and a sum over a set of functions
  gave an `expected-function` error.
- **Generic signatures narrow their operands.** For
  `f: (T) -> T where T: number | function`, `f(u) + 1` now types `u` and the sum
  as `number` (the sum was `function | number`). An operator declared
  `(T) -> T where T: number` with a `canonical` handler now types an undeclared
  operand as `number`.
- **`LinearRegression(xs, ys, x)` and `PolynomialFit(xs, ys, n, x)` are typed
  `number`.** `LinearRegression([1,2,3],[2,4,6],x)` was typed
  `tuple<number, number>` while it evaluates to `2x`.
- **The LaTeX pipe shorthand has a type.** `[1,2,3] |> \_^2` was typed `unknown`
  and is now `list<integer<0..>^3>`; `[1,2,3] |> \mathrm{Length}(\_) + 1` is
  `integer`. A `type` handler's `context.derive` now also maps a broadcastable
  operator over a collection operand: `derive('Power', [d, 2])` with `d` typed
  `list<integer^3>` gave `number`.
- **A second pipe on the same engine no longer throws.** After `xs |> \_^2`,
  `xs |> Take(\_, 2)` threw "Function body must be a scoped Block expression",
  and `[1,2,3] |> Sum(\_)` gave the list itself.

#### Arithmetic and Numerics

- **Assumed inequality bounds are exact.** A bound was rounded to a JavaScript
  number: after `assume(v > 1 - 10^{-30})`, `v > 1` was "proven" and
  `assume(v < 1)` was rejected as a contradiction. Bounds are now compared
  exactly, and `ce.ask(['Greater', 'x', '_k'])` gives the exact bound (`1/3`,
  not `0.333…`).
- **`Covariance` and `PopulationCovariance` no longer overflow on large data.**
  `Covariance([1e200, -1e200, 0], [1e200, 1e200, -2e200])` gave `NaN`; it is 0.
  A covariance larger than the largest double is `+oo`.
- **`Conjugate` accepts a function.** `Conjugate(f)` is `(x) ↦ Conjugate(f(x))`.

#### Colors

- **A bare tuple as a color argument is 0–1 sRGB everywhere.** The compiled
  targets read it as OKLCh: `ColorToString((1, 0, 0))` gave `#ff0000` in the
  interpreter and `#ffffff` when compiled. A list of three numbers is not a
  color. `AsRgb`, `AsHsv`, `AsHsl`, `AsOklab` and `AsOklch` now accept a color
  string and a tuple (`AsRgb("#ff0000")` was `incompatible-type`).
- **Color strings are validated the same way everywhere.** A string that names
  no color is refused by every operator (`ColorMix("bogus", "#ffffff")` gave a
  half-transparent grey). A four-digit hex color (`#f00f`) is read as CSS reads
  it. Malformed strings such as `rgb(255, 0, 0` and `#gg0000` are refused.
  `#00000000` and `rgba(0, 0, 0, 0)` are transparent black instead of an error.
  A color tuple must have three or four finite numeric components.
- **Color operators give the same results in the interpreter and in compiled
  code.** On GLSL and WGSL, `ColorContrast(Rgb(0,0,0), Rgb(1,1,1))` gave about
  −114 instead of about −1.079, so `ContrastingColor` chose black for a 0.6
  grey. `ColorFromColorspace(Rgb(1,0,0), "rgb")` was not red when compiled.
  `"hsv"` is accepted by `ColorToColorspace`/`ColorFromColorspace` everywhere.
  `Colormap` samples the same color as `ColorMix`. `ColorToString(c, "oklch")`
  keeps out-of-gamut chroma when compiled.
- **`ContrastingColor` returns the chosen candidate in its own color space.**
  `ContrastingColor(Oklch(0.98, 0.02, 90), Oklch(0.2, 0.1, 29), Oklch(0.95, 0.2, 264))`
  now gives `Oklch(0.2, 0.1, 29)` instead of an `Rgb` value.

### Performance

- **Compiled JavaScript caches the last call of a pure user function** that is
  called from several places inside other user functions. A repeated call with
  the same arguments (and the same variable values) returns the cached result. A
  nine-point Voronoi row went from 3.4 to 2.7 µs per sample.
- **Fewer runtime shape checks in compiled user functions.** Inside a user
  function body, a call that passes on a scalar parameter of that function is a
  direct call. An untyped chain `f(x) := g(x) + 1`, `g(x) := 2h(x)`,
  `h(x) := x²` went from 155 to 77 ns per call.
- **`interval-js` compiles a subtraction as one `sub` call** instead of an
  addition of a negation.
- **Better generated code on the JavaScript, GLSL and WGSL targets.** Literal
  arithmetic is folded; loop-invariant parts of a `Sum`/`Product` body are
  computed once before the loop; user function bodies on GPU targets share
  common subexpressions; the GPU preamble includes only the helpers the shader
  uses. GLSL uses `fract`, `exp2`, `dot` and inline small integer powers where
  possible, and rounds half away from zero like the interpreter. JavaScript
  compiles an equality of integers to `===`, and `\arg(a + i b)` and `|a + i b|`
  to `Math.atan2` and `Math.hypot`.

## 0.126.2 _2026-09-08_

### New Features

- **New `expr.isMachineNumeric` property.** It is `true` when
  `ce.list(expr.array)` reproduces the list exactly: every element is a float or
  an integer that a double holds. It is `false` when an element is an exact
  non-integer, such as `1/2` (`expr.array` reads it as `0.5`, but `0.5 / 3` is a
  float where `1/2 ÷ 3` is `1/6`). On a number, the same rule applies to the
  number. It is `false` for all other expressions.

### Resolved Issues

#### Compilation

- **Complex compile mode: a call to a user function could give a wrong result.**
  With `b(x) := If(x > 0, x, 3)`, `b(z) + z` on a complex `z` computed
  `"1[object Object]"`. It now gives `4 + 2i`. Also, a call to a function whose
  body already returns a complex value is no longer wrapped in an unnecessary
  conversion.
- **The `python` target no longer binds a repeated square as a list
  comprehension.** `(x^2+1)/(x^2-1)` compiled to
  `[(_cse1 + 1) / (_cse1 + -1) for _cse1 in [x ** 2]][0]` since 0.126.0. It is
  again `(x ** 2 + 1) / (x ** 2 + -1)`.
- **`interval-js` target: a `\sum` with a fixed number of terms is up to 4×
  faster.** Constant subexpressions are computed at compile time and terms that
  do not depend on the index are computed once per call. Results do not change.
- **`interval-js` target: `GCD`, `LCM` and `Binomial` of an integer at or above
  `2^53` did not return.** They now return a wide enclosure.

#### Collections

- **`expr.array` threw a `RangeError` for an exact rational outside the double
  range.** It now returns `undefined`, and `isMachineNumeric` is `false`.
- **A user function applied to a list-typed symbol that has no value yet stays
  unevaluated.** With `xs: list<integer>` declared but not assigned,
  `h(n: integer) = n + 1; h(xs)` gave an `incompatible-type` error. It now
  evaluates to `h(xs)`, and to `[2, 3]` once `xs = [1, 2]`. With an untyped
  parameter, `pair(n) = (n, n); pair(xs)` no longer becomes `(xs, xs)`.

#### Other

- **Chained set relations.** `A ⊂ B ⊂ C` and a one-operand `Subset(D)` boxed
  with an error. `Subset`, `SubsetEqual`, `Superset` and `SupersetEqual` now
  accept one or more operands. A chain evaluates all adjacent pairs (`ℤ ⊂ ℝ ⊂ ℚ`
  is `False`; before, only the first pair was checked). The LaTeX
  `\mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}` parses to
  `Subset(Integers, RationalNumbers, RealNumbers)`, as `a < b < c` parses to
  `Less(a, b, c)`.
- **An operator with only an `evaluateAsync` handler is awaited inside `Sum`,
  `Product` and `Block`.** `Σ_{i=1}^{3} AsyncOnly(i)` and
  `{x = 1; AsyncOnly(x)}` stayed unevaluated with `evaluateAsync()`.

## 0.126.1 _2026-09-07_

### Resolved Issues

- **`expr.array` no longer approximates exact elements at
  `precision: "machine"`.** `["List", 1, ["Rational", 1, 3]]` returned
  `[1, 0.3333333333333333]`. It now returns `undefined`, as at other precisions.
  An exact value is accepted only when a double holds it exactly (for example
  `2^70` or `3/4`).
- **`javascript` target: faster selection over a list declared as
  `indexed_collection<number>`** (1.73 ms to 0.4 ms for a 200×200 Game of Life
  step).
- **A function literal with wildcard parameters round-trips through LaTeX.**
  `() \mapsto 2` parsed as a function of one parameter named `Nothing`, and
  `() \mapsto \_ + 1` applied to `3` returned `_ + 1`. Both now parse as
  `["Function", body]`. Also, `x_1 \mapsto x_1 + 1` serialized as
  `()\mapsto x_1+1`, which lost the parameter.

## 0.126.0 _2026-09-07_

### New Features

- **`ce.list(values)` builds a `List` of numbers quickly.** The input can be a
  `number[]`, a `Float64Array` or any array-like of numbers. A 40 000-element
  list is created in a fraction of a millisecond instead of about 5 ms. The
  result is the same as `ce.box(['List', ...])`. A non-number element throws a
  `TypeError`.
- **`expr.array` reads a `List` as plain machine numbers.** It is `undefined`
  when an element is not a machine number (an exact rational such as `1/3`, a
  radical, a complex number, a symbol, a nested list): values are never
  approximated. The array can be passed directly to a compiled function.

### Improvements

- **Generated code shares repeated squares and specializes more numeric
  operations** on the JavaScript, GLSL and WGSL targets.
- **`javascript` target: numeric selections over arrays run in one loop**, with
  no intermediate arrays.
- **`javascript` target: a list-declared input accepts a typed array.** A
  `Float64Array` passed for a `list<number>` or `vector<3>` input was read as a
  scalar and gave `NaN`. It is now copied into a plain array.

### Behavior Changes

- **`javascript` target: a symbol declared with a scalar type no longer
  broadcasts over a list.** With `u` declared `number` and `f(x) = 2x + 1`,
  `run({ u: [1, 2, 3] })` for `f(u)` returned `[3, 5, 7]`; a list is now outside
  the declared contract. A symbol whose type was inferred from use still
  broadcasts.

## 0.125.1 _2026-09-07_

### Improvements

- **Faster generated code on the JavaScript, GLSL and WGSL targets.** Repeated
  expressions are computed once, including in sums and products; small powers
  use multiplication; loops use constant bounds when known; array reads skip
  checks when the index is proven in range; and fewer function wrappers are
  emitted.
- **`javascript` target: list pipelines are about 10× faster.** A Game of Life
  step over a 40 000-cell board went from 13.3 ms to about 1.1 ms. Results do
  not change.
- **`javascript` target: a symbol with an assigned value is computed once per
  compiled function, not on every call.** A plot that read a 22 500-element list
  per pixel went from about 180 ms to 1.5 µs per sample.

### Resolved Issues

- **Interval compilation: a piecewise expression with no matching branch and no
  default returns `empty` instead of `entire`.**
- **`simplify()` treats `\log_e` as `\ln`.** `\log_e(x)` simplifies to `\ln(x)`,
  `\ln(x) + \log_e(y)` gives `\ln(xy)`, and `\log_e(x^3) - 3\ln(x)` gives `0`.
  Contributed by @yelliver (#332).

## 0.125.0 _2026-09-06_

### New Features

- **GLSL target: read a fixed-length list from a texture.** The new `storage`
  compile option stores a list symbol in a sampler instead of a uniform array:

  ```js
  glsl.compile(ce.box(["At", "S", "k"]), { storage: { S: "sampler2D" } });
  ```

  The host declares `uniform sampler2D S;` and uploads a single-channel float
  texture with the list in row-major order from texel (0, 0). Indices are
  1-based, a negative index counts from the end, and an invalid index reads as
  NaN. The symbol can be read only with `At` and a runtime index. The option is
  ignored on the other targets, and WGSL does not support it.

## 0.124.3 _2026-09-06_

### Breaking Changes

- Operator `type` handlers now return `BoxedType | undefined`. Return
  `context.engine.type('real')` for a fixed result, or
  `context.engine.type(computedType)` for a computed result. `undefined`
  continues to use the declared signature fallback.
- `BoxedType.type` is now readonly. Use `engine.type(newType)` to construct a
  boxed type with a different value.

### Improvements

- **Faster symbolic operations**: simplification is 14–16% faster, solving 7%,
  integration 9%, and definite integrals 25%, compared with 0.124.2.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE 0.124.3 | CE 0.100.0 | SymPy | math.js | Mathematica |
| ------------------ | ---------: | ---------: | ----: | ------: | ----------: |
| $\pi^2$            |        9.1 |        7.9 |   179 |     106 |         3.9 |
| $\sin 1$           |         22 |         21 |   227 |     496 |         5.1 |
| $\cos 1$           |         21 |         21 |   221 |     536 |         7.1 |
| $\ln 2$            |         16 |         14 |   347 |   4,428 |         3.7 |
| $e^{\pi}$          |         14 |         13 |   212 |   4,824 |         4.6 |
| $\zeta(3)$         |      1,585 |      1,602 |   268 |       — |          49 |
| $\Gamma(\tfrac13)$ |        863 |        829 |   362 |       — |         213 |
| $\psi(\tfrac13)$   |        726 |        712 | 2,835 |       — |         171 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (**higher is better**). `—` means the engine can't do the case. The **CE +
R/F** column loads the optional Rubi integration rules and Fungrim identities
(`loadIntegrationRules` / `loadIdentities`).

| Operation                              | CE 0.124.3 | CE + R/F | CE 0.100.0 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :--------: | :------: | :--------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |            |          |            |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |    2.9×    |   1.8×   |    3.0×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |    6.4×    |   1.2×   |    6.0×    | 0.09×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |    3.5×    |   0.6×   |    3.8×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |     —      |   1.4×   |     —      |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |     —      |   0.8×   |     —      | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |     —      |   0.8×   |     —      | 0.007× |    —    |     1×      |
| **Derivatives**                        |            |          |            |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |   0.03×    |  0.03×   |   0.02×    | 0.001× | 0.004×  |     1×      |
| **Simplification**                     |            |          |            |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |    36×     |   27×    |    30×     |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |    64×     |   55×    |    49×     |  3.2×  |   17×   |     1×      |
| **Evaluation**                         |            |          |            |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |    27×     |   11×    |    32×     |  2.9×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |    3.8×    |   3.1×   |    3.6×    |  2.1×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |   1693×    |  2285×   |   3777×    |  83×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |    186×    |   86×    |    230×    |  2.5×  |    —    |     1×      |
| **Solving**                            |            |          |            |        |         |             |
| $x^4+x^2-1=0$                          |    0.2×    |   0.2×   |    0.2×    | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |    1.5×    |   1.6×   |    1.4×    | 0.04×  |    —    |     1×      |

<sub>Measured 2026-09-06 on Node `v22.13.1` with SymPy `1.14.0`, math.js
`15.2.0` and Mathematica `14.3.0`. Correctness is verified against an
independent `mpmath` reference.</sub>

## 0.124.2 _2026-09-06_

### Performance

- **Symbolic evaluation is 5–12 % faster on simplification and solving, and
  about 4–10 % faster on indefinite integrals.** For example, solving
  `x⁴+x²−1=0` went from 3.17 ms to 2.86 ms, and `∫1/(x³+1)dx` from 2.66 ms to
  2.39 ms. Results are unchanged.

## 0.124.1 _2026-09-06_

### Resolved Issues

- **A coordinate accessor over a value that may be one point or a list of points
  now canonicalizes.** With `P` declared
  `list<tuple<number, number>> | tuple<number, number>`, `PointX(P[2])` reported
  an `incompatible-type` error. An operand with no compatible type is still
  refused: `PointX(5)` is still an error.
- **A chained slice no longer makes its base a collection of collections.** With
  `Z` undeclared, `(Z[1..p-1])[W] = Z[p]` was typed `list<boolean | missing>`,
  so a `Filter` with that comparison as predicate was refused. It is now typed
  `broadcastable<boolean>` and the predicate is accepted.
- **`glsl` target: `Dot` over a point list whose component is itself a `Dot`
  compiles again.** It reported that `dot` "has no array overload". Lists of
  complex values, booleans, strings or lists still do not compile.
- **`interval-js` target: a power whose base reaches zero is no longer reported
  as clipped.** A base of `[0, 2]` with an exponent interval such as
  `[1.9, 2.1]` returned a partial result, so a smooth field looked
  discontinuous. The base is now clipped only when it has a negative part or the
  exponent can be negative. The upper bound at such a pole is now `+∞`, and an
  exponent that spans zero no longer excludes reachable values (`[0, 2]^[-1, 3]`
  contains `0.5³`).

### Performance

- **Symbolic evaluation is 25–45 % faster than 0.124.0** on simplification,
  integration, solving and construction of expressions with exact literals such
  as `√6`. For example, simplifying `√6x + √2x` went from 1.53 ms to 0.96 ms,
  and `∫1/(x³+1)dx` from 4.7 ms to 3.1 ms. Results are unchanged.

## 0.124.0 _2026-09-05_

### Breaking Changes

- **Epsil: a bare lowercase library name refers to the library definition.**
  Because of the new lowercase spellings (see New Features), `mean`, `sum`,
  `count`, `pi` and the other spellings resolve to the library when nothing in
  the program or the engine binds them: `mean + 1` is now a type error, where it
  was a sum with an unknown `mean`. Declare the variable (`let mean = 5`) to
  shadow the library name. MathJSON is not affected (`["Add", "mean", 1]` still
  names an unknown symbol), but the engine aliases `print` and `input` are
  removed: use `Print` and `Input` in MathJSON.
- **Epsil: a `let`/`const` cannot re-declare a name of its own scope.** This
  includes an earlier `let` of the same block, a parameter of the enclosing
  function, and the index of the enclosing loop:
  `function f(x) { let x = x + 1; x }` is now a `variable-redeclaration` error,
  reported by `epsil check`. Before, the interpreter and compiled JavaScript
  gave different results. Shadowing a name of an outer scope in a nested block
  is still allowed, and the shadowing `let` now reads the outer name on each
  loop turn: `let t = 1; for k in 1..3 { let t = t * 2; xs = Append(xs, t) }`
  collects `[2, 2, 2]`, where it collected `[2, 4, 8]`. To update a binding,
  assign to it. A top-level `let` in a re-run notebook cell still re-declares.

### New Features

#### Epsil

- **Lowercase spellings for the standard library.** Every library function and
  constant can be written with an initial lowercase letter: `sin(x)`,
  `map(f, xs)`, `isPrime(7)`, `gcd(12, 18)`, `pi`, `print("hi")`. The MathJSON
  names (`Sin`, `Map`) still work. Names with a dedicated syntax (`Add` is `+`,
  `If` is `if`) have no lowercase spelling. A user binding shadows the spelling.
  Hosts that call `parseEpsil` and box the tree themselves must call the new
  `resolveLibraryNames(tree, source, ce)` first.
- **Common mathematical Unicode notations.** Double-struck letters are types
  (`c: ℝ` is `c: real`; also `ℤ`, `ℚ`, `ℂ`, `ℕ`, and in `ce.declare('x', 'ℝ')`).
  `√3`, `∛8` and `∜16` are radicals (`√2x` is `Sqrt(2)·x`). Superscripts are
  exponents (`x²`, `x⁻¹`, `xⁿ⁺¹`). A subscript of letters and digits joins the
  name (`xₙ` is the symbol `x_n`); other subscripts give a `Subscript` (`xₖ₊₁`).
  `∫`, `∑` and `∏` are `Integrate`, `Sum` and `Product`. The highlighter and the
  VS Code grammar support these notations.
- **Unicode output.** The serializer option `fancySymbols` (command line:
  `epsil --epsil --fancy-symbols`; MCP `serialize` and `evaluate`:
  `fancySymbols: true`) writes `√x`, `∛x`, `∜x` and `x²`, with parentheses where
  needed (`√(x + 1)`, `(−x)²`). The default output stays ASCII. The `--epsil`
  output now writes a square as `x ^ 2` instead of `Square(x)`.
- **Dot call for protocol functions.** `c.area()` is `area(c)` and `c.scale(2)`
  is `scale(c, 2)`, so calls chain (`c.scale(2).area()`). Named arguments follow
  the receiver (`c.scale(k: 2)`), and `c.(Shape.area)()` names the protocol when
  two protocols declare the same member. Other functions are the new error
  `dot-call-not-a-protocol-function` (`xs.Sort()`). `c.area` without parentheses
  is still a field read, and a declared field still wins over a member of the
  same name.
- **`epsil check --effects` reports the inferred effects of each top-level
  function**, for example `f (line 1): console` or
  `g (line 2): pure (declared)`. With `--json` the report is the `effects`
  array; the MCP `check` tool accepts `"effects": true`. The VS Code hover shows
  the same line.

#### LaTeX Parsing and Serialization

- **Typed lambda parameters.** `(i: integer) \mapsto 2i` and
  `(f: (real) -> real) \mapsto f(1)` parse to `Function` literals with typed
  parameters and serialize back as `(i\colon integer)\mapsto 2i`. Other uses of
  a colon (set-builder, piecewise, `f: A \to B`) are unchanged.
- **Inline lambda application.** `(x \mapsto 2x)(3)` and
  `((x, y) \mapsto x + y)(2, 3)` evaluate to `6` and `5`; they parsed as
  products. A power on the argument list applies to the application:
  `(x \mapsto 2x)(3)^2` is 36, and `(f)(3)^2` reads as `f(3)^2`.

#### Types

- **A use of an element refines the collection's element type.** `xs[1] + 1`
  makes an undeclared `xs` an `indexed_collection<number>`, `xs["a"] + 1` a
  `dictionary<number>`, and `m[1][2] + 1` makes `m` an
  `indexed_collection<indexed_collection<number>>`. A lambda parameter shows the
  refinement: `(v) => v[1] + 1` is typed
  `(v: indexed_collection<number>) -> broadcastable<number>`. A later assignment
  replaces the inferred type, and a declared type is never changed. This applies
  to `At`, `First`, `Second`, `Third` and `Last`; an operator definition can
  declare its own rule with the new `inferOperandTypes` handler.

### Resolved Issues

#### LaTeX Parsing and Serialization

- **A set-builder with several conditions now parses as a comprehension.**
  `\{ k : k \in \{1, 2, 3\}, k > 1 \}` parsed as a two-element set; it now
  evaluates to `{2, 3}`. The domain can also be on the left of the colon
  (`\{ k \in S : k > 1, k < 3 \}`). A trailing comma in a set literal or a
  piecewise no longer adds a stray element.
- **An inferred parameter type is no longer serialized.** With `C` a list of
  integers, `\operatorname{Filter}(C, Z\mapsto 0<|Z|)` printed
  `(Z\colon integer)\mapsto…`. A written annotation still round-trips. To see
  inferred annotations, use `toMathJson({ inferredAnnotations: true })`.

#### Epsil

- **A multi-clause function with a typed scalar parameter maps over a
  collection.** With `fib(n: integer) = …` defined by clauses,
  `5..10 |> fib |> Sum` failed with `incompatible-type`; it now returns `136`.
- **A number literal keeps all its digits.** `12345678901234567890.5` parsed as
  `12345678901234570000`, `1e400` as `Infinity`, and hexadecimal or binary
  integers above 2^53 were rounded.
- **Serialized Epsil re-parses to the same expression.** `Power(-2, 2)`,
  `Power(Power(x, 2), 3)`, `Subtract(a, Subtract(b, c))` and `Factorial(-2)` now
  serialize as `(-2) ^ 2`, `(x ^ 2) ^ 3`, `a - (b - c)` and `(-2)!`.
- **A `match` or `if let` pattern that starts with an unknown glyph reports an
  error.** `match x { ⊕ => 1 }` silently dropped the case.
- **A destructuring comprehension binder gets its type from the collection.** In
  `[p + q for (p, q) in pairs]` with `pairs: list<tuple<number, number>>`, `p`
  and `q` are `number`. A pattern of the wrong arity, or a name bound twice, is
  now an error.
- **An empty block evaluates to `Nothing`.** `if 1 < 2 { }` returned the empty
  block `{}` with type `unknown`; it now has type `nothing`.
- **A return-type annotation no longer gives a function the effects of the
  lambda it returns.**
  `function make() -> ((number) random -> number) { x => Random() * x }` was
  typed `() random -> …`; it is now pure.

#### Types

- **`q + 1` with `q: boolean | missing` is now refused**, as `Sin(q)` already
  was. `unknown | missing` and `list<number> | missing` are still accepted.
- **A collection of non-numbers at a numeric element-wise operator is refused
  when boxed.** `Ln(["a", "b"])` and `Add(["a"], 1)` are now `incompatible-type`
  errors, as `Sin(["a", "b"])` already was. A collection that could hold numbers
  (such as `list<integer | string>`) is still checked per element at evaluation.

#### Compilation

- **A compiled function no longer returns a string when given a matrix where it
  expects a list of numbers.** With `h := (v) => v[1] + 1`, the compiled `h` on
  `[[1, 2], [3, 4]]` returned `"1,21"`. It now throws an error that suggests
  declaring the parameter as `list<list<number>>` or `matrix`.
- **`javascript` target: a `Sum` with index `i` gives correct results.**
  `\sum_{i=1}^{3}\cos(i(|x|-\sqrt{9.81/k[i]}\,t))` returned `"[object Object]…"`
  because `i` was read as the imaginary unit. With `mode: "complex"` it also
  returned a wrong value.
- **`javascript` target: `Abs` of a parameter that may be a point or a point
  list is decided at run time.** With `g(P) := |P - (4, 0)|`, `g((5, 1))`
  returned `[1, 1]` instead of `√2`. A point subtracted from a point list is now
  subtracted from each point.
- **`interval-js` target: `Arctan2` over a box that crosses its branch cut
  reports a jump.** It returned a bounded interval; it now returns `singular`
  with the enclosure `[-π, π]`.
- **`interval-js` target: a domain clip is kept by the operations above it.**
  `x + \sqrt{x^2 - 0.01}` over `x ∈ [-0.3, 0.3]` returned a bounded interval,
  although the function is undefined on `|x| < 0.1`; it now returns `partial`.
- **`python` target: a `for` loop over a `Range` with a non-integer bound
  matches the interpreter.** A symbolic bound of `2.5` raised `TypeError`, and a
  literal bound of `5.5` walked `5, 4, …` instead of `5.5, 4.5, …`.

#### Arithmetic and Numerics

- **A subscript with a computed index evaluates.** With `k := 3`, `x_{k+1}`
  evaluates to the symbol `x_4`, and to its value when `x_4` is assigned.
- **Recursive functions in a comprehension are no longer recomputed for each
  element.** `[P(i) for i in 0..n]`, with `P(i)` defined from `P(i-1)`, called
  the step function n(n+1)/2 times; it now calls it n times.
- **An asynchronous-only operator inside a comparison, `If` or `Which` is
  awaited.** `Less(15, AsyncOnly(2)).evaluateAsync()` returned
  `15 < AsyncOnly(2)`. Inside the body of a big operator or a block, such an
  operator still stays unevaluated.
- **`GammaRegularized(a, z)` evaluates for a negative non-integer `a`.**
  `GammaRegularized(-1/2, 2)` is now `−0.00849…` and `GammaRegularized(-1/2, 0)`
  is `−∞`. A negative `z` still stays symbolic.
- **`Variance`, `Covariance` and `Correlation` are accurate for data far from
  zero.** `Variance([10⁸+1, 10⁸+2, 10⁸+3])` returned `0` instead of `1`, and
  `Correlation([1.5e200, 2.5e200, 3.5e200], [1, 2, 3])` returned `NaN`; it is
  now `1`. `Correlation` is typed `real<-1..1>`.
- **Operations whose work grows with an argument value are bounded.**
  `Eulerian`, `Stirling`, `NPartition`, `StirlingS1`, `BernoulliB`,
  `MatrixPower`, `Chunk` and others could run without limit or exhaust memory
  (`Stirling(4000, 2000)`). Past a limit they now stay symbolic or report
  `iteration-limit-exceeded`. `Eulerian(60, 30)` now returns immediately.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE 0.124.0 | CE 0.123.2 | SymPy | math.js | Mathematica |
| ------------------ | ---------: | ---------: | ----: | ------: | ----------: |
| $\pi^2$            |         10 |         12 |   175 |     103 |         3.9 |
| $\sin 1$           |         22 |         23 |   219 |     438 |         5.1 |
| $\cos 1$           |         21 |         23 |   216 |     522 |         7.1 |
| $\ln 2$            |         15 |         17 |   342 |   4,364 |         3.7 |
| $e^{\pi}$          |         14 |         16 |   211 |   4,659 |         4.6 |
| $\zeta(3)$         |      1,538 |      1,587 |   270 |       — |          49 |
| $\Gamma(\tfrac13)$ |        855 |        839 |   339 |       — |         213 |
| $\psi(\tfrac13)$   |        729 |        723 | 2,795 |       — |         171 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is (**higher
is better**). `—` means the engine can't do the case. **CE + R/F** is the
current build with the optional integration rules and identities loaded
(`loadIntegrationRules` / `loadIdentities`).

| Operation                              | CE 0.124.0 | CE + R/F | CE 0.123.2 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :--------: | :------: | :--------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |            |          |            |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |    2.2×    |   1.4×   |    1.7×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |    5.0×    |   0.9×   |    3.6×    | 0.09×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |    2.1×    |   0.6×   |    1.7×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |     —      |   0.7×   |     —      |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |     —      |   0.5×   |     —      | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |     —      |   0.5×   |     —      | 0.007× |    —    |     1×      |
| **Derivatives**                        |            |          |            |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |   0.02×    |  0.02×   |   0.01×    | 0.001× | 0.004×  |     1×      |
| **Simplification**                     |            |          |            |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |    16×     |   15×    |    14×     |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |    23×     |   20×    |    16×     |  3.2×  |   20×   |     1×      |
| **Evaluation**                         |            |          |            |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |    23×     |   11×    |    19×     |  3.0×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |    3.1×    |   3.0×   |    3.0×    |  2.1×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |   1441×    |  2430×   |   1187×    |  85×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |    140×    |   57×    |    118×    |  2.5×  |    —    |     1×      |
| **Solving**                            |            |          |            |        |         |             |
| $x^4+x^2-1=0$                          |   0.08×    |  0.08×   |   0.08×    | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |    1.0×    |   1.1×   |    1.0×    | 0.04×  |    —    |     1×      |

<sub>Measured 2026-09-05 · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0` (carried over from the 2026-08-19 run) · Node `v22.13.1`. Correctness
is verified against an independent `mpmath` reference.</sub>

## 0.123.2 _2026-09-04_

### Improvements

- **Typing a large list of tuples is about three times faster.** Typing a list
  of 5,000 pairs of radicals is about ten times faster.
- **Growing a list one element per loop turn is much faster.**
  `xs = Join(xs, [k])`, `xs = Append(xs, k)` and `xs = [...xs, k]` in a loop
  took 2.9 s for 400 turns and about 30 s for 1000; they now take 89 ms and 379
  ms. A `Join` of list literals, and an `Append` to a list literal, now become
  one list literal at canonicalization: `Join([1, 2], [3])` is `[1, 2, 3]`. Such
  a result is no longer a lazy collection, and its type carries the shape:
  `Join([1, 2, 3], 10)` types `vector<integer^4>` (was `list<integer>`).

### Resolved Issues

- **Real-only functions over a list that may hold complex values now compile in
  the `auto` and `complex` modes.** `Min`, `Max`, `Floor`, `Mod`, the statistics
  functions and the ordering comparisons over such a list (`√L` for
  `L: list<real>`, a `list<complex>` symbol) were refused on the JavaScript and
  Python targets. Each real element now gets the real result and every other
  element is `NaN`: `⌊√L⌋` at `L = [4, -1]` is `[2, NaN]`. This also fixes two
  wrong results: `√L < 1` at `L = [0.5, 2]` returned `[false, false]` (now
  `[true, false]`), and `min(Z)` for a `list<complex>` symbol returned `NaN`.
  `strict` mode is unchanged.
- **List and set literals now await asynchronous elements.**
  `[1, AsyncOnly()].evaluateAsync()` returned `[1, AsyncOnly()]` for an operator
  with only an `evaluateAsync` handler. Elements are now awaited in order.
- **`evaluateAsync()` now honors `numericApproximation` on numbers and
  symbols.** `[1/3].evaluateAsync({ numericApproximation: true })` kept the
  exact value. A set comprehension now also evaluates the values of a literal
  domain: `{k : k ∈ {x, 2}}` with `x := 5` returned `Set(x, 2)`.
- **A tuple, set or list of inexact literals no longer carries a numeric range
  in its type.** `(√2, 1)` typed `tuple<real<1.4..1.5>, integer>` and now types
  `tuple<real, integer>`. A list of 5,000 such points typed
  `list<tuple<any, any>>` and now types `list<tuple<real, real>^5000>`. A record
  holding `~oo` now types `record{x: infinity}`.
- **A point with a list component now compiles under `Norm`, `Abs` and
  `Hypot`.** `Norm(([1, 2], 3))` is `[√10, √13]` and `Hypot(([1, 2], 3), 4)` is
  `[√26, √29]`. The JavaScript target used to fall back to the interpreter.
- **`Hypot` with a point and a list paired the point's components with the
  list's elements.** `Hypot((3, 4), [1, 2])` returned `[√10, √20]`; it is now
  `[√26, √29]` (the point's norm is one leg of each hypotenuse). `Abs` follows
  the same rule. `Power((1, 2), [3, 4])` is still `[1, 16]`.
- **Destructured block locals compile.** After `(xs, n) := ([1, 2, 3], 2)` in a
  block, `Length(xs)` and `At(xs, n)` now compile instead of failing.
- **A list times a point now types as a list of points.** `[1, 2] · (3, 4)`
  evaluates to `[(3, 4), (6, 8)]` but typed `tuple<integer, integer>`; it now
  types `list<tuple<integer, integer>^2>`.

## 0.123.1 _2026-09-04_

### Resolved Issues

- **A single-letter builtin name in an optional or variadic argument is read as
  a variable.** `Range(1, N)`, `Max(1, N)` and `Min(2, N, M)` returned an
  `incompatible-type` error on `N`, while `N + 1` and `Range(N)` read `N` as a
  variable. For example, `[1, \ldots, N]` with an undeclared `N` failed in
  0.123.0.
- **`Join` and `Append` no longer drop an operand that has no value yet.** With
  `v` declared `list<number>` and unassigned, `Join([1], v)` evaluated to `[1]`
  and `Append(v, 2)` to `[2]`. They now stay unevaluated until `v` has a value.
  `First(Join([1], v))` still returns `1`.
- **A symbol declared with the bare `tuple` type is treated as a tuple in
  arithmetic.** With `ce.declare('w', 'tuple')`, `Sin(w)`, `Sqrt(w)` and `w^2`
  typed `number`; they now type `tuple`. `Abs(w)` is the norm, and `w · w` is
  the `no-product-between-points` error.
- **A list scaled by a symbolic tuple kept a unit factor.** `[1, 2, 3] · p`
  evaluated to `[1p, 2p, 3p]`; it is now `[p, 2p, 3p]`.

## 0.123.0 _2026-09-04_

### New Features

- **Epsil: `match` exhaustiveness warning.** A `match` whose subject has a
  closed type (a sum such as `type light = red | green | yellow`, or `boolean`)
  now reports `match-not-exhaustive` when a value reaches no case, and names the
  missing pattern (`yellow()`, `false`). A guarded case does not count as
  covering. See `epsil doc match-not-exhaustive`.
- **Typed `match` bindings and `is` tests compile.** On the JavaScript target,
  `MatchesType(v, T)` (used by `n: integer => …`, `while let v: T = …` and
  `x is T`) now compiles for numbers, strings, booleans, literal types, numeric
  ranges, unions of these, and tagged non-generic sums. Other types, and other
  targets, still fail to compile.
- **Destructuring loops compile.** `for (p, q) in pairs { … }`, and the same
  pattern in a `Comprehension`, now compile on the JavaScript and Python
  targets, when the element type is known to be tuples of the right arity (a
  `Zip`, a literal list of tuples, a `list<tuple<…>>` annotation).
- **The Python target compiles more loop forms.** A `Loop` over several
  `Element` clauses, a `Range` with integer literal bounds (`Range(10, 1, -3)` →
  `range(10, 0, -3)`), and a `Comprehension` (as a list comprehension).
- **`Zip` types its elements.** `Zip(xs, ys)` now types `list<tuple<X, Y>>` from
  the element types of its sources.
- **Epsil: a standard library index** (published at `/epsil/library/`) lists
  every function and constant by category, with its signature, description and a
  tested example.
- **Epsil: a style guide** (published at `/epsil/style/`) describes idiomatic
  Epsil with an example for each idiom. It recommends `Map`/`Fold`, or
  `ListFrom`, instead of growing a list with `Join` in a loop.

### Resolved Issues

#### Types and Validation

- **Operators with custom canonical forms now validate their arguments against
  their signature.** `PoissonDistribution(s)` with `s := -3` was accepted, while
  a literal `-3` was refused. It is now refused too. Related changes:
  - `Sin(+oo)` and a range used as a range bound are now refused when the
    expression is created, instead of when it is evaluated.
  - Some signatures are now wider: `Apply` takes any function (`Apply(3, 5)`), a
    relation takes a single operand (`Less(3)` is `True`), `At` takes a base of
    any type, and the set operators take any operand.
- **Function signatures print unions correctly.**
  `(complex | infinity, (complex | infinity)+) -> number` printed without the
  inner parentheses, and `(real<0..>) | nan` printed unnecessary ones. A union
  may now print its members in a different order (`nan | real<0..>`).

#### LaTeX Parsing and Serialization

- **`Norm(v, p)` round-trips through LaTeX.** The order was dropped, so a 1-norm
  re-parsed as a 2-norm. It now serializes as a subscript (`\|v\|_1`,
  `\|v\|_\infty`, `\|v\|_F` for Frobenius) and parses back from every norm
  notation.

#### Statistics

- **A discrete PDF or CDF at a symbolic point now matches the numeric result.**
  `PDF(PoissonDistribution(2), x)` with `x := 0.5` returned `0.216`, while
  `PDF(PoissonDistribution(2), 0.5)` returns `0`. The symbolic forms now include
  the support condition, for example `Which(⌊x⌋ = x ∧ x ≥ 0, …, True, 0)`. A
  point declared `integer<0..>` keeps the plain closed form.

#### Compilation

- **A value that may be a scalar or a list compiles correctly.** On the
  `javascript` target, an operand typed `integer | vector<integer^2>` made
  `Sum(x)` fail, and `2·x`, `x + 1` and `x < 1` returned wrong values (`NaN`, or
  the string `"1,21"`). They now handle either shape at run time. Such a union
  now types `2·u` as `number | vector<2>` (was `number`).
- **A compiled condition with a random operand handles `NaN`.**
  `If(Random() > 0.5 ∧ x > 0, a, b)` took the else branch at `x = NaN`; it now
  returns `NaN`, and `Random()` is called at most once.
- **The Python target emitted JavaScript for a `Comprehension`.**
- **A `Range` whose bound is not a number compiled to an empty range.**
  `Sum(1..10..2)` compiled to `0`. It now fails to compile.
- **Compiled `Sum`, `Product` and `Comprehension` loops no longer recompute
  loop-invariant list values on each iteration.** A 10,000-element histogram
  took 25 s; it now takes under 0.1 s at 16,000 elements. `cse: false` turns
  this off.

#### Arithmetic and Numerics

- **A `NaN` in a branch condition selects no branch.**
  `If(NaN > 0, 1, -1).evaluate()` returned `-1`, while compiled code returned
  `NaN`. It now evaluates to `Missing`. `Greater(NaN, 0)` is still `False`, and
  `If(NaN > 0 ∧ False, 1, -1)` is still `-1`. A `NaN` element in an element-wise
  condition still takes the else value.
- **Exact numbers are compared exactly.** `Less(10^400, 10^500)` and
  `Greater(10^500, 10^400)` were both `False`, and `1 + 10^(-20)` compared equal
  to `1`.
- **`Factorial` of a very large integer no longer hangs.** `Factorial(10^400)`
  now stays symbolic, and its `.N()` is `+oo`. The same applies to `Factorial2`.
- **Dividing a very small or very precise exact rational no longer rounds it.**
  `Divide(1/10^400, 3)` was `0` and `Divide(99999999999999999999/10^20, 1)` was
  `1`. `CDF(UniformDistribution(0, 1), 10^-400)` is now `10^-400`.

## 0.122.0 _2026-09-03_

### Breaking Changes

- **A `type` handler in an operator definition now receives operand descriptors,
  not expressions.** The signature is
  `(operands: OperandDescriptor[], context: TypeHandlerContext) => Type`. A
  descriptor has the operand's type, facts such as `facts.finite`, `facts.sgn`
  and `facts.elementType`, and a structural view from `structureOf()`. Use
  `context.derive(operator, operands)` to type a sub-expression. A handler can
  no longer declare, canonicalize or evaluate. The `typeHandlerKind` flag, the
  `OperatorTypeHandlerOnExpressions` type and the `operandTypes` option are
  removed. To migrate: `ops[i].type.type` → `operands[i].type`; `.ops`,
  `.operator` and `.string` → `structureOf()`.

  Some built-in types changed: `{n² : n ∈ ℤ}` now has elements `integer<0..>`
  (was `unknown`); an `Interval` with a symbolic endpoint has `real` elements
  (was `never`); `√2 ∈ [√2, 1]` now types `boolean`.

### New Features

- **`RuntimeError(code)` creates an error value when evaluated.** A function
  whose body contained `Error("neg")` was never defined. With
  `function g(x) { if x > 0 { x } else { RuntimeError("neg") } }`, `g(-1)` is an
  error value that `if let v: !error = …` and `match` can inspect. The
  `javascript` target does not compile it.
- **Epsil `if let`.** `if let pattern = subject { … } else { … }` binds the
  pattern when the subject matches, and runs `else` otherwise:
  `if let v: !error = f(x) { v } else { 0 }`. Without `else`, a failed match
  evaluates to `Missing`. New warnings: `if-let-irrefutable`,
  `if-let-equal-expected`.
- **Epsil `while let`.** `while let pattern = subject { … }` loops until the
  pattern fails to match: `while let [h, ...t] = xs { s = s + h; xs = [t] }`.
  New warnings: `while-let-irrefutable`, `while-let-equal-expected`. It compiles
  on the JavaScript target but not on the Python target.

### Resolved Issues

#### Errors and Evaluation

- **An error from evaluating an operand is now the result.** `Sin(Length(5))`
  evaluated to `sin(Error(…))` and `1 + Length(5)` to `1 + Error(…)`; both now
  return the error. A collection still keeps a failed element in place.
- **A user function whose body evaluates to an error returns the error.**
  `len := x ↦ Length(x)` then `len(5)` returned `len(5)`. An Epsil function can
  now return an error value, such as `match-no-case`.
- **Deeply nested tuples or lists with shared parts are fast.** A value built as
  `Tuple(t, t)` twenty levels deep took seconds and printed a type with a
  million entries. Types are now limited in size.
- **Nested list literals with shared sub-lists no longer overflow the stack.**
  `Length` or `Element` over `List(t, t)` 18 or more levels deep overflowed.
- **`toLatex({ materialization: false })` no longer evaluates anything.**
  Printing `Join(p)` with `p` bound to a long unevaluated chain could take
  minutes.

#### Pattern Matching

- **`match` sees lazy lists.**
  `match Rest([1, 2, 3]) { [h, ...] => h; _ => "no" }` took the wildcard case,
  and a `while let [h, ...] = xs` loop ended after one turn. A lazy list now
  matches a list pattern.
- **A `match` case can `break` or `continue` in compiled code.** It caused an
  `Unexpected token 'break'` syntax error.
- **A compiled `...rest` capture now splices into a list.** `[h, ...t] => [t]`
  compiled to a list that held the tail as one element, so a
  `while let [h, ...t] = xs { xs = [t] }` loop never ended.
- **A binding with a guard compiles.** `n if n > 3 => …` failed on the
  JavaScript target.

#### Types

- **The stage of a pipe keeps its element type after evaluation.**
  `xs |> p ↦ p[1] ∧ p[2]` over a list of boolean pairs types `list<boolean^3>`
  before and after evaluation.
- **A scalar function over a list of points keeps the point shape.** With
  `P: list<tuple<number, number>>`, `Sqrt(P)` and `Power(P, 2)` typed
  `list<number>`; they now type `list<tuple<number, number>>`.
- **A comprehension variable's type comes from the collection.** In
  `[q.x + 1 for q in L]` with `L: list<number>`, the body changed the type of
  `q` and the expression failed only when evaluated. It is now a type error when
  the expression is created.
- **`Reshape` with a non-literal size no longer throws.**
  `Reshape([1,2,3,4], (n, 2))` threw `Failed to parse type`; it now types
  `list<number>`.
- **`point + (list, list)` types as a tuple of lists.** `G + (L, L₂)` now types
  `tuple<list<number>, list<number>>`, not a union.

#### Compilation

- **The `javascript` target refuses invalid point arithmetic.** `P·P` for a
  point list, `P + 2`, `P − L`, and a scalar divided by a point list compiled to
  plausible values where `evaluate()` returns an error. They now fail to
  compile, and so does a comprehension whose variable appears in its own
  collection (`[P.x + 1 for P in P]`).
- **List arithmetic with radicals and logarithms compiles.** `L + √L`, `2·√L`
  and `L + ln L` failed to compile on the `javascript` target.
- **List arithmetic over a mix of real and complex elements compiles.** `Add`,
  `Subtract`, `Multiply` and `Negate` over `2·[1+i, 2]` or a `list<complex>`
  parameter now compile.

#### LaTeX Parsing and Serialization

- **The serializer overflowed the stack on a product with a `never`-typed
  factor**, such as `f(f(b)) - f(f(a)) = (f'(c))^2 (b - a)`.
- **An ellipsis over an indexed family is no longer read as an arithmetic
  progression.**
  `\{\frac{x_1}{1+x_1}, \frac{x_2}{1+x_1+x_2}, \dots, \frac{x_n}{1+\dots+x_n}\}`
  parsed to a `Range`; it now stays a set, like `\{x_1, x_2, \dots, x_n\}`.
- **A two-element `Tuple` in a set position serializes unambiguously.** It was
  `(a, b)`, which reads back as an open interval; it is now
  `\operatorname{Tuple}(a, b)`.

## 0.121.1 _2026-09-03_

### New Features

- **`Join` accepts scalar operands.** A scalar is appended as one element:
  `Join([1, 2], 3)` and `Join(1, 2, 3)` are `[1, 2, 3]`. This was an
  `incompatible-type` error. The `javascript` and `python` targets now also
  append a tuple operand as one element instead of spreading its components.
- **`Sign` accepts complex numbers.** `Sign(z)` is `z/|z|`: `Sign(i)` is `i` and
  `Sign(3 + 4i)` is `3/5 + 4i/5`. This was an `incompatible-type` error. For
  real values the result is still −1, 0 or 1; `Sign(~oo)` is still an error and
  `Sign(NaN)` is `NaN`. The `javascript` target compiles the complex case.

### Resolved Issues

- Fixed compiled `PointX`, `PointY` and `PointZ` reading a list of points as a
  single point when the operand shape was not known at compile time. For
  `f(v) := PointX(v) + 1`, `f(P)` over a list of points compiled to `[2, 3, 4]`
  instead of `[2, 5]`, or threw inside a `PointList`.
- Fixed compiled base-10 and base-2 logarithms losing precision:
  `log(x) / log(2)` at `x = 4` gave `1.9999999999999996` instead of `2`.
- Fixed `["Function", ["Add", ["Negate", "q"], ["Tuple", 1, 2]], "q"]` being an
  `incompatible-type` error while `q + (1, 2)` was accepted.
- Fixed the `glsl` and `wgsl` targets missing parentheses before a swizzle:
  `PointX((x, y) + (1, 2))` compiled to `vec2(x, y) + vec2(1.0, 2.0).x`. The
  same applied to `First`, `Second` and `Third`.
- Fixed compiled color constructors (`Rgb`, `Hsv`, `Hsl`, `Oklab`, `Oklch`) with
  a non-finite channel: they now return a `NaN` color. `Hsv(90, 1, ~oo)`
  compiled to the same color as `Hsv(90, 1, 1)`.
- Fixed `compile()` taking exponential time and memory, and eventually throwing
  `Invalid array length`, on expressions with deeply shared sub-expressions.

## 0.121.0 _2026-09-03_

### Breaking Changes

- **Numeric types now distinguish finite values, infinities, and `NaN`.**
  `integer`, `rational`, `real`, and `complex` contain only finite values;
  `number` is now `complex | infinity | nan`. The new `infinity` type contains
  `+oo`, `-oo`, and `~oo`; `signed_infinity` contains only `+oo | -oo`. The old
  name `non_finite_number` is a temporary alias for `signed_infinity`, and the
  `finite_*` names are temporary aliases for the bare types (`finite_number`
  maps to `complex`).

  Use `BoxedType.complex`, `BoxedType.integer`, `BoxedType.real`, and
  `BoxedType.setInteger` instead of their `finite_*` counterparts. Use
  `isExtendedReal` instead of the removed `isReal` property.

- **Infinity and `NaN` have precise types and matching runtime behavior.**
  Arithmetic, functions, assignments, collection accessors, and compiled code
  report or propagate `infinity`, `signed_infinity`, and `nan`. Finite numeric
  types no longer accept infinite arguments. Infinite endpoints of intervals and
  ranges are not members of them.

- **Assumptions refine values only while they are in scope.** They no longer
  permanently change declarations or inferred signatures. `forget()` and leaving
  a scope remove the refinement, and an assignment that contradicts an active
  assumption is rejected.

  The assumption API now exposes `assumedValues`, and `ce.context.assumptions`
  contains immutable fact arrays instead of booleans. `assumptionBindings`,
  `ContextAssumptions.bindings`, `TypeProvenanceEntry.previousType`, and the
  `assumed` provenance kind are removed.

- **Numeric predicates are three-valued.** `isNumber`, `isInteger`,
  `isRational`, and `isExtendedReal` return `true` when membership is proven,
  `false` when it is impossible, and `undefined` when it is not known.

- **Functions enforce their mathematical domains.** Operations that need an
  ordered value (`Heaviside`, `Sign`, rounding, `Clamp`, `ElementMin`,
  `ElementMax`) accept only finite reals and signed infinities; complex values
  and `~oo` are rejected. `NaN` propagates through numeric evaluation.

- **Elementary and special functions handle infinities consistently.** They
  return their limits at infinities, reject arguments outside their domain, and
  stay symbolic when no numeric value is available. `evaluate()`, `N()`, and
  simplification agree more closely at exceptional points. Examples:
  `Sqrt(~oo) = Ln(~oo) = ~oo`, `(+oo)^(+oo) = +oo`, IEEE values for `Arctan2` at
  infinite corners, and `NaN` for indeterminate forms.

- **Complex accessors propagate `NaN`.** This applies to `Real`, `Imaginary`,
  `Argument`, `AbsArg`, and `Conjugate`. The real part, imaginary part, and
  argument of `~oo` are `NaN`.

- **`Power` and `Root` use the same rules for infinities.** `~oo` is not a valid
  exponent. `Root(x, n)` follows `Power(x, 1/n)`, and a zero root index is an
  error.

- **Arithmetic and number-theory operators validate their arguments.** `Mod`,
  `Fract`, `Rationalize`, `ContinuedFraction`, the parity and prime predicates,
  and the numerator/denominator accessors reject invalid arguments. The
  continued fraction of an inexact value uses its best rational approximation at
  the current precision. `IsEven` is now kept as its own operator.

- **Linear-algebra operations validate numeric inputs.** `Norm`, `Trace`,
  `MatrixPower`, and `Determinant` reject incompatible operands and have more
  precise result types. Frobenius norms work for vectors and higher-rank
  tensors, the norm of an empty collection is `0`, and numeric half-integer
  powers of exact 2×2 positive-semidefinite matrices are supported.

- **Combinatorial and regularized functions have corrected domains.**
  `Binomial`, `Choose`, `Pochhammer`, `GammaRegularized`, and `BetaRegularized`
  handle infinite limits consistently, and several results for negative
  arguments and gamma poles are corrected.

- **Probability distributions validate their parameters and arguments.** Normal,
  uniform, Poisson, exponential, and binomial distributions reject invalid
  parameters. Uniform and exponential `PDF`/`CDF` are piecewise, discrete
  distributions return correct values outside their support, and `N()` computes
  binomial and Poisson quantiles.

- **Statistics functions reject invalid samples.** Non-numeric or nested values
  are an `incompatible-type` error. `NaN` and `Missing` propagate, quartiles of
  a single value are supported, and quartile tuple fields are ordered `lower`,
  `mid`, `upper`.

- **Selections are lazy, and undecided conditions stay unevaluated.** `If`,
  `Which`, `And`, and `Or` evaluate only the operands needed, so an error in a
  branch that is not selected does not affect the result. A condition that is
  provably not boolean is an `incompatible-type` error. A selection with no
  matching branch and no default returns `Missing`. Custom lazy operators can
  get the same behavior with `selectsOperands`.

- **Compiled conditions use three-valued logic.** Compiled JavaScript and Python
  no longer select a branch for a `NaN`, absent, or undecided condition. `And`,
  `Or`, and `Not` still short-circuit.

- **Compiled float-only targets represent `~oo` as `Infinity`.** These targets
  cannot distinguish signed and complex infinity.

- **Result types include possible exceptional results.** Partial operations can
  have `nan` or `infinity` in their type, and domain failures of non-numeric
  operations return `Missing`. Division and negative powers include non-finite
  results when the divisor can be zero. An expression with an empty-range
  operand has the type `never`.

### New Features

- **Operator definitions can declare their error behavior.** The new
  `nanBehavior`, `partiality`, `definedWhen`, and `requires` fields describe how
  `NaN` is handled, whether the operation is partial, its domain, and its
  preconditions. Result types include `nan` or `missing` only when needed.
- **`Hypot` accepts infinite arguments.** An infinite argument gives `+oo` even
  when another is `NaN`; otherwise `NaN` propagates. Euclidean norms and
  distances follow the same rule.
- **`Factorial`, `Factorial2`, `Gamma`, and `GammaLn` accept signed
  infinities.** `+oo` gives `+oo`; `-oo` gives `NaN`.
- **`D` differentiates piecewise expressions.** Each branch of `If` and `Which`
  is differentiated and its condition is kept.
- **Componentwise functions broadcast over tuples.** `Sin((1, 2))` evaluates
  each component. Functions that treat a tuple as a point, such as `Abs`, are
  unchanged.
- **The `javascript` target compiles more user functions**: bounded generic
  functions, functions that return tuples, array arguments broadcast at run
  time, complex-valued callbacks, and element-wise selections with complex
  branches.
- **The `python` target compiles statement-form conditionals.** `If` with an
  `else` branch compiles inside blocks and loops.
- **The `interval-js` target supports more expressions**: `Choose`, direct
  application of function literals, bounded random draws, and sums over
  collections. A finite jump discontinuity gives a `singular` result with a
  correct `value` enclosure, instead of being treated as a pole.
- **Predicates can have the type `true` or `false`** when the operand types
  decide them; otherwise the type is `boolean`. Compiled code can remove
  unreachable branches.
- **Numeric ranges support open endpoints.** `real<0<..>` means `x > 0`,
  `real<..<3>` means `x < 3`, and `real<0<..<3>` means `0 < x < 3`. An empty
  range is `never`.
- **Numeric result types include computed bounds** for `Add`, `Multiply`, `Abs`,
  `Divide`, and integer powers. Inexact literals get a small enclosing range
  type.
- **New `infinity` and `nan` primitive types**, usable in type strings,
  declarations, signatures, `matches()`, and `isSubtype()`. `~oo` and `~∞` are
  the type of complex infinity.
- **`BigDecimal.toPrecisionToward(n, direction)`** rounds to `n` significant
  digits toward negative or positive infinity.

### Resolved Issues

#### Types

- Fixed the TypeScript signature of `ce.declare()` rejecting an existing
  operator definition, for example
  `ce.declare('Sqrt', { ...ce.expr('Sqrt').operatorDefinition!, evaluate })`.
  The accepted type is exported as `SymbolDefinitionInput`.
- Fixed type inference and broadcasting through type aliases, including
  recursive aliases that could overflow the stack.
- Fixed assumptions leaving declarations behind after they were removed, and
  types that depended on temporary assumptions.
- Fixed a function parameter named `i` or `e` not shadowing the library
  constant.
- Fixed assigning a function signature through `.type` corrupting later type
  reads.
- Fixed unions that contain `broadcastable<T>` not broadcasting.
- Fixed exact literal types changing with the precision setting.

#### Arithmetic and Numerics

- Unexpected failures during evaluation now use the `internal-error` code
  instead of `evaluation-error`.
- Fixed arithmetic with infinities in scalars and collections, including zero
  times infinity, division of a collection by zero or infinity, and the
  reciprocal of infinity.
- Fixed Euclidean norms and distances with infinities and `NaN`, including
  matrix norms that ignored a `NaN` row or column.
- Fixed numeric integration and special functions discarding the imaginary part
  of complex values. Unsupported complex evaluations now stay symbolic.
- Fixed very large prime, Lucas, and Catalan computations running indefinitely.
- Fixed one-sided limits at jump discontinuities.

#### Collections

- Fixed `Length` and `Count` staying unevaluated for values known not to be
  collections.

#### Compilation

- Compilation output is now deterministic.
- Fixed compiled `Block` locals losing their declared or assigned types.
- Fixed compiled `Heaviside(NaN)` and `Sign(NaN)` not returning `NaN`.
- Fixed compiled JavaScript for a point added to a list of points, and for
  collection arguments to compiled functions.
- Faster JavaScript compilation of expressions that reference assigned values
  many times; self-referential assignments no longer overflow the stack.

#### Colors

- Fixed OKLCh conversion producing negative hue angles; hues are now in
  `[0, 360)`.

## 0.120.0 _2026-08-27_

### Breaking Changes

- **The bivariate statistics reject complex data instead of silently using its
  real part.** `Covariance`, `PopulationCovariance`, `Correlation`,
  `LinearRegression` and `PolynomialFit` previously projected every data point
  through its real part, so `Covariance([1, 1+2i], [2, 3])` returned `0` — the
  answer for the data `[1, 1]`. A non-real data point now returns a structured
  `incompatible-type` error naming the operator and the offending datum. A
  complex literal with a zero imaginary part (`Complex(2, 0)`) still
  canonicalizes to a real and participates normally, and the complex infinity
  `~oo` is not complex data in this sense: it is the single point at infinity
  rather than a sample point off the real line, so it propagates `NaN`.
  Additionally, `Correlation` now propagates `NaN` for any data it has no real
  value for — `NaN`, `±∞` and `~oo` — matching `Covariance`, instead of
  misreporting it as `"zero variance"`. That error is now raised only when a
  column is genuinely constant, so at `ce.precision = 'machine'` it also no
  longer appears for finite data whose sums of squares overflow the double range
  (values around `1e200`), which now yields `NaN`. (At the default precision the
  bignum kernel handles such data without overflowing.) (Complex covariance —
  `E[(X−μX)·conj(Y−μY)]` — is not implemented; if you need it, compute it from
  `Mean` directly.)

- **The one-sample statistics no longer silently use the real part of complex
  data: they either compute the complex answer or reject it.** Every one of them
  used to project each datum through its real part, so `Mean([1, 1+2i, 5])`
  answered `2.333…`, the mean of `[1, 1, 5]`. Now:
  - `Mean` returns the COMPLEX mean — `Mean([1, 1+2i])` is `1 + i` — with no
    convention involved, since the mean is linear. Exact data still gives an
    exact answer: `Mean([1, i])` is `(1 + i)/2`, not `0.5 + 0.5i`.
  - `Variance`, `PopulationVariance`, `StandardDeviation` and
    `PopulationStandardDeviation` compute `E[|X − μ|²]` — the mean squared
    MAGNITUDE of the deviations, with the same sample (`n − 1`) or population
    (`n`) divisor as before. The result is a real, non-negative number:
    `Variance([1+i, 1−i])` is `2` and `PopulationVariance([1+i, 1−i])` is `1`.
  - `Median`, `Mode`, `Quartiles`, `InterquartileRange`, `Skewness`, `Kurtosis`,
    `Histogram`, `BinCounts` and the empirical data form of `Quantile` return
    the same `incompatible-type` error the bivariate statistics use. Order
    statistics need a total order, and the complex plane has no canonical one;
    the standardized moments have only convention-laden, branch-dependent
    complex extensions. `Histogram`/`BinCounts` reject a complex bin EDGE for
    the same reason. (`Quantile` of a DISTRIBUTION is unaffected.)

  Real data is unaffected, including the exact results (`Mean([1, 1, 5])` is
  still `7/3`), and `NaN` and a real `±∞` keep the readings they have always had
  in these heads (`Mean([1, +∞, 5])` is `+∞`, `Median([1, +∞, 5])` is `5`).

- **The complex infinity `~oo` now reads as `NaN` in the one-sample statistics,
  under both of its spellings.** The real part `~oo` reports is an artifact of
  how it was written — `ComplexInfinity` reports `Infinity`,
  `Complex(1, Infinity)` reports `1` — so the same value produced different
  statistics depending on the spelling: `Mean([1, ~oo, 5])` answered `+∞` one
  way and `2.333…` the other, and `Median` answered `5` one way and `1` the
  other. Every one-sample head now projects it to `NaN`, which is what the
  bivariate heads already did, so both spellings agree: `Mean`, `Median`,
  `Mode`, the variance family, `Skewness`, `Kurtosis` and `InterquartileRange`
  return `NaN`, `Quartiles` returns `(NaN, NaN, NaN)`, and the empirical
  `Quantile` returns `NaN`. A real `±∞` is unaffected.

- **`Mean` and the variance family return `NaN` for complex data mixed with a
  non-finite value.** `Variance([1+2i, +∞])` returned `+∞`, an accident of boxed
  arithmetic that contradicted the real-only path (`Variance([1, +∞])` is
  `NaN`). A complex sample point together with a point at infinity has no
  reading — `+∞` is a limit along the real axis, and no direction in the plane
  makes it a value a complex number can be averaged with — so `NaN` is what
  these now answer. The real-only paths are unchanged.

- **`Histogram` and `BinCounts` stay inert on data (or bin edges) that is not a
  number literal, instead of silently dropping it.** A `Sqrt(-2)` datum has no
  real value, and it used to be filtered out of the sample:
  `BinCounts([1, Sqrt(-2), 5], 2)` reported the counts of `[1, 5]`. It now
  leaves the expression unevaluated, the same way the empirical `Quantile` does;
  under `.N()` the datum numericizes to a complex literal and is rejected with
  the `incompatible-type` error.

- **A `PolynomialFit` degree that is not an integer is reported as a bad
  degree.** The degree was read with a helper that takes a number's real part
  and rounds it, so `PolynomialFit(xs, ys, Complex(1, 2))` silently fitted a
  degree-1 polynomial and `PolynomialFit(xs, ys, 2.5)` a degree-3 one, while a
  `NaN` or `±∞` degree was blamed on the argument list as `invalid arguments`.
  Every number in the degree position is now answered by the
  `degree must be an integer in [0, 12]` error unless it is exactly an integer.

- **`Histogram` and `BinCounts` reject non-finite data and non-finite bin edges
  instead of silently dropping them.** A data point with no finite real reading
  — `NaN`, a real `±∞`, or the complex infinity `~oo` under either spelling —
  used to be filtered out of the sample, so `BinCounts([1, +∞, 5], 2)` reported
  the counts of the two-point dataset `[1, 5]` with no hint that a value had
  been discarded. A non-finite explicit bin EDGE was worse: every interval
  comparison against it is false, so the head fabricated a row of zero counts
  (`BinCounts([1, 2, 3], [0, NaN, 10])` returned `[0, 0]`). Both now return the
  same structured `incompatible-type` error the complex rejection uses, naming
  the `finite_real` constraint, the operator, and the offending value. These two
  heads cannot absorb a non-finite value the way `Mean([1, NaN, 5])` returns
  `NaN` does: their result is a vector of COUNTS, and no count means "there was
  no reading". Finite real data and explicit finite edge lists are unaffected.

  A finite real too large for a machine float — `10^400`, an exact integer — is
  refused too, but as an `out-of-range` error naming the machine floating-point
  range, because the limit belongs to the binning arithmetic and not to the
  value: the bin width and every interval comparison are computed in doubles,
  where such a datum reads as infinity. The statistics that sum their data
  exactly (`Mean`, `Covariance`, the least-squares fits) have no such limit and
  accept it.

- **`LinearRegression` and `PolynomialFit` propagate `NaN` for non-finite data
  instead of misdiagnosing it.** A `NaN`, `±∞` or `~oo` value in the X column
  made the least-squares pivot search fail, and the heads reported
  `unexpected-argument: "degenerate data"` — a claim about the geometry of the
  sample that the data does not support — or, when the elimination happened to
  pivot on a later row, returned the half-`NaN` tuple `(NaN, 0)` whose `0` slope
  is not a fit of anything. Both now answer with every coefficient `NaN`, in the
  shape each head declares: `(NaN, NaN)` for `LinearRegression`, a `NaN`-filled
  list of `degree + 1` coefficients for `PolynomialFit`, and the fitted
  expression with `NaN` coefficients when a trailing variable symbol is given.
  This is what both already answered when the non-finite value sat in the Y
  column, and it matches `Covariance`/`Correlation`. The `"degenerate data"`
  error remains for rank-deficient finite real data —
  `LinearRegression([2, 2, 2], [1, 2, 3])` still reports it.

- **Two collections of different lengths are a dimension error in the fits.**
  `LinearRegression([1, 2], [1, 2, 3])` and the corresponding `PolynomialFit`
  call fell through to the least-squares rank guard and were misdiagnosed as
  `"degenerate data"`; they now report `incompatible-dimensions 2 vs 3`, the
  error `Covariance` and every other pairwise head already used for a length
  disagreement.

- **`LinearRegression` reports a sample with fewer than two points as such.**
  One point determines no line whatever its value is, but the head answered
  `(NaN, NaN)` for `LinearRegression([NaN], [2])` and `"degenerate data"` for
  `LinearRegression([1], [2])`, while `PolynomialFit([NaN], [2], 1)` said there
  were not enough data points. `LinearRegression` now reports
  `not enough data points` for any sample shorter than two, ahead of anything
  the values could say.

- **`Re`, `Im` and `Arg` reject the argument lists their targets reject.** These
  aliases rewrote to `Real`/`Imaginary`/`Argument` through a construction path
  that skips signature validation, so `Arg(1, 2)` silently dropped the second
  operand and answered `0` where `Argument(1, 2)` reported the unexpected
  argument. They also declared a narrower type than their targets, so `Re(NaN)`
  claimed the type `real`, which does not admit NaN, wherever the expression was
  left uncanonicalized. Each alias now validates and types exactly as the name
  it stands for.

### New Features

- **`Re` and `Im` are now defined, as aliases of `Real` and `Imaginary`.**
  `["Re", z]` and `["Im", z]` used to stay inert as unknown operators; they now
  canonicalize to `Real`/`Imaginary` (the preferred names) and evaluate,
  exactness included: `Re(1/3 + 2/5i)` is `1/3`. The `\Re` and `\Im` LaTeX
  commands already parsed to `Real`/`Imaginary` and are what the serializer
  emits, and `\operatorname{Re}(z)` now resolves too.

- **A `type` handler can now be declared as a function of operand DESCRIPTORS
  instead of operand expressions.** An operator definition that sets
  `typeHandlerKind: 'types'` receives, in place of each operand, an
  `OperandDescriptor`: the operand's handler-visible type, a deliberately
  minimal set of three-valued facts carrying only what the type cannot
  (finiteness — for the `NaN` literal, whose type is `number`; sign from pure
  value sources such as a held numeric value; closedness; the collection
  capability facets; a static shape) and an on-demand structural view — never
  the operand expression itself, so deriving a type cannot declare,
  canonicalize, or evaluate anything. Validity has no fact: an error operand's
  type is `'error'`. The legacy expressions shape remains the default and is
  unchanged; the flag — never the handler's parameter count — selects the shape.
  Under test (and with `CE_TYPE_PURITY_GUARD` elsewhere) a runtime guard turns
  any engine-state write from a `'types'` handler into an immediate error. The
  built-in `Coalesce`, `Hold` and `ReleaseHold` definitions were the first to
  use the new shape, with byte-identical derived types; `DigitCount`, `Block`
  and `When` have since converted the same way, each proven equivalent by a
  differential shadow that runs both shapes side by side across the test suite.
  34 further operators (the number-theory and combinatorics constants) went one
  better: their constant `type` handler was retired outright and its result
  moved into the declared signature — `NthPrime` now declares
  `(integer) -> finite_integer` instead of pairing a wide signature with a
  narrowing handler, with byte-identical derived types.

- **`GammaRegularized` and `BetaRegularized` no longer claim a finite real
  result unconditionally.** Their old constant claim was unsound off the proven
  domain (`GammaRegularized(-1, 2)` evaluates to NaN). They now claim
  `finite_real` only when the domain is proven — `a > 0` and `z ≥ 0` for the
  gamma; `x ∈ [0, 1]`, `a > 0`, `b > 0` for the beta — and answer `number`
  otherwise, per the non-finite typing convention.

### Resolved Issues

- **Square roots of large exact perfect squares are exact at every precision.**
  `Sqrt(10^402)` returned `+oo` at machine precision (the radicand was narrowed
  to the numeric format before rooting) and `Sqrt(10^12/9)` stayed unevaluated
  where `10^6/3` exists. Exact integer and rational radicands now reduce exactly
  — perfect squares fold, negative radicands give exact imaginary results —
  regardless of the precision setting. `Sqrt(1000000/49)` now evaluates to
  `1000/7`.

- **`Conjugate`, `Real` and `Imaginary` preserve exactness.**
  `Conjugate(1/3 + 2/5i)` returned machine floats (so `z·Conjugate(z)` answered
  `0.2711…` where `61/225` is available); `Real(1/3 + 2/5i)` returned a 21-digit
  approximation. All three now read the exact components: `Real(1/3 + 2/5i)` is
  `1/3`, `Imaginary(√2 i)` is `√2`, and `z·Conjugate(z)` is `61/225`.

- **A fence-less `Delimiter` around a bracketed or braced collection serializes
  to valid, round-trippable LaTeX.** `Delimiter(List(x, y))` — the parse of
  `([x,y])`, and the operand shape a call `f([x,y])` carries — serialized as
  `\lbrackx,y\rbrack`: the `[` fence maps to the `\lbrack` command, plain
  concatenation glued it onto the first operand (an unknown command, so the
  output did not re-parse), and the Delimiter's recorded parentheses were
  dropped. Fences are now joined with `joinLatex`, which separates a command
  from a following letter (this also fixes the same glue for `\lbrace` and
  custom bracket delimiters), and a fence-less `Delimiter` keeps its parentheses
  around an operand that carries its own fences: `Delimiter(List(x, y))` emits
  `(\bigl\lbrack x, y\bigr\rbrack)`, which re-parses to the same structure, and
  `f([x,y])` round-trips to the call. The same rule covers the tuple family —
  `Delimiter(Tuple(x, y))` used to emit `f(x,y)` under a call, which re-parsed
  as TWO scalar arguments where the source had one tuple argument; it now emits
  `f((x,y))`. A `Sequence` operand still fuses with the parentheses, since a
  sequence IS a bare argument list. (Tycho item 230; the Desmos importer's
  persisted rows were corrupted by the glued form.)

- **`Negate` distributes over a tuple whose components are collections, and a
  tuple divides by a scalar under the same rule that multiplies it.** A "zipped"
  point list — a `Tuple` of coordinate lists, `([1,2], [3,4])` — negated
  component-wise only when every component TYPE was a scalar number, so `-P`
  stayed an inert `Negate`, and `P − P` or the interpolation `(1−t)·P − t·P`
  (with `t` substituted later) never reduced, while `2·P` and `P + P` folded
  fine. The negate arm now uses the same structural tuple test as the
  `Add`/`Multiply` dispatch. The `tuple / scalar` arm had the sibling gap plus
  one more: it now admits the same tuples as the `Divide` type handler
  (transparent type aliases included), and each component quotient is evaluated
  the way the multiply and add arms already evaluate theirs — so `P / s` folds
  once `s` has a value, and `P / 0` answers `(~oo, ~oo)` with the point shape
  kept. Dividing BY a tuple still errors (`no-division-by-point`), and a
  non-numeric tuple still rejects with the same error the multiply path gives.
  (Tycho item 229 — the interpreted fallback of the declined rows painted
  nothing because the difference of two evaluated tuples stayed symbolic.)

- **The JavaScript compile target no longer withdraws a value-correct kernel
  because a tuple holds an exact constant with a complex-hedged type.**
  `√(5−√5)` — an exact value of `cos`/`sin`(π·rational), ordinary in Desmos
  documents — types the `finite_complex` hedge (the engine does not prove
  `5−√5 ≥ 0` at type time) though its value is the plain real `1.6625…`. The
  broadcast lowering's per-element shape analysis read that element complex, the
  element verdicts of `(√(5−√5), 0)` disagreed, and every `Add`/`Multiply` over
  such tuples failed closed with a misleading "list-valued operand" diagnostic.
  The complexness oracle (`isComplexValued`) now answers fold-first inside a
  JavaScript compilation: a closed pure scalar whose memoized constant fold is a
  real number reports real, and the constant folder's complex-shape gate —
  reading the same oracle — then inlines that folded literal, so every analysis
  and the emitted code describe the same plain number (an indexed read of such a
  broadcast result computes correctly rather than reading `.re` off a plain
  number). The fold-first verdict stands down where the emission cannot fold:
  under `constantFold: false`, in a `symbolDeps` capture, on the shader targets,
  and outside a compilation — there the previous fail-closed decline is
  unchanged, as it is for genuinely complex or symbolic elements. (Tycho item
  229; 80 of the witness document's 201 line members were declined this way, all
  value-correct.)

- **Interpreted broadcast evaluation no longer pays the literal-type cost per
  element.** Since a number literal's public `.type` became its literal value
  (`ce.box(21).type` is `21`), every intermediate result of an interpreted
  broadcast carried a structured type, and each per-element type query walked
  that structure instead of comparing interned tier strings — about 2,000
  subtype queries per element on the witness workload, roughly doubling the cost
  of evaluating and draining a large computed collection (a 7,225-element Desmos
  color chain went from ~5.5 s to ~12.7 s and blew through the consumer's
  materialization budget). Ruled: a broadcast CELL is a storage-like position
  and may widen. A re-entrant widening window now makes a literal report its
  bare tier for the duration of the interpreter's own per-cell computation —
  opened around each element step of a broadcast map and in the shape classifier
  that provably discards the precision anyway. Everything user-visible keeps the
  literal type: the public `.type` of any expression, tuple components read at
  classification time, and the types named in per-element error messages (a
  diagnostic minted inside a cell re-reads the precise type outside the window).
  The widening recovers the drain cost to within ~5% of the pre-literal-types
  baseline and costs nothing on ordinary small expressions. (Tycho item 228.)

- **The shader targets lower `Power` over a vector base, so the
  min-distance-field family compiles on the GPU lane.** `min` over squared
  distances to a literal point list — `(x−P.x)² + (y−P.y)²` after vectorization
  — stopped at `Power`: the sign-preserving integer-power helper `_gpu_powi` is
  declared over scalar floats, and `pow(vecN, scalar)` is invalid in both shader
  languages (no scalar promotion). The targets now emit a per-width helper
  family `_gpu_powi2/3/4` (WGSL has no overloading, so the width is in the name;
  the sign is restored per component), select it from the operands' vector
  width, widen the scalar side of `pow` explicitly, and answer `vecN(1.0)` for a
  vector base raised to the zero power — which previously emitted a shape-wrong
  scalar `1.0`. Found and fixed alongside, on WGSL only: the emitted-call
  argument counter treated the comma inside a type template (`array<f32, 1>`) as
  an argument separator, so every one-for-one operand-shape check stepped aside
  and an invalid emission passed as `success: true`. Component reduction for
  `Min`/`Max` over a vector already existed and is unchanged. (Tycho item 231,
  face (a); the symbolic-length face (b) still fails closed by design — a
  host-side per-values substitution makes the count static, which is the
  supported route.)

## 0.119.0 _2026_08_23_

### Breaking Changes

- **A number literal's `.type` is now its literal type.** `ce.box(42).type` is
  `42` — a value type, a subtype of `finite_integer` — and `ce.box(0.5).type` is
  `0.5`. An exact rational carries its tier through a singleton range
  (`ce.parse('\frac12').type` is `finite_rational<0.5..0.5>`), and an exact
  value no machine number represents carries its sign on its tier
  (`ce.parse('\sqrt2').type` is `(finite_real<0..>) & !0`). `NaN`, `±∞` and
  complex literals keep their tier types, as do string and boolean literals.
  Subtype tests are unaffected — `ce.box(42).type.matches('integer')` is still
  `true` — but code that compares `.type.toString()` against a tier name must
  switch to `.matches()`. Stored types still widen to tiers: `k := 42` infers
  `k: integer`, a generic call `identity(5)` types `finite_integer` (the solver
  never binds a type variable to a literal type), `[[1, 2]]` types
  `matrix<finite_integer^(1x2)>`, and `{x -> 1}` types
  `record{x: finite_integer}`. Type errors now name the offending literal:
  "expected `integer`, got `2.5`" instead of "got `finite_real`".

- **Declared signatures admit by overlap; conformance is checked at
  evaluation.** An operator with a declared signature now follows the same
  admission model as arithmetic: an argument is refused at boxing only when it
  is _provably_ incompatible — a concrete value that fails membership
  (`FactorInteger("abc")` is still an error at boxing), or a symbolic argument
  whose type shares no inhabitant with the parameter (`string` at an `integer`
  slot). A symbolic argument whose type merely OVERLAPS the parameter is
  admitted provisionally: `FactorInteger(n)` with `n: number` now boxes, works
  when `n` turns out to be 12, and errors at evaluation when it does not. On a
  strict engine, a generic runtime conformance check at non-lazy dispatch
  enforces the declared parameter on each evaluated concrete operand, producing
  the same `incompatible-type` error value the static gate mints for a literal —
  so the literal and symbol routes now agree. Consequences to note: a wrong-kind
  concrete value that a handler previously absorbed silently is now an error
  (see Resolved Issues); a diagnostic for a call like `k(x)` with `x` merely
  _typed_ incompatibly (no value yet) moves from box time to run time, and the
  Epsil static pre-pass no longer flags it (ROADMAP: "Epsil static evidence
  diagnostics lost to overlap admission"). Collection-kind and function-kind
  parameters, and operators with a custom `canonical` handler, keep their
  existing handler-owned admission unchanged. On a non-strict engine
  (`strict: false`) nothing changes. (R1/R8 — §4.4 of
  `docs/plans/2026-08-22-type-handlers-on-types.md`; pinned by
  `runtime-conformance-fuzz.test.ts` and `runtime-conformance.test.ts`.)

- **`Sqrt` no longer evaluates a closed radicand to decide its type.**
  `√(1 − 0.2²)` — a machine-float radicand, which canonicalization deliberately
  does not fold — now types `finite_complex`, the same hedge as any other real
  radicand of statically unknown sign, instead of `finite_real`: the type
  handler used to numericize such radicands (`closedRealSign`, now deleted) for
  the sole benefit of the compile targets, and a type derivation must not
  evaluate. Values are unchanged (`evaluate()`, `.N()`, `solve()` fold the float
  as before) and compiled output is byte-identical: the compile targets fold
  constant subtrees themselves before any lowering decision reads a type (the
  item-137 GLSL band is pinned byte-for-byte in `type-handler-audit.test.ts`). A
  literal radicand still types precisely — `√0.96` stays `finite_real`, its sign
  being statically known. Measured blast radius: 3 pinned type assertions, all
  in `type-handler-audit.test.ts`; zero snapshot changes in the full suite.
  (§5.4 `Sqrt` row and §5.8 A5 of
  `docs/plans/2026-08-22-type-handlers-on-types.md`.)

### New Features

- **Ranged result types: `Abs`, even powers and `Exp` carry their sign in the
  type.** `|x|` types `real<0..>` (each real tier keeps its non-negative range),
  `x²` types `finite_real<0..>`, and `e^x` — every `Power` with a provably
  positive real base — types `(finite_real<0..>) & !0`, so a consumer that reads
  the TYPE sees the sign the `sgn` handlers always knew: `√(x²)`, `√|x|` and
  `ln(2^x)` now type `finite_real` instead of hedging complex. `Negate` reflects
  a range instead of echoing it (`−|x|` is `real<..0>`). The scope stops at
  these heads: `Add`/`Multiply` deliberately still join bare tiers (see the Bug
  Fixes note below); general interval arithmetic is tracked separately in
  `ROADMAP.md`.

- **Number literals carry their value in their handler-visible type.** A type
  handler now sees `21`, `0.5` (value types), an exact rational as a singleton
  range (`finite_rational<0.5..0.5>`), and a value no machine number holds
  exactly as a sign-carrying range (`(finite_real<0..>) & !0` for `√2`) — so the
  sign and value questions handlers used to answer from the value channel
  (`Power`'s integer-vs-rational claim for `10^21`, `arcsin(0.5)`'s domain
  classification, `Range(2, 3)`'s index-span test, an even root of a negative
  constant) are now answered by the type alone. The PUBLIC `.type` of a literal
  is unchanged (`ce.box(21).type` is still `finite_integer`), and a handler
  result is widened back to ordinary types before it is stored, so literal types
  never leak into an expression's type. The constants `e` and `π` now declare
  value-bracket ranged types
  (`finite_real<2.718281828459045..2.718281828459046>`), so their positivity is
  a type fact as well. (Ruling O9 first half,
  `docs/plans/2026-08-22-type-handlers-on-types.md` §4.3/§6.)

- **The `interval-js` target sizes — or declines — dynamically nested integrals
  at compile time.** An inner integral runs once per enclosing piece, so
  `Integrate` nodes nested inside each other's integrands or bounds multiply the
  enclosure's work by their piece count per level — a class the per-node sizing
  (which only sees one node's limits) could not bound. The outermost integral of
  a nest now measures its whole subtree (`integrateStats`: how many integral
  runs, how deeply they nest — a pure function of the tree, memoized per node,
  no clock anywhere) and picks one uniform per-level count keeping
  `runs·count^depth` within the 65 536 evaluation budget; inner lowerings
  inherit that count through the compile target. Below 4 pieces per level the
  enclosure would be as uninformative as `entire` at full cost, so such an
  integral fails closed instead and the caller falls back (in a two-lane
  consumer, to its scalar estimate) — restoring, for the macro-expanded Tycho
  item-226 witness, exactly the pre-0.118.2 decline behavior at ~zero probe
  cost: the witness document's member sweep runs in ~25 s against 44 s on
  0.118.1 and 90 s with the runtime budget alone. Visible chains that fit are
  now genuinely cheaper AND honest: a three-deep chain that formerly ran 256³
  evaluations into the runtime budget's `entire` now answers a real (coarse)
  enclosure at ~28 pieces per level in milliseconds. Composition through
  by-reference function calls shows no `Integrate` node in the tree and is still
  bounded at run time by `INTERVAL_NESTED_QUADRATURE_BUDGET`. A `Sum`/`Product`
  with literal bounds multiplies its body's integral runs by its iteration count
  in the sizing; with symbolic bounds the body is counted once and that shape,
  too, is runtime-backstopped. Both mechanisms are pinned in
  `compile-interval-integrate.test.ts`. (Tycho item 226)

### Resolved Issues

- **`Rational(n, d)` is an integer-pair constructor again: a proven non-integer
  argument is rejected instead of silently dividing.** The two-argument form
  canonicalizes to `Divide`, which erased the declared integer contract, so
  `Rational(3, 2.5)` — and `Rational(3, x)` with `x := 2.5` — evaluated to
  `1.2`. The signature is now the overload
  `((real) -> rational) | ((integer, integer) -> rational)` and a non-integer
  literal, or a symbol holding one, errors with `incompatible-type` on every
  construction route. A valueless symbol is still admitted and rewrites to
  `Divide` as before, and the `Divide` spelling itself is unchanged
  (`Divide(3, 2.5)` is still `1.2`).

- **`Divides` no longer answers a rounded question.** `Divides(2.5, 3)` returned
  `True` — the handler converted operands with the rounding `toBigint`, so it
  actually tested `3 | 3` — and `NotDivides(2.5, 3)` returned `False` (the truth
  is `True`). Non-integer operands now stay symbolic, as the operator's
  documentation always stated. The same integrality gate protects
  `FromContinuedFraction`, which used to reconstruct a value from a rounded
  non-integer term, and `NotDivides`' declared signature now matches `Divides`'
  (`(number, number)`).

- **The unary `Multiply`/`Subtract` fold no longer lets a held non-numeric value
  through unexamined.** `Multiply(s)` with `s := "str"` folded to the lone
  operand — the operator vanished before any check could run — and evaluated to
  `"str"`, while the literal `Multiply("str")` refused. A lone operand holding a
  concrete string, boolean, or character now errors with `incompatible-type`; a
  lone collection still folds (the broadcast identity) and a valueless symbol
  still folds.

- **`Intersection` of a single collection is that collection as a set, not the
  empty set.** `Intersection([1, 2, 2])` evaluates to `Set(1, 2)` (symmetric
  with `Union`), and a set-shaped operand returns itself without enumeration —
  `Intersection(Integers)` is `Integers`. Nullary `Intersection()` is still
  `EmptySet`.

- **`Vector` declares the content leniency it always had.** Its signature is now
  `(any+) -> vector`, matching the tensor family (`Matrix` accepts non-numeric
  entries on every route), and its type handler claims the numeric `vector<n>`
  only when every element is provably a number.

- **The Epsil linter is now deliberately stricter than engine admission for
  assignment evidence.** `let x; x = g(); k(x)` with `g: () -> number` and
  `k: (integer) -> integer` flags a `static-type-error` again: the pre-pass
  refuses a call whose recorded evidence type does not FIT the parameter, even
  when it merely overlaps — the way TypeScript flags code that would run.
  Lint-only by construction (the evidence exists only while a pre-pass runs);
  the executed program is unchanged, overload verdicts stay per-arm, and an
  exact-rational initializer now flags too. One adjacent lint gap is recorded in
  `ROADMAP.md`: a LAMBDA-valued callee's argument errors are deferred to run
  time by design, so the pre-pass does not surface them yet.

- **Folding an assigned value that would explode the emitted source now fails
  closed.** A DAG-shared value tower unfolds once per reference path in
  generated text, so compiling a member could grind through megabytes of source;
  `tryFoldKnownSymbol` now refuses above 20,000 expanded nodes (a DAG-linear
  identity-memoized size sum — the compile corpus's largest legitimate fold is 4
  nodes) with a message that says why. The default `fallback: true` route
  degrades to interpreted evaluation with correct values; the direct
  registered-target route throws. The CSE initiative remains the general fix.

- **Nested quadrature is bounded through Monte-Carlo composition, and compiled
  multiple integrals cost what the interpreter's do.** `_SYS.integrateMC` joins
  the nested-evaluation budget (a runaway by-reference composition under
  Monte-Carlo, previously unbounded, now answers `NaN` in seconds; a nested
  Monte-Carlo integral that previously never returned now answers `NaN` too),
  and the `Integrate` emitter seeds starting panels by the statically visible
  nesting depth using the interpreter's own sizing — a compiled triple integral
  dropped from 1.38·10⁷ integrand evaluations (~0.9 s) to 9.1·10⁴ (~12 ms) with
  accuracy equal or better on every probed closed form.

- **A runaway dynamically-composed scalar integral now answers `NaN` instead of
  hanging.** The scalar `javascript` target's `_SYS.integrate` carries the same
  per-outermost-integration evaluation budget the interval target already had
  (2²⁵ nested integrand evaluations — ~70× headroom over the hardest measured
  double integral, 2.4× over a smooth genuine triple): by-reference composition
  no tree walk can see is cut after a few seconds, an exhausted run cannot fall
  through to the Monte-Carlo fallback, and a fresh outermost integral re-arms.
  Choosing `NaN` as the exhausted result follows the ROADMAP entry's own
  analysis (the scalar result is an estimate, not an enclosure).

- **`structural` of an object-holding shared tree is no longer exponential.**
  The per-node memo cannot persist a payload containing a mutable object (cache
  rulings B12/B22), so such trees rebuilt once per path; a transient map scoped
  to the outermost read — retaining nothing, validating nothing — now preserves
  sharing within one read (depth 18 cost 8.5 s before; depth 30 is now
  `depth + 1` rebuilds).

- **The Epsil pre-pass flags a concrete literal initializer that cannot inhabit
  a call's parameter again.** Overlap admission had silenced `let x = 1.5; k(x)`
  for `k: (integer) -> integer` (the widened `number` overlaps `integer`); the
  pre-pass now records the initializer's exact literal type as its assignment
  evidence, which provably refutes the parameter, restoring the
  `static-type-error` — while `let x = 2` stays clean and a symbolic `x = g()`
  stays admitted (that half is an open product decision recorded in
  `ROADMAP.md`).

- **Every irrational standard-library constant declares a value-bracket ranged
  type** (`e`/`ExponentialE`, `π`, `γ`, Catalan's G, and φ), so sign and
  magnitude are type facts — `√φ` and `ln π` type `finite_real` off the
  declarations alone. `GoldenRatio`'s value is an unevaluated expression whose
  static type cannot witness a bracket; such standard-library declarations are
  now TRUSTED (the throwing value-vs-type check is user-`declare`-only) and
  validated empirically under a development-build `console.assert` plus the
  suite pin `constant-declared-brackets.test.ts`. The remaining literal-value
  type handlers (`ErfInv`, `PolyLog`, `Subscript`'s numeral base) read the
  literal's handler-visible type first.

- **A compilation that exhausts the shared antiderivative pool no longer starves
  later compilations of closed forms.** The per-compilation pool bounding
  symbolic antiderivative-first attempts (added with the item-226 fix) was reset
  only in `compileRoot` and the public `compile()` entry — but registered
  targets invoked directly
  (`ce._getCompilationTarget('javascript').compile(...)`) enter through
  `compileCseRoot`, which reset nothing. Once any compilation drained the pool,
  every later direct-target compilation skipped the symbolic attempt permanently
  and emitted runtime quadrature (`_SYS.integrate(…)`) where a closed form
  exists (`∫₀ᵗ 2x dx` compiled to a quadrature call instead of `t²`). The reset
  now lives at the one choke point every route crosses — the depth-0 boundary of
  `BaseCompiler.compile` — which also gives each auto-mode escalation attempt
  its own pool. Nested compilations now consume the outer pool instead of
  re-granting themselves a fresh one, so the aggregate stays bounded by one pool
  per depth-0 compilation entry (a multi-statement shader body, which compiles
  each statement as its own root, gets one pool per statement). Pinned in
  `compile-antiderivative-budget.test.ts`. (Surfaced by the dual review of the
  constant-fold-before-type-read change.)

- **`Histogram`/`BinCounts` no longer round a non-integer scalar bin spec.** The
  scalar bin spec is a bin COUNT, but it was read with a rounding conversion, so
  `BinCounts(data, 2.5)` silently answered the 3-bin question. A non-integer
  scalar now stays INERT — the documented contract, which lets Desmos-style
  bin-WIDTH spellings (`histogram(L, .05)`) parse and remain for the importer to
  translate. A string bin spec, reachable through a permissively-typed symbol,
  is now an `incompatible-type` error instead of being iterated
  character-by-character into `NaN` bin edges.

- **Integer-domain operators no longer silently round a non-integer operand
  delivered through a permissively-typed symbol.** With `u: any` and `u := 2.5`,
  `FactorInteger(u)` answered `[(3, 1)]`, `NextPrime(u)` `5`, `IsTriangular(u)`
  `True`, and `Fibonacci(1 + 2i)` `1` — the ~45 operators of the number-theory
  and combinatorics families trusted the boxing gate to never hand them a
  non-integer, and `toBigint` rounds by contract. All of them now produce an
  `incompatible-type` error value at evaluation, from the generic runtime
  conformance check (no handler was changed).

- **An unknown rule-condition name no longer crashes.**
  `Condition(x, "nonsense")` threw a raw `TypeError` out of `evaluate()` (an
  unguarded `CONDITIONS[name]` lookup); `checkConditions` now fails closed on an
  unknown condition name. More generally, a native-fault crash
  (`TypeError`/`RangeError`/`ReferenceError`) escaping a built-in non-lazy
  `evaluate` handler is converted into an `evaluation-error` value on the
  expression instead of crashing the caller; deliberate throws — cancellation,
  redefinition discipline, predicate contracts, user-function arity — still
  propagate unchanged.

- **A promoted radical arm in a branch is no longer double-wrapped on the
  JavaScript target.** Under the complex discipline (the default
  `mode: 'auto'`), `If(c, √−4, √(1 − 0.2²))` promotes the unknown-sign radical
  arm to `_SYS.csqrt(…)` — already a `{re, im}` object — while the branch
  coercion classified that arm by its static type and wrapped it a second time
  (`{re: {re, im}, im: 0}`), NaN-poisoning every slot read. The JavaScript
  target's static complex-wrap sites (`BaseCompiler.isProvablyRealValued`:
  branch-arm coercion, the `Typed` ascription lift, the complex-argument
  delivery) now consult the shape analysis (`isComplexValued`) before the static
  type, and — where the type is imprecise — the constant fold's value
  (`constantFoldValue`, split out of `tryConstantFold` behind every gate except
  the `constantFold` emission opt-out). A closed constant arm beside a complex
  arm therefore keeps the complex convention under every mode, including
  `mode: 'strict'` with `constantFold: false`, where only the fold-informed
  analysis can prove the structurally-emitted arm real. Pinned in
  `compile-complex.test.ts` ("coercion reads the value SHAPE" block).

- **The runtime effects projection honors its memo for pure applications, and an
  expression's structural form is memoized per node.** Two independent defeats
  of per-node caching made every walk over a DAG-shared tree — a document
  function applied to its own previous result embeds that result once per
  parameter mention, so a few levels unfold to millions of paths — exponential,
  which surfaced as a consumer document evaluating at 4 GB and aborting on the
  heap limit (Tycho item 225). First, `effectsOf`'s memo consultation was
  spelled `expr._effectsOf?.() ?? applicationEffects(expr)`, and `undefined` is
  the memo's legitimate answer for a PURE application — so every read of every
  pure node fell through and recomputed its entire subtree: 24 million
  recomputes in one document evaluation, 1.5 million once the memo is honored.
  Second, `BoxedFunction.structural` rebuilt through every operand's
  `structural` with no per-node memo, so a shared tree was rebuilt once per path
  — exponential time and fresh allocation for every copy; it now caches per node
  (generation-guarded, like `type`), and the rebuilt form preserves the sharing.
  Both pinned on the depth-30 shared tower in `dag-shared-walks.test.ts`. The
  witness document no longer OOMs; its remaining cost is a separate compile-time
  issue (baking a DAG-shared symbol value into compiled source is exponential in
  the OUTPUT without CSE) tracked in `ROADMAP.md`. Found in review and fixed
  with it: once any mutable object exists, two more walks re-scanned a shared
  tree once per path — the cache commit points' payload-containment scan
  (`containsObject`), and the cross-engine ingress guard that runs on EVERY
  function boxing (`containsForeignEngineObject` — constructing a depth-n shared
  tree cost 2^n scans). Both now carry a per-question memo and are linear in
  distinct nodes; pinned by the armed-scan test in `dag-shared-walks.test.ts`. A
  shared tree that CONTAINS an object still rebuilds its structural form per
  read (the cache commit rule refuses object-holding payloads by ruling);
  tracked in `ROADMAP.md`. (Tycho item 225, partial)

- **A dynamically nested interval integral can no longer run away.** The
  compiler sizes an integral's piece count only for the nesting it can see — the
  limits of one `Integrate` node (256 pieces for a single or double integral,
  fewer per level beyond that, so one node never exceeds its 65 536 evaluation
  budget). But integrals also nest DYNAMICALLY: a distinct `Integrate` node
  inside another's integrand, or a compiled user function that computes an
  integral, runs once per enclosing piece, multiplying the work by 256 per level
  with no syntactic trace. The Tycho item-226 witness — a six-level Newton
  iteration `w − k·E(w)/d_E(w)` whose macro-expansion substituted each level
  into `E`'s integrand — emitted 728 `_IA.integrate` calls nested inside each
  other's integrands, ~256⁶ integrand evaluations, and never returned. The
  interval runtime now enforces its own budget
  (`INTERVAL_NESTED_QUADRATURE_BUDGET`, 4× the per-node compile-time budget):
  each outermost integral entry resets it, every integrand evaluation performed
  by a nested integral consumes it, and a nested integral that finds it
  exhausted answers `entire` — sound, since the entire line contains the true
  value — so the enclosure widens instead of spinning and the caller degrades to
  its non-interval fallback. Integrals the compiler did size are untouched (a
  double consumes 65 536 of the 262 144 budget, a triple about the same), pinned
  alongside the regression in `compile-interval-integrate.test.ts`. The
  consumer's document that hit this completes its member sweep in ~90 s where it
  previously never returned. With it, the antiderivative-first symbolic attempts
  of one compilation now share a single 4 s wall-clock pool instead of arming a
  fresh 2 s span per `Integrate` node, so a many-hundred-node emission degrades
  to its numeric emitters at bounded compile-time cost. The pool resets at every
  compilation entry — the public `compile()`, `compileRoot` (raw custom
  targets), and `compileCseRoot` (every registered target's root) — so no
  compilation inherits an earlier one's depleted pool; pinned by draining the
  pool and compiling on each route. (Tycho item 226)

- **An `assume()` range no longer leaks through `Add` and `Negate`.** After
  `assume(x > -1); assume(y > -1)`, `x + y` typed `real<-1..>` — but the sum can
  be as small as −2 — and `-x` echoed `real<-1..>` verbatim. Join-based result
  computations now strip range decorations from their inputs (a join is a set
  union, and a sum does not lie in the union of its terms' ranges), and `Negate`
  reflects a range about zero (`-x` under that assumption is `real<..1>`).

## 0.118.2 _2026-08-22_

### New Features

- **The `interval-js` target now lowers `Integrate`, `At`, `Length` and
  `PointX`/`PointY`/`PointZ`.** Each compiled on the `javascript` target and
  declined on `interval-js` with "the operator is known to the engine but target
  'interval-javascript' has no lowering for it", so every plotted band over one
  of them fell from the interval lane to the scalar fallback. Four of the six
  had a common cause: the interval target had no collection value model at all —
  a `List`/`Tuple` literal had no lowering, and an array handed to a compiled
  function was flattened into an object keyed `"0"`, `"1"`, …, losing its
  length. A collection is now a JavaScript array of intervals in the OPERAND
  position of an accessor, and the accessor projects it back to one interval:
  `Length` answers the count as a point interval; `At` applies the interpreter's
  1-based, negative-from-the-end convention, and since the index is itself an
  interval it stands for a set of indices — the result is the hull of every
  element the integers in it select, `partial` when some of them fall outside
  the collection, and the numeric absence marker (`{ lo: NaN, hi: NaN }`) when
  none selects anything; `PointX`/`PointY`/ `PointZ` read one coordinate of a
  single point. A literal collection — or a symbol assigned one — folds at
  compile time. The gates mirror the `javascript` target's: a string base, a
  gather or mask index, a list of points under a coordinate accessor, and a
  collection-valued RESULT all still decline, each with a message saying why
  (the target's value is one interval). `Integrate` is a different algorithm
  rather than a table entry: the antiderivative-first step is now shared with
  the `javascript` target (`BaseCompiler.closedFormIntegral`), so `∫₀ˣ sin t dt`
  compiles to the closed form `1 − cos x` on both — except that on the interval
  target a DEFINITE integral's closed form is guarded at run time
  (`_IA.integrateClosed`): the symbolic step differences an antiderivative at
  the bounds without checking that the integrand is bounded between them
  (`∫₋₁¹ dt/t²` closes to `−2`), and on this target that would be a zero-width
  "enclosure" of a divergent integral, so a coarse interval scan of the
  integrand over the range withholds the closed form — the scan cannot miss a
  pole, since interval arithmetic encloses — and hands such an integral to the
  enclosure, which answers `singular`. An integral that does not close compiles
  to `_IA.integrate`, an enclosure — a Riemann bracket over a uniform partition,
  with interval-valued bounds handled by the mean-value correction
  `[0, b₂−b₁]·f([b₁, b₂])` on each side, and the accumulation's own
  round-to-nearest error added back by the standard dot-product bound — rather
  than the scalar target's Gauss–Kronrod estimate. Its width is first order in
  the piece size (≈ 2.5·10⁻³ on `∫₀¹ e^{−t²x} dt` at 256 pieces); nested limits
  share one evaluation budget of 65 536 integrand calls (256 pieces per level
  for a single or double integral, 40 for a triple, 16 for a quadruple), so a
  deeper integral gets a coarser enclosure instead of a runaway cost. A pole
  inside the range answers `singular`, an undefined integrand `empty`, and an
  infinite bound `entire` (no finite partition exists; the scalar target's
  variable transform is not interval-tight). An indefinite integral with no
  closed form still fails closed, as on the `javascript` target. Found and fixed
  alongside, on BOTH targets: a `Function` integrand's parameters were paired to
  the limits by position, where the interpreter pairs them by name —
  `Function(a·x·y², y, x)` under `(x, 0, 1), (y, 0, 2)` compiled to ∫∫ a·y·x²
  (`2a/3`) instead of ∫∫ a·x·y² (`4a/3`), and a spare parameter
  (`Function(x + q, x, q)` under one limit) compiled as a read of an input the
  integral never supplies; both now fail closed unless the parameters match the
  integration variables one to one. And the interval target never populated
  `varsKeys`, so a symbol the caller pinned through `vars` was not protected
  from the closed-form fold (`∫₀ᵏ t dt` with `k` mapped baked `k²/2` instead of
  reading `k` at run time). Two contract points were settled with it: the
  interval target's result is one interval per quantity, so a collection-valued
  expression (a comprehension) returns an ARRAY of interval values
  (`IntervalValue`) — which comprehension roots already did, now typed and
  honored by the interpreter fallback too, which used to collapse any list to
  `entire`; and every scalar kernel now fails closed on a provably
  collection-valued operand, where `Add(L, 1)` used to answer
  `{ lo: NaN, hi: NaN }` and `Less(xs, 3)` `'maybe'` behind `success: true`. The
  runner's variable type is `IntervalInput` — a number, an interval, or an array
  of these for a collection-valued variable. (Tycho item 220)

### Resolved Issues

- **Evaluating a user function over its own previous result no longer takes
  exponential time.** A document function applied to its own result — Tycho's
  `detail(smooth(upSample(…)))` heightmap chain, evaluated while its sliders are
  still valueless — produces an inert value that EMBEDS the previous level once
  per mention of the parameter: four levels hold about 16 000 distinct nodes
  that unfold to over a million. Every walk that descended each operand
  independently paid for the unfolded tree — the `Add` ordering key (`revlex`, a
  string of every symbol in the term, so the key itself grew to gigabytes), the
  free-variable scan (`unknowns`, `freeVariables`, `symbols`), the binder
  rewrite behind parameter substitution, symbol dereference and
  `Sum`/`Comprehension` canonicalization (`rewriteWithBinders`), closure
  capture, the element memo's dependency snapshot, `has()` and the ordering
  tie-breaker's leaf count — and none of them reached a deadline check, so a
  consumer's per-evaluation time budget never fired: one document ran for more
  than twenty minutes at 100 % CPU and 3 GB (Tycho item 220's sweep stall).
  0.118.1 finished the same document in about 12 s only because its `Add`
  broadcast over the operand; the item-221 fix keeps that `Add` inert, which is
  right, and exposed the walks. Each walk now memoizes per node within a call,
  so it is linear in the number of distinct nodes, and the ordering key is
  bounded to the trailing 1 024 characters of the symbol sequence. The bounded
  key is a function of the unbounded one, so every sum whose terms' keys fit
  orders exactly as before; a sum whose terms carry more than 1 024 characters
  of symbol names AND share that whole tail now breaks the tie by the structural
  `order` rather than by the longer key — deterministic, and only reachable from
  expressions of that size. The heightmap document evaluates in 3.7 s (78–199 s
  before); the engine-only replica at three levels takes 0.2 s (more than two
  minutes before). Pinned in `dag-shared-walks.test.ts` on a depth-30 shared
  tower (31 distinct nodes, 2³⁰ unfolded): the free-variable and symbol scans,
  the bounded ordering key, the degree walks on a shared polynomial spine, the
  leaf-count tie-breaker, `has()`, a `Sum` binder over the tower, the
  application of a literal holding it, and a lazy collection's dependency
  snapshot over it. Two walks on the way to ASSIGNING such a literal remain
  exponential and are tracked in `ROADMAP.md` ("Assigning a function literal
  whose body shares operands").

- **A compound factor of a vector `Multiply` keeps its parentheses on the `glsl`
  and `wgsl` targets.** `Multiply(Add(t, 1), Tuple(x, 0))` compiled to
  `t + 1.0 * vec2(x, 0.0)`, which the shader reads as `t + (1.0 * vec2(x, 0.0))`
  — the float broadcast into the vector rather than scaling it, so a
  Desmos-style lerp `t·P₁ + (1−t)·P₀` rendered as `t·P₁ − t + P₀`. A `Multiply`
  with a collection operand is lowered by the shader target's function handler,
  and the `compile` callback such a handler receives carries no precedence
  context, so the factor arrived unparenthesized and was joined with a bare `*`.
  Each factor is now compiled at the binding power of `*`. Two more instances of
  the same dropped grouping are fixed with it: a function handler's emission
  spliced into an enclosing infix operator now obeys the same `op[1] < prec`
  rule the infix path applies to its own operands (`s·(P + Q)` over two points
  emitted `s * vec2(a, b) + vec2(c, d)`), and a single-statement `Block` used as
  a sub-expression is compiled at the enclosing precedence on every target
  (`Multiply(Block(Add(t, 1)), x)` emitted `x * t + 1` on `javascript`,
  `python`, `glsl` and `wgsl`). The scalar multiply, `Divide`, and the
  `javascript`/`python` lowerings of the vector shape were already correct and
  are unchanged. (Tycho item 224)
- **A bare `Nothing` fails closed on every compile target.** `Nothing` is the
  erasure marker, not a value; it can still reach a compiler as a bare symbol (a
  malformed `Which` with a dangling clause canonicalizes to it). Only the
  `javascript` target refused it — `glsl` and `wgsl` emitted the undefined
  identifier `Nothing` behind `success: true`, `python` the undefined name, and
  `interval-js` a `_.Nothing` read that is `undefined` at run time. All five
  targets now decline with the same diagnostic ("the erasure marker is not a
  value … Fail closed (D6)"). A `Nothing` arithmetic operand is still erased at
  canonicalization (`Add(Nothing, x)` compiles to `x`), as before.
- **An element-wise broadcast no longer captures a collection-typed but still
  valueless operand as a per-element scalar.** With `A` an unknown-length view
  (`Range(0, n)/n`, `n` unassigned) and `s` declared `list<number>` but not yet
  assigned, `Multiply(A, s)` evaluated to `Map(_ ↦ _·s, A)`; once
  `s := [10,20,30]` and `n := 2` bound, that stored form materialized as the
  outer product `[[0,0,0],[5,10,15],[10,20,30]]` while a fresh `Multiply(A, s)`
  zipped to `[0,10,30]`. The known-length form `[1,2,3]·s` → `[s, 2s, 3s]` was
  the same splice. A collection-typed operand that is not yet a collection value
  now leaves the operator inert — `s·[1,2,3]`, typed `list<number>`, the zip's
  element type — and re-evaluating it after the assignment zips. The decline
  reaches every route: `Add`/`Multiply`/ `Divide`/`Mod`, user lambdas and
  declared `broadcastable<…>` parameters (the application is held rather than
  inlined — `g(a,b) = (a,b)` no longer stores `([1,2], s)`), the relational
  operators (`[1,2,3] < s`), `When`'s mask, `PointList` components, tuple
  scaling (`(1,2)·s` no longer stores `(s, 2s)`), and operands typed
  `number | list<number>` or `broadcastable<number>`. A definite length mismatch
  among the resolved operands still errors (`[1,2] + [3,4,5] + s` →
  `incompatible-dimensions 2 vs 3`), and a symbol declared bare `tuple` keeps
  scaling a list (`[1,2,3]·r` → `[r, 2r, 3r]`). (Tycho item 221)
- **`PointList` over unknown-length lazy views is a point VIEW, with a type that
  carries the point arity.** `PointList(−√(1−A²), A)` with `A = Range(0,n)/n`
  and `n` unassigned evaluated to an inert `PointList` head — `isCollection`
  false, no `count`, typed `list<tuple>` with no component arity — while the
  sibling `A·(1,0)` already produced a lazy point view. An unknown-length
  indexed component (a symbolic-length `Range`, a lazy `Map` over one, a
  `Filter`) now transposes lazily, exactly as the arithmetic route does: the
  result is a collection, resolves to the eager list of points as soon as the
  length does, and the stored lazy form re-evaluates to the same points a fresh
  evaluation gives. A provably infinite component or a non-indexed one (a `Set`)
  still fails closed; a string component is an atomic coordinate rather than a
  fail-closed trigger, so `PointList("ab", 3)` now evaluates to the point
  `("ab", 3)` its type already promised. The static type is
  `list<tuple<T₁, …, Tₖ>>` (each list component contributes its element type,
  any other component its own type) instead of the arity-less `list<tuple>`.
  **Consumer-visible consequence:** because a two-component point list now
  statically has no third coordinate, `PointZ(PointList(-6, n))` is a typed
  `incompatible-dimensions` error at box time on every route, where the
  `javascript` target used to emit a kernel of `NaN` absence markers and the
  GLSL target its own arity decline. (Tycho item 222)
- **A zipped `Divide(list<tuple>, list<number>)` folds each element.**
  `[T, U] / √(PointX([T,U])² + PointY([T,U])²)` evaluated to
  `[0.999999999999999835·(0.943…, −0.331…), (0.6, 0.8)]`: the value-level
  `div()` had no tuple arm, and the broadcast zip builds each element with
  `ce._fn('Divide', …)`, which bypasses the `canonicalDivide` fold the
  single-tuple form `T / √(…)` takes. An inexact divisor left an inert
  `number × Tuple`; an exact integer divisor (`[T, U] / [2, 5]`) left a tuple of
  unevaluated `Divide` components. A numeric tuple divided by a numeric scalar
  now scales component-wise on the value route too, and `tuple.div(0)` on that
  route answers `(~oo, ~oo)`, as the box route always has. (Tycho item 223)
- **Arithmetic admits a symbol declared through a transparent type alias of a
  tuple, list or vector.**
  `ce.declareType('pt', 'tuple<number, number>', { alias: true })` then
  `ce.declare('p', 'pt')`: `2·p`, `[1,2,3]·p`, `Divide(p, 2)` and `Negate(p)`
  all errored `incompatible-type "number" vs "pt"`, as did an alias of
  `list<number>` or `vector<2>`, while the direct spelling was accepted — the
  shape gates read the type's kind directly and saw an opaque reference, where
  `isSubtype` already unfolded it (so an alias of a scalar worked). Transparent
  aliases are now unfolded at every shape gate and in the quotient's type. A
  NOMINAL declaration (`declareType`'s default) stays opaque by design and is
  still refused.
- **A lone `scalar | list<…>`-typed operand keeps its union in the result type,
  and a big operator over a body that may be a collection stays inert.** With
  `u` declared `number | list<number>` and not yet assigned, `2u`, `u + 2`,
  `−u`, `sin(u)` and a user lambda `f(u)` all typed a definite `list<…>` —
  `type.matches('collection')` answered `true` — yet `u := 5` evaluated `2u` to
  the scalar `10`. The result now carries the union through,
  `finite_number | list<finite_number>`, each branch wrapped back in its own
  collection kind (`number | range` →
  `finite_number | indexed_collection<finite_number>`), and a definite
  collection sibling (`[1,2] + u`) still gives `list<number>` — the union's list
  branch zips and its scalar branch lifts. Two folds that committed such a body
  to a scalar are closed by the same rule: `Sum(2u)` evaluated to `2u` (and
  `Sum(u)` to `u`) where `u := [1,2]` makes the sum `6`; and `Sum(2 + h(x))`
  with `h` not yet defined evaluated to `h(x) + 2`, which re-evaluated to
  `[5, 8]` once `h := x ↦ [x, 2x]`, where the sum is `13`. `Sum`/`Product` with
  no index now stay inert over a body typed as a scalar-or-collection union (any
  branch a list, vector, set, tuple, string or `broadcastable<…>`), a
  `broadcastable<…>` body, or the application of an undeclared head; a bare
  undeclared symbol still folds (`Sum(y)` → `y`).

- **A definite integral with a pole strictly inside its bounds no longer
  evaluates to a finite number.** `∫₋₁¹ dt/t` evaluated to `0` and `∫₋₁¹ dt/t²`
  to `−2`: the antiderivative was differenced at the bounds with no check that
  the integrand is bounded between them, which the fundamental theorem of
  calculus requires — both integrals diverge. The `Integrate` evaluate handler
  now answers what the integral actually is: `+∞` or `−∞` when the integrand
  keeps one sign across every interior pole (`∫₋₁¹ dt/t² → +∞`, as
  `∫₀¹ dt/t → +∞` already did), and inert (unevaluated, as it already was when
  no antiderivative was found) when the integrand changes sign across a pole and
  the integral has no value at all (`∫₋₁¹ dt/t`, whose principal value is 0 but
  whose integral is undefined). `.N()` follows suit — `±∞`, or `NaN` for the
  sign-changing case, on either bound order and in the iterated form for a
  dimension with constant bounds — where it used to hand back a confident
  quadrature `Measurement` (`∫₀² sec t dt` → `8.316585 ± 0.000016`, `∫₋₁¹ dt/t`
  → `−1.4 ± 3.6`): the adaptive Gauss–Kronrod error estimate is blind to a
  singularity it straddles. A pole is reported only when it is PROVEN: located
  exactly — as a real root of a polynomial denominator (`1/t`, `1/(t² − 1)`,
  `t⁻³`), a pole of `tan`/`cot`/`sec`/`csc` or `csch`/`coth` of a linear
  argument, or a zero of a `sin`/`cos`/`tan`/`cot`/ `sinh`/`tanh` divisor (a
  reciprocal such as `1/tan t` is not canonicalized to `cot t`, so it is read as
  written) — and then confirmed by sampling the integrand on both sides of it to
  grow at least as fast as `1/|t − r|`. A root is told apart from a bound by the
  denominator's residual there, not by a distance, so `∫₀¹ (t − 10⁻¹⁰)⁻² dt` is
  recognized as divergent while a double root exactly at a bound stays an
  endpoint case. That confirmation is what keeps a cancelling denominator
  (`∫ (t² − 1)/(t − 1)`), an integrable singularity (`∫₀¹ dt/√t = 2`), a pole AT
  a bound (`∫₀¹ dt/t = +∞`), and every integral with a symbolic or infinite
  bound exactly as they were. The compile targets' antiderivative- first step
  inherits the fix: `∫₋₁¹ dt/t²` no longer compiles to the constant `−2`.

- **The sign of a circular function of an exact argument was off by one
  quadrant.** `sgn` of `cos 1`, `sec 1`, `tan 1` (first quadrant) and `sin 2`
  (second quadrant) answered `negative`: the quadrant helper numbers the
  quadrants 1..4 and the sign table was indexed 0..3 with that number. Every
  consumer of the sign was affected — `|sec 1|` evaluated to `-sec(1)`, so
  `∫₀¹ tan t dt` (= `ln|sec 1|`) came out as `ln(−sec 1)`, a complex number for
  a real integral. All six functions now report the sign of their value in every
  quadrant (verified against the numeric value at 90 sample points).

- **`∫ cot(ax + b) dx` had the wrong sign.** The pattern rule answered
  `−ln|sin(ax + b)|/a`; the antiderivative of `cot` is `+ln|sin x|` (its
  derivative is `cos x / sin x`). `∫₀² cot t dt`, divergent at the lower bound,
  evaluated to `−∞` instead of `+∞`. The power-reduction route (`∫cot³x dx`)
  already used the correct base case and is unchanged.

- **Eight more rules of the built-in antiderivative table were wrong** (the
  table the `Integrate` evaluate handler uses when no integration provider is
  loaded; the Rubi provider was unaffected). `∫ sinh` and `∫ cosh` answered
  `ln|cosh|` and `ln|sinh|` (the antiderivatives of `tanh` and `coth`); `∫ tanh`
  answered `ln|sech|`, the negative of the correct `ln(cosh)`; `∫ sech` answered
  `ln|tanh|` where it is `arctan(sinh)`; `∫ csch` kept the full argument in
  `−ln|coth|` where it must be halved; and all six inverse hyperbolic rules
  (`arsinh`, `arcosh`, `artanh`, `arcoth`, `arsech`, `arcsch`) answered the
  function's own logarithmic definition — `∫ arsinh t dt` evaluated to
  `arsinh t`. Each is now the by-parts form
  (`∫ arsinh t dt = t·arsinh t − √(t² + 1)`, …), and every rule of the table is
  pinned by differentiating its answer back to the integrand at several points
  of its domain.

## 0.118.1 _2026-08-22_

### Resolved Issues

- **The `javascript` and `python` targets now compile the multi-collection
  (zipWith) form of `Map` over symbolic sources.**
  `Map((_1,_2) ↦ _1+_2, 1..N, 2..N)` with `N` a free input declined with "Map:
  multi-collection form is not compiled" — which a plotting document met through
  Desmos' element-wise list difference `c = (1..N) − Join([0], 1..(N−1))`, whose
  bound value is exactly that zip `Map`, so every compiled expression reading
  `c` declined with it. The same shape with literal bounds const-folded away
  before reaching the lowering, which is why it looked as if every minimal zip
  compiled. The form now lowers like the single-collection one: each source is
  materialized once, the callback receives one element from each source per
  position, and the result is as long as the SHORTEST source — the interpreter's
  `count` for the form, and what `Zip` does. A parameter annotation on the
  callback is checked against ITS source, position by position, with the same
  fail-closed rule the unary form has (an `integer` annotation over a
  `number`-typed source declines, naming the parameter). Three shapes stay with
  the interpreter, by a compile-time decline rather than a wrong value: a source
  whose elements are not provably real numbers (`list<complex>`,
  `list<list<number>>`, strings, a bare `list`) — the callback's parameters are
  compiled untyped and its body treats them as real numbers; a source with
  observable effects (one that draws `Random`) — the compiled code materializes
  every source in full where the interpreter stops at the shortest; and a bare
  `Add`/`Subtract`/`Multiply`/`Divide` symbol as the mapping over anything but
  exactly two sources — it compiles to a two-argument function. The effects
  decline now guards `Zip` on both targets too, which had the same gap. The
  constant fold's cost estimate prices a zip by its shortest resolvable source
  instead of its first. (Tycho item 218)

- **Reading the type of a nested lazy collection view is no longer exponential
  in its nesting depth.** A view built over a collection whose length is not
  statically known — `L := Range(0,n)/n` with `n` a free input, then
  `Y_0 := Y + 0·(2L−1)` — nests one `Map` per arithmetic step, and asking such
  an expression for its type cost 2^depth type-handler invocations.
  `Sqrt(1 − Y_0²)` took 3.6 s, and `PointList(−√(1 − Y_0²), Y_0)` did not return
  at all. A bound list was affected too, superlinearly in its length: parsing an
  `rgb(…)` row over a 301-element list took 12.9 s. All are now single-digit
  milliseconds.

  Two causes compounded, both in `Map`'s type handler. It read each source's
  type twice per level, which doubles per level when the source is itself a
  `Map`. And the element-type derivation added in 0.118.0 declares stand-in
  symbols in a scratch scope, which advanced the engine's `any` cache generation
  — the generation `BoxedFunction.type` keys its memo on — so every read retired
  the type cache of every expression in the engine, including the sources the
  same walk was mid-way through reading. One `PointList` evaluation made 998K
  handler calls and 2.0M cache invalidations.

  A declaration whose target scope is one the computation itself pushed and pops
  now advances no cache generation, since the binding cannot outlive that
  computation and nothing outside can depend on it. The test is on the
  declaration's resolved target scope, not on whether a derivation is running,
  so a declaration aimed at a longer-lived scope — a function literal's block
  scope, a protocol member's scope — still invalidates as before. (Tycho
  item 219)

- **A compiled `Sum`/`Product` over a COLLECTION-valued body no longer skips
  iterations of an effectful body.** 0.118.0 made the NaN early exit depend on
  effects rather than on who supplied the code, but only for scalar bodies; the
  element-wise fold kept an unconditional exit, so
  `Sum(Random()·[1,1], n=1..31)` stopped drawing at the first NaN while its
  scalar twin `Sum(Random()+n, n=1..31)` ran every term. The exit did two jobs
  at once, and only one of them may skip work: projecting a length mismatch to a
  scalar NaN is what makes the result independent of which term came last, and
  is now unconditional, while STOPPING the loop is an optimization and is now
  taken only when the skipped terms have no observable effect. An effectful body
  runs every iteration and answers the same value.

## 0.118.0 _2026-08-21_

### Breaking Changes

- **`.N()` now leaves a product of sums FACTORED, like `evaluate()`.** Since
  0.117.0 `2(x+1)` evaluated to `2(x + 1)` but `.N()` of the same expression
  still came back `2x + 2`: the numeric route of the `Multiply` handler kept
  distributing. `.N()` is `evaluate()` with floats, so the two now agree on
  shape and differ only in the numbers — `√2(x+1).N()` is `1.414… * (x + 1)`,
  `((a+b)/c)·d` keeps its quotient shape `(d(a + b))/c` on both routes, and a
  closed constant such as `2.5(√2+1)` still folds to a single float. The same
  rule now reaches the tuple and tensor arms of the handler on BOTH routes:
  `(1,2)·(x+1)` is `(x + 1, 2(x + 1))` and `[1,2]·(x+1)` is `[x + 1, 2(x + 1)]`
  where the components used to be distributed even under `evaluate()`. A
  component product also now honors the closed-inexact-constant rule a scalar
  product has: `0.5 · [π, 1]`, `0.5 · (π, 1)` and the element-wise
  `[0.5, 1] · [π, 1]` all evaluate their `π` cell to `1.57…`, as `0.5 · π` does,
  instead of leaving `0.5π`. `Expand` reproduces the previous output;
  `simplify()` and the internal normalization paths still expand. The values are
  unchanged.

- **A compiled `Sum`/`Product` now decides its NaN early exit on EFFECTS rather
  than on who supplied the code.** The exit — `if (acc !== acc) return NaN;`
  between terms, valid because NaN absorbs `+` and `*` — used to be suppressed
  whenever the body contained caller-supplied source, on the reasoning that such
  code might count its own calls or mutate shared state. That test asked the
  wrong question, and got two answers wrong in opposite directions:

  - **An impure operator of the engine's own no longer keeps the exit.** A sum
    containing `Random()` was skippable, because `Random` is not
    caller-supplied. Skipping terms draws from the generator fewer times, and a
    later draw observes that, so `Sum(Random() + n, n=1..31)` now emits no exit.
    This is the user-visible half of the change: such a sum evaluates every term
    again, as it did before the exit existed.
  - **A caller `compile` handler no longer costs the exit by existing.** Whether
    the handler supplies source or declines for the target at hand, the
    suppression fired on the handler being present. The operator definition's
    `pure` / `effects` now governs: a definition declaring no effects keeps the
    exit, `pure: false` refuses it. A consumer measured ~33x on a 31-term sum
    from a handler that had explicitly declined.

  The rule holds for a piece written directly in the body. It does NOT yet reach
  one used through a user-defined function: `wrap(t) := s(t) + 1` summed over
  still refuses, because the user-function admission gate reads the body's own
  purity and a signature-only declaration — which is what a name implemented
  through `functions` has — reports impure. That refusal is conservative, never
  unsound.

  The rule is now one sentence — an emission may be skipped when nothing in it
  has observable effects — with one oracle per spelling: a `functions` entry
  through its declared or inferred purity, an operator with a caller `compile`
  handler through its definition, everything else through the effects model. A
  spelling with no oracle is refused, which is where an `operators` entry
  (`[op, prec]`, no body and no declaration slot) and a string-valued `vars`
  symbol land.

  Note the two oracles have deliberately opposite defaults. A `functions` entry
  must EARN purity — it is inferred from the source, and anything the analysis
  cannot model is refused — while an operator definition is GRANTED it, since
  `pure` defaults to true. A declaration is an assertion its author made; a bare
  source string is not. An operator whose handler emits effectful code while its
  definition declares none is the one shape this cannot catch, and it is the
  same mis-declaration that already misleads common-subexpression elimination.

- **A function type must now cover every call its target type permits.**
  Signature subtyping asked only whether a function had _enough_ parameters; it
  never asked whether it could handle every call the declared type allows. So a
  name declared `(integer, string+) -> string` accepted a
  `(integer, string) -> string` function, and the mismatch surfaced later, at a
  call the declaration explicitly permits:

  ```
  declare join: (integer, string+) -> string
  join := narrow          // narrow: (integer, string) -> string — was ACCEPTED
  join(1, "a", "b")       // permitted by the declaration → unexpected-argument
  ```

  The error is now raised where the mistake is, at the assignment. A declaration
  is a contract in both directions — it tells callers which calls are legal, and
  it constrains what may be stored under that name — and assigning checks
  against that contract rather than rewriting it. Concretely, a function is a
  subtype only when it accepts the target's shortest AND longest permitted call,
  so no fixed-arity function satisfies a `*` or `+` tail (which has no longest
  call): only a variadic function can.

  This affects storing and substituting a function, not calling one. `+` and `*`
  still mean one-or-more and zero-or-more at every call site, and **passing** a
  fixed-arity function to a variadic callback slot is unchanged — that admits
  when the two arities overlap, which is a different question. The engine
  already enforced this rule for function LITERALS ("takes 1 parameter(s), but
  the declared signature accepts 0 or more"); only the named-function path
  slipped through.

- **A compiled runner's declared return type now covers everything it can
  return.** `run()` was typed `number | ComplexResult`, but a compiled predicate
  returns a `boolean` (`Greater(x, 0)` runs to `true`, never `1`), a
  string-valued expression returns a `string`, and a collection-valued one
  returns a (possibly nested) array. TypeScript therefore accepted
  `result.run({ x }) * 2` on an expression that could never be a number. The
  default is now the new exported `CompiledValue` union — which also covers a
  function-valued expression, since `Derivative(Sin)` runs to the callable
  `(x) => Math.cos(x)` — so such a call is a build-time error. The `interval-js`
  target keeps its own result type (an `IntervalResult`, or a bare `Interval`
  for a constant) rather than being folded into that union.

  **Migration:** a caller doing arithmetic on the result declares the narrow
  type it expects — `compile<'javascript', number>(expr)` — and gets a `number`
  back. This is the type-level replacement for the `realOnly: true` option
  removed in the previous release, which was the only remaining way to obtain a
  narrow numeric result; unlike `realOnly` it is purely a type assertion and
  projects nothing at run time.

  The same call's VARIABLES widened too, and that direction only ever accepts
  more: `run()` now takes `number | ComplexResult` on a JavaScript target, so a
  complex-mode call such as `run({ z: { re: 2, im: 3 } })` type-checks instead
  of needing a cast. It was previously typed `number` alone, which refused the
  one shape complex mode exists to accept — while the
  `_getCompilationTarget('javascript')` route had always typed it the wider way.
  `interval-js` widened by the same step, from `number` alone to
  `number | Interval`; there too the `_getCompilationTarget('interval-js')`
  route had always used the wider type. Neither widening requires any change
  from a caller — both only ever accept more than before. A complex value handed
  to a REAL-mode runner is still rejected at run time, with an error naming the
  variable, unless the call passes `entryChecks: false`, which disables that
  guard along with the others and lets the value reach real arithmetic, yielding
  `NaN`.

- **`~oo` (`ComplexInfinity`) now types `number`, not `complex`.** The
  non-finite typing convention admits an undirected infinity at the top type
  only — which is how every derived pole already typed (`Gamma(-2)`, `Zeta(1)`,
  `(-1)!`, `sqrt(-oo)`) — but the constant itself was the exception, so two
  expressions with the same `~oo` value could type differently depending on
  whether the constant survived canonicalization (`Divide(~oo, 5)` answered
  `complex`, `Add(1, ~oo)` answered `number`). `expr.type.matches('complex')` is
  now `false` for `~oo`, exactly as it is for `NaN`. A value carrying an
  infinite IMAGINARY part is `~oo` for this purpose — the set the engine renders
  as `~oo` — while an infinite real part with a finite imaginary part (`∞ + i`)
  is unchanged.

- **A pole compiles to `NaN` on a real-valued lane.** `(-1)!`, `1 + (-1)!` and
  `1 + \tilde\infty` compiled to the object `{re: Infinity, im: Infinity}`; they
  now run to `NaN`. A pole has no real value, and `NaN` is how the real lane
  spells that — the same projection `_SYS.factorial` already applied at a
  negative integer. Previously the constant fold emitted the value's own complex
  shape while the surrounding code was lowered from the node's `number` type, so
  a parent added an object to a number (`1 + {…}` → `"1[object Object]"`) and
  the folded and structural paths disagreed with each other. A pole and a pole
  under a parent now answer `NaN` on both paths, and on the shader targets too,
  where the `vec2` this produced was also a shape mismatch wherever a float was
  expected. A real-valued FUNCTION of a pole still differs between the two:
  `Re(~oo)` folds to `Infinity` (the fold evaluates symbolically, and the
  interpreter answers `+oo`) but lowers structurally to `NaN`, because on the
  real lane the pole is already `NaN` by the time the function sees it.

### Resolved Issues

- **A call of a user function whose definition a compile target cannot emit is
  compiled inlined.** On the `glsl` and `interval-js` targets `f((x,y))` with
  `f(P) := a·P.x² + b·P.y²` declined — a shader function needs a static type for
  every parameter and a point-typed one has none
  (`parameter "P" has no static GLSL type`); the interval target has no
  `PointX`/`PointY` lowering over an opaque parameter — while the same body
  written out compiled. The call now compiles with the body substituted at the
  call site (the coordinate accessors of the literal point folded), so
  `f((x,y))`, `d((x,y))` with `d(P) := √(P.x²+P.y²)`, a two-point
  `Q((x,y),(1,2))` and a chained `e(P) := d(P) + 1` all compile on both targets;
  the `javascript` target keeps compiling such calls by reference. The body is
  substituted, never evaluated — an impure body, a generic or recursive callee,
  a symbolic point or a list argument keep the definition's own decline. (Tycho
  item 216.)

- **Applications of a pure user function to number-literal arguments are
  memoized within an evaluation.** A recursive definition that applies itself
  twice per level, `R(i,x,y) = R(i-1,x,y) + 0.5·S(x,y,R(i-1,x,y))`, cost the
  interpreter 2^i body evaluations at depth `i` — minutes at depth 20 where the
  compiled artifact, whose CSE pass binds the repeated self-call, took
  microseconds. The same application — same literal, same number-literal
  arguments, same exact/numeric route — is now answered from a memo, so depth 20
  evaluates in milliseconds. An entry is valid only while the engine's state
  version — the axis every assignment, declaration, assumption, configuration
  change, non-clean scope pop and checkpoint restore advances — and a
  mutable-object store epoch are both unchanged, so a pure body that reads an
  assigned free symbol or an object field is never answered from a stale result;
  an impure body or a symbolic argument is never memoized. (Tycho item 217.)

- **The `javascript` compile target lowers a point multiplied by a list.**
  `[1,2,3]·(cos a, sin a)` and `(3((-N)..N)+cos t)·(cos a, sin a)` declined with
  "no list-arithmetic support" while `x+[1,2,3]` and `2(cos a, sin a)` compiled.
  The interpreter broadcasts over the LIST and scales the point whole at each
  element — a list of points — which a flat element-wise broadcast over the two
  arrays would have zipped instead; the product now emits a nested broadcast
  (list outside, point components inside) and agrees with `evaluate()` on every
  shape probed, a list-typed or tuple-typed symbol included. Shapes the
  interpreter does not broadcast keep failing closed (`tuple·tuple`, a matrix,
  two lists of provably different lengths). `Add` and `Divide` of a point
  against a list, which the interpreter answers with a per-element
  `incompatible-type` error or leaves inert, used to compile to a plausible zip
  (`(1,2)+[3,4]` → `[4, 6]`); they now fail closed. (Tycho item 214.)

- **`[1,0] = P` with `P` declared `tuple<number, number>` compiles.** It
  declined as "a tuple participant" while `[1,0]=[x,y]` and `(1,0)=P` compiled.
  A list and a point are never equal in the interpreter (a point binds
  atomically), so the pair is a constant whatever the coordinates — the literal
  `[1,0]=(1,0)` already folded to `False` before compilation. The
  list-vs-point-symbol pair now compiles to that constant (`true` for
  `NotEqual`) instead of declining. (Tycho item 215.)

- **A zip of two unknown-length point views keeps its element tuple-ness in the
  TYPE.** With `n` unassigned, `A = (Range(0,n)/n)·(1,0)` is a lazy view of
  points, but `A - B` evaluated to `Map((_1, _2) ↦ _1 + _2, A, B)` typed
  `indexed_collection<number>` — the mapping's parameters are bare, so its body
  was typed with both `unknown` — and `PointY` over the view folded to a scalar
  absence marker on the strength of the type alone, while the pulled values were
  correct tuples. `Map` now derives a bare-parameter mapping's element type from
  its sources' element types (no annotation is written onto the literal, so no
  runtime check is added and the lambda's shape is unchanged), and the same view
  now reads `indexed_collection<tuple<finite_number, finite_number>>`. Two
  component tier lies on the way were fixed with it: a scalar-scaled point now
  widens its components by the declared scalar's tier (`x·(1,0)` with
  `x: number` is `tuple<number, number>`, and `(1/n)·(…, 1)` no longer claims an
  integer second coordinate), and a collection-times-point product scales the
  components by the collection's element type. `PointY` over a point view whose
  length is not yet decidable answers the lazy projection instead of an absence
  marker. (Tycho item 212.)

- **`PointX`/`PointY`/`PointZ` over a list of SYMBOLIC points stay symbolic.**
  With `P` declared `tuple<number, number>` and unassigned, `PointY([P])`
  evaluated to `[NaN]` and `PointY([(1,2), P])` to `[2, NaN]` while `PointY(P)`
  stayed symbolic: the broadcast arm read a symbolic element's missing
  components as an absent coordinate. A symbolic element now keeps the accessor
  applied to it — `[PointY(P)]`, `[2, PointY(P)]`, `[PointY(P), PointY(2P)]` —
  and substitutes to the numbers once the point is assigned; a coordinate a
  point provably lacks still takes the absence marker. (Tycho item 213.)

- **`.N()` of a point view is a view of points, not a tuple of coordinate
  views.** `N((Range(0,n)/n)·(1,0))` came back as `(Map(…), Map(…))` — and, with
  `n` assigned, as `([0, 1/3, …], [0, 0, …])` — because the numeric routes of
  `Multiply` and `Add` ran their tuple branch on the raw operand `Range(0,n)/n`,
  which is collection-typed but not yet a collection, before the `.N()` step
  could reveal the view. Such a co-factor now defers to the post-evaluation
  re-dispatch, where the collection wins exactly as on the exact route. The
  literal-list shape `N([0, 1/3]·(1,0))` used to crash (`mulN` had no
  single-operand short-circuit, so `mulTensors`' tuple "scalar" recursed into a
  zero-operand product); it is `[(0, 0), (0.333…, 0)]`.

- **A primed name with a subscript that does not fold into the symbol is a
  primed variable, like the bare name.** `\alpha_1'` parses as the primed
  variable `Prime(alpha_1)`, but `\alpha_{i+1}'`, `A_{i,j}'` and `x_{n+1}''`
  parsed as `Derivative(Subscript(…))` — the prime parselet read every compound
  base as an expression to differentiate — and canonicalization then lifted the
  subscript into a lambda over its own base (`(alpha) ↦ alpha_{i+1}`). Such a
  base now asks the same variable-or-function question as the bare symbol,
  decided by its base: `Prime(Subscript(alpha, i+1))` for an unknown base,
  `Derivative(Subscript(f, n+1))` for `f` declared a function. The prime-first
  spelling `\alpha'_{i+1}` agrees, the applied `\alpha_{i+1}'(t)` is unchanged,
  and a parenthesized expression `(x^2)'` is still differentiated.

- **A symbolic derivative order is accepted and stays symbolic.** `f^{(n)}` is
  documented as `Derivative(f, n)`, but with `n` unassigned it canonicalized to
  an `incompatible-type` error (the order was checked against `number` without
  the inference a free symbol gets elsewhere), and had it got through,
  evaluation read the non-numeric order as 1 and returned the FIRST derivative.
  The order is now inferred `number` and the expression stays inert until it is
  assigned (`n := 2` then gives `f''`). Also fixed on the way:
  `Derivative(g, 0)` with `g` a function symbol evaluated to `(x) ↦ g`, the
  constant function returning the symbol, instead of `g` (likewise the all-zero
  multi-index `Derivative(g, 0, 0)`), and a multi-index derivative of a symbol
  bound to a lambda (`Derivative(g, 1, 0)` with `g(x, y) := x^2 y`) stayed inert
  because that arm only recognized an inline function literal.

- **A compiled `Sum`/`Product` keeps its NaN exit when a caller-supplied
  function is applied beneath another operator or inside a user-defined
  callee.** A function declared by signature only and implemented through the
  `functions` compile option projects unknown effects onto every application of
  it, so the skippability gate — which lets a `Sum` stop evaluating terms once
  its accumulator is NaN when nothing in the body has observable effects — kept
  all 30 exits for `\sum sq(n x)` but none for `\sum (sq(n x) + 1)`,
  `\sum \sin(sq(n x))`, `\sum 2 sq(n x)`, or `\sum wrap(n x)` with
  `wrap(t) := sq(t) + 1`: the `functions` entry's purity oracle was consulted
  only when the vouched head was the whole body. The gate now re-reads the
  effect projection per node with each oracle's answer standing in for the head
  it vouches for, so a pure entry keeps the exit wherever the head sits, and an
  impure entry, an impure built-in beside it, or a second head with no oracle
  still refuse.

- **A product of two infinities could come out with the wrong sign at machine
  precision.** With `ce.precision = 'machine'`,
  `x · (-2) · 3.1 · (-∞) · (-∞) · (y + 1)` evaluated to `+oo · x · (y + 1)`
  instead of `-oo · x · (y + 1)`. The machine-precision numeric value answered
  "no sign" for ANY infinity, and the product accumulator read that as positive,
  so once the running coefficient was `-∞` the next infinity flipped it. The
  big-number path already returned ±1 for ±∞; the two now agree. The pairwise
  fold that products without a sum go through masked the bug, which is why it
  surfaced only alongside a factored sum.

- **`Multiply` gave `~oo` a sign.** `2·~oo` evaluated to `+oo` and `-2·~oo` to
  `-oo`, which contradicted `Negate(~oo)` — that correctly stays `~oo`, so
  `-2·~oo` and `-(2·~oo)` disagreed. An undirected infinity takes no sign from
  its factors: all three are now `~oo`. One neighbouring case went with it:
  `i·~oo` answered `NaN`, because the general complex product computed
  `∞·0 − ∞·1`. The indeterminate form `0·~oo` is still `NaN`, and the signed
  infinities are untouched (`-2·∞ = -oo`).

- **A real infinity turned in a non-real direction is `~oo`, not `NaN`.** `∞·i`
  evaluated to `NaN`, as did `∞·(2+3i)` and every other product of a real ±∞
  with a factor that has a non-zero imaginary part: the general complex product
  computes `∞·0` for the real part and lands on the indeterminate form. Such a
  product is infinite with no real direction left, which is precisely what the
  single point at infinity represents, so it is now `~oo`. The rule reads from
  either side: a non-real COEFFICIENT does the same to an evaluated real
  infinity, so `i·ln(0)` is `~oo` rather than `-oo`. `0·∞` remains the genuine
  indeterminate form at `NaN`, and a real factor still keeps the signed rule
  (`-2·∞ = -oo`, `2·ln(0) = -oo`).

- **A sum holding `~oo` alongside a real infinity kept the wrong one.**
  `∞ + ~oo` evaluated to `+oo` and `-∞ + ~oo` to `-oo`, discarding the `~oo`
  term; both are `~oo`, since the undirected point at infinity absorbs the sum.
  `Add` selected `~oo` by asking whether a term typed `complex`, which stopped
  selecting anything once `~oo` moved to `number`, leaving the signed-infinity
  counters — which track only real ±∞ — to decide. It now tests the value. Two
  real infinities are unaffected (`∞ + -∞` is still `NaN`).

- **`Gamma` at a non-positive integer returned a large finite number when
  compiled.** `Gamma(-2)` compiled without constant folding ran to
  `6413262697001887`: the reflection formula `π / (sin(πz)·Γ(1−z))` cannot see
  the pole, because `sin(-2π)` computes as ≈2.4e-16 rather than 0. The kernel
  now answers `NaN` at every pole. The interpreter was unaffected — it returns
  `~oo` before reaching the kernel — and so are non-integer negative arguments
  (`Gamma(-0.5)` = -3.5449…).

- **Malformed dictionary input is reported instead of thrown — or silently
  accepted.** Building a dictionary from a malformed expression raised a raw
  JavaScript exception, which `ce.box()` promises never to do for untrusted
  input, and two shapes were worse than that: a tuple with more than two
  elements (`["Dictionary", ["Tuple", key, value, extra]]`) and a non-string key
  both produced an EMPTY dictionary that reported itself as valid. All of these
  now box to an `incompatible-type` error naming the offending entry, the way
  the sibling `DictionaryFrom`/`RecordFrom` handlers already did. A malformed
  dictionary NESTED inside another is reported too, rather than becoming a
  silently empty entry.

- **The two dictionary construction routes agreed on empty keys.** The
  `["Dictionary", …]` form accepted an empty-string key while the plain-data
  `{dict: …}` form rejected it, so a dictionary built the first way serialized
  to `{dict: {"": …}}` and then failed to box back — a valid expression that did
  not survive its own round trip. Both routes now reject it.

- **Dictionary keys and record-type fields named after `Object.prototype`
  members work.** A `__proto__` entry could not be stored at all (the dictionary
  rendered as `{->}` and listed no keys, while `At` still returned the value by
  reading the prototype), and reading a MISSING `toString` or `valueOf` key
  returned the inherited JavaScript function as if it were a math value, where
  any other missing key yields `NaN`. The same flaw dropped a `__proto__` field
  when a `record{…}` type was parsed back from its own spelling, so such a
  dictionary did not round-trip through its type.

- **An argument that violates a type variable's declared bound is now
  reported.** Calling a generic function with an operand its bound refuses —
  `f("abc")` where `f: (T) -> list<T> where T: number` — was accepted and left
  to run time. The check that decides whether an operand REFUTES a parameter
  reads the declared signature, and for a generic arm it read the parameter with
  the variable still free, which no type predicate can answer; the arm is now
  read with each variable standing for its declared bound, so `T: number`
  refuses a `string` outright. An UNBOUNDED variable is unaffected: it ranges
  over every value type, so nothing refutes it and such a call still defers.

- **A symbol whose name matches an `Object.prototype` member no longer reads
  that member.** A MathJSON symbol name is an arbitrary string, but several
  lookups keyed plain JavaScript objects by it, so `toString`, `constructor`,
  `valueOf` or `__proto__` found an inherited value instead of missing. Three
  consequences, all fixed:

  - `ce.parse('\\mathrm{toString} + 1')` **threw** a `TypeError`. The LaTeX
    parser's scope chain answered "declared" for a name it had never seen and
    handed back the inherited function as the symbol's type.
  - A compiled expression read a MISSING symbol of such a name as the inherited
    member: `toString + 1` returned the string
    `"function toString() { [native code] }1"`, where every other missing symbol
    yields `NaN`. A caller-supplied `vars` map was also consulted with `in`
    rather than an own-property test, on all four targets.
  - `\\mathrm{__proto__}` resolved as a known **unit**, because the unit tables
    answered `Object.prototype` for that key and the lookup tests its result for
    truthiness. `\\sum_{\\mathrm{__proto__}=1}^{3} \\mathrm{__proto__}` silently
    lost its index and evaluated to `3·__proto__` instead of `6`.

  Ordinary symbol names are unaffected, and the emitted code is unchanged for
  them — the own-property guard is emitted only for a colliding name.

### Breaking Changes

- **The deprecated `realOnly` compile option has been REMOVED.** It was an
  OUTPUT projection applied to a compiled unit's result after the kernel had run
  — a `{re, im}` collapsed to `re` when the imaginary part was at roundoff scale
  and to `NaN` otherwise, a top-level boolean became `NaN`, and an array result
  was projected component-wise. It never selected a lowering, so nothing about
  which code is emitted changes; only what the runner hands back does.

  The result convention already carries what most callers wanted: a compiled
  value whose imaginary part is exactly zero comes back as a plain `number`, and
  a returned `ComplexResult` always has `im !== 0`. Test `typeof v === 'number'`
  per sample. Where the projection's specific choices mattered, reproduce them
  at your own value boundary — a `{re, im}` slot, a boolean result, and `~oo`
  (`{re: Infinity, im: Infinity}`, what a compiled `(-1)!` now returns) all
  reach the caller unflattened instead of as `NaN`. To forbid promotion and hold
  the real lane — which `realOnly` never did — pass `mode: 'strict'`.

  `realOnly` is gone from the typed option surface, so a TypeScript caller
  passing it gets a compile error. An untyped JavaScript caller still gets a
  one-time console warning naming the removal on both compile routes rather than
  silently losing the projection.

### Improvements

- **A `functions` entry can now be declared pure, and a compiled `Sum` over it
  stops at the first NaN again.** A compiled `Sum`/`Product` exits as soon as
  its accumulator becomes NaN, since NaN absorbs both `+` and `*` and no
  remaining term can change the answer. That exit was suppressed for any body
  splicing caller-supplied source — a `functions`/`operators` entry, a
  string-valued `vars` symbol, an operator with a caller `compile` handler —
  because such code may count its own calls, log, or mutate shared state. The
  suppression was all-or-nothing: ONE caller-supplied factor anywhere in the
  body dropped the exit for every term, and for the scalar loop arm too.

  Note what the skipped terms could still change. Once the accumulator is NaN
  the sum's VALUE is settled whatever the remaining terms do, so the only thing
  running them preserved was the supplied function's SIDE EFFECTS. A caller who
  knows there are none can now say so:

  ```typescript
  compile(expr, { functions: { s: { source: mySpline, pure: true } } });
  ```

  The `functions` option accepts a `{ source, pure? }` descriptor beside the
  bare source-or-function spellings it always took. A declared `pure` is an
  assertion and is believed rather than re-derived, so asserting it for a helper
  that draws or counts will drop calls to it; `pure: false` pins the
  conservative behavior.

  **An entry that declares nothing is analysed instead**, so the common
  arithmetic helper needs no annotation: a source that is an arrow or function
  expression whose body uses only its parameters, numeric literals and an
  allowlist of `Math` members is taken as pure. It calls nothing else — not a
  parameter (`(f) => f(x)` is rejected, since `f` is whatever the caller passed
  at run time), and not a `Math` member outside the allowlist (`Math` is an
  ordinary mutable object, so `Math.audit` may be anything). Also rejected:
  `Math.random`, whose two calls disagree; a closure over an outer binding
  (`(t) => t * scale` mentions a name that is not a parameter); and a bare name
  with no body to read, which can only be declared. The grammar is small and
  explicitly enumerated rather than a JavaScript semantics check, which is what
  keeps the rejections safe; a missed helper costs the early exit and nothing
  else.

  Purity governs only whether an emission may be SKIPPED. A caller-supplied
  implementation stays opaque to every pass that would rewrite what is inside it
  — common-subexpression elimination included — because the emitter receives its
  operands as text and may drop, repeat or defer them. Values are unchanged in
  every arm.

- **A callback with too MANY parameters is now rejected at a user-declared arrow
  slot**, the way one with too few already was. With
  `myOp: ((number) -> number) -> number`, the call `myOp((a, b) |-> a + b)`
  reported nothing and failed at application; it now carries the same
  `callback-arity` diagnostic the opposite mismatch gets — "myOp calls its
  callback with 1 argument (per the declared parameter list); `(a, b) => a + b`
  declares 2 parameters". This covers a callback written inline and one supplied
  through a symbol alike, whether the symbol was declared with a signature or
  inferred from an assigned lambda.

  The check reads the slot arm's admissible range — required, then optional,
  then a variadic tail's mandatory occurrences — so a slot spelled
  `((number, number?) -> number)` still accepts both a unary and a binary
  callback, while a `((number+) -> number)` slot now rejects a nullary one it
  can never satisfy. At an OVERLOAD set the verdict participates in choosing the
  arm, so a callback that fits one arm resolves to that arm instead of being
  reported against a more specific sibling it cannot satisfy. The library's own
  collection operators are unaffected: their canonical handlers mint the richer
  per-operator wording before validation runs.

- **Signature subtyping now checks arity in both directions.** A signature
  requiring MORE arguments than a fixed-arity signature supplies is no longer
  reported as its subtype: `(number, number) -> number` is not a
  `(number) -> number`. Only the too-few direction was refused before, which is
  what let a wrong-arity callback reach an arrow slot unnoticed. A signature
  whose tail is optional or variadic keeps its existing leniency.

- **`Sort` and `Ordering` declare the comparator result they actually accept.**
  The comparator arm read `((any, any) any -> number)`, but the evaluator has
  always also accepted an Elixir-style BOOLEAN comparator (`True` means the
  first argument sorts first), so the arm is now
  `((any, any) any -> number | boolean)`. The previous spelling was masked by
  the arity hole above — a boolean comparator was admitted through the unary
  sort-KEY arm instead, which also meant `Sort(xs, Less)` type-checked for the
  wrong reason. Behavior is unchanged; the declared type now matches it.

## 0.117.0 _2026-08-20_

### Breaking Changes

- **`evaluate()` now leaves a product of sums FACTORED.** `(a+b)(c+d)` evaluates
  to itself rather than to `ac+bc+ad+bd`, and `2(x+1)` stays `2(x+1)`.
  `evaluate()`'s contract is the most EXACT form, and a factored product is
  exactly as exact as the polynomial it expands to while being smaller — often
  dramatically so, since expanding multiplies the term count at every factor.
  **`Expand` reproduces the previous output verbatim**, so code that needs the
  expanded form should ask for it. This is what made a `Product` of linear
  factors superlinear: `∏_{k=1}^{8}(kn-1)` returned a nine-term polynomial with
  large coefficients instead of its eight compact factors, and a plotting
  consumer paid that cost on every sample because a plot axis variable can never
  be bound.

  `simplify()` and `.N()` still expand, as does every internal normalization
  path — the change is confined to the `Multiply` and `Product` evaluate
  handlers (`mulFactored()` and `productAccumulate()` respectively; the
  `∏(kn-1)` example above is the `Product` half). Several results are now
  reported factored where they were not: `∫x²/(2(1+x²))dx` is `½(x - arctan x)`,
  `d/dx LambertW(x)` is `W(x)/(x(W(x)+1))`, and a quadratic with a symbolic
  coefficient solves to `½(a ± √(a²-4))`. The values are unchanged.

### Improvements

- **Raw-form subscript folding no longer depends on the base's spelling.** An
  undeclared subscripted name parsed with `form: 'raw'` folded to a joined
  symbol for a Latin base (`a_{0}` → `"a_0"`) but stayed structural for a
  command-spelled Greek base (`\eta_{w}` → `["Subscript","eta","w"]`) and for a
  prefixed base (`\operatorname{speed}_{0}`), and the prime-first spelling
  (`\alpha'_1`) diverged from the subscript-first one (`\alpha_1'`) the same
  way. All spellings now fold to the joined symbol (`"eta_w"`, `"alpha_1"`,
  `"speed_0"`), matching what canonical form always produced, and the two prime
  orders agree on every spelling. Unchanged: an indexed-collection base keeps
  the element-access reading unless the joined name is declared, a
  `subscriptEvaluate` base (such as `\gamma` for the `EulerGamma` family) keeps
  its subscripts, and dictionary-claimed constants such as unbraced `\mu_0` are
  untouched. **If your code reads `form: 'raw'` output and pattern-matches
  `["Subscript", base, sub]` nodes for undeclared names, re-measure it** — those
  nodes are now plain symbols; code that folded them itself now receives the
  already-folded name.

### Resolved Issues

- **Dividing a list of points by a scalar keeps the points.** A collection whose
  elements are numeric tuples — `list<tuple<number, number>>`, the shape a set
  of points carries — typed its quotient `list<number>`, dropping the element
  tuple-ness, while the equivalent product `p·(1/q)` kept it. The values were
  always correct; only the type was wrong, and it was wrong in a way that
  changed downstream readings: `PointX`/`PointY` over a `list<number>` take the
  element-INDEX reading rather than the elementwise one, so a normalized point
  list read as its own first coordinate. Every denominator spelling is repaired
  (a scalar, a `broadcastable<number>`, a sibling collection of scalars that
  divides elementwise), and a divisor that can present a tuple — a point, a
  point list, or a `broadcastable<tuple<…>>` — still has no defined quotient.
  The same repair applies to the product of a point list with a sibling list of
  scalars, which used to widen to `list<number | tuple<…>>`.

- **Scaling a list of points widens the point's components.** A scalar factor
  folded into a collection's cells but stopped at a tuple cell, so
  `list<tuple<integer, integer>>` scaled by a real still claimed integer
  components even though `[(3,4)]·0.5` is `[(1.5, 2)]`. Each component is now
  widened with the scalar factors, as a non-tuple cell already was.

- **The derivative of a vector-valued function no longer claims a scalar
  result.** A head declared as a bare `function` and only then assigned a
  tuple-valued lambda typed `f'(t)` as `number` even though evaluating it
  returned a 3-tuple — so the declared type contradicted the value, and
  type-strict consumers such as `Cross` and `Dot` rejected the call with
  `incompatible-type`. `Derivative` now reads the codomain of an assigned
  function literal when the declaration itself is uninformative, and `D` of a
  tuple- or list-valued body reports the shape it actually evaluates to
  (`D((cos t, sin 2t, t), t)` is a tuple, not a `number`). A head that is
  declared `function` and never assigned still reports the long-standing scalar
  compromise.

- **A literal `0` operand is no longer dropped when serializing to LaTeX.**
  Several serializers tested an operand for truthiness where they meant to test
  for absence, and the MathJSON of the literal `0` is the number `0` — so a zero
  operand read as a missing one and was silently deleted. A domain restriction
  on a zero lost BOTH operands (`When(0, x=x)` serialized to the empty string),
  `Return(0)` printed as a bare `return`, a big operator lost its body AND its
  indexing sets (`Sum(0, i=1..10)` became `\sum`), an integral lost its
  integrand (`Integrate(0, x)` became `\int`), and `Delimiter(0)` became an
  empty `()`. Each now serializes its zero, so an expression carrying one
  round-trips through LaTeX again — which matters wherever serialized LaTeX is a
  persistence boundary, since parsing was never at fault and the loss was
  silent. `Log(x, 0)` also now renders its zero base as a base (`\log_{0}(x)`)
  rather than falling back to the argument-list form.

  The round trip is an equality of CANONICAL expressions, not of bytes or of raw
  parse trees. Re-serializing is free to choose a different spelling of the same
  value (`\left[.1,.3\ ...\ 1\right]` comes back as `(0.1..0.3..1)`,
  `\operatorname{abs}` as `\vert…\vert`, `\sqrt{m}` as `m^{1/2}`), so a
  byte-stability check reports damage on a bundle where nothing is wrong.
  Compare with `.isSame()` on the canonical parse. Also beware an assertion that
  merely looks for a `0` in the output: `Sum(0, i=1..10)` now serializes
  `\sum_{i=1}^{10}0`, but the upper limit contains a `0` of its own, so
  "contains a zero" is satisfied by output that dropped the body — the exact
  defect being tested for. Assert on the reparsed expression, not on the string.

- **A negative subject of a `When` restriction keeps its precedence.**
  `When(-1, cond)` serialized as `-1\left\{cond\right\}`, which reads back as
  `Negate(When(1, cond))` — the negation applied to the restriction instead of
  to its subject. The subject is now parenthesized whenever its own precedence
  is below that of the restriction. The repaired form is
  `(-1)\left\{cond\right\}`, which parses back to `When(-1, cond)` at canonical
  form; a RAW parse of it keeps the parentheses and the unfolded negation
  (`["When", ["Delimiter", ["Negate", 1]], cond]`), as it does for a
  parenthesized negative literal anywhere else. The invariant restored here is
  that the negation sits inside the restriction rather than outside it — check
  it against the canonical parse, not the raw one.

- **A symbol named after a JavaScript object member no longer misbehaves.**
  Names such as `toString`, `constructor` and `valueOf` collide with members
  every JavaScript object inherits, and the engine looked symbol names up in
  tables that carried those members. The consequences were visible three ways:
  `ce.box("toString")` returned the JavaScript function of that name instead of
  an expression, `ce.function("toString", [1]).toString()` rendered a JavaScript
  error message as the expression's text, and `toString` used as a variable was
  refused by `compile()` as though it were a built-in operator. All three now
  treat such a name as the ordinary symbol it is.

- **Rewriting a nested `Sum`/`Product` no longer breaks its index binding.**
  `.subs()`, `.replace()` and `.map()` each rebuilt a scoped node onto a FRESH
  scope, parented at the rewriting site rather than at the rebuilt outer node.
  The chain from the inner body then never reached the outer binder's index, so
  an outer index whose name collides with a library constant resolved to the
  CONSTANT: `Σ_{i=1}^{2} Σ_{j=1}^{2} x·At(K, i+j)` substituted at `x := 1`
  answered 60 where the same expression built directly answers 120, and
  `Σ_{i=1}^{2} Σ_{j=1}^{2} x·i` under `x → 2` answered `8i` — the imaginary unit
  — instead of 12. Nothing looked wrong: the rewritten expression reported
  `isCanonical` and printed identically to the direct one. A scoped node is now
  rebuilt onto its own scope, so the chain is preserved at any nesting depth.
  Only the OUTER index's name mattered, so sums indexed `p`/`q` were correct all
  along and sums indexed `i`/`j` — what most people write first — were not.

- **A partial `CanonicalForm[]` request no longer rewrites a binder's own
  index.** Boxing with `{ form: ['Order'] }` (or any other partial form) runs
  before a binder's scope exists, and its symbol pass resolved EVERY symbol
  against the ambient scope — including the bound variable at its binding site.
  `Sum(2i, Limits(i, 1, 3))` came back as
  `Sum(2·Complex(0,1), Limits(Complex(0,1), 1, 3))` and then failed to evaluate
  with `incompatible-type`; the `Number` form rewrote it a second time, through
  its imaginary-unit normalization. A name the node's operator declares as a
  binding site is now left alone, at the site and throughout the binder's body.
  A FREE imaginary unit still folds as before.

- **An unrolled `Sum`/`Product` now stops at the first NaN, and a constant
  collection inside one is built once instead of once per term.** When both
  bounds of a `Sum` or `Product` are constant and the range is small, the
  JavaScript target unrolls it into explicit terms rather than emitting a loop.
  That unrolled form evaluated every term even after the running total had gone
  NaN — where the loop form exits on the first one — and it re-emitted every
  subexpression per term, including subexpressions whose value cannot depend on
  the index. A 31-term sum sampling a constant 101-element list built that list
  31 times, in the source and again on every call: 11 KB of emitted JavaScript
  with 31 `Array.from` constructions, all evaluated even when the first term
  already answered NaN. Such a sum now emits 4 KB with a single construction
  bound ahead of the accumulation, and returns as soon as the total is NaN. This
  restores the cost a plot or sampling loop over such an expression had before
  the typing improvement that began steering these bodies into the unrolled form
  (they previously took the element-wise fold loop, which already had both
  properties) — a plot that went blank because every sample evaluated all 31
  terms paints again. Values are unchanged: NaN absorbs both `+` and `*`, so
  stopping early returns the same answer. From four terms on, the emitted source
  for such a sum is a statement sequence in an IIFE rather than a flat
  `a + b + c` chain; two- and three-term sums keep the flat chain. The SCALAR
  loop form — a range past the unroll limit, or a bound that is not a
  compile-time constant — gained the same exit, which it had only on the
  element-wise fold path: a symbolic-bound or 100,000-term sum no longer runs
  every remaining iteration after the total has gone NaN. Its shape is otherwise
  unchanged (one emission of the body, no per-term statements). Complex-valued
  sums and products keep every term in both forms, deliberately: a complex
  accumulator with a finite imaginary part does not absorb, so an early exit
  there could change the answer. In both forms the exit is omitted when a term
  splices caller-supplied source — a `functions`/`operators` entry, a
  string-valued `vars` symbol, an operator with a caller `compile` handler —
  since such code may count its own calls or mutate shared state, so it must run
  as many times as it did before. Note this when checking the change yourself: a
  `vars` entry whose value is a STRING is spliced as source, which is exactly
  the carve-out above, so a sum compiled with `vars: { x: 'number' }` emits no
  early exit at all and looks like the old behavior. Measure with a numeric
  `vars` value, or with no `vars` map — the free symbol is read from the
  arguments object either way.

- **A protocol function member read as a field now says so.** `b.span` for a
  `function span(self: Self) -> number` requirement reported
  `unknown-field "span" (w, h)` — true of the object's LAYOUT and useless to the
  author, since the name they wrote does exist, on a protocol the value conforms
  to. It now reports `protocol-function-not-a-field`, naming the protocol and
  the call spelling: a `function` member is called (`span(b)`), only a
  `readonly`/`readwrite` property is read with a dot (`b.area`). This is the
  mirror of the `protocol-property-not-callable` warning below. Object, record
  and named-tuple receivers all report it, and so does an ASSIGNMENT to such a
  name (`b.span = 5`), whose message says the member cannot be written rather
  than recommending a call. When several conformances answer the same name, the
  message names them all and asks for a qualified call, since a bare one would
  be `protocol-call-ambiguous`. A name no protocol claims still reports the
  layout, and so does a name whose conformance is not settled — a PENDING edge
  carries no implementation, so there is no call to recommend yet.

- **Epsil: a protocol property called as a function is now reported.** A
  protocol's two member kinds are spelled differently — a `function` member is
  invoked in call position (`span(b)`), a `readonly`/`readwrite` property is
  read with a dot (`b.area`) — and using the call form for a property resolved
  to no operator, so it stayed a silently inert application: a program ending in
  `print(c, area(c))` printed `area(Circle(…))` with nothing to say why. It now
  raises a `protocol-property-not-callable` warning naming the property, the
  protocol that declares it, and the dot spelling. The check runs over the raw
  statement, so it fires even when the inert call is consumed by another
  operator and never reaches the statement's value — the shape this was reported
  on. Function members in call position are correct and untouched, and a name
  that has a real operator definition (a user function that happens to share a
  property's name) is never reported.

- **Epsil: the `protocol-implementation-pending` warning no longer covers the
  whole program.** It was emitted with a hardcoded whole-source range, because
  the check walks the protocol registry — which outlives the batch — rather than
  the source, so an editor squiggled the entire file. Each pending edge is now
  anchored to the `type X is P` statement that declared it when that statement
  is in this batch; one statement naming several protocols anchors every one of
  its edges. An edge declared in an EARLIER batch (the declare-in-one-cell,
  implement-in-the-next pattern the warning exists to support) still falls back
  to the whole program, since this source contains no statement to point at.

- **A declared type now admits a value whose type is `unknown`.** Assigning an
  expression the engine cannot type statically — a call to a function with no
  signature, say — to a symbol with a declared type was refused: `let xs: list`
  followed by `xs = f(0)` raised `incompatible-type list unknown`, and so did
  the `let xs: list = f(0)` spelling, for every declared type (`number`,
  `string`, `list<number>`, …). A type of `unknown` states nothing about the
  value ("some value, not stated which"), so there is nothing for the
  declaration to refute; it is admitted and the verdict is left to run time,
  which is what the argument-position boundary already did — the identical value
  passed to a `list` parameter was accepted. Values the engine CAN type are
  still held to the contract (`xs = 42` against `list` is still an error), and a
  bare-constructor declaration still refines its element slot from real
  evidence: an admitted `unknown` value leaves `xs` reporting `list`, and a
  later `xs = [1, 2, 3]` refines it to `list<finite_integer>`. `any` is
  unaffected — it is a stated contract, not a placeholder, and is still checked,
  and so is a declared function SIGNATURE (`(number) pure -> number`), which
  keeps refusing an `unknown` value rather than installing a definition that
  would be callable under a contract nothing proved. Note the admission is
  unchecked: nothing re-examines the value later, exactly as at a typed
  parameter.

- **A compilation reached through a target now escalates to complex mode like
  the standalone `compile()` does.** Under the default `auto` mode a lane
  mismatch — a complex-shaped value, typically a promoted unknown-sign radical,
  reaching a binding the compilation shaped real — is answered by recompiling
  under `mode: 'complex'`. That retry existed only in the standalone `compile()`
  export, so a caller using the target route
  (`ce._getCompilationTarget('javascript').compile(expr, options)`, the route an
  integration takes once it needs a specific target) got a thrown
  `LaneMismatchError` instead — or, with `fallback: true`, a `success: false`
  result with the `lane-mismatch` diagnostic and an interpreter-backed `run` —
  where the standalone route returned working compiled code. The escalation now
  lives in each target's own `compile()`, so both routes behave identically:
  such a call returns `success: true` with `mode: 'complex'`, `promoted: true`
  and the failed strict attempt's diagnostic in `escalation`. Callers of the
  target route under the default mode are affected; `fallback: true` callers
  will see `success: true` where they previously saw `success: false` with
  `lane-mismatch`. `mode: 'strict'` is unchanged on both routes, and the shader
  and interval targets, which never promote to complex, are unaffected. One
  consequence for a THIRD-PARTY registered target: escalation is now each
  target's own responsibility, so a custom target that declares `auto` support
  no longer inherits the retry from the standalone wrapper — apply the exported
  `compileWithAutoEscalation` helper inside its `compile()` to keep the
  behavior.

- **The Python target's interpreter fallback no longer drops the `realOnly`
  projection.** With `fallback: true` on the Python target route, a declined
  compilation handed back an interpreter-backed `run` that ignored
  `realOnly: true` (the standalone route forwarded it; the target route did not)
  — a complex result then reached a caller that had asked for the real-only
  projection. Same route-asymmetry family as the escalation fix above, found
  while moving it.

## 0.116.1 _2026-08-19_

### Improvements

- **`Cross` accepts numeric tuples, like `Dot` always did.**
  `Cross((1,2,3), (4,5,6))` computed nothing — the signature demanded `vector`,
  so a point spelled as a tuple was rejected with `incompatible-type` while the
  same point passed `Dot` — and the two classic vector products disagreed about
  what a vector is. A provable numeric 3-tuple (a point in ℝ³, including a
  `PointList` row) is now lowered to its component vector exactly as `Dot`
  lowers it; the result is a `List`, consistent with collection operators not
  preserving the `tuple` kind. A tuple that is not provably numeric stays a
  symbolic `Cross`, and a wrong-length tuple gets the `incompatible-dimensions`
  report, not a type error. Affects code that builds `Cross` over `Tuple`/point
  operands — previously an error, now a value.

### Resolved Issues

- **`compile()` no longer reports the boolean literals as required inputs.**
  `CompilationResult.freeSymbols` lists the identifiers a caller must supply,
  and `True`/`False` were included even though every target either bakes them
  into the emitted code or drops them entirely. Since consumers derive a
  compiled function's variable list from `freeSymbols`, and `True` is the
  idiomatic fallback condition of a `Which`, an ordinary piecewise such as
  `Which(x > 0, 1, True, 2)` acquired a phantom variable named `True`.
- **A boolean literal compiled to invalid code on the shader and interval
  targets.** The `glsl` and `wgsl` targets emitted the undeclared identifier
  `True` — a shader that fails to compile, reported behind a successful result —
  and the interval target emitted a lookup for a caller-supplied variable named
  `True` that threw at run time. Each target now emits its own spelling of the
  literal.

- **Trigonometric operators now report a non-numeric operand instead of staying
  inert.** The trigonometric and hyperbolic functions, `Degrees` and `DMS`
  validated only the NUMBER of arguments, not their types, so an operand that
  turned out not to be a number was absorbed rather than reported:
  `Sin(At(["a", 2], 1))` stayed as `sin("a")` and `Degrees(At(["a", 2], 1))`
  answered a bare `NaN`. All of them now answer `incompatible-type`, matching
  the arithmetic operators. This completes the numeric-operand checking
  introduced in 0.116.0, which had covered arithmetic but not these operators.
- **`DMS` no longer mis-folds a component that is not a plain real number.** Its
  degrees, minutes and seconds components were read in a way that silently
  discarded anything but a real number literal, so `DMS(1, At([30, 2], 1))`
  answered `NaN` even though the minutes component resolves to 30, and
  `DMS(1, i)` answered exactly what `DMS(1, 0)` does. Such a call now evaluates
  its components first and, when one of them cannot be folded, is left
  unevaluated instead of producing a wrong angle.
- **The root `compile()` export regained its precise result types.** Its
  declared return type collapsed the target generic, so `run` was typed optional
  even for executable targets such as `javascript`, and `realOnly: true` no
  longer narrowed `run`'s values to plain `number` — a type-precision regression
  against the internal target route
  (`ce._getCompilationTarget(...).compile(...)`) that 0.116.0 told consumers to
  migrate away from. The export's overloads now mirror the underlying compile
  function's, so the target name flows through: `compile(expr).run` is
  non-optional, `compile(expr, { realOnly: true }).run(...)` is a `number`, and
  calling `run` unguarded on a source-only target (`python`) is a type error.
  Runtime behavior was never affected. Reported by a consumer at 0.116.0
  adoption.

## 0.116.0 _2026-08-19_

### Breaking Changes

- **`Type` now returns a type value instead of text.** Use `StringFrom(Type(x))`
  if you need the type name as a string, or use type-aware checks such as
  `x is integer` and `Subtype(Type(x), TypeFrom("number"))`. Code such as
  `Type(3) == "integer"` now evaluates to `False`.
- **Callback type declarations now use regular arrow types.** The old
  `callback<...>` spelling no longer parses. Declare the callback slot directly,
  for example `(T) any -> boolean` for a predicate. Calls that could only fail,
  such as filtering a `list<string>` with a number-only predicate, are now
  rejected before evaluation.
- **The minimum supported Node.js version is now 22.3.0.** Older Node 21
  releases are no longer supported.
- **`About` now returns a dictionary.** Read fields such as `About(Pi)["type"]`
  or `About(f)["signature"]` instead of parsing a display string.
- **Bare collection types now mean values-only collections.** `list`, `set` and
  similar bare types are synonyms for their `<unknown>` form, not `<any>`. Use
  `collection<any>` when absence markers such as `Missing` should be admitted.
- **Dictionaries now print in dictionary literal form.** `toString()` and the
  Epsil REPL print dictionaries as `{"key" -> value}`, with `{->}` for an empty
  dictionary. MathJSON serialization is unchanged.

### Types And Pattern Matching

- Added first-class type values with `TypeFrom(...)`, `Subtype(...)` and the
  primitive `type`. Example: `Subtype("integer", "number")` evaluates to `True`.
- `is` tests and `match` type patterns now accept full type expressions,
  including unions, negations and parameterized collections. Example:
  `x is list<integer>` and `x is number | string`.
- Protocol tests can be written with `is`. Example:
  `x is Hashable & Comparable`.
- Collection declarations with a bare element type can refine from assignments.
  Example: after `let xs: list; xs = [1, 2, 3]`, `xs` is typed as a list of
  integers.
- Uses of assigned symbols are checked against their assigned type instead of
  narrowing the symbol silently. This reports incompatible uses earlier, before
  evaluation.

### Epsil And VS Code Extension

- Added console I/O with `print(...)` and `input(prompt?)`. `print` writes to
  the host console and returns `Nothing`; `input` reads one line of text where
  the host supports it.
- The CLI and REPL no longer echo a final `Nothing` result, so a program ending
  with `print("done")` only displays `done`.
- Very deeply nested Epsil expressions now produce an `expression-nesting-limit`
  diagnostic instead of overflowing the JavaScript stack.
- Lexing and parsing now respect the evaluation time budget, so an oversized
  program can time out before execution begins.
- The VS Code extension gained Go to Definition, Find All References, Rename
  Symbol, richer hovers and diagnostic links to the error reference.

### Strings And Regular Expressions

- Added regular expressions with the `regexp` type and
  `RegExp(pattern, flags?)`. New operations include `IsMatch`, `StringMatch`,
  `StringMatchAll`, and regular-expression forms of `StringSplit` and
  `StringReplace`.

  ```epsil
  IsMatch("abc123", RegExp("[0-9]+"))
  StringReplace("a1b22c", RegExp("[0-9]+"), "#")
  ```

- Regular expressions use the host JavaScript regexp dialect. The `g` and `y`
  flags are rejected because their mutable position would make evaluation order
  visible.
- `StringMatch` returns match text, ranges, numbered groups and named groups.
  Ranges are character-based, matching the rest of the string library.

### Symbolic

- `And` and `Or` once again compare and match symbolically without depending on
  operand order. Evaluation still runs left to right and still short-circuits.
- Applying a value that is known not to be a function now reports
  `expected-function` instead of staying inert. Example: `Pi(2)` is now an
  error.

### Engine State

- Added engine checkpoint APIs: `ce.checkpoint()`, `ce.restore(cp)` and
  `ce.discard(cp)`. Notebook-like clients can checkpoint before a cell, restore
  to that point after an edit, then replay later cells.
- Checkpoints preserve expression validity and cache identity where possible.
  Restoring replays state changes, but effects still run again: `Random()` draws
  again and `Print(...)` prints again.

### Compilation And Numeric

- Numeric operators now accept operands that may be numeric and report a typed
  error only when evaluation proves the value is non-numeric. Example: `a + 1`
  is allowed for `a: value`, but `a = "hello"` later produces an
  `incompatible-type` error.
- Fixed several compiled complex-number cases that could return `NaN` or corrupt
  values while reporting success, including color functions, list broadcasts,
  complex-declared symbols with real values, and promoted radicals inside
  broadcasts.
- `CompilationResult.mode` now reports the actual arithmetic mode used by the
  emitted code. A default compile that promotes to complex reports
  `mode: "complex"`.
- Deprecation warnings for `realOnly` and `complexPromotion` now appear through
  target-level compile entry points as well as the standalone `compile()`
  export.
- Consumers that discover the engine through the global registration object can
  now access the supported `compile()` helper there too.

### Collections

- `Sequence` now splices into `List`, `Set` and `Tuple` literals. Example:
  `List(1, Sequence(2, 3), 4)` becomes `[1, 2, 3, 4]`.
- Lazy set operations now deduplicate consistently. `Join(Set(5, 2), Set(2, 3))`
  now has three elements, not four with a duplicate `2`.
- `Map` over a set now returns the distinct image of the set. Example:
  `Map(x => x^2, Set(-1, 1, 2))` is `Set(1, 4)`.
- Joining or appending dictionaries and records now merges keys with the last
  value winning. Example: `Join({"a" -> 1}, {"a" -> 2})` yields `{"a" -> 2}`.
- Truncated set previews now show an ellipsis when more elements remain.

### Type Fixes

- Fixed bare collection and type-variable inference so bare collection operands
  stay in the values-only family.
- Fixed intersections, `never`, negated types, collection meets and
  function-signature intersections so type reductions are more consistent.
- Fixed several type edge cases, including matching bare names against
  intersections, preserving vector and matrix spellings, and reporting arity
  errors for malformed `Type(...)` calls.

### Documentation

- Removed documentation for the non-existent `Extract` and `Exclude` operators.
  Use `At`, `Slice`, `Reverse` or `DeleteAt` instead.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE 0.116.0 | CE 0.100.0 | SymPy | math.js | Mathematica |
| ------------------ | ---------: | ---------: | ----: | ------: | ----------: |
| $\pi^2$            |        8.4 |        7.5 |   177 |   1,316 |         3.9 |
| $\sin 1$           |         21 |         21 |   220 |     440 |         5.1 |
| $\cos 1$           |         21 |         21 |   220 |     618 |         7.1 |
| $\ln 2$            |         15 |         14 |   350 |   4,344 |         3.7 |
| $e^{\pi}$          |         14 |         13 |   213 |   5,308 |         4.6 |
| $\zeta(3)$         |      1,533 |      1,551 |   267 |       — |          49 |
| $\Gamma(\tfrac13)$ |        829 |        821 |   342 |       — |         213 |
| $\psi(\tfrac13)$   |        715 |        716 | 2,786 |       — |         171 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case. Compare the **CE 0.116.0** and
**CE 0.100.0** columns to see what is _new since the last published benchmark_
(a `—` under `0.100.0` next to a number under the current build). The **CE +
R/F** column is the current build with the opt-in Rubi integrator + Fungrim
identities loaded (`loadIntegrationRules` / `loadIdentities`), on the same
minified bundle.

| Operation                              | CE 0.116.0 | CE + R/F | CE 0.100.0 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :--------: | :------: | :--------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |            |          |            |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |    3.7×    |   2.0×   |    2.8×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |    7.7×    |   1.4×   |    5.8×    | 0.08×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |    4.2×    |   0.8×   |    3.7×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |     —      |   1.7×   |     —      |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |     —      |   1.0×   |     —      | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |     —      |   1.0×   |     —      | 0.007× |    —    |     1×      |
| **Derivatives**                        |            |          |            |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |   0.03×    |  0.03×   |   0.03×    | 0.001× | 0.003×  |     1×      |
| **Simplification**                     |            |          |            |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |    41×     |   30×    |    29×     |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |    63×     |   55×    |    49×     |  3.2×  |   16×   |     1×      |
| **Evaluation**                         |            |          |            |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |    33×     |   12×    |    33×     |  3.0×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |    3.8×    |   3.5×   |    4.4×    |  2.1×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |   3672×    |  4204×   |   4152×    |  80×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |    262×    |   100×   |    237×    |  2.6×  |    —    |     1×      |
| **Solving**                            |            |          |            |        |         |             |
| $x^4+x^2-1=0$                          |    0.2×    |   0.2×   |    0.3×    | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |    1.5×    |   1.6×   |    1.4×    | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 3.8× faster than
Mathematica** (up to 3672×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-08-19 · Compute Engine `0.116.0` (current build @ `c5f1f3be`)
· published `0.100.0` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.115.0 _2026-08-17_

### Breaking Changes

- **The default JavaScript and Python compile mode is now `auto`.** Expressions
  such as `Sqrt(x)`, `Ln(x)` and non-integer powers may promote to complex
  arithmetic when the sign is unknown. For example, compiled `Sqrt(x)` now
  returns `{re: 0, im: 1}` at `x = -1` and `2` at `x = 4`. Use `mode: "strict"`
  for the previous real-only compile behavior.
- **`complexPromotion` and `realOnly` are deprecated.** Use `mode: "complex"` or
  `mode: "strict"` instead. `realOnly` still works for this release but now
  warns.
- **Compiled JavaScript returns plain numbers for exactly real results.** A
  complex result object `{re, im}` is now returned only when `im !== 0`. Use
  `typeof value === "number"` to test whether a sample is real.
- **`StringJoin` now joins one collection, with an optional separator.** The old
  variadic concatenation form changed meaning for two strings.
  `StringJoin("ab", "cd")` is now `"acdb"` because `"cd"` is the separator
  between the characters of `"ab"`. Use `Join("ab", "cd")` or interpolation for
  string concatenation.
- **Several string collection operators now preserve string results.**
  `RandomShuffle("abc")` and `DeleteAt("abcdef", 2)` return strings, not lists
  of characters. Chunking and combinatorics over strings now return lists of
  strings, for example `SlidingWindow("abcd", 2)` returns `["ab", "bc", "cd"]`.

### Compilation

- Added explicit compile modes: `"strict"`, `"complex"` and `"auto"`.
  Unsupported modes now return a clear diagnostic instead of silently changing
  behavior.
- `CompilationResult` now includes `mode`, `promoted`, `escalation` and
  structured `diagnostic` data so callers do not need to parse error messages.
- Strict mode now rejects complex values where the generated code expects real
  numbers, with a `lane-mismatch` diagnostic.
- Complex mode now treats broad or unannotated numeric inputs as complex-capable
  and promotes unknown-sign radicals consistently.
- JavaScript runners now validate incoming values against the shapes used during
  compilation. For example, a complex object passed to a real-analyzed binding
  throws a clear `TypeError`.
- Fixed compiled complex behavior for multi-clause functions, protocol methods,
  fallback evaluation, real-only special functions and promoted radicals.
- _(Recorded after release.)_ A compiled `Reduce` or `Scan` whose accumulator
  becomes complex mid-fold through an unknown-sign radical — for example
  `Reduce([4, -4], (a, x) -> a + sqrt(x), 0)` — returned `success: true` with
  `value: null` in 0.114.0. The complex-mode migration in this release fixed it
  (the radical now promotes and the fold computes `{re: 2, im: 2}`, matching the
  interpreter). Documented here retroactively after a consumer traced the fix to
  this release; the change landed in commit `7cfa95b4`.

### Epsil

- Added definition attributes for user-defined functions: `bind` parameters,
  algebraic properties such as `commutative` and `associative`, and doc
  comments.

  ```epsil
  /// Square a value.
  function square(x) -> number { x^2 }
  About(square)["description"]
  ```

- Fixed pipe placement when a stage has a missing trailing argument. Examples
  such as `xs |> Fold(f, 10)` now put `xs` in the collection slot instead of
  displacing arguments incorrectly.
- Multi-clause functions now map over collections the same way function literals
  do. Example: `fib(5..10)` evaluates element-wise.
- `Which` and `If` now hold or broadcast correctly when a comparison's broadcast
  shape cannot be decided statically.
- `Sum` and `Product` now substitute loop indexes correctly inside held `If` and
  `Which` terms.
- A symbol's inferred type is updated when a later value proves the earlier
  guess was too narrow.

### Strings

- `Join` now concatenates strings. Example: `Join("ab", "cd", "ef")` returns
  `"abcdef"`.
- Added contiguous sequence search: `RangeOf`, `ContainsSequence`, `StartsWith`
  and `EndsWith`. Example: `ContainsSequence("abc", "ab")` is `True`, while
  `Contains("abc", "ab")` is `False`.
- `Slice` accepts `Nothing`, so `Slice(xs, RangeOf(xs, needle))` returns the
  match or `Nothing` without an extra branch.
- Added `StringReplace`, `Trim`, `TrimStart`, `TrimEnd`, `StringRepeat`,
  `PadStart` and `PadEnd`.
- Added case operations: `ToUpperCase`, `ToLowerCase` and `CaseFold`. Use
  `CaseFold` for case-insensitive comparison.
- Added `StringCompare(a, b)` for deterministic code-point ordering.
- Added `NumberFrom(s, base?)` for parsing numbers from strings. Failures return
  an error value, not `NaN`.

## 0.114.0 _2026-08-16_

### Breaking Changes

- **Strings are now indexed collections of characters.** `Length("shop")` is
  `4`, `"abc"[2]` is `"b"`, and generic collection code can now accept strings.
  If a function should accept collections but not strings, use a type such as
  `collection & !string`.
- **`string` is no longer a `scalar`.** Declare `string`, or `string | number`,
  when strings are intended.
- **Added a distinct `character` type.** Characters are single user-perceived
  characters and are not one-character strings, although they compare equal by
  value where appropriate. `Characters("ab")` now returns `list<character>`.
- **String-preserving collection operators now return strings for string
  input.** Examples: `Reverse("abc")` returns `"cba"` and `Take("abc", 2)`
  returns `"ab"`. Transforming operators such as `Map` still return lists.
- **Materializers and set operators read strings as characters.**
  `ListFrom("abc")` is `["a", "b", "c"]`, and `[..."ab"]` is `["a", "b"]`.
- **`Max`, `Min`, `GCD` and `LCM` no longer expand strings.** Strings are
  treated as non-numeric values for these operators.
- **Invalid UTF-16 surrogate halves are normalized when strings enter the
  engine.** They are replaced with `U+FFFD` so all string operations work on
  well-formed Unicode.
- **Compiled string collection operations are grapheme-correct in JavaScript and
  fail closed on targets that cannot support them.** Python and shader targets
  no longer emit approximate string collection code.

### Strings

- Added `CharacterFrom(s)` and host API support for character values.
  `String(c)` converts a character back to a string.
- Strings work with collection operations over grapheme clusters. Example:
  `Tally("mississippi")` counts characters, and `"7" in "0123456789"` is `True`.
- `String(collection)` now joins a finite collection into one string. Example:
  `String([1, 2])` returns `"12"`; use `Map(String, [1, 2])` to convert each
  element separately.

### Epsil And Types

- Added `hold` functions, whose arguments are bound as written and evaluated
  only when used in the function body. Example: `hold f(e) = Head(e)` lets
  `f(a + 1)` inspect the expression structure instead of the evaluated value.
- Re-declaring an object type now re-checks protocol conformances that depend on
  its stored fields. This makes notebook-style re-runs update field-backed
  protocol behavior correctly.
- Protocol member effect annotations in implementation blocks are now honored
  and checked.
- Writes through mutable objects consistently carry the `state` effect.
- `Head` and `Tail` now resolve a symbol's assigned expression during evaluation
  while staying structural for unbound symbols.

### Numeric And Symbolic Fixes

- `Reduce` and `Scan` now handle complex accumulators correctly in both
  interpreted and compiled numeric paths.
- `Abs` over a negation now returns the absolute value rather than the negated
  expression.
- The derivative of a vector norm now uses the vector norm rule instead of the
  scalar absolute-value rule.
- A declared subscripted symbol with a Greek base, such as `\eta_w`, now remains
  the declared joined symbol instead of being captured as an index when `\eta`
  becomes a collection.
- A compiled user function with a `complex` parameter now receives and returns
  correctly shaped values.

## 0.113.0 _2026-08-16_

### Breaking Changes

- **Protocols that can mutate state now require object types.** A protocol with
  a `readwrite` property or a member declared with `state` effects can only be
  implemented by an `object{...}` type. Use an object type when writable
  protocol properties are needed.
- **Assigning to a protocol property now stores into the object.**
  `p.name = "Ada"` mutates the object referred to by `p` and returns the
  assigned value. It no longer calls a setter that rebuilds and rebinds `p`.
- **Collection operators now report result types by collection kind.** Operators
  such as `Reverse`, `RotateLeft`, `RotateRight`, `Rest`, `Most` and `Filter` no
  longer promise to preserve every indexed collection kind. For example,
  reversing a tuple now reports a list type.

### Objects And Protocols

- Stored object fields can now satisfy protocol property requirements with the
  same name. Example: `type Person = object{name: string} is Nameable` can
  satisfy a readonly `name` property without writing a getter.
- Field-backed writable properties store into the object in place.
- A stored field and an explicit accessor for the same protocol property are now
  reported as a conflict.

### Collections

- `Slice` now accepts an index span. Example: `Slice(xs, 2..4)` is equivalent to
  `Slice(xs, 2, 4)`.
- Bare collection element types now consistently read as `unknown` rather than
  `any`.
- Assigning a value to a symbol declared `unknown` now refines the symbol from
  the assigned value. Declare `any` when the type should remain fully
  permissive.
- Speculative parsing no longer narrows symbols declared `unknown` in the
  surrounding engine.

### Numeric, Compilation And Parsing

- Fixed division by a scaled vector norm, which could incorrectly collapse to
  `0`.
- Fixed compiled calls where a complex value is passed to a user function with a
  wide parameter.
- Lowercase LaTeX operator names such as `\operatorname{unique}`,
  `\operatorname{sort}`, `\operatorname{reverse}` and `\operatorname{total}` now
  parse to their intended operators.
- Overload diagnostics now display the declared type shape instead of confusing
  `...<unknown>` instantiations.

## 0.112.0 _2026-08-15_

### Breaking Changes

- **Epsil lambdas now use `=>`.** The old `|->` spelling reports a diagnostic
  with a fix-it. Function types still use `->`, and dictionary entries still use
  `->`.

  ```epsil
  let square = x => x^2
  [1, 2, 3] |> Map(_ => _^2, _)
  ```

- **`record` and `object` field types now use braces.** Write
  `record{x: integer, y: integer}` and `object{name: string}` instead of the old
  angle-bracket form.
- **`And`, `Or` and related boolean operators now short-circuit and preserve
  operand order.** This can change serialized order for expressions that were
  previously sorted during canonicalization.

### Epsil

- Lambda parameters and `for` loop bindings can destructure tuple elements.
  Example: `pairs |> Map(((x, y)) => x + y, _)`.
- Callback arity mismatches are now reported statically. Example:
  `Map((x, y) => x + y, [1, 2, 3])` reports that `Map` calls its callback with
  one argument.
- A pipe stage that cannot accept exactly one piped value now reports
  `pipe-stage-arity` instead of returning a partially applied function.
- Duplicate lambda parameter names are now parse diagnostics.
- `for` and `while` loops now serialize back to Epsil loop syntax instead of
  generic `Loop(...)` calls when possible.

### Types And Collections

- Added the `range` type for ascending, contiguous 1-based index spans. It is
  still an indexed collection of integers, but can also be required by
  span-consuming operators.
- A lazy collection callback now runs once per element per consumption, avoiding
  duplicate side effects from probing.
- `Max`, `Min` and statistics over `Linspace` now handle descending,
  single-sample and symbolic cases correctly.
- Pipes that implicitly map over a collection now report the mapped collection
  type.
- Comparisons that may broadcast now report a `broadcastable<...>` type,
  allowing `Which` and `Sum` to type their results more accurately.
- Scaling or shifting collections now widens element types correctly. Example:
  `(1..4)/2` reports rational elements, not integers.
- Loop and comprehension binders can widen inferred element types when the
  iterated collection under-declares its elements.

### Compilation And Numeric

- Shader compilation now emits valid integer conversions for symbolic `Sum` and
  `Product` bounds.
- Statistics functions such as `Mean(x)` now compile correctly for a single
  value.
- Differentiating point-valued functions installed through `assign` is
  componentwise again.
- Primes before subscripts now attach to the subscripted function name. Example:
  `F'_{0}(t)` parses as the derivative of `F_0` applied to `t`.
- Element-wise arithmetic over collections of complex values now compiles where
  a single real-or-complex convention fits.
- Real-only numeric operations such as `Floor`, `Max` and `Mod` now decline
  complex operands instead of compiling to `NaN`.

## 0.111.0 _2026-08-15_

### Breaking Changes

- **`RecordFrom` has been removed.** Use `DictionaryFrom`. Given identifier
  keys, `DictionaryFrom([("a", 1), ("b", 2)])` already produces a value typed as
  a record.

### Objects

- Mutable object fields can now be assigned. Example: `p.age = p.age + 1` stores
  into the object in place, and all aliases see the update.
- Assigning to fields of immutable values now reports
  `immutable-value-assignment` with guidance to use an object type or build an
  updated copy.

### Epsil And Performance

- Epsil programs now stop when the active time budget expires, instead of
  continuing after a statement times out.
- Parsing long Epsil programs is now linear in program length.
- Canonicalization now checks `withTimeLimit` deadlines while it runs.

### Collections And Numeric

- Operators now stay symbolic for collection-typed symbols that have no value
  yet, instead of guessing scalar or empty behavior. Example: `Mean(L)` stays
  symbolic for unassigned `L: list<number>`.
- Indexed reads from collections with complex elements now compile correctly or
  decline when no single result shape fits every possible index.
- Collection comparisons no longer overflow the stack for
  declared-but-unassigned collection operands.
- Subset and superset operators now use the documented operand order and handle
  ranges, intervals and strictness more accurately.
- Closed degenerate intervals, such as `Interval(1, 1)`, are now treated as
  non-empty.
- Declared fixed-size collection types now expose their `count` without
  requiring a value. Example: a `vector<2>` symbol has count `2`.

## 0.110.0 _2026-08-15_

### Breaking Changes

- **Functions that write to outer variables must declare the `scope` effect.**
  Unannotated functions now guarantee they do not mutate outer bindings. Use
  `function bump(n) scope { total = total + n }` when mutation is intended.

### Compilation

- Added `complexPromotion` as an opt-in compile option for complex results from
  `Sqrt`, `Ln` and `Log` when their operand sign is unknown.
- Compile-time constant folding now includes small constant indexed collections.
  Example: `At(Map(_ => _^2, 1..6), k)` can bake the mapped list into emitted
  code.
- Computed `Range` bounds now use their runtime length when compiled, instead of
  being mistaken for numeric literals.
- Compile-time folding is now deterministic and based on expression cost, not
  wall-clock timing.
- Local function definitions now compile and stay local to their block instead
  of leaking into the global scope.

### Epsil And Types

- Writes to a function's own parameters are treated as call-local and can remain
  pure.
- Property writes are judged by the base variable, so writes to local objects do
  not incorrectly require `scope`.
- Declared placeholder signatures using `unknown` now refine from the function
  body. Use `any` for a true accept-anything contract.
- Declared function clauses can omit parameter annotations when a declared
  signature already supplies them.
- Assigning to a declared subscripted name now prefers the joined symbol, and
  ambiguous undeclared function-family assignments now report an explicit error.

### Numeric And Collections

- Adding three or more collections now handles lazy views correctly instead of
  nesting results.
- Arithmetic on vector-valued calls with not-yet-defined arguments now remains
  valid when the eventual operation is element-wise.
- Dividing a point or vector now widens component numeric types honestly.
  Example: `[6, 2] / 4` has rational components.
- `Equal` and `NotEqual` between a collection-typed application and a list now
  produce one whole-collection boolean.
- Nested-list broadcasts no longer retype inner collection-valued symbols.
- Large counted `Take` and `Drop` operations in compiled code now honor the
  requested count instead of throwing at the iteration limit.
- `Filter` and `Unique` now apply the iteration cap to unproductive pulls, so
  productive infinite filters can be consumed safely with `Take`.

### Performance

- Long flat sums, products and related chains now parse in linear time.
- Deep expression trees can be boxed more reliably before hitting the host stack
  limit.
- Large documents involving comprehensions and broadcasted indexed reads now
  parse much faster.

## 0.109.0 _2026-08-14_

### Breaking Changes

- **Defining the same function clause twice in one Epsil program is now an
  error.** Clauses with different parameter domains still accumulate for
  multi-clause functions, and re-running a later program still replaces
  definitions notebook-style.

### Epsil

- Spreading declared-but-unassigned dictionaries and records now stays symbolic
  instead of erroring. Example: `{->, ...d, "k" -> 3}` can be built before `d`
  has a value.
- Dictionary conversion errors now return error expressions instead of throwing
  uncaught JavaScript exceptions.

### Compilation

- Degree-mode compiled angular functions with constant arguments now agree with
  interpretation. Example: compiled `sin(90)` in degree mode now returns `1`.
- Epsil programs that define a local function and call it can now compile to
  JavaScript, including recursive calls and use as callbacks where supported.
- Lambda parameters named `_` no longer shadow the generated JavaScript vars
  object, fixing compiled callbacks that refer to free variables.
- `Drop` with a negative count now reports the same element count it actually
  yields.
- Compiled counted `Take` and `Drop` over infinite streams now work when the
  requested count is larger than `ce.iterationLimit`.

## 0.108.0 _2026-08-14_

### Breaking Changes

- **`Map` now takes the function first: `Map(f, xs)`.** The legacy `Map(xs, f)`
  order now reports an `incompatible-type` error. Pipeline calls should use
  `xs |> Map(f, _)` or simply `xs |> Map(f)`.

### Epsil

- A type, protocol or sum name may only be declared once in a single Epsil
  program. Re-running a later program can still replace the declaration.
- Added spread syntax in list and set literals and dictionary merges. Examples:
  `[...xs, 3]`, `{1, ...s}` and `{->, ...defaults, "verbose" -> true}`.

### Compilation And Numeric

- Compiled code now folds pure constant subexpressions to literals. Example:
  `x + Sum(Map(_ => _^2, 1..5))` can compile as `x + 55`. Use
  `constantFold: false` to inspect structural output.
- Difficult symbolic derivatives now fall back to numeric differentiation for
  `N()` and compiled evaluation when a closed form is too large. Exact
  `evaluate()` still stays symbolic.
- `At(xs, indexes)` now preserves known selection counts, improving `Zip` and
  `Map` over gathered elements.
- `expr.unknowns` no longer reports typed lambda parameters as free variables.
- Numeric approximation of divergent infinite sums and products no longer
  returns silently truncated partial results.
- `170!` no longer overflows to `Infinity` in machine-precision paths.
- Python-compiled counts for `Take`, `Drop`, `Tabulate` and `Fill` now round
  like the interpreter.
- Numeric quadrature now honors active time limits.

### Strings

- `IntegerString` now preserves the minus sign. Example: `IntegerString(-42)`
  returns `"-42"`.
- `StringSplit(s, "")` now splits into grapheme clusters instead of UTF-16 code
  units, avoiding corrupt non-BMP characters.

### Performance

- Large documents with symbolic range bounds now avoid major slowdowns and
  memory pressure.

## 0.107.0 _2026-08-13_

### Epsil

- Pipelines gained concise stage forms. A missing argument is filled by the
  piped value, inline lambdas can appear directly after `|>`, and a
  one-parameter lambda stage over a collection maps each element.

  ```epsil
  1..oo |> Take(10) |> _^2 |> Sum
  ```

- `otherwise` is now accepted as the wildcard case in `match`.
- Named calls to a function assigned earlier in the same program no longer
  produce false static diagnostics.
- Diagnostics inside reordered named calls now underline the argument that
  actually failed.
- Inline function literals now accept named arguments. Example:
  `((x, y) => x - y)(y: 2, x: 10)` returns `8`.

### Compilation

- `Take`-bounded infinite pipelines now compile to JavaScript safely. Unbounded
  infinite pipelines fail at compile time instead of throwing a runtime range
  error.
- Fractional `Take` and `Drop` counts in compiled JavaScript now round like the
  interpreter.

### Performance And Static Checking

- Canonicalizing or typing expressions that reference comprehension-bound names
  is much faster.
- Static Epsil checking no longer mutates engine state. Inferred types, forward
  references and declarations from a check are discarded afterward.

### Effects

- Added the `state` effect label for object creation and mutation. It is
  available in type strings and effect contracts, preparing for mutable object
  support.

## 0.106.1 _2026-08-13_

### Issues Resolved

- **Epsil no longer silently reads the equivalence glyphs as the wrong equality
  tier: `≡`, `≢`, and `≣` are now rejected outright** (`unexpected-symbol`).
  Previously a typed `≡` (IDENTICAL TO) silently weakened to `==` — arithmetic
  `Equal`, not the identity prover the glyph means in mathematics — `≣` quietly
  parsed as `===` (`Same`), and `≢` was a broken mapping that errored
  confusingly. Rejecting all three is deliberate (rather than assigning them
  tiers): the glyphs' bar counts cross the `=`-run lengths (`≡` has three bars,
  `≣` four, while `===` has three characters), so a visual transliteration in
  either direction lands on a _different_ comparison that silently answers a
  different question. The equality tiers in Epsil are ASCII-only — `==`
  (arithmetic, tolerant, may stay inert as a condition), `===` (`Same`,
  structural, total) — and the identity-prover tier is spelled as a call,
  `IdenticallyEqual(a, b)`. LaTeX is unaffected: `\equiv` still parses as
  `IdenticallyEqual`.

- **`.toString()` no longer prints arithmetic equality in `Same`'s spelling**:
  `Equal` now serializes as `==` (was `===`) and `NotEqual` as `!=` (was `!==`).
  The old JS-flavored spellings predate Epsil, where `===` parses as the
  structural `Same` tier — so the string view printed an `Equal` in the exact
  spelling that reads back as the other operator. `Same` now also serializes in
  operator form (`===`) instead of function-call form; `IdenticallyEqual` stays
  in call form (the same no-equivalence-glyphs ruling as the Epsil entry above).
  Compiled JavaScript is unchanged (`Equal` still compiles to JS `===`, which is
  correct there).

- **An exact integer beyond the safe-integer range now has one storage form too,
  completing the 0.106.0 normalization** (the item-178(b) residual, filed by the
  Tycho team at their 0.106.0 adoption; witness `8e19` from their seed corpus,
  minimal witness `1e16`). The 0.106.0 fix normalized a bigint WITHIN the safe
  range to machine storage but left an integer-valued machine number BEYOND it
  un-normalized, so `ce.box(1e16)` and the parse of its own serialization were
  `isSame` with byte-equal MathJSON yet hashed differently — the same
  `isSame ⇒ equal hash` break, past the boundary (`2^53` itself was clean). The
  constructor now stores integer-valued machine numbers outside the safe range
  as bigints — the storage the parse route produces — so each side of `2^53` has
  one canonical form (machine below, bigint above); the conversion is exact for
  every integer-valued float64. Serialization follows the storage, so such
  literals now print in the compact exponent form (`ce.box(1e16).toString()` is
  `"1e+16"`, no longer `"10000000000000000"`); MathJSON output is unchanged.

- **Assigning to a symbol auto-declared with type `unknown` now applies the same
  literal-type promotion as a fresh declaration**, so the settled type no longer
  depends on whether a boxing auto-declared the symbol before the assignment
  (observed by the Tycho team's order-matrix probe at their 0.106.0 adoption).
  Boxing an expression can auto-declare a mentioned symbol at type `unknown`
  when its uses record no type evidence (a bare `List` sibling, a binder-body
  occurrence); assigning `5` to such a symbol then adopted the value's raw type
  (`finite_integer`), while the same assignment on a fresh symbol declares the
  promoted `integer`. The `unknown`-incumbent case now takes the declaration
  promotion, so box-first and assign-first orderings settle on the same type
  (`integer`). The 0.106.0 assignment-narrowing guards are unchanged: declared
  types are never touched, assignment-derived incumbents stay widen-only, and
  the D11 incompatible-guess adoption keeps the value's raw type.

### New Features

- **Protocol dispatcher effects are now derived from the registered conformers;
  a requirement's effect specifier is an opt-in ceiling.** A protocol function
  requirement with a **bare** specifier no longer acts as a pure ceiling:
  implementations may carry any effects, and the dispatcher's effect set is the
  live union of the inferred effects of the registered conforming
  implementations — pure while every conformer is pure (calls through it stay
  cacheable and compile-eligible), widened the moment a mutating or drawing
  conformance registers, with dependent caches recomputing (a call boxed before
  the registration reports the new effects, and an already-inferred user
  function whose body calls the member re-derives). The dispatcher's serialized
  signature snapshots the union as of serialization. A requirement **with** a
  specifier (including the explicit `pure`) is a durable ceiling: a conformance
  whose implementation _declares_ or whose body _infers_ effects beyond it is
  rejected (`protocol-signature-mismatch` names the exceeded labels and points
  at the ceiling as the fix site). Registering a conformance that would widen a
  bare-requirement union past a standing **declared** effect contract — a
  function annotated `pure` whose body dispatches through the member — is itself
  rejected (`conformance-widens-declared-contract`, naming every violated
  dependent and the exceeding labels) and leaves the registry unchanged.
  Behavior change: an implementation declaring effects against a bare
  requirement was previously rejected; it is now accepted, by design
  (`docs/TYPE_SYSTEM_ROADMAP.md` Appendix B, "Changing a field is an effect" —
  the bare-means-pure ceiling was explicitly rejected there).

## 0.106.0 _2026-08-13_

### Breaking Changes

- **The `Error` JSON shape gains an operand: argument-validation errors now
  carry the FAULTED OPERAND as a site operand, before the trace.** An
  `incompatible-type` error minted while validating an argument reports which
  operand faulted:

  ```
  before   f("str")            ["Error", EC]
           Sqrt("s").evaluate  ["Error", EC, ["ErrorTrace", …]]

  now      f("str")            ["Error", EC, "'str'"]
           Sqrt("s").evaluate  ["Error", EC, "'s'", ["ErrorTrace", …]]
  ```

  `ErrorTrace` stays LAST and is head-identified, as always — code that finds
  the trace by scanning for the `ErrorTrace` head is unaffected. **Code that
  reads the trace positionally as operand 2 now gets the faulted operand
  instead** — a plausible-looking value rather than an error node, so that
  failure mode is a silently wrong read, not a crash: grep for positional
  `Error` operand reads before adopting. Rendered messages now name the site ("…
  at `p`"). Two contract repairs ride with the change: `match`'s `Error(c)`
  patterns ignore the site the way they already ignore the trace (pattern arity
  decides — `Error(c, w)` binds the site), and static-diagnostic deduplication
  keys on a SITE-LESS description so one problem does not split into per-site
  diagnostics. Any stored/expected MathJSON containing `Error` nodes (snapshots,
  seed corpora) will change shape even where nothing is wrong — re-baseline
  those deliberately rather than reading the churn as a regression.

### Epsil

- **Named-argument calls.** An Epsil call can pass arguments by parameter name:
  `interest(principal: 1000, rate: 0.05)`. Named arguments may be given in any
  order, may follow positional arguments (never precede them), and are matched
  against the parameter names of the declaration the call resolves through —
  including overloaded and multi-clause functions (each overload is matched with
  its own parameter order; a named argument is also a **branch selector** — a
  clause that does not declare the written names is never chosen, so with
  clauses `(z: 0)` and `(n: integer)`, `f(n: 0)` runs the general `n` clause
  while `f(0)` runs the base clause) and protocol members — bare
  (`tag(prefix: "→", self: s)`) and qualified
  (`Tagged.tag(prefix: "→", self: s)`) alike, dispatching on `self` wherever it
  is written. A call that uses any name is a complete call: omitted optional
  parameters are fine, but it never curries, and it cannot fill a variadic tail.
  New diagnostics: `argument-name-unknown` (with a "did you mean"),
  `argument-order-invalid`, `argument-name-duplicate`,
  `argument-names-unavailable`, and `argument-optional-skipped`, all covered by
  `epsil doc <code>`. Parameters without a declared name remain positional-only,
  as do unannotated function literals. Design record:
  `docs/plans/2026-08-12-named-arguments-design.md` (spec:
  `docs/TYPE_SYSTEM_ROADMAP.md` Appendix C, rulings C1–C6).

- **The VS Code extension shows what the engine makes of your file.** **Epsil:
  Show Representation** (the `{}` button in the editor title bar) opens a
  read-only pane beside an Epsil file showing one of five representations: the
  **MathJSON** the parser produced (before canonicalization), the **canonical
  form** of each top-level statement, or the program as compiled by one of the
  engine's code-generation targets — **JavaScript**, **Python** (NumPy), or
  **GLSL**. The pane tracks the buffer as you type — unsaved and untitled
  buffers included — and nothing is evaluated, so rendering a view never runs
  the program. A program a target cannot compile (for now that includes any
  program defining a function, since `DefineFunction` has no lowering in any
  target) reports the compiler's explanation in the pane instead.

### New Features

- **A definition-level `compile` handler on `Which` is now honored** (Tycho item
  180). The per-operator compilation extension point excluded every control-flow
  head; `Which` is now the carve-out, because it has no binding structure — its
  operands are plain condition/value pairs a handler can compile through the
  callback it is given (unlike a `Sum` index or a `Function` parameter list,
  which remain non-overridable). The handler has the same contract as every
  other operator `compile` handler: it takes precedence over the built-in
  lowering, and returning `undefined` falls back to the stock `Which`
  compilation, complex-branch coercion and frame-protocol wrapping included. The
  override is **per-engine** — attach it to the engine's own definition, which
  keeps the stock evaluation semantics:

  ```ts
  const def = ce.lookupDefinition('Which');
  if (def && 'operator' in def) def.operator.compile = myWhichHandler;
  ```

  (Do not `ce.declare('Which', {...})` for this: a re-declaration replaces the
  stock `evaluate`/`canonical` handlers, so the operator would compile with the
  custom handler but no longer evaluate correctly.)

- **Speculative parsing: `ce.parse(latex, { speculative: true })` leaves no
  trace in the engine's type state** (Tycho item 179). A normal parse has two
  persistent side effects: an undeclared symbol is auto-declared into the
  current scope, and a narrowing use moves the inferred type of an
  already-declared symbol (`Fibonacci(u)` narrows an inferred `u: number` to
  `integer`) — and the second one is not confined by parsing inside a child
  scope, since the write lands on the resolved definition wherever it lives.
  With `speculative: true` the parse runs in a transient scope that is discarded
  on the way out, and every mentioned symbol whose ambient type is inferred is
  shadowed in that scope with its current type, so narrowing refines the
  discarded shadow instead of the ambient symbol. Symbols with a declared
  (non-inferred) type, constants, and operators are not shadowed, so the string
  parses exactly as it would without the option, and the result's type and
  MathJSON are identical to a normal parse's. Intended for derive-style parses
  that only read the result (its type, structure, or serialization): the
  result's bindings refer to the discarded scope, so it should not be retained,
  evaluated, or compared against later expressions. Mutually exclusive with the
  `scope` option, which has the opposite contract (the scope receives the
  writes, to be read back).

### Issues Resolved

- **A qualified protocol member now works as a collection callback.**
  `Map([1, 2, 3], Negatable.negated)` used to answer
  `["Missing", "Missing", "Missing"]`: the callback arrives at canonicalization
  as the field expression `Field(Negatable, "negated")`, and the
  shorthand-lambda lift read it as a lambda _body_, turning the protocol name
  into the parameter — so every element was bound to the protocol-name slot and
  read as the base of a field access. A qualified protocol member is now
  recognized as a function _value_ (the same contract that already kept
  `Apply(InverseFunction(f), 2)` from beta-reducing) and the callback dispatches
  per element. A protocol name shadowed by a valued binding is not a protocol
  reference and reports the ordinary not-a-function error instead of silently
  dispatching.

- **A protocol dispatcher call inside a shorthand lambda body no longer
  errors.** `Map([1, 2, 3], negated(_) * 10)` reported
  `incompatible-type number/unknown` on the dispatcher call, while the identical
  shape through a plain declared function worked. Cause: at an undecided
  receiver, the requirement's `Self`-typed result substituted as a type
  _reference_ named "unknown" — printing exactly like the primitive but
  defeating every gate that admits a primitive `unknown` operand as "defer and
  infer later". The reference is now reduced to the primitive, so the shorthand
  evaluates (`[-10, -20, -30]`) and an undecided receiver defers symbolically as
  before.

- **An assignment can now refine a use-inferred symbol type, so the inferred
  type no longer depends on whether the first use or the assignment came
  first.** Previously the inference direction rules were strictly one-way: uses
  narrow, assignments widen. A symbol whose numeric use was seen before its
  assignment therefore settled on a wider type than the same symbol assigned
  first (`v` used in `x·v` then assigned `5` stayed `number`, while assign-first
  gave `integer`) — a divergence between orderings, not a wrong type under the
  rules. Now, when a symbol's current type came from USE inference (not from a
  previous assignment or a declaration), an assignment refines it to the
  assigned value's type, with three guards: the promoted type installs only when
  it is a subtype of the current one; a symbol whose latest type evidence is
  itself assignment-derived stays widen-only, so alternating assignments
  (`v := 2.5` then `v := 5`) do not oscillate the type; and the union-adoption
  path for declared unions is unchanged. Declared types are never affected. If
  you probe type stability across orderings (box-first vs assign-first), expect
  both orderings to converge on the assignment's type now — a deliberate change,
  not drift.

- **A parsed integral now binds its integrand's free symbols the same way as
  boxing its canonical MathJSON does** (the residual surface of Tycho item
  178(a), distinct from the first-boxing divergence below — it was
  order-independent, and pre-declaring the symbol did not remove it).
  `Integrate`'s canonical handler derived a shorthand integrand's `Function`
  literal by inferring a parameter for each free body symbol — declaring those
  parameters in the body scope, with the body's occurrences bound to them — and
  then swapped the parameter list for the integration variables, leaving the
  body's occurrences bound to the discarded parameters. A parsed
  `\int_{-x}^{x} \cos(x)\,dn` therefore carried a body `x` bound to a discarded
  parameter while the bounds' `x` bound the engine's definition, and compared
  `isSame` false against `ce.box()` of its own `.json` (and against the box
  route generally) with byte-equal MathJSON. The handler now passes the
  integration variables to `canonicalFunctionLiteral` as the intended parameter
  list, so the body canonicalizes with exactly those parameters declared — the
  same binding structure the explicit-`Function` route produces. A knock-on
  repair: a parenthesized explicit `Function` integrand (`Delimiter`-wrapped)
  now keeps its user-supplied parameters instead of having them overwritten by
  the integration variables. Values were never affected — evaluation resolved
  identically on both routes — and serialization is unchanged (zero snapshot
  churn).

- **Boxing the same MathJSON twice now produces `isSame` expressions — including
  the first-ever boxing of a shape** (Tycho items 178(a) and 178(c), two
  surfaces of one defect). A not-yet-declared symbol occurring both inside a
  binder's scope and outside it (e.g.
  `["List", ["Integrate", ["Function", … y_r …], …], "y_r"]`) made the first
  boxing bind the two occurrences differently: the occurrence inside the
  function body auto-declared into a scope local to that one canonicalization,
  while the sibling outside declared into the surrounding scope. Every later
  boxing found the surviving surrounding binding first and resolved _both_
  occurrences to it — so on a fresh engine `ce.box(J).isSame(ce.box(J))` was
  `false` (and a box and a parse of the same integral disagreed), breaking the
  documented contract that `isSame` is safe as a dedup/matching key. The boxing
  machinery now detects the conflict — one construction both auto-declaring a
  name into a scope it created and then declaring the same name into a scope
  that outlives it — and rebuilds the construction once, so the first result is
  the same one every later boxing produces. No resolution rule changed and
  nothing new is declared: a function body's free symbols remain invisible to
  the caller, and capture through assigned document variables is untouched.

- **`.json` no longer reports a different operand order than the expression it
  serializes** (Tycho item 178(d)). `.json` goes through the structural form,
  which re-sorted a commutative operator's operands — but a CANONICAL expression
  has already had its operands ordered, and that order is the one `.ops`,
  `.toString()`, `isSame` and `hash` all read, so re-sorting could only disagree
  with it. It did, because `order()` breaks a tie between two same-operator
  applications on leaf count, and a complex literal is one atom in canonical
  form (`i`) but a two-operand application in structural form (`Complex(0, 1)`):
  the operands of `m(M_1, i, n)·m(M_2, n, j)` counted 6-vs-4 structurally where
  they counted 4-vs-4 canonically, so the tie broke the other way and one object
  reported two different operand orders depending on which accessor you asked. A
  canonical expression now keeps its own order; a non-canonical one is still
  sorted, which is what puts it in structural form at all. Four `arithmetic`
  snapshots record the corrected order — in each, `.json` now matches `.ops`
  (`1.1 + 2 + 5 + 5/7 + 7/9 + √2 + π` serialized `√2` before `1.1` while the
  tree held the reverse).

- **An exact integer now has one storage form, so it hashes the same however it
  was built** (Tycho item 178(b)). `ExactNumericValue` accepted an integer as
  either a machine `number` or a `bigint` and kept whichever it was handed, but
  `numberToString()` formats the two differently — a bigint with more than five
  trailing zeros compacts to an exponent (`1e+11`) while the identical machine
  integer prints in full (`100000000000`) — and `BoxedNumber.hash` hashes that
  string. So `ce.box(100000000000)` and its own reparsed serialization were
  `isSame` with byte-equal MathJSON yet hashed differently, breaking the
  documented `isSame ⇒ equal hash` contract; any integer with more than five
  trailing zeros was affected, `1000000` included. The constructor now applies
  the same safe-integer normalization `reducedRational()` already used.
  Magnitudes beyond the safe-integer range are untouched, so bignum results keep
  their compact exponent form (`√(1234567e+19)` is unchanged).

## 0.105.0 _2026-08-12_

### Breaking Changes

- **The prefix `forall` quantifier was replaced by a trailing `where` clause.**
  A generic signature states its type variables _after_ the signature instead of
  before it: `forall T. (T) -> T` is written `(T) -> T where T`,
  `forall T: indexed_collection. (T) -> T` is
  `(T) -> T where T: indexed_collection`, and
  `forall T, U. (list<T>, (T) any -> U) -> list<U>` is
  `(list<T>, (T) any -> U) -> list<U> where T, U`. The clause is always **last**
  — after the effect specifier and after the return type — and an omitted bound
  means `any`, so `where T` is shorthand for `where T: any`. Semantics, solving
  and bounds are unchanged. The prefix spelling is **removed**, not deprecated.

  Consequences:

  - `where` is now a reserved type name and `forall` is not:
    `ce.declareType("where", …)` is a `reserved-type-name` error, and
    `ce.declareType("forall", …)` now succeeds. A nominal type named `where`
    must be renamed.
  - A type string beginning with `forall` reports a targeted migration
    diagnostic rather than a cascading parse error.
  - `.toString()` emits the trailing shorthand (`(T) -> T where T`, never
    `where T: any`), so a type has one canonical string. Variable names
    round-trip as written.
  - Per-arm quantification of an overload set now needs parentheses, since
    `where` binds looser than `&`:
    `((list<T>) -> T where T) & ((set<T>) -> boolean where T)`. The
    unparenthesized form is rejected with a message naming the fix.

### New Features

#### Epsil: language

- **Protocols.** A protocol declares a set of functions and properties a type
  implements to **conform**; conformance drives dynamic dispatch:

  ```epsil
  protocol Comparable {
    function compare(self, other: Self) -> "<" | "=" | ">"
  }
  type string is Comparable {
    function compare(self: Self, other: string) -> "<" | "=" | ">" {
      if (self < other) { "<" } else if (self > other) { ">" } else { "=" }
    }
  }
  compare("a", "b")            // dispatches on the first argument -> "<"
  Comparable.compare("a", "b") // qualified form
  ```

  Includes `readonly`/`readwrite` properties with getter/setter implementations
  (`person.name`, and `person.name = v` as rebinding sugar over the immutable
  value model); protocol constraints in `where` clauses
  (`function sort(xs: list<T>) -> list<T> where T is Comparable`); conditional
  conformance (`type list<T> is Comparable where T is Comparable { … }`,
  recursive — `list<list<string>>` conforms when `string` does); qualified
  property disambiguation `person.(Protocol.name)`; and the host API
  (`ce.declareProtocol`, `ce.declareProtocolImplementation`). Protocols are
  engine-global, statement re-runs replace them (host redeclaration throws), and
  conformance is monotone: a declared-but-unimplemented conformance warns at the
  end of each batch until fulfilled. Protocol names are not types — using one in
  type position steers you to a constrained type variable. A second
  implementation block for the same (type, protocol) pair within one batch is a
  `protocol-implementation-duplicate` error; the same statement re-run in a
  later batch still replaces (the notebook pattern).

- **Sum-type declaration sugar.** One statement declares a tagged sum — the
  variants and the union together:

  ```epsil
  type TrafficLight = red | green | yellow
  type node = lit(num: number) | plus(op1: node, op2: node) | times(op1: node, op2: node)
  type tree<T> = leaf | node(value: T, children: list<tree<T>>)
  ```

  This is exactly N nominal variant declarations plus one transparent
  `type alias` union. The sum's own name is usable in variant payloads without a
  `type` forward-reference marker, a generic sum distributes its type parameters
  to each variant by usage, and a variant name colliding with an existing type,
  a reserved word, or a builtin rejects the whole declaration atomically.
  Existing spellings are unchanged: `type X = A | B` over known types stays the
  opaque nominal, `type alias X = A | B` stays the transparent union.

#### Epsil: compilation

- **Protocol dispatch compiles to JavaScript.** Bare (`compare(x, y)`),
  qualified (`Comparable.compare(x, y)`) and property GET/SET (`p.name`,
  `p.name = v`) calls all compile: a statically resolved call becomes a direct
  call, a dynamic one a most-specific-first guard chain on the receiver. A
  receiver no conformance covers throws `protocol-implementation-missing` at
  runtime (the interpreter yields the corresponding error value). Anything
  unprovable — conditional conformances, host implementations, ambiguity-capable
  conformance sets — declines compilation and falls back to the interpreter;
  Python and GPU targets keep failing closed.

- **Sum types compile to JavaScript.** For sugar-declared sums, `match`
  constructor patterns and variant constructors now compile (they previously
  failed closed). Per sum, the compiler picks a representation: when every
  variant has a distinct JavaScript shape
  (`jnull | jbool(boolean) | jnum(number) | jstr(string) | jarr(list<…>)`)
  values stay erased and dispatch uses `typeof`/`Array.isArray`; otherwise
  values carry their tag. Tagged values do not cross the compiled↔engine
  boundary (a unit whose _result_ is a tagged sum declines); Python, GPU and
  interval targets keep failing closed.

#### Epsil: tooling

- **Calls to a function your program defines are now checked statically.**
  `epsil check` (and the VS Code extension) reported wrong calls to library
  functions but let wrong calls to your own functions through — so
  `function foo(x: string, n: integer) { x }` followed by `foo("hello")` checked
  clean and only failed at run time. Wrong arity, wrong argument type and extra
  arguments are now all reported before anything runs, with the signature note
  and the definition site. Multi-clause definitions accumulate clause by clause,
  and a definition inside a block stays scoped to that block. A _generic_
  definition (`function id<T>(x: T) -> T`) is still checked only when it runs.

- **Signature errors explain the signature.** A call that does not match its
  callee used to report only what went wrong ("a required argument is missing").
  The report now carries the callee's signature and the faulted position, plus a
  second annotated block pointing at the definition when the program defines it:

  ```
  error: Runtime error: a required argument is missing
   --> example.epsil:3:1
    |
  3 | foo("hello")
    | ^^^^^^^^^^^^
    = note: `foo` has signature `(x: string, n: integer) -> string`; argument 2
            (`n: integer`) was not supplied

  note: `foo` is defined here
   --> example.epsil:1:10
    |
  1 | function foo(x: string, n: integer) { x }
    |          ^^^
    = note: `epsil doc missing` explains this error
  ```

  The same notes reach `epsil check`, the REPL, and — machine-readable, with the
  definition's location — `--diagnostics json` and `check --json`, where a
  diagnostic may now carry a `notes` array. In the VS Code extension the
  signature appears in the diagnostic's hover, and a note pointing at a second
  place in the file is published as related information.

- **The VS Code extension answers hovers.** Hovering a library name shows its
  signature (or, for a symbol, its type and value) with its description — the
  same entry `epsil doc <name>` prints, so the editor and the CLI cannot drift.
  Hovering a name the file itself declares shows that declaration as written: a
  function's header without its body, a `let`/`const`'s statement. A name inside
  a string or a comment is not a hover target.

#### Collections

- **`isEnumerableCollection` now answers for arithmetic broadcasts.** A
  broadcast node (`x + [1,2]`, `Sin(1..99)`) used to answer `undefined` for the
  whole class; it now answers from its participants: `true` when they agree on a
  length, evaluation is draw-free, and every collection-typed participant is
  itself enumerable; `false` when a participant is definitively unwalkable —
  including an application of an _unbound_ head (`x + Total([1,2])` with `Total`
  undeclared); `undefined` when participant lengths disagree or an impure
  participant (`RandomShuffle(xs) + 1`) makes per-index coherence unpromisable.
  `true` is a delivery promise: `each()` and `at()` will serve the elements.

- **`at()` now works on impure broadcasts whose randomness is confined to a
  lifted scalar.** `([1,2] + RandomInteger(1,10)).at(1)` answered `undefined`;
  since such a broadcast distributes structurally without consuming randomness,
  `at()` now serves the same unevaluated element `each()` yields
  (`1 + RandomInteger(1,10)`), at any nesting depth. An impure _participant_
  (`RandomShuffle(xs) + 1`) still declines, since per-index reads could mix draw
  sets.

- **Operators can declare an `elementCount` handler** (companion to
  `canEnumerate`) to report their length without evaluating.

### Resolved Issues

#### Epsil

- **A static diagnostic no longer underlines a whole function definition.**
  `epsil check` and the VS Code extension anchored every canonicalization-time
  error on the enclosing _statement_, so one wrong argument four lines inside a
  definition flagged the entire definition. `IndexOf(digits, cs[i], 23)` now
  underlines the `23`, and the message quotes the failing call. An ambiguous
  match (two `IndexOf` calls in one statement) still falls back to the
  statement.

- **A statement that evaluates to an error now stops the enclosing block or
  loop.** A non-final statement's value was discarded — including a refusal that
  _is_ the statement's value, such as a mistyped write or a rejected indexed
  assignment — so execution continued past the fault. An `Error` result now
  propagates like `Return`: it becomes the block's value, and a loop stops
  iterating and surfaces it.

- **A protocol-property write in a loop body no longer silently no-ops.**
  `p.name = 10 * i` was refused because the _unevaluated_ right-hand side types
  wider than the property's declared type; the check now runs on the evaluated
  value. Genuinely mistyped writes are still refused.

- **A loop index over an integer range is now integer-typed.** The index of
  `for i in 1..3` was bound as `number`, so `10 * i` typed `finite_number` and
  tripped integer-typed checks. The binding is now typed from the collection's
  element type (`Range(1, 3)` → `integer`, a float list → `real`), including
  through a type alias (`type ints = list<integer>`).

- **A fully-known argument now always dispatches a multi-clause function.** With
  clauses `a(t: integer)` and `a(t: real)`, `a(0.3)` stayed inert under
  `evaluate()` while compiled code correctly selected the `real` clause — two
  different answers for one input. Concrete values are now tested against each
  clause for both admission and refutation, so interpreted and compiled dispatch
  agree. Symbolic arguments keep their deliberate inertness.

- **A cyclic type alias no longer overflows the stack.** A non-progressing
  structural alias cycle (`type a = a | 0`) crashed with `RangeError` when a
  concrete value was tested against it, from multi-clause dispatch and from
  `typeAcceptsValue`. Genuinely recursive values against recursive aliases still
  admit; a non-progressing back edge now answers definitively.

#### Compilation

- **A function declaration contradicted by its own body no longer compiles to
  wrong results.** With `a` declared `(number) -> number` but assigned a
  list-valued body (`a := t ↦ [cos t, sin t]`), compiled code trusted the
  declaration wherever the result was consumed as a scalar: `Σᵢ a(h(i))` and
  `a(u) + 1` returned strings, `2·a(u)` and `sin(a(u))` returned `NaN`,
  comparisons returned a wrong boolean, `If` took the wrong branch — all behind
  `success: true` — and the GPU targets emitted shader source that does not
  compile. When the body provably constructs a collection while the declared
  result type says scalar, compilation now fails closed with a message naming
  both sides of the contradiction, and the interpreter answers instead.
  Deliberately unchanged: a bare `a(u)` on JavaScript still compiles (it returns
  the correct array today), open declarations (`-> unknown`) keep compiling
  element-wise, and `boolean` / `broadcastable<T>` big-op bodies are untouched.

- **A `Sum`/`Product` whose body applies a list-valued user function now
  compiles correctly.** With `a(t) ≔ [cos t, sin t]` under an open
  `(unknown) -> unknown` signature, `Σ_i a(h(i))` compiled `success: true` and
  returned a JavaScript _string_. It now compiles to the element-wise broadcast
  fold and returns the correct array. On the non-JavaScript targets the same
  shape emitted shader source that does not even compile; GLSL, WGSL, Python and
  interval now fail closed with an actionable message.

- **A block-local introduced by bare assignment now compiles correctly.** A
  multi-statement body binding a local with a plain assignment —
  `t ↦ (w ≔ 2t; w + 1)` — compiled behind `success: true` but ran to `NaN` (on
  GLSL the local was simply undeclared). Compiled results now match the
  interpreter.

- **Compiled writes to an outer binding now reach the same place reads look.** A
  block assigning a name the enclosing scope already binds — including the
  library-predeclared single letters `e`, `i`, `m`, `s` — wrote a stray global
  and read `undefined`: `(s ≔ 0; s + 1)` compiled to `NaN` where the interpreter
  answers 1, and a function body accumulating into `s` through a loop returned
  `undefined` behind `success: true`. Where reads bake a folded value or a
  constant, so no coherent write target exists, compilation declines.

- **Complex-valued locals compile correctly.** A loop-body local bound to a
  complex value miscompiled on JavaScript (`NaN` behind `success: true`; the
  interpreter answered `3√10`), and a GPU function whose body merely _contained_
  a complex local while returning a real produced invalid shader source. Loop
  bodies now share the block compiler's complex inference, and the GPU return
  type is derived from the body's value rather than from interior locals.

- **The expression-only compilation routes now fail closed on statement
  bodies.** `compileToSource()` (GPU and Python) and `compileShader()` promise a
  single expression, but a statement block escaped into them —
  `compileToSource(Block(s ≔ x; Return s))` returned `"s = x\nreturn return s"`
  — behind a successful return. Both now throw, naming the expression-only
  contract and pointing statement bodies at the statement-capable sibling
  (`compile()` on GPU, `compileFunction()` on Python). Also gated per language
  semantics: an assignment body on WGSL and Python (still allowed on GLSL, where
  assignment is an expression), and a bare declaration body, which additionally
  dropped its initializer silently. The function-emission siblings decline the
  same shapes: Python `compileFunction` no longer emits
  `def f(x): return s = x`, and `compileLambda` catches single-line statement
  bodies. Expression bodies are byte-identical on every route.

- **A `Return` in a GPU function body now emits valid source or declines.** A
  final-statement `Return` emitted `return return …` and a `Return` inside a
  conditional emitted `return` in expression position — neither is GLSL or WGSL
  — both behind `success: true`. Two gates now hold: a shape gate (a `Return`
  whose value shape disagrees with the function's signature declines, naming
  both shapes) and a placement scan on the finished body. Early `Return`s of
  matching shape in plain statement position compile unchanged, as does every
  JavaScript path.

- **Compiling an assignment to a non-variable target now fails closed.** A
  sequence definition (`L_0 := 5`) inside a compiled body emitted the silent
  no-op `_ = 5` behind `success: true` (and, in sloppy mode, wrote a stray
  global). Such an assignment now declines and falls back to the interpreter.

- **A nominal-typed argument no longer broadcasts at compiled call sites.** With
  `type bag = list<number>` and `function size(b: bag) -> number`, compiled
  `size(bag([1,2,3]))` answered `[42, 42, 42]` where the interpreter answers
  `42`. Nominal values are atomic, like tuples: the whole value binds. A
  `broadcastable<bag>` slot now also accepts a `bag` argument directly.

- **Typed locals now compile inside loop bodies.** A `let q: Person = …`
  declared in a loop body rides a different path than a block local, so a
  protocol property GET/SET on it failed to compile — and an ordinary
  named-tuple field read (`q.y`) on a typed local failed on every path. Both now
  resolve, nested chains (`q.inner.y`) included.

- **Contradiction gates hardened.** Multi-statement lambda bodies are judged by
  their final statement (a body ending in a list no longer slips past the
  declaration-contradiction gates), and `-> boolean` declarations over
  collection-constructing bodies now decline everywhere a condition or logical
  operand consumes them — an `If` no longer takes a branch off array truthiness.

#### LaTeX serialization and round-tripping

- **`Block` expressions now round-trip.** Four shapes changed value on a round
  trip and are fixed:

  - A single-statement block (`Block(s ≔ 2)`) serialized as bare `s\coloneq2`,
    which reparses as a plain assignment — the block-local leaked into the
    enclosing scope. It now serializes with a trailing semicolon
    (`s\coloneq2;`), and the parser no longer produces the vestigial `Nothing`
    statement a trailing `;` used to add.
  - A multi-statement block with no assignment (`Block(s+1, s+2)`) serialized as
    `s+1; s+2`, which reparses as a 2-tuple. It now serializes as a one-column
    `\begin{cases}…\end{cases}` (core amsmath), and such an environment parses
    back as a `Block`. Real piecewise (`Which`) always serializes two columns
    and is byte-identical.
  - A block of bare equations (`Block(x=1, y=2)`) collided with the
    system-of-equations reading and came back as a `List`; it now serializes as
    explicit `\operatorname{Block}(x=1, y=2)`.
  - A `Block` used as an argument — of any function call, a `Loop` body, or a
    comprehension body — emitted a bare `;`-statement list, which binds looser
    than the argument comma and the `for` clause, so the block swallowed what
    followed and the value changed. Block operands are now fenced.

- **A two-element list no longer turns into an interval — in any set-operator
  position.** `Element(i, List(1,2))` ("i ranges over the two-point list")
  serialized as `i\in\lbrack1, 2\rbrack`, which reparses as
  `Element(i, Interval(1,2))` ("i is any real between 1 and 2"). The same
  conversion fired on both operands of `Union`, `Intersection`, `SetMinus` and
  the `Subset`/`Superset` families, including nested. A 2-element-list operand
  is now spelled `\operatorname{List}(1, 2)` everywhere (membership, both sides
  of every set operator, and the big-op subscript), and the parser applies the
  interval reading only to operands actually written with brackets — an
  explicitly named `List` head is never overridden. Authored bracket spellings
  keep their interval meaning, including `\mathopen\lbrack a,b\mathclose\rbrack`
  and `\mleft…\mright`. Other list lengths are unchanged.

- **Miscellaneous parsing fixes.** An authored trailing `\mathrm{Nothing}`
  statement survives parsing, a nested `Block(Block(…))` operand no longer
  defeats the `cases`-environment fence, and `SymmetricDifference` reads and
  writes its operands with the same interval/list conventions as the other set
  operators.

#### Evaluation

- **`count` no longer invents a length for reshaping operators.** The broadcast
  count read participants' lengths without checking that the operator actually
  broadcasts, so `Chunk([1,2,3], 2).count` answered 3 (true count: 2), and a
  dozen other reshaping operators (`BinCounts`, `Histogram`, `Tally`, `Shape`,
  …) reported their operand's length. `Sort`, `Ordering` and `RandomShuffle` now
  report their source's length (with zero draws), `Chunk(xs, k)` reports `k` for
  a literal `k`, and operators whose length is not cheaply knowable answer
  `undefined` instead of a wrong number.

- **A parenthesized juxtaposition on a collection-valued symbol is a product
  regardless of the argument's type.** With `A` a list and `B` a list, `A(B)`
  and `A(t-B)` canonicalized to function _applications_ of a non-function —
  evaluating to `Error("incompatible-type", …)` — while `A(m)` with scalar `m`
  correctly multiplied. The decision now keys on the head: a head whose value is
  multiplicative (a number, matrix, list, collection, `broadcastable`, or
  numeric tuple) always reads as a product. Undeclared and function-typed heads
  still read as applications.

- **A non-multiplicative value head applied to a scalar is now an illegal
  application, not a product.** With `t := "hello"`, `t(2)` canonicalized to
  `Multiply` and the type error blamed multiplication; string-, set- and
  boolean-valued heads now take the application route, so the error blames the
  actual mistake.

- **A negated product no longer produces an unflattened `Multiply`.** `(b·-a)c`
  built a node whose `.json` serialized flat (ordered `abc`) while `isSame` and
  `hash` saw the nesting, violating the documented `isSame ⇒ equal hash`
  contract; a negated rational coefficient with a `Power` factor hit the same
  problem. `.json`, `isSame` and `hash` agree again.

- **A `PointList` body is now differentiated componentwise.** With a lambda
  stored as a symbol's value —
  `p := (t) \mapsto \operatorname{PointList}(\sin t, \cos t, t)` — `p'(0.25)`
  returned a sum of inert `Apply(Derivative("PointList", …), …)` terms, because
  the differentiator applied the generic chain rule to the `PointList` OPERATOR.
  It now differentiates each component and keeps the `PointList` head, so
  `p'(0.25)` is the point `(0.9689…, -0.2474…, 1)`, matching what the same curve
  already gave when defined as `g(t) \coloneq …`. This holds for components that
  are themselves lists (`PointList(t\cdot[1,2], t^2)`, which zips to a list of
  points): differentiation and the zip commute.

## 0.104.1 _2026-08-11_

### Issues Resolved

- **A compiled big op whose bound is a function parameter no longer folds
  against a same-named library constant** (Tycho item 176). Compiling a
  `Sum`/`Product` folds its bounds at compile time when both are constant, but
  that fold read the bound's value through the ENGINE symbol, ignoring that the
  name might be bound in the compilation context. A user function's parameter
  named after a library constant therefore produced silently wrong code behind
  `success: true`: in `F(i) = \sum_{m=1}^{i} m` the bound `i` resolved to the
  imaginary unit, whose real part is `0`, so `lower 1 > upper 0` read as an
  empty range and the entire body folded to the identity —
  `const _fn_F = (i) => 0`, against an interpreted `6`. A parameter named `e`
  picked up Euler's number and summed two terms (`3`). The same shape emitted
  `float _fn_F(float i) { return 0.0; }` on the GPU targets. A bound that
  mentions any compile-bound name — a function parameter, an enclosing binder's
  index, a broadcast element — is now treated as symbolic and emitted as a loop
  over the parameter, matching the interpreter on every parameter name. This
  affected the javascript, GLSL, WGSL and interval-js targets; Python was
  already immune. A bound naming a constant that is NOT shadowed still folds as
  before.

- **The derivative of a tuple-valued function differentiates componentwise**
  (Tycho item 174). A `Tuple` is a container, not a function of its elements,
  but it had no case in the differentiation rules, so it fell through to the
  generic chain rule and differentiated the `Tuple` **operator**: with
  `g(t) = (\cos 2\pi t, \sin 2\pi t, t)`, both `g'(t)` and `D(g(t), t)` left
  inert `Apply(Derivative("Tuple", 0, 1, 0), …)` nodes. `Tuple` now takes the
  same elementwise branch `List` already had, preserving the container head and
  nesting — `d/dt (fₓ, f_y, f_z) = (fₓ', f_y', f_z')`, so `g'(0.25)` is
  `(-2\pi, 0, 1)`. This closes the Frenet-frame idiom (`F_0 = f'/|f'|`,
  `F_1 = F_0'/|F_0'|`), which never closed before because `f'` stayed inert.
  Unregistered heads are unaffected: `Point` types `unknown`, so it stays an
  opaque application rather than acquiring invented componentwise semantics.

- **`Equal`/`NotEqual` against a list no longer overflows the stack when the
  other operand is opaque.** `ce.parse('A(t) = [t]').evaluate()` — one line on a
  bare engine — threw `RangeError: Maximum call stack size exceeded`, as did
  `q(2) = [1, 2]` with `q` declared `(number) -> unknown`. These operators
  broadcast element-wise only in the list-vs-scalar case, and that decision was
  taken twice with two different rules: before evaluation the engine skips
  broadcasting when two or more operands are collections **or
  possibly-collection typed**, then defers to the evaluate handler — which
  counted only actual collections. A top-typed application is
  possibly-collection typed and stays so after evaluation, so the handler kept
  rebuilding the identical node. The two rules now agree. Such a comparison also
  stays **inert** instead of answering `False`: an opaque operand may still be
  that collection, so a structural mismatch is not something the engine can
  claim.

- **`.count` no longer outruns `each()` on a broadcast over an unbound head.**
  An undeclared call binds vacuously and its result type lifts over a collection
  argument, so `Total([1, 2])` types `list<unknown^2>` and looked countable —
  but nothing produces those elements and the walk yields none. `count` answered
  2 for a collection that can never yield an element, and it propagated:
  `x + Total([1, 2])` counted 2 while walking 0. An unbound head now reports
  `undefined`, the same honesty `Add([1,2], [1,2,3])` already gets. Broadcasts
  over declared operators are unchanged.

- **`Quartiles` and `InterquartileRange` no longer throw on thin or symbolic
  data.** `Quartiles(2.5)` — a single inexact datum — threw a `TypeError`
  (median of an empty quartile half), as did any symbolic datum reaching the
  numeric path (`Quartiles(z)` for an unassigned `z`). The empty median is now
  NaN, matching the machine-float path, and symbolic data leaves both operators
  **inert** instead of baking a `(…, NaN, …)` tuple that a later assignment
  contradicts: `Quartiles([1, 2], z)` stays symbolic and answers `(1, 2, 3)`
  once `z := 3`. A NaN _literal_ datum still takes the documented absence path.

- **`ListFrom`/`SetFrom`/`TupleFrom` no longer wrap an unresolved collection
  operand as a scalar.** For a valueless `list`-typed symbol `xs`,
  `ListFrom(xs)` answered `["xs"]` — a one-element list containing the symbol —
  and `ListFrom(Divisors(n))` similarly wrapped the unevaluated producer. A
  collection-typed operand that is not a collection in the current state is
  unresolved, not a datum: the conversions now stay inert (and report
  `isEnumerableCollection: false` without evaluating). Genuine scalars still
  contribute themselves: `ListFrom(5, [1, 2])` is `[5, 1, 2]`.

- **`Dot`'s `isEnumerableCollection` no longer misreports a matrix product.**
  The result type of `Dot` is the wide `value`, which the facet read as "not a
  collection" even when `Dot(m1, m2)` evaluates to a matrix. `Dot` now answers
  per shape: a provably scalar inner product is `false`, a matrix-ish product is
  decided by its operands (`Quartiles` also gained a decline-only `canEnumerate`
  now that its symbolic case is inert).

- **Stacked restrictions no longer depend on the order they were written.**
  `When(When(e, c1), c2)` merges to `When(e, And(c1, c2))`, but the merged
  conjunction was built without going through canonical `And`, so it kept the
  authored operand order. Since `.json` serializes through the structural form,
  which DOES order a commutative operator's operands, the two spellings of one
  restriction set disagreed depending on which accessor you asked:
  `x\{|z|<5\}\{0<y\}` and `x\{0<y\}\{|z|<5\}` produced byte-identical MathJSON
  while `isSame()` answered `false` and their hashes differed, `.json` and
  `.toString()` of the SAME expression listed the conjuncts in opposite orders,
  and `ce.box(expr.json)` was not `isSame` to `expr`. Reported by Tycho as the
  11 `differs-json-equal` rows of the item-153 corpus seed.

- **Indexed wrappers over an eager collection producer no longer read it as
  empty** (design: `docs/plans/2026-08-11-eager-collection-enumerability.md`).
  An eager producer (`Divisors`, `Characters`, `Eigenvalues`, … — an operator
  whose collection exists only as its `evaluate()` result) could be walked
  through `each()` but not indexed through `at()`, so every wrapper that reads
  its source by index walked it as empty — wrong values on fully-ground input:
  `Filter(Take(Divisors(12), 3), _ > 1)` answered `[]` (now `[2, 3]`),
  `Any(Reverse(Divisors(12)), _ > 1)` answered `False` (now `True`), and
  `Sum(Take(Divisors(12), 3))` stayed inert (now `6`). `at()` now has the same
  materialize-on-demand fallback `each()` always had — pure sources only, and
  the evaluated form is computed once per instance, not once per index.

  With it, eager producers can now declare a `canEnumerate` handler — the
  decline test their `evaluate` handler already starts with — so
  `isEnumerableCollection` answers without evaluating: `Divisors(n)` for a free
  `n` reports `false` (wrappers over it stay inert instead of answering
  `[]`/`False`/`0`), `Divisors(12)` reports `true`, and an operator whose
  success is not cheaply decidable (`Solve`) stays `undefined` and resolves by
  evaluating, as before. Adopted in this release — 45 of the 73 eager producers:
  `Characters`, `GraphemeClusters`, `UnicodeScalars`, `Utf8`, `Utf16`,
  `StringSplit`, `Divisors`, `PrimeFactors`, `FactorInteger`, `IntegerDigits`,
  `Shape`, `Keys`, `Values`, `AbsArg`, `ComplexRoots`, `ExtendedGCD`,
  `PlusMinus`, and (decline-only) `Sort`, `Ordering`, `Unique`, `Tally`,
  `Eigenvalues`, `Eigenvectors`, `Eigen`, `SingularValues`, `SVD`,
  `LUDecomposition`, `QRDecomposition`, `Cross`, `MatrixMultiply`,
  `HadamardProduct`, `Flatten`, `Chunk`, `GroupBy`, `ListFrom`, `SetFrom`,
  `TupleFrom`, `DictionaryFrom`, `RecordFrom`, `BinCounts`, `Histogram`,
  `ContinuedFraction`, `RandomShuffle`, `RandomChoice`, `RandomSample` (the
  impure trio answers from its domain operand's facets alone — consulting the
  predicate consumes no random draws). The rest are deliberate skips:
  solver-class operators stay in the `undefined` tier by design, and a handful
  (`Pair`, `Vector`, `Tail`, …) never exist as canonical leaves at all.

- **A type alias naming a union of nominal types now confers membership**, so a
  sum type is usable through its own name. Given

  ```epsil
  type lit = tuple<num: number>
  type plus = tuple<op1: type expr, op2: type expr>
  type alias expr = lit | plus
  ```

  every declaration was accepted and then every _use_ failed: `lit <: expr`
  answered false, so passing a `lit` where an `expr` was expected was an
  `incompatible-type` error. Recursive shapes failed at the first nested
  construction — `total(node(1, [node(2, [])]))` reported
  `expected list<tree<finite_integer>>, got list<node<finite_integer>^1>` even
  though `node<integer> <: tree<integer>` held when asked directly.

  Three defects in the unfolding of a structural alias standing on the RIGHT of
  a subtype check: `isSubtype` short-circuited to a name comparison whenever
  both sides were references, so a reference on the left never reached the
  unfold at all (which is why the relation was asymmetric — `expr <: lit` held
  while `lit <: expr` did not); an applied reference SNAPSHOTTED its `alias`
  flag while delegating `def` to the declaration record, so a forward reference
  captured inside a variant's payload kept the placeholder's `alias: false`
  after a `type alias` fulfilled it; and the unfold compared against the alias's
  open body without substituting the application's arguments, so
  `node<integer> <: tree<integer>` asked `node<integer> <: leaf | node<T>` and
  failed on the type variable.

  Nominal opacity is unchanged: `type X = A | B` still declares a new opaque
  type that neither `A` nor `B` inhabits — only `type alias X = A | B` is a sum.

- **A type whose body is `nothing` now has a nullary constructor**, so a
  payload-free variant can be built. `type leaf = nothing` minted
  `(nothing) -> leaf`, which no call could satisfy: `nothing` is the unit type
  and its sole inhabitant `Nothing` elides as an operand, so `leaf()` was a
  missing argument and `leaf(Nothing)` collapsed to the same call. The
  constructor is now `() -> leaf`, the shape an empty tuple body
  (`type unit = tuple<>`) already had.

- **A ground union arm binds its type variables to `never` even when the union
  is reached through an alias.** Rule U gives an operand accepted by a ground
  arm no say over the variable, so it contributes `never` and a constraining
  operand wins outright — but the rule lives in the solver's union case, which a
  parameter still spelled as a forward-reference alias never reached. The union
  was hidden behind the reference, no arm contributed, and the variable fell
  through to the `unknown` default: `plus(lit(5), lit(2))` typed `plus<unknown>`
  and was then rejected by an `expr<number>` parameter, where `plus<never>` is
  accepted.

## 0.104.0 _2026-08-11_

### Breaking Changes

- **Types are now engine-global; `type` statements are top-level only.** Type
  declarations (and the value constructors they mint) now live in one
  engine-level registry rather than the lexical scope chain: a declared type
  name means the same thing everywhere on the engine, for the engine's lifetime,
  and a duplicate name is an error. Consequently a `type` statement inside a
  `do` block, function body, `if` branch or loop body is now a hard error —
  `type-declaration-not-top-level` at parse time in Epsil, an
  `invalid-type-declaration` error value on the MathJSON `["DeclareType"]` route
  — instead of declaring a block-local type; there is no hoisting, and the
  former `type-shadow` warning is gone (shadowing is impossible). The top-level
  statement-replace flow (re-running an edited notebook cell) is unchanged. This
  closes the class of bugs where a value of a block-local nominal type escaped
  its block and re-bound to a different same-named type (or typed as `unknown`),
  makes any serialize→reparse of a type sound anywhere in the engine, and is the
  prerequisite for protocols. Host note: `ce.declareType()` under a pushed scope
  now targets the engine registry — `popScope()` no longer removes a type. See
  `docs/plans/2026-08-10-global-type-registry.md`.

### New Features

- **Annotation-bound parameters in Epsil typed declarations** (the "lambda
  lift"). A parameter name now binds wherever it appears: when a declaration's
  annotation is a literal function type with named parameters and the
  initializer is not a lambda, the annotation's names become the parameters of
  an automatically built lambda — `const f : (x: number) -> number = x^2 + 2x - 1`now means`= (x) |-> x^2 + 2x + 1`. When the initializer is an explicit lambda, the two parameter lists must agree positionally; a disagreement is the new `parameter-name-mismatch`diagnostic, with a fixit that renames the annotation to the lambda's names. Alias annotations stay opaque (names bind only where they are written), only the outermost arrow of a nested signature lifts, and zero-parameter, generic, effectful, optional/variadic, and partially named signatures never lift. See`docs/plans/2026-08-08-annotation-lambda-lift.md`.

- **The `->`-for-`|->` typo is now diagnosed and recovered in Epsil.** A
  `KeyValuePair` arrow whose left side is shaped like a parameter list — a typed
  parameter (`(x: number) -> x^2`), a parameter tuple (`(x, y) -> x + y`), an
  empty `()`, or a bare symbol right after `(` or `=` (`f = x -> x + 1`) — is a
  function written with the wrong arrow: none of those shapes is a valid
  dictionary key. The parser reports the new `mapsto-arrow-expected` diagnostic
  with a fixit on the arrow and recovers as the intended lambda, so the program
  still runs. It also no longer emits a spurious `unexpected-symbol ":"` for
  typed parameters before a `->`. Legitimate dictionary spellings (`{one -> 1}`,
  `"a" -> 1`, `{->}`) are untouched.

### Issues Resolved

- **`D` no longer swallows what follows it when serialized** (Tycho item 166).
  The Leibniz spelling put the differentiand undelimited and trailing the
  fraction, where the parser binds it greedily — so any `D` with a right
  neighbour re-read as a different expression:
  `["Add", ["D", ["Subtract","x","d_t"], "y"], 1]` serialized to
  `\frac{\mathrm{d}}{\mathrm{d}y}x-d_{t}+1` and re-parsed as
  `D(x - d_t + 1, y)`. The isolated case round-tripped only because that greed
  happened to re-absorb exactly what it emitted.

  Delimiting the body is not sufficient — the differentiand is parsed at
  addition precedence, so the parser consumes past a closing delimiter and
  `\frac{d}{dy}(x-d_t)+1` still re-read as `D((x-d_t)+1, y)`. A COMPOUND
  differentiand now folds into the numerator instead
  (`\frac{\mathrm{d}(x-d_t)}{\mathrm{d}y}`), a spelling the parser already
  accepts at every order and which is self-delimiting by construction.

  The parser's greed is deliberately unchanged, so documents relying on the
  current trailing binding are unaffected: a TIGHT differentiand (a symbol, a
  number, a function application, a power) serializes exactly as before.

- **`.count` answers for an un-evaluated arithmetic broadcast** (Tycho item
  167). `[1,2,3]+1` reported no count even though its type says
  `vector<finite_integer^3>`, and `2(1..99)/99-1` reported none even though the
  `Range` inside it reports 99 — because the broadcasting arithmetic operators
  carry no collection handlers (broadcasting is a property of how they evaluate,
  not a collection operator), so `count` had nothing to delegate to. A caller
  wanting to prove finiteness BEFORE deciding whether to evaluate then had no
  way to do so short of the eager walk it was trying to avoid.

  `count` now reads the operands when no count handler is declared. That is
  exact because the length rule for a lifted operator is agreement, not
  zip-to-shortest (`docs/BROADCAST-MODEL.md`): a scalar operand is a lift and
  never participates, and participants of differing lengths are
  `incompatible-dimensions` rather than a shorter result — so mismatched or
  unknown-length participants report `undefined` rather than a guess. A declared
  `count` handler still owns its own answer, and
  `isCollection`/`isFiniteCollection` are deliberately unchanged: this answers
  the length question only.

- **`toLatex()` and `.latex` are total: formatting no longer throws** (Tycho
  item 168). Serializing a lazy collection materializes it first, and
  materialization EVALUATES — so a comprehension over an unresolvable binding
  raised `Condition must evaluate to "True" or "False"` out of a _formatting_
  call, taking down whatever asked for it. An unresolvable binding is not a
  formatting error: the tree is perfectly printable, and prints identically when
  nothing is bound at all. The materialization is now guarded and falls through
  to that symbolic spelling. Successful output is unchanged — the guard only
  covers what previously threw.

  A `CancellationError` still propagates: deadlines are installed only by an
  enclosing `ce.withTimeLimit()` span, and a caller who set a budget must see it
  expire rather than receive a silently degraded spelling.

  Callers who want the un-materialized form **by contract** rather than by
  fallback should pass `toLatex({ materialization: false })`, which never
  evaluates. That is the supported opt-out and predates this fix.

- **A `broadcastable<T>` parameter now admits exactly what `T` admits** (Tycho
  item 157(4), generalized). The filed case — `(broadcastable<value>)` accepting
  a function-typed argument that `(value)` rejects — was one instance of a
  wholesale hole: `(broadcastable<number>)` also accepted a `string` and a
  `boolean`.

  Neither the admission path nor `isSubtype` was at fault; both were already
  correct (`isSubtype(function, broadcastable<value>)` is `false`). The gap was
  in `provablyDisjoint`: a `broadcastable<T>` spans two category buckets (`T`
  and `indexed_collection<T>`), so the category test found no bucket and fell
  through to the conservative "may overlap". That is safe for the predicate in
  isolation, but argument checking only KEEPS a type error when every candidate
  parameter is provably disjoint from the operand — an un-rejection that exists
  so a bare symbol with a provisional type is not eagerly refused. A parameter
  kind that is never provably disjoint therefore admitted every operand with a
  free variable. `provablyDisjoint` now distributes over `broadcastable<T>`
  exactly as over a union, using the same `T | indexed_collection<T>` expansion
  `isSubtype` uses.

  What `broadcastable` is for is unaffected: scalar and collection arguments are
  admitted as before, and `broadcastable<value>` still accepts `string` and
  `boolean` because `value` does.

- **`Divide` no longer drops the tuple type of a `PointList` numerator** (Tycho
  item 165). `canonicalDivide` scales a `tuple / scalar` component-wise only
  when the numerator's components are ACCESSIBLE — a `Tuple`/`Pair`/`Triple`/
  `Single` head. Any other tuple-TYPED numerator, notably the `PointList` head
  importers emit, stays an inert `Divide`, and the type handler had no tuple
  branch, so that inert form collapsed to `number`. `PointList(x, y) / n` typed
  `number` while `PointList(x, y) · n` and `(x, y) / n` both kept the tuple —
  `Divide` was the sole outlier among the arithmetic operators (`Multiply`,
  `Add`, `Subtract` and `Negate` were already correct).

  The collapse cascaded: a list of such quotients typed `vector<n>` — a list of
  NUMBERS — so `PointX`/`PointY` over it took the element-INDEX reading instead
  of the elementwise one, and a mixed `p + p/n` failed outright with
  `incompatible-type`. Downstream, a consumer proving collection-ness by type
  saw a scalar and failed closed, so dependent rows never registered and a plot
  silently drew nothing (while getting faster, because the work was skipped).

  The fix mirrors the `Multiply` handler, which also stays inert on this input
  yet reports the tuple type. It is **type-only**: no canonical form changes, so
  the `PointList` head — which carries a consumer compile contract — is
  preserved, and the accessor narrowing that surfaced the bug is untouched
  (`PointX` over a genuinely flat numeric list remains the element-index read).

### Improvements

- **Declared-type mismatches on `let`/`const` are now caught statically.** The
  Epsil static pass (`epsil check`, editor diagnostics, `executeEpsil`'s pre-run
  check) never evaluates, and the declared-type check lived only in `Declare`'s
  evaluate path — so `let s: string = 42` produced no diagnostic until the
  program ran, and none at all in the editor. The pass now checks each annotated
  declaration's initializer against its annotation without evaluating, reporting
  only **provable** mismatches so there are no false positives: disjoint types
  (`let s: string = 42`, and the unnamed-signature near-miss
  `const f : (number) -> number = x^2 + 1`, which carries the same explanation
  as the runtime error), plus closed literals that fail the full covariant check
  (`let n: integer = 1.5`). Unknown-typed initializers, overlapping types, and
  cross-statement bindings remain the run phase's job — incomplete rather than
  unsound.

- **The declared-function-type near-miss now explains itself.**
  `const f : (number) -> number = x^2 + 1` used to fail with a bare
  `incompatible-type (expected "(number) -> number", got "finite_number")` —
  cryptic enough that readers mentally auto-insert the missing parameter name
  and cannot spot the mistake. When a declared type is a function signature and
  the initializer is not a function, the error (on both the host
  `ce.declare`/`ce.assign` throw and the `Assign`/`Declare` error-value routes)
  now spells out the near-miss: a signature's parameters bind only when they are
  named, so nothing in `(number) -> number` binds and `x^2 + 1` is an expression
  in the unknown `x`, not a function of `x` — and names the exact rewrite when
  the initializer's unknowns pair off with the unnamed parameters
  (`"(x: number) -> number"`, or `"(x) |-> x^2 + 1"`).

- **New `expr.isEnumerableCollection`: telling an empty collection from one that
  cannot be walked.** `each()` yields nothing for two unrelated reasons — the
  collection is empty, or its elements have no computable value (`Range(a, b)`
  over free variables, `Linspace(a, 1, 3)`, `Repeat(3, n)`, a
  declared-but-unassigned symbol, or any wrapper over one of those). The walk
  alone cannot tell them apart, and the facets that could (`count`,
  `isEmptyCollection`) are `undefined` in both cases, so the library decided by
  EVALUATING the source. The new predicate answers structurally, without
  evaluating: `true` (an empty walk means empty), `false` (an empty walk means
  nothing), or `undefined` for the one undecidable case — an eager collection
  operator such as `Characters(s)`, which has no collection handlers until it is
  evaluated. Custom collection operators declare it with the optional
  `isEnumerable` collection handler; a wrapper propagates it from its source
  (default: `true`).

  This closes a family of wrong answers over wrapped unknown sources: for a
  valueless `xs`, `Filter(Take(xs, 2), p)` answered `[]`, `Any(Reverse(xs), p)`
  `False`, `CountIf(Take(xs, 2), p)` `0`, `Position(Take(xs, 2), p)` `[]`,
  `Ordering(Take(xs, 2))` `[]`, `Count(Take(xs, 2), 3)` `0`, and
  `Length(Filter(Take(xs, 2), p))` `0` — answers a later `xs := [1, 5]`
  contradicts. All of them now stay inert, as `Length`, `Total`, `Sort` and
  `Map` always did over the same source spelled directly. The same applies to a
  symbolic-bound source: `Filter(Range(a, b), p)` no longer reports itself
  empty, and the multi-source `Map` now consults every source rather than only
  the first.

  One shape is knowingly left: an _eager_ collection leaf under a wrapper
  (`Filter(Take(Characters(s), 2), p)` for a valueless `s`) still reads as
  empty, because an eager operator has no collection handlers to answer from and
  the wrapper's evaluated form is still a wrapper. Tracked in `ROADMAP.md`; the
  fix is to give those operators lazy collection handlers.

- **Engine construction is ~3× faster, and the gradual registration accretion is
  recovered** (ROADMAP P-BOX, residual half). Every `new ComputeEngine()`
  re-parsed the standard library's type strings from scratch — 1,953
  `parseType()` calls per construction, all resolver-aware and therefore
  ineligible for the resolver-less memo cache, despite only ~308 distinct
  strings. As the library grew each release, construction and fresh-engine
  registration accreted a few percent per release. `parseType()` now uses
  two-step resolution: the cached resolver-less parse runs first — sound because
  a user type name can never shadow built-in type syntax — and only strings that
  actually name a user-declared type (or use the `type X` forward-reference
  spelling, which the parser now tracks via `sawForwardRef`, since it parses
  resolver-less into an unresolved placeholder and registers a forward reference
  as a resolver side effect) fall through to the uncached resolver-aware parse.
  Full parses per construction drop from 1,953 to 343 on the first engine and 48
  on subsequent ones; a 120-function registration drops from 2,278 to 0.
  Construction: ~2.7 ms vs 7.6–8.2 ms for all published 0.10x versions;
  re-registration is now at or below the 0.100.1 baseline.

## 0.103.3 _2026-08-10_

### Issues Resolved

- **Indexed-then-accessed chains compose again** (Tycho item 164): the 0.103.2
  narrowing of `PointX`/`PointY`/`PointZ` to `(collection | tuple) -> any`
  rejected `At`'s optional result — an in-range unprovable access types
  `missing | tuple<…>`, so every `S[n].x` chain errored `incompatible-type` at
  canonicalization. The accessors (and `First`/`Second`/`Third`/`Last` and
  `Distance`, which had the same composition failure) now declare a
  `missingBehavior`, admitting the `missing` arm through strip-before-validate
  (§3.B of the missing-value design) while keeping the narrowed parameter
  evidence. At run time an absent point's coordinate is `NaN` (numeric-slot
  marker), an absent element access propagates `Missing` (mirroring `At`), and
  `Distance` of an absent point is `NaN`.

### Improvements

- **Wildcard dimensions no longer display as negative lengths**: a list type
  with open (sentinel `-1`) dimensions and a non-numeric element printed as
  `list<T^(-1x-1)>`, which neither parses back nor means anything. The
  serializer now expresses open rank by nesting (`list<list<T>>`,
  `list<list<T>^2>` for a bounded outer dimension), which round-trips.

- **Deadline cancellations during canonicalization name their budget**: the
  `error canonicalizing` console line printed a bare `Timeout exceeded`,
  indistinguishable from an engine-imposed deadline (no such deadline exists —
  deadlines are only ever installed by an enclosing `ce.withTimeLimit()` span).
  The line now appends the expiring span's owner label and span chain (Tycho
  item 163).

- **The 0.103.0 per-box slowdown is fixed** (ROADMAP P-BOX): generic boxing had
  regressed ~1.25× in 0.103.0 through an interaction between the R-D5
  ground-display cache — which runs on every symbol `.type` read and is keyed on
  `BoxedType` identity — and type inference, which rewrote an already-inferred
  symbol's type with a freshly allocated `BoxedType` on every use, defeating
  that cache twice per boxing call and tripling GC pressure. Three changes, each
  independently useful:
  - primitive types bypass the display-projection cache entirely (a primitive
    carries no `callback<S>`, so the projection is the identity);
  - a re-inference that lands on the type already recorded no longer writes —
    which also stops the spurious per-use `_writeVersion` bump on value
    definitions and the engine-wide `_semanticVersion`/`_worldVersion` bumps on
    operator definitions;
  - `ce.type()` now interns primitive type names per engine, so
    `ce.type('number')` is identity-stable.

  The box-microloop canary in `benchmarks/effects-registration.ts` returns to
  its 0.102.0 baseline (0.0091 vs 0.0105–0.0108 ms/iter regressed).

## 0.103.2 _2026-08-10_

### Breaking Changes

- **The prose ellipsis no longer binds inside an inline `/`.** `1/2...5` is
  `Range(1/2, 5)`, where it was `Divide(1, Range(2, 5))`. Division was the one
  operator that captured the ellipsis into its right operand: `+`, `*`, `^`, the
  implicit product and `\frac` (a primary) all took the whole preceding element
  as the range anchor, so the SAME expression parsed two ways depending on how
  its division was spelled — `[1+\frac{8}{d}...5]` anchored on `1+8/d`, while
  `[1+8/d...5]` anchored on `d` alone and produced `1 + 8/Range(d, 5)`.
  `[1/2, 1/3...0]` was `[1/2, 1/Range(3, 0)]`.

  A PARENTHESIZED range still divides — `1/(2...5)` is unchanged, and pinned.
  That form was the stated reason the ellipsis sat above the `/` right-operand
  floor, but parentheses are not reachable by precedence, so the constraint cost
  the anchor without buying anything.

- **A two-sample range fuses over a SYMBOLIC first anchor.**
  `[1+\frac{4}{d}, 1+\frac{8}{d}...5]` with `d := 500` is a 500-element `Range`,
  where it was a 2-element `List` — the gate required the first anchor to be
  numerically KNOWN, so any anchor built from a document constant fell through.
  Nothing about the symbol's value is consulted (the parser cannot read one, and
  a value read there would be frozen into the document's parse): both anchors
  and the step are emitted as expressions, so re-assigning the constant
  re-evaluates the range.

  Two consequences for shapes that used to stay a placeholder `List`. A symbolic
  OFFSET is now a step — `[m+n, m+n+x, ..., m+n+60]` steps by `x`, matching the
  symbolic steps this pass has emitted over a numeric anchor since 0.100.0. And
  where the second anchor is the first with terms appended, the step is those
  terms rather than `s1 - s0`, so it reads `x` instead of `m - m + n - n + x`.

  What still stays a `List`: bare symbols (`[x_1, x_2, ..., x_n]`), a function
  application at ANY depth (`[f(1), f(2), ...]` and `[1+f(1), 1+f(2), ...]` —
  previously this fell out of the numeric reduction's recursion and is now a
  stated rule), and an anchor pair that is not one family, i.e. where the first
  anchor mentions a symbol the second does not (`[m+n, m+k+15, ..., m+n+60]`,
  whose "step" `k+15-n` is fabricated from two unrelated bases).

### Issues Resolved

- **A declared signature's PARAMETER types now reach the function it is assigned
  to.** Reconciliation ascribed a declaration's result onto the stored literal
  but dropped its parameters, so `declare L : (list<real>) -> list<real>` with
  `L(a) := a + 1` stored a literal typing `(unknown) -> list<real>` and the
  parameter fell back to usage inference, which read the body as scalar
  arithmetic. The two halves of a compiled call then disagreed: the call site
  consulted the DECLARED type and passed the list whole, while the emitted body
  was scalar code, so `L([3, 4])` ran `[3,4] + 1` and returned the **string**
  `"3,41"` behind `success: true` — including under `realOnly: true`, which
  promises a number. `L(a) := |a|` degraded to `NaN` the same way, making the
  declared spelling worse than the undeclared one.

  Two knock-on gains: `Length(a)`, `Map(a, …)` and `Sum(Map(a, …))` over a
  declared list parameter now compile on the JavaScript target, where they
  previously declined on every target; and a declared list parameter no longer
  needs the `vector<n>` spelling to compile at all.

  Scope is deliberately narrow. Only NON-SCALAR parameters are ascribed — that
  is precisely the disagreement, since only a parameter that binds its argument
  whole can be handed a value scalar-compiled code cannot read. A scalar
  parameter is left alone (ascribing one re-canonicalizes the body against a
  narrower type and changed how a tuple argument broadcasts), as is
  `broadcastable<T>`, which is a declaration contract with its own enforcement,
  and any parameter the author annotated or whose type mentions a quantified
  variable. The multi-clause route is unchanged: a clause is checked as an arm
  of the declared signature, and stamping the general parameter types onto it
  would make that check vacuous.

- **A function parameter passed to `PointX`/`PointY`/`PointZ` (or the `.x`/
  `.y`/`.z` spelling) now infers as non-scalar, so a list argument is applied
  instead of broadcast.** `g(a) := PointX(a)` answered `[g(3), g(4)]` for
  `g([3,4])` — per-element nonsense that compiled to `[null, null]` behind
  `success: true` — where it now answers `3`. Parameter evidence comes from the
  callee's declared parameter type, and these accessors declared `(any) -> any`,
  which contributes none; they now declare `(collection | tuple) -> any`. That
  is what they already accepted: a scalar or a string was rejected at run time
  before, so the rejection has only moved earlier, to canonicalization.
  `Distance` was narrowed the same way, and for the same reason, in 0.100.1.

  `Norm` is deliberately unchanged: `Norm(-5)` is `5`, so a signature excluding
  scalars would be false and its parameter stays unlifted.

- **A point accessor over a flat point compiles on the shader targets.**
  `PointX([3, 4])` declined with "a list of points has no GPU lowering" while
  `PointX((3, 4))` compiled to `vec2(3.0, 4.0).x` — the GPU lowering read every
  indexed collection as a list of points, so the flat `list<number>` spelling a
  data import produces could not reach a shader. A numeric list of width 2–4 IS
  a `vecN` there, so it now swizzles exactly like the tuple spelling, and gains
  that spelling's static arity check (`PointZ([1, 2])` is a typed error rather
  than a decline). A list too wide for a `vecN` lowers to an array and still
  declines, as does a genuine list of points, in either spelling.

- **A point accessor over a flat list types the scalar it returns.**
  `PointX([3, 4])` is the coordinate `3` but typed `vector<2>`: the result type
  read broadcast-vs-index off the static type alone, while evaluation peeks the
  first element to decide, so the two disagreed on every indexed collection of
  scalars. Values were already correct — the JS target's runtime shape dispatch
  absorbed the mismatch — but it emitted a needless broadcast wrapper, and a
  non-indexed source (a `Set` of points) had the mirror-image defect, typing an
  element access while returning a list.

- **An indexed `Sum`/`Product` no longer discards its indexing set when the body
  is a collection.** `\sum_{k=0}^{2}[k, 2]` canonicalized to
  `Reduce([k, 2], Add, 0)` and answered `k + 2` — the range gone and the bound
  index leaking out free. The collection-reduce rewrite is the meaning of the
  NO-INDEX form (`Sum([1, 2, 3])` is still `6`); with an indexing set the
  operator iterates and accumulates element-wise, so that expression is now
  `[3, 6]`, matching the list-valued CALL spelling (`\sum_{k=0}^{2}a(k)`), which
  always took the index loop. Compiled and interpreted results agree.

- **A `Sum`/`Product` body that cannot accumulate numerically now fails the
  compile instead of emitting a bare `+`.** `\sum_{i=0}^{2}\text{ab}` compiled
  to `("ab") + ("ab") + ("ab")` and ran to the string `"ababab"` behind
  `success: true` — including under `realOnly: true`, whose overload is typed to
  return a `number`. `Add`/`Multiply` reject such an operand at box time, but a
  big-op body stays raw, so nothing re-ran that check before the emitters saw
  it. Both lowerings (unrolled and looped), `Product`, and every target now
  decline. The decline needs positive evidence, so wide and `unknown` bodies are
  unaffected; `boolean` bodies keep compiling (the counting idiom
  `\sum_k (x_k > 0)`, where `+` over booleans is numerically faithful), as do
  `broadcastable<T>` bodies, which are routinely scalar at run time.

- **A `Range` step built over an assigned symbol no longer freezes its value.**
  `[2a, 3a...9a]` with `a := 2` canonicalized to `Range(2a, 9a, 2)` — the step
  folded to a literal while the bounds stayed symbolic. Re-assigning `a := 3`
  then produced an 11-element range of spacing 2 instead of the 8-element one of
  spacing 3: the start moved with `a` and the step did not, so the result was
  silently wrong rather than merely stale. `Range`'s canonical handler folds its
  step operand so a decimal progression stays exact (`1.016 - 1.008` must become
  `0.008`, not `0.008000000000000007`); it now folds only when every symbol in
  the step is a CONSTANT. `Pi/4` folds as before, and a step over a document
  variable stays unevaluated and re-reads its binding per use (`Range` has
  supported symbolic bounds and steps since 0.100.0).

- **A nested `Map` that closes over the enclosing lambda's parameter now
  substitutes it.** `Min(Map([1,2], k ↦ Max(Map([1,3], j ↦ j·k))))` evaluated to
  `Min(Max(k, 3k), Max(k, 3k))` — the inner map reduced, but `k` stayed free —
  where it is `3`; with a `+x` in the outer body the result went non-finite
  instead of `3+x`.

  The drain-time `Map` fusion bypasses `makeLambda` and evaluates the level
  itself, so it pushes a scope to resolve operands the lambda closed over. It
  pushed the mapping function's BODY scope; the chain those operands must
  resolve in starts one level OUT. Canonicalizing a nested literal auto-declares
  the free names of its body — including one the enclosing lambda binds — into
  that body scope, VALUELESS, so pushing it let the valueless shadow win over
  the binding that holds the value. The element then came back symbolic, and the
  outer application's binding-keyed substitution correctly declined to touch it,
  because it genuinely is a different binding. The drain now pushes the parent,
  read at drain time (a body scope is re-parented for the duration of each call,
  so a parent captured when the level was lowered would be a stale link into a
  frame that has since returned). The general route never had the bug:
  `makeLambda` pushes the call's fresh scope and reaches the closure chain
  through its parent, so a body scope is not in its lookup path for a
  non-parameter name either.

## 0.103.1 _2026-08-10_

### Breaking Changes

- **A point inner product is now typed as the sum it is, instead of a flat
  `number`.** `Dot((1, 2), (3, 4))` reports `finite_integer` — exactly what
  `1·3 + 2·4` reports — where it previously reported `number` for every provably
  numeric pair. The component types carry through: real components give
  `finite_real`, a complex one gives a complex result. The answer is taken from
  the arithmetic handlers rather than restated, so it cannot drift from the
  written-out form.

  The old claim was not merely loose. `number` includes complex, so a point
  inner product was rejected by every `real`-declared slot in the library:
  `Hypot(Dot(p, p), Dot(q, q))` — real by construction — reported
  `incompatible-type('real', 'number')`, as did `Degrees`, `Haversine` and
  `PrimePi` over the same operand. Those compose now, and a genuinely complex
  inner product is still refused there, loudly.

  Nothing else about `Dot` moves: an operand whose components cannot be read (a
  symbol declared `tuple<number, number>` or `vector<3>`) keeps the wide
  `number`; a tuple that is not provably a fixed numeric point keeps `value`
  (the rule against claiming a numeric result on retractable evidence); unequal
  fixed lengths still report `incompatible-dimensions`; and the matrix product
  is still `value`. Update any pin asserting the literal string `number` on a
  fixed numeric `Dot`.

- **A norm and a distance are now typed as the reals they are.** `Norm((3, 4))`,
  `Abs((3, 4))`, `Norm([3, 4])` and `Distance((0, 0), (3, 4))` report
  `finite_real` where they reported `number`, and `real` when a component's
  finiteness is not provable. A norm is `√(Σ|xᵢ|²)`, which is real whatever the
  components are — `‖(3+4i, 0)‖` is `5` — so the `number` claim (which admits
  complex) was refused by the same `real`-declared slots as the `Dot` claim
  above: `Hypot(‖p‖, ‖q‖)` did not typecheck.

  The demotions follow the convention `Abs` already uses for the same question
  one operand down: a _provably_ NaN component gives `number` (only a literal
  proves NaN, so a merely-unknown component does not demote), and so does a
  provably non-finite one. No narrower tier than `finite_real` is claimed —
  unlike `|·|` of a scalar, a norm does not preserve the integer or rational
  tier, since `‖(1, 1)‖` is `√2`.

  Unchanged: a point whose component carries a collection still reports
  `list<number>` (it zips into one norm per element), a list of points still
  broadcasts to `list<number>`, `Distance` over an undecidable operand still
  reports `number | list<number>`, and an operand with no readable components (a
  symbol declared `tuple<number, number>`, a matrix, whose elements are rows)
  keeps the wide `number`.

### Issues Resolved

- **A point whose component is itself an inner product now compiles on the GPU
  targets.** `Dot((Dot((x, y, z), (1, 2, 3)), 0), (1, 2))` — a 2-D point product
  one of whose components is a 3-D one, the shape a gradient-noise field has —
  emitted correct GLSL and was then rejected by the shape gate that had just
  produced it:
  `dot(vec2(dot(vec3(x, y, z), vec3(1.0, 2.0, 3.0)), 0.0), vec2(1.0, 2.0))`
  declined with "no room for the aggregate `vec3` value standing in each slot".
  The gate scanned a vector constructor's argument text for an aggregate
  constructor **anywhere** in it, so it could not tell a `vec3` standing in a
  slot from one consumed by an enclosing `dot()`. What stands in a slot is now
  judged after the scalar-reducing builtins (`dot`, `length`, `distance`,
  `determinant`, `any`, `all` — each returns a scalar whatever its argument
  shapes) are taken out of the source. The composition nests to any depth, works
  with the reduced component under arithmetic (`vec2(dot(…) + 1.0, 0.0)`), and
  holds on both GLSL and WGSL. An aggregate genuinely standing in a slot —
  `Hypot` over two point operands, emitting
  `length(vec2(vec2(x, y), vec2(1.0, 2.0)))` — still fails closed with the same
  diagnostic.

## 0.103.0 _2026-08-09_

### Breaking Changes

- **A collection operator whose source has no value now stays inert, instead of
  answering as if the source were empty.** `Filter` and `TakeWhile` answered an
  empty collection, `Find` answered `Nothing`, `IndexWhere` `0`, `Any` `False`
  and `All` `True` when handed a source they could not see into — a symbol
  declared but never assigned, an undeclared symbol, or an application of an
  unknown operator. Those answers were not conservative: with `xs` declared
  `list<integer>` and unassigned, `Any(xs, x ↦ x > 2)` answered `False`, and
  assigning `xs := [1, 5]` afterwards makes the same expression `True`. The walk
  that produced them cannot tell "this collection is empty" from "there was
  nothing here to walk". Every one of these now behaves the way `Length`,
  `Total`, `Sort`, `Map`, `CountIf` and `Position` always have on the same
  input, and answers normally as soon as the source has a value. A genuinely
  empty collection still gets the definite answer.

  This covers the source operand itself. A WRAPPER around a valueless source —
  `Filter(Take(xs, 2), p)`, `Any(Reverse(xs), p)` — still answers as if the
  collection were empty, because the wrapper does have collection handlers while
  its own walk yields nothing. That case is unchanged by this release and
  tracked in `ROADMAP.md`; it needs an O(1) propagating enumerability facet on
  the collection handlers.

- **A parameterless operand at a callback slot is now rejected across the whole
  collection family.** `Map(xs, 5)` answered `[5, 5, 5]` and `Any(xs, 5)`
  carried a constant thunk, while the identical `Sort(xs, 5)` and
  `CountIf(xs, 5)` reported `incompatible-type function/finite_integer`. The
  split was an artifact: the lazy operators routed their operand through the
  shorthand path, which LIFTS a value with no wildcard and no free unknown into
  the constant `() ↦ 5`, while the eager ones validated against the declared
  slot. All of them now report the declared slot's error — for a plain value, a
  string, and a symbol whose declared type is provably not a function
  (`Map(xs, k)` with `k := 5`). What a `function` slot admits is unchanged:
  named operators, `function`-typed symbols, wildcard shorthands (`Map(xs, _)`),
  free-unknown shorthands (`Map(xs, q + 1)`), an explicitly written nullary
  literal (`["Function", 42]`), and any symbol whose type is not yet known — the
  forward reference — all still pass. `Apply(3, 5)` is unaffected: it is not a
  callback slot, and applying a constant is its documented shorthand.

- **The Cortex language has been renamed Epsil.** The experimental scripting
  language previously called Cortex is now Epsil, and every public surface
  follows: the CLI binary is `epsil` (was `cortex`), the conventional source
  file extension is `.epsil` (was `.cortex` / `.cx`), the package subpath is
  `@cortex-js/compute-engine/epsil` (was `…/cortex`), and the API entry points
  are `parseEpsil()`, `serializeEpsil()` and `executeEpsil()` (with the
  corresponding `ExecuteEpsilOptions`/`ExecuteEpsilResult` types). The npm
  package name and `@cortex-js` scope are unchanged. There are no compatibility
  aliases: update imports and scripts to the new names. A `./cli` package export
  exposes the CLI entry point so the standalone `epsil` launcher package (and
  other tools) can forward to it.

- **The `structural: true` boolean is no longer part of `ce.function()`'s typed
  signature — use `{ form: 'structural' }`.** The `form` option has been the
  documented spelling for the creation modes since the structural tier was
  introduced, and `ce.expr()`, `ce.box()` and `ce.parse()` had already dropped
  the boolean from their public types; `ce.function()` was the last one still
  carrying it, which made the surface inconsistent and advertised a spelling the
  guide tells you not to use. The boolean is still accepted **at runtime** —
  `optionsToInternal()` maps `{ structural: true }` and `{ form: 'structural' }`
  to the identical internal form — so only code type-checked against
  `ComputeEngine`/`IComputeEngine` is affected, and the fix is a rename at the
  call site. `{ canonical: false }` (equivalently `{ form: 'raw' }`) is in the
  same position and was already untyped.

- **Cortex: `=` is now positional — it assigns only as a whole statement, and
  compares everywhere else.** `:=` always assigns and `==` always compares; a
  bare `=` means `Assign` when it is the top-level operator of a statement whose
  left side is a binding target (a name, or a field/index path rooted at one),
  and `Equal` in every other position. The canonical trap simply works:
  `Solve(x^2 = 4, x)` is the equation and returns `[2, -2]`, where it used to
  assign and report no solutions. So do `if a = true { … }`, `while x = 5 { }`
  and `[a = 1]`, each of which previously assigned **silently** — the C footgun
  no longer exists in Cortex.

  The decision is purely syntactic: it never depends on evaluating a value, on
  scope, or on which definitions are installed. As a comparison `=` binds at the
  relational tier, so `if x = 5 && y` groups as `(x = 5) && y`; as an assignment
  it binds loosest and takes the whole right-hand side.

  Two consequences. A statement whose left side is _not_ a binding target now
  compares — `x^2 = 4` on its own line is the equation, not an assignment to a
  power. And `a = b = 5` would assign `a` the boolean `b == 5`, which is never
  what a chained assignment means, so it reports `chained-assignment`; write
  `a := b := 5` to chain, or `a = (b = 5)` if the comparison was meant.

  `:=` is unconditional, so it still reaches a condition where a bare `=` no
  longer can. `if flag := true { … }` assigns and then uses the assigned value
  as the test — with no type error to catch it — so it now reports
  `assign-in-condition`, a **warning** (the spelling is deliberate). It fires
  only where a value is consumed as a boolean, not for `f(a := 1)`.

  The `assign-in-argument` diagnostic is **removed**: `f(x = 4)` is now an
  ordinary comparison, so there is nothing left to diagnose. Serialized output
  always uses the explicit `:=` and `==`, never a bare `=`, so a round-trip is
  exact regardless of position — which means the formatter rewrites an authored
  `=` to `:=` where it assigns.

### New Features

- **`Dot` accepts numeric `Tuple`/`PointList` operands.** `Dot((1, 2), (3, 4))`
  — and the equivalent `PointList` spelling — is now valid, typed `number`, and
  evaluates to the inner product, matching the already-supported `List` vectors;
  mixed `tuple · list` products work too. `Dot` is the sanctioned representation
  of a point inner product (`tuple · tuple` has no implicit product and remains
  an error), so the explicit operator now accepts the operands the implicit one
  rejects. Point operands lower to the native `dot()` builtin on the GLSL/WGSL
  compile targets (with the usual operand-shape fail-closed guards: matching
  widths, `vec2`–`vec4` only) and to `np.dot` on Python. Unequal fixed lengths
  report `incompatible-dimensions`; a tuple operand that is not provably a fixed
  numeric point (a symbolic point, a point list with a collection component)
  stays symbolic.

- **Inline callback lambdas now infer their parameter type from the call site.**
  An unannotated function literal passed directly as an argument is re-derived
  with its parameter typed, exactly as if you had annotated it by hand, in two
  situations: when the callee — user-defined functions included — declares a
  concrete function-typed parameter
  (`function apply2(f: (number) -> number, x) { f(x) }` types the `n` of
  `apply2(n |-> n + 1, 3)` as `number`), and when the callback of `Map` or
  `Filter` is applied to a collection whose element type is a provable
  **composite** (a tuple or a nested collection). The headline win: point-list
  predicates now compile without annotation —
  `Filter(points, pt |-> pt == (0, 0))` with
  `points: list<tuple<number, number>>` lowers to the same element-wise code as
  the hand-annotated spelling, and the literal's signature reflects the element
  type everywhere it is read.

  The inference is per-application and behaves exactly like a hand-written
  annotation, loud type errors included. It never touches a shared callback (a
  lambda bound to a name keeps its own typing at every call site), never
  overrides an explicit annotation, and does not fire for union element types of
  `Map`/`Filter` — heterogeneous "errors are values" programs keep their
  per-element behavior, and the vectorization default for evidence-free lambdas
  is unchanged. Optional and variadic callback positions are covered. The whole
  mechanism is driven by the callee's declared signature, and a generic function
  you declare yourself gets the same inference — provided the callback slot is
  spelled `callback<(T) -> …>` rather than as a plain generic arrow `(T) -> …`.
  The `callback<…>` spelling is what asks for the inference, and it is also the
  permissive one: the slot still admits any function, exactly as a bare
  `function` parameter does, and a callback that does not match is applied and
  judged per element as before. A plain generic arrow does neither — it declines
  the inference _and_ rejects a callback whose declared type does not fit the
  slot. A callback that combines several collections at once (`Map(xs, ys, f)`)
  is admitted and applied dynamically, as it always was, rather than annotated.

- **Annotated lambda parameters no longer disable the Map fast paths.** The
  Map-fusion and exact-compile gates previously required bare (unannotated)
  parameters, so the hand-annotated spelling of a mapping function paid an
  interpretation penalty. The gates now accept an annotated parameter whenever
  the source collection's element type provably satisfies the annotation — the
  per-element type check is a no-op in that case, so the fused drain is
  unobservable — and still fall back to the enforcing path (loud error included)
  when the annotation is narrower than the elements or the source type is
  unknown. With this, the element-type inference above extends to scalar element
  types too: `Map(Range(1, 200), x |-> Mod(x, 7))` infers `x: integer`, keeps
  fusion, and still compiles through the exact tier. A fused result is also
  re-validated when an inferred source type changes, so a collection that
  retracts to a wider element type raises the annotation error instead of
  reusing a stale fused pipeline.

  One consequence of the annotation contract to be aware of: an expression you
  _retain_ (a lazy `Map`/`Filter` you hold and re-evaluate) keeps the parameter
  type it inferred when it was created. If the source collection is later
  reassigned to elements of a wider type (an inferred `list<integer>` becomes
  floats), re-evaluating the retained expression reports a per-element
  `incompatible-type` error — exactly as the hand-annotated spelling would —
  rather than silently adapting. Boxing the expression afresh after the
  reassignment infers the new element type and evaluates normally.

- **JavaScript target: string equality now compiles.** Scalar `Equal`/`NotEqual`
  with a provably string participant — and no provably numeric one — lowers to a
  strict `===`/`!==`, the interpreter's own string semantics, instead of failing
  closed. All-string collection equality keeps the `_SYS.eq`/`_SYS.neq`
  dispatch, whose scalar leaf gained a string branch, so
  `Equal(["a","b"], ["a","b"])` is `True` and `Equal(["a","b"], "a")` is the
  element-wise `[True, False]`. A mixed provably-string/provably-number equality
  and the chained (n-ary) form still fail closed. The Python target mirrors the
  scalar rule with a structural `==`/`!=`. With this, character-scanner programs
  (`skipWs(cs, i) = skipWs(cs, i+1) if i <= Length(cs) && isWs(cs[i]) else i`
  over `Characters(text)`) compile end to end.

- **JavaScript target: `Characters`, `GraphemeClusters` and `StringJoin` now
  compile.** `Characters` segments UAX #29 grapheme clusters through the same
  `Intl.Segmenter` the interpreter uses, so a combining sequence, a ZWJ emoji or
  a flag is one element — matching interpretation element for element (neither
  `[...s]` nor `split('')` is faithful; both are pinned as counter-examples).
  `StringJoin` compiles the variadic all-string form and the single
  string-collection form; shapes the interpreter leaves inert fail closed. Known
  accepted divergence: compiled comparisons do not Unicode-normalize a raw
  non-NFC string bound to a compiled parameter (the interpreter stores every
  string in NFC; literals and `Characters`/`StringJoin` results are normalized)
  — normalize at the host boundary if you feed unnormalized user input into
  compiled predicates.

- **`broadcastable<T>` as a parameter declaration is now an elementwise
  contract.** A parameter declared `broadcastable<T>` (e.g.
  `ce.declare('f', '(broadcastable<number>) -> unknown')`, or an Epsil
  `function f(x: broadcastable<number>) { … }`) maps an indexed-collection
  argument element-wise — even when `T` would admit the collection whole
  (`broadcastable<value>`: the collection arm wins) — and the map descends
  exactly **one** rank: each element binds to the parameter whole, even a nested
  collection, unlike the unannotated default, which descends to the scalar
  leaves. `T` is checked per element (a violating element produces a loud
  per-element error carrying the broadcast context, and its siblings still
  evaluate), and a scalar argument binds directly with no list wrapper.
  Applications now also **type** like the inferred path — a definite collection
  argument gives `list<R>`, a possibly-collection argument `broadcastable<R>`, a
  scalar `R` — where the declared spelling previously typed the strictly weaker
  bare declared result (an explicitly _more_ precise declaration yielded
  strictly _less_ type information). A collection- or tuple-declared sibling
  slot still binds its argument whole, and the strict length-mismatch policy
  applies across the mapped slots only. The unannotated vectorization default is
  unchanged. Design record:
  `docs/plans/2026-08-08-broadcastable-param-semantics.md`.

- Compiling an application of a function with a declared `broadcastable<T>`
  parameter over a possibly-collection argument fails closed with a diagnostic
  (interpreted evaluation handles it) instead of emitting scalar code that
  returned garbage on arrays — the compiled broadcast helper recurses into
  nested arrays, which is exactly the leaf descent the one-rank contract rules
  out. The decline is per slot: an argument at a slot the declaration binds
  whole, an atomic tuple the element type admits, and a provably scalar argument
  all still compile. A multi-clause function with one broadcastable arm declines
  conservatively for the whole set.

- **Epsil debugging support in the engine.** Two additions that let a debugger
  (such as the VS Code Epsil extension's DAP adapter) pause and inspect Epsil
  programs at statement granularity:
  - **Source positions survive canonicalization.** The `sourceOffsets` metadata
    the Epsil parser attaches to every node is now preserved through canonical
    boxing — custom canonical-handler results and the numeric fast-path
    constructors re-attach it, the `.canonical` getters (function and symbol)
    thread it, closure capture keeps it on rebuilt bodies, and the recursion
    knot-tying re-box serializes it. Positions are advisory metadata: default
    JSON serialization does not emit them (opt-in via
    `metadata: ['sourceOffsets']`), and interned singletons are never stamped.
  - **Debug statement hooks.** `src/common/debug-hook.ts` exposes a synchronous,
    module-global pre-statement hook and post-statement result hook, fired by
    the statement sequencer (`Block` bodies, lambda bodies, `if` branches) for
    source-mapped statements only. One comparison per statement when unset; not
    part of the public engine API.
  - Function-application scopes are now pushed with the context name `'call'`
    (previously an anonymous placeholder name), so `ce.trace` and debuggers can
    delimit activation frames.

- **Destructuring assignment — `(a, b) := (b, a)`.** A tuple pattern may now
  appear on the left of a Cortex assignment, writing bindings that already exist
  instead of declaring new ones. The pattern grammar is the destructuring
  `let`'s — at least two elements, each a bare symbol, a `_` skipping that
  position, or a nested tuple pattern — and a shape mismatch is the same
  `incompatible-type` error value.

  The right-hand side is evaluated **once, in full, before any target is
  written**, which is what makes a swap mean what it reads: `(a, b) := (b, a)`
  exchanges the two values rather than assigning `b` to both. The same holds for
  a rotation (`(a, b, c) := (c, a, b)`) and for the pair-carrying loop step that
  is the usual reason to want this — `(a, b) := (b, a + b)` is an entire
  Fibonacci iteration, and `(a, b) := (b, a % b)` an entire Euclid step, with no
  temporary.

  Unlike a destructuring `let`, the targets keep their identity and their
  declared type: a value that does not fit a target's type is an error value,
  and assigning to a `const` fails. Those two are found only by attempting the
  write, so they are not atomic — targets earlier in the pattern stay written. A
  shape mismatch is atomic and writes nothing, including when it is nested under
  a position that would have bound; the destructuring `let` gained the same
  guarantee, which it did not previously have. Lowers to the `Assign` primitive
  with a `Tuple` pattern in the target position, held raw (canonicalizing it
  would fold a single-letter target such as `i` into the constant of that name),
  and accepted on all routes.

  In **compiled** code it lowers to per-leaf temporaries followed by per-leaf
  writes — `(a, b) := (b, a + b)` becomes
  `let _tv1 = b; let _tv2 = a + b; a = _tv1; b = _tv2` — which is what keeps the
  compiled form honest: the targets already exist, so the naive `a = b; b = a`
  would read the `a` it just clobbered. Temporaries never capture a name the
  program already uses. Every target — JavaScript, Python, GLSL and WGSL —
  compiles it in any statement position, including a loop body, so the Fibonacci
  and Euclid steps above compile. Value position (a block's last statement,
  whose value is the block's) and a non-literal tuple value fail closed (D6) and
  the interpreter takes over; a destructuring `let` in value position is now
  refused the same way, explicitly, rather than by emitting source that happens
  not to parse. (This also fixes a silent divergence in the same family as the
  destructuring-declare one: a tuple target previously compiled as `_ = …`,
  leaving every target at its old value behind `success: true`.)

  ```js
  ce.box(['Assign', ['Tuple', 'a', 'b'], ['Tuple', 'b', 'a']]).evaluate();
  ```

- **Cortex diagnoses a tuple pattern written with a bare `=`.** A parenthesized
  left side is not a binding target, so `(a, b) = (b, a)` resolves — correctly,
  under the positional-`=` rule — to a _comparison_ of two tuples whose result
  is discarded: the swap it looks like silently does nothing. That shape is
  almost always a typo for the destructuring assignment above, so it now reports
  `destructuring-bare-equal`; write `(a, b) := (b, a)` to destructure, or `==`
  if the comparison was meant. The node is unchanged — the diagnostic reports,
  it does not reinterpret.

  The check is deliberately narrow: it fires only statement-leading, and only
  when the left side is shaped exactly like a destructuring pattern (bare names,
  `_`, nested tuples), so a genuine tuple equation with computed components —
  `(x + 1, y) = t` — stays silent.

- **Parameterized nominal types:
  `type tree<T> = tuple<value: T, children: list<tree<T>>>`.** A nominal `type`
  declaration now takes the same type-parameter clause a generic alias takes, in
  Cortex as above and from the host with
  `ce.declareType('tree', '…', { typeParams: [{ name: 'T', variance: 'out' }] })`.
  Unlike an alias, an application is **opaque** — `tree<integer>` is never
  expanded — which is precisely what lets the definition refer to itself, so a
  recursive parametric container (a rose tree, a JSON with a payload, a zipper)
  is expressible for the first time. The arity, bound and unused-parameter rules
  are the alias's, shared and generalized; self-reference, which an alias
  forbids, is the point here.

  A parameter carries a **variance** marker — `out` (covariant), `in`
  (contravariant) or `inout` (invariant) — saying how two applications relate:
  under `out`, a `tree<integer>` is usable where a `tree<number>` is expected.
  **No marker means `out`**, declared rather than inferred and verified against
  the definition like a written one: values are immutable, so covariance is
  sound and is what a payload container wants, and only the consuming minority
  pays an annotation. Because the default is declared, a definition that uses
  its parameter in an input position does not quietly change the type's
  subtyping contract — it is a `variance-violation` at the declaration, naming
  the violated variance and where it came from, the offending occurrences by
  path (`notify.(arg 1)`), and exactly the markers that would verify. `inout`
  verifies against any definition. Variance and bounds do not interact.

  A `tuple` definition mints a **quantified** constructor
  (`tree: forall T. (T, list<tree<T>>) -> tree<T>`), so `tree(1, [])` solves
  `T = finite_integer` from its arguments; a `record` definition is still
  inhabited by a constructor function, whose own clause is independent of the
  type's. Field access reads the definition **instantiated at the application's
  arguments** — with `t: tree<number>`, `t.value` is a `number`. `match` is a
  binding of values, not a projection of the annotation: each capture takes the
  matched **value's own** type, usually narrower — on a `t` built as
  `tree(1, [])`, `match t { tree(v, cs) => … }` binds `v: integer` and
  `cs: list<never>`, not `number` and `list<tree<number>>`. Compilation erases
  the tag at the instantiated definition, as it already did for an
  unparameterized nominal type: `tree<integer>` compiles like the equivalent
  tuple, and declines identically where that would. One documented limitation: a
  construction solves its parameters from its arguments alone and an annotation
  does not widen them, so an explicitly `inout`/`in` parameterized type can only
  be constructed at exactly its argument type. See the new "Parameterized
  Nominal Types" section of the types guide.

- A type variable may now appear in one arm of a **union**:
  `type opt<T> = T | missing` and `forall T. (T | missing) -> list<T>` are
  accepted, and at a call the argument takes exactly one arm — the open arm
  binds the variable (refutation included), a ground arm binds `never`, the
  narrowest member of the family. At most one arm of a union may mention a
  variable (`T | U` is unsolvable by construction). Intersections and negations
  remain rejected wherever the declaration mints a constructor — the minted
  signature is what is checked, so a `record` body or a `mint: false`
  declaration goes unchecked — and the intersection diagnostic now steers to the
  spelling that replaces it, a bound (`forall T: number.`).

- A Cortex `type` statement re-declaration (a notebook re-run, or an edited
  definition) now UPDATES the existing type record in place instead of
  installing a new one. Types that mention the name — and applied references
  such as `box<integer>` already built — follow the new definition, so a node
  parsed before the re-run and one parsed after can no longer give different
  subtyping answers for the same pair of types, and a mutually recursive set
  converges on the second run rather than the third. A re-declaration that
  breaks a type depending on it now fails on the run that introduces it, rather
  than silently leaving that type reading a stale definition: an edit that
  changes the type-parameter count while a dependent still applies the old arity
  is a `generic-alias-arity` error, and one that makes a dependent's declared
  variance unsound is a `variance-violation`. Both are attributed to the
  dependent and name the re-declaration as the trigger, and both roll the
  statement back completely — definition, type-parameter clause, verified
  variance and minted constructor all restored. Re-declaring a type through the
  host `ce.declareType()` API still throws, unchanged.

- **Cortex: `break` and `continue`.** They leave, or skip to the next iteration
  of, the innermost enclosing `while`/`for` loop, and lower to the engine's
  existing `Break()`/`Continue()` primitives. Valid anywhere in a loop body,
  including inside an `if`, a `match` case, or a `do` block. The loop context
  resets at every function and lambda boundary — a `break` written inside a
  lambda defined in a loop body does not target that loop, and is a
  `control-outside-loop` diagnostic — because the engine's `Block`
  short-circuits on `Break`/`Continue` structurally, so a laxer rule would
  permit non-local control flow. Value-carrying `break value` remains unspelled,
  pending the ruling on a general `return`.

- **Cortex: `??` for absence coalescing.** `a ?? b` is `Coalesce(a, b)`: the
  value of `a` unless it is absent (`Missing` or `NaN`). It discharges
  _absence_; it does not rescue an `Error`. Right-associative, at precedence 18
  — looser than `|>` so `xs |> f ?? 0` defaults the pipeline's result, tighter
  than `|->` so `x |-> x.a ?? 0` defaults inside the body.

- **Cortex: `is` for dynamic type tests.** `x is integer` lowers to
  `Element(x, integer)` — the same test a `match` type pattern performs. The
  right operand is a type name, so a typo (`x is intger`) is a parse-time
  diagnostic rather than a comparison against an undeclared symbol. Simple named
  types only for now: a compound type (`!error`, `integer | string`,
  `list<integer>`) reports `type-pattern-unsupported`, as the equivalent typed
  pattern already does. `is` is a contextual word — `let is = 5` stays legal.

### Improvements

- **`Signature(op)` works on the `ce.box` and `ce.parse` routes.** The operator
  holds its operand and had no `canonical` handler, so the name arrived unbound
  and `Signature` answered `Nothing` for every operator unless the caller went
  through `ce.function()`, which boxes its arguments first. The name is now
  resolved by lookup — which also keeps the route read-only, where
  canonicalizing the operand would have DECLARED an unknown name as a side
  effect of asking about it.

- **A malformed predicate is reported by the operator that consumed it.**
  `CountIf`, `Find`, `IndexWhere` and `Position` all threw an error whose
  message named _Filter_, an operator the user never wrote — `Filter`'s message
  had been copied verbatim into each of them.

- **The signature-driven callback stamp declines a wrong-arity literal instead
  of half-annotating it.** A user signature declaring a concrete arrow parameter
  (`(cb: (integer) -> boolean) -> boolean`) annotates an inline literal passed
  there by pairing parameters positionally; given `(a, b) ↦ a > b` it annotated
  `a` and left `b` bare. The whole stamp now declines, as the
  contextual-`callback<S>` route already did. Evaluation is unchanged either way
  — the arity error dominates — but a declined application no longer carries a
  half-written contract. Optional and variadic declared parameters widen the
  admissible arity accordingly.

- **`src/math-json/OPERATORS.json` regenerated**, picking up the contextual
  `callback<S>` signature strings, the variadic `Append`, and three operators
  missing from it entirely (`Adjoin`, `IdenticallyEqual`, `QuotientRing`). Two
  defects in the generator are fixed along the way: a `forall`-quantified
  signature reported its arity as `"unknown"`, and the arity count split on
  every comma — including those inside a parameter's own type, which made `Fold`
  4-ary.

- **Element-wise (broadcast) failures are now self-diagnosing.** A user function
  with scalar parameters is automatically applied element-wise over an
  indexed-collection argument; when that fired unexpectedly, the resulting
  per-element failures gave no hint a broadcast was in flight — the motivating
  symptom read `Condition must evaluate to "True" or "False"` with nothing tying
  it to a mapping. An error produced inside a broadcast element now carries an
  `["ErrorBroadcast", name, index, length]` entry in its `ErrorTrace`
  breadcrumb, rendered as
  `(while applying 'skipWs' element-wise over 4 elements (element 2))`; an error
  **thrown** out of an element (a non-boolean `if` condition, say) has the same
  context appended to its message. Every failing element is annotated with its
  own index. Errors that never went through a broadcast are byte-identical to
  before, successful broadcasts pay nothing, and Epsil `runtime-error`
  diagnostics report the context too.

- **The Epsil debugger's variables pane marks broadcast behavior on function
  signatures**: `(n: number) -> number [elementwise]` versus
  `(xs: list<number>) -> integer [binds whole]`, so the derived vectorization
  behavior is visible before anything runs. A function-typed (callback)
  parameter does not suppress the marker, matching the eligibility rule.

- **Membership in a value collection now types the tested function parameter.**
  `Element(c, digits)` — Epsil `c in digits` — inside a function body narrows a
  not-yet-typed parameter to the collection's element type
  (`digits: list<string>` ⇒ `c: string`), the membership counterpart of the
  collection evidence `Length(cs)` and `cs[i]` already contribute. The evidence
  lands on the parameter's binding only: the function's arrow still reports a
  scalar parameter slot as `unknown`, so the lambda auto-broadcast default is
  unchanged (`isDigit(["5", "x"])` still maps elementwise). Two deliberate
  exclusions: a **global** symbol is never retyped — membership is a predicate
  (`x in [1, 2, 3]` on a string-valued `x` is `False`, not a type error), and a
  Solve domain spec such as `Element(x, Range(1, 9))` constrains its unknown
  without narrowing it — and membership in a **set** (`x ∈ ℤ`, `x ∈ {1, 2, 3}`)
  stays with the assume machinery, which applies such refinements scoped.

- **Epsil debugger: function signatures in the Variables panel show inferred
  parameter evidence.** The engine's arrow deliberately hides evidence that does
  not rule out broadcasting, so a function like `skipWs(cs, i) = … cs[i] …`
  displayed as `(dictionary | indexed_collection, unknown) -> …`. The debugger
  now reads the parameter bindings instead and shows names alongside everything
  inference recorded:
  `(cs: dictionary | indexed_collection, i: boolean | indexed_collection | number | string) -> …`,
  and `isDigit` shows `(c: string) -> boolean`. Display-only; the engine's types
  are untouched.

- **Cortex: most reserved words are now ordinary identifiers.** Only the words
  the grammar actually consumes are reserved: the literals (`true`, `false`,
  `Infinity`, `oo`, `NaN`) and the active keywords and word operators (`break`,
  `const`, `continue`, `do`, `else`, `for`, `function`, `if`, `in`, `match`,
  `while`). The other 76 words in the documented list — `set`, `with`, `label`,
  `where`, `to`, `each`, and so on — can name a binding, be assigned to, be a
  `|->` parameter, and be called. Previously a binding name accepted them but a
  bare assignment target, a mapsto parameter, and a call's callee did not, so
  `label(6) = 1` was accepted while `label(6)` was an error.

  Relatedly, assigning to a literal word is no longer silently accepted:
  `true = 5` and `NaN = 1` now report `reserved-word` like every other binding
  position.

### Resolved Issues

- **`tuple · tuple` and `x / tuple` now reject consistently, regardless of how
  precisely the element types are known.** The canonicalization guards only
  counted _provably_ numeric tuples, so a product (or a division) with a
  `tuple<broadcastable<number>, …>` operand was accepted (typed `number`) and
  the identical `incompatible-type` rejection surfaced only at evaluation —
  making validity appear to depend on the order in which operand types were
  refined (a more precise type turned an "accepted" expression into an error).
  Both guards now count operands by tuple-ness, exactly like the evaluation
  path: a tuple product with another tuple, or a tuple divisor, never becomes
  valid under any element refinement. The LaTeX rendering of these rejections
  now suggests `Dot` — the operator that does accept points — instead of only
  reporting that a tuple is not a number. (`scalar + tuple` with _unproven_
  elements deliberately stays symbolic with an honest union type: per the
  retractable-evidence ruling, `Add` bakes its error only when both the tuple
  and the scalar are proven.)

- **A seedless `Reduce` now seeds with the collection's first element.** Without
  an initial value, `Reduce` folded from the `Nothing` sentinel, which only
  looked right for a reducer that splices it away:
  `Reduce([1, 2, 3], (a, b) |-> a - b)` answered `-6` —
  `((nothing - 1) - 2) - 3` — where the corresponding `Scan` ends at `-4`, and a
  reducer that does not splice leaked the sentinel into the result
  (`Reduce([2, 3, 2], Power)` produced a `Nothing`-valued power instead of
  `64`). The seedless fold now starts at the first element and folds from the
  second, matching `Scan` and the compiled fast path; an empty seedless fold
  still answers `Nothing`. Folds given an explicit initial value are unchanged.

- **`Any` and `All` now surface an element's type error instead of silently
  discarding it.** When a predicate fails on an element — for instance a
  callback whose inferred parameter type a retracted element no longer satisfies
  — the quantifiers previously treated the error as "undetermined" and returned
  nothing, and `Any` could even short-circuit `True` straight past the failing
  element. They now return the element's error, in enumeration order: a definite
  answer found before the failing element still short-circuits (matching the
  family's laziness), and an error encountered before any decision is the
  result.

- **`Sum`, `Reduce`, `Total` and other finite-only operations now work over
  `FlatMap`.** `FlatMap` never reported whether its result was finite, so every
  consumer that requires a finite collection stayed inert over it. It now
  reports finite when its source is finite and the mapping function's result is
  provably finite (a scalar, or a finite collection); anything unprovable is
  left undetermined, as before.

- **A partially annotated function literal no longer rejects arguments at its
  unannotated parameters.** Annotating one parameter of a literal activated
  per-application validation for every parameter, and a bare (unannotated)
  parameter was checked against its inference residue — which, among other
  things, made a seedless `Reduce` with an annotated element parameter reject
  its own `Nothing` seed with `incompatible-type unknown nothing`. A bare
  parameter now imposes no constraint; explicitly annotated parameters are
  enforced exactly as before.

- **Membership queries on derived collections no longer answer a definite
  `False` when the underlying membership is undecidable.** Nine collection
  `contains` handlers (`Filter`, `Join`, `Append`, `Reverse`, `RotateLeft`,
  `RotateRight`, `Cycle`, `CartesianProduct`, `PowerSet`) collapsed an undecided
  sub-query into `false` — so `Element((1, x), {1, 2} × ys)` with `ys` a
  symbolic set evaluated to `"False"` instead of staying symbolic. All nine are
  now three-valued: a definite refutation still answers `False` immediately, and
  only a genuinely undecidable membership is left undecided. In the same pass, a
  `Filter` whose predicate returns a non-boolean now reports the malformed
  predicate from a membership query exactly as it does from iteration, counting,
  and emptiness — it was the one silent facet.

- **An element that fails a callback's declared parameter type is now loud
  everywhere.** Previously it could surface as a nonsensical
  `Filter predicate must return "True" or "False". Unknown symbol …` message
  (which spell-checked the lambda's own parameter), be silently swallowed by
  `TakeWhile`/`DropWhile` (an Error treated as an ordinary "stop"), or be
  laundered into `NaN` by a fused `Map` pipeline doing arithmetic on the Error
  value. All three paths now surface the element's own `incompatible-type`
  error: stream operators emit it in the element's place, scalar operators
  (`CountIf`, `Find`, `Position`, `IndexWhere`, `Partition`) return it as their
  result, and fused pipelines propagate it exactly like the unfused evaluator.

- **Compiled collection callbacks no longer ignore parameter type annotations.**
  On both the JavaScript and Python targets, a callback such as
  `(n: integer) |-> n > 0` compiled to a plain function with the annotation
  dropped, so compiled `Filter`/`Map`/`TakeWhile`/… could silently produce
  different values than the interpreter on elements that violate the annotation.
  Compilation now admits an annotated callback only when the collection's
  element type provably satisfies the annotation — the same rule the evaluator's
  fast paths use — and declines to compile otherwise, so the interpreter's
  per-element errors are preserved. Applies to inline and named callbacks across
  all collection operators, including `Reduce`/`Scan` and `Tabulate`/`Fill`.

- **An ordering such as `j <= Length(cs)` no longer declines to compile when the
  same local is also used as an index (`cs[j]`).** `At`'s index slot is typed
  `boolean | indexed_collection | number | string` (a gather index may be a
  collection, a dictionary key a string), which permanently widened the local,
  and the `string` arm of that union was read as positive string evidence by the
  mixed-string ordering gate. A type that admits a string _and_ a number _and_ a
  boolean _and_ an indexed collection — that exact four-armed shape — says no
  more than the top type does, and is no longer treated as evidence, so ordinary
  scanner loops (`while j <= Length(cs) && isWs(cs[j]) { … }`) compile again, on
  both the JavaScript and Python targets. A deliberately written union of scalar
  sorts (`string | number | boolean`) is still evidence, and genuinely mixed
  shapes (`Less("a", 1)`, a `number | string` participant, `Less("a", [1, 2])`)
  still fail closed.

- **An else-less `if` statement in a function body compiles (JavaScript
  target).** `if cs[j] == "-" { sign = -1; j = j + 1 }` in statement position
  lowers to a bare `if (…) { … }` instead of failing with
  `If: wrong number of arguments`. Loop bodies already handled this; a plain
  block's statements did not. An else-less `if` in _value_ position still fails
  closed — it has no value. The Python, interval-JavaScript and GPU targets
  still decline the shape in a plain function body.

- **Iterating over a function parameter now counts as collection evidence.** A
  parameter whose only use was `for c in cs` stayed untyped, so the lambda
  auto-broadcast mapped the function over the argument's elements instead of
  binding the collection whole: a function that accumulated `t = t + c` over
  `for c in cs` and was applied to `[1, 2, 3]` returned `[0, 0, 0]` instead of
  `6`, and its inferred signature read `(unknown) -> …`. The iterated operand of
  a `Loop`/`Comprehension` `Element` clause now narrows an as-yet-untyped symbol
  to `collection`, matching what `Length(cs)` and `cs[i]` already did. Scalar
  parameters are unaffected — `f(x) = x * 2` still broadcasts over a list.

- **A function forward-declared with the bare `function` wildcard
  (`ce.declare('clean', 'function')`) now participates in parameter
  collection-inference.** Previously a caller such as `proc(cs) = clean(cs) + 1`
  learned nothing from `clean` in **either** definition order: the wildcard
  declaration carries no parameter types, and assigning a function literal
  deliberately leaves the declared type alone (so re-assignment at a different
  arity stays legal), leaving no signature to narrow from. The application site
  now reads the assigned literal's own signature — for argument narrowing and
  for the application's result type, which used to be broadcast-typed
  (`list<unknown^3>`) where the value was a scalar — and a caller canonicalized
  while the callee is still a bare wildcard registers for re-derivation, so the
  later assignment repairs it: `proc([10, 20, 30])` answers `11` instead of
  broadcasting into `[proc(10), proc(20), proc(30)]`. The wildcard remains a
  widening: re-assignment at a different arity or parameter type still works,
  and applications are still not validated against the assigned signature.

- **Compiled string comparisons fail closed instead of returning wrong values.**
  The JavaScript compile target is numeric at heart: `Equal` and `NotEqual`
  lower to a tolerance test (`Math.abs(a - b) <= tol`), which for string
  operands is `NaN <= tol` — so `s == "a"` compiled to `false` behind
  `success: true`, and `IndexOf` over a list of strings returned 0 for the same
  reason. Both now fail closed (D6) when an operand is _provably_ a string (a
  string literal, or statically string-typed — an unknown-typed symbol never
  gates, so inferred-parameter plot equalities compile byte-identically), and
  the interpreter fallback returns the correct value. Orderings (`Less`,
  `Greater`, …) are gated more narrowly, on the **mixed** case only (`"a" < 1` —
  inert in the interpreter, `false` compiled): an all-string comparison compares
  strings exactly as the interpreter does (raw code-unit order) and keeps
  compiling, with parity pinned. `match` on string constants was never affected
  — it emits a real `===` — and is now pinned too. The Python target needed no
  gate: its wrong shapes raise a loud runtime `TypeError` rather than a silent
  value, and its `IndexOf` is genuinely correct.

- **The broadcast route no longer miscompiles string comparisons, and
  whole-array string equality fails closed.** Two stragglers of the
  string-comparison class above reached the emitter through different doors: a
  mixed ordering over a collection (`Less("a", [1, 2])`) broadcast to
  `[false, false]` via `_SYS.bcast` before any gate ran, and whole-array
  equality (`Equal(["a","b"], ["a","b"])`) compiled to `false` because
  `_SYS.eq`'s per-element tolerance test makes equal strings unequal — the gate
  tested _operands_, and neither operand is a string scalar. The string gates
  are now element-aware ("participants": scalar operands and the provable
  element types of collection operands), and the string-evidence test is
  **recursive**: nested string lists (`[["a"]] == [["a"]]`), heterogeneous
  literals (`["a", 1] == ["a", 1]`), a symbol typed `broadcastable<string>` or
  `list<string>` in an ordering, and — via the same walk — whole-value equality
  over `dictionary`/`record`/`tuple`-typed symbols (whose element types reach
  `string`) all previously compiled to wrong booleans and now fail closed.
  Admission is deliberately narrower than decline: only _flat_ all-string
  orderings keep compiling (their interpreter parity is pinned); nested
  all-string shapes decline. Numeric shapes keep byte-identical codegen. (The
  Python target has the same broadcast-route defect — `np.less("a", [1, 2])` —
  recorded as a known open hole, not yet fixed.)

- **The Python compile target now fails closed on the string and aggregate
  comparisons it miscompiled.** Two shapes returned wrong values behind
  `success: true`: an ordering that mixes strings with numbers, where NumPy
  coerces the number to a string and compares as text
  (`Less(["a", 10], ["b", 9])` ran to `[True, True]`, while the interpreter
  answers `["True", "False"]` — `10 < 9` is False), and equality with a `tuple`
  participant, where the tuple is looked inside instead of binding atomically
  (`Equal(Tuple(1, 2), List(1, 2))` ran to `True` against the interpreter's
  `False`). Both now decline (D6) and the interpreter fallback answers
  correctly, as do `dictionary`/`record` comparisons (no positional lowering at
  all) and scalar string equality (`abs("a" - "a")` raises). Gating is at
  COMPILE time on static type evidence, not on the emitted code raising: several
  mixed shapes are loud on NumPy 2.x but historically returned a scalar `False`
  with a `FutureWarning`, and emitted code runs on the user's NumPy. As on the
  JavaScript target, an `unknown`-typed operand is never string evidence, so
  numeric and plot comparisons compile byte-identically. What keeps compiling,
  each with executed-parity pins: all-string orderings (scalar, chained,
  list-vs-list, list-vs-scalar), tuple-vs-tuple equality, and — unlike the
  JavaScript target, whose kernels are numeric there — `IndexOf` in every shape
  (including a tuple needle in a point list) and all-string collection equality,
  both of which lower to Python's own structural comparison and are faithful.

- **Compiled `IndexOf`'s element test is now EXACT and bool-aware, like the
  interpreter.** `IndexOf([1, 2], True)` ran to `1` on both the JavaScript and
  Python targets, where the interpreter's structural element test answers `0`
  (and symmetrically, `IndexOf([True], 1)` ran to `1`): Python's `True == 1` is
  `True`, and `Math.abs(true - 1)` is `0`. Both targets now compare bool-ness
  first — Python through a new `_ce_indexof`/`_ce_same` runtime adapter,
  JavaScript through a strict `===` in the emitted element test. This is a
  runtime adapter, not a compile-time gate, so boolean `IndexOf` keeps compiling
  instead of declining. Both element tests also dropped their numeric TOLERANCE
  leaf: the interpreter's number `.isSame()` is exact, so `IndexOf([0], 5e-11)`
  and `IndexOf([0.30000000000000004], 0.3)` answer `0`, where the compiled forms
  answered `1`. (The tolerance leaf came from a probe artifact —
  `IndexOf([0.3], Add(0.1, 0.2))` agrees only because `Add(0.1, 0.2)` evaluates
  to exactly `0.3` by exact decimal folding, so the element test never saw a
  near-miss float. The residual: a needle _computed_ to a near-miss f64 at
  runtime is not found, which is the ordinary exactness loss of compiling to f64
  arithmetic.) The adapters also FIND a `NaN` needle, as the interpreter's
  structural element test does: `IndexOf([NaN, 3], NaN)` ran to `0` on both
  targets (`nan == nan` is `False` in Python, and `Math.abs(NaN - NaN) <= tol`
  is `false`) and now answers `1`. Otherwise unchanged: numbers still match
  across `int`/`float`, a tuple needle is still found in a point list, and a
  missing needle is still `0`. On the Python target an `np.ndarray` on either
  side is now normalized to a nested list, so a caller-supplied `(n, 2)` point
  matrix works instead of raising an ambiguous-truth-value error.

- **Compiled Python orderings over two collections now reject a length
  mismatch.** The interpreter answers `Error("incompatible-dimensions", …)` for
  `Less([1, 2, 3], [1, 2])` _and_ for `Less([1], [1, 2])`. NumPy only half
  agreed: it raises on 3-vs-2, but silently BROADCASTS 1-vs-n
  (`np.less([1], [1, 2])` → `[False, True]`) — a wrong answer behind a
  `success: true`. The ordering ufuncs are now emitted through a `_ce_ord`
  runtime shape guard that raises on any list-like-vs-list-like length mismatch,
  the 1-vs-n case included. Scalar-vs-collection broadcasting is unaffected.

- **`compileLambda` (Python target) no longer emits references to undefined
  runtime helpers.** It guarded only `_ce_bcast`; an `IndexOf` body, a
  collection/tuple `Equal` body, or a collection ordering produced a lambda
  referencing `_ce_indexof`/`_ce_eqcoll`/`_ce_ord`, which a bare lambda has no
  place to define — a `NameError` at call time. All four now fail closed with a
  message pointing at `compileFunction`.

- **A destructuring `Declare` with a positional initial value now binds (tuple
  patterns).** `["Declare", ["Tuple", "x", "y"], "unknown", ["Tuple", 3, 4]]` —
  the positional-value spelling the `Declare` contract documents and the scalar
  path already honors — silently declared nothing on the tuple path, which only
  read the trailing-attributes dictionary. The two forms now share one value
  resolution. A positional _type_ on a tuple pattern, previously a silent no-op
  on this dead path, is now applied per bound name and surfaces an
  `incompatible-type` error value when it doesn't fit — loud over silent, and
  **atomic**: every leaf is validated against the type before any binding is
  installed, so a failure on the second leaf no longer leaves the first one
  declared. (No surface route emits either spelling: the Epsil parser uses the
  dictionary form.)

- **A destructuring assignment is now atomic too.** `(x, y) := (7, 4.5)` with
  both targets declared `integer` used to write `x` and then fail on `y`,
  leaving the tuple half-assigned; the same happened when a later target was a
  constant. Every leaf is now validated against its target's existing binding —
  declared type, constness — before the first write, using the very check the
  write itself performs, so the diagnostic is unchanged and a rejected pattern
  leaves every target at its OLD value. (Failures raised deeper inside the
  install machinery — function-literal reconciliation, effect contracts — stay
  sequential.)

- **A destructuring declare or assign whose right-hand side is a tuple-valued
  expression now compiles (JavaScript target).**
  `let (v, j) = parseValue(cs, i)` and the state-threading idiom
  `(v, j) := step(j)` previously failed closed unless the right-hand side was a
  literal tuple. When the pattern is flat and the right-hand side's static type
  pins the tuple arity (`-> tuple<T1, T2>`), the compiler now binds the whole
  result to one temporary and reads components positionally —
  `let _tv1; _tv1 = step(k); let v = _SYS.at(_tv1, 1); …` — preserving the
  interpreter's evaluate-once-then-write order (so swaps and `_` positions
  behave identically). A tuple-typed _symbol_ right-hand side rides the same
  path. Nested patterns, statically-unknown arity, and every non-JavaScript
  target (GLSL, WGSL, Python, interval) keep the fail-closed refusal.

- **A function no longer broadcasts over a collection argument its body consumes
  whole.** A user function's unannotated parameters default to scalar, and a
  scalar-parameter function maps over an indexed-collection argument (the
  vectorization convention: `f(x) = 2x` applied to `[1, 2, 3]` is `[2, 4, 6]`).
  But the _collection evidence_ a body provides was being lost in three ways, so
  functions that plainly consume a collection whole were broadcast too — the
  body then saw a single element, and conditions inside it failed
  (`Condition must evaluate to "True" or "False"`) or loops never terminated.
  All three are fixed, and each writes its evidence onto the parameter so the
  inferred signature reflects the use:
  - a parameter referenced only from a **nested block scope** (an `if` branch, a
    `while` body — `while cs[j] != "z"`) auto-declared a throwaway per-scope
    shadow binding that swallowed the inference; bare parameters now share one
    cached binding across the whole body, which the literal's parameter
    declaration then adopts;
  - a function that merely **forwards its parameter** (`g(xs) = f(xs)`) learned
    nothing, because calls to inferred-signature functions skip argument
    validation — and with it, its narrowing side-channel; the collection-only
    parameter types of the callee now narrow unknown symbol arguments even on
    that route;
  - `Length(x)` contributed nothing because its parameter is deliberately `any`
    (`Length(5)` stays symbolic); it now treats a not-yet-typed symbol operand
    as collection evidence, like an indexed read does.

- **Collection evidence now survives definition order: a function defined before
  its callee is re-derived when the callee arrives.** The narrowing described
  above — a callee's collection parameter teaching the caller's parameter —
  could only fire when the callee was already defined. Write the caller first
  (`process(cs) = clean(cs) + 1` before `clean(v: list<number>) = v[1]`) and
  `process` was canonicalized while `clean` was still unknown: `cs` learned
  nothing, so `process([10, 20, 30])` broadcast elementwise, handing `clean` one
  number at a time — each call then failed against the declared `list<number>`
  parameter, and the errored elements surfaced as inert
  `[process(10), process(20), process(30)]`. Definition order changed semantics,
  which the engine already refuses to accept for juxtaposition (`g(t) := 2a(t)`
  written before `a` is defined re-reads as an application when `a` arrives):
  the same repair machinery now covers forward-referenced calls. While a
  function literal's body is canonicalized, a call whose callee is undefined —
  or known only by a guessed signature — registers the literal as a dependent of
  that name; when the name later gains a definition (assigned a body, or merely
  declared with a signature), the literal is re-derived from its raw operands
  and the parameter picks up the evidence, so the caller binds the collection
  whole and answers `11`. Helpers can now be written below their callers, and
  mutually recursive pairs work in either order. A _scalar_ callee defined later
  leaves the caller vectorizing, exactly as if it had been defined first, and a
  self-recursive function skips the pointless re-derivation of itself. Chains
  repair transitively: re-deriving a forwarder is that forwarder's own name
  gaining a definition, so `A → B → C` written in that order all bind correctly
  once `C` arrives — including diamonds, where the apex is rebuilt once, after
  every forwarder below it is current — and mutually recursive forward
  references terminate instead of chasing each other.

- **A `while` loop inside a zero-argument function now terminates.**
  `function f() { let j = 1; while j < 3 { j = j + 1 }; j }` hit the iteration
  limit: the nullary apply path skipped the sweep of stale canonicalization
  bookkeeping that the parameterized path performs, so the loop condition read a
  hoisted valueless binding forever. The nullary path now hides those bindings
  for the duration of the call, exactly like the parameterized path.

- **`And`/`Or`/`Not` accept a possibly-absent condition, Kleene-style.** A
  comparison on an indexed read — `cs[j] == "a"`, honestly typed
  `boolean | missing` since the index may be out of range — was rejected at
  canonicalization by the logic operators' `boolean` parameters, so the guarded
  loop condition `j <= Length(cs) && cs[j] == "a"` errored with
  `incompatible-type`. The three operators now declare the `handle`
  missing-value behavior and evaluate Kleene over absence: `False` dominates
  `And`, `True` dominates `Or`, `Not(Missing)` is `Missing`, and a surviving
  absent condition still surfaces through `If`'s absent-condition error.

- **Epsil: a pinned `match` case after a result line is a new case.** The case
  body `1 => "one"` followed by a line starting `== lim => …` fused into the
  comparison `"one" == lim` (leading-operator line continuation), and the `=>`
  then diagnosed. At the top level of a case body a linebreak now ends the body;
  parenthesized subexpressions keep the ordinary continuation. Two diagnostics
  were also sharpened: comma-separated cases get a targeted
  `match-case-separator` (with a fix-it to `;`, and parsing recovers instead of
  dropping the remaining cases), and a conditional tail accidentally placed at
  the start of a line (`x + 1` / `if x > 0 else 0`) reports
  `conditional-if-line-start` instead of the misleading
  `opening bracket expected`.

- **A shader loop body no longer emits a `return` inside the loop.** On the GLSL
  and WGSL targets, a `for` body with more than one statement compiled as a
  _value_ — its last statement became `return <statement>`, so the shader
  returned on the first iteration while reporting `success: true`. Two plain
  scalar assignments (`a := a + k; b := b * 2`) were enough to hit it. A loop
  body is now compiled as a statement list, which is also what lets a
  destructuring assignment lower on those targets.

- **An even root of an even power reduces, and no longer does so for complex
  values.** `\sqrt[4]{x^2}` now returns `\sqrt{|x|}`. It did not before, because
  the result is structurally larger and the cost check rejected it — which was
  quietly masking a soundness bug: the rewrite had no real-domain guard, so for
  a value declared complex it would have produced `\sqrt{|z|}`, where the
  principal value of `\sqrt[4]{z^2}` at `z=i` is `e^{i\pi/4}`, not 1. The guard
  is now in place and the reduction is kept for being the reduced real-domain
  form rather than the smaller one. A complex-declared base is left alone.

- **A closure returned from a function now resolves captured variables from
  inside a nested block.** `k ↦ (x ↦ if x > 1 { k } else { 0 })` applied at
  `k = 100` returned the symbol `k` instead of `100`, while the same body
  without the branch blocks — or a plain `do { k }` — returned `100`.
  `captureClosures` rebinds a returned function literal so its body block closes
  over the call's frame, but it reused the body's operands verbatim, so a
  _scoped block nested inside_ that body kept its canonicalization-time parent
  chain and reached the stale copies of the same lexical levels. The walk now
  re-roots nested blocks onto the captured chain, keeping their own locals. Held
  operands are what introduce such a block — `If` branches are the common case,
  and Cortex compiles every `if` branch to a block, so any `if` inside an
  escaping lambda was affected, including one drained later from a lazy `Map`.

- **An annotated function parameter read from inside a nested block now
  resolves.** In Cortex, `function s(k: number) { if 1 > 0 { k } else { 0 } }`
  returned the _symbol_ `k` rather than the argument — while the same function
  with a bare `k` returned it correctly. `evaluateBlock` sweeps stale
  canonicalization bookkeeping from the block's scope, and its keep-test was "is
  this binding's type inferred". An auto-declared shadow inherits the DECLARED
  type of the outer binding it shadows, so an annotated parameter left an
  explicitly-typed valueless shadow that survived the sweep and hid the call
  value in the lambda's fresh scope. The keep-test is now "was this created by a
  `Declare` statement", which is what the sweep meant to ask; genuine
  block-locals still survive, including across a re-entered block. Cortex wraps
  each `if` branch in a block, which is why the conditional shape surfaced it.

- **A lazy `Map` returned from a function no longer loses the variables its
  mapping function closed over.** `f(k) = Map([1,2], x ↦ x + k)` drained by the
  caller produced `[k + 1, k + 2]` instead of `[101, 102]` — a silently wrong
  value, with no error. Drain-time Map fusion serves each element with a direct
  operator application in the **ambient** scope, bypassing `makeLambda` and so
  its scope push, and the shape gate treated every parameter-free operand as a
  "closed" value. A free symbol is not closed: it resolves by binding lookup,
  and once the defining call has returned that binding is no longer ambient. The
  closure chain was always intact — `captureClosures` rebinds the literal to the
  call's frame — so the fix is for the drain to evaluate inside it. A level
  whose operands are all literals, the shape the fusion was built for
  (`1 + Mod(Range(0,899) + 29, 900)`), records no scope and keeps the original
  zero-scope-work path; the 3×900 witness is unchanged.

- **Annotating a callback parameter no longer switches off broadcasting for the
  whole function.** `function map(f: (A) -> B, t)` stopped broadcasting over
  _every_ parameter the moment `f` was annotated, so a recursive
  `map(f, t.children)` over a tree went inert while the identical function with
  a bare `f` worked. Broadcast eligibility (`paramsAreScalar`) is all-or-nothing
  across the parameter list and a function type is not a scalar type, so one
  callback annotation vetoed the rest. A function-typed parameter receives a
  function, never a collection, so it can never be broadcast over and now
  abstains instead of vetoing — which is the position the inference path already
  took, so a declared `(A) -> B` parameter and an inferred one of the same shape
  no longer disagree. A **collection**-typed parameter still suppresses
  broadcasting for the function: it consumes a whole collection, and that
  suppression is what keeps a nested collection argument from being descended
  into elementwise.

- **Reading a field through a recursive type's own recursive field no longer
  fails with `Converting circular structure to JSON`.** With
  `type tree = tuple<value: any, children: list<tree>>`, the expression
  `t.children[1].value` produced that error rather than the field's value.
  Joining the element types of a `list<tree>` reaches `unionTypes`, whose
  de-duplication key was `JSON.stringify(type)` — and a recursive type reference
  reaches itself through its resolved `def`. The key now omits `def`, which is
  both cycle-safe and lossless: a reference is identified by its name, and `def`
  is the only edge by which a type cycle can close.

- **A recursive type alias no longer overflows the stack when a value fails to
  match it.**
  `type alias json = missing | boolean | finite_real | string | list<json> | dictionary<json>`
  accepted every JSON shape correctly, but any _rejected_ value — a function, a
  complex number, `NaN` — produced `Maximum call stack size exceeded` instead of
  an `incompatible-type` error. `hasValueComponent` unfolded structural alias
  references with no cycle guard, unlike `isSubtype`, which has had one at each
  of its own unfold sites. Cutting the back edge is exact rather than merely
  conservative here: every component reachable around the cycle is already
  reachable on the first unfold.

- **A forward type reference can now be fulfilled by a later declaration, so a
  mutually recursive set of types is writable.** The documented spelling —
  `ce.declareType("json", "… | type json_array")` followed by
  `ce.declareType("json_array", "list<json>")` — failed with
  `The type "json_array" is already defined in the current scope`: the forward
  reference installed a type record, and the declaration meant to complete it
  read that record as a redeclaration conflict. The declaration now completes
  the record **in place**, so the types that captured the reference resolve
  through to the definition (a fresh record would leave them pointing at the
  empty one, and the recursion could never close). Only an unfulfilled reference
  is completable; a name that already has a definition is still a redeclaration
  error. This applies to the Cortex `type` statement equally.

- **A parameter typed by an alias of a collection now binds its argument whole
  instead of broadcasting over it.** With `type alias u = list<number>`, a
  function `(u) -> …` applied to `[1, 2]` was mapped over the list and each
  element then failed the parameter check — while the inline
  `(list<number>) -> …` spelling bound correctly. `isScalarType` did not unfold
  alias references, so an alias of a collection read as a scalar. Nominal types
  are unaffected and still broadcast: their values are tagged applications,
  never collections, so a list of them is a genuine elementwise call.

- **`simplify()` now reduces inside `\int`, `\sum`, `\prod` and
  `\frac{d}{dx}`.** The body of those operators was never simplified, so
  `\int(\sin^2x+\cos^2x)dx` stayed as written rather than becoming `\int 1\,dx`,
  and `\sum(n+n)` never reached its closed form. That was deliberate: the
  closed-form rules match on the body's _shape_, and simplifying first rewrites
  the shape out from under them — `\sum k(k+1)` becomes `\sum(k^2+k)` and the
  sum-of-products rule stops recognising it. The body is now simplified once at
  the fixpoint, after those rules have had every chance and none has fired, so
  both work: the integrand above collapses AND `\sum k(k+1)` still returns its
  closed form.

  This is new work on expressions that contain a binder — roughly 3x on
  binder-heavy input in exchange for simplification that previously did not
  happen at all. Expressions without a binder are unaffected.

- **`Coalesce` no longer evaluates its tail past an undecided operand.** When an
  operand still carried free variables, the handler evaluated every remaining
  operand before returning the partially evaluated expression — so a later
  operand's effects ran, and its errors surfaced, on a path that a decided first
  operand would never have taken. The tail is now left unevaluated, which also
  makes the nested form `Coalesce(a, Coalesce(b, c))` and the flat
  `Coalesce(a, b, c)` observationally equal.

- **The cost function no longer prices the same expression differently depending
  on which form it is handed.** `Square(x)` cost 6 unevaluated but 1 canonical,
  and `Exp(x)` cost 10 versus 1 — yet both canonicalize to a `Power`. Since
  `simplify()`'s cost gate compares an incoming expression against a rule's
  result, and the two need not be in the same form, that made some comparisons
  off by up to 2×. Both now price through the same helper as `Power`, so the
  cost is a property of the expression rather than of its representation.

  Relatedly, a negation is now priced by what it is applied to: a sign on a
  _term_ costs 1, while negating a whole _sum_ keeps the higher cost of 4, since
  that forces delimiters. Previously both cost 4, which said `-a - b - c` is
  nearly twice as complicated as `-(a + b + c)` when it reads more simply — and
  made `Subtract(a, b)` cost less than the `Add(a, Negate(b))` it canonicalizes
  to. One visible consequence: `\int\sqrt{x^2-1}dx` now returns
  `\frac12(x\sqrt{x^2-1} - \operatorname{arcosh} x)`, matching the factored form
  its two sibling trig-substitution integrals already returned.

- **A coefficient no longer jumps in cost at an arbitrary size.** The cost
  function treated a numeral times something as cheap only for an integer up to
  10 (but any rational), and discarded the coefficient's own size entirely — so
  `10x` cost 4 while `11x` cost 10, a 2.5× step for the same shape. The
  coefficient's cost is now counted, which prices size continuously (integer
  literals are already priced by digit count), and the magnitude test is gone:
  `11x` costs 5, `1000x` costs 7. `2x` still costs less than `x + x`, which is
  what the discount exists for. One visible consequence: `\sum n^2` returns
  `\frac16(2b^3+3b^2+b)` rather than `\frac13 b^3+\frac12 b^2+\frac16 b`,
  matching the shape `\sum n` already returned.

- **Raising something to a power now accounts for what is being raised.** The
  cost function priced a power by its exponent alone, so `(a+b+c+d)^{20}` —
  which expands to 1,771 terms — scored 2, the same as `x^{20}` and barely above
  `x^2`. The base is now counted. `2q^2` is still cheaper than the repeated
  multiplication it replaces, which is what that rule exists for. One visible
  consequence: `(\sqrt2+\sqrt3)^2` now reaches its closed form `5+2\sqrt6`
  instead of staying unexpanded.

  Two long-standing shortcuts came out with it. A negated power was priced
  without its base, so `-\sin^2x` scored 4 where `\sin^2x` scored 12 — the same
  subexpression valued three-fold apart on nothing but a leading sign. And
  `\sqrt{}` carried hidden surcharges for a perfect-square or odd-power
  argument, added to push factoring rewrites like `\sqrt{x^2y}\to|x|\sqrt y`
  past the cost check. Those rewrites introduce an absolute value, so they
  genuinely do grow the expression; they are kept because they are correct on
  the reals, not because they are smaller, and they now say so directly rather
  than relying on a surcharge to disguise their size. Same for distributing an
  exponent over a product. Behavior is unchanged in every case.

- **A radical is no longer priced as if it were an ordinary decimal.** The cost
  function reduced an exact value to its floating-point magnitude, so `\sqrt3`,
  `2\sqrt3` and `\sqrt{17}` all scored the same as the plain decimal `0.5` — the
  radical was invisible to every comparison. An exact value is now priced as
  `rational × \sqrt{radical}` with the radical counted, calibrated so a radical
  literal costs about what the equivalent expression costs (`\sqrt3` and
  `\sqrt y` both score 6). Plain integers, decimals and fractions are unchanged.

  Because a radical now carries weight, keeping one factored out beats spreading
  it across several terms, so a number of antiderivatives come back in a tidier
  form: `\int\frac{1}{x^2+x+1}dx` returns
  `\frac{2\sqrt3}{3}\arctan\left(\frac{\sqrt3}{3}(2x+1)\right)` rather than
  distributing the `\sqrt3` over both terms of the argument. Collapsing nested
  radicals (`\sqrt{\sqrt{12}} \to \sqrt[4]{12}`) also no longer needs a
  cost-gate exemption — it now wins on its own merits.

- **An unevaluated integral now weighs heavily against a closed form.**
  `Integrate` was priced like any unrecognized operator, but an antiderivative
  can be much larger than its integrand — `\int\sec^3x\,dx` scored 49 against a
  closed form of 78, and `\int\frac{1}{x^4+1}dx` 62 against 145 — so a rewrite
  that resolved such an integral could be rejected for being "more complicated".
  Integrals now carry a large flat premium. It is a weight rather than an
  absolute rule — a closed form vastly larger than its integral could still
  lose. It is flat rather than proportional so that comparing two expressions
  which each contain one integral still turns on the integrands, and so that an
  expression with fewer integrals still wins.

- **`ce.parse()` now accepts a `scope` option in its public type signature.**
  The implementation has always honored it — the whole parse runs with the
  supplied scope as the current lexical scope, so name resolution walks
  `scope → parents` and every auto-declare and inference lands rooted there —
  but the option was missing from `IComputeEngine.parse()`, which is the type
  the public `ComputeEngine` resolves to. Passing it was therefore a compile
  error (`TS2769`) even though it worked at runtime. `ce.expr()`, `ce.box()`,
  `ce.function()` and `ce._fn()` all already declared it; `parse()` was the lone
  omission. No runtime change.

- **`Pochhammer()`, `Degrees()` and `DMS()` no longer numericize an exact
  irrational argument.** Found by auditing for the `Beta()` bug below, which
  turned out to be one instance of a small class. `(\sqrt2)_2` returned
  `3.41421356…` instead of the exact `2 + \sqrt2`, and
  `\mathrm{Degrees}(\sqrt2)` returned `0.0246826…` instead of `\sqrt2\pi/180`.
  Two different causes, one symptom: `Pochhammer` built its rising-factorial
  terms with the `.add()` method, which folds two exact literals to a machine
  float (the same slip as `Beta`, and its own symbolic branch alongside already
  did it correctly); `Degrees` fell back to `ce.number(arg.re)` for a
  non-rational argument, and `.re` is a machine float. Exact rationals,
  integers, floats, poles and symbolic arguments are unchanged in all three.

  The audit also found the nightly exactness grid was covering only 104 of the
  engine's numeric operators — which is why these went unnoticed. It now covers
  28 more. `Mandelbrot`/`Julia` are deliberately excluded (a float is the answer
  for an escape-time sampler), as are `Rational`/`Rationalize` (they exist to
  turn a float into an exact value).

- **`Beta()` no longer numericizes an exact irrational argument.**
  `\mathrm{B}(\sqrt2, 2)` evaluated to `0.2928932188…` instead of the exact
  `1/(\sqrt2(1+\sqrt2))`, breaking the contract that `evaluate()` returns the
  most exact form and only `N()` produces a float. The closed form
  `\mathrm{B}(a, m) = (m-1)!/(a(a+1)\cdots(a+m-1))` was being built with the
  `.add()`/`.mul()` methods, which fold two exact literals to a machine float —
  so `\sqrt2 + 1` collapsed on the very first factor and the whole result went
  inexact. Integer and rational arguments were unaffected (they fold exactly),
  which is why only an irrational argument showed it. Poles
  (`\mathrm{B}(-1, 2) = \tilde\infty`), the finite negative cases
  (`\mathrm{B}(-2, 2) = 1/2`) and float arguments are unchanged.

- **A collection rebound to a `Map` over itself no longer overflows the stack.**
  Assigning `xs` the value `Map(xs, f)` — the shape an accumulator loop produces
  — made any later query throw a raw
  `RangeError: Maximum call stack size exceeded` out of `evaluate()`, rather
  than being absorbed as an `Error` value; a host calling `evaluate()` directly
  saw a hard crash. The self-referential-binding guard was in place and firing
  (`xs.value` reads `undefined`, as designed), but `Map` is the one lazy
  collection operator that answers `isFinite`/`isEmpty` from its **source**
  rather than its own iterator, and that path reached the stored value through
  `evaluate()` instead of the guarded `value`. Each turn — `isFinite` → source
  resolution → `evaluate()` → `isFiniteCollection` → `isFinite` — completed its
  dereference before the next began, so the existing cycle guard, which is
  released when the dereference returns, never observed the re-entry. Such a
  source is now left unresolved, putting `Map` on the same symbolic residual
  that `Filter` and every other lazy operator already produced. Eager and
  broadcast sources (`Map(X - 1, f)`) still resolve exactly as before.

## 0.102.0 _2026-08-05_

### New Features

- **Two ring constructions, `Adjoin` and `QuotientRing`, with their standard
  notations.** `\mathbb{Z}[\sqrt2]`, `\mathbb{Z}[\sqrt2,\sqrt3]`,
  `\mathbb{Z}[i]` and `\mathbb{Z}[x]` now parse as ring adjunction
  (`["Adjoin", "Integers", …]`), and both `\mathbb{Z}_n` and
  `\mathbb{Z}/n\mathbb{Z}` as the quotient ring
  (`["QuotientRing", "Integers", "n"]`), which serializes back to the subscript
  form. The blackboard-bold ring and field constants — `\mathbb{Z}`,
  `\mathbb{Q}`, `\mathbb{R}`, `\mathbb{C}` — are accepted as bases. Both
  operators are **inert** in this version: they stay symbolic, carry no
  membership test and no arithmetic in the constructed ring, but they do report
  an honest type — `\mathbb{Z}[\sqrt2]` is a `set<finite_real>`, `\mathbb{Z}[i]`
  a `set<finite_complex>`, `\mathbb{Z}_n` a `set<finite_integer>`. Note that
  `\mathbb{Z}_p` is read as the integers modulo `p` — the quotient reading — not
  as the alternative number-theoretic reading the same notation carries in some
  texts, and that field adjunction written with parentheses
  (`\mathbb{Q}(\sqrt2)`) is not parsed. Sign-restricted spellings are
  unaffected: `\mathbb{Z}_+`, `\mathbb{R}_-` and `\mathbb{Z}_{\ge0}` still name
  `PositiveIntegers`, `NegativeNumbers` and `NonNegativeIntegers`.

- **Quantifiers accept an undelimited parenthesized body.**
  `\forall x > 0 (x^2 > 0)` — a condition followed by a parenthesized body, with
  no comma between them — now parses as `["ForAll", <x > 0>, <x^2 > 0>]` for all
  five quantifiers (`\forall`, `\exists`, `\exists!` and the negated forms).
  Previously the group was absorbed into the condition as an implicit product.
  The split is accepted only when the group reads as a proposition — a relation,
  a logic connective, a membership, or a predicate application such as `(P(x))`
  — so `\forall x > 2 (\sin y)` still reads the group as a factor of the
  condition.

- **More spellings of the quotient ring and the sign-restricted number sets
  parse.** `\frac{\Z}{n\Z}` (and `\dfrac`, `\tfrac`) now reads as
  `["QuotientRing", "Integers", "n"]`, like the inline `\mathbb{Z}/n\mathbb{Z}`,
  and serializes back to `\Z_{n}`. The terse blackboard-bold family also accepts
  the short comparison commands — `\R_{\ge 0}`, `\R_{\gt0}`, `\N_{\ge1}` and
  their siblings — which previously required the spelled-out `\geq`/`\geqslant`
  forms.

- **Cortex: the conditional expression `a if c else b`.** When both branches are
  single expressions, the braces of the block form are noise, and the
  conditional spells the same `["If", c, a, b]` without them:
  `let y = 10 if x > 3 else 20`. It is the same operator the block form builds —
  only the branches differ, plain expressions instead of `Block`s, so the
  conditional introduces no scope and no statement can appear in a branch. The
  `else` is **mandatory** (it is what ends the condition; a missing branch would
  leave the false case with no value to name), and `1 if c` reports the new
  `conditional-else-expected` diagnostic — use the block form `if c { 1 }` when
  there is nothing to return. Chains nest to the right
  (`"zero" if n == 0 else "negative" if n < 0 else "positive"`), so there is no
  `else if` spelling to learn. The conditional binds looser than every operator
  that computes — as in Python, looser than `||` — but tighter than the four
  that bind or pair, `=`, `|->`, `|>` and `->`, so the whole conditional is the
  right-hand side of an assignment, the body of a function, the piped value, or
  the value of a dictionary entry. Used as an operand it needs parentheses:
  `1 if c else 2 + 3` reads as `1 if c else (2 + 3)`. One layout rule: the `if`
  must be on the **same line** as the value before it — a line break separates
  statements, so an `if` that starts a line always begins a new `if`-statement.
  The block form is unchanged, and a match-case guard (`n if n > 0 => …`) is
  unaffected: patterns have their own grammar, which has no conditional.

### Improvements

- **Cortex: `If` now serializes as `if`, not as a function call.** The
  `if`-expression syntax has always _parsed_, but the serializer had no rule to
  emit it, so a program written `if c { 1 } else { 2 }` came back from the
  formatter as `If(c, do {1}, do {2})`. It now round-trips to the form it was
  written in. The spelling is chosen by the shape of the branches, which is
  exactly what the parser distinguishes: `Block` branches give the block form
  (chaining to `else if` when the alternative is itself a block-form `If`),
  plain expression branches give the conditional form `a if c else b`. A shape
  with neither spelling — mixed branches, or an `If` with no `else` and a
  non-`Block` consequent — keeps the generic `If(c, …)` call form, which also
  re-parses faithfully. An `If` in operand position is parenthesized according
  to the conditional's precedence, so `Add(If(c, 1, 2), 3)` serializes
  `(1 if c else 2) + 3` rather than the differently-parsing `1 if c else 2 + 3`.

- **`simplify()` no longer returns a result more complicated than its input.**
  The cost gate that decides whether to keep a rewrite used to tolerate growth
  of up to 30% — a proportion, so the bigger the expression, the more growth it
  allowed. It is now **strict**: a rewrite is kept only if it does not increase
  the cost.

  Two things were wrong with the tolerance. It let large expressions run away:
  instrumenting the gate across the test suite caught a single rewrite adding
  1,693 cost units, and a chain walking one expression from cost 7,098 to 10,133
  — every step recorded as a "simplification". And 90% of what the tolerance
  actually bought was the generic expansion rule, which was making results
  **worse** by blowing factored closed forms apart.

  Removing it restores them. `\sum_{n=0}^{b}(a + dn)` now returns the textbook
  `(b+1)(a + bd/2)` instead of a four-term polynomial; `\int\sqrt{1-x^2}dx`
  returns `\frac12(x\sqrt{1-x^2} + \arcsin x)`; `\int e^x\sin x\,dx` returns
  `\frac12(\sin x - \cos x)e^x`; solving `x^2 - 2x\cos t + 1 = 0` for `t`
  returns `\arccos\frac{x^2+1}{2x}`, which now agrees with the validity
  condition reported beside it; and `\frac{-b+\sqrt{b^2-4ac}}{2a}` stays in
  closed form instead of splitting into `-b/(2a) + \sqrt{b^2-4ac}/(2a)`.

  A rule that should apply regardless of cost is tagged `purpose: 'transform'`,
  which bypasses the gate entirely — that, not a numeric tolerance, is the
  supported way to express "preferred even though larger".

  Making that work meant tagging the rewrites that had been surviving on the
  tolerance. Nine families now declare `purpose: 'transform'` explicitly: the
  power combinations `x^n·x^m → x^{n+m}`, `x·x^n → x^{n+1}` and
  `x^n·x → x^{n+1}` (whose equivalent for three or more factors already carried
  the tag, so the same rewrite had been obeying two different cost policies
  depending on which implementation caught it); collapsing nested radicals
  (`√√12 → ⁴√12`); removing a logarithm from under an exponential
  (`e^{\ln x + y} → x·e^y` and its `\log_c` sibling);
  `\log_c(x^n) → n·\log_c(x)`; the geometric-series and
  shifted/falling-factorial closed forms for `Sum` and `Product`; the
  `\sin/\cos(π ± x)` argument reductions; rationalizing a radical denominator;
  and `\sqrt{x^{2n+1}} → |x|^n\sqrt{x}` (a branch-cut correctness rewrite, not a
  size optimization). Several were untagged only because the original
  string-matching exemption list never named them. Tagging them also makes them
  robust to a caller-supplied `costFunction`. Distributing a negation over a sum
  (`-(x+1)` → `-1-x`) is tagged for the same reason — it trades one negation for
  one per term, so it always scores worse, but it is the form the rest of the
  engine works in.

- **`ComputeEngine`, `expr.engine` and `ExpressionComputeEngine` are now one
  interchangeable type — no more casts between them.** The `ComputeEngine`
  exported from the package (and from the `/core` sub-path) is now a constructor
  value paired with the structural `IComputeEngine` interface, rather than the
  class itself, whose private fields made its type nominal. An engine obtained
  from `expr.engine` (typed `ExpressionComputeEngine`) can now be assigned or
  passed wherever a `ComputeEngine` is expected, and vice versa.
  `new ComputeEngine()`, `instanceof ComputeEngine`,
  `InstanceType<typeof ComputeEngine>` and the static
  `ComputeEngine.getStandardLibrary()` all work as before (the constructor's
  type is the new `ComputeEngineConstructor` interface). The interface also
  gained members that were previously only on the class: `Two`, `toJSON()`,
  `suggestOperatorName()` and `functionProperties()`. One typed-surface
  consequence: the legacy `canonical`/`structural` options of `ce.expr()` and
  `ce.box()` are not part of the interface — use the equivalent `form` option
  (`{ canonical: false }` → `{ form: 'raw' }`, `{ structural: true }` →
  `{ form: 'structural' }`); the legacy options still work at runtime. The
  `ExpressionComputeEngine` type is now **deprecated**: it is interchangeable
  with `ComputeEngine`, which should be used instead.

### Resolved Issues

- **Serialization no longer writes to the current scope.** `toLatex()` and
  `toMathJson()` internally re-canonicalize parts of the expression they lay out
  (for example to display a product with negative exponents as a fraction), and
  that re-canonicalization could **declare** an undeclared function head — or
  write an inferred type onto a declaration — in whatever scope was ambient at
  serialization time. In particular, serializing an expression that had been
  parsed against a per-call `scope` leaked its function heads into the
  surrounding scope, changing how later parses read (`aQ_{z}(x,y)` parsed before
  the leak as an implicit product, after it as a function application).
  Serialization now runs in a resolve-only region: names resolve against the
  scope chain but are never declared, and no inference is written. The same
  region now also covers the undeclared-head auto-declaration during
  partial-form boxing, which the resolve-only contract already promised but did
  not enforce.

- **Cortex: a wrapped operator chain no longer ends in a dangling operator.**
  When an infix chain was long enough to wrap, the formatter emitted the
  operator after _every_ element, including the last. With no closing fence to
  absorb it the output ended on the operator, and the result did not re-parse:
  `Add(accumulator, someLongVariableName, x, y)` at a narrow margin produced
  `accumulator +` / `someLongVariableName + x + y +`, which reports
  `unexpected-symbol "+"`. Only the separators _between_ elements are kept now;
  those are fine across a line break, since an operator with whitespace on both
  sides stays infix. Fenced lists are unaffected — a trailing `,` before `]` or
  `;` before `}` is legal Cortex and still emitted.

- **Cortex: a statement block that has to wrap is indented, not staircased.**
  `do { … }` (and the new `if` block form) laid its body out with the generic
  fenced-list layout, which aligns continuation lines to the _opening brace_.
  For a statement block that pushed the body out to the brace's column, and at a
  realistic margin left so little width that the statements broke apart in turn.
  Both are now laid out anchored at the **keyword**: body one indent in, closing
  brace under the keyword, statements separated by the line break itself. An
  `else if` chain is flattened first, so every clause stays at the same column
  instead of nesting a level deeper per `else if`. Expressions and collections
  keep the existing brace-aligned layout.

- **A subscript or bracket on a set constant is no longer read as an index.**
  `\mathbb{Z}_n` parsed as `["At", "Integers", "n"]` — indexing into a set —
  which is not a valid type, and serialized back to `\Z[n]`, which parsed as an
  `incompatible-type` error, so the expression did not survive a round trip.
  Those spellings now produce the ring constructions above. Indexing a genuine
  indexed collection is unchanged.

- **A bare `N` or `D` used as a variable now binds the same way everywhere in an
  expression.** A single-uppercase-letter name that is also a standard library
  operator reads as a variable when it appears where a value is required
  (`N + 1`), and the engine declares that variable the moment it first sees such
  an occurrence. Occurrences boxed _before_ that point — the first `N` of
  `N, N+1` — kept the operator binding, so one expression carried two different
  bindings for one name (`isSame()` was false between two occurrences) and
  boxing the same input a second time produced a third. An expression such as
  `N, N+1, N+2` or `(DB+BC)^2 = AD^2+AC^2` therefore did not survive a
  serialize-and-reparse round trip. When the variable is declared partway
  through a boxing, the expression is now rebuilt against it, so every
  occurrence shares one binding. What the names mean is unchanged: `N(2.3)` and
  `D(x^2, x)` still apply the builtin operators, `x^2 |> D` still pipes into the
  derivative operator, and a bare mention on its own (`ce.parse('N')`) still
  leaves the operator definition intact.

- **A symbol spelled by the generic (name-based) speller now reads back as the
  same symbol.** Two cosmetic spellings changed the symbol's identity on a round
  trip. A plain trailing digit run became a subscript, so the symbol `x2`
  serialized as `x_2` and parsed back as the _different_ symbol `x_2` (and
  `Arctan2` as `\mathrm{Arctan_2}` → `Arctan_2`). Such a name is now spelled
  verbatim and upright — `\mathrm{x2}`, `\mathrm{Arctan2}` — which reads back as
  the original symbol; a name that already uses the `_` subscript convention is
  unaffected (`x_2` still serializes as `x_2`). **This changes the rendering of
  digit-suffixed names:** they display upright as `x2` rather than as `x₂`;
  write `x_2` for the subscripted form. Separately, a name from the Greek-letter
  table whose command the LaTeX dictionary gives to a constant was spelled with
  that command: the symbol `pi` serialized as `\pi` and parsed back as `Pi`,
  `zeta` as `\zeta` → `Zeta`, `phiLetter` as `\varphi` → `GoldenRatio`. Those
  names are now spelled `\mathrm{pi}`, `\mathrm{zeta}` and `\mathrm{phiLetter}`.
  The set is derived from the dictionary, not hardcoded: a constant that yields
  its bare command to a declaration does not claim the spelling, so the symbol
  `gamma` still serializes as `\gamma` — that command reads back as `EulerGamma`
  only in an engine where `gamma` is undeclared, i.e. never in an engine holding
  the symbol.

- **The imaginary unit now has a single canonical spelling:
  `["Complex", 0, 1]`.** A bare `i` parsed to the complex literal
  `["Complex", 0, 1]`, but `\imaginaryI` (and `\mathrm{i}`, `\operatorname{i}`,
  and the MathJSON symbol `"ImaginaryUnit"`) canonicalized to the _symbol_
  `ImaginaryUnit`. Since the serializer emits `\imaginaryI` for both,
  `ce.parse('i')` did not round-trip, and two structurally identical expressions
  could compare unequal with `isSame()`. The `ImaginaryUnit` definition has
  always been declared `holdUntil: 'never'` — meaning its value is substituted
  at canonicalization — but the symbol was interned in the engine's
  common-symbol table, which short-circuited that substitution. It no longer is,
  so `ce.parse('i')`, `ce.parse('\imaginaryI')` and `ce.box('ImaginaryUnit')`
  now all canonicalize to the same complex literal. **Migration:** raw MathJSON
  `"ImaginaryUnit"` is still accepted and still round-trips non-canonically
  (`ce.box('ImaginaryUnit', { canonical: false })`), but code matching on the
  canonical form should test for the complex literal — `expr.isSame(ce.I)` or
  the `isImaginaryUnit()` helper — rather than for the symbol name.

- **The interned imaginary unit is now an exact value**, so exactness-gated
  folds fire on it. It was built from a float-lane numeric value while the
  identical `["Complex", 0, 1]` literal boxed exact, which made canonicalization
  disagree with itself depending on how `i` reached it:
  `["Power", "ImaginaryUnit", 2]` stayed `i^2` (and `ce.parse('i^2').simplify()`
  did not reduce) while `["Power", ["Complex", 0, 1], 2]` folded to `-1` — so
  `ce.box(expr.json)` did not round-trip to `expr`. Small integer powers of `i`
  now fold on every route, and `\sqrt{-1}`, `(-1)^{1/2}` and `\frac{a}{i}`
  canonicalize to `i`, `i` and `-ia` respectively.

- A product of an infinity and the imaginary unit no longer collapses to `NaN`
  at canonicalization. `["Multiply", "PositiveInfinity", ["Complex", 0, 1]]`
  canonicalized to `NaN` while the other operand order stayed symbolic: the
  `n·i` promotion (which folds `2·i` to the exact `2i`) accepted a non-finite
  left operand and built a value out of an infinite component. Infinities are
  excluded from that fold, so both operand orders now keep the symbolic product.
  `evaluate()` still returns `NaN` for the indeterminate form.

- `Degrees()` of a non-real argument no longer drops the imaginary part.
  `\imaginaryI\degree` canonicalized to `0` (and `(2+3i)\degree` to
  `\frac{\pi}{90}`) because the conversion read only the real part of its
  operand. The linear conversion is now applied to the whole value:
  `Degrees(i) = i\pi/180`.

- A canonical `Multiply` is now always flat. A product built by the invisible
  (juxtaposition) operator could keep a nested `Multiply` operand — for example
  `ce.parse('2f(ab)')` canonicalized to `Multiply(2, f, Multiply(a, b))` instead
  of `Multiply(2, a, b, f)` — which broke the associativity contract and made
  two structurally identical products compare unequal with `isSame()`. Note the
  MathJSON serializer flattens on output, so `expr.json` printed the same
  `["Multiply", 2, "a", "b", "f"]` either way; only `expr.ops` showed the
  difference. As a consequence exact numeric factors separated by parentheses
  now fold as they should: `2(3x)` canonicalizes to `6x`. One visible knock-on:
  two closed forms returned by `Sum` — `(b+1)(a+bd/2)` and its sibling — now
  come back from `simplify()` expanded (`1/2·d·b² + a·b + 1/2·b·d + a`) rather
  than factored. The values and the canonical forms are unchanged; flattening
  shaved the expanded rewrite's cost just under `simplify()`'s 1.3× acceptance
  gate (35 vs 35.1), so the rewrite is now accepted where it used to be
  rejected. That margin shows how finely the cost gate discriminates between a
  factored and an expanded form, and it is a candidate for tuning.

- An operator used as a value — unapplied, as in `["Tuple", "A", "Abs"]` or as a
  callback in `["Map", xs, "Factorial"]` — no longer serializes to a fragment of
  its own notation. The serializer reached for the operator's LaTeX notation,
  which is written in terms of operands, so with none it emitted `\vert\vert`
  for `Abs`, `!` for `Factorial` or `\sum` for `Sum`; none of those re-parse. A
  LaTeX dictionary entry now declares whether its notation stands on its own
  with the new `standaloneSymbol` property — true of the function commands
  (`\sin`, `\ln`, `\arctan`) and of the constant and set notations (`\Z`,
  `\emptyset`, `\varphi`) — and only a flagged entry's notation is used for an
  unapplied symbol. Every other operator is spelled out as `\mathrm{Abs}`,
  `\mathrm{Factorial}`, `\mathrm{Sum}`, which re-parses to the same symbol.
  Leaving `standaloneSymbol` unset on a custom dictionary entry is always safe:
  it only costs the nicer spelling.

- The Fungrim identity artifact was regenerated against the canonical forms
  above (1445 rules: 1435 simplify + 10 solve). Five imaginary-unit identities
  were retired because canonicalization now performs them natively, which made
  each rule a no-op: `\sqrt{-1} = i`, `i^2 = -1`, `1/i = -i`, `i^3 = -i` and
  `i^4 = 1`. Every rule matching on the imaginary unit was re-encoded to the
  `["Complex", 0, 1]` canonical spelling; none was lost, and no rule's meaning
  changed. Separately, the offline rule compiler's self-test no longer rejects a
  rewrite whose result is structurally identical to the expectation but carries
  a different binder identity (the fallback compared with `isSame` and `isEqual`
  only, and `isEqual` no longer proves identities in free variables) — this
  recovers the `Sinc` derivative identity.

- **A negated product now has a single canonical spelling.** `canonicalMultiply`
  normalizes signs before folding exact numeric factors, so a fold that itself
  produced a negative real coefficient — only a product with complex factors
  can, e.g. `i \cdot i = -1` — stranded a literal `-1` operand:
  `["Multiply", "ImaginaryUnit", "ImaginaryUnit", "a", "b"]` canonicalized to
  `["Multiply", -1, "a", "b"]`, which serializes as `-(ab)` and re-parses as the
  structurally different `["Negate", ["Multiply", "a", "b"]]`. A fold-produced
  negative coefficient now re-enters the sign normalization, so both spellings
  converge on `Negate(Multiply(a, b))` — the same form literal input has always
  produced. With this, every remaining serialize-and-reparse exception in the
  MathNet corpus ledger is a documented-lossy prettification: the ledger carries
  zero bug classes (385/391 round-trip).

- **A function assigned at the top level is no longer mistaken for an un-applied
  builtin.** The single-uppercase-letter fallback (see the `N`/`D` entry above)
  decided "standard library" by scope position, but
  `ce.assign('F', ce.parse('x \mapsto x^2'))` lands its definition in the same
  scope as the library — so `F + 1` silently shadowed the function with an
  unknown variable, and from then on `F(2)` evaluated to the product `2F`. The
  fallback now discriminates on the definition's origin: a user-defined function
  used as a numeric operand surfaces an `incompatible-type` error and the
  function stays intact. Devolution of the builtins themselves (`N + 1`, `S/D`)
  is unchanged.

- **A raw (non-canonical) symbol now evaluates through its binding**, matching
  the behavior raw and structural _function_ nodes gained in 0.101.0. With `x`
  assigned `5`, `ce.box('x', { canonical: false }).evaluate()` returned the
  symbol `x`; it now returns `5`, while the receiver stays on its tier. A symbol
  with no assigned value still evaluates to itself.

- **The ellipsis fold barrier holds at any depth, on every route.** A product
  carrying a `ContinuationPlaceholder` (`\dots`) in a nested operand could still
  be spliced — and its factors folded or reordered across the ellipsis — when it
  arrived through raw MathJSON (`ce.box`), wrapped in a `Sequence`, or as an
  explicit `\cdot`/`*` chain hanging off a juxtaposed run:
  `(px_1 + 1) \cdots (px_n + 1) \cdot p^m` re-serialized with the `\dots` moved
  to the front. All flattening sites now share one depth-aware barrier, and an
  explicit multiplication folds a juxtaposed ellipsis run into a single flat
  notational product, which round-trips.

- **An unknown function head whose name collides with a claimed constant
  spelling is spelled upright.** A function head literally named `pi` serialized
  as `\pi(x)`, which re-parses as `Pi` — the constant, a different symbol. The
  head-spelling path now consults the same claimed-spellings table as bare
  symbols: `\mathrm{pi}(x)`, `\mathrm{zeta}(x)`. A custom dictionary entry for
  such a head with a notation of its own is honored — only the colliding
  auto-generated spelling is bypassed.

- `InterpolatingFunction` used as a bare symbol no longer serializes with a
  trailing empty subscript (`\operatorname{InterpolatingFunction}_{}`); it is
  spelled `\mathrm{InterpolatingFunction}`, which re-parses to the symbol. The
  applied form keeps its domain-subscript notation.

## 0.101.0 _2026-08-04_

### Breaking Changes

- **A bare `G` is now a variable, not Catalan's constant.** The LaTeX dictionary
  claimed the bare letter `G` for `CatalanConstant` ahead of any declaration, so
  a formula such as `\int_{t_i}^{t_e}(G - F)\,dt` silently read as
  `Subtract(CatalanConstant, F)`, and declaring `G` could not reclaim it. As
  with `e` and `i`, the constant is now reachable only through explicit upright
  markup: `\operatorname{G}` — also its serialized form, so `CatalanConstant`
  still round-trips — and `\mathrm{G}`. Two consequences: `G`, `G(2)` and `G_x`
  are ordinary symbols, and `\mathrm{G}` no longer parses as the upright symbol
  `G_upright`.

- **`EulerGamma` now serializes as `\operatorname{EulerGamma}`, not `\gamma`.**
  Bare `\gamma` still _parses_ as the constant, but it now yields to a
  declaration (see Improvements), which would have made the old serialized form
  ambiguous: in an engine where `gamma` is a variable, serializing an expression
  carrying the constant and parsing it back silently returned the variable.
  `\gamma` could not be disambiguated with upright markup the way `G` was —
  `\operatorname{\gamma}` already means the plain symbol `gamma` — so the
  constant serializes to its MathJSON name, which reaches `EulerGamma` through
  the generic symbol path regardless of what is declared. Rendered output that
  used to show `γ` now shows an upright `EulerGamma`.

- **An ungrouped full-signature marker on a function literal is now always the
  literal's own contract.**
  `["Function", ["Typed", body, "'(x: number) -> number'"], "x"]` previously
  read the marker as a _return type_ — the literal typed
  `(unknown) -> (x: number) -> number` — unless the signature carried an effect
  specifier. It now declares the literal's own signature (parameter types, arity
  — now checked — and return), whether or not effects are stated, matching the
  `forall` and effect-bearing readings. A plain arrow still states **no** effect
  contract. To ascribe a function-_returning_ type, use the grouped spelling,
  which is unchanged: `["Typed", body, "'((x: number) -> number)'"]`.

- **`expr.isEqual()` and `=` no longer prove symbolic identities.** Equality is
  now _arithmetic_: the operands are evaluated, compared structurally, and —
  when their difference has no unknowns — compared numerically within
  `ce.tolerance`. No expansion, no simplification and no sampling is attempted.
  An identity between expressions with free variables, such as
  `\sin^2 x + \cos^2 x = 1` or `(x+1)^2 = x^2 + 2x + 1`, therefore returns
  `undefined` instead of `true`, and the corresponding `Equal` expression stays
  inert (as it already did for any undetermined comparison, so an equation is
  still usable as an argument to `Solve`). Every `=` comparison is now cheap and
  predictable. **Migration:** wherever an identity was being proven, call
  `expr.isIdenticallyEqual(other)`, or evaluate `["IdenticallyEqual", lhs, rhs]`
  (LaTeX `lhs \equiv rhs`) instead of `["Equal", lhs, rhs]`. Comparisons of
  numbers, of constant expressions, and of expressions that evaluate to the same
  structure are unaffected.

- **`expr.isSame()` no longer follows the value of a symbol.** It is now
  strictly syntactic everywhere: it compares canonical forms as written and
  never substitutes an assigned value. Previously a top-level
  symbol-versus-literal comparison dereferenced the binding — with `one := 1`,
  `ce.symbol('one').isSame(1)` was `true` — while the same comparison between
  two symbols, or nested inside a larger expression, did not, which made the
  method inconsistent with itself. With `x := 5`, `ce.symbol('x').isSame(5)` is
  now `false`. **Migration:** use `expr.isEqual(value)` — or `expr.is(value)`,
  which adds a numeric fallback for constant expressions — to compare values;
  `.isSame()` answers "is this the same expression?" only. Internal checks
  against a literal operand, such as `op.isSame(0)`, are unaffected. One
  canonicalization consequence: the `x^0 → 1` fold is now a pure generic-symbol
  fold (like `x/x → 1`), so `z^0` canonicalizes to `1` even while `z := 0` —
  previously the assigned value was peeked and the fold was blocked. The literal
  `0^0` still canonicalizes to `NaN`.

- **A bare `\equiv` now parses as `IdenticallyEqual`, not `Equivalent`.**
  `\equiv` is the mathematical identity sign, so `p \equiv q` parses as
  `["IdenticallyEqual", "p", "q"]` (see New Features). The biconditional keeps
  all of its other notations — `\iff`, `\Leftrightarrow`, `\leftrightarrow`,
  `\Longleftrightarrow`, `\longleftrightarrow` — and `Equivalent` still
  serializes as `\iff`, so logic round-trips are unaffected; only the reading of
  `p \equiv q` as a biconditional changes. Over boolean operands the two
  operators agree in any case, since two propositions are identically equal
  exactly when they are equivalent. **Migration:** write `p \iff q` where a
  biconditional is meant. A `\equiv` followed by `\pmod{n}` is still a
  `Congruent`, and `\not\equiv` still negates a congruence.

- **`ce.expr()`'s `scope` option now RECEIVES the boxing's writes.** It used to
  steer _lookup_ only: auto-declared free symbols, undeclared call heads and
  type inference all still landed in the engine's current scope, so the option
  half-contained a boxing. The whole box now runs with the supplied scope as the
  current lexical scope, so every declaration and inference lands rooted there
  and discarding the scope discards the writes. Code that passed `scope` to
  redirect lookups while deliberately keeping the declarations in the engine's
  scope must now box without the option (or re-declare the harvested names). The
  same semantics are what the new `scope` option on `ce.parse()` provides — see
  New Features.

- **`evaluate()` on a raw or structural expression now evaluates through its
  canonical form.** Binder machinery — declaring a `Sum` index, normalizing
  `Tuple → Limits` — is a canonicalization step, so evaluating a structural
  binder ran its handler against an unbound index and returned a _silently wrong
  value_: `["Sum", "n", ["Tuple", "n", 1, 3]]` boxed with `structural: true`
  evaluated to `9` instead of `6`, and the same tree boxed raw evaluated to
  itself. Both routes (and `.N()` and async evaluation) now produce the
  canonical result: the receiver stays on its tier, but `.evaluate()` leaves the
  tier and every tier agrees on the value. Two consequences: a raw `2 + 3` now
  evaluates to `5` instead of echoing itself, and arity or type errors that only
  canonicalization checks can now surface from evaluating a raw tree (a raw
  `5 |> 3` evaluates to the same `incompatible-type` error the canonical route
  reports, where it used to stay an inert `Pipe`). A bare unbound _symbol_ still
  evaluates to itself.

- **Quantifiers now canonicalize their operands.** `ForAll`, `Exists`,
  `NotForAll`, `NotExists` and `ExistsUnique` held their operands without a
  canonical handler, so a parsed quantifier kept raw parse sugar in its body:
  `InvisibleOperator` where `Multiply` was meant, `Delimiter(Sequence(…))` where
  a `Tuple` was meant, stray `HorizontalSpacing` from `\quad`. The condition and
  body are now canonical (e.g. a condition `x > 0` normalizes to `0 < x` like
  every other comparison), which also makes the serialized form round-trip.

### New Features

- **Evaluate handlers now receive the expression being evaluated.** The handler
  options carry an optional `expression` field — the canonical node, whose
  `.ops` are the raw (pre-numericization) operands, unlike the handler's first
  parameter which holds the evaluated operands (see the `EvaluateHandlerOptions`
  documentation for the caveats: positional correspondence does not survive
  associative flattening, `ReleaseHold`, or dropped operands, and for `lazy`
  operators the first parameter is also unevaluated). The first consumer is
  `Power`: under `.N()` a negative base's real-vs-complex branch is now decided
  from the exponent's **exact** rational — read from the raw operand, or through
  a symbol's binding — so `.N()`, the type handler, and the compiled constant
  fold agree for exact odd-denominator exponents of any term size
  (`(-2)^{1000003/1000001}` is now real on every leg; parity is decided on the
  exact bigint terms, so denominators beyond 2⁵³ do not corrupt the branch).
  Exponents with no exact provenance (floats, `π`, a lambda parameter, a `Sum`
  body) keep the rate-bounded float reconstruction.

- **`expr.hash` is now a documented public property.** A structural,
  bucketing-grade hash suitable as an **in-memory** cache or bucket key with a
  deep compare on hit. The documented contract: `a.isSame(b)` implies
  `a.hash === b.hash` (the hash is a pure function of the canonical tree — a
  symbol's assigned value never affects it); it is deterministic within a
  release but **not stable across releases**, so it must never be persisted; it
  is 32-bit-class, so a hash hit must be verified with `isSame()`; and it folds
  bound-variable names (binding-identity, not alpha-equivalence), matching
  `isSame()`. The property itself is unchanged — it was previously marked
  `@internal`.

- **Parametric polymorphism: `forall` type variables in function signatures.**
  The type language gains rank-1 (prenex) type variables with optional ground
  upper bounds: `forall T. (list<T>) -> T`,
  `forall T: indexed_collection. (T) -> T`,
  `forall T, U. (list<T>, (T) any -> U) -> list<U>`. Any identifier can be a
  variable — the clause declares it, and within its arm the quantified name
  shadows a nominal type of the same name (`forall` itself is now reserved in
  type strings). User functions can be declared generically
  (`ce.declare('swap', 'forall T, U. (tuple<T, U>) -> tuple<U, T>')`); each call
  solves the variables from the operands by local type inference (repeated
  variables join — `forall T. (T, T) -> T` at an `integer` and a `real` gives
  `real`), the result type is obtained by substitution, and a violated bound
  reports the instantiated expected type. Overload sets quantify per arm, with a
  ground arm beating an equally-specific generic one. On the query APIs,
  `matches` with a generic pattern answers existentially (`(number) -> number`
  matches `'forall T. (T) -> T'`) while `couldMatch` reads each variable as its
  declared bound. A generic declaration may be implemented by an `evaluate`
  handler or by a function body — see the two entries below. See the new
  "Generic Signatures" section of the types guide.

  Twenty-five library operators now state their contracts declaratively with
  generic signatures instead of imperative type handlers, preserving operand
  kinds and dimensions exactly: `Identity`, `Prime`, `BaseForm`, `Chop`,
  `PlusMinus`, `Remainder`, `Conjugate`, `Inverse`, `Reverse`, the tuple
  constructors (`Single`, `Pair`, `Triple`, `KeyValuePair`), and the collection
  family (`Take`, `Drop`, `Slice`, `DeleteAt`, `Insert`, `ReplaceAt`, `Sort`,
  `Unique`, `RandomShuffle`, `Tally`, `Partition`, `ChunkBy`) — e.g. `Reverse`
  of a `matrix<integer^(2x3)>` is now statically a `matrix<integer^(2x3)>`, and
  `Take` of it a `list<vector<integer^3>>`. As part of this, a dimensioned
  collection is now also a subtype of a collection of its rows
  (`matrix<integer^(2x3)> <: indexed_collection<vector<integer^3>>`), matching
  how single-index access has always evaluated.

- **Generic function literals: a `forall` signature can now be implemented by an
  inline body.** A whole-signature clause makes a `["Function"]` literal generic
  — written as a signature string
  (`["Function", body, "'forall T. (x: T) -> T'"]`), as a `Typed` marker on the
  body, or as the declared type of the symbol the literal is assigned to — and
  it works on every route: `ce.assign`, the `Assign` operator, and an annotated
  Cortex `const`/`let`. Each call instantiates the clause, so on one engine
  `f(5)` types `finite_integer` and `f("a")` types `string`, bounds are enforced
  at the call, and a collection argument still broadcasts at the variable's
  bound. Declaring first and assigning after —
  `ce.declare('nest', 'forall T. (x: T, n: integer) -> T')` — makes generic
  _recursion_ work for the first time. The body is canonicalized once with the
  quantified parameters **erased**: inside it, `x: T` is an ordinary unannotated
  parameter, a bound does not narrow it, two parameters sharing `T` are not
  known to have the same type, and the variable-correlated result is a trusted
  ascription rather than a run-time check. Four boundaries are rejected with
  dedicated diagnostics: partial application of a generic function, a generic
  clause in a multi-clause set (in either direction), a function-literal body
  for a generic overload set, and a `forall` clause on an individual parameter
  annotation.

- **Cortex: generic function definitions, `function f<T>(…)`.** A definition
  takes a **type-parameter clause** between its name and its parameter list:
  `function g<T: number, U>(x: T, k: (T) any -> U) -> list<U> { … }`. Bounds
  must be ground types, the effect specifier and return type are unchanged, and
  the clause names scope over the definition's **head** only — its parameters,
  effect specifier and return type — so a body-local annotation such as
  `let y: T` is an ordinary unknown-type error. Unused variables, result-only
  variables and non-ground bounds are diagnosed at parse time by the type
  grammar itself; an empty clause, a duplicate name and a generic clause in a
  multi-clause set have their own codes (`empty-type-parameter-clause`,
  `duplicate-type-parameter`, `generic-clause-unsupported`). A generic
  definition serializes back to the sugared form losslessly. The math definition
  form does not take a clause: `f<T>(x) = x` remains an ordinary expression,
  since it is genuinely ambiguous with a relational one.

- **Transparent generic type aliases: `type alias Pair<T> = tuple<T, T>`.** A
  structural type alias can now take a **type-parameter clause**, in Cortex as
  above and from the host with
  `ce.declareType('Pair', 'tuple<T, T>', { alias: true, typeParams: ['T'] })` —
  parameter names, `{ name, bound }` records or one clause string
  (`'T, U: number'`). The applied spelling is usable anywhere a type is written:
  an annotation, a parameter, the element position of another type. It expands
  **eagerly**, at type resolution, into the substituted definition, so nothing
  downstream ever meets an applied reference: `Pair<integer>` _is_
  `tuple<integer, integer>`, and that expansion is what `.type`, `toString()`,
  `matches()` and error messages show — the source keeps the spelling it was
  written with, and a Cortex program round-trips `let p: Pair<integer> = (1, 2)`
  verbatim. Arguments nest (`Pair<Pair<integer>>`, `list<Pair<integer>>`) and
  aliases compose (`type alias Wrap<T> = list<Pair<T>>`). A parameter may carry
  a ground bound, enforced wherever the alias is applied; an argument that is
  itself a type **variable** — a `forall` clause's, or the enclosing alias's own
  parameter — is admitted by comparing bounds: the variable's declared bound
  must satisfy the parameter's (an unbounded variable is bounded by `any`, so a
  bare `forall T. (Keyed<T>) -> T` reports `generic-alias-bound` naming both
  bounds). Four limits, each with its own diagnostic: a generic alias may not
  refer to **itself** (recursive generic aliases are out of scope), every
  parameter must be **used** in the definition, a bare or wrongly-sized
  application is an arity error, and a parameterized **nominal** type is still
  unsupported. No constructor is minted for a generic alias and its name is not
  claimed in the value namespace at all, so a function of the same name stays
  legal, before or after. A dependent alias **snapshots** what it was built
  from: re-running a `type` statement replaces that alias, and re-running the
  cell re-declares the dependents in order. See the new "Generic Type Aliases"
  section of the types guide.

- **`IdenticallyEqual`: a dedicated operator for mathematical identities.**
  `["IdenticallyEqual", lhs, rhs]`, the method `expr.isIdenticallyEqual(other)`
  and the LaTeX notation `\equiv` (the `≡` character parses the same way, and
  the operator serializes back to `\equiv`) ask whether two expressions have the
  same value for **every** value of their free variables. This is the tier that
  proves an identity: it applies expansion and simplification and evaluates both
  sides at pseudo-random sample points, so a `True` verdict may rest on sampling
  — a very strong indication rather than a formal proof, and the only comparison
  in the engine that can answer this way. It is three-valued: an identity that
  can neither be established nor refuted stays unevaluated. The machinery itself
  is not new — it is the prover that `Equal` used to run — but it is now reached
  explicitly. On the compile targets, `Equal` keeps its tolerance comparison
  while `IdenticallyEqual` and `Same` decline to compile.

- **`Same` (the Cortex `===` operator, also written `≣`) is now specified as
  canonical-syntactic equality**, matching `expr.isSame()`. It compares the
  canonical form of its operands as written and **never dereferences the value
  of a symbol**: with `x := 5`, `["Same", "x", 5]` is `False` while
  `["Equal", "x", 5]` is `True`. It remains total — always `True` or `False`,
  with no tolerance — and keeps no IEEE exemption for `NaN`:
  `["Same", "NaN", "NaN"]` is `True` where `["Equal", "NaN", "NaN"]` is `False`,
  and the same holds inside a collection
  (`["Equal", ["List", "NaN"], ["List", "NaN"]]` is `False`). Together with
  `Equal` and `IdenticallyEqual`, this gives three tiers of comparison —
  syntactic, same value, and same function of the free variables — described in
  the "Comparing Expressions" section of the Symbolic Computing guide.

- **Per-call scope control: `ce.parse(latex, { scope })` and
  `ce.createScope()`.** Canonical parsing writes to the engine's lexical scope —
  free symbols are auto-declared, undeclared call heads become inferred
  functions, types are narrowed by usage — which consumers parsing untrusted or
  out-of-order input had to contain with `pushScope`/`popScope` discipline.
  `scope` makes the containment first-class: the whole parse runs with the
  supplied scope current, so name resolution walks `scope → parents` and every
  auto-declare and inference lands rooted there.
  `ce.createScope(bindings?, parent?)` builds one from a declarations table,
  which turns each parse into a function of (latex, dictionary, declarations):

  ```js
  const scope = ce.createScope({ h: 'function', p: 'tuple<3>' });
  const expr = ce.parse('h(u) = u^2', { scope });
  ```

  One binding per definition head is enough to make a definition parse against a
  predeclared name of a different arity — or against a builtin
  (`N(x, m, s) = …`) — with no mutation and no ordering requirement, and a
  binding for a subscripted spelling (`{ theta_z: 'number' }`) is what
  `\theta_z` resolves to instead of being declared. Trigger-spelled names now
  participate fully: a subscripted Greek-letter base consults the same
  joined-name resolution as ASCII names, so a `function`-typed binding (or
  `resolveSymbol` answer) for `alpha_1` makes `\alpha_1(x)` parse as a function
  application — previously only ASCII bases could commit a joined name. The
  scope is caller-owned and readable: `declarations()` returns its entries with
  their post-inference types (as `BoxedType`, so `entry.type.toString()` is the
  canonical, fingerprintable spelling) and an `inferred` flag, sorted by name;
  `narrowings()` reports definitions in _enclosing_ scopes that a contained
  parse narrowed (the one write an ephemeral scope cannot contain); `dispose()`
  releases the scope's definitions from configuration-change tracking. A
  definition harvested from one scope can seed the next —
  `ce.createScope({ f: def })` installs the same object, preserving binding
  identity — and the scope's definitions are never auto-disposed, so a harvested
  definition outlives the call.

### Issues Resolved

- **`Real`, `Imaginary` and `Argument` are real-by-definition for the compile
  targets** (Tycho item 147). The complexness analysis judged these heads by
  their operands, so `Mod(Im(z), 1)` over a declared-complex `z` tripped the
  GLSL real-only helper gate and failed closed — even though the projections
  always lower to a real scalar (`(z).y`, `atan(z.y, z.x)`, `.im`) on every
  target. The analysis now short-circuits these heads as real-shaped regardless
  of their operand's type, so real projections of complex interiors
  (`Mod(Im(b + a·ln(x+iy)), Im(w))`, domain-coloring rows) compile again.
  Provably complex operands (`Mod(√-2, 1)`, `Mod(i·x, 1)`,
  `Mod(Conjugate(z), 1)`) still fail closed.

- **A function literal with an invalid explicit `Block` body no longer prints a
  bare internal `TypeError` while boxing** (Tycho item 150). Canonicalizing
  `["Function", ["Block", ⟨body with an Error node⟩], …]` dereferenced the
  invalid block's missing scope, and the caught
  `Cannot read properties of undefined (reading 'bindings')` was printed raw to
  `console.error` before recovering to a non-canonical literal. The block is now
  rebuilt so scope creation runs even over an invalid body: the literal boxes
  canonically (still `isValid: false`), with no console noise. Two siblings
  fixed alongside: the nullary form silently produced a canonical literal with
  an _unscoped_ block, and an **empty** `Block` body threw the same TypeError
  (it now follows the annotated branch's convention: an empty body is
  `Nothing`). The two recovery catch sites in `applyOperatorDefinition` now
  attribute anything they print (`ComputeEngine: error canonicalizing \`op\`: …`) instead of emitting a bare message.

- **Machine-precision `.N()` of a negative base to a rational power took the
  wrong branch.** At machine precision, `(-2)^{100/3}` numericized to `-1.08e10`
  (wrong sign — p = 100 is even), `(-2)^{7/3}` took the complex branch where the
  real root exists, and `(-2)^{7/6}` — a genuine even-q case — wrongly produced
  a real value. The exponent is numericized at the engine's 15-digit precision
  before the real-root convention applies, which put it far outside the branch
  decision's reconstruction tolerance. The tolerance now scales with the engine
  precision, threaded identically through the type handler and the compiled
  constant fold. A 288-cell rational sweep against an independent reference went
  from 53 mismatches to 0.

  Fixing this exposed a deeper, longstanding defect in the same fallback: every
  irrational's continued-fraction convergents eventually fall within any fixed
  tolerance, so a negative base raised to an **irrational** exponent could
  silently take the real branch — `(-2)^{\sqrt2}` and `(-2)^{1/\pi}` were
  wrong-real on _both_ precision lanes, `(-2)^e` on the bignum lane, `(-2)^\pi`
  on the machine lane. The reconstruction now also requires a coincidence bound
  (the candidate rational must be identifiable as _the_ value the double was
  rounded from, not merely a nearby convergent): π, e, √2, √5, ln 2 and plain
  non-rational floats now take the complex principal branch identically at every
  precision, and the compiled constant fold follows (`(-2)^{\sqrt2}` folded to a
  wrong real constant; it now folds to the complex value, matching `.N()`).
  Exact `Rational` exponents are unaffected by the bound. Known limitation: once
  an exponent has been numericized, a rational whose terms exceed what a
  15–17-digit double preserves (denominator ≳ 3·10⁵) is indistinguishable from
  an irrational and takes the complex branch.

- **Symbols declared with a non-finite type now report their finiteness.** A
  symbol declared `non_finite_number` answered `isFinite`/`isInfinity` with
  `undefined`; both predicates now decide from the declared type (`isFinite` is
  `false`, `isInfinity` is `true`), completing the type-consult work started for
  function expressions in 0.100.2. The workaround checks this blindness had
  required in the `Add`/`Multiply`/ `Divide` type handlers were retired after an
  instrumented full-suite run showed the getters now subsume them everywhere.

- **A parse or box under a partial canonical form no longer declares free
  symbols.** `ce.parse(s, { canonical: ['Number'] })` — any partial form —
  auto-declared every free symbol into the current scope, so containing the
  writes of an untrusted or out-of-order parse required `pushScope`/`popScope`
  discipline even though the result is not fully canonical. A partial form now
  follows the same symbol contract as the structural route: names resolve
  against the scope chain — an existing declaration still binds, and a
  `holdUntil: 'never'` constant still substitutes its value — but a name that
  resolves to nothing stays unbound instead of being declared.
  `canonical: true`, `canonical: false` and `structural: true` are unchanged.

- **A function declared with a scalar return type is now rejected when added to
  a tuple.** `scalar + tuple` is an error when the scalar is provable, and a
  declared (non-inferred) numeric result counts as proof. That guard never fired
  for a head declared with a function _type_ —
  `ce.declare('f', '(number) -> number')` — because such a declaration produces
  a value definition rather than an operator definition, and the guard consulted
  only the latter: `f(x) + (1, 2)` stayed a symbolic `Add`. It now falls back to
  the head's value definition. The inferred cases are unchanged and still stay
  symbolic, an inferred numeric type being retractable evidence rather than
  proof: a signature inferred from a `:=` body, or a function type inferred from
  earlier use.

- **A built-in operator name used as a callback no longer compiles to a broken
  artifact.** `Map(xs, Sin)`, `CountIf(xs, IsPrime)` and the like compiled
  "successfully" and then threw `_f is not a function` at run time: the callback
  symbol fell through to a free-variable lookup instead of resolving to a
  function. Such a name is now eta-expanded into a shared emitted wrapper
  (`const _fn_Sin = (_tv1) => Math.sin(_tv1)`) — the same machinery a
  user-defined function callback already used — so the artifact runs and agrees
  with the interpreter. The expansion happens at the operator's **required**
  arity, so an operator with an OPTIONAL tail works too (`Sum(Map(xs, Ln))`: a
  callback site applies `Ln` unary and the optional base defaults), as does a
  unary operator with a target operator mapping (`Negate`), which the
  bare-operator-symbol path used to refuse outright. Where a built-in cannot be
  expanded at all — a variadic tail (`Less`), no required parameter (`Random`),
  or a wrapper body with no lowering on the target (`IsPrime` on JavaScript, any
  function value on the shader targets) — compilation now fails closed at
  compile time and the caller falls back to the interpreter, instead of
  producing an artifact that throws. (A bare single-uppercase-letter operator
  name such as `D` or `N` is exempt: the engine reads those as variables when
  they appear un-applied, so they keep their free-symbol reading.)

- **Six classes of LaTeX round-trip defects are fixed** (found by the corpus
  round-trip lane, `npm run check:roundtrip` — 18 of its 37 recorded failures
  cleared):
  - A symbol naming an operator, used as a value, serialized to the _empty
    string_, silently deleting the operand: `(A, +)` — the tuple of a set and
    its operation — parsed to `["Tuple", "A", "Add"]` but serialized as `(A,)`.
    Such a symbol now falls back to `\mathrm{Add}`, which parses back to the
    same symbol.
  - A one-operand `Tuple` serialized as `(x)`, which parses back as plain `x`.
    It now serializes with a trailing comma, `(x,)`, a spelling the parser
    already accepted.
  - A product containing an ellipsis (`ContinuationPlaceholder`) serialized with
    mixed separators (`ab\times\dots\times z`), so the juxtaposed run regrouped
    into a nested `Multiply` when parsed back; and a product of rationals with
    an ellipsis was merged into a single `\frac`, moving factors across the
    ellipsis and folding them (`3/2 · 6/5 · … · X` came back with a spurious
    `9/5`). An ellipsis product now joins every factor with an explicit
    multiplication sign and is never merged into one fraction.
  - `Prime` serialized its exponent unbraced (`A^\prime`), so a following letter
    was swallowed into the command name: `\angle BA'C` serialized back to
    `\primeC`, which does not parse. The exponent is now braced.
  - A quantifier body serialized without delimiters, so
    `\forall k\ge0, a_0=9\land a_1=3` parsed back with the `\land` bound _above_
    the `ForAll`. The body is now parenthesized when its precedence requires it,
    and — with quantifier operands now canonical (see Breaking Changes) — the
    body round-trips structurally.

- **`Find` now types as the element, not the collection.** Its static type was
  the whole collection's (`Find([1,2,3], p)` claimed `list<integer>`) while
  evaluation returns a single element or `Nothing`; it is now
  `element | nothing`.
- **`BaseForm`'s declared result contradicted its behavior**
  (`-> string | nothing` while echoing its numeric operand); it now echoes the
  operand type.
- **`If` without an else branch keeps the `nothing` arm in its type.** A false
  condition yields `Nothing`, but the static type silently dropped that arm.

### Improvements

- **Structural-tier `freeVariables`, `unknowns` and `references` now derive
  bound variables from the operator's binding sites.** On a structural tree
  (`ce.box(…, { structural: true })`) a binder's bound variable leaked as a free
  variable whenever its operand carried a raw parse spelling the free-variable
  walk did not know: `["Sum", ["Power", "n", 2], ["Tuple", "n", 1, 10]]`
  reported `n` as free, while the canonical route reported nothing. The bound
  names now come from the operator definition's binding-site selectors, which
  read every spelling the binder accepts (`Tuple`, `Element`, `Limits`, a bare
  symbol, held or not), so the structural and canonical routes agree. Consumers
  that pattern-match raw binder spellings to build capture-avoidance sets can
  retire those collectors. A node with no operator definition
  (`canonical: false`) has no binding sites to consult and keeps the previous
  spelling-based recognition, and a binder whose variable survives into its
  result (`D`, `Series`) still reports that variable as free.

- **The bare-assign route now broadcasts like the value route.** Assigning an
  annotated or generic function literal directly (`ce.assign('f', …)` with no
  prior declaration) installs an operator definition whose broadcastability is
  derived from its parameter types, so `f([1,2,3])` with
  `f: (x: number) -> number` — or `forall T: number. (T) -> T` — maps over the
  list instead of rejecting, matching both the declare-then-assign route and
  what compiled code already did. Unbounded generic identities still return
  their operand whole, and an empty source answers `[]` on every route.
- **Re-assigning a function literal no longer changes its representation.**
  Assigning the same annotated literal twice (the notebook re-run pattern) used
  to silently convert the operator definition into a value definition, losing
  the derived broadcast behavior; re-assignment now rebuilds the same
  representation as the first assignment.
- **Function-literal signature markers may reference user-declared types when
  serialized to Cortex**, and anonymous literals carrying a signature marker
  round-trip losslessly instead of dropping the ascription.

- **A broadcast argument at a generic parameter now binds the _element_ type.**
  When a collection is admitted against a scalar-bounded type variable — the
  lift that makes `Conjugate([1, 2, 3])` legal — the variable used to bind the
  whole argument, and the result was un-wrapped again only where it was the bare
  variable. A result that merely _mentioned_ the variable then came out one rank
  too high: `forall T. (T) -> tuple<T, T>` over `[1, 2]` typed
  `list<tuple<vector<…^2>, vector<…^2>>>` against the value `[(1, 1), (2, 2)]`.
  The bound is still checked at the scalar base — admission is unchanged — but
  the variable now binds the argument's element type and the call site's
  ordinary broadcast wrap re-adds the rank, which gives one rule for every
  result shape: an echo (`Chop`, `Conjugate`) types exactly as before, and a
  result that mentions the variable is the per-element result with the
  argument's shape around it. Two static types change: a mixed-rank or
  union-typed argument now takes the broadcast wrapper's (coarser) shape answer,
  the same one its ground counterpart gets, and `Remainder(M, 7)`-shaped calls
  no longer widen to a union at all — `matrix<finite_integer^(2x2)>`, where the
  whole-argument bind gave
  `list<finite_integer | vector<finite_integer^2>^(2x2)>`. Only the kinds a
  broadcast actually maps are peeled: a `set` argument is admitted but never
  mapped (`Conjugate(Set(1, 2))` stays a `set`), and a tuple stays atomic. In
  the same pass, a rank ≥ 2 argument to a generic **function literal** now maps
  to the scalar leaves on the value route too, matching the operator route and
  compiled code: with `f: forall T. (x: T) -> tuple<T, T>` assigned
  `x |-> (x, x)`, a 2×2 argument evaluates to a 2×2 of pairs of scalars instead
  of applying the literal to whole rows.

- **A malformed type annotation no longer swallows the statement after it.**
  Recovery from a bad annotation ran twice — once inside the type subparser and
  once in its caller — so a declaration such as `let x: )bad( = 1`
  resynchronized one statement too far and discarded the line that followed. The
  subparser now only diagnoses, and each caller resynchronizes at the unit its
  own grammar uses: a statement boundary for a declaration, the next `,` or
  closing bracket for one element of a list. A malformed annotation in a
  function's parameter list, in a `|->` parameter list or in a `match` tuple
  pattern therefore costs only its own annotation — the parameter survives
  untyped and the rest of the list still parses. The `|->` case is the one that
  was silently wrong rather than merely noisy: the parameters after the
  malformed one were dropped, so the lambda went on to parse at a different
  arity. The resync honors `<…>` nesting, so an unclosed applied alias
  (`f(x: Pair<integer, string)`) no longer mints a bogus parameter out of the
  type's own argument list.

- **Generic values describe themselves, and an anonymous generic application is
  typed.** A function literal assigned to a symbol declared with a polytype now
  carries that polytype as its own type on all three routes (`ce.assign`, the
  `Assign` operator, an annotated Cortex `const`/`let`), so the stored value
  reports `forall T. (x: T) -> T` instead of the arrow its erased body would
  infer — as long as every parameter of the clause mentions a quantified
  variable (a literal with a ground parameter still self-describes as its
  inferred arrow). Applying a generic literal _anonymously_ —
  `["Apply", literal, arg]`, and the bare `[literal, arg]` it canonicalizes from
  — instantiates the clause too, so the application types `finite_integer` at
  `5` and `string` at `"a"` rather than falling back to `unknown`. And
  re-assigning an **untyped** literal over a signature that was itself _derived_
  from an earlier assignment now fully replaces it, arity included; a signature
  the author declared (any `ce.declare` form) stays sticky, as before.

- **Euler derivative notation and `\gamma` now yield to a declaration.** Both
  spellings are claimed by a parselet that runs ahead of symbol resolution, so
  no declaration could reclaim them: `D_x + 1` parsed as the derivative of the
  constant function `x ↦ 1`, and `\gamma` was always the Euler-Mascheroni
  constant. Each parselet now consults the symbol oracle first — the engine
  scope, supplemented by the `resolveSymbol` parse option. `D_x` reads as a
  symbol when the joined name `D_x` is declared (the same sibling-name rule
  subscripted spellings already use) or when `D` itself is shadowed by a
  non-function declaration; a function-typed `D` keeps the derivative reading.
  `\gamma` reads as the symbol `gamma` when `gamma` is declared. Left
  undeclared, both notations parse exactly as before. This gives a host
  embedding the engine a way to say "these are my variables" without having to
  replace the LaTeX dictionary.

- **Degenerate big operators (`Σ_{i=a}^{a}`, `Π_{i=a}^{a}`) now reduce.** A big
  operator whose lower and upper bounds are structurally equal has a one-point
  domain, so it has exactly one term. Two reductions follow. First, at
  **evaluation**: a symbolic bound made the domain non-enumerable, so
  `\sum_{i=x}^{x} i^2` stayed inert; one point needs no enumeration, and it now
  evaluates to `x^2` (`Product` likewise). Second, at **canonicalization**: when
  the index does not occur in the body, the indexing set carries no information
  at all, so the "identity wrapper" spelling `\sum_{i=d}^{d} f(x)` folds to
  `f(x)` — the same generic-symbol fold family as `x/x → 1`. With several
  indexing sets only the degenerate, unused ones are dropped — and never one
  whose index a sibling indexing set's bounds reference. The canonicalization
  fold compares the bounds strictly syntactically: it never reads a symbol's
  assigned value (`\sum_{i=a}^{5}` with `a := 5` keeps its `Sum` structure —
  values belong to evaluation, where the reduction does follow them). Bounds
  that are not provably a fixed one-point domain are unaffected: `±∞` and `NaN`
  bounds keep their previous behavior, impure or invalid bounds (two
  syntactically identical `RandomInteger(1,6)` draws) stay symbolic, and literal
  equal bounds with the index used (`\sum_{i=5}^{5} i^2` → `25`) still enumerate
  as before. The evaluate-path reduction substitutes the bound for the index
  under a capture guard; a body whose inner binder could capture it stays
  symbolic rather than being silently corrupted (and the guard's refusal is
  final — it does not fall through to the closed-form rewrites, which carry no
  such guard).

- **Compile-time CSE now merges repeated pure user-function calls everywhere,
  including named callbacks.** The 0.100.0 admission of pure user-function
  applications applied only inside emitted definition bodies (where a repeated
  recursive self-call made compiled recursion exponential); a repeated call at
  the top level of the compiled expression — `f(x+1) + f(x+1)^2` — still
  compiled to two calls. Both compiler harvest routes now admit them, behind the
  same transitive callee-body validation (each level's purity is re-derived
  against current bindings at compile time, so a callee that draws, writes, or
  splices caller-supplied source stays un-merged). In addition, a **named**
  callback that resolves to a validated pure function literal no longer blocks
  eligibility: two identical `Map(xs, f)` applications with a pure user-defined
  `f` now compile to one traversal, and the same applies to typed callbacks of
  eager operators such as `CountIf` (a drawing `f` still compiles to two — draw
  streams and call counts are preserved; a callback or callee name shadowed by
  an enclosing parameter is conservatively never merged). Callbacks naming
  **built-in** operators (`Map(xs, Sin)`, `CountIf(xs, IsPrime)`) are now
  admitted as well: the compiler eta-expands them into a shared emitted wrapper,
  so what they do is the built-in's own deterministic, effect-free emission.
  They merge when the operator is pure, is the engine's own definition for that
  name, and has at least one required parameter and no variadic tail — a drawing
  built-in (`Random`), a variadic one (`Add`, `Less`), a name a user definition
  shadows, a name a caller `vars` entry maps, and a name a caller `functions` /
  `operators` mapping overrides all stay conservatively excluded. Opt out as
  before with `compile(expr, { cse: false })`.

- **`FindFit`/`FindRoot` now report a setup-phase deadline in band** (Tycho item
  118 addendum). A time budget consumed entirely before the solver started —
  evaluating the data operand, differentiating the model, compiling it — used to
  escape as a bare `CancellationError` the caller could only duck-type, which an
  interpreted model over a few hundred rows hits routinely under a tight ambient
  budget. Such an expiry now answers the same record shape a mid-solve expiry
  does, with `timedOut: True` and a new `phase` entry naming how far the call
  got: `"setup"` (nothing was fitted — `iterations` is `0`, `residualNorm` is
  `NaN`, and the reported parameters are the starting guesses) or `"solve"`
  (genuine best-so-far, as before). Only an expired time budget converts: every
  other failure during setup — a malformed model, bad data, an abort signal —
  behaves exactly as it did. The keys appear only on a timed-out record, so a
  successful fit is unchanged.

### Performance

- **Symbolic equality of free-variable expressions now samples before it
  simplifies.** The `eq()` free-variable branch ran expand+simplify on both
  sides to try a structural proof, and only then fell back to stochastic
  sampling — on large trees the symbolic pass costs hundreds of milliseconds
  and, whenever the sides genuinely differ, contributes nothing the sampler
  doesn't decide alone. The order is now reversed: sample first (a compile plus
  ~50 deterministic point evaluations), and run the expand+simplify proof only
  when sampling is uninformative (no compilable/finite sample points). Verdicts
  are unchanged: a sampled agreement was already accepted as `true`, a sampled
  disagreement already degraded to `undefined` under the truth-under-constraints
  contract, and an identity provable by simplify cannot genuinely disagree at a
  shared sample point. On a consumer's Voronoi document whose piecewise rows
  compare each broadcast element against `min(⟨list⟩)` (18 identical
  expand+simplify passes of the same min-expression), the document build drops
  from 14.6 s to 6.2 s — faster than releases that predate the 0.100.2 `\bmod`
  serialization fix, which had made the comparison trees honest (and bigger).

- **Compile-time complexness analysis is no longer quadratic on large
  expressions** (Tycho item 148). The 0.100.2 operand-consulting fixes (items
  144/143) made `isComplexValued` walk a node's whole subtree per query, and the
  GPU emitters query per node — a deeply nested expression (a textually inlined
  user-function chain) paid O(n²): a depth-6 nested chain spent 82% of its GLSL
  compile (1.5 million analysis calls) in the walk, roughly doubling large
  shader compiles relative to 0.100.1. The analysis is now memoized per
  compilation with a LAYERED memo that mirrors the context's lexical nesting:
  entering a block frame or binder mask pushes a fresh layer (an answer cached
  under a mask can never be reused outside it), and leaving restores the
  enclosing layer — so binder-dense bodies (nested `Sum`/`Product`) memoize too,
  instead of wiping the cache at every mask crossing. Compiled output verified
  byte-identical across targets. The depth-6 chain compiles 7× faster than
  unmemoized (and ~2× faster than 0.100.1, which did fewer, cheaper walks);
  scaling on the regressed class — deeply nested inlined expression chains — is
  near-linear in expression size again. (Deeply nested _binder_ chains,
  `Sum`-in-`Sum`, keep a pre-existing superlinear analysis cost that 0.100.1
  shares — measured, not part of this regression.)

## 0.100.2 _2026-08-03_

### New Features

- **`Repeat` compiles on the JavaScript target.** `Repeat(7, 3)` previously
  failed closed (interpreted fallback); it now lowers to a native array
  construction with interpreter parity at the edges: the value is evaluated
  exactly once and replicated (`Repeat(Random(), 3)` yields three copies of a
  single draw — and consumes its draw even when the count is ≤ 0, matching the
  interpreter), a zero or negative count yields `[]`, and the 1-argument
  infinite form and a statically non-finite count still decline — the
  interpreter leaves `Repeat(7, ∞)` unevaluated, so a compiled `[]` would be a
  valid-looking value with the wrong meaning.

- **`Binomial`/`Choose` compile on the GPU targets.** A literal k ∈ 0…8 unrolls
  to the falling-factorial form on GLSL and WGSL (`Binomial(x+1, 2)` →
  `(((x + 1.0) * ((x + 1.0) - 1.0)) / 2.0)`), matching the interpreter's
  generalized semantics for non-integer and negative first operands
  (`Binomial(5.5, 2)` = 12.375, `Binomial(-1, 2)` = 1). An impure
  (Random-family) operand is hoisted and drawn exactly once;
  `Binomial(Random(), 0)` declines rather than folding to `1.0` (the interpreter
  consumes that draw); a statically non-finite first operand declines
  (`Binomial(∞, k)` is NaN in the interpreter for every k, including k = 0);
  non-literal, negative, non-integer, or larger k fail closed.

### Improvements

- **Products and quotients with a provably non-finite real factor now type
  `non_finite_number`.** New ratified rule: a provably non-finite real factor is
  implicitly nonzero — proven signs are required only of the finite factors.
  `2\ln(0)` and `\ln(0)/2` now type `non_finite_number` (previously the top type
  `number`); shapes admitting `0·∞`, `∞/∞` or `∞·i` keep the sound widen.
  Structurally, `Ln(0)` now reports `isFinite === false` and
  `isInfinity === true` from its static type (both were `undefined`),
  `valueOf()` projects a direction-proven infinity (`Ln(0).valueOf()` is
  `-Infinity`; `~oo` is reserved for provably non-real values), `\ln(0)/\pi`
  canonicalizes to `\ln(0)` and `2/\ln(0)` to `0`, and an unfolded
  finite-real-over-±∞ quotient types `finite_integer` (the value is exactly 0).
  Compiled emissions are unchanged.

### Resolved Issues

- **`.subs()` on a structural expression now preserves the structural form.** A
  structural receiver requested a CANONICAL rebuild, so substituting into one
  silently canonicalized it: the parse vocabulary structural form exists to
  preserve (`Subtract`, `Divide`, `InvisibleOperator`, `Delimiter`, operand
  order) was erased and exact literals were folded — substituting `k+1` for `x`
  in a structural `2(x+1)-\frac{y}{3}` returned `Add(Multiply(2, Add(k, 2)), …)`
  instead of the structural
  `Subtract(InvisibleOperator(2, Delimiter(Add(Add(k, 1), 1))), Divide(y, 3))`.
  The receiver's form is now preserved three ways (canonical → canonical,
  structural → structural, raw → raw); an explicit `canonical` option is
  unchanged. The binder-rebuild internals (`rewriteWithBinders`, used by the
  escaping-scope re-bind and by binding-keyed substitution) had the same
  conflation and are fixed the same way. `.map()` had the mirror-image defect —
  a structural receiver fell into the RAW rebuild arm, keeping the shape but
  silently losing the binding — and now preserves the receiver's form under the
  same three-way rule.

- **GLSL compile of `Mod` over wide-typed real expressions.** The shader
  targets' real-only helper gate refused operands whose type merely _could_ be
  complex: the complex type a `Sqrt`/`Ln` of unknown sign carries since 0.100.0
  propagated to enclosing arithmetic (`10^5·√(⌈x⌉²+⌈y⌉²)`), through boolean
  nodes, and into piecewise conditions, so `Mod` expressions over plot variables
  failed closed (D6) where 0.99.0 compiled them. The complexness analysis now
  short-circuits boolean- and string-typed nodes and, for arithmetic heads that
  only propagate complexness (`Add`, `Subtract`, `Multiply`, `Divide`,
  `Negate`), consults the operands — honoring the unknown-sign `Sqrt`/`Ln`/`Log`
  real-kernel contract — instead of the widened type. Provably complex operands
  still fail closed.

- **`Min`/`Max` over a collection whose element type is unknown.** With a base
  declared `indexed_collection`, `Distance(S, p)`'s result type degraded to
  scalar `number` (the broadcast arm was invisible through the elementless
  type), and `Min` then compiled to the variadic-scalar `Math.min(...)` — which
  returns `NaN` when handed the runtime array, silently, behind `success: true`.
  `Distance` now reports `number | list<number>` when an operand's collection
  element type is undecidable, and the `Min`/`Max` JavaScript lowering emits a
  runtime shape projection (reduce an array, pass a scalar through) for operands
  that could be collections, matching the interpreter both ways.

- **`invisibleMultiply` serialization option vs `\bmod`.** With
  `invisibleMultiply: '\\cdot'`, `Mod(k·f, 1)` serialized as `k\cdot f\bmod1`,
  which re-parses as `k·Mod(f, 1)` — the `Mod` serializer decided
  parenthesization assuming juxtaposition, which binds tighter than `\bmod`
  while an explicit `\cdot` binds looser. A `Multiply` operand of an infix
  `\bmod` is now parenthesized whenever the option is set (products that
  serialize as `\frac` remain unwrapped).

- **Ordering comparisons over a provably complex operand now fail closed at
  compile time.** `Less`/`LessEqual`/`Greater`/`GreaterEqual` with a
  complex-valued operand (`i·x < 0`) compiled to a raw JavaScript comparison of
  a `{re, im}` object — a silent `false` behind `success: true` — while the
  interpreter correctly leaves the comparison symbolic (the complex numbers are
  not ordered). Such comparisons now decline with a clear diagnostic on every
  compile target. `Equal`/`NotEqual` keep their complex support, and real-kernel
  expressions of unknown sign (`√x < 2`) still compile.

- **Non-canonical trees are no longer restructured by pretty serialization.**
  Serializing a `canonical: false` expression (`toMathJson`/`toLatex` with
  `prettify`) could rebuild a `Multiply` containing a symbolic `Divide` factor
  through the canonical product machinery: explicit `Delimiter` fences were
  dropped, factors reordered, and the round-trip changed the expression
  (`Mod((k·f), 1)/n + y` re-parsed with the dividend split). Pretty rewrites on
  a non-canonical tree are now shape-preserving — order-preserving
  numerator/denominator split, no factor sorting, fences kept. Canonical
  serialization is unchanged.

- **Impure operands spliced by multi-use compile templates drew more than
  once.** A lowering that splices a compiled operand string into its emitted
  code more than once re-evaluates a `Random`-family operand at run time — a
  silent wrong value that also shifts every later draw. A full audit of the
  JavaScript, GLSL, WGSL, interval, and Python targets fixed twelve such sites:
  `Equal`/`NotEqual` over a complex operand and across n-ary chains,
  `Range(start, stop, step)` (which re-drew once per element), `Round`,
  odd-degree `Root`, `Variance` (12 draws where the interpreter makes 2),
  complex `Argument`/`Conjugate`, chained relations and element-wise selection
  masks, `Match` subjects, and a double-compile in the complex `Add` fallback
  that orphaned a hoisted draw. Impure operands are now bound to a temporary
  exactly once and **in argument order** — binding only the middle of
  `Random() < Random() < 0.9` had executed the second draw first, inverting the
  comparison. Pure emissions are byte-identical throughout, and regression tests
  count draw sites in the emitted code.

- **`ContrastingColor` emitted invalid WGSL.** Both the 1-argument and
  3-argument forms lowered to a GLSL-only `?:` ternary on every GPU language;
  WGSL now emits `select(…)` (the GLSL emission is byte-identical), and an
  impure (Random-family) color operand fails closed instead of being spliced
  twice.

## 0.100.1 _2026-08-02_

### Breaking Changes

- `PointZ` applied to a 2-D point is now a typed `incompatible-dimensions` error
  instead of the `NaN` absence marker — at type-check time when the operand's
  type statically proves 2-D (`tuple<number, number>`, or a list or set of such
  points, in either the tuple or coordinate-row spelling), and at evaluation
  time otherwise. The broadcast over a list of 2-D points errors identically,
  and the JavaScript compile of a statically 2-D operand declines. A
  statically-absent component is a type-level fact: the silent `NaN` masked
  upstream pipeline defects. `PointX`/`PointY`, all 3-D behavior, and the
  compiled runtime `NaN` marker for dynamically-shaped bases are unchanged.

### New Features

- Multi-clause function definitions can now be declared before they are defined.
  `declare("J", "(number, complex) -> complex")` followed by clauses such as
  `J(0, z) = z` previously failed with `incompatible-type` (a literal-parameter
  clause is a narrowed arm of the declared signature, not a function subtype) —
  and failed silently, leaving the symbol undefined. Clauses are now checked
  arm-shaped against the declaration (parameters and result must be subtypes of
  the declared ones), a genuinely incompatible clause errors loudly without
  corrupting the definition, and the declared signature is preserved on the
  installed function — making declare-then-define usable for recursive clause
  sets
  (`let fact: (number) -> number; fact(0) = 1; fact(n: integer) = n * fact(n-1)`).

- Complex-valued multi-clause function definitions now compile. A recursive
  clause set such as
  `J(0, z: complex) = z; J(n: integer, z: complex) = J(n-1, z)^2 + z_0`
  evaluated correctly but declined the JavaScript compile target while its
  real-valued twin compiled; the clause dispatcher now carries the complex
  `{re, im}` convention through parameter guards, call-site coercion, and mixed
  real/complex clause bodies.

- The LaTeX serialization style options (`rootStyle`, `fractionStyle`,
  `indexStyle`, `powerStyle`, `logicStyle`, `numericSetStyle`, `groupStyle`,
  `applyFunctionStyle`) can now be specified as a constant, in addition to a
  function of the expression and of its nesting level:

  ```ts
  ce.latexOptions = { rootStyle: 'solidus' };
  expr.toLatex({ fractionStyle: 'inline-solidus' });
  ```

  Previously, only the function form was supported, and a string value
  serialized to an empty string. A string that is not one of the values accepted
  for that option now throws when the option is set, instead of producing an
  empty serialization.

- `Distance` broadcasts over point lists. `Distance(S, p)` (either argument
  order) where `S` is a list of points — spelled as tuples `[(0,0),(3,4)]` or as
  coordinate rows `[[0,0],[3,4]]` — returns the list of per-point distances, on
  both the interpreted and compiled routes, so `min(Distance(S, p))` computes
  the nearest-point distance directly. `Distance(S, T)` over two point lists is
  pairwise with strict length matching. Scalar and string arguments are still
  rejected.

- Point operators are aligned over point lists: `PointX/Y/Z` project a
  coordinate-row list (`PointX([[10,11],[20,21]])` is now `[10, 20]`, not the
  first row), and `Norm` over a list of point tuples returns per-point norms
  `[0, 5, 10]` on both routes, matching `Abs`. `Norm` over a plain matrix (list
  of lists) keeps its Frobenius meaning. Compiled `Norm` and `Abs` previously
  disagreed with the interpreter on these shapes (a flattened norm and
  componentwise values behind `success: true`).

### Performance

- Registering many interdependent user functions (`declare` + `assign` chains,
  the shape a document importer produces) was quadratic in the number of
  functions: the `type` accessor's cache key evaluated the effect projection
  (`isPure`, made binding-aware in 0.100.0) before the cheap constant-operand
  short-circuit, forcing every stored function literal's full signature to
  re-derive down the call chain on each registration. Reordering the check and
  adding a per-generation fast path makes registration near-linear — 9–14×
  faster at 120 functions, 13.7× at 240 — with byte-identical
  `isPure`/`effects`/`type` answers. New benchmark:
  `benchmarks/effects-registration.ts`.

### Resolved Issues

- `isPure` and `.effects` no longer claim a seed frame contains a lazy view that
  escapes it. `WithRandomSeed(42, Map(xs, x => Random()))` — and the
  `[Random() for k = [1...6]]` comprehension spelling of it — reported
  `isPure: true` with no effects, even though a lazy view draws at
  materialization, from whatever frame is active _then_, so the values were
  genuinely live. Such an expression now reports `isPure: false` and
  `["random"]`, including when the view leaves the frame as a cell of a returned
  `List`/`Tuple`/`Pair` or as a block's result. The runtime semantics are
  unchanged: materializing inside the frame
  (`WithRandomSeed(42, ListFrom(Map(...)))`, an index, a reducer) still replays,
  and still reports pure — as do a view whose element body draws nothing and a
  seeded frame around an ordinary draw.

- Two-sample bracket ranges with decimal anchors now compute their step exactly.
  `[1.008, 1.016...5]` previously differenced its anchors in binary floating
  point, baking the step `0.008000000000000007` into the range — 499 elements
  ending at ~4.992 instead of 500 landing on the 5 anchor. The step is now
  derived from the anchors' decimal digits in exact integer arithmetic
  (`0.008`), matching the compound-anchor spelling `[1+0.008, 1+0.016...5]`.
  Anchors with no short decimal form keep their float step.

- Symbolic differentiation declines honestly instead of blowing up. The
  derivative of a deeply self-nested expression (e.g. a 12-deep `√(x+√(x+…))`
  chain, whose second derivative is a 6.5-million-character expression taking
  45+ seconds) doubles its tree per level; differentiation now tracks the size
  of what it builds and, past an internal budget (25,000 nodes, ~30× the largest
  derivative in the test corpus), aborts and leaves the `D`/`Derivative` inert —
  the established decline convention — in bounded time rather than hanging.

- A divergent definite integral is no longer reported as a confident
  measurement. `\int_0^1 \frac{1}{x}\,dx` numericized to
  `709.08956571281 ± 0.00000000074` — the value at which the adaptive
  quadrature's refinement toward the singularity ran out of floating-point
  range, dressed up as a measured quantity. Numeric integration now checks the
  series of dyadic shells it sheds while refining toward each endpoint: a
  convergent improper integral's shells shrink geometrically, a divergent one's
  do not. Divergent integrals return `NaN` on all three numeric routes (`.N()`,
  iterated `.N()`, and compiled code), and detection also stops the refinement
  early, so `\int_0^\infty x\,dx` resolves in ~1 ms instead of ~560 ms.
  Legitimate improper integrals — `\int_0^1 \frac{1}{\sqrt{x}}\,dx`,
  `\int_0^1 \ln x\,dx` — are unaffected, as are proper integrals, whose results
  are bit-for-bit unchanged.

- The order in which functions are defined no longer changes their meaning. A
  definition body that referenced a function _before_ it was defined — for
  example `g(t) \coloneq 2a(t)` registered ahead of
  `a(t) \coloneq [\cos t, \sin t]` — froze the reference as a multiplication
  (`2 \cdot a \cdot t`), producing scalar results interpreted and `null`/`NaN`
  from compiled functions behind `success: true`. Such provisional readings are
  now re-derived when the referenced name later gains a function definition, so
  every registration order yields the same interpreted and compiled results.
  Genuinely scalar juxtaposition (`2x(t+1)` where `x` never becomes a function)
  is unchanged.

- Function parameters whose bodies index them are now treated as collections. A
  definition such as `h(v) \coloneq v_1 + v_2` with `h` declared
  `(list<real>) -> real` parsed the subscripts as unrelated symbols, an
  `At`-indexing body inferred a scalar parameter (so list arguments broadcast
  elementwise instead of applying), and the JavaScript compile target declined
  `At` over a declared list parameter. All three are fixed: parameters are bound
  at their declared types while the body is parsed, an indexing body infers a
  collection parameter, and the compile target admits indexing over such
  parameters with a runtime shape guard.

- The derivative of trigonometric functions now honors `angularUnit`. In degree
  mode, `D(Sin(x), x)` evaluates to `\frac{\pi}{180}\cos x` (and inverse
  trigonometric derivatives are divided by the conversion factor), on both the
  interpreted and compiled routes, for both by-reference functions (`f'` where
  `f := x \mapsto \sin x`) and inline `\frac{d}{dx}` expressions. Previously the
  interpreted derivative and the compiled by-reference derivative returned
  radian-convention values, and compiled `ND` double-converted.

- `Sqrt` no longer claims a complex result type for a radicand whose
  non-negativity only constant folding can establish. Machine floats are not
  folded at canonicalization, so `\sqrt{1-0.2^2}` reached the type handler with
  an undecided sign and typed as `finite_complex`, while the folded
  `\sqrt{0.96}` typed as `finite_real`. A radicand that is pure and has no
  unknowns is now folded to decide the sign. A negative radicand
  (`\sqrt{0.2^2-1}`) still types as complex, and a radicand with unknowns
  (`\sqrt{x}`) is unchanged.

- Declared types are enforced for symbols named with a single uppercase letter.
  An argument-validation repair intended for bare standard-library operator
  symbols such as `N` and `D` used in value position also fired for any
  user-declared single-letter symbol that failed a parameter type check,
  silently skipping the declared-type check. The repair is now gated on the
  provenance of the shadow it rebinds to.

- Arguments with free variables are no longer exempt from declared-type checking
  when their type is provably incompatible. Applying a function whose parameter
  is, e.g., `tuple<number, number, number>` to an unassigned symbol declared
  `string` (or any provably disjoint type) now reports `incompatible-type`
  instead of silently accepting the call. Arguments whose type could still turn
  out compatible — `unknown`, inferred symbols, unions with a matching arm,
  same-category collections — continue to defer to runtime exactly as before.

### Performance

- GPU compilation no longer re-merges its function table on every compile. The
  table reached V8's fast-property limit, so the per-call object spread
  allocated ~45 KB of transient dictionary-mode garbage per compilation; the
  merged table is now memoized per target instance.

## 0.100.0 _2026-08-02_

### Breaking Changes

- **Assignments now enforce declared types consistently.** Declare-with-value,
  `Assign`, and `ce.assign()` all reject values incompatible with an explicit
  symbol type. Inferred types retain their widening behavior.

- **Purity and effects reporting is more precise.** `expr.isPure` and
  `expr.effects` now account for which operands an operator evaluates and for
  the current bindings of referenced functions. Consequently, held expressions
  and seeded-random blocks can be pure, function literals do not inherit the
  effects of calling them, and named effectful callbacks are no longer reported
  as pure. Unresolved forward references conservatively have unknown effects.

- **Effects from partially applied functions occur only when all required
  arguments have been supplied.** Partial application no longer evaluates an
  effectful body early or repeats its effects.

- **Contradictory operator declarations are rejected.** In particular,
  `pure: true` cannot be combined with `drawsRandom: true`; inconsistent legacy
  flags, effect annotations, and `effects:` declarations also fail registration.

- **Errors now propagate through strict built-in operators and function
  application.** An invalid operand generally produces the underlying `Error`
  value instead of leaving an inert expression. Collection constructors and
  error-observing or lazy operators can still contain or inspect errors.
  `Assume` returns string status values such as `"ok"` and `"not-a-predicate"`.

- **Literal `Nothing` arguments are removed consistently.** `f(Nothing)`,
  `Apply(f, Nothing)`, and `Nothing |> f` now all behave like `f()`. An
  expression that evaluates to `Nothing` is still passed as an argument. Invalid
  `Pipe` callees now return the error directly.

- **Positional collection operators require indexed collections.** `First`,
  `Second`, `Third`, and `Last` now reject sets and other non-indexed
  collections. Empty indexed collections still return `Missing`.

- **Several elementary functions now report complex result types when their
  real-valued domain cannot be proven.** This includes `Sqrt`, `Ln`, `Log`,
  `Arcsec`, and `Arccsc`. Provably in-domain operands retain a real type;
  provably negative operands use complex helpers when compiled.

### New Features

#### Functions, types, and effects

- **Multi-clause function definitions** can dispatch by arity, literal value,
  and parameter type. The most specific clause wins, declaration order breaks
  ties, and redefining the same parameter domain replaces that clause. Recursive
  clause sets compile to JavaScript. Partial application of a clause set is not
  supported.

- **Cortex programs can declare nominal types and structural aliases** with
  `type name = …` and `type alias name = …`. Declarations provide checked
  constructors where appropriate; nominal values are opaque, support structural
  equality by tag and payload, and can expose named fields with `value.field`.
  Record-shaped nominal types can use a same-name constructor function for
  validation or normalization. Type tags are erased by compiled output.

- **Function signatures can declare effects.** Types and Cortex definitions
  accept `pure`, `any`, or effect labels including `random`, `scope`, `network`,
  `time`, and file-system effects. Inferred effects follow the function body;
  explicit effects are checked contracts. Callback parameters can use effect
  annotations to restrict accepted functions.

- **Operator definitions accept an `effects:` field.** The existing `pure` and
  `drawsRandom` properties remain supported as shorthand.

- **Expressions and function types expose effects directly** through
  `expr.effects` and `type.effects`. Effect-discharging operators such as
  `WithRandomSeed` can absorb an effect, while `Hold` defers the effects of its
  contents until release.

#### Cortex language

- **Function definitions accept literal parameters**, including strings,
  booleans, finite numbers, `NaN`, and infinities. Unicode mathematical symbols
  such as `π`, `∞`, `ⅈ`, and `ℝ` now resolve to their standard constants or
  sets. Non-finite literal names are reserved; verbatim identifiers remain
  available when those spellings are needed as names.

- **`match` supports inclusive numeric range patterns**, including negative and
  infinite bounds. Range patterns can be combined with alternatives and guards
  and compile on every target.

- **Errors can be handled in Cortex.** `match` can catch error values, and the
  new held predicate `IsError(x)` detects errors without propagating them.
  Propagated errors include a non-rendered trace available through MathJSON and
  the error-trace APIs.

- **The structural equality operator `===` now evaluates.** It performs total,
  exact structural comparison, including for symbolic expressions, `Missing`,
  and `NaN`.

- **`Count` accepts either a value or a predicate**, and **`Table` accepts tuple
  iterator specifications**. Tuple and brace iterator forms now behave
  consistently for `Sum`, `Product`, and `Integrate`.

- **Static type errors are reported by `cortex check` and before program
  evaluation.** Checking canonicalizes without executing effects.

#### Compilation

- **`PointList` with collection-valued components compiles to JavaScript.** GPU
  coordinate accessors can also project compatible point-list components.

- **`At` compiles to GLSL and WGSL** for statically sized numeric collections,
  including guarded dynamic scalar indexes and literal gathers or masks.

- **`D`, `Derivative`, and `ND` compile on all targets** when they can be
  reduced to a compilable form.

- **Non-finite numeric literals compile to GLSL and WGSL.**

- **Python compilation supports collection equality and inequality.**
  `Norm(matrix, 2)` now compiles with the interpreter's Frobenius-norm
  semantics.

- Added Cortex transition guides for Python and Mathematica users.

### Improvements

- Unknown Wolfram Language and JavaScript collection-function names now suggest
  the corresponding Cortex operators.

- Static result types are tighter for trigonometric, hyperbolic, extrema,
  Pochhammer, and collection-rank operations when the result can be proven real
  or finite.

- User-declared type names now resolve consistently in annotations, signatures,
  type predicates, collection operators, and MathJSON declarations. Literal
  value types and bounded numeric refinements now accept their own values.

- `Range` and `Linspace` can enumerate exact symbolic bounds and steps that have
  a numeric value, such as multiples of π. Bracket range syntax also recognizes
  more exact arithmetic progressions.

- `Sum` and `Product` evaluate pure, closed bound expressions such as
  `Length(P)` while retaining symbolic behavior for genuinely free bounds.

- `Distance` accepts the same point-or-point-list union types as related point
  operators and reports a clear error if a point list reaches scalar distance
  evaluation, in both interpreted and compiled code.

### Performance

- Numeric integration retains a sufficiently accurate deterministic quadrature
  estimate instead of replacing it with a much slower Monte Carlo estimate. This
  substantially improves nested and difficult integrals.

- Lazy function-applying collections, including `Map`, `Filter`, `FlatMap`,
  `Scan`, `Tabulate`, and `Iterate`, memoize evaluated elements per instance.
  Cache invalidation now follows actual symbol and configuration dependencies,
  so unrelated assignments no longer discard cached collection elements.

- Exact evaluation of sufficiently large, bounded integer `Map` broadcasts can
  use compiled float64 arithmetic when exactness is statically guaranteed.

- Compiled function bodies reuse repeated pure user-function calls, avoiding
  exponential work in recursive definitions. Common-subexpression elimination
  now also recognizes engine-provided compiled operators.

### Issues Resolved

#### Parsing and serialization

- Chained postfix indexes parse uniformly as nested `At` expressions for
  symbols, subscripted expressions, and literal collections.

- Ranges with compound first anchors, such as `n+1..n+10`, `[2n..3n]`, or
  `x = m+n...m+n+4`, bind the whole anchor expression instead of absorbing part
  of it into the surrounding addition, multiplication, or negation. This applies
  in brackets, bare expressions, and relations. A parenthesized range opts out:
  `n+(1..10)` remains a broadcast addition.

- Dictionary-valued function results preserve parameter bindings through
  MathJSON round trips, including in recursive functions.

- Roots serialized with solidus or quotient notation now delimit a `Power` base
  correctly.

- Invalid multi-argument `Exp` and `Exp2` expressions remain well-formed inert
  expressions with an arity error.

#### Evaluation and functions

- `At` reports incompatible dimensions when more indexes are supplied than a
  collection can consume.

- `match` inside a function uses the current call's parameters rather than
  retaining values from the first call.

- Seeded-random frames no longer incorrectly mark enclosing function literals or
  `Map` callbacks as random.

- Purity and effect results for recursive functions are stable and no longer
  depend on which expression is queried first.

- Compiled lambdas with unbound symbols, including symbols reached through
  assigned values or function bodies, decline cleanly instead of throwing a
  JavaScript `ReferenceError`. Interpreter fallback numericizes symbolic results
  and is also available for failed interval compilation.

- Numeric use of a list-valued function no longer widens its inferred result to
  a scalar or causes compiled reductions to use scalar arithmetic on arrays.

- `FindFit` and `FindRoot` observe ambient time limits during expensive
  iterations and return their best result with `timedOut: True` when possible.

- Differentiating control-flow or binding operators such as `Which`, `Sum`, and
  `Integrate` stays symbolic instead of throwing or producing an invalid
  slot-wise derivative.

#### Collections

- Bounded `Take` expressions are recognized as finite even when the source
  length is unknown, allowing finite prefixes of infinite filtered collections
  to materialize.

- Bare `_` works as the identity function in function slots, and wildcard
  predicate shorthand is accepted consistently by eager and lazy collection
  operators.

- Unary `Iterate` functions receive the accumulator, and indexed access now
  agrees with iteration about the first emitted value.

- Collection operators resolve evaluable numeric arguments such as `N-1`. They
  remain symbolic, rather than using a default, when a required numeric argument
  is unresolved.

- `Partition` distinguishes unresolved integer sizes from predicates and no
  longer throws on an unbound size.

- Seeded comprehensions materialize consistently with other lazy collections.

#### Numerical evaluation and types

- Numeric roundoff cleanup is independent of `ce.tolerance`; comparison and
  explicit `Chop` operations continue to honor the configured tolerance.
  Compiled `Chop` now uses that tolerance, and exact operands remain exact.

- The reported uncertainty of an iterated numeric integral includes inner-level
  quadrature error. Previously only the outermost level's own estimate was
  reported, which could present a result with inner error as exact.

- Bignum `Sin` and `Cos` preserve small representable values near zero
  crossings.

- Static types for non-finite, complex, and out-of-domain results were corrected
  across arithmetic, special functions, elliptic functions, inverse
  trigonometric functions, and complex component operators.

- Domain boundaries are classified with exact comparisons for exact literals.

- Non-radian angle conversion preserves the imaginary component of complex
  results.

- `LCM(0, 0)` returns `0`, and `SigmaMinus1` preserves exact results under
  `evaluate()`.

#### Compilers

- Compiled `Mod`, `Remainder`, division, and negation now parenthesize compound
  operands correctly across JavaScript, GPU, and Python targets.

- Impure operands used by compiled remainder, modulus, and selected GPU
  functions are evaluated exactly once.

- Broadcasts over literal lists emit target-appropriate code for JavaScript,
  Python, GLSL, and WGSL instead of leaking JavaScript syntax into other
  targets.

- GPU compilation rejects unsupported alpha colour constructors, non-finite loop
  bounds, mismatched shapes, and scalar-only operations on vectors or matrices
  instead of emitting invalid or silently incorrect shaders.

- GPU `Max` and `Min` over one collection reduce to a scalar instead of
  returning the input vector.

- JavaScript compilation now broadcasts `Sign`, `Arctan2`, `Hypot`, and `Sinc`
  over lists.

- Complex constant folding is consistent with `realOnly`: non-real constants
  produce `NaN` in real-only mode and principal complex values when complex
  compilation is supported.

- Compiled `InverseHaversine` supports complex results on JavaScript and reports
  an appropriate complex static type for symbolic inputs.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE 0.100.0 | CE 0.99.0 | SymPy | math.js | Mathematica |
| ------------------ | ---------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |        8.2 |       8.7 |   201 |     190 |         3.7 |
| $\sin 1$           |         25 |        23 |   253 |     599 |         5.8 |
| $\cos 1$           |         24 |        23 |   240 |     668 |         7.6 |
| $\ln 2$            |         15 |        15 |   375 |   4,939 |         4.1 |
| $e^{\pi}$          |         15 |        15 |   238 |   5,375 |         5.1 |
| $\zeta(3)$         |      1,707 |     1,716 |   290 |       — |          54 |
| $\Gamma(\tfrac13)$ |        915 |       933 |   382 |       — |         233 |
| $\psi(\tfrac13)$   |        797 |       786 | 3,051 |       — |         192 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE 0.100.0** and **CE 0.99.0** columns to see
what is _new this release_ (a `—` under `0.99.0` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE 0.100.0 | CE + R/F | CE 0.99.0 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :--------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |            |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |    3.5×    |   1.8×   |   2.8×    |  0.4×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |    6.4×    |   1.0×   |   5.7×    | 0.08×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |    3.3×    |   0.4×   |   2.7×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |     —      |   1.5×   |     —     |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |     —      |   0.9×   |     —     | 0.009× |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |     —      |   0.8×   |     —     | 0.006× |    —    |     1×      |
| **Derivatives**                        |            |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |   0.03×    |  0.03×   |   0.03×   | 0.001× | 0.003×  |     1×      |
| **Simplification**                     |            |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |    40×     |   29×    |    28×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |    73×     |   38×    |    51×    |  3.1×  |   16×   |     1×      |
| **Evaluation**                         |            |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |    36×     |   17×    |    34×    |  3.0×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |    4.9×    |   3.6×   |   4.7×    |  2.2×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |   18356×   |  20053×  |  17734×   |  310×  |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |    258×    |   110×   |   251×    |  2.6×  |    —    |     1×      |
| **Solving**                            |            |          |           |        |         |             |
| $x^4+x^2-1=0$                          |    0.3×    |   0.2×   |   0.3×    | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |    1.4×    |   1.6×   |   1.3×    | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 3.5× faster than
Mathematica** (up to 18356×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-08-02 · Compute Engine `0.100.0` (current build @ `14fc06c2`)
· published `0.99.0` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.99.0 _2026-07-30_

### New Features

- **User-defined functions now compile to GLSL and WGSL.** A function declared
  in the engine (`f(u,v) := …`) and called from a GPU-compiled expression is
  emitted **once** as a real shader function and called by name — matching what
  the JavaScript and interval targets already did — instead of failing as an
  unknown operator and forcing callers to inline the body at every call site.
  Definitions arrive on the compilation result's preamble alongside the `_gpu_*`
  helpers, so existing shader assembly keeps working; when `f` calls `g`, `g` is
  declared first. Signatures are synthesized statically (declared parameter
  types, or the body's inferred shape: `float`, `bool`, `vec2`–`vec4`, complex
  as `vec2`); anything a shader cannot express fails closed with a diagnostic
  naming the parameter — including recursion (GLSL/WGSL forbid it; it still
  compiles on the JavaScript target), collection-valued arguments beyond the
  static `vec2`–`vec4` shapes, and argument shapes that disagree with the
  declared parameter type. Undeclared parameters default to `float`.
  Caller-declared types on `compileFunction` parameters and on shader
  inputs/uniforms are authoritative for these checks, with element-aware
  matching across both languages' spellings (`bvecN`, `ivecN`, `vec2<i32>`, …) —
  a `vec2<bool>` argument no longer passes for a `vec2<f32>` parameter. A WGSL
  body referencing a declared input now correctly emits `input.<name>`
  (previously a bare, undeclared identifier).

### Performance

- **Compiled code now shares repeated subexpressions** (common-subexpression
  elimination) on the `javascript`, `interval-js`, and `python` targets: a pure
  subtree occurring several times inside one compiled expression is bound to a
  temporary once and reused, instead of being recomputed at every site.
  Corpus-extreme shapes (a 500-node subtree repeated 128×) compile ~50% faster
  because the emitted source collapses, and run up to ~1.9× faster when the
  repeats involve runtime helpers the JS engine cannot eliminate itself. Sharing
  is conservative by construction: random draws, user-defined function
  applications, named callbacks, caller-supplied custom lowerings, and anything
  inside a conditionally-evaluated position (unselected `Which`/`If` arms,
  short-circuited `And`/`Or` tails) are never merged, so values, draw streams,
  and selection laziness are unchanged. Opt out per call with
  `compile(expr, { cse: false })`. Design notes:
  `docs/plans/2026-07-28-compile-cse-design.md`.

- **Compiled output is now byte-for-byte deterministic on every target**:
  compiler-generated temporaries (chained-relation operand bindings, loop
  accumulators, complex power chains — and the new CSE temps) draw deterministic
  `_tvN`/`_cseN` names from a per-compilation counter instead of
  `Math.random()`, and the allocator avoids capture against every symbol in the
  expression. Two compilations of the same expression now emit identical source,
  on the GPU targets included.

- **Random draws are up to 100x faster when the engine runs inside a secondary
  JavaScript realm** — a `vm` context, a sandboxed worker, or an
  embedder-supplied global. V8 compiles `Math.imul(...)` down to a single
  machine instruction only when `Math` is the host realm's; reached through
  another realm's global it becomes a property lookup plus a call, and the PCG3D
  hash behind every draw performs six of them. Binding the function once at
  module scope removes the lookup. Measured on node 22: 10 million draws went
  from ~880 ms to ~40 ms in a `vm` context (and from ~36 s to ~0.5 s for a
  10-million-sample Monte-Carlo integral under Jest). Draw values are unchanged
  — the stability vectors are untouched.

### Resolved Issues

- **A Leibniz derivative no longer swallows the comparison that follows it.**
  `\frac{d}{dx}x^2 > 0` parsed as `D(x^2 > 0, x)` — the derivative of a
  _boolean_ — which then evaluated to an `incompatible-type` error. The operand
  of `\frac{d}{dx}` / `\frac{\partial}{\partial x}` is now parsed as a term: it
  still takes a trailing sum (`\frac{d}{dx}x^2 + 1`, matching the `\int … dx`
  integrand convention), but stops before a relational, assignment or arrow
  operator, so the expression parses as `D(x^2, x) > 0`.

- **An undecidable comparison no longer discards its evaluated operands.**
  `x^2 + x^2 > 0` evaluated to `0 < x^2 + x^2` and `\frac{d}{dx}x^2 > 0` to
  `0 < D(x^2, x)`: `Equal`, `NotEqual`, `Less` and `LessEqual` evaluate their
  own operands (they are lazy, so their `canonical` handlers can see raw
  operands for chain decomposition), then threw that work away when the
  comparison itself could not be decided. They now report the evaluated operands
  — `0 < 2x^2` and `0 < 2x` — which is what the non-lazy relations (`Approx`,
  `Tilde`, `Precedes`…) already did. The comparison itself is unchanged: an
  undecidable one still stays inert, since `x^2 = 4` is a _condition_ rather
  than a falsity, and decidable ones still fold to `True`/`False`.

- **Monte-Carlo integration and stochastic equality now replay under
  `WithRandomSeed()`.** Both sampled `Math.random()` directly, so a seeded block
  did not reproduce: `WithRandomSeed(42, \int_0^1 \sin(1/x) dx)` returned a
  different estimate on every evaluation, and a seeded `isEqual()` verdict could
  not be replayed at all.

  They now draw from a _derived sub-stream_ — a private stream seeded from the
  ambient frame that consumes **none** of its indices. This matters because an
  integral takes up to 1e7 samples and the sampling loop is deadline-truncated:
  charging those to the frame would make adding an integral shift every later
  `Random()` draw in the block, and would make replay depend on wall-clock time.
  Adding or removing an integral now leaves sibling draws untouched, and the
  same integral samples the same points wherever it appears in the frame.

  Outside a frame both remain live, as before. `monteCarloEstimate()` (exported
  from `@cortex-js/compute-engine/numerics`) gains an optional trailing `draw`
  parameter defaulting to `Math.random`, so existing callers are unaffected.

  **This applies to evaluation, not to compiled code.** An integral inside a
  compiled function still samples live, even within a seed frame, and that is
  deliberate: the generated code emits one independent quadrature call per
  limit, so a sub-stream would restart at the same sample points on every outer
  node of a nested integral — trading reproducibility for a biased estimate. In
  practice a smooth integrand never reaches the stochastic estimator anyway (it
  folds to a constant at compile time, or converges under deterministic
  Gauss–Kronrod); only a pathological one does. Use `.N()` when a seeded
  integral has to reproduce. See `docs/plans/2026-07-28-derived-substreams.md`
  §5.1.

  An integral that cannot finish inside a seed frame — a bound or parameter is
  still unbound — now keeps the frame, so completing it later reproduces the
  estimate the frame would have produced. Operator definitions gain a
  `readsRandomFrame` flag for this: it means "reads the seed frame, consumes
  none of its indices", and is inferred for a user function whose body reaches
  an estimator. Unlike `drawsRandom`, it does not make the operator impure.

- **A collection operator now resolves an unevaluated numeric argument.**
  Collection handlers are consulted on the canonical expression — `.at()`,
  `.each()` and `.count` are available on any canonical expression, and the
  broadcast that zips `Add`/`Multiply` operands runs before they are evaluated.
  An argument spelled `N-1` was therefore still an unevaluated sum at that
  point, and each operator silently fell back to its default: with `N` assigned
  `6`, `RotateLeft(S, N-1) + RotateLeft(S, N-2)` returned `2·RotateLeft(S, 1)`,
  and `Take(S, N-2) + Take(S, N-2)` returned nothing at all. Literal arguments
  were never affected. Fixed for `Take`, `Drop`, `RotateLeft`, `RotateRight`,
  `Repeat`, `Fill`, `Partition`, `Tabulate`, `Insert`, `DeleteAt`, `ReplaceAt`,
  `Slice`, `Permutations` and `Combinations`.

- **`Take`, `Drop`, `RotateLeft`, `RotateRight` and `Slice` now stay symbolic
  when their numeric argument has no value.** An argument that is absent and one
  that is present but unresolved (a free variable) were treated alike, so each
  operator answered a collection it does not denote: `Take(S, n)` returned `[]`,
  `Drop(S, n)` returned all of `S`, and `RotateLeft(S, n)` and
  `RotateRight(S, n)` rotated by one. They now report an unknown count and
  evaluate to themselves until `n` has a value — matching `Repeat`, `Insert`,
  `DeleteAt`, `ReplaceAt`, `Permutations`, `Combinations`, `Tabulate`, `Chunk`
  and `Range`, which already did. An omitted argument still takes the operator's
  default, so `RotateLeft(S)` still rotates by one; a `NaN` argument counts as
  unresolved, not omitted. `Fill` joins them: `Fill(f, (n, 3))` used to produce
  an empty matrix and `Fill(f, (2, n))` two empty rows. `IsEmpty` of such a
  `Take` over an infinite collection no longer answers `False` either — a zero
  count would make it empty.

  Membership is deliberately unaffected: `Contains(RotateLeft(xs, n), x)` still
  answers, because a rotation is a permutation.

- **`Partition(xs, n)` with an unbound `n` no longer throws.** `Partition`
  accepts either a chunk size or a predicate, and chose the arm by whether the
  size read as an integer — so an argument that is _typed_ `integer` but has no
  value yet was applied as a predicate, and the resulting exception escaped
  `evaluate()`. The arm is now chosen by type, and an unresolved predicate (a
  symbol declared `function` with no value) leaves the expression unevaluated as
  well. A predicate that does resolve, to something other than a boolean, still
  reports the error with its spelling hint.

- **`WithRandomSeed(seed, [… for …])` draws again.** A comprehension is a lazy
  view, like `Map`: its body draws per element when the collection is
  materialized. The rule that keeps the seed frame around a body that could not
  finish its draws (0.98.0) read the comprehension's unevaluated body as
  unfinished work, so the expression evaluated to itself — the collection was
  inert and yielded no elements, and nothing would ever complete it. A
  comprehension now follows the same convention as `Map`: materialize it inside
  the frame (`WithRandomSeed(1, ListFrom([Random() for k = [1...6]]))`) for
  reproducible draws. A comprehension whose _clause_ still owes draws keeps the
  frame, as before.

- **A user-defined function now infers its `pure` and `drawsRandom` flags from
  its body.** Previously every user function was born pure, so `f() := Random()`
  reported `isConstant: true` while drawing from the random stream on every
  call. Two things broke as a result: `N(f() + \pi)` consumed two draws where
  `N(\mathrm{Random}() + \pi)` consumed one, and a partially evaluated
  `WithRandomSeed()` body calling `f` lost its seed frame — silently resuming
  with live, unseeded draws.

  The flags are derived from the heads the body applies: a body reaching a
  known-impure head is impure, and one reaching a stream-drawing head also
  draws. A head with no definition at the point of definition — a higher-order
  parameter (`f(g) := g()`), or a callee defined after its caller — is still
  assumed pure; set the flag explicitly on the definition when that matters.

- **`RandomPrime()` is now reproducible under `WithRandomSeed()`.** It declared
  `drawsRandom: true`, but its draws bypassed the seed frame, so
  `WithRandomSeed(42, RandomPrime(1000))` returned a different prime on every
  evaluation. It now draws from the frame like the rest of the random family.

- **`RandomExpression()` is now declared impure.** It was declared pure, which
  made `isConstant` true for a generator that returns a different expression on
  every call, and admitted it to common-subexpression elimination.

### Improvements

- **A loop-form `Sum`/`Product` can now be a sub-expression in GLSL and WGSL.**
  A shader has no expression-level loop, so a `Sum` with a symbolic bound was
  emitted as statements — valid as a whole function body, but nothing more:
  `\sum_{k=0}^{n}kx` compiled while `1 + \sum_{k=0}^{n}kx` and
  `0.03\sum_{k=0}^{n}kx` failed closed, which demoted the whole class to the CPU
  path (corpus rows are almost never a bare sum). The loop is now **hoisted**
  ahead of the value it feeds and referenced through its accumulator, so these
  compose. Constant bounds still unroll to an expression as before, and a loop
  nested inside an unrolled term hoists alongside it. Nested sums hoist into
  their enclosing loop body, not out of it.

  A loop inside a **conditionally-evaluated branch** (an `If`/`When`/`Which`/
  `Match` arm) still fails closed, with a diagnostic that says so. A shader
  conditional is an expression, not a statement, so hoisting the loop out of the
  branch would run it unconditionally — and because a compiled `Random()`
  advances a counter at run time, a loop stranded ahead of a branch it never
  feeds would change the value of every later draw.

  `Loop` and `Block` still fail closed as sub-expressions on these targets.

- **A compile decline now names its actual cause.**
  `Unknown operator \`X\`` was reported for three different situations, so a failing compile band could not be triaged by message. They are now distinct: an operator whose compile handler declined a particular _operand shape_ says which operand and why (`PointList: cannot compile — component 1 is collection-valued …`); a head the engine knows but the target cannot lower says so (`Integrate: cannot compile — the operator is known to the engine but target 'glsl' has no lowering for it.`); and `Unknown operator`is now reserved for a head with no operator definition at all. The reason reaches callers as`CompilationResult.error`on the`success: false` paths, and as the thrown message on the direct-target path.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.98.0 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |          6.8 |       7.4 |   173 |     106 |         3.9 |
| $\sin 1$           |           20 |        21 |   218 |     442 |         5.3 |
| $\cos 1$           |           20 |        21 |   219 |     573 |         7.1 |
| $\ln 2$            |           14 |        14 |   332 |   4,344 |         3.8 |
| $e^{\pi}$          |           12 |        13 |   216 |   4,751 |         4.7 |
| $\zeta(3)$         |        1,511 |     1,547 |   265 |       — |          49 |
| $\Gamma(\tfrac13)$ |          831 |       812 |   346 |       — |         213 |
| $\psi(\tfrac13)$   |          712 |       712 | 2,762 |       — |         171 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.98.0** columns to see
what is _new this release_ (a `—` under `0.98.0` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.98.0 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     4.6×     |   2.5×   |   3.5×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     8.3×     |   1.5×   |   6.6×    | 0.09×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     5.3×     |   0.9×   |   4.2×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   1.9×   |     —     |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   1.1×   |     —     | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.1×   |     —     | 0.007× |    —    |     1×      |
| **Derivatives**                        |              |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |    0.04×     |  0.04×   |   0.03×   | 0.001× | 0.004×  |     1×      |
| **Simplification**                     |              |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |     41×      |   28×    |    31×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     79×      |   45×    |    48×    |  3.1×  |   19×   |     1×      |
| **Evaluation**                         |              |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     39×      |   16×    |    34×    |  3.0×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     5.2×     |   4.0×   |   6.9×    |  2.1×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    4458×     |  4875×   |   4193×   |  77×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     316×     |   128×   |   274×    |  2.5×  |    —    |     1×      |
| **Solving**                            |              |          |           |        |         |             |
| $x^4+x^2-1=0$                          |     0.3×     |   0.3×   |   0.3×    | 0.07×  |    —    |     1×      |
| $x^3-x-1=0$                            |     1.6×     |   1.8×   |   1.4×    | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 5.2× faster than
Mathematica** (up to 4458×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-07-30 · Compute Engine `0.98.0` @ `ef394659` (current build)
· published `0.98.0` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.98.0 _2026-07-28_

### New Features

- **`Which` and `If` now broadcast over list-valued conditions.** Selection is
  performed element by element, with the first matching clause winning. Scalar
  conditions and results are broadcast as needed, and list-valued inputs must
  have the same length. Results are evaluated at most once and only when needed
  by at least one element. A position with no matching clause returns `NaN`.

  ```text
  Which([3, 2, 1, 3] == 3, 1, True, 0) → [1, 0, 0, 1]
  ```

  JavaScript compilation supports the same behavior. GLSL and WGSL compilation
  support fixed-size vectors of two to four elements.

- **New operator-definition attribute `drawsRandom`** marks operators that
  consume the engine's random stream (`Random`, `RandomShuffle`, …). It is
  narrower than `pure: false`, which also covers side-effecting operators such
  as `Assign`, and is used by `WithRandomSeed` to decide whether a partially
  evaluated body still owes draws to its seed frame.

### Breaking Changes

- **Multiplying lists of different lengths now returns an
  `incompatible-dimensions` error**, consistent with other element-wise
  operations. Matrix multiplication is unchanged.

- **Assigning a value to a builtin operator name now creates a symbol in the
  current scope instead of replacing the builtin globally.** For example,
  `ce.assign("Sin", 30)` changes the value of the symbol `Sin`, but `Sin(0)`
  continues to call the builtin function.

- **The unused `BindingSite.shield` field has been removed.** Setting it had no
  effect.

### Improvements

- **JavaScript compilation now supports more collection-valued expressions:**
  user-defined function calls, comparisons and logical operators, and indexed
  `Sum`/`Product` bodies all broadcast element-wise. Length mismatches compile
  to `NaN`.

- **Unsupported collection-valued conditions and vector operations now fail
  compilation with a diagnostic** instead of producing incorrect Python,
  interval-js, GLSL, or WGSL code.

- **`RandomChoice` now infers more precise result types**, including
  `finite_real` for finite intervals and `finite_integer` for integer ranges.

- **Repeated compilation with the same external target is now deterministic**
  and produces identical generated code.

- **Evaluating chained broadcast operations over lazy collections is faster:**
  approximately 3× faster with `evaluate()` and 4× faster with `.N()` at default
  precision in the benchmark used for this release.

### Issues Resolved

- **Partially evaluated `WithRandomSeed` expressions now retain their seed**, so
  later substitutions produce the same result as substituting before evaluation.

- **Nested `N` and `Evaluate` expressions now preserve numeric approximation and
  precision.** For example, `N(Evaluate(pi))` now returns a numeric value
  instead of the symbolic `pi`.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.97.0 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |          7.9 |       8.5 |   203 |     288 |         4.5 |
| $\sin 1$           |           23 |        23 |   253 |     598 |         6.0 |
| $\cos 1$           |           21 |        22 |   253 |     781 |         8.1 |
| $\ln 2$            |           16 |        16 |   386 |   5,471 |         4.7 |
| $e^{\pi}$          |           15 |        15 |   273 |   7,477 |         5.9 |
| $\zeta(3)$         |        1,738 |     1,702 |   337 |       — |          56 |
| $\Gamma(\tfrac13)$ |          924 |       913 |   407 |       — |         268 |
| $\psi(\tfrac13)$   |          781 |       790 | 3,496 |       — |         199 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.97.0** columns to see
what is _new this release_ (a `—` under `0.97.0` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.97.0 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     4.5×     |   2.2×   |   3.5×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     8.1×     |   1.6×   |   6.8×    | 0.08×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     4.9×     |   0.6×   |   3.7×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   1.7×   |     —     | 0.08×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   1.0×   |     —     | 0.008× |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.0×   |     —     | 0.006× |    —    |     1×      |
| **Derivatives**                        |              |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |    0.04×     |  0.03×   |   0.03×   | 0.001× | 0.004×  |     1×      |
| **Simplification**                     |              |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |     37×      |   27×    |    31×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     74×      |   42×    |    44×    |  3.1×  |   17×   |     1×      |
| **Evaluation**                         |              |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     41×      |   17×    |    38×    |  2.9×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     7.2×     |   4.6×   |   6.8×    |  1.9×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    5778×     |  6836×   |   5520×   |  107×  |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     352×     |   146×   |   298×    |  2.7×  |    —    |     1×      |
| **Solving**                            |              |          |           |        |         |             |
| $x^4+x^2-1=0$                          |     0.3×     |   0.3×   |   0.3×    | 0.05×  |    —    |     1×      |
| $x^3-x-1=0$                            |     2.2×     |   2.4×   |   1.9×    | 0.05×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 4.9× faster than
Mathematica** (up to 5778×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-07-28 · Compute Engine `0.97.0` @ `bff3c3b1` (current build)
· published `0.97.0` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.97.0 _2026-07-27_

### Breaking Changes

- **A broadcast operand is evaluated ONCE.** Broadcasting is an operation on
  values (the NumPy/Julia/R model), so an operand that is lifted into every cell
  is evaluated a single time and the operation then maps over the cells:

  ```
  L < Random()        // ONE draw, compared against every element of L
  Map(L, l ↦ l < Random())   // a draw per element, written explicitly
  ```

  Comparisons and logical connectives used to re-evaluate a lifted operand per
  element, so `[0.5, 0.5, 0.5] < Random()` could answer `[True, False, True]`.
  Arithmetic (`L + Random()`) already drew once; the disagreement was an
  implementation artifact of the element-wise zip, not a semantic. Only impure
  _scalar_ operands under a broadcast are affected — an impure operand that IS
  the traversed collection (`[Random(), Random()] < 0.5`) still draws per cell,
  because those draws are the cells.

- **A length mismatch in a broadcast is an error, not a truncation.** Zipping to
  the shortest operand silently discarded the tail of the longer one:

  ```
  [1,2,3] < [2,2]     // was: [True, False]   now: incompatible-dimensions
  ```

  `Add` already answered `incompatible-dimensions` for this shape, so the engine
  disagreed with itself depending on the head. One check now governs every
  broadcast path — the eager zip, the arithmetic broadcast, and the lazy `Map`
  form — so the ordering relations, the logical connectives,
  `Divide`/`Power`/`Mod`, `Add`/`Multiply`, and `ElementMax`/`ElementMin`/
  `Clamp` all answer alike. In particular the SIZE of a collection no longer
  decides the semantics (a mismatch used to error below the eager threshold and
  truncate above it), and neither does the shape of the source:
  `Add(Filter(…), L)` used to truncate where `Less` on the same operands
  errored.

  An **unbounded** operand against a finite one is a mismatch too (`count` is
  `Infinity`, which agrees with no finite length). A scalar operand is a LIFT,
  not a participant, so it never mismatches; an operand whose length is not yet
  known is not compared, since there is nothing to compare until it resolves. An
  empty operand alongside a non-empty one is a mismatch, while a lone empty
  operand still broadcasts to `Nothing` (`Not([])`).

  `PointList` is deliberately unaffected: it ZIPS components rather than
  broadcasting an operator over them, and its shortest-zip
  (`PointList([1,2,3],[10,20])` → two points) is an existing consumer contract.
  The general rule: an operator LIFTED over collections requires length
  agreement, while an explicit PAIRING constructor (`Zip`, the variadic `Map`,
  `PointList`) defines its length as the shortest input. See
  `docs/BROADCAST-MODEL.md` for the full policy.

### New Features

- **Compiled comparisons and logical connectives broadcast element-wise.** The
  ordering relations (`<`, `<=`, `>`, `>=`) and the connectives (`And`, `Or`,
  `Not`) compile over collection-valued operands on the JavaScript target
  instead of failing closed, so the Desmos filter form compiles rather than
  falling back to the interpreter:

  ```js
  compile(ce.parse('[10,20,30][|[1...3]-k|>0]')).run(); // [10, 30]
  ```

  These heads lower to raw JS infix operators, which are silently wrong on an
  array (`0 < [1,0,1]` stringifies it; an array is truthy, so `m1 && m2` returns
  a whole operand). They now wrap the head's own scalar codegen in the
  `_SYS.bcast` runtime helper, which recurses per POSITION — an empty or
  mismatched position projects to NaN without poisoning its siblings
  (`Not([[], [True]])` → `[NaN, [false]]`, matching the interpreter's
  `[Nothing, [False]]`).

  The scalar path is untouched: `x < 3` with an `unknown`-typed plot variable
  still emits `_.x < 3`, with no runtime guard. Three shapes deliberately keep
  failing closed, because the compiled answer would disagree with
  interpretation: a CHAINED ordering (`0 < xs < 5`, whose pairwise `&&` is sound
  only over scalars); `Equal`/`NotEqual` over two collections (whole- collection
  equality, which keeps its `_SYS.eq` dispatch and stays element-wise for the
  list-vs-scalar case); and an operand that types as a list but does not COMPILE
  to one — notably a user-function application over a collection argument
  (`q(L) < y`), since a user function's body compiles as scalar code and returns
  NaN on an array, which a comparison would turn into a plausible `false`.

### Issues Resolved

- **`Covariance`/`Correlation` report a length mismatch as
  `incompatible-dimensions`.** They were already strict — a ragged pair of data
  collections errored — but with their own `unexpected-argument` ("collections
  differ in length") rather than the `incompatible-dimensions` error every
  broadcast path answers. One error tag now covers every length-mismatch
  diagnosis (see `docs/BROADCAST-MODEL.md`). The other argument errors
  (`at least 2 data points required`, the shape error, `zero variance`) are
  unchanged.

- **`Multiply` over operands of mixed collection kinds is element-wise again.**
  A `List` literal packs as a tensor value while a `Range`/`Filter`/`Take`/
  `Reverse` result does not, so the non-tensor operand was classified as a
  SCALAR factor — and applying a scalar multiplies every CELL by it, turning
  each cell into a list:

  ```
  [1...3] · [4,5,6]        // was: [[4,8,12],[5,10,15],[6,12,18]]   now: [4,10,18]
  Range(1,3) · [1,2,3]     // was: [[1,2,3],[2,4,6],[3,6,9]]        now: [1,4,9]
  Range(1,3) + [1,2,3]     // [2,4,6] — `Add` was always element-wise
  ```

  Not a length problem: it misfired at _matched_ lengths, and same-kind pairs
  (`List`×`List`, `Range`×`Range`) were always element-wise, because neither
  operand reached the scalar bucket. `Add` avoids it by declining its tensor
  kernel when fewer than two operands pack; `Multiply` now declines when a
  non-tensor collection would land among the scalars, and falls through to the
  same element-wise broadcast — which also brings mixed-kind mismatches under
  the length ruling above. Scalar×list scaling, matrix products, and
  component-wise tuple scaling are unchanged.

- **A symbol bound to a derived collection serializes as its name again.**
  Regression in 0.96.0. `.latex` and `toString()` materialize a lazy collection
  before serializing, and a symbol whose assigned value is a _derived_
  collection (the result of evaluating a `Join`, a comprehension, …) delegates
  `isLazyCollection` to that value — so the symbol serialized as its
  materialized value while `.json` still answered the symbol's name:

  ```js
  ce.assign('L', ce.box(['List', 1, 2, 3]));
  ce.assign('L', ce.box(['Join', 'L', ['List', 4]]).evaluate());
  ce.symbol('L').json;   // 'L'
  ce.symbol('L').latex;  // was: '\bigl\lbrack1, 2, 3, 4\bigr\rbrack'  now: 'L'
  ```

  A literal `List` value (eager, not lazy) never triggered it, which is what
  made the failure value-provenance-dependent and hard to spot: a consumer that
  serialized a symbol to persist a document wrote the value where the name
  belonged. A symbol now never takes the materialize-before-serialize path — a
  name's spelling does not depend on what the name currently holds. Lazy
  collection _expressions_ (`Range`, `Map`, comprehensions) serialize as before.
  Reported by the Tycho team.

- **`Add` and `Multiply` fold a `Measurement` operand on the first `.N()`.**
  Every unary/binary arithmetic head already folded a quadrature result
  (`Power`, `Divide`, `Sqrt`, `Sin`, `Negate`, `Abs` of a `Measurement` yield
  another `Measurement`), but the two n-ary heads checked for `Measurement`
  operands against the _plainly evaluated_ operands. A quadrature operand only
  becomes a `Measurement` under numeric approximation — `\int_0^1 \sin x\,dx`
  evaluates to the exact `1 - \cos 1` — so the check saw nothing, and the first
  `.N()` returned an inert `Add`/`Multiply` whose `.re` was `NaN` (the same dead
  numeric read fixed for `Measurement` itself in 0.96.0, one level up). A second
  `.N()` folded it:

  ```js
  const once = ce.parse('1 + \\int_0^1 \\sin(x) dx').N();
  once.re;      // was: NaN     now: 1.4596976941318605
  once.operator // was: 'Add'   now: 'Measurement'
  ```

  The handlers now re-dispatch the Measurement fold on the numericized result,
  so the parse route agrees with the (already correct)
  `ce.box(['Add', <measurement>, 1]).N()` route exactly — value and error bar.
  The sibling `Quantity` check in the same handlers had the identical structural
  gap (an operand that only becomes a `Quantity` under numeric approximation was
  invisible to it); it is closed the same way. `evaluate()` is unaffected and
  still returns the exact symbolic form. Reported by the Tycho team.

- **Compiling a definite integral that cannot close symbolically is now
  bounded.** The JavaScript compilation target first attempts to resolve an
  `Integrate` to a closed form (so a plotted `∫₀ˣ f` costs ~µs per sample
  instead of a quadrature); that attempt ran under whatever deadline the caller
  had armed — and under none by default. An integrand with a _symbolic_ exponent
  (`y^{k/2-1}` with `k` a free document parameter) sent the integration-by-parts
  search into a cycle with no shrinking measure: bounded in depth but not in
  cost, it did not return in over 5 minutes, synchronously, with no way to
  interrupt it:

  ```js
  // χ² tail with shape parameter k left free: >5 min → ~2 s, success: true
  ce.getCompilationTarget('javascript')
    .compile(ce.parse('\\int_x^\\infty \\frac{e^{-y/2} y^{k/2-1}}{(k/2-1)!\\, 2^{k/2}} dy',
             {strict: false}), {realOnly: true});
  ```

  The antiderivative-first attempt now arms its own 2-second span (an enclosing
  caller span still tightens it, per the timeout model's `min()` nesting — it
  can only shorten, never extend, a caller's bound) and degrades to the GK15
  quadrature emitter on expiry, so the compiled integral samples numerically
  with the parameter bound at run time — which is the desired behavior for a
  non-elementary integrand. Note that `ce.timeLimit` was retired in 0.89.0: to
  bound `evaluate()` itself, use `ce.withTimeLimit({ms, label}, () => …)`, which
  this shape honors to the millisecond. Reported by the Tycho team.

- **Compiled `Factorial` of a non-integer computes Γ(x+1) instead of NaN.** The
  interpreter has always extended the factorial to the reals (`(\frac12-1)!` →
  `Γ(\frac12)` = `√π`), but the compiled runtime used the integer-only helper,
  so the same expression compiled successfully and returned `NaN` — silently
  zeroing out, e.g., a χ² density's normalizing constant `(k/2-1)!` at odd `k`:

  ```js
  const f = ce.getCompilationTarget('javascript')
              .compile(ce.parse('(\\frac{1}{2}-1)!'));
  f.run({}); // was: NaN    now: 1.7724538509055159 (= √π, identical to .N())
  ```

  Non-integer arguments route through the same `gamma` the interpreter uses, so
  compiled and interpreted values are bit-identical; the non-negative integer
  fast path is unchanged, and a negative integer stays at the Γ pole (`NaN`, the
  real projection of the interpreter's `ComplexInfinity`). The Python target
  likewise now emits `scipy.special.gamma(x + 1)` instead of
  `scipy.special.factorial` (which answers `0` for a negative non-integer). The
  GPU targets already extended via `Γ`; the interval target remains deliberately
  integer-only. Reported by the Tycho team.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.96.0 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |          7.3 |       7.5 |   180 |     110 |         3.9 |
| $\sin 1$           |           20 |        21 |   218 |     439 |         5.2 |
| $\cos 1$           |           20 |        20 |   221 |     456 |         7.1 |
| $\ln 2$            |           14 |        14 |   347 |   4,406 |         3.7 |
| $e^{\pi}$          |           13 |        13 |   214 |   4,655 |         4.5 |
| $\zeta(3)$         |        1,534 |     1,562 |   272 |       — |          49 |
| $\Gamma(\tfrac13)$ |          840 |       834 |   350 |       — |         213 |
| $\psi(\tfrac13)$   |          724 |       720 | 2,776 |       — |         174 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.96.0** columns to see
what is _new this release_ (a `—` under `0.96.0` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.96.0 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     4.6×     |   2.3×   |   3.4×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     7.9×     |   1.5×   |   6.1×    | 0.08×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     5.2×     |   0.8×   |   4.0×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   1.9×   |     —     |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   1.1×   |     —     | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.1×   |     —     | 0.007× |    —    |     1×      |
| **Derivatives**                        |              |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |    0.04×     |  0.03×   |   0.03×   | 0.001× | 0.003×  |     1×      |
| **Simplification**                     |              |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |     42×      |   29×    |    29×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     77×      |   45×    |    51×    |  3.0×  |   18×   |     1×      |
| **Evaluation**                         |              |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     15×      |   16×    |    33×    |  3.1×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     7.3×     |   4.9×   |   6.8×    |  2.2×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    4819×     |  4740×   |   4259×   |  80×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     293×     |   124×   |   250×    |  2.6×  |    —    |     1×      |
| **Solving**                            |              |          |           |        |         |             |
| $x^4+x^2-1=0$                          |     0.3×     |   0.3×   |   0.3×    | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |     1.7×     |   1.9×   |   1.5×    | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 5.2× faster than
Mathematica** (up to 4819×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-07-27 · Compute Engine `0.96.0` @ `9eb6538a` (current build)
· published `0.96.0` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.96.0 _2026-07-26_

### Breaking Changes

- **The 0.95.0 random-family tombstones are deleted, completing the one-release
  migration window.** In 0.95.0, evaluating a removed head (`RandomInteger`,
  `RandomList`, `RandomSeed`, `Sample`, `Shuffle`) threw an `operator-removed`
  error naming its replacement, and `ce.randomSeed` was a throwing accessor.
  Those guards are now gone: the removed heads behave like any other
  unrecognized operator — a valid, inert expression — and `randomSeed` is no
  longer a property of the engine. Migrate on 0.95.0 (where every legacy call
  site fails loudly with its replacement named) before adopting this release;
  the migration table is in the 0.95.0 notes below.

- **`evaluate()` on a symbol now resolves the free symbols of its stored
  value.** A symbolic value was returned verbatim, so a symbol assigned _after_
  it was stored never reached it:

  ```
  let d = 3x^2 + 1
  let x = 2
  d          // was: 3x^2 + 1     now: 13
  N(d)       // 13 — unchanged
  ```

  `N()` and `compile()` already resolved it, so plain `evaluate()` was the
  outlier and disagreed with both; a second `evaluate()` used to resolve one
  more level ("one-evaluate-late"). Assignment remains **eager**, so declaration
  order still decides what a value snapshots:
  `let x = 2; let d = 3x^2 + 1; x = 3; N(d)` is `13`, while
  `let d = 3x^2 + 1; let x = 2; x = 3; N(d)` is `28`. The residual for a cyclic
  binding is unchanged (`s = s + 1; s` → `s + 1`).

- **A stored value's free symbols are no longer captured by a same-named
  parameter.** They now denote the binding they were canonicalized against, not
  whatever an inner scope calls that name:

  ```
  let a = x + 1
  g(x) = a
  g(5)       // was: 6            now: x + 1
  N(g(5))    // was: 6            now: x + 1
  ```

  With a global `x = 100`, `g(5)` is `101` — the lexically correct binding —
  where it used to be `6`. This closes the same defect on three paths that
  disagreed with each other: the parameter substitution applied after a call,
  the constant dereference path, and the numeric (`N`) re-evaluation inside a
  call frame. A dictionary-valued symbol is covered too. Behavior that was
  already correct is unchanged: a block-local `let` does not leak into a stored
  value, and a renamed parameter never captured.

- **Only a value SHIELD hides a stored value's own binding.** Dereferencing a
  symbol's stored value deferred to the ambient lookup whenever ANY valueless
  shadow of a free symbol's name was in scope. That was a proxy for the shield
  idiom — `Solve`, `D`, `Integrate`, `Limit` and `simplify()` all hide a
  symbol's value by shadow-declaring it valueless — and it swept in ordinary
  declarations, which shield nothing:

  ```
  a = x + 1                          // x still valueless: a captures the global x
  x = 100
  a + 5                              // 106 — unchanged
  Block(Declare(x, "real"), a + 5)   // was: x + 6        now: 106
  ```

  `a` captured a _binding_; the inner `Declare` created a _different_ variable,
  and a different variable has no business intercepting. The asymmetry that made
  the old rule indefensible: give that shadow a value —
  `Block(Declare(x, "real"), Assign(x, 7), a + 5)` — and it already did not
  intercept, evaluating to `106` before and after. The genuine shields are
  unaffected: with a global `x = 100`, `Solve(x + 1 = 0, x)` is still `[-1]`,
  and `simplify()` remains value-blind.

- **A union type is assignable only to a target that covers EVERY arm.**
  `isSubtype()` (and therefore `type.matches()`) used the any-branch rule when
  the target was a composite type and the all-branch rule when it was a
  primitive, so the answer depended on the shape of the target:
  `list<tuple<number,number,number>> | tuple<number,number,number>` matched
  `tuple<number, number, number>`, while `number | list<number>` matched neither
  `number` nor `collection`. Assignability is now all-branch throughout — the
  dual of the intersection rule, where `A & B` is assignable as soon as one arm
  is. A union still matches any target covering all its arms (`integer | real` ⊑
  `real`, `number | list<number>` ⊑ `collection | number`).

  Code that asked `unionType.matches(T)` to mean "could this be a `T`" was
  asking the wrong question and now gets `false`; ask it the other way round
  (`ce.type(T).matches(unionType)` — "would a `T` satisfy this"), which is how
  the matrix-inference repair gate on union-typed parameters such as
  `LinearSolve`'s `matrix | vector` is now spelled.

### Issues Resolved

- **Adaptive quadrature no longer reports a sharply-peaked integral as a
  converged zero.** The adaptive loop started from a single 15-node panel over
  the whole interval, and could never recover from a first panel that read as
  zero: with every node returning ~0, the Gauss/Kronrod difference also
  vanished, met the absolute tolerance, and the integral "converged" after 15
  evaluations. The witness is a peak far narrower than the interval whose weight
  vanishes at the center node:

  ```js
  ce.parse('\\int_{-50}^{50} x^2 \\frac{1}{\\sqrt{2\\pi}} e^{-x^2/2} dx').N();
  // was: 3.2e-21 ± 5.1e-21     (true value: 1)
  // now: 1.0000000000000002
  ```

  The whole Gaussian moment family failed this way (moments 1, 2, 4 and 6 were
  each 100% wrong while claiming an error bar around `1e-21`); the bare `∫φ`
  over the same interval was correct, because `φ(0)` is sampled. Quadrature now
  starts from 16 equal panels, which fixes the family exactly and brings the
  comb `∫₋₁₅¹⁵ φ(x)³⁵⁰` to 0.14% relative error. This is a mitigation, not a
  guarantee — a peak narrower than a starting panel can still be missed, and the
  error estimate still cannot report it — a peak-discovery strategy (shifted or
  low-discrepancy probes) would close the family rather than move the threshold,
  and is not attempted here. Iterated integrals reduce the per-level count so
  the floor applies to the whole integral rather than multiplying per dimension.
  The cost falls on integrals that used to converge on the first panel:
  `∫₀¹ sin x` goes from 15 to 240 evaluations, so a compiled integral called per
  plotted sample goes from ~40 µs to ~130 µs. Reported by the Tycho team.

- **A definite integral whose integrand is identically non-finite now fails fast
  instead of burning the full Monte-Carlo budget.** Adaptive quadrature can
  never converge on a `NaN` integrand, so it fell through to the Monte-Carlo
  estimator, which spent 1e7 samples — 250–450 ms per call — to return the `NaN`
  that was decidable up front. The usual trigger is an unbound variable reaching
  a compiled artifact as `undefined`; a plotted curve then froze the thread and
  drew nothing. `monteCarloEstimate` now probes a few samples and returns `NaN`
  immediately when they are all non-finite. Measured: 100 calls on such an
  integrand went from 30.5 s to 22 ms. Integrands with a genuine endpoint
  singularity are unaffected — the bail requires _every_ probe to be non-finite.
  Reported by the Tycho team.

- **`.N()` of a definite integral with a free symbol in the integrand no longer
  throws a raw `ReferenceError` out of generated code.** The integrand was
  handed to the implicit compiler regardless, and the generated body read the
  free symbol from a scope slot the numeric caller never supplies:

  ```js
  ce.parse('\\int_0^1 (x+q)\\,dx').N();
  // was: throws ReferenceError: _ is not defined
  // now: stays symbolic
  ```

  A parameter with no value leaves nothing to integrate numerically, so the
  expression now stays symbolic; it evaluates as before once the symbol has a
  value. Both the single-limit and the iterated multi-limit paths are covered.

- **A `Measurement` now answers the numeric accessors.**
  `Measurement(value, error)` types as its nominal's scalar type, so
  `Integrate(…).N()` reports `finite_real` and `isNumber === true` — but every
  numeric read was dead, which silently poisoned any consumer reading `.re`, and
  propagated, since `Measurement + 1` is another `Measurement`:

  ```js
  const n = ce.parse('\\int_0^1 \\sin(x) dx').N();
  n.re;            // was NaN,       now 0.45969769413186023
  n.numericValue;  // was undefined, now the nominal
  n.valueOf();     // was the string '0.4596… ± 0.0000…', now the number
  n.sgn;           // was undefined, now 'positive'
  ```

  `.re`, `.im`, `.bignumRe`, `.bignumIm`, `.sgn` and `valueOf()` project the
  nominal — all of them on the public `Expression` type, so `.re` is the channel
  and no cast is needed. The uncertainty stays reachable through the MathJSON,
  or through `op2` after narrowing with `isFunction()`, and `toString()` still
  shows `±`.

  Three members are deliberately NOT projected, all for the same reason: a
  `Measurement` is a **function expression**, and the number-literal surface
  belongs behind the `isNumber()` guard, which narrows on expression kind.
  `numericValue` stays `undefined` — it is declared only on
  `NumberLiteralInterface`, and projecting it would advertise an exact numeric
  representation that a quadrature result does not have; `isNumberLiteral` and
  the `isNumber()` guard stay `false`; and `.value` stays `undefined` (it is the
  expression for a literal and `undefined` for a symbolic expression).
  `.re`/`.im` are sufficient for a `Measurement` precisely because its nominal
  is never an exact number. Reported by the Tycho team.

- **A shorthand-lambda placeholder in a pipeline stage no longer picks up a
  same-named global.** `Pipe` is lazy, so it canonicalizes its right operand in
  the caller's scope — before the operand is wrapped into the implicit lambda it
  denotes. A global `_1` holding a value therefore captured the placeholder, and
  the stage silently failed to canonicalize:

  ```js
  ce.box(['Assign', '_1', 7]).evaluate();
  ce.parse('[1,2,3] \\rhd \\mathrm{Map}(\\_1, k \\mapsto k^2)').evaluate();
  // was: Map([1,2,3], (k) |-> k^2)   now: [1,4,9]
  ```

  The placeholders (`_`, `_1`…`_9`) mentioned by the stage are now bound to
  fresh, valueless locals for the duration of that canonicalization. A genuine
  free variable in the stage still resolves — and auto-declares — in the
  caller's scope, unchanged.

- **The empty list is now a member of every list type.** `[]` typed
  `list<nothing>`, which made `[] <: list<integer>` **false** — an empty list
  satisfied no list type at all:

  ```js
  ce.parse('[]').type.toString(); // was: "list<nothing>"   now: "list<never>"
  ce.parse('[]').type.matches('list<integer>'); // was: false        now: true
  ```

  The cause was in the type lattice rather than in lists: `widen()` (a join)
  returned `nothing` for an empty input, where the join of no types is the
  _bottom_ type. `nothing` is the unit type of the value `Nothing`, not the
  bottom type — `never` is. With `never`, covariance does the rest, since
  `never <: X` gives `list<never> <: list<X>`. `narrow()` had the mirror bug and
  now returns the top type for an empty input.

  Visible effects: the rendered type of an empty collection changes
  (`list<nothing>` → `list<never>`, `list<list<nothing>>` →
  `list<list<never>>`), and an empty list now satisfies a list-typed parameter
  of any element type. Note that `couldMatch()` deliberately ignores the empty
  list as a witness — `list<integer>.couldMatch('list<string>')` stays `false`,
  since that question is about element shape.

- **`nothing` and `missing` were reported as disjoint from any union containing
  them** — `nothing` vs `boolean | nothing` claimed disjointness, refuted by the
  value `Nothing`, which inhabits both. The unit-type short-circuit ran before
  the union was examined and compared a type name against a composite type
  object. This surfaced as an unsound `nothing <: !(boolean | nothing)`.

- **A quantifier's variable is no longer captured by a same-named global
  value.** `ForAll`, `Exists`, `NotExists`, `ExistsUnique` and `NotForAll`
  declared a local scope that was created and then stayed empty, so the
  quantified variable was bound wherever the caller had it. With `x` assigned,
  the bound occurrence resolved the assigned value and the proposition was
  discharged from it:

  ```
  x = 5
  \forall x, x > 4      // was: True     now: ForAll(x, x > 4)
  \exists x, x > 4      // was: True     now: Exists(x, x > 4)
  ```

  Quantification over a finite domain (`\forall x \in \{1,2,3\}, x > 0`) is
  unchanged, and the global `x` is untouched in both cases. The quantifiers now
  use the sanctioned binder mechanism (`scoped: limitsIndexSites(0)`).

- **`Integrate`'s integration variable is bound by the integral.** The index of
  a `Limits` operand was bound nowhere: it was left raw on the parse route and
  carried the caller's binding on the `ce.function` route, so the same integral
  written two ways did not compare equal.

  ```js
  const parsed = ce.parse('\\int_0^1 x^2 \\,dx');
  const built = ce.function('Integrate', [
    ce.parse('x^2'),
    ce.function('Limits', [ce.symbol('x'), ce.number(0), ce.number(1)]),
  ]);
  parsed.isSame(built); // was: false    now: true
  ```

  `Integrate` now uses the sanctioned binder mechanism
  (`scoped: indexingSetSites(1)`), so `expr.localScope` reports the integration
  variable(s), and an indefinite integral's open result is re-bound to the
  enclosing scope on the way out.

- **`D`'s differentiation variables are bound by the derivative.** `D` declared
  a local scope that was minted and then never populated, so its variable
  operands were bound wherever the caller had them and the same derivative
  written two ways did not compare equal:

  ```js
  const parsed = ce.parse('\\frac{d}{dx} x^2');
  const built = ce.function('D', [ce.parse('x^2'), ce.symbol('x')]);
  parsed.isSame(built); // was: false    now: true
  ```

  `D` now uses the sanctioned binder mechanism, with a new variadic selector
  (`scoped: operandsFrom(1)`) for an operator whose bound variables are a
  trailing list of arbitrary length. `expr.localScope` reports every
  differentiation variable, and a derivative — an open expression in that
  variable — is re-bound to the enclosing scope on the way out.

  **Visible consequence**: a body handed to `D` already boxed is re-bound to the
  derivative's own scope, so it stops comparing equal to the expression it was
  built from — `ce.box(['D', body, 'x']).op1.isSame(body)` is now `false`, as it
  has been for a `Sum`'s index since that operator was migrated. Code that lifts
  a differentiand back OUT of a `D` node into the ambient scope has to re-bind
  it; `expr.explain('D')`, which presents the differentiand as a free-standing
  expression, now does.

- **A `Function` literal's parameter operand denotes the literal's own
  parameter.** The body `Block`'s binding was already the authority for
  occurrences in the body, but the parameter operand itself was left raw on the
  parse and `ce.box` routes and carried the CALLER's binding on the
  `ce.function` route — the same route disagreement `Series` and `Integrate`
  were migrated to fix. A canonical literal now has exactly one binding per
  parameter, referenced from both the parameter operand and the body.

- **A bound variable named after a library constant (`Pi`, `e`, `i`, ...) is now
  bound like any other.** A binder's variable was resolved by NAME, and a name
  owned by a constant short-circuits to the interned constant before the scope
  chain is consulted — so the binder declared a binding that nothing referenced.
  With an already-canonical body, the parameter was silently lost:

  ```js
  const f = ce.function('Function', [ce.parse('\\pi + 1'), ce.symbol('Pi')]);
  ce.box(['Apply', f, 10]).evaluate(); // was: 1 + pi    now: 11
  ```

  The parse and `ce.box` routes gave `11` throughout, so this was also a route
  disagreement. Bound variables are now built from the binder scope's own
  binding, which fixes the binding identity for every binder that accepts a bare
  symbol — including `D(Pi^2, Pi)`, whose value was already right while the
  binding underneath was the constant's.

- **`Interval` now survives a LaTeX round-trip.** A closed interval serialized
  as `\lbrack a, b\rbrack`, which the parser reads as a two-element `List`, and
  a fully-open one as `\lparen a, b\rparen`, read back as a parenthesized
  `Sequence`. The substitution was silent and could be destructive: under
  `RandomChoice` — the documented migration target for the removed
  `RandomList(n)` — `RandomChoice(Interval(0, 1), n)` came back as
  `RandomChoice(List(0, 1), n)`, demoting a uniform real draw to a Bernoulli
  pick of the two _values_ 0 and 1, with nothing downstream able to detect it.

  Serialization now depends on whether the position disambiguates the interval:

  - In a **set position** of a set operator — the right side of `\in`/`\notin`,
    either side of `\cup`, `\cap`, `\setminus`, `\subset`, `\subseteq`,
    `\supset`, `\supseteq` — the conventional bracket notation is kept
    (`x\in\lbrack0, 1\rbrack`), because the operator forces the set reading when
    it is parsed back. This is unchanged, and stays the common display case.
  - **Anywhere else** the serialization has to stand on its own: half-open
    intervals use the unambiguous American spellings (`\lbrack a, b\rparen`,
    `\lparen a, b\rbrack`), an open interval uses ISO reversed brackets
    (`\rbrack a, b\lbrack`), and a **closed** interval uses the function form
    `\mathrm{Interval}(a, b)` — `[a, b]` is also how a two-element list is
    written, so no bracket spelling is available for it.

  Consumers storing a uniform draw as LaTeX can now use the closed
  `RandomChoice(Interval(0, 1), n)` from the migration table directly. The
  half-open `Interval(0, Open(1))` remains the more precise spelling for what
  `RandomList(n)` meant (upper-exclusive) and also round-trips.

- **`ListFrom` now compiles.** It had no compile handler, so the one eager
  materializer that works over an arbitrary collection body could not be used in
  compiled code. That matters under `WithRandomSeed`: a frame around a _lazy_
  comprehension does not make it replayable, because the view materializes after
  the frame has exited and the draws escape it. `ListFrom` inside the frame
  makes it eager, and the compiled form now agrees with the interpreter
  draw-for-draw:

  ```
  WithRandomSeed(12345, ListFrom([Random() for k=[1...6]]))   // replays, compiles
  ```

  On the JavaScript and Python targets the splice is decided at runtime, per
  operand, so an operand typing as `unknown` — a free symbol in a compiled body
  — works. The GPU targets have no runtime splice (their lists are fixed-size
  `vecN`/array literals), so an all-scalar `ListFrom` compiles exactly like the
  equivalent `List` and anything with a provably collection operand fails
  closed. Note that `Repeat(Random(), n)` is eager and round-trips but draws
  **once**, yielding n copies of a single value — it is not a uniform batch.

- **A cycle between symbol values no longer overflows the stack.** A pair of
  bindings such as `a := b` with `b := a` is individually well-formed — each
  value mentions no symbol of its own name — so the self-reference guard never
  fired and any query that resolves a symbol's value and delegates to it
  recursed until the stack blew. This reached far more than the reported
  `isFiniteCollection`: `count`, `at`, `each`, `N()`, `isEqual`, `isSame`, and
  the scalar predicates (`sgn`, `isFinite`, `isNaN`, `re`/`im`) all crashed on a
  cyclic binding. Such a query now **fails closed** — `undefined`/`false`, never
  a throw. An enumeration that traverses a cycle yields the elements it gathered
  before closing it, matching what a direct self-reference (`d := Append(d, 1)`
  → `[1]`) has always produced.

- **Comparison, ordering and rationalization no longer numericize an argument
  they are about to reject.** `isEqual`/`Equal`, `Sort`, `assume`,
  `ApproxEqual`, `Rationalize` and the `.N()` trig path each called `.N()` on an
  operand and then discarded the result when it turned out not to be a number
  literal. An operand with unknowns can never become one, and over nested
  applications of a user function that discarded walk is exponential in the
  nesting depth: at depth 12, `isEqual` against such a chain took ~1.8 s and
  `Sort` of five of them far longer; both are now milliseconds. Arguments that
  _can_ numericize — including partially numericizable symbolic ones such as
  `sin(2) + x` — are unaffected. (Same class as the elementwise-`Sin` fix below;
  that one was the exact path, these are the `.N()` path.)

- **`Round`/`Floor`/`Ceil`/`Truncate` of a symbolic term keeps its integer
  type.** `Round(4Q)` typed `number` while both the less informative `Round(Q)`
  and the fully known `Round(4.7)` typed `finite_integer`: an operand typed
  `finite_number` reports `isReal === false`, which means "not provably real",
  and the handler read it as "provably complex". Non-realness is now proven from
  a number literal or from a type that excludes the reals, so an operand of
  unknown realness keeps the generic-point convention. A wrap asserting
  integrality (`RandomChoice(Interval(0,1), Round(4N))` with `N` unbound) now
  type-checks.

- **`sin`/`cos`/`tan`… of a deeply nested symbolic argument no longer blows
  up.** The constructible-value lookup called `.N()` on every argument,
  including one with free symbols that can never numericize; over nested
  applications of a user function that wasted traversal re-walked shared
  sub-chains and grew exponentially with the nesting depth. Evaluating
  `sin(πR/8)` over a 17-element list whose element _k_ is a user function
  applied _k_ times took 44 s and now takes ~0.1 s. Arguments that can
  numericize — including a symbol with an assigned value — reduce exactly as
  before.

- **A function literal built around an already-canonical body now binds its
  named parameters.** Canonicalizing an expression that is already canonical is
  a no-op, so a body constructed _before_ the literal existed kept the bindings
  it was built with — and its parameter occurrences went on denoting the
  enclosing scope's variable of the same name instead of the literal's own
  parameter. The repair previously covered only the anonymous placeholders (`_`,
  `_1`, …) produced by the pipe/shorthand desugaring; it now covers named
  parameters as well, so anything keyed on a symbol's binding — the
  post-application substitution of a partially-symbolic result, symbol equality
  — sees the parameter for what it is:

  ```ts
  const body = ce.box(['Add', 'y', 1]); // canonical: `y` is the caller's
  const f = ce.function('Function', [body, ce.symbol('y', { canonical: false })]);
  // the body's `y` is now this literal's parameter, not the caller's `y`
  ```

  Values are unchanged; what changes is which variable an occurrence refers to.

- **An antiderivative is expressed in the caller's symbols.** `Integrate` binds
  its integration variable, and an integrand's free coefficients are declared
  alongside it — but the antiderivative machinery (and the Rubi rule driver
  installed by `loadIntegrationRules`) works on the bare integrand and creates
  its own occurrences of those names in the caller's scope. The two sets of
  occurrences denoted different variables, so the result could compare unequal
  to the same expression written by hand. The integrand is now re-bound as it is
  lifted, matching how a Jacobian's body is lifted from its literal.

### New Features

- **An operator definition can now declare its bound variables.** The `scoped`
  flag accepts a **binding-site selector** in addition to `true`:

  ```ts
  import { operandSites } from '@cortex-js/compute-engine';

  ce.declare('MyBinder', {
    lazy: true,
    scoped: operandSites(1), // operand 1 is my bound variable
    signature: '(expression, symbol) -> number',
  });
  ```

  A selector implies a scope, so `scoped` remains the complete inventory of
  scope-creating operators. When one is given, the engine declares each site's
  symbol in the operator's own scope _before_ the `canonical` handler runs, and
  binds every occurrence of those names to that scope afterwards — so the
  `parse`, `ce.box()` and `ce.function()` routes agree about which binding a
  bound variable denotes, whichever route built the expression. The prebuilt
  selectors (`operandSites`, `indexingSetSites`, `limitsIndexSites`,
  `lambdaParamSites`) and the `BindingSite`/`BindingSiteSelector` types are
  exported from `@cortex-js/compute-engine`. `Sum`, `Product`, `Loop`,
  `Comprehension`, `Series` and `NDSolveFunction` now use it in place of six
  hand-rolled conventions.

  An indexing-set selector marks its sites `clauseLocal`: later clauses see
  earlier bindings, but an _earlier_ clause's collection resolves a name a later
  clause binds in the enclosing scope
  (`Comprehension(…, Element(i, [j, j+1]), Element(j, […]))` draws `i` from the
  ambient `j`).

- **`BoxedType.couldMatch()`** — "could a value of this type be a `target`?",
  the predicate for classifying a value by shape. `matches()` answers the other
  question — "is _every_ value of this type a `target`" — so it reports `false`
  for a union whose members include exactly the shape being asked about, which
  is the steady state for a variable declared with more than one admissible
  shape:

  ```ts
  const t = ce.type('tuple<number, number> | list<tuple<number, number>>');
  t.matches('list<tuple<number, number>>'); // false
  t.couldMatch('list<tuple<number, number>>'); // true
  ```

  Unions are distributed at every depth, so a union nested inside a parameter is
  handled too: `list<integer | tuple<number, number>>` could be a
  `list<tuple<number, number>>` — witness `[(1,2)]`.

  The relation is symmetric and decisive for the composite shapes it models: a
  `tuple<number, number>` could not be a `list<tuple<number, number>>`,
  `list<integer>` could not be a `list<string>`, and a `set<T>` could not be a
  `list<T>`. List dimensions and tuple arity and element names are compared.
  Shapes it does not model fall back to assignability in either direction, so
  the answer is never narrower than `matches()` — with one deliberate exception:
  `never` is uninhabited, so nothing could be a `never`. `unknown` could be
  anything; consumers that treat an inconclusive type as "no" should check
  `isUnknown` themselves.

- **`BoxedType.unionMembers`** — the members of a union type, each boxed, or
  `[this]` for any other type. Lets a consumer reason arm-by-arm without reading
  the raw `Type` AST. It does not reach a union nested inside a parameter;
  `couldMatch()` covers that case directly.

- **`BoxedType.isDisjointFrom()`** — a type-overlap predicate for consumers that
  classify an expression by comparing its type against a set of candidates.
  `matches()` answers subtyping (`this <: other`), so two types that share
  values without either containing the other look unrelated in both directions:

  ```ts
  const a = ce.type('integer | string');
  const b = ce.type('integer | boolean');
  a.matches(b); // false
  b.matches(a); // false — yet they share `integer`
  a.isDisjointFrom(b); // false: they may overlap
  ```

  The predicate is conservative in the safe direction: when disjointness cannot
  be established the answer is `false` ("may overlap"), never a false claim of
  disjointness. `unknown` — the type of an undeclared symbol — therefore
  overlaps everything. It accepts a `Type`, a type string, or a `BoxedType`, and
  throws on a string that is not a valid type.

### Improvements

- Disjointness now distributes over unions, so `integer | string` is recognized
  as disjoint from `boolean` instead of falling through to "may overlap". This
  also makes a union a subtype of a negation when no member meets the negated
  type (`integer | boolean <: !string`).

- Disjointness is now decided by comparing the primitive _categories_ of the two
  types, so composite types are separated from each other and from primitives
  instead of falling through to "may overlap": a `list<integer>` is not a
  `string`, a `tuple<number, number>` is not a `list<tuple<number, number>>`, a
  `set` is not a `list`, and a `record` is not a `dictionary`. Broad categories
  still contain the narrow ones, so `integer` and `value`, or `list<integer>`
  and `collection`, correctly report "may overlap". This generalizes and
  replaces the narrower numeric-vs-non-numeric rule.

  Two same-category composites whose parameters cannot coincide (`list<integer>`
  vs `list<string>`) are deliberately _not_ claimed disjoint: `list<never>` is a
  subtype of both, so the claim would rest on how the empty list is typed rather
  than on the type lattice. `couldMatch()` answers that question decisively.

## 0.95.0 _2026-07-25_

### Breaking Changes

- **The random family is redesigned around block-scoped seeding.** Seeding moves
  out of argument lists and engine state entirely: there is no seed argument
  anywhere in the family, and no ambient seed to set. A
  `WithRandomSeed(seed, body)` frame makes every draw inside it — including
  draws in user-function calls (dynamic scoping) and in compiled code —
  deterministic and replayable, while draws outside any frame are live.

  ```js
  ce.box(['WithRandomSeed', 42, ['List', ['Random'], ['Random']]]).evaluate();
  // → two DIFFERENT values, and the same two values on every re-evaluation
  ```

  The _n_-th draw of a frame is `hash(seed, n)` — PCG3D, a pure function of the
  seed and the draw index, computed identically by the interpreter, the
  JavaScript target, and (as f32) the GPU targets. Draws are IEEE float64
  regardless of the engine's precision mode, and the seed→stream mapping is a
  **cross-version contract** pinned by published test vectors. Frames nest
  (innermost wins) with independent per-frame counters, so one document cell's
  frame cannot perturb another's. See
  [Random Numbers](/compute-engine/reference/arithmetic/#random-numbers) (and
  `docs/RANDOMNESS-MODEL.md` in the repository) for the full contract, including
  the draw-consumption table and the rule that **only evaluation consumes draw
  indices** (an untaken branch, an unmaterialized lazy view, or a
  canonicalized-away wrapper consumes none).

  The surface changes:

  - **`Random` is domain-only.** `Random()` draws a real in [0, 1);
    `Random(Interval(a, b))` a real in [a, b); `Random(Range(…))` an element of
    the (normalized, inclusive) range; `Random(xs)` an element of a finite
    collection. The old `Random(seed)`/`Random(m, n)` forms — where the first
    argument meant a _seed_ or a _bound_ depending on its numeric type — are
    rejected by the signature.
  - **`Sample` → `RandomSample`, `Shuffle` → `RandomShuffle`** — renamed,
    seedless. `RandomSample`'s domain must be an indexed collection (a `Set` or
    an `Interval` is now invalid), and `k < 0` or `k > n` is now an
    `out-of-range` error rather than `undefined`. Without-replacement remains
    over _positions_, not values: sampling a multiset can repeat a value.
  - **`RandomInteger`, `RandomList`, and `RandomSeed` are removed**, along with
    the **`ce.randomSeed`** property. For one release, evaluating a removed head
    throws an `operator-removed` error naming its replacement, and
    `ce.randomSeed` is a throwing accessor — nothing fails silently.

  Migration: `Random(seed)` → `WithRandomSeed(seed, Random())`;
  `Random(n)`/`Random(m, n)` → `Random(Range(0, n-1))`/`Random(Range(m, n-1))`
  (for the non-degenerate ranges — the old bounds were upper-exclusive);
  `RandomInteger(a, b)` → `Random(Range(a, b))`; `RandomList(n[, seed])` →
  `RandomChoice(Interval(0, 1), n)`, framed if seeded;
  `Shuffle(xs[, seed])`/`Sample(xs, k[, seed])` →
  `RandomShuffle(xs)`/`RandomSample(xs, k)`, framed if seeded;
  `RandomSeed(s)`/`ce.randomSeed = s` → `WithRandomSeed(s, …)` around the work.

### New Features

- **`RandomChoice(domain, k)`** — `k` independent draws **with** replacement,
  the twin of `RandomSample` (without replacement). The domain may be a bounded
  `Interval`, a `Range`, or any finite collection, and is never materialized:
  `RandomChoice(Range(1, 10^9), 5)` is O(k). The count is typed `number` (a
  computed count need not be pre-rounded; it is rounded on evaluation), and `k`
  may exceed the domain size — that is what replacement means.

- **Random draws now compile — including inside auto-compiled `Map` bodies and
  in shaders.** Every compiled draw goes through the same engine primitive as
  the interpreter, deciding framed-vs-unframed at **call time**, so a function
  compiled outside any frame is deterministic when later called inside one,
  bit-identical to the interpreter. On the GPU, `WithRandomSeed` frames compile
  lexically (per-invocation counters): per-pixel seeding is
  `WithRandomSeed(perPixelSeed, Random())`. Unsupported forms fail closed at
  compile time rather than drawing silently.

- **Overload sets: an intersection of function signatures is now resolved at the
  call site.** A function that can be called in several different ways is
  declared with `&`, and the arm whose parameters accept the arguments is
  selected. When several arms accept them the **most specific** one wins;
  incomparable arms are tried in declaration order.

  ```js
  ce.declare('Draw', {
    signature: '((set<real>) -> real) & ((collection) -> any)',
    evaluate: (ops) => {
      /* dispatch on ops at run time */
    },
  });

  ce.box(['Draw', ['Interval', 0, 1]]).type; // → "real"  (set<real> is the more specific arm)
  ce.box(['Draw', ['List', 1, 2, 3]]).type; // → "any"
  ce.box(['Draw', 5]).isValid; // → false
  ```

  Previously such a signature parsed but was inert: applications were never
  arity- or type-checked and always typed `unknown`. Argument validation, result
  typing and type inference now all understand overload sets, on the operator
  definition and the symbol declaration routes alike.

  When an argument's type is not yet known, it is inferred as the **union** of
  the parameters the surviving arms accept at that position — the constraint the
  call actually carries. Above, an unknown `x` in `Draw(x)` is inferred
  `collection`, not `set<real>`: assuming the more specific arm would wrongly
  reject a later list.

  Note that `->` binds looser than `&`, so each arm must be parenthesized:
  `(number) -> real & string` is a _single_ signature returning `real & string`.
  See [Overload Sets](/compute-engine/guides/types/#overload-sets).

### Issues Resolved

- **`.N()` evaluated the operands of `Add` and `Multiply` twice.** The numeric
  path evaluated every operand exactly, discarded the results, and re-evaluated
  them numerically — observably wrong for impure operands (a framed `Random()`
  consumed two draw indices under `N()` and one under `evaluate()`) and a 2×
  evaluation tax otherwise. Impure operands now evaluate exactly once; pure
  operands keep the substitute-once-guarded path.

- **`Sample` materialized its whole source to draw a few elements.**
  `Sample(Range(1, 1000000), 3)` allocated a million boxed numbers and ran a
  full Fisher-Yates (~300 ms) to return three; large sources were an uncatchable
  OOM. `RandomSample` now runs a sparse Fisher-Yates over the index space — O(k)
  time and memory — and `RandomShuffle` refuses sources past the element cap
  instead of exhausting the heap.

- **Compiled random draws bypassed the engine's stream.** A compiled `Random()`
  emitted a bare `Math.random()`, so a compiled `Map` silently stopped being
  reproducible under a seed. Compiled and interpreted draws now share one code
  path (and the auto-compile gate that excluded impure bodies from `Map`
  compilation is gone — per-sample-point draws stay in the hot path).

- **`compileShader` emitted shaders that referenced undefined helpers.** A
  shader whose body used any `_gpu_*` helper (`Gamma`, the fractal helpers, and
  now the random draw) compiled in CE but failed at GPU shader-compile time,
  because the helper preamble was never spliced into the emitted source.
  `compileShader` now derives the preamble from the compiled body and inserts it
  ahead of the entry point, on both GLSL and WGSL.

- **A function signature nested in a union or an intersection lost its
  parentheses when serialized**, and re-parsed as a structurally different type
  with an identical string. `((number) -> real) & ((string) -> boolean)` came
  back as the single signature `(number) -> (real & ((string) -> boolean))`.
  Type serialization now parenthesizes a signature wherever it is a member of a
  union, intersection or negation.

- **An intersection was not a subtype of its own members** when the members were
  composite types. `((number) -> real) & ((string) -> boolean)` did not match
  `(number) -> real`. `A & B` is now a subtype of `R` whenever _any_ arm is,
  matching the behavior that already applied to primitive types.

- **`ce.assume()` threw a `TypeError`** when applied to an operator whose
  signature had no single result type.

- **A function literal assigned to a symbol declared with an overload set was
  not arity-checked**, so a two-parameter literal could be stored against
  one-argument arms and every declared call would silently partial-apply.

- **`Shuffle` and `Sample` were treated as pure functions.** Neither declared
  `pure: false`, so `isPure` — and therefore `isConstant` — was `true` for a
  random permutation or sample of a literal collection, and `Sample` was not
  gated out of `Map` auto-compilation. Both are now declared impure.

- **A masked GPU branch could draw.** The `When`/`Which` fall-through NaN
  compiled to `0.0 / 0.0`, whose value is implementation-defined in GLSL: a
  driver may fold it to a finite, renderable value. The `_gpu_nan()` helper now
  returns `intBitsToFloat(0x7FC00000)`, a guaranteed quiet-NaN bit pattern.

- **Desktop GLSL 4.x shaders were emitted with GLSL ES 1.00 syntax.**
  `compileShader` chose `in`/`out` over `attribute`/`varying` by testing whether
  the version string began with `3`, so `450 core` fell through to the ES 1.00
  keywords. The version is now parsed rather than prefix-matched, and a version
  below 300 is rejected: the emitted code uses ES 3.00 constructs throughout, so
  a lower `#version` header could not have compiled.

### Improvements

- The result type of the bare `function` type is now reported as `unknown`
  rather than `any`. `function` is shorthand for `(any*) -> unknown` and carries
  no information about its result, so an application of an undeclared function
  types `unknown`. This is visible in derived types — `[h(x)]` for an undeclared
  `h` now types `list<unknown>` instead of `list<any>`.

- The result type of a union or intersection of function signatures is now the
  union of the arms' result types, instead of being undetermined.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.92.1 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |          6.1 |       6.5 |   175 |     101 |         3.8 |
| $\sin 1$           |           19 |        20 |   219 |     483 |         5.2 |
| $\cos 1$           |           20 |        20 |   218 |     567 |         7.0 |
| $\ln 2$            |           14 |        14 |   340 |   4,558 |         3.8 |
| $e^{\pi}$          |           12 |        12 |   226 |   4,770 |         4.5 |
| $\zeta(3)$         |        1,519 |     1,542 |   268 |       — |          49 |
| $\Gamma(\tfrac13)$ |          831 |       827 |   348 |       — |         212 |
| $\psi(\tfrac13)$   |          717 |       713 | 2,778 |       — |         169 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.92.1** columns to see
what is _new this release_ (a `—` under `0.92.1` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.92.1 |  SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :-----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |         |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     6.2×     |   2.9×   |   5.6×    |  0.5×   |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     11×      |   1.6×   |   8.8×    |  0.1×   |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     6.1×     |   0.9×   |   4.7×    |  0.3×   |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   2.0×   |     —     |  0.1×   |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   1.2×   |     —     |  0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.2×   |     —     | 0.007×  |    —    |     1×      |
| **Derivatives**                        |              |          |           |         |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |    0.04×     |  0.04×   |   0.04×   | 0.0009× | 0.003×  |     1×      |
| **Simplification**                     |              |          |           |         |         |             |
| $\sqrt{3+2\sqrt2}$                     |     41×      |   29×    |    36×    |    —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     83×      |   45×    |    58×    |  3.2×   |   15×   |     1×      |
| **Evaluation**                         |              |          |           |         |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     44×      |   18×    |    49×    |  3.1×   |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     8.5×     |   5.2×   |   8.5×    |  2.1×   |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    6294×     |  6380×   |   6457×   |   92×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     388×     |   143×   |   389×    |  2.4×   |    —    |     1×      |
| **Solving**                            |              |          |           |         |         |             |
| $x^4+x^2-1=0$                          |     0.3×     |   0.3×   |   0.3×    |  0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |     1.7×     |   1.8×   |   1.5×    |  0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 6.2× faster than
Mathematica** (up to 6294×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-07-26 · Compute Engine `0.95.0` @ `6c188402` (current build)
· published `0.92.1` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.94.0 _2026-07-24_

### Breaking Changes

- **`Nothing` now erases inside collections, as it already did inside operator
  argument lists.** `Nothing` is the ERASURE marker — an empty-sequence splice —
  so a `Nothing` element is spliced out of a `List`, `Set` or `Tuple` literal
  instead of being retained. Length, arity, type and indexing all follow:

  ```js
  ce.box(['List', 12, 'Nothing', 34]); // → [12, 34]   (length 2, was length 3)
  ce.box(['Set', 1, 'Nothing', 3]); // → Set(1, 3)
  ce.box(['Tuple', 1, 'Nothing', 3]); // → (1, 3)
  ce.parse('(a,,b)'); // → (a, b)   (an empty slot is `Nothing`)
  ```

  A key–value pair tuple is a NON-erasing position, so a dictionary/record entry
  whose value is `Nothing` is dropped as a whole entry, but a caller that needs
  a fixed-arity positional pair whose slot may hold an absent value must build
  it with `ce._fn('Tuple', …)` and use `Missing` (below) for the hole. This also
  applies to lazy iteration: an element that _evaluates_ to `Nothing` is dropped
  (`Map(xs, _ ↦ Nothing)` is the empty collection — the `mapMaybe` idiom).

- **New `Missing` marker and `missing` type for an absent-but-positioned
  value.** `Missing` is the complement of `Nothing`: "a position exists, its
  value is absent" (Julia `missing`, R `NA`). It is never erased —
  `[1, Missing, 3]` is a 3-element `list<integer | missing>` — and `missing` is
  a primitive unit type (a subtype only of itself and `any`, mirroring
  `nothing`), reachable as `ce.Missing`.

  Absence is **domain-normalized at value construction**: absence flowing
  through an operator into a NUMERIC result cell becomes `NaN` (the numeric
  absent element), while a non-numeric result cell keeps `Missing`. So a numeric
  operator ABSORBS a `Missing` operand into `NaN` rather than carrying a
  `missing` arm:

  ```js
  ce.box(['Add', 'Missing', 1]).evaluate(); // → NaN   (Add(Missing, 1) : number)
  ce.box(['Sin', 'Missing']).evaluate(); // → NaN
  ce.box(['Sin', ['List', 1, 'Missing', 3]]).evaluate(); // → [Sin(1), NaN, Sin(3)]
  ```

- **Out-of-band access preserves position instead of yielding `Nothing` or
  dropping the entry.** An out-of-range index, or a dictionary key that is not
  present, now yields a position-preserving marker chosen by the collection's
  element domain: `NaN` when the elements are numeric, `Missing` otherwise.

  ```js
  ce.box(['At', ['List', 10, 20, 30], 9]).evaluate(); // → NaN   (numeric)
  ce.box(['At', ['List', 'a', 'b'], 9]).evaluate(); // → Missing (non-numeric)
  ```

  **Gather is now length-preserving** — `At([a, b], [1, 9, 2])` is
  `[a, hole, b]` (length 3), where the baseline dropped the out-of-range entry —
  and a **boolean mask whose length differs from the collection is now an
  error**, where the baseline silently applied the prefix.

- **The 15 data-consuming aggregates return `NaN` on an absent datum or empty
  input.** `Mean`, `Variance`, `PopulationVariance`, `StandardDeviation`,
  `PopulationStandardDeviation`, `Kurtosis`, `Skewness`, `Median`,
  `InterquartileRange`, `Quartiles`, `Max`, `Min`, `Supremum`, `Infimum`, and
  `Mode` — over both call shapes (`Max(1, Missing, 3)` and
  `Max([1, Missing, 3])`) — now evaluate to `NaN` when any datum is absent
  (`Missing` or `NaN`) or the input is empty (`Quartiles` → `(NaN, NaN, NaN)`).
  `Max([])`/`Min([])` are therefore `NaN` (was `∓∞`), and these operators now
  type as `number` rather than `finite_real`, since their result may be `NaN`.

  ```js
  ce.box(['Max', 1, 'Missing', 3]).evaluate(); // → NaN
  ce.box(['Mean', ['List']]).evaluate(); // → NaN
  ```

- **Comparisons follow IEEE 754 for `NaN` and Kleene for the `Missing` symbol,
  across the whole relational family** (`Equal`, `NotEqual`, `Less`,
  `LessEqual`, `Greater`, `GreaterEqual`). This is the Julia model:

  - The **`Missing` symbol is Kleene** — a comparison with a `Missing` operand
    is itself `Missing`: `Equal(x, Missing) = Missing`,
    `NotEqual(Missing, x) = Missing`, `Less(Missing, 1) = Missing`. (An ordering
    with a `Missing` operand previously stayed symbolically unevaluated.)
  - **`NaN` follows IEEE** — `NaN` is unequal to everything (including itself)
    and unordered: `Equal(NaN, NaN) = False`, `NotEqual(NaN, x) = True`, and
    every ordering with a `NaN` operand is `False`. The `Equal`/`NotEqual`
    results match native float `==`/`!=`; the **ordering comparisons with `NaN`
    previously stayed symbolic** (`NaN < 1` was inert), so they now resolve to
    `False`.

  ```js
  ce.box(['Equal', 'NaN', 'NaN']).evaluate(); // → False    (IEEE)
  ce.box(['Less', 'NaN', 1]).evaluate(); // → False         (IEEE unordered)
  ce.box(['Equal', 2, 'Missing']).evaluate(); // → Missing  (Kleene)
  ce.box(['Less', 'Missing', 1]).evaluate(); // → Missing   (Kleene)
  ce.box(['Equal', 2, 2]).evaluate(); // → True             (unchanged)
  ```

  Absence for **discharge** (`IsMissing`, `Coalesce`) and **aggregates** (`Max`,
  `Mean`, …) is unaffected — a `NaN` is still absent there
  (`IsMissing(NaN) = True`, `Coalesce(NaN, d) = d`, `Max(1, NaN, 3) = NaN`).
  Broadcast comparisons apply the rule per cell. Because `NaN` follows IEEE,
  **compiled and interpreted comparisons now agree by construction** on numeric
  operands (plain `==` is the IEEE semantics — no guard is emitted, and
  `NaN == NaN` compiles to `false`). A **numeric-domain** `missing` arm
  (`number | missing`) does not widen a comparison's result type — that slot's
  absence value is `NaN`, so the result is a plain `boolean`, a `Missing` value
  read through such a slot compares as `NaN` (IEEE), and the comparison
  **compiles on float-only targets (GLSL/WGSL)**. A `missing`-arm operand over
  an object domain (e.g. `string | missing`) still types `boolean | missing` and
  lowers via the guarded form (`isAbsent(a) || isAbsent(b) ? null : a == b`) so
  a `Missing` becomes the target null. A scalar `If`/`Which` condition that
  evaluates to **`Missing`** yields a catchable **error expression**
  (`The condition is absent…`) rather than crashing `evaluate()` — absence is a
  runtime data state, so it must be renderable and catchable; discharge with
  `Coalesce`/`IsMissing` to branch on possibly-absent data. (A condition that is
  not boolean at all, e.g. `If(3, …)`, keeps the existing spell-check throw.) A
  `NaN`-comparison condition yields a plain boolean (IEEE) and branches
  normally.

- **Compiled `Max([])` / `Min([])` now return `NaN`, matching the interpreter**
  (previously `-Infinity` / `+Infinity` from the identity-seeded reduce).
  Non-empty folds are unchanged.

### New Features

- **`cortex check` — validate a program without evaluating it.** Parses the
  source (a file, `--eval`, or stdin) and reports diagnostics; exit status is
  `0` when there are no errors. With `--json` it emits a machine-readable
  envelope (`{ ok, diagnostics }` with severities, codes, messages, 0-based
  source offsets, 1-based line/column, and fix-its). The same structured
  diagnostics are available during evaluation with `--diagnostics json`.
- **`cortex doc` — library documentation from the terminal.** `cortex doc Sin`
  shows a definition's kind, signature or type, description, keywords, and (for
  constants) value; a non-name argument searches the library by identifier,
  description, curated keywords, and LaTeX commands
  (`cortex doc greatest common divisor` → `GCD`, …). `--limit <n>` controls the
  number of matches and `--json` emits a structured `{ query, matches }`
  envelope.
- **`Cortex for AI Agents` language card.** A condensed, machine-verified
  reference for LLMs and coding agents writing Cortex (`/cortex/for-agents/`):
  core semantics, an operator-precedence summary, a table of Python/JavaScript
  reflexes that don't transfer, and verified idioms. Every example on the page
  is executed by the documentation test suite, so the card cannot drift from the
  implementation.

- **`cortex mcp` — a Model Context Protocol server for Cortex.** Starts an MCP
  server on stdio (the default) or native Streamable HTTP, giving AI agents
  structured access to the same operations as the CLI: an `evaluate` tool (each
  call runs a complete, self-contained program in a fresh session and returns
  the value as display text, Cortex source and MathJSON, plus diagnostics),
  `check`, `doc`, `parse` and `serialize` tools, and the `Cortex for AI Agents`
  language card as the `cortex://docs/for-agents` resource. Register the stdio
  transport with, e.g.,
  `claude mcp add cortex -- npx -y @cortex-js/compute-engine mcp`, or start the
  URL endpoint with `cortex mcp --transport streamable-http`. The protocol
  implementation is self-contained: the package gains no new dependencies.

- **Spread arguments — `f(...t)` splices a tuple into a call's arguments.** New
  Cortex prefix syntax `...` (call argument lists only) and engine `Spread`
  marker: the elements of a tuple become ordinary positional arguments, so a
  point can be fed to a component function without manual indexing —
  `F(p) = (a(...p), b(...p), c(...p))` instead of `a(p[1], p[2], p[3])`. Several
  spreads splice in order (`g(...p, ...q)`), variadic built-ins accept them
  (`Max(...t)`), and the syntax round-trips through the Cortex serializer. A
  literal tuple splices at canonicalization; a symbolic argument defers —
  argument validation and the operator's canonical handler wait — until
  evaluation resolves the tuple and re-validates the real arguments. Tuples
  only: spreading a `List` or a scalar is an `incompatible-type` error, and an
  unresolved argument leaves the call symbolic.

  Spread also **compiles**, on every target: a literal tuple splices directly,
  and a tuple-typed argument (`p: tuple<number, number>`) is rewritten
  statically to positional accesses (`f(At(p,1), At(p,2))`). An argument whose
  tuple arity is not statically known fails closed — a dynamic JS/Python spread
  would silently mis-bind on an arity mismatch instead of erroring like the
  interpreter.

  ```js
  ce.box(['Add', ['Spread', ['Tuple', 1, 2, 3]]]).evaluate(); // → 6
  ```

- **Destructuring declarations — `let (q, r) = divmod(17, 5)`.** A Cortex
  `let`/`const` may bind the components of a tuple in one statement. Patterns
  are irrefutable in form — bare symbols, `_` to skip a position, nested tuple
  patterns; no literals or pins (use `match` for conditional destructuring) —
  and require an initializer. The value is evaluated once; a shape mismatch
  (wrong length, or not a tuple) yields an `incompatible-type` error value and
  binds nothing. `const (x, y) = …` makes each binding constant. Lowers to the
  `Declare` primitive with a `Tuple` pattern in the name position, which now
  accepts it on all routes.

  In **compiled** code, a destructuring declare with a literal tuple value
  desugars to per-leaf declares (each element bound once, in order); a
  non-literal value or a shape mismatch fails closed so the interpreter takes
  over. (This also fixes a silent divergence: the pattern previously compiled as
  a single `let _ = …`, and every pattern name read as NaN behind
  `success: true`.)

  ```js
  ce.box(['Declare', ['Tuple', 'x', 'y'], d]).evaluate(); // d = {value: (3, 4)}
  ```

- **`IsMissing` and `Coalesce` — absence testing and discharge.** `IsMissing(x)`
  is `True` when `x` is absent (the `Missing` symbol OR a `NaN`, R’s `is.na`);
  `IsNaN` remains a NaN-specific test. `Coalesce(a, b, …)` returns the first
  non-absent operand, evaluated left-to-right with short-circuit; if every
  operand is absent it returns the last one verbatim. Both discharge primitives
  work identically in the interpreter and compiled (JS/Python) — a numeric hole
  (`NaN`) and an object hole (`Missing`/null) are handled uniformly. On a target
  that cannot observe its absent element (a GPU shader, where fast-math may not
  preserve `isnan`), `IsMissing`/`Coalesce` fail closed with a compile error;
  propagation still works natively.

  ```js
  ce.box(['Coalesce', ['At', ['List', 10, 20], 9], 0]).evaluate(); // → 0
  ce.box(['IsMissing', 'NaN']).evaluate(); // → True
  ```

- **`HoldValues(body)` — the value-blind evaluation route from the operator
  surface.** A binder that shields the assigned free symbols of its body: for
  the duration of the evaluation each such symbol becomes a pure symbol (its
  declared type and in-scope assumptions apply, its assigned value does not),
  analogous to Mathematica's `Block[{x}, …]`. Now that the `Simplify` operator
  evaluates its argument first, `HoldValues` is the only value-blind route
  reachable from Cortex (the `.simplify()` method is not exposed there). Shield
  every assigned symbol, or a listed subset with a second `List`/`Set`/`Tuple`
  or single-symbol operand. Constants are never shielded, in-scope assumptions
  survive the shield, and the global values are intact afterwards.

  ```js
  ce.assign('x', 5);
  ce.assign('a', 3);
  ce.box([
    'HoldValues',
    ['Together', ['Add', ['Divide', 1, 'x'], ['Divide', 'a', ['Power', 'x', 2]]]],
  ]).evaluate(); // → (a + x) / x²   (without the wrapper: 8/25)
  ce.box(['HoldValues', ['Add', ['Power', 'x', 2], 'a'], ['List', 'a']]).evaluate();
  // → 25 + a   (x resolves, a shielded)
  ```

### Improvements

- **The Cortex serializer reconstructs `let`/`const` syntax.** A `Declare` node
  now serializes back to its statement form — `let x = 5`, `const c = 6.28`,
  `let x: real`, and destructuring patterns `let (x, y) = p` — instead of the
  generic `Declare(x, {value -> 5})` function spelling, so declarations
  round-trip source → MathJSON → source. Shapes with no `let` spelling (a
  `holdUntil` attribute, a computed name) keep the generic form.

- **Compiled comparisons and connectives look through provably-scalar user
  functions.** A helper declared with an open signature (`(unknown) -> unknown`,
  the shape that keeps list-broadcasting working) no longer makes a scalar
  comparison uncompilable: `q(x) < y` with `q(t) = n·t+1` compiles when every
  argument is scalar and the function's body provably maps scalar parameters to
  a scalar result (arithmetic/transcendental operators, scalar-typed captured
  symbols, and nested user helpers — analyzed recursively, with self-recursion
  declining). A call whose argument may be a collection (`q(L) < y`) still fails
  closed, so the sound half of the 0.93.0 rule is preserved — and unlike a
  `-> number` return annotation, the look-through never mis-compiles the
  broadcast call. Element-wise compiled comparisons over collections remain a
  separate roadmap item.

- **`declare()` accepts `inferredSignature: true`, to vouch that a name is an
  operator without pinning its types.** Declaring a `signature` normally makes
  it a contract, so a wide placeholder such as `(unknown) -> unknown` keeps
  every call typed `unknown` even after a function literal is assigned. That is
  the right default for a fixed API, but not for a name that must be declared
  _before_ its body exists — most often so that `f(x)` parses as an application
  rather than a multiplication:

  ```js
  ce.declare('q', { signature: '(unknown) -> unknown', inferredSignature: true });
  ce.assign('q', ce.parse('t \\mapsto 2t+1'));
  // signature is now `(unknown) -> finite_number`
  // `q(x) < y` types `boolean` and compiles;
  // `q(L) < y` over a list `L` types `list<boolean>` and still fails closed
  ```

  The flag was already honored at run time and is now part of the
  `OperatorDefinition` type, so it no longer needs a cast. A declaration that
  omits `signature` entirely behaves the same way.

- **An unapplied `Derivative(f)` now evaluates to a named-parameter function
  literal.** `Derivative(Sin)` evaluates to `x ↦ cos(x)`
  (`["Function", ["Cos","x"],"x"]`) instead of the hole-form `cos(_)`, which was
  typed `finite_number` — so a stored derivative is now callable:
  `let g = Derivative(f); g(2)` works instead of erroring with
  `incompatible-type`. Results with no closed form stay symbolic, and the
  multivariate mixed-partial form no longer throws
  `Function body must be a scoped Block expression` when applied.
- **The Cortex CLI's `--json` output materializes finite lazy collections.**
  `Range`, `Map`/`Filter` results, and loop-built `Join` chains now serialize as
  their elements (`["List", 1, 2, …]`, up to 10,000) instead of their
  unevaluated recipe; infinite collections keep the structural form.
- **Cortex trap lints and better "did you mean" suggestions.** Three common
  cross-language reflexes that previously failed _silently_ now produce an
  advisory warning (the parse and value are unchanged): `=` inside a call
  argument (`Solve(x^2 = 4, x)` is assignment, not an equation — use `==`), a
  literal index `0` (indexing is 1-based; `xs[0]` is `NaN`), and a `//` comment
  that reads as floor division (`7 // 2` is `7` followed by a comment; use
  `Floor(a / b)`). Calling `print` (or `println`, `printf`, `puts`, `echo`) now
  explains that a program's output is the value of its last statement. The "did
  you mean" matcher gained a curated cross-language tier: `split` →
  `StringSplit`, `push` → `Append`, `ceiling` → `Ceil`. The agent language card
  gained a verified library quick-roster, output-rendering notes (quoted
  booleans, list preview elision), and binder-variable semantics for
  `D`/`Integrate`.
- **`Pipe`/`Apply` reject or defer a non-function right operand more sensibly.**
  `x |> f` (`Pipe`) now returns an `incompatible-type` error when `f` is a
  number, string, or boolean literal (which can never be applied), instead of
  staying silently inert; a symbol or unevaluated `f` still defers (definitions
  may arrive later). `Apply` and `Pipe` no longer throw an uncaught
  `Invalid function literal` when given a string function operand — they decline
  gracefully. Applying a function-valued expression such as `InverseFunction(f)`
  now stays symbolic (`Apply(InverseFunction(f), 2)`) instead of misinterpreting
  it as a lambda body and substituting the argument for `f`.
- **Rubi integrator: Euler-substitution lever for √(quadratic)-nested
  radicals.** The experimental Rubi integrator now closes nested radicals whose
  inner radical is a square root of a quadratic with a positive leading
  coefficient — e.g. `∫ 1/(√(x+√(x²+1))+1) dx` (Bondarenko #9) — via an Euler I
  substitution `t = √a·x + √Q` that rationalizes `√Q` and reduces the integrand
  to a form the existing linear-radical machinery closes. This raises the
  Bondarenko benchmark to CE+R/F 21/35.
- **`simplify()` is value-blind for a symbol's sign and parity.** `.simplify()`
  no longer reads an assigned symbol's _value_ when applying a sign- or
  parity-driven rewrite: with `w := 5`, `|w|.simplify()` now stays `|w|` and
  `√(w²).simplify()` is `|w|` (previously both collapsed to `w`, silently baking
  in `w ≥ 0` and evaluating wrong after a later `w := -3`). Sign and parity are
  taken only from a symbol's declared type and in-scope assumptions — so
  `assume(w > 0)` still licenses `|w| → w` — never from its assigned value.
  `.evaluate()` and `.N()` are unchanged — they still substitute the value.
- **The `Simplify` operator now evaluates its argument before simplifying.**
  `Simplify(expr)` is now evaluate-then-simplify — the operator counterpart of
  the `expr.evaluate().simplify()` recipe — so it computes handler-driven
  results the value-blind `.simplify()` method never touches:
  `Simplify(Max(3, 5))` → `5`, `Simplify(D(x²+ax, x))` → `a + 2x`,
  `Simplify(∫x² dx)` → `x³/3`. Because evaluation substitutes assigned symbol
  values, the change is visible from Cortex: `let x = 5; Simplify(x^2 + x)` now
  gives `30`. The other transformers (`Expand`, `Factor`, `Together`,
  `Distribute`) are unchanged — they keep reduce-not-evaluate.
- **The `.simplify()` method no longer evaluates structural operators.**
  `Determinant`, `Trace`, `Transpose` and `Length` are no longer reduced by the
  `.simplify()` method (an unreleased whitelist added earlier in this cycle):
  the method is rule-driven and value-blind, and running an operator's
  `evaluate` handler is `.evaluate()`'s job. Use `expr.evaluate()` (or the
  `Simplify` operator, which now evaluates) to reduce them — e.g.
  `Determinant([[a,b],[c,d]]).evaluate()` → `a·d − b·c`.

## 0.93.0 _2026-07-23_

### New Features

- **Cortex CLI and interactive REPL.** Installing `@cortex-js/compute-engine`
  now provides a `cortex` executable. It evaluates inline source
  (`cortex -e '1 + 2'`), `.cx`/`.cortex` files, or a program read from standard
  input; with no input argument in a terminal it starts a stateful REPL.

  The REPL retains declarations across inputs, supports multiline programs and
  persistent history, and adds `.load`, `.clear`, `.ast`, and `.time` commands
  alongside Node's standard REPL commands. Non-interactive output can be emitted
  as text, MathJSON (`--json`), or Cortex source (`--cortex`). Diagnostics
  include source locations and are written to standard error. Evaluations have a
  10-second deadline by default; `--time-limit` changes it and `--time-limit 0`
  disables it.

- **`JacobianMatrix(fs, vars)`** — the matrix of partial derivatives ∂fᵢ/∂xⱼ,
  one row per function and one column per variable.

  ```js
  ce.box(['JacobianMatrix', ['List', fs…], ['List', 'x', 'y', 'z']]).evaluate();
  // → [[∂f₁/∂x, ∂f₁/∂y, ∂f₁/∂z], …]
  ```

  - `vars` may be **omitted**: the free variables of `fs` are used, in
    lexicographic order, so the column order is predictable.
  - A single (non-list) `fs` is the **gradient** case and yields a flat vector
    `[∂f/∂x₁, …, ∂f/∂xₙ]`, directly usable as one.
  - `JacobianMatrix(F)` accepts a **bare function** reference: its body is the
    system and its parameters are the differentiation variables, in declared
    order (`JacobianMatrix((z,y,x) ↦ …)` has columns z, y, x — an order
    free-variable inference could not preserve). Explicit variables then rename
    the parameters.
  - A square system composes with `Determinant`, which now also reduces under
    `simplify()` — so `JacobianDeterminant` is one composition away and is not
    provided separately.

  Beyond brevity this removes a real trap: the obvious hand-rolled form
  `Map([x,y,z], v |-> D(f, v))` silently returns **zeros**, because the lambda
  parameter shadows and `D` differentiates with respect to `v`.

  The operands are held — evaluating the variable list would replace a symbol
  carrying a value (`x := 5`) by that value, leaving nothing to differentiate
  against. Whether `fs` is a system or a single function is decided on what the
  operand _denotes_, not its syntax, so a user-defined function returning a list
  and a symbol bound to a list are both treated as systems.

### Improvements

- **The LaTeX/ASCII-math pipeline operators now preserve `Pipe`.** A bare
  pipeline stage such as `x |> f` previously lowered immediately to
  `["Apply", "f", "x"]`; it now produces `["Pipe", "x", "f"]`, matching the
  Cortex parser and retaining `Pipe`'s held-operand semantics. Chained stages
  remain left-associated, prefix stages use `Function(Pipe(_, f), _)`, and a
  programmatic `Pipe` serializes with `\rhd`. Pipeline topic markers remain
  direct substitutions, so `x |> f(\square)` still becomes `f(x)`.

- **`simplify()` reaches a distributed form when it is cheaper.** Rules tagged
  `purpose: 'expand'` are excluded from its scan, because expansion usually
  grows an expression — but that left `simplify()` unable to reach a strictly
  _cheaper_ result. It was not cost-rejecting the better form; it never
  generated the candidate.

  ```js
  const f = ce.parse('(1 + x y)^3 z + y^2 (1 + x y) (4 + 3 x y)');
  f.subs({ z: ce.parse('-\\frac{3y}{x} + \\frac{2}{x^2}') }).simplify();
  // Before → unchanged (cost 76)      Now → y^2 + 3y/x + 2/x^2 (cost 27)
  ```

  `simplify()` now tries expansion once, at the fixpoint, and keeps the result
  only when the cost function says it is strictly cheaper. That cannot cycle
  (the inner call has the trial disabled) and cannot blow up (the cost gate is
  the acceptance test), so a factored form survives: `(x+1)^5`, `(a+b)(c+d)` and
  `x(y+z)` are all left alone. A structural pre-check keeps the trial off
  expressions with no product or power for expansion to act on.

- **`simplify()` now evaluates structural operators.** It is rule-driven and ran
  no operator `evaluate` handler at all, so an operator whose result comes from
  a handler rather than a rule was handed straight back.

  ```js
  ce.parse('\\det\\begin{bmatrix} a & b \\\\ c & d \\end{bmatrix}').simplify();
  // Before → Determinant(Matrix([[a,b],[c,d]]))    Now → a * d - b * c
  ```

  The members are a closed list — `Determinant`, `Trace`, `Transpose`, `Length`
  — chosen by a membership rule: the handler reduces its operands to a closed
  form determined by their _structure_ (a matrix to a scalar, a collection to a
  measure) rather than rewriting the expression, and the head carries no
  simplification rule of its own. `Max`/`Min` deliberately fail that rule and
  are not members: they reduce their operands' _values_, which is evaluation's
  job.

  **`simplify()` remains value-blind.** With `a := 5`, `(a + 2).simplify()` is
  still `a + 2`. A structural head whose operands mention a symbol carrying a
  value is left alone rather than substituting it.

  Operators outside the list are unchanged, so the ordering rule still stands:
  `evaluate()` then `simplify()`; `simplify()` alone is not a superset.

- **The `Simplify` operator resolves symbols bound to a value.** An operator
  normally evaluates its arguments; the transformers are `lazy` only to keep the
  operand's _structure_ from being rewritten early, not to keep its values
  symbolic. This applies to `Expand`, `ExpandAll`, `Factor`, `Together` and
  `Distribute` as well.

  ```js
  ce.assign('v', ce.parse('\\frac{x^2-1}{x-1}'));
  ce.box(['Simplify', 'v']).evaluate();
  // Before → v      Now → x + 1
  ```

  This is the operator, not the method: `ce.symbol('v').simplify()` is still
  `v`, because `.simplify()` is value-blind.

- **`Together` reduces its result to lowest terms.** It folds the terms over the
  _product_ of the denominators, which is correct but not reduced; the result is
  now divided through by the numerator/denominator GCD. This also yields the
  least common denominator, since product / gcd **is** the LCD.

  ```js
  ce.box(['Together', ce.parse('-\\frac{3y}{x}+\\frac{2}{x^2}')]).evaluate();
  // Before → (-3y * x^2 + 2x) / (x * x^2)    Now → (-3x * y + 2) / x^2
  ```

  The multivariate case needs Brown's algorithm: the univariate Euclidean GCD
  treats `y` as an opaque coefficient and reports `1` for that pair.
  `cancelCommonFactors` now falls back to the multivariate GCD when the
  univariate one comes back trivial and more than one unknown is present. The
  order matters — the cheap path runs first, so the common case is unaffected.

  The same-denominator simplification rule still uses the unreduced fold: it
  runs inside the `simplify()` fixpoint, where output stability and cost matter
  more than presentation.

- **`CircularIntegrate` (`\oint`) gained an operator definition.** It previously
  had only a parser entry, so it typed as `any` and its limits stayed a raw
  `Tuple`. It now types as `number` and canonicalizes its limits into `Limits`
  expressions, matching `Integrate` so a limits-consuming caller sees a uniform
  shape. `CircularIntegrate` remains inert — there is still no contour-
  integration evaluation.

  ```js
  ce.parse('\\oint_C f').json;
  // Before → ["CircularIntegrate", "f", ["Tuple", "Nothing", "C", "Nothing"]]  (type: any)
  // Now    → ["CircularIntegrate", "f", ["Limits", "Nothing", "C", "Nothing"]] (type: number)
  ```

- **`RandomList` now compiles on the JavaScript target.** `RandomList(n)` draws
  fresh values on every call of the compiled function, matching `evaluate()`.
  For draws that stay the same from call to call, use the explicit-seed form
  `RandomList(n, seed)`. A count that is negative, non-finite, or above the
  1,000,000 cap makes the compiled function throw, rather than silently clamping
  or returning `NaN`. (`evaluate()` reports an `out-of-range` error expression
  for the same input.)

- **`declare()` accepts a spread of an existing operator definition**, so you
  can override one handler and keep the rest:

  ```js
  ce.declare('At', { ...ce.lookupDefinition('At').operator, evaluate });
  ```

  The built-in's other handlers (`type`, `signature`, `canonical`, …) are
  preserved. Overriding with a bare `{ signature, evaluate }` instead **drops**
  them — prefer the spread.

- **Compiled `At` supports a collection-valued index.** An index that is a list
  of indices or a boolean mask now works when compiled, matching `evaluate()`:

  ```js
  const p = ['List', 10, 20, 30];

  ce.box(['At', p, ['List', 3, 1]]);                    // → [30, 10]
  ce.box(['At', p, ['List', 'False', 'True', 'True']]); // → [20, 30]

  ce.assign('p', ce.box(p));
  ce.assign('X', ce.box(['List', 1, 2, 3]));
  ce.parse('p_{X}'); // → [10, 20, 30]
  ```

  Negative indices count from the end and out-of-range entries are dropped, so a
  gather may be shorter than its index list. Previously these returned
  `undefined`, a wrongly-shaped scalar (`p[[2]]` gave `20` rather than `[20]`),
  or threw.

  An `At` with a collection-valued index now has type `list<T>` rather than the
  element type `T`. **If you dispatch on `.type`, expect the new value.** This
  is what lets surrounding operations compose: `At(p, I) + 1` broadcasts
  element-wise, and `Length(At(p, I))` compiles.

### Resolved Issues

- **Exact integer tensors stay exact.** A shadowed branch in the tensor dtype
  classifier routed every integer literal into a float64 buffer, which silently
  disabled the exact-arithmetic path for integer matrices. With the repair,
  `Inverse([[1,2],[3,4]])` evaluates to exact rationals (`[[-2,1],[3/2,-1/2]]`)
  and `.N()` still produces the float form; an integer outside the float-safe
  range stays expression-backed instead of rounding.
- **`assume()` after `assign()` now records the assumption.** The predicate was
  evaluated through the symbol's assigned value before the assumption system saw
  it, so with `w := 5`, `assume(w > 0)` folded to `True`, returned
  `'tautology'`, and recorded **nothing** — the assumption was silently
  discarded on arrival (only the assume-before-assign order worked). Predicates
  mentioning assigned symbols are now recorded _value-blind_, as facts about the
  symbol: `assume(w > 0)` after `w := 5` returns `'ok'` and `|w|` then
  simplifies to `w`. A predicate that contradicts the current value (e.g.
  `assume(w > 0)` with `w := -2`) still returns `'contradiction'` and is
  rejected. `'tautology'` now means tautological relative to types and existing
  assumptions, never relative to an assigned value — re-asserting an equality a
  symbol's value already satisfies returns `'ok'`, not `'tautology'`.

- **`.N()` on a multi-limit `Integrate` no longer drops all but the first
  limit.** The numeric-approximation branch read only the first `Limits`
  operand, so `Integrate(f, Limits(x,0,3), Limits(y,0,2))` numericized as a
  single-variable integral — `∫∫ 1` over `[0,3]×[0,2]` gave `3` (a wrong value,
  not a decline) and a multivariate integrand gave `NaN`. Multiple limits now
  perform iterated adaptive Gauss–Kronrod quadrature (Monte-Carlo fallback per
  level, as for a single limit), following the Mathematica iterator convention
  the symbolic path already used: the FIRST limit is the OUTERMOST integral, so
  an inner bound may reference the outer variables —
  `Integrate(1, Limits(x,0,1), Limits(y,0,x))` (the triangle) numericizes to ½.
  A bound that references an inner integration variable or a foreign free symbol
  declines (the integral stays inert) rather than integrating wrongly. The same
  fix applies to `compile()`: a multi-limit integral that does not close
  symbolically now compiles to nested quadrature calls — dependent bounds
  included — where it previously truncated to the first limit.

- **`Transpose`/`ConjugateTranspose` report the transposed static type.** They
  had no type handler, so an unevaluated `Transpose(m)` typed as the generic
  `value` and was rejected by matrix arithmetic: `Multiply(Transpose(J), J)` for
  `J = JacobianMatrix(…)` — the Gram-matrix idiom JᵀJ — errored with
  `incompatible-type` unless `J` was evaluated first. Both now preserve the
  element type and swap the shape's axes (`matrix<T^(2x3)>` →
  `matrix<T^(3x2)>`).

- **`simplify()` reaches trig identities inside a quotient.** Recursion into
  `Divide` operands is deliberately withheld to preserve factored structure for
  common-factor cancellation, but that also blocked operand-local trig
  reductions: `(r·cosθ)/(r·sin²θ + r·cos²θ)` didn't simplify even though the
  denominator alone reduces to `r`. Trig-bearing operands of a `Divide` now get
  the full recursion (the same carve-out `Add`/`Multiply` already made), so it
  simplifies to `cos(θ)`; factored-polynomial cancellation is unaffected.

- **Value-resolution overreach in the lazy-operand fixes.** The machinery that
  lets `Solve`/`Simplify`/`JacobianMatrix` see through a held operand resolved
  bound symbols too aggressively. Fixed:
  - `resolveBoundSymbols` is now **binder-aware**: it no longer resolves a
    variable bound by a `Function`, `Block`, `Sum`, … to a same-named global
    value (`Simplify(x ↦ x+1)` no longer corrupts the body's bound `x`).
  - A transformer nested in a `Solve` equation could substitute an unknown that
    also carries a value — `Solve(Simplify(x-2)=0, x)` with `x:=5` returned
    `[]`. The unknown is now shielded across transformer reduction.
  - `JacobianMatrix` differentiated a system in which a diff variable had
    already been replaced by its global value (`JacobianMatrix(g,[x,y])` with
    `x:=5`, `g:=[x²y,x+y]` gave a wrong matrix). It now resolves the operand's
    _shape_ without substituting values, and differentiates against a fresh
    symbol when a diff variable carries a value.
  - `simplify()` evaluated a structural head's whole operand tree, running an
    impure descendant — `simplify(Transpose([[Random()]]))` drew a random
    number. It now declines when the expression is impure.

- **`D` no longer evaluates its result at the differentiation variable's
  assigned value.** With `x := 5`, `D(x², x)` is now `2x` (was `10`). Under the
  ratified binding convention (ARCHITECTURE.md, "Bound variables, free symbols,
  and assigned values"), the variable a binder owns is a pure symbol — its
  declared type and assumptions apply, its assigned value never does, INCLUDING
  in the result. A caller who wants the value evaluates the result again or
  substitutes explicitly. Free symbols are unaffected: with `a := 3` too,
  `D(a·x², x)` is `6x`.

- **`Integrate`, `Limit`, and bundled `Solve` shield a value-bound bound
  variable.** The same convention: a same-named global assignment no longer
  leaks into these binders or their results. With `x := 5`, `Integrate(x², x)`
  is `x³/3` (was `125/3`), `∫₀¹ x² dx` is `1/3` (was `0`), and
  `Limit(Simplify(x²), x, 0)` is `0` (was `25`, on both the box and parse
  routes). A bundled `Solve(\{Simplify(9 − w²) = 8, w ∈ -3..3\})` with `w := 9`
  now returns `[1, -1]` (was `[]`): the value-bound bundled unknown is now
  discovered before the shield is computed. A shared `withValueShield` helper
  implements the shield and replaces `JacobianMatrix`'s per-variable rename.

- **`Distribute` fold, `numeratorDenominator`, `Together`, transformers, and
  `toString()` grouping** — as previously listed.

- **Beta-reduction completeness.** A finite self-composition (`g(g(x))` for a
  non-recursive `g`) only inlined one level, so `Solve(g(g(x))=0, x)` returned
  `[]`; the recursion guard is now a total-count budget that still terminates
  genuine recursion. Typed function parameters (`(x: real) ↦ …`) are unwrapped,
  so a typed function inlines like a bare one.

- **`Pipe` (`|>`) declines a non-function right-hand side** (`5 |> 3` stays
  inert) and its handler now delegates to `apply` instead of duplicating its
  named-operator path.

- **`Pipe` (`|>`) holds its operands, so `x |> f` behaves exactly like `f(x)`.**
  It evaluated the topic eagerly, regardless of `f` — which broke a chain whose
  right-hand side is a _lazy_ operator that needs its argument unevaluated. A
  bare function reference was the sharp case: `F |> JacobianMatrix` passed an
  evaluated `F`, stripped of its definition, so the Jacobian could not see the
  map's body.

  ```js
  // F |> JacobianMatrix |> Determinant |> Simplify
  ce.assign('F', /* the counterexample map */);
  // Before → Pipe(Pipe(F, JacobianMatrix), Determinant)   Now → -2
  ```

  `f` now decides whether the topic is evaluated (a lazy `f` receives it
  unevaluated). A chained topic — the inner pipe of `a |> g |> f` — is plumbing
  whose value flows on, so it is evaluated before reaching `f`. Eager stages,
  lambda right-hand sides, `N()`, and numeric chains are unaffected.

- **Indexing into a computed list hid the unknown from `Solve`.** A held
  equation containing `At(List(…), k)` was opaque to the solver — it saw no
  unknown and answered `[]`, which by contract means "proven no solutions". This
  is the last of the lazy-operand family: `At` is now projected structurally in
  a held operand.

  ```js
  ce.box(['Solve', ['Equal', ['At', ['List', 'Y', 2], 1], 5], 'Y']).evaluate();
  // Before → []      Now → [5]
  ```

  Projection, never evaluation: with `Y := 99`, `At([Y, 2], 1).evaluate()` is
  `99`, which inside a held equation would replace the unknown being solved for.
  Only a literal `List` with a literal in-range index is projected (negative
  indices count from the end); a symbolic list or index is left alone. The
  transformers (`Simplify`, `Expand`, …) get the same treatment.

- **`Solve` returned `[]` for an equation it could not see into.** A lazy
  operator holds its equation and takes only `.canonical`, which binds structure
  without resolving values, so two kinds of operand stayed opaque: a call to a
  user-defined function, and a symbol whose value _contains_ the unknown.
  Because `[]` means "proven no solutions", these were silent wrong answers
  rather than visible inertness.

  ```js
  ce.assign('g', ce.parse('t \\mapsto t^2 - 4'));
  ce.box(['Solve', ['Equal', ['g', 'x'], 0], 'x']).evaluate();
  // Before → []      Now → [2, -2]

  ce.assign('s', ce.parse('\\frac{9-w^2}{4}'));   // `s = 2` has no `w` in it
  ce.box(['Solve', ['Equal', 's', 2], 'w']).evaluate();
  // Before → []      Now → [1, -1]
  ```

  A transformer nested inside the equation (rather than at its root) is now
  reduced too, so `Solve(Simplify(u) = 2, w)` works.

  The unknown is never substituted, even when it has a value: the reduction is
  structural — `.subs` on the lambda body, `.value` on a binding — never
  `.evaluate()`. With `x` assigned `5`, `Solve(g(x) = 0, x)` still returns
  `[2, -2]`. A recursive definition expands one level and stops.

- **Expression transformers ignored a user-defined function in their operand.**
  Same root cause: `Simplify(g(a))`, `Expand`, `Factor`, `Together` and
  `Distribute` returned `g(a)` unchanged, and `Integrate(g(t), t)` stayed inert.

  ```js
  ce.assign('g', ce.parse('t \\mapsto t^2 - 4'));
  ce.box(['Factor', ['g', 'a']]).evaluate();
  // Before → g(a)    Now → (a - 2) * (a + 2)
  ```

  Beta-reduction substitutes the function _body_, so an assigned value for a
  symbol elsewhere in the operand is still left alone.

- **`Distribute` returned a product where it should return a sum.** The helper
  recombined the branches of a distributed sum with `Multiply` instead of `Add`,
  so `(a + b)·c` became `(a·c)·(b·c)`. Every input the operator acted on came
  back with a different value. The operator had no test coverage, which is why
  this survived; it is now covered by a numeric oracle.

  ```js
  ce.box(['Distribute', ce.parse('(a+b)c')]).evaluate();
  // Before → a * b * c * c      Now → a * c + b * c
  ```

- **`numeratorDenominator` reported a denominator of `1` for a bare negative
  power.** Canonical form writes `1/x^2` as `Power(x, -2)`, and the `Power`
  branch never moved a negative exponent into the denominator. The same factor
  inside a `Multiply` (`y/x^2`) routes through `Product.asNumeratorDenominator`,
  which splits on exponent sign and was already correct — so the two disagreed.
  This also affected the `NumeratorDenominator` operator and `.denominator`. A
  _symbolic_ exponent is still left alone: its sign is not decidable there.

  ```js
  ce.parse('\\frac{1}{x^2}').numeratorDenominator;
  // Before → [x^(-2), 1]        Now → [1, x^2]
  ```

- **`Together` dropped denominators written as negative powers.** It treated
  only a `Divide` node as carrying a denominator, so such terms were folded into
  the numerator and the combined fraction kept negative powers.

  ```js
  ce.box(['Together', ce.parse('\\frac{1}{x}+\\frac{1}{x^2}')]).evaluate();
  // Before → (x * x^(-2) + 1) / x    Now → (x + 1) / x^2
  ```

- **Expression transformers ignored a `ReplaceAll` in their operand.** `Expand`,
  `ExpandAll`, `Factor`, `Together`, `Distribute` and `Simplify` are lazy and
  took only `.canonical` of their held operand, so a `ReplaceAll` reached them
  as an unevaluated call with no polynomial structure and was silently returned
  unchanged. The reduction is recursive, so a producer head nested inside the
  operand is handled too.

  ```js
  ce.parse('\\mathrm{Expand}(\\mathrm{ReplaceAll}(x^2+x, x \\to a+1))').evaluate();
  // Before → ReplaceAll(x^2 + x, To(x, a + 1))    Now → a^2 + 3a + 2
  ```

  Note this is deliberately a different set from the transformer heads reduced
  by `Solve`/`Integrate`/`Limit`: `ReplaceAll` ends in `.evaluate()` and so
  substitutes assigned symbol values, which those algorithms must avoid.

- **`toString()` dropped the parentheses around a product-of-sums denominator**,
  producing text that reads back as a different expression. The MathJSON and
  LaTeX serializations were correct throughout; only the ASCII form was
  affected. The grouping check treated any string starting with `(` and ending
  with `)` as already parenthesized, which `(x + 1) * (x^2 - 1)` satisfies
  without being a single group.

  ```js
  ce.box(['Divide', 1, ['Multiply', ['Add', 'x', 1], ['Add', ['Power','x',2], -1]]]).toString();
  // Before → 1 / (x + 1) * (x^2 - 1)    Now → 1 / ((x + 1) * (x^2 - 1))
  ```

- **`Map` now evaluates over a source that only becomes a collection when
  evaluated.** `Map(X - 1, f)` stayed in its unevaluated lazy form while
  `Map(X, f)` and `Map([0, 1, 2], f)` both evaluated. The trigger was any source
  whose collection-ness is not visible before evaluation — a broadcast
  arithmetic result over a list, or an eager collection operator such as
  `UnicodeScalars`.

  ```js
  ce.assign('X', ce.box(['List', 0, 1, 2]));
  ce.box(['Map', ['Subtract', 'X', 1], sq]).evaluate();
  // Before → Map(X - 1, (x) |-> x^2)     Now → [1, 0, 1]

  ce.box(['Map', ['UnicodeScalars', { str: 'ab' }], sq]).evaluate();
  // Before → Map(UnicodeScalars("ab"), …) Now → [9409, 9604]
  ```

  Applies to the `zipWith` (multi-source) form as well, and to `.at()` — which
  previously returned `undefined` for such a source, so a result longer than the
  materialization head was silently rendered head-only instead of head-and-tail.
  Every other collection operator (`Filter`, `Take`, `Sort`, `Reverse`, `First`,
  …) already accepted these sources. Expressions that are genuinely not
  collections are unchanged: `Map(5, f)` still stays symbolic.

- **Compiled comparisons and logical connectives no longer return a wrong answer
  for a list operand.** `<`, `<=`, `>`, `>=`, `And`, `Or` and `Not` could
  produce a scalar `false` (or one of their operands) where `evaluate()` returns
  an element-wise list of booleans — a wrong result from a successful compile.
  Such expressions now decline to compile and fall back to interpretation, which
  gives the correct answer.

  Mostly affects a filter whose condition is computed, such as
  `L[|[1...n]-k|>0]`: it now evaluates correctly but is no longer compiled, so
  expect interpreter performance for that shape. Scalar comparisons and
  connectives, and list literals such as `Not([True, False])`, still compile.

- **Complex values are handled correctly when compiled.** `At(p, 1+2i)` and
  `RandomList(n, 7+3i)` now agree with `evaluate()`, which uses the real part of
  a complex index or seed. Previously the compiled forms returned `NaN` and a
  different random sequence respectively.

  A compiled scalar _comparison_ against a complex value is still wrong (it
  returns `false` rather than declining); this is unchanged and tracked in
  `ROADMAP.md`.

- **`At` with several indices reports the correct type.** For a 2×3 matrix `M`,
  `At(M, 1, [1,2])` is the 2-element list `[1,2]` and `At(M, 1, 2)` is a single
  element — both previously reported the type of a whole matrix row.

## 0.92.1 _2026-07-22_

### Breaking Changes

- **`Join` appends a tuple operand as a single element instead of splicing its
  components.** A tuple is an `indexed_collection`, so `Join` used to iterate it
  and concatenate its components. But a tuple is a _value_ — a point or vector —
  and the engine treats it as one everywhere else (`Abs(point)` → `Norm`,
  component-wise point arithmetic). Splicing silently degraded the point-list
  accumulation idiom `L → Join(L, P)`: the result grew by 2 instead of 1 and
  stopped matching `list<point>`.

  ```js
  // Before
  ce.box(['Join', pointList, ['Tuple', 2, 5]]).evaluate();
  // → ["List", …, 2, 5]        length +2, heterogeneous `number` tail
  // After
  // → ["List", …, ["Pair", 2, 5]]   length +1, still a list of points
  ```

  `Join` of collections is unchanged (`Join([1,2],[3,4])` → `[1,2,3,4]`;
  `Join([(0,3)],[(2,5)])` → `[(0,3),(2,5)]`). The one reversal is a tuple in
  operand position where it was previously flattened: `Join((1,2),(3,4))` was
  `[1,2,3,4]` and is now `[(1,2),(3,4)]`. `Join` now agrees with `Append` on a
  tuple element.

- **`Join` now reports the joined ELEMENT type instead of a bare `list`.** Its
  type handler returned `list` whatever it was given, so a joined point list did
  not match `list<tuple<…>>` and type-directed dispatch downstream stopped
  recognizing it. Each operand now contributes either its own type (an atomic
  tuple, which becomes one element) or its element type (a collection, which is
  spliced), widened into the result:

  ```js
  Join(pointList, point); // was: list      now: list<tuple<number, number>>
  Join([1, 2], [3, 4]); //   was: list      now: list<finite_integer>
  ```

  An operand whose element type is unknown still yields the bare `list`. This is
  a **type-surface change**: code pinning the exact string `'list'` for a `Join`
  result sees the narrowed type instead — but `matches()`-based queries only
  gain precision.

### Issues Resolved

- **`evaluateAsync()` no longer tears down a scoped operator's local scope while
  the operator is still running.** An `evaluateAsync` handler returns at its
  first suspension point, not at completion, so the dispatcher popped the
  operator's local evaluation context too early; everything the resumed handler
  did then ran against the enclosing scope. A big operator whose reduction
  outlived one time slice (roughly, more than ~16ms of work) assigned its loop
  index globally — leaking it, overwriting an outer binding of the same name,
  and throwing `Cannot assign a value to the constant "i"` for the commonest
  index spelling of all, since global `i` is `ImaginaryUnit`:

  ```js
  await ce.parse('\\sum_{i=1}^{200000} i').evaluateAsync();
  // Before: throws `Cannot assign a value to the constant "i"`
  // After:  20000100000  (matches the synchronous lane)

  ce.assign('n', 7);
  await ce.parse('\\sum_{n=1}^{200000} n').evaluateAsync();
  ce.box('n'); // Before: 200000 (clobbered). After: 7
  ```

  The synchronous lane was fixed in 0.87.1; this brings the asynchronous lane —
  the cancellation path `withTimeLimit` documents — into line with it.
  Cancellation behavior is unchanged.

  Because the context is now held across the `await`, a scoped operator's frame
  is no longer necessarily on top of the evaluation-context stack when it
  unwinds — a second evaluation started while the first is suspended pushes
  above it. The frame is therefore removed by identity rather than popped, so an
  unwinding evaluation cannot discard (and dispose the bindings of) one that is
  still running.

  One known limitation remains, unchanged by this release: while an async
  evaluation is suspended, its scope is the engine's current one, so code that
  enters the same engine in that window can see the operator's local bindings
  (e.g. a loop index). Enclosing bindings still resolve correctly through the
  scope's parent chain, and the local scope is gone once the evaluation settles,
  but a name that collides with an in-flight index resolves to that index.
  Removing this needs per-evaluation (task-local) context propagation; until
  then, use one engine per concurrent evaluation.

## 0.92.0 _2026-07-21_

### Breaking Changes

- **The parser's three symbol hooks are replaced by one oracle:
  `resolveSymbol`.** The `ParseLatexOptions` handlers `getSymbolType` and
  `hasSubscriptEvaluate` (and the internal `isSymbolDeclared`) are replaced by a
  single optional handler:

  ```js
  resolveSymbol?: (symbol) => { type, subscriptEvaluate? } | undefined
  ```

  Return `undefined` for a symbol the handler does not know; return a record
  (with a `BoxedType` or type-string `type`) for one it does. Declaration is the
  _presence_ of the record — `{ type: 'unknown' }` is a declared symbol of
  unknown type — so the previously inexpressible distinction between
  "undeclared" and "declared, type unknown" is now first-class, and inconsistent
  answers (a typed-but-undeclared symbol) are unrepresentable.

  Semantics also changed from _replace_ to _supplement_: through `ce.parse()`
  the handler is consulted first and any symbol it does not resolve falls back
  to the engine scope's definitions. Handlers no longer need to re-implement
  scope delegation (previously required boilerplate with `getSymbolType`):

  ```js
  // Before: vouch + hand-written scope delegation
  getSymbolType: (id) => {
    if (vouched(id)) return 'function';
    const def = ce.lookupDefinition(id); // boilerplate, easy to forget
    /* ... map def to a type ... */
  };
  // After: vouch only; unresolved symbols fall back to the scope
  resolveSymbol: (id) => (vouched(id) ? { type: 'function' } : undefined);
  ```

  Similarly, the `Parser` interface (custom LaTeX dictionary entries) replaces
  `getSymbolType()`/`hasSubscriptEvaluate()` with `parser.resolveSymbol()`, e.g.
  `parser.getSymbolType(id).matches('function')` becomes
  `parser.resolveSymbol(id)?.type.matches('function')`.

### Improvements

- **A declared name now outranks subscript-index capture.** Once a symbol `B` is
  bound to an indexed-collection value (a point, list, tuple…), the parser reads
  `B_{2}` as indexing (`At(B, 2)`), which made every subscripted sibling name
  (`B_2`, `B_3`, … alongside the point `B`) unspellable — and, since `B_{2}` and
  `B[2]` produce identical trees, unrecoverable after the parse. A subscripted
  spelling whose joined name is declared or assigned in scope now parses as that
  symbol; index capture applies only to undeclared joins, and bracket indexing
  (`B[2]`) is unaffected. Note that with the non-default
  `indexStyle: 'subscript'` serialization, `At(B, 2)` serializes as `B_{2}`,
  which re-parses as the symbol `B_2` when such a declaration exists.

- **Rubi integration (experimental) — nested-radical substitution fallback
  (R31).** `loadIntegrationRules` now closes nested-radical and
  sum-of-two-radical integrands the bundled algebraic rules leave inert. A
  nested radical (`√(x+√(x+1))/x²`, `√(1/x+√(1/x+1))`, the double-radical
  `√(x+1)/(x+√(√(x+1)+1))`) is rationalized by iteratively substituting
  `u = (a+b·x)^{1/k}` (or the Laurent `(a+b/x)^{1/k}`) at the innermost radical
  linear in `x`, keeping the resulting rational's denominator factored so the
  bundled partial-fraction rules close it; the conjugate shape
  `(√(x+1)+√(1−x))⁻²` is rationalized by its conjugate. Each result is accepted
  only after a domain-aware numeric derivative check against the integrand, so
  out-of-scope shapes stay cleanly unsolved. On the Bondarenko benchmark this
  lifts CE+Rubi from 12/35 to 20/35 (closing 8 previously unsolved
  nested-radical integrals; a ninth, #16, closes only under the production
  bundle's compiled rule set). Structurally inert off its family, and
  disableable with `RUBI_NO_R31`.

## 0.91.0 _2026-07-21_

### New Features

- **`FindFit` — general nonlinear least-squares fitting.**
  `FindFit(data, model, params, vars)` fits an arbitrary model expression to
  data by Levenberg–Marquardt, returning a record
  `{parameters, converged, residualNorm, iterations}`. Unlike the closed-form
  `LinearRegression`/`PolynomialFit`, the model may be any composition
  (`a·e^{b·x} + c`, Gaussians, power laws, cosines, …). `data` is a list of
  `(x…, y)` tuples or a plain list of `y` values (`x = 1, 2, …`). Each parameter
  spec is a bare symbol (start `1`, unbounded), `(a, a0)` (explicit start), or
  `(a, a0, lo, hi)` (start plus a box constraint, with `±∞` allowed for
  one-sided bounds). Convergence is first-class: non-convergence within the
  iteration budget is reported as `converged: False` with the best-so-far
  values, never a silent wrong answer. Jacobians are analytic (via `D`), with a
  per-column forward finite-difference fallback for components that cannot be
  differentiated symbolically. A **joint form** fits several models to several
  datasets sharing parameters (a list of models paired with a list of datasets,
  residuals stacked).

- **`FindRoot` — numerical equation solving.** `FindRoot(equations, params)`
  finds parameter values that zero one or more residuals, sharing the same
  parameter-spec grammar, box constraints, and result record as `FindFit`
  (root-finding is the zero-residual case of the same Levenberg–Marquardt core).
  `equations` is an equation (`lhs == rhs`), a bare residual expression (read as
  `= 0`), or a list of either.

### Resolved Issues

- **Applying a declared-then-assigned function to a large collection is now
  lazy, matching the hybrid-laziness contract.** Since 0.84.0, element-wise
  operations over collections of more than 100 elements (or of unknown length)
  evaluate to a lazy `Map` — but a function registered via
  `ce.declare('g', '(number) -> number')` + `ce.assign('g', x ↦ …)` resolved
  through a value definition whose application-site broadcast still zipped
  eagerly, walking the whole collection at `evaluate()` time. The
  value-definition application path now goes through the same laziness gate as
  parse-assigned functions (`g(x) := …`) and built-in broadcasts: past the eager
  threshold `g(X)` returns a lazy `Map`, results of ≤100 known-finite elements
  are byte-identical to before, collection-typed parameters still bind their
  argument whole, and tuples stay atomic. (Not a recent regression: this path
  had been eager on every release since laziness shipped in 0.84.0.)

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.86.1 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |          6.2 |       7.0 |   175 |     173 |         3.9 |
| $\sin 1$           |           20 |        20 |   220 |     506 |         5.2 |
| $\cos 1$           |           20 |        21 |   219 |     612 |         6.9 |
| $\ln 2$            |           14 |        14 |   348 |   4,616 |         4.0 |
| $e^{\pi}$          |           12 |        12 |   221 |   5,086 |         4.6 |
| $\zeta(3)$         |        1,580 |     1,619 |   261 |       — |          49 |
| $\Gamma(\tfrac13)$ |          842 |       839 |   345 |       — |         211 |
| $\psi(\tfrac13)$   |          728 |       720 | 2,806 |       — |         168 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.86.1** columns to see
what is _new this release_ (a `—` under `0.86.1` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.86.1 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     6.7×     |   3.1×   |   5.2×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     10×      |   1.6×   |   8.4×    | 0.08×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     6.3×     |   0.9×   |   4.4×    |  0.4×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   2.0×   |     —     |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   1.4×   |     —     | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.3×   |     —     | 0.007× |    —    |     1×      |
| **Derivatives**                        |              |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |     0.1×     |   0.1×   |   0.06×   | 0.003× |  0.01×  |     1×      |
| **Simplification**                     |              |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |     41×      |   31×    |    32×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     104×     |   54×    |    59×    |  3.3×  |   16×   |     1×      |
| **Evaluation**                         |              |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     58×      |   29×    |    47×    |  3.0×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     9.3×     |   5.6×   |   8.0×    |  2.1×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    7405×     |  6951×   |   6437×   |  77×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     423×     |   161×   |   363×    |  2.6×  |    —    |     1×      |
| **Solving**                            |              |          |           |        |         |             |
| $x^4+x^2-1=0$                          |     0.3×     |   0.3×   |   0.2×    | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |     1.7×     |   2.0×   |   1.4×    | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 6.7× faster than
Mathematica** (up to 7405×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-07-21 · Compute Engine `0.90.0` @ `8740998f` (current build)
· published `0.86.1` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.90.0 _2026-07-21_

### New Features

- **`RandomList(n)` — an eagerly-materialized list of `n` independent uniform
  reals in `[0, 1)`.** Draws come from the engine's random stream (honoring
  `ce.randomSeed` for reproducibility); the two-argument form
  `RandomList(n, seed)` produces a deterministic list from an explicit seed,
  independent of the engine stream. Eagerness is deliberate: the result is a
  concrete `List`, so every reference to it sees the same draws (a lazy
  collection of `Random()` calls re-draws on each traversal). With a literal
  count the length is part of the type (`RandomList(5)` types
  `vector<finite_real^5>`). The count is capped at 10⁶ elements; a larger count
  — or a negative one — returns an `out-of-range` error rather than silently
  misbehaving.

### Improvements and Resolved Issues

- **`Abs` of a fixed-arity point is now the Euclidean norm.** `|(3, 4)|`
  evaluates to `5` — the single-bar spelling of the vector magnitude, consistent
  with the `\lVert…\rVert` (`Norm`) parse and with tuple arithmetic treating
  points as vectors in ℝⁿ. Previously the expression stayed inert under
  `evaluate()`, and **compiled to garbage**: the JavaScript target returned the
  bare component array (which concatenated into a _string_ in downstream
  arithmetic), and the shader targets emitted invalid code. All targets now
  compile it as the norm (`_SYS.norm` on the js target, `length()` on GLSL/WGSL
  for 2–4 components; other arities and points with a broadcasting component
  fail closed to interpretation). Detection is type-based, so a tuple-_typed_
  symbol or parameter routes as a point too. `Abs` over a `List` is unchanged
  and still broadcasts elementwise. `Hypot` with a point argument now squares
  through the norm as well: `Hypot((3,4), 1) = √26` (previously an inert `Power`
  of a tuple). And `Norm`/`Abs` of a point now honor the exactness contract:
  `evaluate()` keeps the exact `√2`, `.N()` numericizes.

- **`Norm` compiles on the `interval-js` target** for fixed-arity points
  (default L2 norm; `hypot`-based in 2-D for a tighter enclosure). Implicit
  curves and line series expressed with `\lVert…\rVert` or `|…|` now get
  interval-arithmetic break detection instead of silently degrading to point
  sampling.

- **`Norm`/`Abs` of a point with a broadcasting component reports an honest
  `list<number>` type.** `‖(x+[0.5,1], y, z+2)‖` evaluates to a `List` (one norm
  per zipped element); its static type now says so instead of `number`, matching
  the equivalent `\sqrt{(x+[0.5,1])^2+…}` spelling.

- **A `Comprehension` serializes with bracket delimiters** so it survives its
  own round trip in every position: `H=[k^2 \operatorname{for} k=[1...4]]` now
  serializes as `H=\left[k^2 \operatorname{for} k = 1..4\right]` (previously the
  unfenced form re-parsed with the assignment swallowed into the comprehension
  body, and under an `Add` the trailing term was absorbed into the iteration
  range). The fence is unconditional — `[body for …]` parses back to the same
  `Comprehension`, so it is lossless. (Non-canonical serialization-shape
  callout, same class as the 0.83 big-operator body fence.)

- **`Expression.isValid` is now O(1) after the first query.** Validity is a
  structural property of an immutable expression, so it is computed once and
  cached; previously every query re-walked the whole subtree (and a parent's
  query re-entered each child's), which dominated large-document workloads — one
  profiled 75-row import spent 77% of its time in repeated `isValid` walks.

## 0.89.0 _2026-07-21_

### Breaking Changes

- **`ComputeEngine.timeLimit` is removed**, completing the deprecation begun in
  0.88.0. There is no implicit ambient deadline anymore: an `evaluate()` or
  `simplify()` outside a span runs unbounded, and `ce.withTimeLimit(ms, fn)` /
  `ce.withTimeLimit({ ms, label }, fn)` spans are the only way to arm a
  deadline. If you relied on the old 2000&nbsp;ms ambient default, wrap your
  evaluation entry point in a span:

  ```ts
  const r = ce.withTimeLimit({ ms: 2000, label: 'my-app:eval' }, () =>
    expr.evaluate()
  );
  ```

  The `engine.timeLimit:<operator>` attribution synthesized for ambient timeouts
  is gone with it — every `CancellationError.attribution` now names a span you
  created (or is `undefined` for an unlabelled span).

- **The `BoxedTensor` class is removed.** Tensor values (vectors, matrices) are
  now ordinary canonical `List` expressions; "tensor-ness" is a property
  (shape-regularity), not a distinct representation. The `BoxedTensor` type
  export and the `TensorInterface.tensor` accessor (which exposed the internal
  packed `Tensor` object) are gone. The `isTensor()` guard remains and now
  answers the representation-independent question "is this a shape-regular
  list?"; `.shape` and `.rank` remain and now report honestly on **every**
  tensor-shaped list — including broadcast results, which previously reported
  `[]`/`0`. Code that used `expr.tensor` should operate on `expr.ops` (the
  elements) or use the public linear-algebra operators.

- **Lists carry honest, shape-aware types.** A shape-regular list's type reports
  its actual element type and dimensions: `[1, 2, 3]` types
  `vector<finite_integer^3>` (previously `vector<3>`, i.e. `number` elements),
  `[[1, 2], [3.5, 4.5]]` types `matrix<finite_real^(2x2)>`, and a list of
  non-numeric values is no longer mistyped as a numeric vector —
  `[rgb(1,0,0), rgb(0,1,0)]` types `list<color^2>`, not `vector<2>`. The new
  types are strict subtypes of the old ones, so `type.matches('vector<3>')` and
  similar queries continue to answer `true`; only code comparing exact type
  _strings_ is affected. An evaluated broadcast result now carries its shape too
  (`Sin([0,1]).evaluate()` types `vector<2>`), and the declared type of a
  broadcast expression is always a sound upper bound of its evaluated value's
  type.

- **Signature validation of collection arguments is two-stage.** An operand
  whose static type could still conform to a collection parameter (a symbol
  declared plain `list`, `list<unknown>`, a `broadcastable<…>` intermediate) is
  accepted at canonicalization and checked against its actual value when the
  operator evaluates. Provably-wrong operands (`Determinant("abc")`,
  `Determinant(v)` with `v: list<number>` — a flat vector can never be a matrix)
  still error immediately. Consequently some `incompatible-type` errors that
  used to appear at parse/canonicalization time now surface at evaluation time
  instead (as the operator's specific error, e.g. `expected-square-matrix`, or
  as an inert expression).

### Improvements

- **Matrix operations work on computed matrices.** The static type of a
  broadcast application now mirrors its operand's shape (`Sqrt(M)` with `M` a
  2×2 matrix types as a 2×2 matrix), so expressions like `Determinant(Sqrt(M))`,
  `MatrixMultiply(Sqrt(M), Sqrt(M))`, or `Inverse(A + B)` — which used to fail
  with `incompatible-type` at canonicalization — now evaluate. Symbols declared
  `list` participate the same way once a conforming value is assigned.

- **Structural matrix operations work on any cell type.** `Transpose`,
  `ConjugateTranspose`, `Reshape`, `Flatten`, and the shape predicates
  (`IsSquareMatrix`, `IsSymmetric`, `IsDiagonal`) operate on any shape-regular
  list — a matrix of colors, tuples, or unevaluated function applications — not
  just numeric ones. Numeric kernels (`Determinant`, `Inverse`, …) still require
  numeric cells and decline others gracefully.

- **Exact integer matrices stay exact.** Linear-algebra kernels over exact
  integer matrices now use exact arithmetic under `evaluate()`:
  `Determinant([[9007199254740991, 0], [0, 3]])` returns the exact
  `27021597764222973` (previously rounded through float arithmetic). Under
  `.N()` results are floated, as before (`Inverse([[2,1],[1,3]]).N()` →
  `[[0.6, -0.2], [-0.2, 0.4]]`).

- **List equality is tolerant and NaN-aware in all cases.**
  `[1,2,3].isEqual([1,2,3+1e-11])` is `true` (engine tolerance),
  `[x,2].isEqual([y,2])` is `undefined` (symbolic), and a list containing `NaN`
  is never `isEqual` to itself (mirroring scalar `NaN ≠ NaN`) — uniformly for
  every list, whatever produced it. Ordering comparisons (`isLessEqual`, …)
  between equal tensors of any cell type now answer `true` instead of
  `undefined`.

- **Faster broadcast arithmetic.** Removing the eager tensor construction from
  the boxing path makes broadcast-heavy evaluation measurably faster (~30% on
  elementwise matrix expressions), with no per-expression packing cost until a
  numeric kernel actually runs.

### Issues Resolved

- **A function call over a collection-valued _expression_ keeps its broadcast
  type.** With `h` a function over numbers (declared or inferred) and `L` a
  list, `h(L)` already typed as a list — but `h(L + 1)` or `h(2L)` typed as a
  _scalar_ while still evaluating to a list. Both now type as the shaped vector
  (`h(L+1)` → `vector<3>` for a 3-element `L`), and a declared scalar signature
  no longer rejects a collection argument with `incompatible-type` —
  scalar-parameter functions are threadable, so the argument broadcasts,
  matching what evaluation always did. Scalar applications and genuinely invalid
  arguments (`h("abc")`) are unchanged.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.86.1 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |          6.7 |       7.5 |   176 |     137 |         4.1 |
| $\sin 1$           |           21 |        21 |   220 |     444 |         5.1 |
| $\cos 1$           |           20 |        20 |   224 |     536 |         6.9 |
| $\ln 2$            |           16 |        16 |   352 |   5,754 |         3.8 |
| $e^{\pi}$          |           14 |        15 |   215 |   4,765 |         4.5 |
| $\zeta(3)$         |        1,734 |     1,790 |   282 |       — |          51 |
| $\Gamma(\tfrac13)$ |          957 |       950 |   356 |       — |         209 |
| $\psi(\tfrac13)$   |          806 |       795 | 2,818 |       — |         170 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.86.1** columns to see
what is _new this release_ (a `—` under `0.86.1` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.86.1 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     6.6×     |   3.1×   |   5.4×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     8.0×     |   1.3×   |   6.8×    | 0.09×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     5.6×     |   0.8×   |   4.3×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   1.7×   |     —     |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   1.2×   |     —     | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.2×   |     —     | 0.007× |    —    |     1×      |
| **Derivatives**                        |              |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |    0.04×     |  0.04×   |   0.02×   | 0.001× | 0.003×  |     1×      |
| **Simplification**                     |              |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |     44×      |   34×    |    34×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     131×     |   67×    |    72×    |  5.0×  |   23×   |     1×      |
| **Evaluation**                         |              |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     53×      |   25×    |    43×    |  3.0×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     8.7×     |   5.1×   |   7.2×    |  2.1×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    6954×     |  6552×   |   5758×   |  93×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     382×     |   133×   |   341×    |  2.6×  |    —    |     1×      |
| **Solving**                            |              |          |           |        |         |             |
| $x^4+x^2-1=0$                          |     0.2×     |   0.3×   |   0.2×    | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |     1.5×     |   1.7×   |   1.4×    | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 6.6× faster than
Mathematica** (up to 6954×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-07-21 · Compute Engine `0.88.1` @ `afde4f88` (current build)
· published `0.86.1` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.88.1 _2026-07-20_

### Issues Resolved

- **Color converters (`AsRgb`, `AsHsv`, `AsHsl`, `AsOklab`, `AsOklch`) broadcast
  over lists**, like the color constructors already did:
  `AsRgb([Hsv(120,1,1), Hsv(0,1,1)])` → `[Rgb(0,1,0), Rgb(1,0,0)]` instead of an
  `incompatible-type` error. A non-color element produces a per-element error
  rather than rejecting the whole call. Out-of-range channels continue to pass
  through unchanged — they can represent valid out-of-sRGB-gamut colors, so
  constructors and converters neither clamp nor error.

- **`ce.box()` no longer throws on malformed MathJSON input.** A non-MathJSON
  plain object (`ce.box({foo: 1})`) or an array whose head is not a symbol used
  to throw a JavaScript `Error`; both now return a boxed
  `["Error", "'unexpected-mathjson'", …]` expression (with the offending input
  as context), consistent with how every other input problem is reported. The
  engine remains fully usable afterward.

## 0.88.0 _2026-07-20_

### Deprecations

- **`ComputeEngine.timeLimit` is deprecated** in favor of
  `ComputeEngine.withTimeLimit()`. `timeLimit` arms a hard-to-scope implicit
  deadline around each `evaluate()`/`simplify()`; wrap the work you want bounded
  in a span instead:

  ```ts
  // Before
  ce.timeLimit = 500;
  const r = expr.evaluate();

  // After
  const r = ce.withTimeLimit({ ms: 500, label: 'my-app:eval' }, () =>
    expr.evaluate()
  );
  ```

  `timeLimit` still functions exactly as before in this release; it will be
  removed in a future minor version.

### Improvements

- **`ComputeEngine.withTimeLimit()` accepts an attribution label.** In addition
  to the numeric form `withTimeLimit(ms, fn)`, an object form
  `withTimeLimit({ ms, label }, fn)` (preferred for new code) records a label on
  the span. Nesting still composes as `min()` — a labelled inner span can only
  shorten the effective deadline, never extend it past an enclosing one.

- **`CancellationError` now carries `attribution` and `spans`.** When a timeout
  fires, `attribution` is the label of the span that owns the deadline that
  fired (so a caller can compare it against the label it passed to distinguish
  "my sub-budget expired" from "my caller's budget expired"), and `spans` lists
  all active span labels, outermost first. Timeouts armed by the deprecated
  ambient `ce.timeLimit` are attributed as `engine.timeLimit:<operator>` (e.g.
  `engine.timeLimit:Integrate`).

- **Divisor functions are now O(√n) instead of O(n).** `Sigma0`, `Sigma1`,
  `SigmaMinus1`, `IsPerfect`, and `Totient` compute from the prime factorization
  rather than trial iteration: `Sigma1(1000000007)` went from ~14s to ~1ms, and
  11+-digit inputs that previously ran essentially forever return instantly.

- **Integer factorization is interruptible.** The Pollard-rho factorizer now
  honors the active deadline (a `withTimeLimit` span interrupts a hard semiprime
  factorization on time, with attribution) and is backstopped by an iteration
  budget (`cause: 'iteration-limit-exceeded'`) so it terminates even with no
  time limit set.

- **Symbolic integration no longer swallows a caller's timeout.** If a
  `withTimeLimit` span enclosing an integration expires mid-attempt, the
  `CancellationError` now propagates to the caller (identified via
  `attribution`) instead of being silently converted into "no antiderivative
  found". Rubi's own internal sub-budgets still degrade gracefully.

### Fixes

- **Unary `D` applications no longer serialize to a bare `D`.** An arity-1 (or
  otherwise unrecognized) `D` application — e.g. a document-defined function
  named `D` — used to serialize with its argument silently dropped (`["D","w"]`
  → `"D"`). It now serializes as `\operatorname{D}(w)`, which round-trips
  exactly. Recognized derivative shapes (`D(f,x)` → Leibniz notation) are
  unchanged.

- **A known-value uppercase symbol before a parenthesized group now parses as
  multiplication.** The predicate-notation heuristic (a single uppercase letter
  before `(...)` reads as a function application, e.g. `P(x)`) applied even when
  the scope knew the symbol was a value: with `K` assigned `-32.3`, `K(2-0.1)`
  parsed as a _call_ of `K` and evaluated to an `incompatible-type` error. The
  heuristic now consults the scope — a symbol with a known non-function type
  falls through to multiplication (`K(2-0.1)` → `-61.37`). Unknown and
  function-typed symbols are unchanged.

- **Juxtaposed-multiply serialization is round-trip safe for single-uppercase
  factors.** `Multiply(K, group)` serialized as `K(group)`, which re-parses as a
  function _call_ of `K` — corrupting the expression when `K` is a numeric
  symbol. A single-uppercase-letter factor directly against a parenthesized
  group now emits an explicit `\times` (`K\times(…)`). Other factor shapes
  (`x(y+z)`, `2(x+1)`, `\mathrm{abc}(x+1)`) already round-tripped and are
  untouched.

- **`ce.box()` now accepts native `bigint` values.** `bigint` was declared in
  `ExpressionInput` but unhandled by the boxing dispatch, so `ce.box(123n)` —
  bare or as an operand in `ce.box(['Add', 10n, 5])` — silently became the
  `Undefined` symbol. Bigints now box as exact integer literals, preserving
  exactness at any magnitude (never routed through a float), identical to the
  `ce.number(bigint)` path.

- **Unbounded collection walks over infinite lazy sources.** `First`/`At` on a
  `Filter` or `TakeWhile` whose predicate never (or eventually never) matches,
  and any walk over a `Dedup` of a source with infinitely repeating duplicates
  (e.g. `Dedup(Cycle([1,1]))`), could previously spin until the ambient time
  limit fired — or forever with `timeLimit = 0`. These walks are now bounded by
  `iterationLimit` and degrade gracefully (`Nothing`/`undefined`), consistent
  with the documented lazy-collection contract. Note: as a consequence,
  `Count(Dedup(...))` over a finite source **larger than `iterationLimit`** now
  returns `undefined` (unknown) instead of walking the whole source, matching
  `Filter`'s existing `count` behavior.

## 0.87.2 _2026-07-20_

### Breaking Changes

- **`Add` no longer widens an unreachable scalar arm into a broadcast collection
  type.** A sum mixing a scalar with a list-shaped operand typed as a union —
  `matrix + 1` was `finite_integer | matrix`, `2·[1,2,3] + a` was
  `number | vector<3>` — even though the value ALWAYS broadcasts elementwise and
  can never be a scalar (`[[1,2],[3,4]] + 1` → `[[2,3],[4,5]]`). These now type
  as the collection: `matrix`, `vector<3>`. The behavior was inconsistent as
  well as imprecise — a dimensionless `list<number> + 1` was already repaired to
  `list<number>` downstream, so only _dimensioned_ shapes carried the artifact.

  This is a **type-surface change**: code pinning the union spelling will see
  the narrowed type instead. It is a strict improvement for consumers that
  _dispatch_ on the type, and that is the motivation — union matching is
  all-members, so `type.matches('collection')` returned a confident `false` on a
  value that is always a collection, silently routing list-valued rows down
  scalar paths (reported by Tycho as item 67). It also unblocks expressions CE
  itself rejected: `MatrixMultiply([[x, y]], aM₁ + M₂)` failed signature
  validation on the union operand and now evaluates.

  Generic `collection`/`set`-typed operands are deliberately unchanged and keep
  the honest union — a non-indexed collection is never broadcast by the value
  path, so a scalar outcome stays reachable there.

### Resolved Issues

- **`isValid` now honors its documented contract through a list/tensor.**
  `isValid` is specified as `false` if the expression "or any of its
  subexpressions" is an `["Error"]`, but `BoxedTensor.isValid` returned `true`
  unconditionally — so a `List` whose every element was an `Error` reported
  `isValid: true`. `(1,2)+[3,4]` broadcasts to a list of `incompatible-type`
  errors and passed the gate. An embedded `Error` element now poisons the
  enclosing expression, matching what `BoxedFunction.isValid` already did.

  Behavior change worth noting even though the contract is unchanged: consumers
  using `isValid` as an admission gate before compiling or plotting will now
  correctly reject expressions they previously admitted.

  Only `expression`-dtype tensors are scanned; `float64`/`complex128`/`bool`
  fields cannot hold an `Error` by construction and keep the O(1) answer, so
  this does not add a per-element walk to large numeric tensors.

  The `isValid` documentation has been expanded to spell out the contract: the
  check is deep (including list elements and held operands), and it tests
  well-formedness rather than meaningfulness — free symbols, undeclared
  functions, `NaN` and `±∞` are all valid.

## 0.87.1 _2026-07-20_

### Breaking Changes

- **`compile(..., { realOnly: true })` now rejects a complex-valued tuple/list
  component.** `realOnly` coerced only the top-level result, so a `{ re, im }`
  object sitting in a component slot passed through untouched and reached the
  caller in a number slot — `(t, i t)` compiled successfully and returned
  `[0.5, { re: 0, im: 0.5 }]`. A complex component now fails the compile with a
  diagnostic naming the component, matching what the GPU targets already do and
  the existing `Sqrt(-1)` "no real value" error. The component's _type_ cannot
  decide this — with `t` undeclared, `(t, i t)` and `(t, t²)` both infer
  `finite_number` — so the check uses the same `isComplexValued` analysis the
  GPU targets fail closed on, and every target now rejects the same shapes.
  Real-valued tuples are unaffected, and the runtime `realOnly` coercion now
  also recurses into array results for values that only become complex when
  called (`(t, √t)` at `t = -4` → `[-4, NaN]`). The check follows only positions
  that can produce the compiled result, so a complex value consumed by an
  operation with a real result still compiles (`At([i, 2], 2)` → `2`).

### Resolved Issues

- **A `When` (restriction) whose value was a COLLECTION did not expose the
  collection interface.** `isCollection` was `false`, `count` `undefined` and
  `each()` yielded nothing, even though `.type` already reported `vector<N>` /
  `list<tuple<…>>` — the type system and the collection interface disagreed
  about the same value. Only a LIST-valued condition broadcast; the common case
  of one scalar restriction over a whole list left an opaque wrapper in place. A
  collection-valued `When` now behaves as `[When(L₁,c), …, When(Lₙ,c)]`: at or
  below `MAX_SIZE_EAGER_COLLECTION` it distributes into a `List`, and above the
  threshold it stays a held `When` that is nonetheless fully enumerable
  (`count`/`each()`/`at()`), following the same hybrid-lazy convention as
  `PointList`. A scalar `When` still reports as a scalar, and a `Tuple`-valued
  one is not split into its components so a restricted point stays a point.
  Operators whose collection-ness depends on their operands can now declare it
  with the new optional `BaseCollectionHandlers.isCollection` predicate. Every
  handler-backed collection API honors that opt-out — `count`, `each()`, `at()`,
  `get()`, `indexWhere()`, `subsetOf()`, `contains()`, `isLazyCollection` and
  `isIndexedCollection` — so none of them can report a collection answer for a
  value that says it is not one. The opt-out is deliberately narrower than
  `isCollection === false`: an _eager_ collection operator such as
  `UnicodeScalars` has no collection handlers at all until it is evaluated, and
  still goes through the materialize-then-iterate path.

- **A `Sum`/`Product` over three or more indexing sets silently dropped every
  index after the second.** The cartesian product of the indexing sets was built
  by a fold that returned tuples of the wrong length — for a 2×2×2 product,
  eight tuples of length 2, with pairs duplicated — and since the reducer reads
  the tuple positionally, the third and later loop indexes were assigned
  `undefined`. Any triple sum or product was therefore wrong, without a
  diagnostic. The full n-dimensional product is now iterated, with the last
  index varying fastest. One and two-index big-ops are unaffected.

- **A `Sum`/`Product` with a large finite bound exhausted the heap before it
  could be interrupted.** The whole index product was materialized up front, so
  `Σ_{i=1}^{10⁸}` allocated 10⁸ one-element arrays _before_ the reducer ran a
  single step — the process died before `run()`/`runAsync()` or any deadline
  could cancel it. Index tuples are now streamed one at a time, keeping
  allocation proportional to the number of indexes, and the engine deadline is
  checked between terms. Bounds whose magnitude exceeds
  `Number.MAX_SAFE_INTEGER` over a non-degenerate range can no longer be
  enumerated faithfully at `number` precision — adding one to such a value does
  not change it — and now evaluate to an `["Error", "out-of-range"]` rather than
  silently truncating to a single term. A degenerate range (`lower === upper`)
  still yields exactly one term.

- **A `List` element whose container type was revealed only by canonicalization
  was flattened into a numeric tensor.** Tensor eligibility is decided on raw
  operands so nested `List`s stay visible, but a wrapper such as a parsed
  `Delimiter`, `If`, `Which`, `When` or `Hold` reports its `tuple`/`set`/
  `dictionary`/`record` type only after it is canonicalized. Such elements were
  taken for scalar tensor components, so a list of tuples collapsed into a
  `vector<N>` and lost its structure. Container-valued elements are now
  recognized both by operator name and by type — primitive and structured alike,
  including as a member of a union — and keep the expression a `List`.

- **A `Sum`/`Product` index named `i` was read as `ImaginaryUnit` by the
  compiler's complex-valuedness analysis, silently corrupting the enclosing
  arithmetic on every target.** The binder's bound name reached the engine-value
  fallback as if it were a free symbol, so the analysis complex-tainted the
  _sibling_ operand of any enclosing arithmetic — the `Sum` itself emitted
  correctly. `\sum_{i=0}^{2}\cos(it)+2.5` compiled (`success: true`) to `NaN`,
  and `\sin(\sum_{i=0}^{2}\cos(it))+2.5` to a silently wrong `2.5`; the
  interpreter was correct throughout. The index need not appear in the body, and
  `\prod` was affected identically. A binder's bound names are no longer
  analyzed as free symbols; loop/summation indices are treated as the integer
  counters they are, while function parameters keep their declared types (a
  complex parameter stays complex).

- **A per-evaluate `ce.timeLimit` was silently inert inside a
  `ce.withTimeLimit(ms, fn)` span.** The span deadline replaced, rather than
  min-ed with, every inner clamp, so a pipeline wrapped in a span lost its inner
  bounds — a 500 ms clamp ran the full 60 s span. The effective deadline is now
  `min(ambient, now + timeLimit)`. Plain nested evaluations are unaffected. Note
  this applies to synchronous `evaluate()`: a span's deadline is still restored
  when its callback returns, so `evaluateAsync()` under a span remains
  unbounded.

- **GPU targets emitted invalid shader source for vector-valued block locals and
  over-wide `vecN` constructors.** A tuple/point-valued block local was declared
  `float` while being assigned a `vecN`/array, vector width did not propagate
  through an aliased local (`q := p`), and `vecN` constructor arity was chosen
  from the _argument_ count when it is a _component_ count — so a complex or
  nested-tuple element overflowed the constructor. Locals now declare the
  matching type, width propagates through aliases, and an aggregate-valued
  component fails closed with a diagnostic instead of emitting source no driver
  accepts. Failing closed now also covers a matrix-valued component, an empty
  tuple/list (neither language has a zero-length array type), and a block local
  bound to values of disagreeing shapes within one block (a shader local has a
  single declared type, and there is no declaration a scalar and a `vecN`
  assignment both satisfy).

- **A delimited `\mapsto` body was read as a statement `Block` rather than a
  `Tuple`, so a point-valued lambda silently dropped all but its last
  component.** `t \mapsto (\cos t, \sin t)` applied at `t = 0.5` returned
  `0.479…` — just `sin 0.5` — on every target, `js` included; the equivalent
  `g(t) := (\cos t, \sin t)` was already correct. A delimited lambda body is now
  data (a `Tuple`) whatever its separator; a genuine statement block is built by
  the `;` infix parser when the sequence contains an `Assign` and reaches the
  lambda parser already formed, so `(x := 1; x+1)` is unchanged.

## 0.87.0 _2026-07-19_

### Resolved Issues

- **Exponential blowup evaluating float-carrying symbolic bodies inside function
  applications.** The "inexact operand numericizes a closed-constant
  sum/product" rule (`0.5 + π` → `3.64…`) decided "closed constant" by resolving
  symbols through the _dynamic_ scope chain, so inside a function application a
  bound-but-symbolic parameter counted as known: a body term like `z² + 0.3`
  fired a full-subtree `N()` walk that could make no progress, at every nested
  level, mutually recursive with `evaluate` — ~×7.5 work per nesting level. The
  canonical victim was interpreted evaluation of a recursive function over a
  symbolic argument (`Q(n, z) = Q(n-1, z)² + 0.3`, the iterated-map shape):
  depth 7 took ~8 s and depth 8+ hit the time limit, where the same recursion
  with an exact constant (`3/10`) unwound in milliseconds. The gate is now the
  lexical `isConstant` (every symbol a constant binding) — depth 7 drops ~500×
  to ~15 ms, float and exact now cost the same, and `0.5 + π`, `0.5 + √2`, and
  `0.5 + x` all behave exactly as before. Two neighboring sites sharing the
  wrong predicate returned flat-wrong _values_ inside applications and are fixed
  the same way: `KroneckerDelta(w)` over a bound symbolic parameter returned `0`
  (now stays symbolic), and `Degree(w²)` returned `0` (now `2`).

  Relatedly, many **non-lazy** evaluate handlers re-evaluated operands the
  evaluation driver had already evaluated. Each such call re-descends the whole
  operand subtree, so under nesting the waste compounded — a residual
  ×2-per-level re-walk on top of the bug above. All library handlers now follow
  the handler contract (a `lazy` operator's handler owns its operands' single
  evaluation; a non-lazy handler receives them already evaluated and must not
  re-evaluate): `Power`, `Sqrt`, `Root`, `Divide`, `Ln`, `Log`, `Negate` in
  arithmetic; the linear-algebra operators (`Transpose`, `Determinant`,
  `Inverse`, `MatrixMultiply`, `Norm`, the eigen/decomposition family, matrix
  constructors and predicates, ~30 sites); the statistics reducers
  (`Mean`/`Median`/`Variance`/… — 11 sites); and `Text`. Symbolic recursive
  unwinding is now linear: depth 80 unwinds in ~95 ms where depth ~20 previously
  hit the time limit.

- **`Timing` now measures the actual evaluation.** `Timing` was a non-lazy
  operator, so the engine evaluated its argument _before_ the handler ran and
  the handler then timed a redundant second walk of the already-evaluated result
  — reported times measured cache-warm re-walks, not the computation. `Timing`
  is now `lazy`: the handler receives the raw argument, canonicalizes it outside
  the timed region, and times the real evaluation.

- **One-time cache builds are no longer charged against the time limit.** The
  engine builds some internal tables lazily on first use (constructible trig
  values on the first `sin(π/6)`-style evaluation, the standard simplification
  rule set, etc.). Previously this warm-up ran inside the caller's
  `timeLimit`/`withTimeLimit()` budget, so a tight deadline on a fresh engine
  could lose a large fraction of its budget — or fire mid-build — on the very
  first call. The deadline is now suspended while a cache builds and then pushed
  back by the build's duration, so a time budget measures only the caller's own
  evaluation. Relatedly, a timeout that did fire during a cache build was
  swallowed and resurfaced as an unrelated `TypeError`; an interruption now
  propagates as the `CancellationError` it is, leaving the cache unbuilt so a
  later call retries.

- **Compiled real/complex convention mismatch in branch arms** (js target). A
  provably-real branch arm (`If`/`Which`/`When`) alongside a complex-valued arm
  compiled to a plain number while consumers of the branch read `{ re, im }`
  slots — so a constant base-case arm in a complex-ascribed recursive function
  (`M(0, z) = 0`, the canonical base-case shape) returned NaN at **every**
  point, including points that never left the base clause. Real arms are now
  coerced to the complex convention when any arm is complex (the no-match
  default likewise emits `{ re: NaN, im: NaN }`); wide-typed pass-through arms
  (a `z` slot declared `number` carrying a complex value at run time) stay bare.
  The same coercion now applies at the two sibling seams: a `Typed` complex
  ascription over a provably-real operand (previously silently inert in compiled
  code — an all-real body under a declared `-> complex` return), and a
  provably-real call-site argument bound to a complex-typed parameter of a
  user-defined function (`M(10, 0)` — `Complex(0, 0)` canonicalizes to the real
  literal `0`).

### New Features

- **New engine flag `ce.jit: 'auto' | 'off'`** governing every **implicit**
  compilation path — the new lazy-`Map` auto-compilation (below) and the
  pre-existing compiled numeric kernels (`NIntegrate`/`ND`/`NLimit`, the
  `Integrate`/`Limit` numeric fallbacks, `NDSolve` right-hand sides, the
  solve-domain enumeration sieve, the stochastic-equality probes, the compiled
  `Reduce` fast path). Default `'auto'`: attempts run, and on the first
  environment-level `EvalError` (a strict-CSP host refusing dynamic code) the
  engine latches to `'off'` engine-wide, capping CSP violation reports at one.
  Set `'off'` up front on strict-CSP pages, MV3 extensions, or hardened runtimes
  — or as a diagnostic kill switch. Explicit `compile()` is exempt and keeps
  failing loudly. Implicit compile failures now fall back to the interpreter
  **silently** (previously some of these paths logged a `Compilation fallback`
  warning).

### Performance

- **Lazy-`Map` element lambdas auto-compile on numeric drains.** Draining a lazy
  broadcast (`f(Range(1, 10^5)).N()`, a `PointList` sweep, an `addN`/`mulN`
  broadcast) whose element lambda applies interpreted user-defined functions
  previously paid the full symbolic pipeline per element (~ms/element). At
  **machine precision** (the gate: the default engine precision is bignum and
  never triggers this), such drains now compile the element lambda once per
  logical `Map` — eligibility-gated (pure bodies, literal-bounded loops, no
  unbound free symbols, ambient-scope captures only) — and serve elements from
  the compiled function, ~30–2500× faster with digit parity against the
  machine-precision interpreter. The compiled function is validated before every
  invocation against the same two-axis mutation keys as the comprehension memo,
  so reassigning a captured symbol (even mid-drain) recompiles, while unrelated
  assignments don't thrash the cache. Per-element fallback to the interpreter is
  silent and exact: non-numeric rows, NaN results (re-checked through the
  interpreter so `√x` over a sign-crossing source still yields complex values),
  and ineligible bodies (e.g. containing `Random`) behave exactly as before.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.86.1 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |          7.2 |       8.1 |   179 |     102 |         3.9 |
| $\sin 1$           |           23 |        24 |   224 |     442 |         5.2 |
| $\cos 1$           |           23 |        23 |   224 |     571 |         7.0 |
| $\ln 2$            |           15 |        15 |   344 |   4,392 |         3.7 |
| $e^{\pi}$          |           13 |        13 |   212 |   4,930 |         4.5 |
| $\zeta(3)$         |        1,732 |     1,733 |   265 |       — |          48 |
| $\Gamma(\tfrac13)$ |          928 |       942 |   347 |       — |         219 |
| $\psi(\tfrac13)$   |          777 |       814 | 2,967 |       — |         196 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.86.1** columns to see
what is _new this release_ (a `—` under `0.86.1` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.86.1 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     5.4×     |   2.4×   |   4.3×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     8.2×     |   1.1×   |   7.0×    | 0.09×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     4.3×     |   0.5×   |   3.3×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   1.4×   |     —     |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   1.1×   |     —     | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.1×   |     —     | 0.007× |    —    |     1×      |
| **Derivatives**                        |              |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |    0.03×     |  0.03×   |   0.02×   | 0.001× | 0.003×  |     1×      |
| **Simplification**                     |              |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |     33×      |   19×    |    25×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     88×      |   48×    |    63×    |  3.4×  |   16×   |     1×      |
| **Evaluation**                         |              |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     64×      |   31×    |    60×    |  3.3×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     8.5×     |   5.1×   |   8.0×    |  1.9×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    6388×     |  6536×   |   6482×   |  75×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     375×     |   144×   |   356×    |  2.2×  |    —    |     1×      |
| **Solving**                            |              |          |           |        |         |             |
| $x^4+x^2-1=0$                          |     0.4×     |   0.3×   |   0.3×    | 0.08×  |    —    |     1×      |
| $x^3-x-1=0$                            |     1.6×     |   1.7×   |   1.6×    | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 5.4× faster than
Mathematica** (up to 6388×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-07-20 · Compute Engine `0.87.0` @ `0158397a` (current build)
· published `0.86.1` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.86.3 _2026-07-19_

### New Features

- **Recursive user-defined functions now compile.** Self- and mutually recursive
  functions (`fact(n) := n ≤ 1 ? 1 : n · fact(n-1)`) compile on the `javascript`
  and `interval-js` targets to true recursion, instead of failing closed.
  Termination is the caller's contract, matching compiled unbounded `Loop`: on
  the `javascript` target runaway recursion throws a catchable `RangeError`; on
  `interval-js` the runner converts runtime errors to the _entire_ interval
  ("cannot bound"), per that target's error philosophy. (The interpreter throws
  `CancellationError` on its time limit instead.) A complex-valued recursive
  function needs a `Typed` `complex` **return** ascription on the function
  literal so the self-call types as a scalar — without it the application types
  `broadcastable<number>` and complex arithmetic over it does not compile. GPU
  targets (GLSL/WGSL) are unchanged: shaders cannot recurse, so recursion stays
  fail-closed there. Measured on a depth-10 iterated Julia map, the recursive
  form runs ~0.18 µs/pt — about an order of magnitude faster than the equivalent
  hand-unrolled closed form compiled before this release.

- **Function literals accept a signature-string shorthand.**
  `["Function", body, "'(n: integer, z: number) -> complex'"]` desugars at
  canonicalization into the structural `Typed` form (typed parameters plus a
  return-type ascription) — one compact string instead of nested `Typed`
  wrappers, reusing the full type grammar. Signatures must name every parameter;
  optional/variadic markers are not yet supported and fall through to the
  standard parameter validation error.

### Performance

- **Small literal integer powers of complex values compile to inline multiply
  chains.** `z^k` for literal `k` = 2…8 with a complex-valued `z` emitted the
  general polar-form power helper (`hypot`/`atan2`/`exp`/…) per evaluation; it
  is now an inline square-and-multiply chain, with the base bound to a const
  exactly once. Iterated-map workloads speed up ~9× (depth-10 Julia closed form:
  1.25 → 0.14 µs/pt). The square is digit-compatible with the interpreter; for k
  ≥ 3 both routes go through different roundings and agree to ~1 ulp. Exponents
  ≥ 9, negative, and non-integer still use the general helper.

### Resolved Issues

- **Degree-mode compilation now reaches user-defined function bodies.** The
  angular-unit rewrite (scaling trig arguments/results so radian-based compiled
  math reproduces `angularUnit` semantics) was applied only to the top-level
  expression: compiling `t ↦ f(t)` where `f(x) := sin(x)` under
  `angularUnit: 'deg'` emitted radian-based trig inside `f`'s definition, while
  the inlined `t ↦ sin(t)` correctly scaled. The rewrite is now applied to each
  emitted user-function body. (Compiled-vs-interpreted agreement for unit-scaled
  trig is ~1 ulp, not digit-exact — the two routes round the unit conversion in
  different orders.)

- **`ce.assign(name, fn)` ties the recursion knot for pre-boxed function
  literals.** A `Function` literal canonicalized _before_ `ce.assign(name, …)`
  (the programmatic box-then-assign route) left its self-reference bound to a
  stale auto-declaration, so the body's types were wrong — for most names the
  self-call typed `any` and compiling the function fail-closed on the collection
  guard, while a lucky subset of names (pre-declared shells such as `K` or `J`)
  masked the bug. `ce.assign` now pre-declares the target as function-typed and
  re-canonicalizes such a literal, matching the behavior of the `Assign`
  operator and of `f(n) := …` parsing. (Naming a function after a built-in
  operator, e.g. `N`, still collides — unchanged.)

## 0.86.2 _2026-07-19_

### Resolved Issues

- **An assigned complex symbol now compiles as complex without an explicit
  declaration.** `ce.assign("z_0", <complex value>)` then compiling an
  expression using `z_0` emitted the binding as a complex object literal while
  the operand analysis read only the DECLARED type (wide `number` / `unknown` ⇒
  real) — `number + {re, im}` arithmetic, silently `NaN` at every point. The
  analysis now derives complex-ness from the assigned value, mirroring the fold.
  Compile-bound variables (loop indices, lambda parameters) shadow the engine,
  so an index named `i` does not pick up the imaginary unit.
- **`Block`/`\coloneq` locals infer complex-ness from their assigned right-hand
  side.** In `w_1 ⩴ (x+iy)² + z_0; w_2 ⩴ w_1² + z_0` the local `w_1` was emitted
  as a complex object but consumed as REAL by later statements (its type
  defaulted to real; outer declares don't reach block locals) — silent all-NaN.
  Locals' complex-ness is now inferred in statement order — a later local
  reading an earlier complex local is itself recognized — shared by every target
  (this also extends the GPU `vec2` local hints to chained locals).
- **Complex `Add` binds compound operands once — nested complex arithmetic now
  compiles in O(tree size).** Each `{re: …, im: …}` slot spliced the full
  operand subexpression twice, doubling code size and runtime per nesting level:
  the depth-10 Julia closed form compiled to ~360 KB (~713 µs/pt). Compound
  complex operands are now bound to consts emitted exactly once: the same form
  compiles to ~1.9 KB and runs ~1.3 µs/pt, with digit-for-digit interpreter
  parity. Symbols and number literals stay inline, so simple shapes emit
  byte-identically.
- **`Max`/`Min` (and `Supremum`/`Infimum`) now type as `number`.** Their
  declared result type was the vestigial union `number | list`, so even
  `Max(1, 2)` typed as `list | number`, a comparison over one typed
  `list<boolean>`, and the compilation targets' scalar-condition assert
  fail-closed every `When` restriction containing a reduction
  (`y = x \{\max(a,x) < 2\}` masked its whole curve). These operators always
  REDUCE — including a collection argument's elements — to a single scalar
  extremum (`ElementMax`/`ElementMin` are the broadcasting variants), so the
  result type is `number` unconditionally. Evaluation is unchanged.

## 0.86.1 _2026-07-19_

### Resolved Issues

- **Materializing a list no longer restructures its eager elements.**
  `evaluate({materialization: true})` on a literal list spliced the contents of
  ANY collection-valued element into the parent — a list of `Tuple` pairs came
  back flattened (`[("a",1), ("b",2)]` → `["a",1,"b",2]`, so the result no
  longer fed `DictionaryFrom`), a nested list literal lost its nesting, and an
  _infinite_ lazy element (`Cycle`) was spread until the evaluation deadline.
  Only finite **lazy** sub-collections are now flattened-and-materialized (the
  documented intent: `[Range(1,3)]` still materializes to `[1,2,3]`); eager
  literals are preserved, and an infinite lazy element stays put as a bounded
  preview.
- **`Take` of an infinite collection with a finite bound is now finite.**
  `Take(Range(1,+∞), 3)` reported `count` 3 but `isFiniteCollection` false (it
  propagated the _source's_ finiteness), which left
  `ListFrom(Take(<infinite>, n))` symbolic. `Take` now reports finite whenever
  its own element count is known-finite; `ListFrom(Take(Range(1, +∞), 3))` →
  `[1,2,3]`. (When the source's count is genuinely unknown —
  `Take(ChunkBy(<infinite>, f), 3)` — finiteness stays unknown, keeping
  materialization previews honest.)
- **`Sort` and `Shuffle` type as `list<…>`.** Both always rebuild a `List`, but
  their static type claimed the _source's_ type (`Sort(Range(1,5))` typed as an
  `indexed_collection`-shaped Range). Both now report `list<element-type>`,
  matching `Take`.
- **`Slice` facets are now coherent over infinite and unknown-length sources.**
  `Slice` claimed `isFiniteCollection` unconditionally, and a negative _start_
  over an infinite source produced a `NaN` count while `at(1)` fabricated the
  element `+oo` (from `source.at(Infinity)`). The facets now share one bounds
  resolver: a negative **end** over an infinite source means "through the end" —
  an honest infinite tail (`Slice(Range(1,+∞), 5, -1)`: count `∞`, not finite,
  `at(1)` = 5, `Take(…, 3)` → `[5,6,7]`); a negative **start** over an infinite
  source ("the last k elements") is unresolvable and stays inert; an
  unknown-length source now reports finiteness as unknown rather than true.
  Bounded positive windows are unchanged (`ListFrom(Slice(Range(1,+∞), 1, 5))` →
  `[1,2,3,4,5]`).
- **`Sum`/`Product` bodies that bind looser than multiplication are now fenced
  when serialized.** The big-op body is parsed back at multiplication
  precedence, so an additive body's trailing terms escaped the operator on
  re-parse: `Sum(i + 1, i=1..3)` serialized as `\sum_{i=1}^3i+1`, which
  re-parses as `(\sum_{i=1}^{3}i)+1` — 9 became 7 — and a body-bound index in
  the escaped terms degenerated to a free symbol (`i` → the imaginary unit,
  turning real product expansions complex-valued). Additive (and other
  looser-than-multiplication) bodies now serialize parenthesized
  (`\sum_{i=1}^3(i+1)`); tighter-binding bodies (`2i`, `\frac{1}{i}`, a bare
  symbol) are unchanged.
- **Fused stepped ranges with a fraction or compound second anchor now parse to
  the intended `Range`.** `[0,\frac{1}{6}...1]` parsed to
  `List(0, Range(1/6, 1))` — silently wrong values — because the sample reader
  did not recognize fraction literals; it now yields `Range(0, 1, 1/6)` with an
  EXACT rational step (a float `0.1666…` step would drift and miss the end
  anchor; the range lands exactly on `1`). And `[m+n,m+n+15...m+n+60]` parsed to
  a nested-`Range` `List` — the `...` infix binds its left operand tight, so the
  continuation range was embedded in the additive tail
  (`Add(m, n, Range(15, m+n+60))`); the normalization now recovers the true
  second sample and end anchor, yielding `Range(m+n, m+n+60, 15)`. Both rewrites
  keep the provenance guard: only ellipsis/`..`-written ranges participate — an
  explicit `\operatorname{Range}(…)` element (bare or embedded in a sum) stays a
  literal `List` entry.

## 0.86.0 _2026-07-19_

### New Features

- **`ce.withTimeLimit(ms, fn)`** — run a block of work under a single evaluation
  deadline. Ordinarily each top-level `evaluate()` arms its own `timeLimit`
  budget, so a long sequence of short evaluations — e.g. draining a lazy
  collection element by element via `each()`/`at()` — can run unboundedly
  without ever tripping the limit. Wrapping the loop in `withTimeLimit()` arms
  one shared deadline for its full duration: any evaluation inside throws
  `CancellationError` (`cause: 'timeout'`) once the deadline is exceeded.
  Re-entrant (an inner call can only shorten the effective deadline, never
  extend it).

### Resolved Issues

- **`.N()` of `Tuple ± scalar·Tuple` no longer throws at machine precision.**
  When every term of a component sum was an integer-valued machine float
  (`20 − 0.1·20`), the exact summation path read `bignumRe` — which is undefined
  on a machine numeric value — and threw
  `TypeError: Cannot read properties of undefined (reading 'toFixed')`. At scale
  this killed composed lazy streams mid-drain (a 4001-point
  `PointList − scalar·PointList` died at the first integer-valued element) and
  made `at(k)` return `undefined` at the crashing indices. The integer fold now
  converts the integral machine value directly.
- **A solidus-rendered fraction juxtaposed with following material keeps
  explicit grouping.** Serializing a non-canonical
  `InvisibleOperator(Divide(1, 2), Delimiter(…))` at nesting depth > 3 (where
  the default fraction style switches to an inline solidus) emitted `1/2(sq)` —
  which re-parses as `1/(2·s·q)`, silently changing the value. The solidus form
  is now parenthesized (`(1/2)(sq)`); `\frac`-rendered fractions and
  trailing-position solidus fractions are unchanged.
- **`Multiply(symbol, Tuple)` serializes with an explicit multiplication sign.**
  `s(1,2,3)` re-parses as a function CALL `["s", 1, 2, 3]` for any symbol the
  parser cannot prove non-applicable, silently turning a product into an
  application. A bare-symbol factor followed by a parenthesized comma-group now
  serializes as `s\times(1,2,3)`. Single-expression groups (`s(x+1)`) and
  number-led products (`2(1,2)`), which re-parse as products, keep
  juxtaposition.
- **`CountIf`, `Position`, `Ordering`, `DictionaryFrom`, and `RecordFrom` stay
  inert on an infinite or unknown-length collection.** These operators require
  walking every element, so on an infinite input (`Range(1, +∞)`, `Cycle`,
  `Iterate`) they previously consumed the entire evaluation time limit and then
  threw `CancellationError` instead of returning a result. They now detect the
  non-finite input structurally and stay symbolic immediately. (`Ordering`
  previously returned a spurious _empty list_, claiming a complete ordering it
  never computed.) Huge-but-finite inputs still walk under the deadline as
  before, and `Find` is unchanged: it streams and short-circuits, so
  `Find(Range(1, +∞), x ↦ x > 5)` still returns `6`.

### Collections

- **`Insert`, `DeleteAt`, `ReplaceAt`, `Partition` (chunk and window forms),
  `SlidingWindow`, and `ChunkBy` are now hybrid-lazy.** Inputs at or below the
  100-element eager threshold evaluate to an eager `List` exactly as before
  (byte-identical shapes); larger, lazy, or infinite inputs stay symbolic and
  serve their elements on demand through `count`/`at`/ iteration, following the
  same convention as the hybrid-lazy broadcast forms. `Insert` into a
  million-element `Range` no longer materializes the whole list to answer
  `Count` or an index probe, and streaming prefixes of infinite results now
  work: `Take(Partition(Range(1, +∞), 3), 2)` → `[[1,2,3],[4,5,6]]`,
  `Take(ChunkBy(Cycle([1,1,2]), x ↦ x), 3)` → `[[1,1],[2],[1,1]]`. `Partition`'s
  predicate form (`Partition(xs, pred)` → `[trueGroup, falseGroup]`) requires a
  finite input and is unchanged. Materializing consumers (`ListFrom`, …) behave
  as before.

## 0.85.1 _2026-07-18_

### Performance

- **Large `PointList` transposes and point-coordinate projections are now
  hybrid-lazy, and scalar arithmetic over lazy broadcasts composes lazily
  instead of grinding (or staying inert).** Numeric evaluation of
  `scalar × (PointX(P), PointY(P), …)` over a 4001-point `PointList` of
  broadcast components took ~600–1000 ms per product — each coordinate
  projection eagerly transposed the whole point list into n `Tuple`s (at ~150
  µs/element of per-element boxed re-canonicalization) only to project one slot
  back out — and could exceed the 2 s `timeLimit` on a full plot row. Three
  coordinated changes, all hybrid (collections at or below the 100-element eager
  threshold are byte-identical to the previous shapes):
  - `PointList` past the threshold transposes to the lazy `Map` form (consumable
    via `at`/`each`/`count`) instead of materializing every point-`Tuple`.
    **BREAKING (shape)**: a >100-point `PointList` now evaluates to a lazy
    `Map`, not an eager `List` — element values are unchanged.
  - `PointX`/`PointY`/`PointZ` project lazily past the threshold, and project
    straight to the source collection when the operand is the lazy transpose
    form (`PointX(PointList(a, b, c))` ≡ `a` for equal-length components; ragged
    or scalar slots keep transpose semantics).
  - `addN`/`mulN` re-dispatch their broadcast branches after numeric operand
    evaluation, so an operand that only becomes a collection through evaluation
    (`Mod(L, 11)` over a list `L`) now composes into the lazy `Map` form —
    previously the product/sum was silently left inert (`0.2 · ⟨collection⟩`
    unreduced). The eager broadcast zip also streams its operands with hoisted
    iterators instead of per-index `at()` calls (which re-instantiated a lazy
    `Map`'s mapping lambda on every access). The filed repro (a 4001-member 3D
    `vector` row) went from a 2 s timeout to ~10 ms of lazy composition, with
    materialization deferred to the consumer sweep.

### Resolved Issues

- **String `vars` values now splice into compiled JavaScript and Python as
  source, not as string literals.** The `vars` compile option is the live-path
  contract: a mapped symbol always stays a runtime input instead of having its
  assigned value folded into the emitted code — so one engine state can serve
  both a compile-once path (sliders as runtime arguments) and a fold-early
  evaluate path. The GLSL and interval targets honored it, but the JavaScript
  and Python targets JSON-stringified the mapping, so
  `compile(expr, { vars: { s: '_.s' } })` emitted `Math.sin("_.s" * _.x)` — a
  string literal yielding `NaN` at run time. A string value is now spliced
  verbatim (`Math.sin(_.s * _.x)`); a non-string value still bakes as a constant
  (`vars: { a: 7 }` → `7`), unchanged.

## 0.85.0 _2026-07-18_

### New Features

- **`DSolve` frontier round — parity with SymPy on the ODE audit (50/51, 0
  wrong).** Four new solvable classes:
  - **Nonhomogeneous Cauchy–Euler** (`x²y″ + bxy′ + cy = g(x)`): an x-power
    indicial ansatz for power forcing (`x²y″ + xy′ = x` → `c₁ + c₂·ln x + x`),
    with a variation-of-parameters fallback for resonant or non-power forcing.
  - **The Airy family** `y″ = (px + q)·y`: solutions as
    `c₁·AiryAi(t) + c₂·AiryBi(t)` with `t = ∛p·x + q/∛p²` (real cube root,
    either sign of `p`).
  - **Airy-type Riccati** `y′ = q₀(x) + q₂·y²` (constant `q₂`, linear `q₀`): the
    `y = −u′/(q₂u)` linearization yields the one-parameter
    `(Ai′ + C·Bi′)/(Ai + C·Bi)` family — `y′ = x + y²` now solves (SymPy errors
    on it).
  - **Repeated-eigenvalue first-order linear systems**: diagonal systems of any
    size and defective 2×2 systems via a generalized eigenvector, gated on an
    exact `(A−λI)² = 0` check so near-repeated numeric eigenvalues stay inert
    rather than producing an approximately-wrong solution.
- **`AiryAiPrime` / `AiryBiPrime` operators** (derivatives of the Airy
  functions), with machine-precision numerics across all three DLMF regimes and
  full derivative closure (`Ai′ → AiryAiPrime`, `AiryAiPrime′ → x·Ai(x)` — so
  repeated differentiation of Airy expressions evaluates and numericizes).

- **`NDSolveFunction` — ODE solutions as applicable functions.** Where `NDSolve`
  returns a sample `List`, the new `NDSolveFunction` (same arguments, without
  the sample count) returns the solution as a callable function — a `Function`
  literal wrapping the new `InterpolatingFunction` operator, which holds the
  adaptive solver's piecewise-quartic dense-output table. Assign it and evaluate
  anywhere in the integration interval
  (`f := NDSolveFunction(y′ = y, y, (x, 0, 1), 1)`; `f(0.5)` → `1.6487…`), at
  the integration accuracy; outside the interval the value clamps to the nearest
  endpoint, and a symbolic argument stays symbolic. The solution compiles to
  plain JavaScript — `compile(f)` yields a positional lambda (`run(0.5)`), and
  `compile(f(t))` an expression over `t` (~1 µs per evaluation) — and LaTeX
  display elides the data table
  (`\operatorname{InterpolatingFunction}_{[0, 1]}(x)`); the full table
  round-trips through MathJSON. Scalar equations (first-order and higher-order)
  are supported; the multi-dependent system form stays inert.

### Improvements

- **`NDSolve` now uses adaptive stepping (Dormand–Prince 5(4)) with dense
  output.** The output is unchanged in shape — a `List` of `steps + 1` uniform
  `[x, y]` samples — but the values are now tolerance-controlled: integration
  adapts its internal step size (embedded 4th/5th-order error control) and the
  uniform grid is emitted from the quartic dense-output interpolant. Fixed-step
  RK4 silently lost accuracy near rapid transients (`y′ = −50(y − cos x)` over
  `[0, 3]` with 100 steps erred at ~4·10⁻⁵; now ~2·10⁻¹²). Non-integrable
  problems (finite-time blow-up, tolerance failure) leave `NDSolve` inert rather
  than returning inaccurate samples.

- **Truncation dots after a repeating decimal tail now parse exactly.**
  `0.999\ldots` → `1`, `0.333\ldots` → `1/3`, `0.1212\ldots` → `4/33`: a
  truncation marker after decimal digits ending in an evident repetend (a block
  repeated at least 3 times for single digits, at least twice for longer blocks)
  is read as the exact repeating decimal. Non-repeating tails (`3.1415\ldots`)
  keep the previous behavior (the marker is display-only).

- **`nPr(n, k)` parses in lenient mode** as the k-permutation count
  `P(n, k) = C(n, k)·k!`, joining the existing `nCr(n, k)` → `Binomial`.

- **The infinite Sum/Product closed-form table grew substantially.** New
  exactly-evaluated families (each numerically verified): alternating p-series
  (`Σ (−1)^{k+1}/k → ln 2`, `Σ (−1)^{k+1}/k² → π²/12`), odd p-series
  (`Σ 1/(2k−1)² → π²/8`), Dirichlet beta (Leibniz `Σ (−1)^k/(2k+1) → π/4`;
  `β(2) →` Catalan's constant; `β(3) → π³/32`; `β(5) → 5π⁵/1536`), the
  exponential series (`Σ 1/k! → e`, `Σ xᵏ/k! → eˣ`, shifted starts adjusted
  exactly), the first-moment geometric series (`Σ k/2ᵏ → 2`; symbolic ratio →
  `x/(1−x)²` guarded on `|x| < 1`), and the logarithmic series
  (`Σ 1/(k·2ᵏ) → ln 2`; symbolic ratio → `−ln(1−x)`, same guard). New
  infinite-product entries: `Π_{k≥a} (1 − 1/k²) → (a−1)/a`,
  `Π (1 − 1/(2k+1)²) → π/4`, and `Π (1 + 1/k²) → sinh(π)/π` (previously
  numeric-only). Divergent or out-of-table shapes stay symbolic, as before.

## 0.84.2 _2026-07-18_

### Performance

- **Removed a per-call inference-snapshot tax that had slowed the whole engine
  by ~1.4× since 0.74.0.** Every top-level boxing or parsing operation eagerly
  snapshotted the set of inferred symbols by walking every binding in every
  scope — including the entire standard library — to provide provenance for the
  fresh-matrix-inference repair (`Determinant(A + B)` inferring `A`, `B` as
  matrices), a consumer that runs only when a matrix-typed parameter mismatches.
  The provenance is now computed forward: `BoxedSymbol.infer()` records a
  definition when its type first transitions unknown → concrete during a boxing
  operation, and the repair's eligibility reads that log. Matrix inference
  behavior is unchanged (pinned by a 13-case matrix in
  `matrix-operator-typing.test.ts`); eligibility is now keyed on definition
  identity rather than name, so a name whose fresh inner-scope definition was
  popped no longer masks an outer definition. Measured recovery: `π.N()` at 200
  digits 2.5 µs → 0.12 µs (21×, faster than 0.73.0); `∫ 1/(x³+1)` 5.8 ms → 1.6
  ms (3.7×); the drift vs 0.73.0 across the benchmark suite is eliminated.

### Improvements

- **The sign of integer powers of pure-imaginary bases is now determined.** For
  `z` of type `imaginary`, `z²` reports `negative`, `z⁴` `positive` (the cycle
  `(βi)^p = (-1)^{p/2}·β^p` for even `p`, including negative exponents:
  `(2i)^{-2} = -1/4`), and odd powers report `unsigned` (pure imaginary). Powers
  of a general finite non-real base report `not-zero` — a non-real value is
  necessarily nonzero. Previously all of these were indeterminate: the handler
  branch that addressed non-real bases was unreachable, and wrong as written (it
  claimed _every_ even power of a non-real base was negative — but `i⁴ = 1` and
  `(1+i)² = 2i`).

### Improvements

- **`Abs` typing now follows the operand's finiteness.** `|x|` of a provably
  finite operand (real or complex) types `finite_real` instead of the
  signature's generic `real`; a provably infinite operand types
  `non_finite_number`, and a literal `NaN` types `number`. Finiteness also
  propagates structurally (`|x|` is finite iff `x` is), which makes signs of
  products of absolute values determinate: `|x|·|y|` for finite `x`, `y` now
  reports `non-negative` (this path previously hit a latent inverted parity
  claim in `Multiply` — see the sgn audit below — and before that was masked
  entirely).

### Resolved Issues

- **Lazy broadcast over a declared-`unknown` symbol no longer throws
  `Not canonical` (Tycho item 42).** Evaluating `mod(L, N)/N` with `L` a
  declared-`unknown` symbol holding a >100-element list built the lazy
  `Map(L, …)` over the SYMBOL, whose static type is `unknown`; every lazy
  collection operator's canonical handler hard-rejected such a source and
  `boxFunction` fell back to a silently NON-canonical expression, which the
  first arithmetic composition rejected with a thrown assert. Lazy collection
  canonical handlers now admit operands whose type is merely indeterminate
  (`unknown`/`any`/`value`/`broadcastable`) — provably-scalar operands still
  reject — and `Map` over such a source keeps value-aware indexed-ness (`type`,
  `at`, `count`, and the display preview, which no longer renders with a
  misleading `Set` head). The composed lazy result is consumable and honors
  `x.N() ≡ x.evaluate().N()`.

- **A user symbol shadowing a builtin no longer breaks function application of
  that builtin.** With `N := 85` declared (ubiquitous in Desmos-style
  documents), any `["N", …]` application — including the engine's own internal
  `N(…)` wrapper that makes lazy `.N()` elements float on access — resolved to
  the user's number and produced an `incompatible-type` error (surfacing as
  `Nothing` elements in lazy maps). Operator-position binding now defers a value
  definition that provably cannot be applied (a plain number, string,
  collection…) to an outer applicable definition of the same name;
  value-position references (`N + 1`) still resolve to the user's value.
  (Consequence: after prose-style devolution of an un-applied builtin — `N + 1`
  — a later `N(3.14159, 2)` now numericizes instead of staying symbolic.)

- **The JavaScript compile target's floored-`Mod` emission is parenthesized
  (Tycho item 43).** The fragment `((a % b) + b) % b` was emitted without outer
  parentheses; composed as a `Multiply`/`Divide` factor, JS's left-associative
  same-precedence `%` reduced the whole product mod `b` (`c * ((x % 1) + 1) % 1`
  ≡ `(c·(x%1+1)) % 1`), silently value-wrong whenever the product's magnitude
  reached the divisor. The standalone form was correct, which is why it
  survived. Compiled and interpreted now agree on the Neyret-hash idiom
  `Σ cos(i)·mod(10⁴sin(10⁴i), 1)`.

- **`Sum`/`Product` over a collection-valued body type as the collection, and
  `At` extracts element types (Tycho item 44).** A big-op whose body types
  `vector<2>` (e.g. summing scaled calls of `a(t) := [cos t, sin t]`) typed
  `number`, so indexing the sum baked an `incompatible-type` error at parse
  time; it now types `vector<2>`. `At` on a `tuple`-typed operand with a literal
  index types the selected slot, and an inference widen-guard stops a loose
  parameter type from coarsening an already-precise inferred function result
  (this made `A(t)[1]` type `any`; it now types `number`).

- **`At` over a typed-collection application compiles; a collection-valued
  big-op body fails closed instead of emitting wrong code (Tycho item 45).**
  `a(x)[1]` with `a` returning `vector<2>` now compiles (the collection gate is
  type-aware, so `_SYS.at` is emitted). A compiled `Sum`/`Product` whose body is
  collection-typed previously emitted scalar accumulation over arrays — NaN or
  string concatenation, silently wrong; it now fails closed (D6) with a hint to
  distribute the element access through the big op.

- **Applying a function to a symbolic argument that mentions the parameter's own
  name no longer overflows the stack under `.N()` (Tycho item 46).** `a(t+1)`
  for `a(t) := [cos t, sin t]` with `t` unbound: symbol values resolve by name
  through the evaluation context, so `BoxedSymbol.N()` recursed through the
  call-frame binding forever (`t → t+1 → t → …`). `.N()` now substitutes a
  self-referential context value once without numericizing through it —
  mirroring plain `evaluate()` — so nested helper-call expressions (the Tycho
  item-46 `PointList(A(t)[1], A(t)[2])` repro) evaluate symbolically, verified
  against direct numeric evaluation.

- **Desmos-style range ellipsis with an elided comma parses again (Tycho item
  47, regression of the 0.76.0 "request 6" class).** `[0,...300]` →
  `Range(0,300)` (was an inert `List(0, ContinuationPlaceholder·300)`),
  `[1,...N]` and `[0,...3N^{2}-1]` likewise, and the stepped `[0,15...210]` →
  `Range(0, 210, 15)` (was the silently WRONG `List(0, Range(15,210))`).
  Fully-comma'd, bare-fused (`[1...5]`, `[-3N...3N]`), and nested-group
  (`[f(a,b)...5]`) forms are unchanged. Compound-symbolic stepped anchors
  sharing an identical additive base with numeric offsets now infer too:
  `[m+n, m+n+15, ..., m+n+60]` → `Range(m+n, m+n+60, 15)`; differing bases or
  non-numeric offsets stay a literal `List`. Stepped-range inference only
  applies to ranges the ellipsis syntax itself produced — a list literal ending
  in an explicit `\operatorname{Range}(a,b)` element stays a `List`.

- **A `Range` operand of a tighter-binding parent now serializes parenthesized
  (Tycho item 48).** `..` parses its end operand at a precedence below `Add`, so
  `Add(Range(0, L-1), 3)` serialized as `0..(L-1)+3`, which re-parses as
  `Range(0, L+2)` — wrong values on any serialize→re-parse round-trip (with
  `L = 5`, an 8-element list instead of the shifted 5-element one). A `Range`
  under `Add`/`Subtract`/`Multiply`/ `Power`/solidus-`Divide` parents now wraps
  in parentheses (`(0..(L-1))+3`); bare and stepped ranges serialize unchanged.
  Same round-trip precedence class as the 0.83.2 `Mod` fix.

- **GPU targets emit a shape-matched NaN for masked conditional branches (Tycho
  item 49).** A `When`/`Which` whose value is a tuple body — a restricted
  parametric `(x(t), y(t))` with `\{0 \le t \le 1\}` — compiles the value to a
  `vec2`, but the masked branch emitted a scalar NaN: GLSL has no implicit
  float→vecN conversion in a ternary, so the driver rejected the shader and
  every restricted parametric member lost its GPU sampling path. The NaN branch
  is now vectorized to the value's component count (`vec2(_gpu_nan())` on GLSL,
  `vec2f(bitcast<f32>(…))` on WGSL — WGSL's `select` requires matching operand
  types); scalar bodies are unchanged.

- **Sign (`sgn`) handler audit.** A mathematical-correctness pass over all ~69
  `sgn` handlers fixed a dozen wrong claims (each could mislead simplifications
  or comparisons built on `isPositive`/`isNegative`): `Gamma(0)` and `Gamma(-n)`
  reported `zero`/indeterminate instead of recognizing poles; `Log` with a
  negative base claimed a real sign (the sign only flips for a base in (0,1));
  `Truncate(1/2)` claimed `positive` (truncation of |x| < 1 is 0); `Round(-1/2)`
  claimed `zero` while `evaluate` rounds halves away from zero (−1); `GCD(0,0)`
  and `LCM(0,n)` claimed `positive` (both are 0); `Floor`/`Ceil` of a complex
  number used the sign of the raw real part instead of the rounded one
  (`⌊0.5+0.5i⌋ = 0`); `Factorial(-1/2)` claimed non-real (it is `Γ(1/2) = √π`;
  only negative _integers_ are poles, same fix for `Factorial2`); `Abs(NaN)`
  claimed `positive`; `Random(-5, 5)` claimed `non-negative`; tensor `Rank` of a
  scalar claimed `positive` (it is 0); and a latent parity inversion in
  `Multiply` swapped `non-negative`/`non-positive` for products of
  sign-indefinite factors. `Arctan` now reports the sign of its argument (it
  previously never produced one).

- **A single-letter builtin operator used as a variable now stays connected to
  later assignments.** Prose-style input like `N \equiv 1 \pmod 5` devolves the
  un-applied builtin `N` to an unknown symbol, but when every other operand
  validated cleanly the devolved symbol was discarded and the expression kept
  the original symbol, still bound to the builtin operator: a later
  `N \coloneq 11` was invisible and the expression stayed stuck symbolic. The
  substituted operand is now retained (same fix for operands re-typed by
  matrix-context inference repair), so assigning the variable evaluates as
  expected.

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.84.1 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |          7.0 |        12 |   184 |     110 |         4.0 |
| $\sin 1$           |           21 |        26 |   226 |     479 |         5.3 |
| $\cos 1$           |           21 |        25 |   230 |     667 |         7.1 |
| $\ln 2$            |           14 |        18 |   356 |   5,093 |         3.1 |
| $e^{\pi}$          |           12 |        17 |   215 |   4,862 |         4.5 |
| $\zeta(3)$         |        1,573 |     1,620 |   268 |       — |          49 |
| $\Gamma(\tfrac13)$ |          914 |       921 |   366 |       — |         225 |
| $\psi(\tfrac13)$   |          749 |       743 | 6,854 |       — |         188 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.84.1** columns to see
what is _new this release_ (a `—` under `0.84.1` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.84.1 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     6.4×     |   2.7×   |   3.4×    |  0.4×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     9.6×     |   1.7×   |   6.0×    | 0.09×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     7.5×     |   0.9×   |   1.1×    |  0.4×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   1.9×   |     —     | 0.09×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   1.3×   |     —     | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.1×   |     —     | 0.007× |    —    |     1×      |
| **Derivatives**                        |              |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |    0.03×     |  0.02×   |   0.01×   | 0.001× | 0.004×  |     1×      |
| **Simplification**                     |              |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |     39×      |   29×    |    23×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     79×      |   45×    |    43×    |  2.8×  |   15×   |     1×      |
| **Evaluation**                         |              |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     59×      |   29×    |    21×    |  1.2×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     9.6×     |   5.1×   |   4.5×    |  2.3×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    6653×     |  6680×   |   2654×   |  63×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     402×     |   104×   |   159×    |  2.5×  |    —    |     1×      |
| **Solving**                            |              |          |           |        |         |             |
| $x^4+x^2-1=0$                          |     0.2×     |   0.2×   |   0.1×    | 0.07×  |    —    |     1×      |
| $x^3-x-1=0$                            |     1.6×     |   1.8×   |   1.0×    | 0.03×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 7.5× faster than
Mathematica** (up to 6653×) — in the browser, not a proprietary kernel.

<sub>Measured 2026-07-18 · Compute Engine `0.84.2` @ `40cc077a` (current build)
· published `0.84.1` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.84.1 _2026-07-17_

### Resolved Issues

- **`Equal`/`NotEqual` over a possibly-collection operand now compile on the
  `javascript` target with an interpreter-faithful runtime dispatch.** A
  comparison like `q(2) = 9` where `q` is declared `(number) -> unknown` — so
  the call _may_ return a collection at run time — previously failed closed
  (`success: false`, interpreter fallback). The binary form now lowers to a
  runtime helper mirroring the interpreter shape by shape: scalar operands
  compare tolerantly (within `engine.tolerance`, complex via the modulus), an
  array-vs-scalar pair is element-wise (`[1,4,4] = 4` → `[false, true, true]`),
  and an array-vs-array pair is whole-collection equality — a single boolean,
  `false` on a length or shape mismatch, recursive over nested arrays. The
  chained (n-ary) form over a possibly-collection operand still fails closed:
  its pairwise `&&` conjunction is only sound over scalar booleans.

- **Equality with an operand that only becomes a collection at evaluation no
  longer produces a cartesian nest.** `L(1) = [1,2]` where `L` is declared
  `(number) -> unknown` and returns a list fanned the literal out _before_
  evaluation (the opaque call not yet being a collection), then broadcast again
  element-wise once it was — yielding a 2×2 list of lists of booleans. It now
  follows the documented, representation-independent rule that literal,
  symbol-bound and lazy collections already follow: two collections compare as a
  single boolean (`L(1) = [1,2]` → `True`), and a runtime scalar against a
  literal list still broadcasts element-wise.

- **`.N()` of an already-evaluated lazy `Map` now yields numeric elements.** The
  0.84.0 fix wrapped a lazy broadcast's elements in `N` only when the broadcast
  was _constructed_ under `.N()`; calling `.N()` on an already-evaluated lazy
  `Map` was an identity, so `Sin(Range(1, 200)).evaluate().N()` streamed exact
  elements (`sin(1)`, `sin(2)`, …) from both `each()` and `At`. Requesting a
  numeric approximation of a lazy `Map` now rewraps its mapping function so
  every element floats on access — restoring `x.evaluate().N()` ≡ `x.N()` —
  while `evaluate()` alone still keeps elements exact and the result stays lazy
  (O(1) on `Sin(Range(1, 10^8))`).

## 0.84.0 _2026-07-17_

### Resolved Issues

- **`Sort` and `Shuffle` of a non-`List` collection returned corrupt results.**
  Both rebuilt their result with the _source_ collection's operator, so the
  sorted/shuffled elements were reinterpreted as constructor arguments:
  `Sort(Range(1, 10))` produced `Range(1, 2, 3)` — the one-element list `[1]` —
  and `Shuffle(Range(1, 5))` could produce an empty collection. Both now return
  a `List`, matching every other eager collection operation. `Sort` of an
  infinite or unknown-length collection now stays inert instead of returning an
  empty collection.

- **Negative indices now work uniformly across all indexed collections.**
  Negative-index normalization (`-1` = last element) was implemented
  per-collection and most lazy collections lacked it, so `Last`, `At(xs, -1)`
  and anything built on end-relative access silently returned `Nothing` — or
  worse: `Reverse` walks its source from the end, so
  `ListFrom(Reverse(Range(1, 5)))` returned `[]` instead of `[5,4,3,2,1]`.
  Normalization is now centralized in the index dispatcher and works for
  `Range`, `Linspace`, `Zip`, `Scan`, `Differences` and every other indexed
  collection with a known finite length; infinite or unknown-length collections
  correctly return `Nothing` without enumerating.

- **A `Filter` over more than ~1000 elements crashed numeric canonicalization.**
  Determining whether a `Filter` result was finite ran its `count` handler,
  which walks the source applying the predicate — and throws
  `iteration-limit-exceeded` past the iteration limit. Boxing an expression as
  simple as `Filter(Range(1, 100000), p) + 1` threw. Finiteness and emptiness of
  a `Filter` are now answered structurally (a filter of a finite collection is
  finite) without running the predicate, and `count` of a filter of an infinite
  or unknown-length collection now correctly reports unknown instead of claiming
  `Infinity` (a filter of an infinite collection can be finite:
  `Filter(Range(1, ∞), x < 5)` has 4 elements).

- **`IsEmpty` and `Contains` no longer answer `False` when the answer is
  unknown.** Both coerced an undetermined result to a definite `False`:
  `IsEmpty(Filter(Range(1, 10^5), x ↦ False))` — a collection that _is_ empty,
  but whose emptiness can't be established within the iteration limit — returned
  `False`. Both predicates are now three-valued and stay inert (unevaluated)
  when the answer cannot be determined.

### Collections

- **A comprehension's element memo now survives unrelated evaluations.**
  Elements of a comprehension (`[x^2 for x in xs]`) are cached per instance, but
  the cache was keyed on an engine-wide counter that every scoped evaluation —
  any `\sum`, `Block` or big operator — bumps on exit, so in a live document the
  cache never survived between two reads and every re-read re-evaluated the body
  per element (the Tycho/Graph Paper team measured a document that bound
  comprehensions lazily analyzing ~3× slower than one that eagerly materialized
  them). The cache is now invalidated only by semantic mutations: reassigning a
  free variable the body reads (directly or through a helper function it calls),
  redeclaring or inferring an operator, `assume()` and `forget()` — including
  the implicit revert when a scope that assumed exits — all refresh it, and a
  comprehension nested under a `Sum`/`Product` refills for each value of the
  enclosing binder. Unrelated evaluations between reads leave the cache intact.

- **`IdentityMatrix`, `ZeroMatrix`, `OnesMatrix` and `Diagonal` of a vector are
  now safe at huge dimensions.** These constructors eagerly built the full m×n
  matrix with no size limit — `IdentityMatrix(10^6)` attempted 10¹² elements.
  Above 10,000 total elements they now produce a lazy indexed collection with
  O(1) construction and element access; at or below, the result is the same
  materialized matrix as before, compatible with `Determinant`, `Inverse` and
  the rest of the dense linear-algebra operations.

- **`.N()` of a lazily-broadcast operation yields numeric elements.** When a
  broadcast returns a lazy `Map` (see below), requesting a numeric approximation
  now wraps the mapped function so each element is computed as a float on
  access: `Sin(Range(1, 10^8)).N()` elements are numbers, while `evaluate()`
  keeps them exact (`sin(1)`, `sin(2)`, …).

- **Element-wise operations over infinite and unknown-length collections are now
  lazy instead of inert — or truncated.** Broadcasting an element-wise operator
  over an infinite collection (`Cycle`), a finite collection of unknown size
  (`Filter`), or a symbolic-length `Range` now returns a lazy `Map` supporting
  `First`, `At`, `Take` and `Length`, rather than staying an inert expression:
  `Add(Cycle([1,2]), 1)` is the lazy `[2,3,2,3,…]`, and `Add(Range(1, n), 1)`
  with `n` a declared, unassigned integer becomes `Map(Range(1, n), _ ↦ _ + 1)`,
  which picks up `n`'s value reactively when later evaluated. This also fixes a
  wrong-answer bug: the eager broadcast read a `Filter`'s unknown length as 1,
  so `Add(Filter(Range(1, 100000), x ↦ x > 2), 1)` truncated to the
  single-element list `[4]`; it now yields the full lazy sequence `[4,5,6,…]`. A
  mixed broadcast folds with shortest-input semantics:
  `Add([10,20,30], Cycle([1,2]))` → `[11,22,31]`.

- **Element-wise operations over large collections are now lazy.** Applying an
  element-wise operator (`Add`, `Multiply`, `Sin`, a user function literal, …)
  to finite indexed collections of more than 100 elements returns a lazy `Map`
  instead of materializing every element: `Add(Range(1, 10^8), 1)` and
  `Sin(Range(1, 10^8))` evaluate instantly to a lazy collection supporting `At`,
  `Take`, `First`, `Last` and `Length` without enumeration. Collections of 100
  elements or fewer are unchanged and still evaluate eagerly to a `List`.

- **`Length`, `Count`, `IsEmpty` and `Contains` see through wrappers that cannot
  change their answer.** `Sort`, `Shuffle` and `Reverse` preserve element count,
  and (together with `Unique`, for `Contains`) preserve membership, so these
  consumers now strip such wrappers at canonicalization: `Count(Sort(xs))`
  becomes `Count(xs)` and no longer sorts — `Count(Sort(Range(1, 10^5)))` went
  from ~15 s to ~1 ms.

- **Numeric argument validation no longer enumerates large lazy collections.** A
  lazy collection passed to a numeric operator was fully enumerated at
  canonicalization to check or infer its elements — even a `Map` over millions
  of elements. Validation now decides on the static element type: provably
  numeric or provably non-numeric collections are accepted or rejected without
  enumeration, and a collection whose element type is genuinely indeterminate is
  accepted structurally and fails at evaluation time if an element turns out
  non-numeric. Only eager, literal collections still have their elements
  inspected individually.

## 0.83.2 _2026-07-17_

### New Features

- **Operator definitions can now supply a custom compilation handler.** A
  `compile` handler on an operator definition emits target source for that
  operator when the expression is compiled; returning `undefined` falls back to
  the target's default lowering:

  ```ts
  ce.declare('MyGcd', {
    signature: '(number, number) -> number',
    compile: (args, compile, { language }) =>
      language === 'javascript'
        ? `_gcd(${compile(args[0])}, ${compile(args[1])})`
        : undefined,
  });
  ```

  The handler receives the canonical operands, a callback to lower
  sub-expressions, and the compilation context (branch on `context.language` —
  `javascript` or `python`). It takes precedence over the target's built-in
  operator mapping, so it can also re-map how a built-in operator compiles;
  structural and control-flow heads (`Sum`, `If`, `Block`, …) keep their bespoke
  lowering and ignore the handler.

### Resolved Issues

- **A `Mod` in a product or a power base now serializes parenthesized, fixing a
  round-trip corruption.** Juxtaposition (invisible multiply) and superscripts
  bind _tighter_ than infix `\bmod` on re-parse, so an unparenthesized `Mod`
  factor absorbed the adjacent notation into its trailing operand:
  `["Multiply", ["Mod", "A", 2], ["Mod", "B", 2]]` serialized to
  `A\bmod2B\bmod2`, which re-parses as `A mod (2B mod 2)` = `A mod 0` = NaN. It
  now serializes as `(A\bmod2)(B\bmod2)`; similarly
  `["Power", ["Mod", "A", 2], "x"]` is now `(A\bmod2)^{x}` instead of
  `A\bmod2^{x}` (which re-parsed as `A mod 2^x`). Same class as the 0.79.2
  compound-operand `Mod` parenthesization fix, on the other side of the
  operator. (Reported by the Tycho/Graph Paper team — a hex-grid Desmos state
  rendered blank because a product of two `Mod(Floor(…), 2)` factors
  round-tripped to NaN.)

## 0.83.1 _2026-07-17_

### Resolved Issues

- **Fixed a 0.82.0 regression: an operand typed `broadcastable<T>` was rejected
  by operators with a plain scalar parameter, baking an unrecoverable
  `incompatible-type` error at canonicalization.** An application of an
  _undeclared_ function symbol (`["f", "k"]`) flowing through `Add`, `Multiply`,
  or `Power` lifts the surrounding expression to `broadcastable<number>`; a
  non-threadable operator with a `number` parameter (`Binomial`, `Totient`, and
  the rest of the number-theory family, among others) then rejected it — e.g.
  `ce.box(["Binomial", ["Add", "n", ["f", "k"]], 2])` was invalid. A
  `broadcastable<T>` operand could be a plain scalar `T` at runtime, so
  validation now admits it whenever `T` matches the parameter, exactly restoring
  the pre-0.82.0 admission. LaTeX input was largely unaffected (undeclared
  `f(k)` parses as the product `f \cdot k`, and a declared function types
  precisely); expressions built directly from MathJSON were the exposed surface.

## 0.83.0 _2026-07-17_

### Breaking Changes

- **Collection indexing (`At`) now serializes with brackets by default:
  `["At", v, 1]` → `v[1]` instead of `v_1`.** The bracket form is the
  round-trip-safe notation: `v[1]` always parses back to `At`, while the
  subscript form `v_1` only does when `v` is declared as an indexed collection —
  otherwise it re-parses as the unrelated subscripted symbol `v_1`, silently
  changing the meaning on a serialize→parse cycle. The previous behavior remains
  available engine-wide via `ce.latexOptions.indexStyle = () => 'subscript'` or
  per call via `expr.toLatex({ indexStyle: () => 'subscript' })`. (Requested by
  the Tycho/Graph Paper team, whose per-call `indexStyle` opt-ins were a
  recurring source of forgotten-call-site round-trip bugs.)

### New Features

- **Five linear-algebra operators now compile to the JavaScript and Python
  targets:** `ConjugateTranspose`, `Diagonal` (rank-dispatched — a matrix gives
  its main-diagonal vector, a vector gives the diagonal matrix), `MatrixPower`
  (integer powers, with a negative power inverting first), `RowReduce` (reduced
  row echelon form), and `Rank`. Previously these threw at compile time and fell
  back to the interpreter. Note that `Rank` is the **tensor** rank — the number
  of axes (scalar `0`, vector `1`, matrix `2`) — not the linear-algebra (row)
  rank.

### Resolved Issues

- **The `javascript` compile target now lowers a reduce (`Sum`/`Product`) and
  rank-dispatched multiplication over an `unknown`- or `broadcastable`-typed
  collection operand**, where it previously failed closed and fell back to the
  interpreter. A collection `Sum`/`Product` over such an operand reduces under a
  runtime guard (a scalar at run time still matches `Sum(scalar) = scalar`),
  with an element-wise-aware combiner so a nested (matrix-valued) element
  reduces correctly rather than string-concatenating. A `Multiply` of two
  possibly-collection operands compiles to a runtime helper that dispatches on
  rank — element-wise for equal-length vectors, matrix product for matrices —
  matching the interpreter. This lets a compiled function whose evidence-derived
  signature is `(…) -> unknown` render through the compile path instead of only
  the interpreter.

- **A function declared with a fixed-length list return type (e.g.
  `(number) -> vector<11>`) now compiles.** The value assignment wraps the body
  in a `Typed` ascription, which the compile targets did not handle, so every
  compiled call threw ``Unknown operator `Typed` ``. `Typed` is a transparent,
  no-op-at-runtime ascription and now compiles to its value operand on every
  target.

- **`Multiply` of two matrices is now the matrix product regardless of how the
  operands are presented.** A matrix _literal_ or a matrix-returning function
  _application_ already contracted, but a _symbol_ whose value is a matrix
  incorrectly broadcast element-wise (Hadamard) — the dispatch keyed on the node
  kind and missed a matrix-valued symbol. All three now contract consistently,
  so 0.82.0's per-step matrix-contraction rule holds for symbol operands too.
  Vectors remain element-wise.

- **The Python compile target no longer unwraps a one-element `ElementMax` /
  `ElementMin` / `Clamp` broadcast to a scalar.** `ElementMax([1, 2], [3])` now
  compiles to a value that runs to `[3]` (zipping to the shortest operand),
  matching the interpreter and the JavaScript target, instead of the bare scalar
  `3`.

- **Broadcasting an element-wise operator over an `N×1` column matrix now
  preserves its rank-2 shape.** For example,
  `\bold{v} = \begin{pmatrix} 5 \\ -3 \end{pmatrix}` evaluates to the nested
  `[[v === 5], [v === -3]]` (a 2×1 result) instead of the flattened rank-1
  `[v === 5, v === -3]`. A column vector is a `matrix<Nx1>`, and the broadcast
  result now mirrors the operand's shape, matching how row matrices
  (`matrix<1xN>`) and plain rank-1 vectors already broadcast. Consumers reading
  the broadcast result should expect one nested list per row.

- **A `Comprehension` body containing a scoped subexpression now sees the
  iteration index correctly.** When the body contained a `Block` (e.g. a
  `with`-style local), a big operator (`Sum`, `Product`), a nested
  comprehension, or a user-function application whose evaluation was deferred by
  any of these, the subexpression evaluated blind to the index value: the index
  was bound in a runtime scope that scoped subexpressions' lexical chains never
  reached. Results could be silently wrong — an applied function literal whose
  piecewise guard could not be decided without the index escaped with its
  **parameters** permanently unbound (e.g. `[total(f(n, 4)) for n in 1..3]` with
  `f(a,b) := [{a>b: b, a}, a-b]` returned expressions still containing `a` and
  `b`) — and, because the wrongly-symbolic elements never reduced, evaluation of
  such comprehensions cascaded into orders-of-magnitude excess work. Index
  values are now installed in the comprehension's own scope for the duration of
  each element's evaluation (isolated per walk, so interleaved iterations and
  `.count` reads during a paused iteration are unaffected), and evaluating a
  canonical `Comprehension` no longer re-creates it with a detached scope.

- **Multiplying or adding a scalar to a piecewise (`Which`) no longer evaluates
  the selected branch twice.** `2 \cdot \{A=1: X, Y\}` evaluated the taken
  branch once during conditional-threading detection and again in the arithmetic
  handler, doubling the cost of every piecewise operand of `Add`/ `Multiply`
  (untaken branches were, and are, never evaluated).

- **Fixed a stack overflow when evaluating `Negate` of an indexed collection
  that cannot be materialized**, such as a `Range` with symbolic bounds reached
  inside a comprehension body (`-Range(0, m + 5)` with `m` unbound): the
  element-wise distribution retried the same non-distributable negation without
  progress.

## 0.82.0 _2026-07-17_

### Breaking Changes

- **`Multiply` of two vectors (rank-1 lists) is now element-wise, not a dot
  product.** `[1, 2, 3] \cdot [4, 5, 6]` now evaluates to `[4, 10, 18]` instead
  of the scalar `32`. This makes `Multiply` over lists consistent: element-wise
  is what `Add`, `Power` (`k^2`), scalar scaling (`2k`), and symbol-bound list
  operands (`k \cdot k` with `k := [1,3,10]`) already did — previously the
  _same_ product could zip or contract depending on whether an operand was a
  literal list, a bound symbol, or a computed expression (`\sqrt{k} \cdot k`
  silently collapsed a 3-element family to one scalar). **For the dot product,
  use the explicit `Dot` or `MatrixMultiply` operators**, which are unchanged. A
  product is folded left-to-right, one pair at a time: a step involving a matrix
  (`matrix·matrix`, `matrix·vector`, `vector·matrix`) still contracts (matrix
  product, unchanged), while a step between two vectors is element-wise. Note
  this applies per step, so in a longer chain a contraction that _produces_ a
  vector then combines element-wise with a following vector: `M·u·v` is
  `(M·u) ⊙ v`, no longer the scalar `(M·u)·v`. Vectors of differing lengths stay
  inert (no implicit zip-to-shortest). The compiled targets follow the same
  semantics: equal-length `vector·vector` compiles to the element-wise
  broadcast; statically mismatched lengths and matrix contractions fall back to
  the interpreter.

- **A bounds-less big operator over LaTeX (`\sum ⟨body⟩`, `\prod ⟨body⟩`) now
  parses to its own head (`["Sum", body]` / `["Product", body]`) instead of
  `["Reduce", body, "Add"/"Multiply"]`.** This is a (non-canonical and
  canonical) parse-shape change, called out per the pipeline-contract rules:
  consumers matching on the `Reduce` shape should match the big-op head instead.
  It makes the serialization round-trip lossless — `["Sum", body]` serializes to
  a bounds-less `\sum ⟨body⟩`, which previously re-parsed to a different
  expression. Evaluation semantics are unchanged (a collection body still
  reduces).

- **Broadcasting over a one-element collection now returns a one-element `List`
  instead of unwrapping to the scalar.** `\sin(2 \cdot [5])` now evaluates to
  `[\sin(10)]`, previously the bare scalar `\sin(10)`. Broadcasting a scalar
  function over an `n`-element indexed collection now produces an `n`-element
  `List` for every `n ≥ 1`, matching the expression's static `list<…>` type (a
  `vector<1>` operand no longer types `list<number>` while evaluating to a
  scalar) and the user-function broadcast path, which already returned a `List`
  for single-element collections. An empty broadcast still evaluates to
  `Nothing`.

### Resolved Issues

- **`Sum`/`Product` over a _computed_ list-valued body now reduces instead of
  broadcasting.** `Sum(L)` of a literal collection reduced correctly, but a body
  that only _evaluates_ to a list — e.g. a broadcast chain over a list literal,
  `\operatorname{Sum}(\operatorname{mod}(\operatorname{floor}(7/2^{[0...10]}),2))`
  — returned the broadcast list unchanged instead of its sum. The arity-1
  reducer form now reduces the evaluated value when it is a collection.

- **A symbol operand naming an operator no longer leaks into `.unknowns`.** A
  function reference held as a symbol operand (e.g. the `Add` of
  `["Reduce", L, "Add"]`) was reported as a free variable by `.unknowns` /
  `.freeVariables`, so consumers walking unknowns saw a phantom unbound name.
  Operator names now resolve as function references, not free variables.

- **`subs()` no longer corrupts a bound index named `i` (or any name that
  collides with a constant).** Substituting into a canonical big operator —
  `ce.parse("\\sum_{i=1}^{n}2^{-i}").subs({n: 9})` — re-canonicalized the held
  `Limits` index _outside_ its binding scope, re-typing `i` as the imaginary
  unit: the index slot became an `incompatible-type` error and serialization
  dropped the index (`\sum_1^9…`). Held (non-canonical) operands now stay raw
  through `subs()` and are re-bound by the parent's canonical handler, exactly
  as when the expression was first built.

- **A bare numeric bounds pair on a big operator (`\sum_1^9 ⟨body⟩`) is no
  longer silently dropped at parse.** It now parses to an index-less
  `["Limits", "Nothing", 1, 9]`: a constant body iterates (`\sum_1^9 2` → `18`),
  and a body with free variables stays symbolic rather than losing its bounds.

- **A divergent integral over `(-∞, ∞)` no longer numericizes to a clean `0`.**
  `.N()` of `\int_{-\infty}^{\infty} x\,dx` (and `x^3`, `\sin x`, any odd
  divergent integrand) returned an exact scalar `0`: the Gauss–Kronrod
  quadrature mapped the doubly-infinite domain through a symmetric transform, so
  an odd integrand cancelled to exactly 0 on the first panel with a 0 error
  estimate — indistinguishable from a genuine result downstream. The
  doubly-infinite case is now split at 0 into two half-line integrals that must
  _each_ converge (the definition of improper-integral convergence); a divergent
  half fails to converge and the result falls back to a `Measurement` with an
  honest (large) error bar that consumers can reject. Convergent integrands are
  unaffected (`\int_{-\infty}^{\infty} x e^{-x^2}\,dx` → `0`,
  `\int_{-\infty}^{\infty} e^{-x^2}\,dx` → `√π`). Note this also means no Cauchy
  principal value is implied: a symmetric divergent integral reports
  non-convergence rather than its principal value.

- **Compiled JavaScript arithmetic over a value that may be a list is now
  correct for both outcomes.** Compiling `2h(x) - 1` where `h` may return a list
  produced scalar code that yielded `NaN` on a list value at run time (behind
  `success: true`). Such operands — typed `broadcastable<…>`, see New Features —
  now compile through the runtime broadcast helper: the same compiled artifact
  returns the scalar result for a scalar value and the element-wise list for a
  list value, matching the interpreter. Cases the helper cannot lower soundly
  now **fail closed** instead of emitting silently-wrong scalar code: a product
  of two or more possibly-list operands (a run-time matrix would need the matrix
  product, not an element-wise one), `Equal`/`NotEqual` over a possibly-list
  operand, and — on the Python target, where `*`/`+` repeat or concatenate a
  plain `list` — all arithmetic over possibly-list operands. `compile()` reports
  these as compilation failures (with the interpreter fallback available),
  rather than producing code that computes the wrong value.

### New Features

- **New `broadcastable<T>` type: honest static typing for values that may
  broadcast.** The engine broadcasts element-wise at run time (`2·[1,2,3]` →
  `[2,4,6]`), and statically-visible collections have carried honest types
  (`vector<3>`, `list<number>`) for a while — but the same arithmetic over a
  value whose collection-ness is _not_ statically visible (`2h(x,y)-1` with `h`
  returning `unknown`) used to collapse to scalar `number`, even though
  evaluation broadcasts if `h` returns a list. Such expressions now type
  **`broadcastable<T>`** — "a `T`, or an indexed collection of `T`, applied
  element-wise". The type is produced by `Add`/`Multiply` and every
  broadcastable operator (`Sin`, `Sqrt`, `Power`, `Abs`, …) over an operand
  whose type is a top type (an unknown-return call) or already `broadcastable`;
  it propagates through nested arithmetic, juxtaposition (`2(2h(x)-1)` is a
  product, not a tuple), function application, and indexing (`(2h(x,y)-1)[1]` is
  valid, with element type `number`). Relatedly, a scalar function over a
  **fixed-shape-typed intermediate** no longer collapses either:
  `\sin(10^4 \cdot [1,2,3])` — whose inner product types `vector<3>` — now types
  `list<number>` through every scalar-function hop (`mod`, scaling, …), so
  indexing the end state is valid. Operators that compute their own collection
  result (`-M`, `M+N`, `matrix + scalar`) are unaffected. Subtyping:
  `number <: broadcastable<number>` and `list<number> <: broadcastable<number>`,
  but `broadcastable<number>` is _not_ a subtype of `number` (it may be a list).
  The type can be used in declarations
  (`ce.declare('b', 'broadcastable<number>')`) and signatures. Bare symbols are
  unaffected: an undeclared `x` in `2x` still types scalar (inference pending),
  and tuples/points still bind atomically.

- **Applying a scalar function to a collection-valued expression now broadcasts
  — for every function body.** Broadcasting a user function over a literal
  collection (`f([1,2,3])` → `[f(1), f(2), f(3)]`) is long-standing; it now also
  applies when the argument only _evaluates_ to a collection (`f(g(3))` where
  `g` returns a list), and for every body — previously a non-arithmetic body
  such as `x \mapsto \operatorname{If}(x > 0, 1, -1)` applied to a computed list
  stayed inert. The static type of such an application is honest as well:
  `list<R>` for a visible collection argument, `broadcastable<R>` for a
  possibly-collection argument, where `R` is the function's return type (a
  list-returning function maps to a list of lists — no flattening). Declaring a
  collection parameter type (`(list<number>) -> …`) still binds the argument
  whole, and tuple arguments still bind atomically.

## 0.81.0 _2026-07-16_

### New Features

- **New `PointList` operator (the point-list surface form).** `PointList` is the
  explicit, importer-emitted operator that zips a point-with-collection into a
  list of points: `PointList(-6, n)` with `n` a 21-element list evaluates to the
  21-element list of points, while `PointList(1, 2)` is just a plain point.
  Zip-to-shortest for multiple list components; scalars broadcast; an empty
  component yields an empty list; an infinite or unknown-length component fails
  closed (stays inert, no hang). It round-trips through LaTeX as
  `\operatorname{PointList}(…)`. A plain `Tuple` now stays inert data — it never
  transposes — so tuples used as data are genuinely unaffected;
  tuple-with-collection arithmetic still scales component-wise, with no baked
  `incompatible-type` error, so a definition such as
  `m(P) \coloneq P + s(P)\cdot(1, 0.3n)` stays valid. (An earlier, evaluate-time
  `Tuple`-transpose of this idiom was replaced by the explicit `PointList`
  operator before it ever shipped in a release.)
- **`PointList` compiles on the `javascript`, `glsl`, and `wgsl` targets.** With
  all-scalar components (including free plot variables), it emits
  byte-identically to the equivalent `Tuple` (`[x, y]` / `vec2(x, y)` /
  `vec2f(x, y)`), so point literals rewritten to `PointList` stay on the
  compiled path (GPU grids, per-pixel bodies). Provably non-scalar components
  (collection- or tuple-typed, or a union with a collection member) fail closed
  to the interpreter, as does the `interval-js` target (where `Tuple` itself has
  no lowering).
- **`At` defers a possibly-collection base to runtime instead of baking a type
  error.** Indexing an expression whose type was over-narrowed to a scalar by
  arithmetic over an unresolved operand (`(2h(x,y)-1)[1]` with `h` returning
  `unknown`), or whose type is a union with an indexable member
  (`number | list<number>`), now stays symbolic and indexes once the base
  resolves to a collection — enabling structural substitution over vector-valued
  helper functions. Provably scalar bases (`(5)[1]`, `\pi[1]`, `\sin(3)[1]`)
  still report `incompatible-type` at canonicalization, and a base that turns
  out scalar at runtime errors at evaluation.
- **Pipeline contract test suite.**
  `test/compute-engine/pipeline-contracts.test.ts` pins the guarantees for
  MathJSON-carrying pipelines: non-canonical `box(json).json` structural
  fidelity (with its documented normalizations), non-canonical `.latex`
  round-trip (with its three documented exception classes),
  transform-then-canonicalize-once equivalence, cached-boxed re-binding rules,
  compile-from-boxed parity, and the non-canonical shape vocabulary. Breaking a
  test in this suite requires a CHANGELOG callout.

### Breaking Changes

- **`Partition(xs, n)` now returns chunks of size `n`, not `n` groups.**
  `Partition([1, 2, 3, 4, 5], 2)` now evaluates to `[[1, 2], [3, 4], [5]]`
  (chunks of 2, trailing chunk short) instead of splitting the collection into 2
  nearly equal groups. **To split into a given _number_ of groups, use
  [`Chunk`](/compute-engine/reference/collections/#chunk) instead**
  (`Chunk([1, 2, 3, 4, 5], 2)` → `[[1, 2, 3], [4, 5]]`). A new sliding-window
  form `Partition(xs, size, step)` returns the complete windows of `size`
  elements whose starting positions are `step` apart
  (`Partition([1, 2, 3, 4, 5], 2, 1)` → `[[1, 2], [2, 3], [3, 4], [4, 5]]`). The
  predicate form `Partition(xs, predicate)` (split into matching / non-matching
  groups) is unchanged.

### Resolved Issues

- **The two declare forms are equivalent under declare-then-assign.** Declaring
  a function head with the object form (`ce.declare('f', {signature: …})`) and
  then assigning a function literal (`f(x) \coloneq …` or `ce.assign`) silently
  discarded the declared signature — a scalar call to a tuple-typed parameter
  stopped type-erroring — while the string form (`ce.declare('f', '(…) -> …')`)
  preserved it. The object form now runs the same reconciliation: the declared
  signature is authoritative, arity mismatches error clearly, and the stored
  definition is identical to the string form's.
- **Juxtaposition with a `value`-typed symbol is multiplication again.** A
  symbol inferred or declared with the wide `value` type (e.g. any bare symbol
  that had passed through `Max`/`Min`-style `(value*)` signatures on the same
  engine) made subsequent parses of `2x` silently produce `Tuple(2, x)` instead
  of `Multiply(2, x)` — an order-dependent wrong-parse present in released
  versions, affecting any warm engine. A wide type is not evidence of
  point-ness; the juxtaposition gate now treats `value` like `unknown` and
  multiplies. Locked by warm-engine order-independence tests in the
  pipeline-contract suite.
- **`\operatorname{sin}` (and every lowercase spelled-out native function name)
  now binds as a function call.** `\operatorname{sin}(x)^{2}` parsed as the
  unknown symbol `sin` times `x^2` with `isValid: true` — silent wrong math; it
  now parses to `\sin(x)^2` with call-binding identical to the native command
  (prefix minus after the call, postfix power on the result, `^{-1}` inverse,
  base subscripts). Covers the trig/hyperbolic/inverse families,
  `ln`/`log`/`lg`/`lb`, and `arg`; bare identifiers (`sin` without
  `\operatorname`) are unchanged.
- **A `{…}` group after a function is now its argument list.** For a
  dictionary-registered function that takes parenthesized arguments, a brace
  group is accepted exactly as if it were `(...)`: `\gcd{a}` → `GCD(a)`,
  `\gcd{2,4}` → `GCD(2, 4)`, `\operatorname{floor}{2.5}` → `Floor(2.5)`, and
  consecutive groups are successive arguments (`\mod{x}{2}` → `Mod(x, 2)`, the
  TeX multi-argument-macro habit). Previously the function parsed as a bare
  symbol and the group multiplied against it — silently wrong (`\gcd{a}` was
  `GCD · a`). Commands with implicit (unparenthesized) arguments keep the
  transparent-grouping convention — braces render invisibly, so the argument
  reads the way the rendered formula does: `\sin{x}y` is `Sin(x·y)` and
  `\sin{x}^2` is `Sin(x²)`, matching `\sin x y` and `\sin x^2`. A brace group
  after a generic declared or unknown name (`f{x}`) keeps its juxtaposition
  (multiply) reading.
- **Function-style `\operatorname{…}` aliases now bind their call like
  natively-spelled functions.** The parse-only aliases (`\operatorname{mod}`,
  `var`, `cov`, `corr`, `count`, `length`, `nCr`, `random`, `shuffle`, `repeat`,
  `join`, `range`, `histogram`, `pdf`, `cdf`) parsed as a bare symbol, so a
  prefix minus captured the function symbol itself (`-\operatorname{mod}(x,1)` →
  loud `incompatible-type` error) and a postfix power stole the argument group
  (`\operatorname{mod}(-x,1)^{2}` parsed **silently** as `Mod · ((−x,1))²`,
  evaluating to NaN). They are now function-kind dictionary entries: the call
  binds before prefix minus, and a postfix power applies to the call result
  (`\operatorname{mod}(-x,1)^{2}` → `Power(Mod(-x,1), 2)`).
- **`target.compile()` can return a failure instead of throwing.** A fail-closed
  compile error (e.g. `At` on a non-indexed base) always threw out of a
  compilation target's `compile()`; passing the new `{ fallback: true }` option
  returns the documented `{ success: false, error, run }` shape instead, with
  `run` falling back to the interpreter — matching the engine-level `compile()`
  contract. The default remains throwing, so existing callers are unaffected.
- **An over-arity function literal is rejected at registration.** Assigning
  `f(x, y) \coloneq x + y` to a name declared `(number) -> number` was silently
  accepted, and `f(3)` then silently partial-applied; it now reports a clear
  error naming the literal's arity and the declared maximum. (The declared
  signature was already authoritative for types; this closes the arity gap.)
- **Applying a function whose body stays partially symbolic no longer loses the
  argument.** When a lambda body could not fully evaluate (e.g. a `Which`/`If`
  guard over an undetermined symbol), the application returned the body inert
  with the parameter unsubstituted — so
  `Map([1,2,3], k \mapsto \operatorname{Which}(k = m, 10^9, k))` yielded three
  identical copies of the raw body with `k` leaked free and the elements gone.
  The parameter's value is now substituted into the held result, fixing `Map`,
  `Filter`, `Tabulate`, `Zip`-with-function, and direct `Apply` in one place.
- **Lazy collections serialize faithfully.** `.latex` of a canonical `Map`,
  `Filter`, `Zip`, `Tabulate`, `Range`, `Linspace`, or `Comprehension` no longer
  materializes an elided or value-baked preview (which could re-parse to a
  corrupt expression — a `Map` over a bound symbol serialized as N copies of its
  raw lambda body); each now emits its operator form, which re-parses to the
  identical expression. `toString()` still shows the materialized preview for
  display.
- **Negative indexing on a lazy `Take` was off by one.** `Take(xs, n).at(-1)`
  returned the second-to-last element of the taken prefix (`at(-1)` on
  `Take([10, 20, 30], 2)` was `10` instead of `20`).
- **The display preview of a lazy `Take` sampled the wrong tail.** Displaying
  `Take(xs, 50)` over a lazily-enumerated source showed the _source's_ last
  elements (`[1, 2, …, 98, 99]`) instead of the taken prefix's
  (`[1, 2, …, 49, 50]`): the operands were materialized to their own display
  preview — continuation placeholder included — before `Take` consumed them.
- **A boolean `Sort` comparator now orders instead of silently doing nothing.**
  A comparator returning `True`/`False` (e.g. `(a, b) -> a > b`) never reordered
  — only signed-number comparators worked. Boolean comparators are now
  interpreted Elixir-style: `True` means the first argument sorts first, so
  `(a, b) -> a > b` sorts descending.
- **A mistyped `GroupBy` key function is now reported.** `GroupBy(xs, Even)` (an
  unknown symbol auto-declared by its own use) silently placed every element in
  its own garbage group keyed `"Even(1)"`, `"Even(2)"`, …; it now throws with a
  spell-check suggestion, like `Filter` and `Partition` do for broken
  predicates. Grouping by explicitly declared symbolic functions is unaffected.
- **The optimization form of `ArgMax`/`ArgMin` canonicalizes its function
  operand again.** `ArgMin(f, RealNumbers)` (the "locations of the minimum over
  a domain" form, used by the identities library) short-circuited
  canonicalization, leaving the function literal in a non-canonical shape that
  no longer matched the identities library's stored rewrite patterns. The form
  remains inert under evaluation; the collection form (`ArgMin([3, 1, 2])` →
  `2`) is unchanged.
- **A canonical `Comprehension` now serializes to LaTeX that round-trips.** Its
  `.latex` was an elided display preview
  (`\lbrack 1, 4, 9, \dots, 62\,500\rbrack`) that silently re-parsed to a
  corrupt 11-element `List` containing a literal `\dots`; it now serializes
  through the faithful `body \operatorname{for} var = domain` form, which
  re-parses to the identical comprehension (including tuple bodies, dependent
  domains, and infinite domains).
- **Lazy `Comprehension` elements are memoized.** `.at(n)` re-walked the domain
  on every call and each `.each()` recomputed from scratch, making repeated
  indexed access quadratic (`at(100)`×100 on a 200-element comprehension: ~5 s →
  ~23 ms; a repeat `.each()` walk: ~110 ms → ~0.2 ms). The prefix cache is
  generation-stamped, so reassigning a free variable the body depends on
  invalidates it, and it is capped (100k elements) beyond which access streams
  as before.
- **A broadcast condition no longer crashes `Which`/`If`.** A condition that
  evaluates to a collection of booleans (e.g. a piecewise guard over a broadcast
  function application inside a comprehension) threw
  `Condition must evaluate to "True" or "False"`; it now stays symbolic (held),
  letting the surrounding expression evaluate.

Fixes from a review of the 0.78.0–0.80.0 changes:

- **Compiled n-ary and collection `GCD`/`LCM` returned wrong numbers.** The
  compiled form passed a third operand into the internal tolerance slot
  (`GCD(2.25, 2.1, 0.6)` compiled to `2.1`, silently consuming the `0.6` as ε;
  `GCD(12, 18, 8)` → `6` instead of `2`; `LCM(4, 6, 10)` → `12` instead of
  `60`), and a collection argument (`GCD([12, 18])`) compiled to `NaN`. All
  forms now fold pairwise and match the interpreter; collection operands whose
  elements can't be enumerated at run time fail closed to the interpreter.
- **A user-defined function sharing its name with a loop index hijacked compiled
  `Sum`/`Product`.** With `f(x) := x^2` declared, compiling `\sum_{f=1}^{3} f`
  emitted references to the function instead of the loop index (returning
  garbage with `success: true`; a null interval on `interval-js`). Bound names
  are now tracked explicitly through every binding form instead of being
  inferred from resolved code.
- **Adaptive quadrature no longer poisoned by a `NaN` sample.** A single
  integrand `NaN` at a quadrature node (e.g. the removable singularity of
  `\sin(x)/x` at the midpoint of a symmetric interval) permanently corrupted the
  convergence accumulators, silently falling back to slow, nondeterministic
  Monte Carlo. Non-finite panels are now excluded until subdivided away:
  `\int_{-1}^{1} \sin(x)/x \, dx` converges to `2\,\mathrm{Si}(1)`. Also, `.N()`
  on an integral without a closed form now uses adaptive Gauss–Kronrod before
  falling back to Monte Carlo, matching the compiled path's accuracy.
- **Comprehension iteration state was shared across traversals.** Two
  interleaved iterators over the same comprehension (or reading `.count`
  mid-iteration on a dependent comprehension) corrupted each other's index
  variables, yielding wrong elements. Each traversal now gets its own scope, and
  a function literal produced by a comprehension body now captures the
  per-iteration value of the loop variable
  (`[x \mapsto x + i \text{ for } i \in 1..3]` applied to 10 gives `11, 12, 13`,
  not `13, 13, 13`).
- **GPU `gcd` regressed on large integers.** The tolerant float loop shipped in
  0.80.0 dropped the exact-integer path on `glsl`/`wgsl`: `gcd(4000000, 2)`
  returned `4000000`. Exact Euclid is restored for integer inputs within f32
  range.
- **Tolerant `GCD`/`LCM` invariants.** Scale-mismatched inputs violated
  `gcd ≤ min` / `lcm ≥ max` (`\gcd(2.5, 10^{21})` → `10^{21}`); zero-argument
  `GCD()`/`LCM()` crashed (now the identities `0`/`1`); nested collections now
  fold in a single evaluation.
- **`Max`/`Min` absorb `NaN` found inside collections**: `Max([1, NaN, 3])` now
  returns `NaN`, consistent with `Max(NaN, 5)` and with compiled code.
- **`IndexOf` on infinite lazy collections hung indefinitely**, ignoring
  `ce.timeLimit`. The search now streams (linear instead of quadratic on lazy
  collections) with deadline checkpoints. Compiled `IndexOf` also now uses the
  interpreter's tolerance-aware comparison instead of strict `===`.
- **Sequence interpretation (`Interpret`) regressions.** The 0.79.0
  anchor-search optimization rejected legitimate non-monotonic polynomial sums
  (e.g. `100 + 164 + 198 + 208 + \dots + 308`, which is
  `\sum_{k=1}^{14} k^3-21k^2+120k`) and then ground for hours in an
  exact-rational recurrence search that ignored `ce.timeLimit`. The break
  heuristic now requires a sustained divergence streak, and the recurrence
  search honors the deadline.
- **Parse-diagnostics false positives.** `f(x) \coloneq x^2` no longer emits
  `juxtaposition-as-multiply`/`undeclared-symbol` for the definition's own head,
  and symbols declared through the `getSymbolType` handler are no longer
  reported as undeclared.
- **Custom `compile` handler contract.** The handler now genuinely takes
  precedence over built-in operator mappings (e.g. `Add`) as documented
  (control-flow heads remain non-overridable, now stated explicitly), and
  `analyzeReferences` no longer reports custom-compiled operators as
  `unsupported`.
- **Assorted**: applying a non-numeric symbol to a collection (`t(\{1,2\})` with
  `t` a string) reports an application type error again instead of a confusing
  `Multiply` error; `PointX`/`PointY` work on `Set`s of points (previously
  returned `[]`); a provider timeout inside `Integrate` is re-thrown instead of
  swallowed; `\operatorname{erf}` at a directionless complex infinity stays
  symbolic instead of saturating to `1`; compiled `Map`/`Filter` no longer leak
  JavaScript's 0-based callback index into two-parameter lambdas.
- **Long flat operator chains no longer overflow the parser stack.** A flat
  chain of a same-precedence associative operator (`1+1+\dots`,
  `a\times b\times\dots`, chained `<`) recursed one parselet frame per term and
  overflowed at ~1,300 terms; same-precedence continuations now iterate in the
  parser's infix loop (a 20,000-term sum parses; same-operator chains produce
  the same flattened n-ary trees as before). One deliberate tree change: _mixed_
  same-precedence operators now group left-to-right — the conventional reading —
  where they previously nested rightward as an artifact of the recursion
  (`a\times b\otimes c` now parses as `CircleTimes(Multiply(a,b), c)`, not
  `Multiply(a, CircleTimes(b,c))`). Right-associative chains (`a=b=c`) still
  nest by construction.
- **Only binary arithmetic operator symbols lower to first-class combiners.**
  Passing a unary or relational operator symbol where a function is expected
  (`Reduce([1,2,3], Negate, 0)`, `Map(xs, Negate)`, `Filter(xs, Less)`) compiled
  to a wrong binary infix lambda (`Negate` folded like `Subtract`, returning
  `-6` behind `success: true`). Non-arithmetic operator symbols and combiners of
  the wrong arity now fail closed to the interpreter. Also: compiled `Reduce`
  over an empty collection without an initial value returns `NaN` instead of
  throwing, and `Tabulate` with a statically non-positive dimension fails closed
  instead of returning `[]`.
- **`Flatten` with no depth now fully flattens ragged lists.**
  `Flatten([[1,x],[2]])` was a no-op (only uniform tensors flattened), which
  became visibly inconsistent once `Flatten(expr, depth)` shipped; the default
  now flattens completely, per the documented (Wolfram) semantics.
- **`Scan` no longer silently drops an invalid initial value** — the error is
  surfaced instead of computing the unseeded scan.
- **`ElementMax`/`ElementMin`/`Clamp` on the `python` target now match the
  interpreter's broadcasting.** Length-mismatched arrays previously raised a
  NumPy `ValueError` (or size-1-broadcast) where the interpreter zips to the
  shortest operand; an injected helper now aligns semantics while keeping the
  vectorized NumPy fast path.
- **`lambda.body` is canonical for every declaration route.** The public
  accessor returned a raw, non-canonical body for functions declared with a
  MathJSON `evaluate` handler (parse/assign routes were fine), tripping
  canonical-only asserts in consumers; it now returns the canonical scoped
  `Block` shape everywhere. And `analyzeReferences` now probes a custom
  `compile` handler per target language, so an operator whose handler only
  supports some targets is correctly reported in `unsupported` on the others.

### New Features

- **New collection operators.** A batch of higher-order and structural
  collection operators (see the
  [Collections reference](/compute-engine/reference/collections/)):
  - **Quantifiers** — `Any(xs, predicate?)` and `All(xs, predicate?)` test
    whether some or every element satisfies a predicate (the elements
    themselves, treated as booleans, when no predicate is given). Both
    short-circuit, so they return a definite answer even on infinite
    collections, and stay symbolic when the result depends on undetermined
    elements. `Any([])` is `False`, `All([])` is `True`.
  - **Cumulative** — `Scan(xs, f, initial?)` is the running fold (same length as
    the input: `Scan([1, 2, 3, 4], Add)` → `[1, 3, 6, 10]`), and
    `Differences(xs)` gives the successive differences (length `n − 1`, computed
    exactly).
  - **Prefix/suffix** — `TakeWhile(xs, predicate)` and
    `DropWhile(xs, predicate)` take or drop leading elements while the predicate
    holds; both are lazy and compose with infinite collections.
  - **Mapping** — `FlatMap(xs, f)` maps `f` over `xs` and splices
    collection-valued results into a single list (a scalar result is kept as a
    single element).
  - **Extrema** — `MaxBy(xs, f)` / `MinBy(xs, f)` return the _element_ with the
    largest/smallest key `f(x)`; `ArgMax(xs, f?)` / `ArgMin(xs, f?)` return its
    1-based _index_. The first occurrence wins ties, and all stay symbolic on
    empty or infinite collections.
  - **Grouping** — `ChunkBy(xs, f)` splits into maximal runs of consecutive
    elements sharing the same key `f(x)`; `Dedup(xs)` collapses consecutive
    duplicates only (contrast `Unique`, which removes all duplicates).
  - **Functional element updates** — `Insert(xs, index, value)`,
    `DeleteAt(xs, index)`, and `ReplaceAt(xs, index, value)` return a new list
    with an element inserted, removed, or replaced at a 1-based index. Negative
    indexes count from the end (Elixir-style); `Insert` at `-1` or `n + 1`
    appends.
- **`Map` is now variadic.** `Map(xs, ys, …, f)` applies `f` element-wise across
  several collections (a `zipWith`), truncating to the shortest input; the
  function is always the last argument
  (`Map([1, 2, 3], [10, 20, 30], (x, y) ↦ x + y)` → `[11, 22, 33]`).
- **`Sort` accepts a one-argument key function.** In addition to a two-argument
  comparator, `Sort(xs, f)` with a unary `f` sorts ascending by the key `f(x)`
  (stable on ties), discriminated from a comparator by arity.
- **`Flatten` accepts an optional depth.** `Flatten(xs, depth)` flattens only
  `depth` levels of nesting; without it, the collection is fully flattened
  (`Flatten([[1, [2]], [3]], 1)` → `[1, [2], 3]`).
- **More collection operators compile on the `javascript` target.**
  - **`Reduce` accepts a custom combiner**: a `Function` literal
    (`Reduce([1, 2, 3], (a, b) \mapsto a + 2b, 0)` → `12`), a user-defined
    function symbol, or an operator symbol such as `Subtract` — previously only
    the `Add`/`Multiply`/`Min`/`Max` folds compiled. A custom combiner requires
    an explicit initial value (without one the interpreter folds from `Nothing`,
    which has no numeric equivalent — that form still fails closed). **`Fold`**,
    which canonicalizes to `Reduce`, now compiles too.
  - **`Tabulate`** (1-D and 2-D) and **`Fill`** compile to native array
    construction with 1-based indexes — and therefore **`Table`**, in both its
    alias and Mathematica-style iterator forms. Compiling is the natural fast
    path for materializing these now-lazy collections.
  - **`CountIf`, `Find`, `IndexWhere`, `Position`** compile their predicate
    lambda to native array operations, with the interpreter's conventions
    preserved: 1-based indexes, `IndexWhere` → `0` and `Find` → `NaN` (`Nothing`
    projected onto a real target) when no element matches.
  - **`Append`, `Most`, `Slice`, `IsEmpty`, `Count`, `Contains`, `Unique`,
    `RotateLeft`/`RotateRight`, `Zip`, `Linspace`, `Chunk`, `Partition` (integer
    and predicate forms), `Ordering`, and `Shuffle`** compile to native array
    operations, each verified element-for-element against the interpreter
    (1-based inclusive `Slice` with negative-from-end indexes, rotation shift
    normalized modulo the length, `Chunk`/`Partition` producing `k` chunks of
    `⌈len/k⌉`, stable `Ordering` ties, `Zip` truncating to the shortest input,
    `Linspace` including both endpoints). Non-finite runtime counts/indexes fall
    back to the interpreter's defaults instead of crashing or silently
    diverging, and `Shuffle` honors the engine's `randomSeed` (a deterministic,
    reproducible permutation, like `Random`). Forms with no numeric equivalent
    on the target fail closed: a custom `Ordering` function, the explicit-seed
    `Shuffle` form, statically non-positive `Chunk`/`Partition` counts, and
    `Contains`/`Unique` over compound (nested-list, tuple, complex) elements,
    whose JS equality is referential rather than structural.
  - **`Any`, `All`, `TakeWhile`, `DropWhile`, `FlatMap`, and `Scan`** compile
    (predicate/mapping lambdas → native `some`/`every`/`flatMap` and slices;
    `Scan` is the running fold, with the initial value not emitted and the
    seedless form emitting the first element as-is, matching the interpreter).
- **Core scalar operators compile on the `javascript` target:** `Boole` (Iverson
  bracket, with the same runtime boolean guard as `Which`/`When`),
  `KroneckerDelta` (n-ary, tolerance-aware like compiled `Equal`),
  `Element(x, list)` membership, `Identity`, and `Apply` of a function literal.
- **Linear algebra compiles on the `javascript` target** (closing the parity gap
  with the `python` target): `Dot` and `MatrixMultiply` (with the interpreter's
  dimensionality dispatch — vector·vector → scalar, matrix·vector → vector,
  matrix·matrix → matrix), `Cross`, `Norm` (scalar, 2-/Frobenius, and p-norms),
  `Transpose`, `Determinant`, `Inverse` (singular → `NaN`), `Trace`, `Flatten`
  (with optional depth), `Shape`, and `Reshape` (with the interpreter's cyclic
  padding).
- **The `python` compilation target now covers collections and function
  literals.** `Function` literals compile to Python lambdas, and the collection
  operators above (list access/slicing, `Map`/`Filter` and the other
  higher-order operators, `Reduce`/`Scan`, `Tabulate`/`Fill`, `Linspace`, `Zip`,
  `Ordering`, plus `Flatten`/`Shape`/`Reshape`/`Trace` via NumPy) emit Python
  with the same interpreter-verified semantics, validated by executing the
  emitted code (venv-gated parity suite). Also fixed: **compiled `Range` was off
  by one on the Python target** — `np.arange` excludes the stop value and is
  0-based in the one-argument form, so `Range(2, 6)` compiled to `[2..5]` and
  `Range(5)` to `[0..4]`; CE `Range` is inclusive and 1-based.
- **Compiled `Range` with no explicit step now auto-descends** on both targets,
  like the interpreter: `Range(5, 1)` → `[5,4,3,2,1]` and `Range(-2)` →
  `[1,0,-1,-2]` previously compiled to `[]` on the JavaScript target (the
  implicit step was a fixed +1).

## 0.80.0 _2026-07-16_

### New Features

- **Custom per-operator compilation handler.** An `OperatorDefinition` can now
  supply a `compile` handler —
  `(args, compile, { language }) => string | undefined` — that emits
  target-language source for a call to that operator. It mirrors a built-in
  compiled-function handler (recursively `compile` operands, branch on
  `language` for `javascript`/`glsl`/`wgsl`/`python`) and **takes precedence
  over the target's built-in mapping**, so a consumer can override how even a
  built-in operator compiles (e.g. a custom-tolerance `GCD`), or add compilation
  for an operator the target doesn't know. Returning `undefined` falls back to
  the default compilation. This replaces the never-wired, interpreter-only
  `xcompile` stub. See `OperatorCompileHandler`.
- **`ElementMax`, `ElementMin` — element-wise (broadcasting) maximum and
  minimum** (the NumPy `maximum`/`minimum` primitive). Unlike `Max`/`Min`, which
  _reduce_ all operands — including a collection's elements — to a single
  scalar, these broadcast: a scalar over a collection returns a collection of
  the per-element extremum (`ElementMax(0, [1, -2, 3])` → `[1, 0, 3]`),
  collections zip, and all-scalar arguments give a scalar. They are **variadic**
  (two or more arguments): `ElementMax(0, [1, -2, 3], 2)` → `[2, 2, 3]`.
  Exactness is preserved (`ElementMax(√2, 1)` → `√2`). They compile on every
  target: `javascript` (all-scalar → a direct call, a collection operand → a
  `_SYS.bcast`), `interval-js` (interval max/min — restoring break detection),
  `glsl`/`wgsl` (native `max`/`min`), and `python` (`np.maximum`/`np.minimum`).
- **`Clamp(x, lo, hi)` — clamp a value to a range** (`min(max(x, lo), hi)`),
  also broadcasting over collection arguments (`Clamp([-1, 0.5, 2], 0, 1)` →
  `[0, 0.5, 1]`). Compiles on all targets, including the native `clamp` on
  `glsl`/`wgsl` and `np.clip` on `python`.

### Resolved Issues

- **`GCD`/`LCM` now evaluate on non-integer real arguments.** `\gcd(2.25, 2.1)`
  and `\operatorname{lcm}(2.5, 1.5)` previously stayed symbolic (and compiled to
  `NaN`, blanking any plot that used them); they now fold via a tolerant
  floating Euclidean algorithm — the standard "float GCD" that terminates when a
  remainder falls below `ε · max(|a|, |b|)` (`ε = 1e-6`). This honors the
  exactness contract: an inexact (float) argument numericizes, like `\cos(5.1)`,
  while integer and exact-rational operands keep their exact (`\gcd(4, 6) → 2`)
  and symbolic (`\gcd(9/4, 21/10)` under `evaluate()`, `0.15` under `.N()`)
  behavior. The compiled `javascript`, `glsl`, and `wgsl` targets fold reals the
  same way (the GPU `_gpu_gcd` cutoff was integer-tuned and is now
  scale-relative). The tolerance is deliberately its own constant, not the
  engine's numeric tolerance — float-commensurability is a much looser notion,
  and the value that reproduces a given renderer's output is a consumer choice.
  (Requested by the Tycho/Graph Paper team for expressions such as
  `r ≤ gcd(θ², θ + a)`.)
- **`GCD`/`LCM` reduce a finite collection argument.** `\gcd([12, 18, 24])` →
  `6` and `\operatorname{lcm}([4, 6])` → `12` (a list argument is folded over
  its elements); previously the whole call stayed symbolic even for integers.
  Mixed list-and-scalar arguments (`GCD([12, 18], 8)` → `2`) and lists of reals
  are handled; an infinite or enumeration-declined collection stays symbolic
  rather than grinding to the evaluation deadline.
- **`Max`/`Min` of a scalar and a collection no longer mis-compiles to `NaN`.**
  `Max(0, [1, -2, 3])` evaluates to `3` (the reduction folds the collection's
  elements), but on the JavaScript target it compiled to `Math.max(0, [1,-2,3])`
  — passing an array as an argument — and returned `NaN` at run time. It now
  folds the scalar and every collection's elements into a single reduction,
  matching `evaluate()`. (Surfaced by the Tycho/Graph Paper team's `max(0, …)`
  plot expressions.)
- **`Max`/`Min` compile correctly on the `python` target.** They were mapped to
  the element-wise, strictly-binary `np.maximum`/`np.minimum`, so a collection
  operand was mis-reduced (`Max(0, [1,2,3])` → `[1,2,3]` instead of `3`) and a
  single-list or n-ary call errored at run time. `Max`/`Min` now reduce a
  collection operand with `np.max`/`np.min` and combine the per-operand results
  element-wise (keeping a scalar/array operand — e.g. the plot variable —
  vectorized), matching `evaluate()` and the JavaScript target.
- **`At(base, index)` serialization now parenthesizes a compound base.**
  `At(x+1, 2)` serialized to `x+1_2` (subscript) / `x+1[2]` (bracket index
  style) — the index bound only to the trailing operand, dropping the base
  grouping so the LaTeX re-parsed to something other than element access. A base
  whose precedence falls below the postfix index operator is now wrapped:
  `(x+1)_2` / `(x+1)[2]`. Symbol and function-application bases (`v_1`,
  `H(x, y)[1]`) are unchanged. (Serialization round-trip reported by the
  Tycho/Graph Paper team. The default subscript index style is unchanged;
  programming-style bracket output — which re-parses to `At` independent of the
  base's declared type — remains available via `indexStyle: () => 'bracket'`.)

### Collections

- **A list comprehension is now a lazy collection: `evaluate()` no longer walks
  its whole domain.** A `Comprehension` (`[body \operatorname{for} i=…]`)
  behaves like `Range`/`Map` — `evaluate()` returns the comprehension itself,
  and its collection type, `.count`, and emptiness are reported from the
  iterator-clause counts without enumerating a single element. Elements are
  materialized only when actually consumed (a positive `at(n)` walks just the
  first `n`); indexing, iteration, and aggregation (`Sum`, `Length`, `At`,
  `Take`, `Map`, …) are unchanged. Binding an unread comprehension to a name is
  therefore ~O(1) instead of materializing its whole domain up front — e.g. 25
  dead 225-element weight tables dropped from ~6 s to negligible. (Reported by
  the Tycho/Graph Paper team.)
- **A bracket comprehension parses to the comprehension itself, not a
  one-element `List` wrapping it.** `[body \operatorname{for} i=…]` previously
  produced `["List", ["Comprehension", …]]`, which reported `count: 1` and
  mis-indexed (`W[3]` → `NaN`); it now returns the `Comprehension` directly,
  mirroring the `Range`/`Linspace` bracket passthrough. (Reported by the
  Tycho/Graph Paper team.)
- **`Tabulate` (and its `Table` alias) is now a lazy indexed collection.**
  `evaluate()` returns the `Tabulate` itself rather than building the whole
  array; `.count` is the outer dimension and an element is computed by applying
  the function only when indexed or iterated. A `Tabulate(f, 1_000_000)` that is
  bound but unread is now O(1) instead of hanging while it builds a
  million-element list. The Mathematica-style `Table(i^2, {i, 1, n})` inherits
  this (it canonicalizes to `Tabulate`).
- **`Permutations` and `Combinations` are now lazy collections with closed-form
  counts.** `Permutations(xs, k?)` and `Combinations(xs, k)` no longer
  materialize their factorially-many elements to be bound, counted, or indexed:
  `.count` is `P(n, k)` / `C(n, k)` computed directly (previously `Permutations`
  of a 9-element list took ~33 s just to answer `.count`), elements stream from
  the iterator, and `at(n)` walks only as far as needed.

### Compilation

- **A user-defined function passed as a higher-order operand now compiles by
  reference.** Compiling `Map(list, f)` / `Filter(list, f)` — where `f` is a
  function declared on the engine (`f(x) := …`, `x ↦ …`) rather than an inline
  lambda — previously emitted a dangling `_.f` and threw at run time. The
  function operand now resolves to the same shared local (`_fn_f`) the call-site
  path already emitted, so a user function used as a first-class value works
  wherever it is referenced, not only when it is called. Its `freeSymbols` are
  computed from the operand function's body (so a free symbol used only inside
  `f` is reported), and inline-lambda operands are unaffected. (Reported by the
  Tycho/Graph Paper team.)

### API

- **`BoxedOperatorDefinition.lambda` exposes a user-defined function's body and
  parameters.** `ce.lookupDefinition(name).operator.lambda` returns
  `{ parameters, body }` — the parameter names/types and the body as a boxed
  expression — for a definition created from a function literal (`f(x) := …`,
  `x ↦ …`, `ce.assign('f', lambda)`), or `undefined` for a built-in operator.
  This is a supported, stable accessor over the internal `_lambdaLiteral`,
  letting a consumer traverse or resolve a function reference structurally
  without re-parsing or textually inlining its source. (Requested by the
  Tycho/Graph Paper team.)

## 0.79.3 _2026-07-15_

### Parsing

- **A number-valued symbol juxtaposed with a parenthesized collection now parses
  as multiplication, not a function application.** When a symbol known to be a
  non-function value — declared with a numeric type or assigned a value — was
  juxtaposed against `(…)` whose body referenced a collection (e.g. `k(\cos(S))`
  with `k` a number and `S` a bound list), it parsed as `k` _applied_ to the
  body — an illegal application of a number, yielding `NaN` — instead of
  `k\cdot\cos(S)`. The single-argument invisible-operator rule only treated a
  scalar-numeric argument as multiplication; a collection-typed argument fell
  through to the function-call heuristic even when the leading symbol could not
  be a function. Such a symbol now scales over the argument, matching the
  scalar-argument and multi-operand cases. An undeclared or unknown-typed symbol
  stays ambiguous and keeps the `f(x)` function-application default. (Reported
  by the Tycho/Graph Paper team.)

- **Parsing a call no longer un-assigns a bare-symbol argument.** Parsing an
  application like `f(S)` runs argument-type inference on each operand. When the
  callee's parameter type was `unknown` or `any` and the argument symbol had
  been declared `unknown` and assigned a value, inference computed `unknown` (a
  no-op narrowing) and wrote it back to the symbol's type — and the
  value-definition type setter discards the held value whenever the type is set
  to `unknown`. So merely _parsing_ `f(S)` (no `evaluate`/`N`) silently cleared
  `S`'s assigned value, leaving it unbound and every dependent expression `NaN`.
  Inferring `unknown` adds no information, so it is now skipped entirely and
  never overwrites an existing binding; inference of a concrete parameter type
  still narrows an open argument as before. (Reported by the Tycho/Graph Paper
  team.)

### Collections

- **The `.x`/`.y`/`.z` point-coordinate accessors now broadcast over a list of
  points.** They previously parsed to `First`/`Second`/`Third` — the collection
  element-indexing operators. On a single point that is correct (`(3,4).x` = 3,
  since the first element of a 2-tuple is its x-coordinate), but on a _list of
  points_ the two diverge: `[(1,2),(3,4),(5,6)].x` returned the first _point_
  `(1,2)` instead of the list of x-coordinates `[1,3,5]`. The accessors now
  parse to dedicated `PointX`/`PointY`/`PointZ` operators that extract a
  coordinate and map element-wise over a list of points (matching the threadable
  `.real`/`.imag` accessors), while a single point still returns the scalar
  coordinate. `First`/`Second`/`Third` are unchanged and continue to index a
  collection. The new operators broadcast on the `javascript` compile target
  (`L.x` → `(L).map((p) => p[0])`) and, for a single point, swizzle on the GPU
  target as before. (Reported by the Tycho/Graph Paper team.)

### Compilation

- **Element-wise (scalar↔list) arithmetic now broadcasts on the `javascript`
  compile target.** An arithmetic or element-wise math operator applied to a
  list-valued operand — `x - L`, `2L`, `L^2`, `-L`, `\sin(L)`, `\sqrt{L}`, or
  two lists `L + M` — previously compiled to scalar JavaScript that returned
  garbage (`-_.L + _.x` → `NaN`) behind a `success: true`, unless an operand was
  a _concrete_ collection at compile time (which failed closed). A symbolic
  list-valued **parameter** (bound at run time — the normal compile case)
  slipped through entirely. These now compile to a `_SYS.bcast` runtime helper
  that maps the operator element-wise, matching the interpreter's broadcasting:
  scalars are reused for every element, two lists zip to the shorter length, and
  nested lists (matrices) recurse. The pure-scalar fast path is unchanged. A
  **complex**-valued list still has no coverage and now fails closed correctly
  (`success: false` → interpreter fallback) instead of silently returning
  garbage. Combined with the `.x`/`.y` point-broadcast change above, a compiled
  expression such as `\min((x - V.x)^2 + (y - V.y)^2)` over a list of points `V`
  now evaluates correctly. (Reported by the Tycho/Graph Paper team.)

## 0.79.2 _2026-07-15_

### Compilation

- **The collection form of `Sum`, `Product`, `Max`, and `Min` now compiles on
  the `javascript` target.** Applied to a collection with no indexing set — e.g.
  `[3,4,5].\operatorname{total}` (which canonicalizes to `Sum([3,4,5])`), a list
  product, or `\max(v)` for a list `v` — these previously threw
  `Sum: no indexing set` (dropping the whole expression to interpretation) or,
  for `Max`/`Min`, compiled to `Math.max([…])` and returned `NaN`. They now
  lower to a native `.reduce`, with empty-collection identities matching the
  interpreter (`Sum([]) = 0`, `Product([]) = 1`, `Max([]) = -\infty`,
  `Min([]) = +\infty`). This lets a compiled list comprehension whose body uses
  `.total`/`.count`/`\min`/`\max` compile end-to-end into a loop instead of
  falling back. The indexing-set forms (`\sum_{n=1}^{5}`) and the scalar
  variadic `\max(a,b,c)` are unchanged; a non-collection operand still fails
  closed. (Reported by the Tycho/Graph Paper team.)
- **List-shaped collection operators now compile on the `javascript` target.**
  `Last`, `Rest`, `Take`, `Drop`, `Join`, `Reverse`, `Sort`, `IndexOf`, `Map`,
  and `Filter` previously fell back to interpretation (`Unknown operator`); they
  now lower to native array operations (`.slice`, `.reverse`, `.sort`,
  `.indexOf`, `.map`, `.filter`, …). `Take`/`Drop` clamp a negative count to
  match the interpreter (`Take(xs, -2) = []`, `Drop(xs, -2) = xs`); `Reverse`
  and `Sort` copy first so the source is not mutated; `Sort` compiles the
  default ascending numeric order (a custom comparator fails closed); `IndexOf`
  is 1-based (0 when absent); `Map`/`Filter` compile their lambda operand. A
  non-indexed-collection operand fails closed. (Requested by the Tycho/Graph
  Paper team.)

### Evaluation

- **`IndexOf` / `IndexWhere` now work on a tensor-backed list.** A rectangular
  numeric list is represented as a `BoxedTensor`, which inherited the abstract
  no-op `indexWhere` and so made `IndexOf`/`IndexWhere` always return `0` (not
  found) even for a present element. The base `indexWhere` now scans any finite
  indexed collection for the 1-based index of the first match.

### Serialization

- **`Mod` (`\bmod`) parenthesizes compound operands so its LaTeX round-trips.**
  Infix `\bmod` binds tighter than `+`/`-` on re-parse, so `Mod(x+5, 2\pi)`
  serialized to `x+5\bmod2\pi` and re-parsed as `x + (5 \bmod 2\pi)`. An operand
  at addition precedence is now wrapped — `(x+5)\bmod2\pi` — while juxtaposition
  products (`3k`, `2\pi`), fractions, powers, and negation stay unwrapped since
  they already re-parse as tight units. A left-nested `Mod` is also now
  parenthesized (`\bmod` is right-associative, so `Mod(Mod(a,b),c)` →
  `(a\bmod b)\bmod c`). (Reported by the Tycho/Graph Paper team.)

### Parsing

- **Juxtaposition of a collection-typed symbol with a function call parses as
  multiplication.** A symbol declared with an abstract `indexed_collection` or
  `collection` type but not yet assigned a value — e.g. `y_r` in `y_r\sin(a)` —
  grouped into a `Tuple` instead of a `Multiply`, even though its concrete
  subtypes (`list`, `vector`, `matrix`, numeric `tuple`) and the assigned-value
  case already multiplied. The abstract collection type now scales like its
  subtypes; non-indexed `set` and heterogeneous `tuple` operands still group as
  a `Tuple`. (Reported by the Tycho/Graph Paper team.)

## 0.79.1 _2026-07-15_

### Evaluation

- **`ce.timeLimit` is now enforced during symbolic integration and rule
  matching.** Extends the 0.79.0 expression-tree-growth checkpoint to two paths
  that previously ran unbounded: the multinomial expansion of a power of a sum
  (`expandPower`) and the rule-set scan (`matchAnyRules`). The worst case is
  compiling a definite integral of a high-power integrand — e.g.
  `\int_{-15}^{15} (2 + \sin(3y) + \cos(\pi^2 y))^p\,dy`: the compiler's
  antiderivative-first attempt expands `(trinomial)^p` into a multinomial with
  `C(p+2, 2)` terms (≈ 6·10⁴ at `p=350`) and matches the integration rule set
  against it (~100 ms per rule), neither of which hit the per-node checkpoint,
  so compilation stalled for many seconds (or hung outright) instead of honoring
  the deadline. Both paths now cooperatively check the deadline, so a hard
  integrand degrades to Gauss–Kronrod quadrature at `ce.timeLimit` (default 2 s)
  as intended, and a bare `evaluate()` of such an integral throws a catchable
  `CancellationError` (`cause: 'timeout'`) rather than running unbounded.
  (Reported by the Tycho/Graph Paper team.)

## 0.79.0 _2026-07-14_

### Evaluation

- **`ce.timeLimit` is now enforced during expression-tree growth.** The
  evaluation deadline was only checked inside specific loops (collection
  enumeration, polynomial GCD, …), so an evaluation whose cost is dominated by
  expression construction never hit a checkpoint. The worst case is a nested
  user-function chain whose body references a parameter several times — e.g. a
  symbolic Newton iteration `s(y, x_p) := \frac{y - f(x_p)}{f'(x_p)} + x_p`
  applied as `s(y, s(y, … s(y, x_0)))` — which grows the result ×4 per nesting
  level: at depth 15 it previously exhausted an 8 GB heap without ever honoring
  `timeLimit`. A cooperative checkpoint on the per-node evaluation path now
  cancels such evaluations at the deadline with a catchable `CancellationError`
  (`cause: 'timeout'`), e.g. at the default 2 s limit the depth-15 chain aborts
  using < 60 MB. Numeric chains (each level folds to a number) are unaffected
  and remain fast. Note: long-running evaluations that previously _completed_
  after exceeding `timeLimit` now throw — raise `ce.timeLimit` (or set it to `0`
  for no limit) if you rely on multi-second symbolic evaluations.

### Library and Definitions

- **`ce.searchDefinitions()` now treats the query as OR-ed keywords.**
  Previously a multi-word query only matched definitions containing _every_
  word, so keyword-bag queries like `"floor quotient integer division"` returned
  nothing. Any matching word now suffices, and results are ranked by how many
  words they match and how exactly (identifier match, then trigger or curated
  keyword, then description). The query may also be an array of strings —
  `ce.searchDefinitions(['gcd', 'least common multiple'])` — with each element
  treated as an OR-ed alternative.

### Solving

- **`Solve` accepts Mathematica-style constraint systems.** The first argument
  may now bundle domain constraints together with the equation —
  `\mathrm{Solve}(\{100a+10b+c=11(a^2+b^2+c^2), a\in\{1,\dots,9\}, b\in\{0,\dots,9\}, c\in\{0,\dots,9\}\}, \{a,b,c\})`
  → `[(5, 5, 0), (8, 0, 3)]`. `Element` items inside a `Set`/`List`/`And` first
  operand are lifted into per-variable domain specs (equivalent to passing
  `a \in D` as separate spec arguments), the remaining items form the
  equation/system, and a variable list written as a set (`\{a,b,c\}`) is
  accepted alongside the existing `[a,b,c]` list form. The variable list may be
  omitted entirely when the bundled constraints name the unknowns:
  `Solve(\{eq, a\in\{1,\dots,9\}, …\})` solves for the constrained symbols in
  constraint order. A constraint for a variable that already carries a
  spec-position domain is merged conjunctively (both must hold), and a
  constraint naming a symbol absent from an explicit variable list leaves the
  expression unevaluated rather than guessing. A system of equations given as a
  `Set` (or `And`) now also solves like the equivalent `List`.
- **Trailing domain argument: `Solve(eq, x, \mathbb{Z})`.** A trailing set
  constant (`Integers`, `RealNumbers`, …) after the unknowns applies as the
  domain of every unknown, Mathematica-style:
  `\mathrm{Solve}(x^2=4, x, \mathbb{Z})` → `[2, -2]`. Unknowns that already
  carry an explicit `Element` domain keep it. Over an unbounded integer domain a
  _polynomial_ equation with no integer roots now decides `[]`
  (`\mathrm{Solve}(2x=3, x, \mathbb{Z})`,
  `\mathrm{Solve}(x^2=2, x, \mathbb{Z})`) instead of staying unevaluated;
  non-polynomial equations stay inert rather than risk over-claiming "no
  solutions" from a partial root set.
- **Inequality side conditions in constraint sets.** A relational or boolean
  predicate bundled in the first argument restricts the solution set instead of
  being mistaken for an equation: `\mathrm{Solve}(\{x^2=4, x>0\}, x)` → `[2]`
  (previously returned the incorrect `[]`), and a multi-variable condition
  filters candidate tuples —
  `\mathrm{Solve}(\{a+b=5, a\in\{0,\dots,5\}, b\in\{0,\dots,5\}, a<b\}, \{a,b\})`
  → `[(0, 5), (1, 4), (2, 3)]`. Filtering is conservative (a candidate is
  dropped only when a condition is definitely `False`) and applies across the
  symbolic, diophantine-fallback, and enumeration paths. A constraint set
  containing only predicates solves them directly by enumeration over the domain
  (`\mathrm{Solve}(\{x \equiv 2 \pmod 5, x\in\{1,\dots,20\}\}, x)` →
  `[2, 7, 12, 17]`).

### Mathematica-Style Operator Forms

- **Iterator triples: `\{i, lo, hi\}` and `\{i, lo, hi, step\}`.** The
  Mathematica iterator spec is now recognized in the iterator/bounds slot of
  `Sum`, `Product`, `Integrate` and `D`: `\mathrm{Sum}(i^2, \{i, 1, 10\})` →
  `385`, `\mathrm{Sum}(i, \{i, 0, 10, 2\})` → `30`,
  `\mathrm{Integrate}(x^2, \{x, 0, 1\})` → `1/3` (the bounds were previously
  silently dropped, yielding an indefinite integral), and
  `\mathrm{D}(f, \{x, n\})` is the n-th derivative. Symbolic bounds work
  (`\mathrm{Sum}(k, \{k, 1, n\})` ≡ `\sum_{k=1}^n k`). The interpretation is
  strictly positional — a brace set anywhere else keeps its literal set meaning
  — and operates on held (raw) operands, so the index symbol is scoped like a
  binder (an `i` index does not collapse to the imaginary unit).
- **New `Table` operator, an alias for `Tabulate`.**
  `\mathrm{Table}(i^2, \{i, 1, 5\})` → `[1, 4, 9, 16, 25]`, with general
  iterator bounds and step (`\mathrm{Table}(i, \{i, 0, 10, 2\})` →
  `[0, 2, 4, 6, 8, 10]`) and multiple iterator specs for nested dimensions
  (`\mathrm{Table}(i j, \{i, 1, 2\}, \{j, 1, 3\})` → `[[1,2,3],[2,4,6]]`, first
  spec outermost). `\{v, 1, n\}` specs canonicalize directly to `Tabulate`;
  general bounds map to `Map` over `Range`. `Tabulate` also gained the `table`
  search keyword so `ce.searchDefinitions('table')` finds it.
- **`\mathrm{D}(f, x)` differentiation.** Applied to an argument list,
  `\mathrm{D}` / `\operatorname{D}` is the derivative operator:
  `\mathrm{D}(x^3, x)` → `3x^2`, `\mathrm{D}(x^2 y, x, y)` takes sequential
  partials. The bare forms keep their previous meanings (`\mathrm{D}` is the
  upright-D glyph symbol; `\operatorname{D}` remains usable as a pipeline stage,
  `x^2 \rhd \operatorname{D}` → `2x`).
- **`Limit(f, x \to x_0)` rule-arrow form.**
  `\mathrm{Limit}(\frac{\sin x}{x}, x\to 0)` → `1`, equivalent to
  `\lim_{x\to 0}`. One-sided arrows carry the direction:
  `\mathrm{Limit}(\frac{1}{x}, x\to 0^+)` → `+∞`.
- **`Simplify(expr, assumptions)`.** An optional second argument supplies one or
  more boolean assumptions (a bare predicate, or a `List`/`And` of them) that
  hold only for the duration of the simplification:
  `\mathrm{Simplify}(\sqrt{x^2}, x>0)` → `x`, `\mathrm{Simplify}(|x|, x<0)` →
  `-x`.
- **New `ReplaceAll` operator.** `\mathrm{ReplaceAll}(x^2+x, x\to 2)` → `6`
  (Mathematica `expr /. rules`). Rules are `lhs \to rhs` (or `Rule(lhs, rhs)`),
  given as extra arguments or bundled in a set/list:
  `\mathrm{ReplaceAll}(x+y, \{x\to 1, y\to 2\})` → `3`. Symbol rules are applied
  simultaneously in a single pass; non-symbol left-hand sides use the
  pattern-rule machinery. The result is evaluated after substitution.
- **Tuple membership distributes: `(a,b) \in \mathbb{Z}`.** Membership of a
  tuple of symbols in a scalar (number-element) collection now distributes to a
  conjunction — `Element(a, Integers) ∧ Element(b, Integers)` — instead of
  evaluating to `False`. Value tuples against product sets are unaffected.

### LaTeX Parsing

- **One-sided limits: `\lim_{x\to 0^+}` and `\lim_{x\to 0^-}`.** The `^+`/`^-`
  direction marker on a limit point was previously captured by the generic
  superscript entries as `PseudoInverse(0)` / `Superminus(0)`, making every
  one-sided limit unevaluatable. The marker now maps to `Limit`'s direction
  operand (`["Limit", f, 0, 1]` / `…, -1]`), which the limit evaluator already
  supported: `\lim_{x\to 0^+} \frac{1}{x}` → `+∞`, `\lim_{x\to 0^-} \frac{1}{x}`
  → `-∞`, `\lim_{x\to 0^+} \ln x` → `-∞`. Directions serialize back as
  `^{+}`/`^{-}` (round-trip), symbolic points (`\lim_{x\to a^+}`) keep a correct
  representation, and superscript `+`/`-` everywhere else (`A^+` pseudoinverse,
  `3^-` signed value) is unaffected.
- **`\mapsto` lambda bodies extend through comparisons.** `n \mapsto n > 102`
  now parses as `n \mapsto (n > 102)` — previously the body closed at the
  comparison, mis-parsing as `(n \mapsto n) > 102`, which made unparenthesized
  predicates like `\mathrm{Filter}(\mathrm{Range}(100,105), n \mapsto n > 102)`
  fail. The body now extends through comparisons and logical connectives
  (`n \mapsto n > 2 \wedge n < 5`), stopping at the comma/sequence level, so a
  lambda in an argument list still does not swallow the following argument.
- **Ellipsis ranges in set braces.** `\{1,\dots,9\}` now parses to
  `["Range", 1, 9]`, matching the existing bracket form
  `\lbrack1,\dots,9\rbrack`; the stepped form `\{0, 2, \dots, 10\}` yields
  `["Range", 0, 10, 2]`. Previously the ellipsis was kept as a literal
  placeholder element (`["Set", 1, "ContinuationPlaceholder", 9]`), which made
  `a \in \{1,\dots,9\}` unusable as a domain. Enumerated sets of non-numeric or
  non-progression elements (`\{a, b, c\}`, `\{1, 2, 3\}`) are unaffected.

### Performance

- **`Interpret` no longer spends ~13 s rejecting a non-polynomial sequence.**
  Interpreting a continuation such as `1 + 1 + 2 + 3 + 5 + 8 + \dots + 55`
  (Fibonacci) first tries the polynomial recognizer, which fits a degree-5
  interpolant through the samples and searches for the index where it reaches
  the anchor. That interpolant has a negative leading coefficient, so it
  eventually decreases — but the search's overshoot test used the sample trend
  ("increasing"), which never fired, so it ground through all 100 000 candidate
  indices before falling through to the recurrence recognizer. The search now
  stops on the interpolant's _local_ trend (a polynomial is eventually
  monotonic, so once it is past the anchor and still diverging it cannot
  return), cutting this interpretation from ~13 s to a few milliseconds.
  Legitimate polynomial sums (triangular numbers, squares) are unaffected.

### Calculus

- **Improper integrals of `polynomial × exp-decay` no longer return `NaN`.** A
  definite integral to `±∞` whose antiderivative carries a term like
  `y^2 e^{-y}` was evaluated at the infinite bound by naive substitution,
  producing an `∞·0` indeterminate that collapsed to `NaN` — so
  `\int_0^\infty y^2 e^{-y}\,dy` (which is `\Gamma(3) = 2`) returned `NaN`. Such
  an endpoint is now resolved as the limit `\lim_{y\to\infty} F(y)` (exponential
  decay dominates polynomial growth), giving the exact closed form (`2`); with
  the Rubi integration rules loaded the same fix closes the χ²-tail
  `\int_x^\infty y^{3/2} e^{-y/2}\,dy` to `3\sqrt{2\pi} - F(x)`. An endpoint
  that still cannot be resolved keeps the integral inert (so `N()` quadrature
  applies) rather than leaking `NaN`.
- **`Limit` at infinity resolves `Erf`/`Erfc` and `\sqrt{}`/`\sqrt[n]{}`.**
  `\lim_{x\to\infty}\operatorname{erf}(x) = 1`,
  `\lim_{x\to-\infty}\operatorname{erf}(x) = -1`, `\operatorname{erfc}`
  saturating to `0`/`2`, and `\lim_{x\to\infty}\sqrt{x} = +\infty` (likewise
  `\sqrt[n]{x}`) were previously left unevaluated. Besides being correct in
  their own right, these fill the gaps behind the improper-integral endpoints
  above — an antiderivative's `\operatorname{erf}(\sqrt{y})` term needs both.
- **The upper incomplete gamma reduces at infinity: `\Gamma(s, +\infty) = 0`.**
  The tail `\int_{+\infty}^\infty t^{s-1} e^{-t}\,dt` vanishes for any finite
  `s` (the `e^{-t}` factor dominates), so `\Gamma(s, \infty)` — including
  symbolic `s` such as `\Gamma(\frac{k}{2}, \infty)` — now evaluates to `0`
  instead of staying inert (a provably infinite first argument stays symbolic).
  This closes the free-parameter χ²-tail antiderivative
  `\int_x^\infty y^{\frac{k}{2}-1} e^{-\frac{y}{2}}\,dy` to a form free of the
  leftover `\Gamma(\cdot, \infty)` term.
- **A rational integrand with fully symbolic coefficients no longer hangs.**
  `\int_0^x \frac{u-a}{b_2 u^2 + b_1 u + b_0}\,du` spun for ~109 s (ignoring a 3
  s `timeLimit`) inside the polynomial-GCD used to cancel common factors: its
  Euclidean loop divided by a symbolic constant, which produced a spurious
  nonzero constant remainder that never tested as zero, so the loop iterated
  forever building ever-larger coefficient expressions. A nonzero constant
  remainder now correctly resolves the GCD to `1` (coprime over the coefficient
  field), and the loop carries a deadline checkpoint as a backstop. The integral
  closes in ~200 ms (to an `ArcTanh`/`Ln` form with the Rubi rules loaded);
  `polynomialGCD` of coprime symbolic polynomials returns `1` instead of
  spinning.

### Compilation

- **Compiled definite integrals now resolve symbolically before falling back to
  quadrature.** `compile()` of an expression containing a definite `Integrate`
  first attempts a closed form (the same antiderivative machinery `evaluate()`
  uses); if one is found, the generated code is straight-line arithmetic rather
  than a per-call numerical integration. A plotted
  `\int_0^x 0.1\sqrt{1+t^2}\,dt` compiles to its closed form
  `0.05\,(x\sqrt{1+x^2} + \operatorname{arsinh} x)`, evaluated in microseconds
  per sample (exact and deterministic) instead of ~150 ms/sample of quadrature.
  The symbolic attempt is bounded by `ce.timeLimit` (default 2 s), so a hard
  integrand degrades to quadrature rather than stalling compilation, and it is
  skipped when the integral references a symbol supplied through the `vars`
  option (which must stay a live runtime input, not be folded to a constant).
- **The compiled quadrature fallback is now deterministic adaptive Gauss–Kronrod
  (GK15), not Monte-Carlo.** An integral that does not resolve symbolically is
  estimated with adaptive Gauss–Kronrod quadrature: near machine precision on
  smooth integrands, microseconds-to-milliseconds per call, and — unlike the
  previous 10⁷-sample Monte-Carlo estimator (~1e-4 error, a different value on
  every call, ~150 ms/call) — the **same** value on every call. Infinite bounds
  are handled by a smooth variable transform. Monte-Carlo remains an automatic
  fallback when the adaptive rule does not converge, and can be forced with the
  new `compile(expr, { quadrature: 'monte-carlo' })` option (`'adaptive'` is the
  default).

## 0.78.1 _2026-07-14_

### Parse Diagnostics

- **`juxtaposition-as-multiply` now covers unit-lexed and letter-run application
  shapes.** Two application-shaped sources that produced no diagnostic on 0.78.0
  are now reported: a symbol lexed as a **unit** applied to a group
  (`\mathrm{N}(2)`, where `N` reads as the newton unit) fires with `detail.name`
  set to the source symbol and a new additive `detail: { lexedAs: "unit" }`
  hint; and a **letter-run** applied to a group (`divisors(60)`, which segments
  into `d·i·v·i·s·o·r·s`) fires a single diagnostic whose `name` is the joined
  run (`"divisors"`) and whose span covers the full `divisors(60)` source shape.
  Run reconstruction stops at numbers and multi-character commands (`2x(3)`
  reports `x`; `\pi r(2)` reports `r`).

## 0.78.0 _2026-07-14_

### Parse Diagnostics

- **New opt-in `diagnostics` parse option.**
  `ce.parse(latex, { diagnostics: true })` attaches a `parseDiagnostics` array
  to the top-level result, flagging _charitable_ parse decisions that are
  usually errors in machine-generated LaTeX (LLM output, OCR). Four codes are
  reported: `undeclared-symbol` (a symbol reference with no declaration —
  `detail: { name, type }`), `juxtaposition-as-multiply` (a symbol immediately
  followed by a delimited group `(…)` or a matrix environment read as
  multiplication — `detail: { name, declaredAs }`), `comment-discarded` (an
  unescaped `%` dropped input — `detail: { discardedLength }`), and `recovered`
  (trailing noise silently skipped by non-strict error recovery). Each carries a
  `start`/`end` source span: `undeclared-symbol` and `juxtaposition-as-multiply`
  are offsets into CE's normalized LaTeX, while `comment-discarded` (and
  best-effort `recovered`) use original-input coordinates. The feature is purely
  additive — enabling it never changes the parse output — and works under
  `{ canonical: false }`. `parseDiagnostics` is present (a possibly-empty array)
  only on the result of a `diagnostics: true` parse, and `undefined` otherwise.

## 0.77.1 _2026-07-13_

### Breaking Changes

- **`f'(x)` now parses to `["Apply", ["Derivative", "f", 1], x]`** instead of
  `["D", ["f", x], x]`. Prime notation on an applied function denotes the
  _derivative function evaluated at the argument_ — Lagrange semantics, as in
  Mathematica and Desmos — not the derivative of the applied expression with
  respect to an inferred variable. The previous representation produced silently
  wrong results whenever the argument was not a bare variable: `f'(2)` evaluated
  to `0` instead of `f'` evaluated at 2 (e.g. `6` for `f(x) := x^2+2x+1`), and
  `f'(2x)` picked up a spurious chain-rule factor (`8x+4` instead of `4x+2`).
  Higher orders (`f''(2)` → `2`) and the `f^{(n)}(x)` superscript form follow
  the same rule. Serialization is unchanged (`f^{\prime}(x)`), so LaTeX
  round-trips are unaffected; only consumers pattern-matching the MathJSON parse
  shape need updating.

### Resolved Issues

- **Symbolic derivatives of declared-then-assigned functions** (0.77.0
  regression). Declaring a function symbol before assigning its body —
  `ce.declare("f", "function")` (or with an explicit signature such as
  `"(number) -> number"`) followed by `f(x) := x^2 + 2x + 1` — left the
  function's derivative inert: `f'(x)` evaluated to itself instead of `2x + 2`,
  and `["D", "f", "x"]` evaluated to `0`, even though direct calls like `f(2)`
  worked. The declared-signature reconciliation introduced in 0.77.0 keeps the
  assigned function literal in the symbol's _value_ definition (preserving the
  declared signature) instead of converting it to an operator definition, and
  the symbolic differentiation path only expanded function bodies from operator
  definitions. Differentiation now expands user-defined function bodies from
  both definition shapes.

## 0.77.0 _2026-07-13_

### Pattern Matching

- **New `Match` operator for structural pattern matching.**
  `["Match", subject, ["MatchCase", pattern, body], …]` selects the first case
  whose pattern matches the structure of the subject and applies its body to the
  captured values:
  `["Match", ["List", 3, 4], ["MatchCase", ["List", "_a", "_b"], ["Add", "a", "b"]]]`
  → `7`. Cases may carry a guard (`["MatchCase", pattern, guard, body]`);
  `["Pin", expr]` matches the _value_ of an expression (a constant like `Pi`, or
  the current value of a variable); `["Alternatives", p1, p2, …]` shares one
  body among several binding-free patterns. Unlike `Which`, which stays
  unevaluated while a condition is undecidable, `Match` always decides — a
  symbolic subject falls through to a wildcard case. No matching case yields an
  `["Error", "'match-no-case'"]` value.
- **Cortex: `match` expression.** The reserved `match` keyword is now a full
  pattern-matching expression:
  `match x { 0 => "zero"; 1 | 2 | == Pi => "small"; [first, ...rest] => first; n if n > 3 => n; _ => "other" }`.
  Bare identifiers in a pattern always bind (a non-final catch-all like
  `Pi => …` is a parse error suggesting `== Pi` to match the constant);
  `== expr` pins a value; `|` gives or-alternatives; `[…]`, `(…)` and
  `{key -> pat}` destructure lists, tuples and dictionaries (open matching);
  `n: integer` adds a type guard; `...rest` captures the tail.
- **Constant-time dispatch and compilation.** Matches over constant cases
  dispatch through a cached table instead of the general pattern matcher, and
  fixed-shape destructuring compiles to direct positional checks. `compile()`
  emits comparison chains or a JavaScript `switch` for constant cases and
  destructuring closures for fixed shapes; symbolic patterns (e.g. `a + b`) fail
  closed with a clear error rather than producing incorrect code.

### Typed Function Literals

- **Function literals can declare parameter and return types.** A `Function`
  parameter may be annotated — `["Typed", "x", "'integer'"]` — and the body may
  carry a return-type ascription, so
  `["Function", ["Add", "x", 1], ["Typed", "x", "'integer'"]]` now has type
  `(x: integer) -> integer` instead of `(unknown) -> number`. Annotations feed
  body type inference, and in strict mode arguments are checked at application:
  applying `2.5` to an `integer` parameter yields an `incompatible-type` error
  instead of silently computing. Partial application preserves the remaining
  annotations and the return type. Assigning an annotated literal to a symbol
  gives it the full typed signature — including the declared return type, which
  is an _ascription_ (authoritative, like a TypeScript annotation) rather than a
  check against inference. Untyped literals are unchanged.
- **New `Typed` operator for type ascription.** `["Typed", expr, type]` asserts
  the type of an expression for the type system and is transparent at
  evaluation. It accepts a type string (`"'integer'"`) or a type-name symbol
  (`integer`). LaTeX serialization drops annotations (no typed-parameter
  notation in v1); MathJSON round-trips them.
- **Cortex: typed function definitions are enforced end to end.**
  `f(x: integer) -> real = x + 1`, `function g(n: integer) -> integer {…}`, and
  the anonymous form `(x: integer) |-> x + 1` (new grammar) all parse to native
  annotated literals; mistyped calls error, declared return types are carried,
  and `serializeCortex` reconstructs the typed syntax faithfully. Recursive
  typed definitions work
  (`fact(n: integer) -> integer = if n <= 1 {1} else {n * fact(n - 1)}`).

### Programming and Collections

- **Closures capture per-call state.** A zero-parameter closure returned from a
  factory function now captures its own instance of the factory's local
  variables, so separate invocations no longer share mutable state. For example,
  two counters built from the same `makeCounter()` factory advance
  independently. Parameterized factories already behaved this way; the fix
  extends the same per-call scope instantiation to nullary functions.
- **Lazy collection operations iterate eager sources.** A lazy operation such as
  `Map` or `Filter` applied to a collection that only materializes on evaluation
  (e.g. `UnicodeScalars(s)`, `Characters(s)`) now iterates its elements instead
  of behaving as empty. For example,
  `StringFrom(Map(UnicodeScalars(s), c -> c + 1), "unicode-scalars")` now
  produces the shifted string rather than `""`.

### Symbolic Computation

- **Arithmetic and function application thread through conditional values.** A
  restricted value `When(v, cond)` and a piecewise `Which(c_1, v_1, …)` now flow
  through scalar operations instead of staying inert: `sin(When(x, x > 0))` →
  `When(sin(x), x > 0)`, guards combining by conjunction
  (`When(x, x > 0) · When(y, y < 1)` → `When(x·y, x > 0 ∧ y < 1)`), and
  `Which(x > 0, 1, x < 0, -1) + 2` → `Which(x > 0, 3, x < 0, 1)`. Logic
  operators are excluded (so `And(When(A, g), False)` still short-circuits to
  `False`), and piecewise products above 16 combined branches stay unevaluated.
- **Restriction guards survive arithmetic cancellation.** Evaluating
  `When(x, c) − When(x, c)` previously folded to plain `0`, silently discarding
  the restriction on the (fat) region where `c` fails; it now yields
  `When(0, c)`. Similarly `0 · When(x, c)` → `When(0, c)` and
  `When(x, c) / When(x, c)` → `When(1, c)`.
- **`When` respects numeric approximation.** `When(π, cond).N()` with a true
  condition now numericizes (previously the option was dropped and the value
  stayed symbolic).
- **DMS angles stay exact.** (contributed by
  [yelliver](https://github.com/yelliver)) Degrees-minutes-seconds notation now
  parses to an exact rational number of degrees instead of a float (`9°30'` is
  `19/2°`), and `Degrees` converts any rational — not just integers — to an
  exact multiple of π, so `5°37'30"` simplifies to `π/32`. Decimal components
  are recovered exactly when possible (`9°30'15.5"` → `68431/7200°`) and
  otherwise fall back to floats. `Degrees` of values beyond 2⁵³ no longer loses
  precision. In raw (non-canonical) parsing, DMS angles that previously produced
  a float now produce a `Rational`. (#321)

### Calculus

- **Exponentials with any linear exponent integrate.** `∫e^{−ax}dx` with a
  symbolic `a` previously stayed unevaluated (only `e^{a·x}`-shaped exponents
  were recognized); it now returns `−e^{−ax}/a`. Any linear exponent works:
  `∫e^{3−2x}dx`, `∫5e^{−x/2}dx`.
- **Improper integrals with symbolic parameters return convergence-guarded
  results.** `∫₀^∞ e^(−ax)dx` with a free `a` previously stayed unevaluated; it
  now returns `1/a {0 < a}`. Results that formerly leaked indeterminate endpoint
  forms are fixed: `∫₀^1 xⁿdx` returned an expression containing `0^(n+1)`, and
  `∫₁^∞ x^(−s)dx` one containing `∞^(1−s)`; they now return `1/(n+1) {0 < n+1}`
  and `1/(s−1) {1 < s}`. Integrals whose endpoint behavior cannot be classified
  stay unevaluated rather than leaking indeterminates. Numeric-parameter
  integrals are unchanged.
- **`Series` expands at algebraic branch points (Puiseux series).** A series
  expansion may now carry fractional powers: `Series(√(sin x), x)` →
  `√x − x^{5/2}/12 + x^{9/2}/1440 + O(x^{13/2})`. This covers `√x`, `1/√x`,
  `x^{3/2}·e^x`, `Root(g, r)` and rational powers `g^{p/r}` where the base
  vanishes (or has a pole), as well as compositions: `cos(√x)`, `csc(√x)` (→
  `1/√x + √x/6 + …`), and `Γ(√x)` (→ `1/√x − γ + …`).
- **`Series` expands through logarithmic singularities.** Expanding about a zero
  or pole of a logarithm's argument now yields a log-carrying series:
  `Series(ln(sin x), x)` → `ln x − x²/6 − x⁴/180 + O(x⁶)`, and `Series(x^x, x)`
  → `1 + x·ln x + x²·ln²x/2 + …`. Base-`b` logarithms (`log₂ x`, `log₁₀ x`)
  expand through the same path. Nested or reciprocal logarithms (`ln(ln x)`,
  `1/ln x`) and essential singularities (`e^{1/x}`) still stay unevaluated
  rather than returning a partial expansion.
- **`Series` of an irrational power no longer returns an invalid expansion.**
  `Series(x^π, x)` previously produced coefficients containing unresolved
  `0^{π−1}`-style indeterminates; it now stays unevaluated at 0 (the expansion
  about a regular point, e.g. `x^π` about 2, is unchanged).
- **Logarithmic asymptotic expansions at `±∞`.** A log-carrying expansion at
  `+∞` now resolves back to `x` instead of deferring: `Series(ln x, x, +∞)` →
  `ln x`, and `Series(ln(x²+x), x, +∞)` → `2 ln x + 1/x − 1/(2x²) + …`. At `−∞`
  (a logarithm of a negative quantity) such expansions still stay unevaluated.
- **Stirling asymptotics for the log-gamma.** `Series(GammaLn(x), x, +∞)` (and
  the parsed `ln Γ(x)`) now returns Stirling's series
  `x·ln x − x − ½ln x + ½ln(2π) + 1/(12x) − 1/(360x³) + O(1/x⁵)`. The series is
  asymptotic (divergent), so the `BigO` is placed at the true remainder order.
  `Series(Γ(x), x, +∞)` — the exponential of a trans-series — still defers.
- **`GammaLn` evaluates to `+∞` at the poles of `Γ`** (the non-positive
  integers, where `ln|Γ| → +∞` — as in Mathematica's `LogGamma` and SymPy's
  `loggamma`); it previously stayed inert there. Consequently
  `Series(GammaLn(x), x)` at such a pole now returns the log-aware expansion
  `−ln x − γ·x + (π²/12)·x² + …` (matching the parsed `ln Γ(x)`) instead of an
  invalid expansion with inert `GammaLn(0)`, `Digamma(0)`, … coefficients.
- **Provably-exact expansions drop the `BigO` remainder.** When the truncated
  sum is symbolically equal to the whole function, `Series` now returns it
  without a remainder term: `Series(√x, x)` → `√x`, `Series(ln x, x)` → `ln x`,
  `Series(x/(x−2)², x, 2)` → `2(x−2)⁻² + (x−2)⁻¹`. Genuinely-truncated series
  (`1/sin x`, `Γ(x)` at 0, `ζ` at 1) keep their `BigO`.

### Sums and Products

- **Geometric series closed form.** `Σ_{n=0}^∞ rⁿ` now evaluates: exactly for a
  numeric ratio (`Σ(1/2)ⁿ → 2`, `Σ(1/√2)ⁿ → 2 + √2`), and with its convergence
  condition for a symbolic ratio (`Σxⁿ → 1/(1−x) {|x| < 1}`). Constant multiples
  and integer start indices are handled (`Σ_{n=2}^∞ xⁿ → x²/(1−x) {|x| < 1}`);
  divergent numeric ratios stay unevaluated.

### Solving Equations

- **Radical equations with a symbolic right-hand side return guarded roots.**
  `Solve(√(x+3) = a, x)` previously returned `[]`; it now returns
  `a² − 3 {0 <= a}` (a square root is non-negative, so a real solution exists
  only for `a ≥ 0`). Substituting a concrete value resolves the guard: `a = 2`
  gives `1`, `a = −2` gives `Undefined`. Numeric right-hand sides are unchanged.
- **Trigonometric and hyperbolic equations with symbolic coefficients record
  their validity condition.** `Solve(sin(x) = a, x)` previously returned
  `arcsin(a)` and `π − arcsin(a)` unconditionally — wrong whenever `|a| > 1`.
  Roots now carry their domain-of-validity guard — a `When` restriction,
  displayed `arcsin(a) {|a| <= 1}` (LaTeX `\arcsin(a)\left\{|a|\le 1\right\}`).
  The guard resolves as soon as it is decidable: substituting `a = 1/2`
  collapses the root to `π/6`, while `a = 3` yields `Undefined`, and a guard
  known false at solve time prunes the root (down to `[]`). Numeric-coefficient
  equations are unchanged. The same applies to `cos` (`|ratio| ≤ 1`), `cosh`
  (`ratio ≥ 1`), and `tanh` (`|ratio| < 1`) equations.
- **`Solve` of an inequality stays inert instead of returning an empty list.**
  `Solve(x^2 < 4, x)` previously returned `[]`, which reads as "no solutions";
  univariate inequality solving is unsupported, so the expression now stays
  unevaluated. Solving equations is unchanged.

### Compilation

- **The deprecated `interval-glsl` compilation target has been removed.** GPU
  interval evaluation only pays off when the entire pipeline stays on the GPU,
  and the target could not compile relational operators, so it could not host
  restriction conditions. Use `interval-js` (CPU interval arithmetic) or the
  scalar `glsl`/`wgsl` targets instead. The `IntervalGLSLTarget` export from
  `@cortex-js/compute-engine/compile` is gone, and
  `compile(expr, { to: 'interval-glsl' })` now throws an unregistered-target
  error.

### Parsing

- **`ce.parse()` no longer blows up on repeated `\command[opt]{}` groups.**
  Adjacent bracketed groups — a garbage `\begin{tikzpicture}katu[scale=0.6]{}…`
  run, or even plain index notation `a[6]a[6]…` — triggered exponential-time
  backtracking, so a few-hundred-character string could hang the parser for tens
  of seconds (and `timeLimit`, which bounds evaluation, did not stop it). The
  reversed-bracket ISO interval notation `]a, b[` opens on `]`, the same token
  that closes an index bracket, so every stray `]` speculatively re-parsed the
  rest of the input as an interval body, nesting exponentially. Parsing is now
  polynomial; the interval (`]0, 1[`) and indexing (`a[6]`) notations are
  unchanged.
- **`\operatorname{nPr}(n, r)` now has a definition.** Matching
  `\operatorname{nCr}` (the binomial coefficient), the Desmos permutation-count
  notation lowers to `Choose(n, r)·r!` (= n!/(n−r)!), so `nPr(5, 2)` evaluates
  to `20`. Previously it parsed to an inert symbol and stayed symbolic under
  `N()`, silently producing `NaN` in a compiled function.

### Arithmetic

- **`Round` accepts an optional precision argument.** `Round(x, n)` rounds `x`
  to `n` decimal places — `Round(2.567, 2) → 2.57`, `Round(1234.5, −2) → 1200` —
  matching the Desmos/spreadsheet `round(x, n)` convention. Previously the
  second argument produced an `unexpected-argument` error. The single-argument
  round-to-integer form is unchanged, and the two-argument form compiles on the
  `javascript` and `interval-js` targets.
- **New `Rationalize` operator for rational approximation.** `Rationalize(x)`
  approximates a real number by a rational at full working precision (like
  single-argument `Rational`); with a tolerance, `Rationalize(x, tolerance)`
  returns the rational with the smallest denominator within the bound —
  `Rationalize(√3, 1/500) → 26/15`, `Rationalize(π, 1/100) → 22/7` — a
  continued-fraction convergent cut.

### Number Theory

- **New `StirlingS1` operator: signed Stirling numbers of the first kind.**
  `StirlingS1(n, m)` is the coefficient of xᵐ in the falling factorial
  x(x−1)…(x−n+1); its absolute value counts the permutations of n elements with
  m disjoint cycles — `StirlingS1(5, 2) → −50`. Complements the existing
  `Stirling` (second kind).

### Relational Operators

- **`Equal` and `NotEqual` broadcast over a named list operand.** With
  `R = [1, 2, 3]`, `x² + y² = R²` now broadcasts to a list of three element-wise
  equations — matching the literal-list form (`x² + y² = [1, 2, 3]`) and the
  inequality operators (`<`, `≤`, …), which already broadcast. Previously the
  named form collapsed to a single `False`. Whole-list equality, where two or
  more operands are collections (`[1, 2] = [1, 2]`), still returns a single
  boolean.

## 0.76.0 _2026-07-11_

### Programming and Collections

- **Dictionary lookups have the value's type.** `At(dict, key)` — and thus
  `d["a"]` in Cortex — was statically typed as the key-value _pair_
  (`tuple<string, T>`), so using a lookup directly in arithmetic (`d["a"] + 10`)
  failed with an `incompatible-type` error. It is now typed as the value; a
  record indexed by a literal string gets that field's precise type.

- **`Reduce`/`Fold` honor the exactness contract.** The compiled floating-point
  fast path no longer runs under plain `evaluate()`: exact operands fold exactly
  (`Fold((a, k) ↦ a + 1/k, 0, Range(1, 5))` → `137/60` instead of `2.2833…`).
  The fast path is reserved for `.N()` and already-inexact inputs.
  Complex-valued folds no longer silently drop imaginary parts
  (`Product(Map(Range(1, 3), k ↦ k + i))` → `10i`, previously `6`).

- **`Map` infers its element type from the mapped function.** The result of
  `Map(Range(1, 3), k ↦ k + i)` was typed with the _source_ element type
  (`integer`); it now reflects the lambda's result type, so downstream
  operations dispatch correctly.

- **Elementwise broadcasting is uniform across lazy and eager collections.** A
  finite lazy `Range` now broadcasts like an eager `List` in tuple products:
  with `R = Range(-2, 2)`, `R·(2,3)` yields a list of five scaled points instead
  of distributing the range inside the tuple components. A scalar also folds
  into a collection produced by an inner broadcast step: `L^2 - 2` evaluates to
  `[-1, 2, 7]` instead of the unevaluated `Add(-2, [1, 4, 9])`, and evaluation
  is idempotent again on these shapes. Infinite or unknown-length ranges stay
  symbolic rather than transposing.

- **Scalar operations accept lazy collection operands during validation.**
  `Mod([0,\ldots,kN], N)` with a symbolic bound produced an `incompatible-type`
  error at canonicalization even though the eager-list form broadcast fine; the
  argument validator now recognizes parametrized `indexed_collection<T>`
  wherever broadcasting applies. Declared types follow the values: broadcast
  results type `list<…>` (previously a scalar-or-list union, or a scalar type
  for symbolic-length ranges).

- **Big integers survive numeric list literals.** A list literal promoted to a
  tensor stored oversized integers in float64 and truncated them (`[100!]` lost
  digits, breaking exact iterative algorithms such as a Fibonacci pair
  accumulator). Integers beyond the float-safe range now keep their exact
  representation.

- **`StringFrom` joins collections.** With a list argument and the
  `"unicode-scalars"`, `"utf-8"`, or `"utf-16"` format,
  `StringFrom([100, 101, 102], "unicode-scalars")` returns `"def"`; it
  previously broadcast element-wise and returned a list of one-character
  strings.

- **One-step function definitions bind inside function bodies (Cortex).**
  `function outer(n) { sq(m) = m * m; sq(n) }` left `sq(n)` unevaluated because
  the call site resolved a value placeholder while the runtime created an
  operator definition; function application now falls back to the operator
  definition. The example-program suite grew by 18 programs covering control
  flow, number theory, complex numbers, linear algebra, and exact sums (mirrored
  in the Cortex documentation).

- **Cortex: `do { … }` block expressions and zero-parameter lambdas.** A
  statement block can now appear in any expression position with the explicit
  `do` prefix — its value is its final statement — so multi-statement closure
  bodies are expressible: `x |-> do { let t = x * x; t + 1 }`. Set literals are
  unchanged (`x |-> {1, 2}` still returns a set). Zero-parameter lambdas
  (`() |-> …`) now parse and apply, enabling the stateful `makeCounter`-style
  closure documented in the examples.

- **Cortex: a named inner function escapes its scope as a value.**
  `function make() { helper(x) = x + 1; helper }` now returns a callable
  first-class function — previously the returned symbol went inert once the call
  frame popped. Captured locals and parameters of the enclosing call are
  preserved; returned `|->` lambdas are unchanged.

- **Cortex: lowercase `true`/`false`, ASCII `..` ranges, and `StringJoin` over a
  list.** `true`/`false` are now input aliases for `True`/`False` (and reserved
  as binding names); `1..n` is a range (`for k in 1..5`), equivalent to the
  existing `‥`, without disturbing decimal literals like `1.5`; and `StringJoin`
  accepts a single collection of strings —
  `StringJoin(Reverse(Characters("hello")))` → `"olleh"`.

- **Cortex: "did you mean" warnings for near-miss function names.** Calling an
  undeclared function whose name is close to a library operator no longer fails
  silently symbolic: `executeCortex` emits a warning diagnostic with the
  suggestion (`Quartile(xs)` → _did you mean `Quartiles`?_). The match is
  conservative (case-insensitive, singular/plural, small edit distance, unique
  prefix) and the diagnostic only fires when a suggestion exists, so
  intentionally symbolic calls are never flagged; the returned value is
  unchanged. The matcher is also available as `ce.suggestOperatorName(name)`.
  `Arg` is now an alias for `Argument`.

### Compilation

- **Calls to user-defined functions compile.** After `f(x) := e^{-x^2/2}`,
  compiling `f(2)` — or any expression referencing `f` — emits the definition as
  a named local function instead of throwing ``Unknown operator `f` ``. Nested
  user functions are emitted in dependency order; recursive definitions fail
  closed with an explanatory error. This also removes a silent interpreted
  fallback in numeric integration: definite integrals of user-defined functions
  now run compiled quadrature (10⁷ samples instead of 10⁴ — comparable wall
  time, ~30× tighter error estimate). Applies to the `javascript` and
  `interval-js` targets.

- **Collection-valued conditions fail closed instead of compiling wrong code.**
  `Equal`/`NotEqual` over a collection-typed operand, and `If`/`Which`/`When`
  with a collection-typed condition, previously compiled with `success: true`
  and returned `null` or the wrong branch at run time; they now throw an
  explanatory compile-time error. Interpreted evaluation is unchanged:
  comparisons broadcast elementwise, conditionals require a scalar boolean.

- **`Reduce`, `Length`, and `At` compile on the `javascript` target.**
  `Reduce(xs, Add|Multiply|Min|Max, init?)` compiles to a loop; `Length` returns
  the element count; `At` follows the interpreter's 1-based, negative-from-end
  indexing (out-of-range yields `NaN`).

- **GLSL: `Length` no longer collides with the `length()` builtin.** CE's
  `Length` (element count) compiled to GLSL `length()` — the Euclidean norm —
  reporting success while computing the wrong value, or emitting invalid GLSL
  for lists longer than four. `length()` is now emitted for `Norm`; collection
  `Length` fails closed on the GPU targets.

- **GLSL/WGSL: literal integer powers are sign-correct on the GPU.** `x^3`
  compiled to `pow(x, 3.0)`, which the GLSL specification leaves undefined for
  negative bases — real GPUs returned `pow(-2, 3) = +8`, silently flipping the
  sign of odd-power terms. Small integer exponents now emit repeated
  multiplication; larger and compound-base cases use a sign-preserving
  `_gpu_powi` preamble helper; negative integer exponents wrap the reciprocal.
  Fractional exponents still emit `pow`.

- **The `interval-glsl` target is deprecated.** GPU interval evaluation only
  pays off when the entire pipeline stays on the GPU, and the target cannot
  compile relational operators, so it cannot host restriction conditions. A
  once-per-process warning now points to `interval-js` and the scalar
  `glsl`/`wgsl` targets. It will be removed in a future release.

### Numeric Evaluation

- **Numeric infinite products use tail acceleration.** `.N()` now
  Richardson-extrapolates the logarithms of positive real factors instead of
  returning a plain finite truncation. This gives accurate values for products
  such as `Product(1 + 1/k², k, 1, +∞) = sinh(π)/π`. Products with non-real,
  non-positive, or non-convergent factors decline the accelerator and retain the
  existing bounded-truncation behavior.

- **Machine `Gamma` keeps full relative accuracy through the overflow edge.**
  Positive real arguments now use a balanced recurrence from the Lanczos core
  instead of reconstructing large values from `exp(gammaln(z))`, which preserves
  about 15-16 digits up to the IEEE-754 limit near `Gamma(171.624)`.

### Linear Algebra

- **Matrix operators infer fresh symbolic operands from context.** An expression
  such as `\det(A+2B)` no longer fails because bottom-up arithmetic
  canonicalization provisionally typed `A` and `B` as numbers before
  `Determinant` required a matrix. Validation now repairs only inferences made
  while constructing the current expression and canonicalizes the argument once
  more with matrix context. Explicit declarations and inferences from earlier
  expressions are never overwritten, and ambiguous products remain unchanged
  rather than guessing which factor is the matrix.

### Symbolic Computation

- **Exact cube-root arithmetic handles more algebraic forms.** Positive
  perfect-power bases with rational exponents normalize to a common base and
  extract their integer part (`4^(2/3) → 2·2^(1/3)`), allowing compatible
  cube-root powers to combine exactly. Real nested cube roots of the form
  `∛(a+b√c)` are denested when exact integer conjugate identities prove a
  result; in particular, `∛(90+34√7) → 3+√7` (and the conjugate form with minus
  signs). The Wester-28 cube-root identity now simplifies directly to exact zero
  (no explicit `Expand` required) and numericizes without `NaN`.

- **Infinite p-series support positive-integer lower bounds beyond 1.**
  `Sum(k^(-s), k, a, +∞)` now returns `Zeta(s) − Sum(k^(-s), k, 1, a−1)` for
  exact real `s > 1`; for example, `Sum(1/k², k, 3, +∞)` evaluates to
  `π²/6 − 5/4`. The existing lower-bound-1 behavior and divergence guards are
  unchanged.

- **`e^{iθ}` stays exact for constructible angles.** `e^{i\pi/3}` now evaluates
  to `1/2 + (√3/2)i` instead of a machine float (the exact cosine/sine values
  were being recombined through float-folding arithmetic). `.N()` numericizes as
  before, and the degenerate angles (`e^{i\pi} → -1`, `e^{i\pi/2} → i`) are
  unchanged.

### Serialization

- **AsciiMath prints series in textbook order.** Taylor-series terms are
  serialized in ascending degree and asymptotic series in descending degree,
  with the `BigO` remainder last, matching LaTeX output. Canonical expression
  order and ordinary sums without a `BigO` term are unchanged.

### Parsing

- **Stepped ellipsis ranges accept negative and symbolic samples.**
  `[-9,-6,\ldots,9]` now parses to `Range(-9, 9, 3)` — previously any negative
  leading sample fell back to a literal list containing a
  `ContinuationPlaceholder` that enumerated as `NaN`. Symbolic stepped forms
  infer a symbolic step when the samples are numeric multiples of one common
  symbol (`[-3N,-2N,\ldots,3N]` → `Range(-3N, 3N, N)`, progression-validated on
  the coefficients); generic sequence notation (`[x_1,x_2,\ldots,x_n]`)
  intentionally still parses as a plain list.

### Engine Lifecycle

- **Popping a scope releases configuration listeners owned by its constants.**
  Constant definitions now retain and invoke the unsubscribe closure returned
  when they register for precision and angular-unit changes. Local constants
  from discarded scopes therefore no longer remain reachable for the lifetime of
  the compute engine.

- **Cancellation errors carry a structured cause.** A cap breach reports
  `'timeout'`, `'iteration-limit-exceeded'`, or `'recursion-depth-exceeded'` via
  the exported `CancellationCause` type. In Cortex, a final-statement breach
  carries the cause as a second operand on the `Error` value, and non-final
  statements emit a dedicated `evaluation-canceled` diagnostic. Error messages
  are unchanged, so existing string matching keeps working.

## 0.75.0 _2026-07-11_

### Numeric Evaluation

- **Inverse trigonometric and hyperbolic functions now evaluate outside their
  real domain.** `.N()` returns the complex principal value when no real value
  exists, for example `\arcsin(2)` → `1.571 − 1.317i` and
  `\operatorname{arcosh}(0.5)` → `1.047i`. Complex arguments such as
  `\operatorname{arsinh}(1+i)` are also supported. Exact arguments remain
  symbolic with `evaluate()`. Incorrect complex values from `Arcoth` on part of
  its branch cut and from `Arsech` have also been fixed.
- **Products and quotients of square roots no longer throw on large radicands.**
  Evaluating an expression such as `\sqrt{1234}\cdot\sqrt{1235}`, whose combined
  radicand (`1234·1235`) exceeds the exact-radical limit, no longer raises an
  internal "Unexpected value for radical part" error. Any perfect-square factor
  is extracted (`√(k²·r) = k·√r`), keeping the result exact when the square-free
  part is small enough and otherwise returning the numeric value.

### Solving Equations

- **`Solve` handles systems of equations.** `Solve([eq1, eq2, …], [x, y, …])`
  returns each solution as a tuple of values in the order of the variable list:
  `Solve([x + y = 3, x - y = 1], [x, y])` → `[(2, 1)]`, and a nonlinear system
  such as `[x^2 + y^2 = 25, x + y = 7]` returns both solutions
  `[(3, 4), (4, 3)]`. Linear systems solve exactly (rational values), an
  underdetermined system returns a parametric tuple (`[(5 - y, y)]` for
  `x + y = 5`), and a system the solver cannot decide stays unevaluated. This
  matches the tuple shape already used when solving over explicit domains.
- **`solve()` correctly rejects trigonometric and hyperbolic equations with no
  real solutions.** Equations such as `\sin x = 2`, `\tanh x = 2`, and
  `\cosh x = 1/2` now return no solutions. Symbolic equations and equations with
  complex polynomial roots are unaffected.

### Integration (opt-in Rubi rules)

- **More integrals containing binomial radicals are supported.** This includes
  mixed even- and odd-power numerators such as
  `\int\frac{c+dx}{\sqrt{-a-bx^4}}dx`,
  `\int\frac{x^2(c+dx+ex^2+fx^3)}{(a+bx^4)^{3/2}}dx`, and Laurent variants with
  denominators of the form `(a+b·x^n)^{3/2}`.
- **More integrals that are algebraic in a hyperbolic function are supported.**
  Half-integer powers of hyperbolic expressions such as
  `\int\coth(x)(a+b\sinh^2 x)^{3/2}\,dx`,
  `\int\coth^2 x\sqrt{a+b\tanh^2 x}\,dx`,
  `\int\frac{\operatorname{csch} x}{(a+b\sinh^2 x)^{3/2}}\,dx`, and
  `\int\sqrt{a+b\operatorname{csch}^2 x}\,dx` now close in elementary form via a
  hyperbolic substitution. This also fixes a wrong-answer case,
  `\int\frac{\sqrt{\coth(a+b\ln(cx^n))}}{x}\,dx`.
- **More integrals that are rational in a hyperbolic function are supported.**
  Ratios of hyperbolic functions with a squared-or-higher power, such as
  `\int\frac{\tanh^2 x}{a+b\tanh x}\,dx`, `\int\frac{\tanh x}{a+b\sinh x}\,dx`,
  and `\int(a+b\tanh^2 x)^3\tanh^4 x\,dx`, now close in elementary form.

### Library and Definitions

- **Definitions can be searched by concept.** `ce.searchDefinitions(query)`
  returns a ranked list of matching `{ id, kind }` entries. It searches names,
  descriptions, synonyms (for example, `average` finds `Mean`), and LaTeX
  commands (for example, `\gcd` finds `GCD`). Use the optional `limit` argument
  to control the number of results (default: 10). Custom definitions declared
  with `ce.declare()` can provide an optional `keywords` list, and returned IDs
  can be passed to `ce.lookupDefinition()`.
- **Definition descriptions filled in.** About 80 operators and constants that
  lacked a `description` now have one (the trigonometric family, logic and
  relational operators, collection primitives such as `List`, `Range`, and
  `Fold`, and constants like `Pi` and `ExponentialE`), and `Sec`'s description
  was corrected (secant is the _reciprocal_, not the inverse, of cosine). These
  surface in `ce.searchDefinitions()` and `ce.lookupDefinition()`.
- **New builtin operators are available:** `Pipe(x, f)`,
  `Append(collection, element)`, `Fold(f, init, collection)`,
  `StringJoin(s1, s2, …)`, and `RandomInteger(n)` or `RandomInteger(a, b)`.
  `Pipe` enables evaluation of `x |> f`; `StringJoin` enables the existing `<>`
  notation; and `RandomInteger` uses inclusive bounds and honors the seeded
  random-number generator.

### Calculus

- **`Limit` accepts the explicit-variable form.** `Limit(expr, var, point)` —
  e.g. `["Limit", ["Divide", ["Sin", "x"], "x"], "x", 0]` → `1` — now
  canonicalizes to the same internal form as `Limit(expr, point)`, matching the
  convention `Series` already uses. The `(function, point, direction)` reading
  is preserved when the middle operand is not a free variable of the expression.

### Linear Algebra

- **`Inverse` of an exact matrix is exact.** An integer or rational matrix now
  inverts over the rationals — `Inverse([[2,1],[1,3]])` →
  `[[3/5,-1/5],[-1/5,2/5]]` instead of floats — with `.N()` and inexact matrices
  using the numeric path as before.
- **New `LinearSolve(A, b)` operator** solves the linear system `A·x = b`,
  exactly for exact input. Composed forms like `Dot(Inverse(A), b)` also work
  now: `Inverse`'s result is typed as a matrix, so matrix operators accept it.

### Units and Quantities

- **`Quantity` accepts a string unit.** `Quantity(30, "km/h")` parses the string
  through the same unit grammar as the LaTeX path and canonicalizes identically
  to the symbolic form; a malformed unit string produces a clear error instead
  of a partially-built expression.

### Programming and Collections

- **Recursive functions can be defined without a separate declaration.** A
  function assignment that refers to itself, such as
  `ce.parse('f(n) := n \\cdot f(n-1)')`, now works directly.
- **`N()` numericizes through user-defined functions.** For `f(x) := x/3`,
  `N(f(2))` now returns `0.666…` instead of the exact `2/3`; plain `evaluate()`
  still returns the exact form, and the approximation is applied within the
  function's own scope, preserving lexical scoping.
- **`Keys(dict)` and `Values(dict)` evaluate**, returning the keys (as strings)
  and values in the dictionary's iteration order — the same order
  `for kv in dict` yields.
- **`Intersection` accepts lists** (any finite collection), deduplicating into a
  `Set`; `Union` already did.
- **A 2-element MathJSON `List` in a set operation is a collection, not an
  interval.** `["Intersection", ["List",1,2], ["List",2,3]]` (Cortex:
  `Intersection([1,2], [2,3])`) now intersects the two-element collections —
  `Set(2)` — instead of reading the lists as closed intervals. The interval
  reading of ambiguous bracket pairs is now applied where it belongs, at the
  LaTeX boundary: `x \in \lbrack 1, 5 \rbrack`, `(-\infty, 0) \cup (0, \infty)`,
  and the subset relations parse to `Interval` exactly as before, and
  `\setminus` now gets the same interval reading (previously
  `\R \setminus (0, 1)` kept a raw pair). Unambiguous interval notations
  (`[a, b)`, `]a, b[`, …) are unchanged.
- **Collection equality no longer depends on representation.** A computed
  collection — an `Intersection` or `Union` result, a lazy `Map`, `Filter`, or
  `Join` pipeline, or a symbol assigned a collection — now compares equal to a
  literal with the same elements: `Intersection({1,2,3,4}, {2,3,5}) = {2,3}` is
  `True` (it was `False` unless the operand was evaluated first). Sequences
  compare element-wise in order, sets by membership, and a set is never equal to
  a sequence. In addition, `Equal` between two collections now always returns a
  scalar boolean instead of sometimes broadcasting element-wise (`{1,2} = [1,2]`
  returned `["True","True"]`); broadcasting still applies to list-vs-scalar
  comparisons such as `L = 4`.
- **`Intersection` of two `Filter` collections no longer overflows the stack.**
  Membership tests on a lazy `Filter` recursed without bound;
  `Intersection(Filter(…), Filter(…))` now evaluates normally.
- **Indexing a matrix once returns a correctly typed row.** Expressions such as
  `At(At(m, 2), 1)` now validate and evaluate correctly for matrices and other
  rank-2-or-higher collections.
- **List elements and dictionary values are evaluated by `evaluate()` and
  `.N()`.** For example, `["List", "y", ["Add", "y", 1]]` with `y = 7` evaluates
  to `[7, 8]`, and `[1/3].N()` is numericized. Lazy collections such as `Range`,
  `Map`, and `Filter` remain lazily enumerated.
- **Ellipsis lists with symbolic bounds parse to `Range`.**
  `\left[-N,\ldots,N\right]` and `\left[-3N,\ldots,3N\right]` now parse to
  `Range(-N, N)` and `Range(-3N, 3N)`, matching the numeric-start forms
  (`[1,\ldots,N]`). Previously a symbolic start fell through to a raw `List`
  containing a literal `ContinuationPlaceholder`, which enumerated as `NaN`. In
  addition, a `Range` whose bounds bind looser than the `..` operator now
  serializes with parentheses (`(-N)..N`) so it round-trips through LaTeX (an
  unwrapped `-N..N` reads back as `-(N..N)`).
- **Using a symbol bound to a symbolic list no longer corrupts builtin
  definitions.** After `ce.assign('L_1', ce.parse('\\left[N,2N\\right]'))`,
  constructing `2 L_1` — via `subs()`, `ce.box()`, or `ce.function()` —
  permanently broke the builtin `N` operator for the lifetime of the engine:
  every subsequent parse of the token `N` returned an `unexpected-symbol` error.
  Type inference on the list elements no longer overwrites an operator
  definition with an unsatisfiable (`never`) type.

### Cortex

- **`%` and postfix `!` operators**: `a % b` is `Mod(a, b)` (multiplicative
  precedence) and `n!` is `Factorial(n)` (the `!` must directly follow its
  operand; prefix `!x` is still `Not` and `x != y` is still `NotEqual`).
- **Chained indexing**: `m[2][1]` now works alongside `m[2, 1]`.
- **String escape sequences are processed correctly.** `"a\tb\nc"` now contains
  a real tab and newline (escapes were previously double-processed in plain and
  multiline strings; interpolated strings were already correct).
- **The examples suite roughly doubled** (`src/cortex/docs/examples.md`), adding
  units and uncertainty, calculus, linear systems, dictionaries, sets, closures,
  seeded randomness, errors-as-values, and string formatting — every example
  verified by an executable test.

## 0.74.0 _2026-07-10_

This release significantly expands CE's calculus capabilities. Limits, residues,
and series now handle many poles of special functions exactly; infinite sums and
products gain more closed forms and substantially better numeric convergence;
and the optional Rubi integration rules support more integrands, any integration
variable, and reliable time limits. Step-by-step explanations now cover
integration and systems of equations or inequalities, with clearer traces for
simplification.

It also improves exact and symbolic computation throughout the engine. Linear
algebra gains exact ranks, null spaces, eigenvectors, matrix square roots, and
singular values; assumptions and simplification prove more identities; and
several correctness issues involving canonicalization, fractions, symbolic
collections, compilation, and LaTeX parsing are fixed. New special-function
support, reproducible seeded randomness, and more useful Cortex diagnostics
round out the release.

### Calculus

- **Limits and residues at special-function poles evaluate exactly.**
  Expressions at poles of `Gamma`, `Digamma`, `Trigamma`, `PolyGamma`, and
  `Zeta` that previously stayed symbolic now resolve in closed form:
  `\lim_{x\to-1}(x+1)\psi(x) = -1`, `\lim_{x\to0}(\Gamma(x)-1/x) = -\gamma`,
  `\lim_{s\to1}(s-1)\zeta(s) = 1`,
  `\operatorname{Res}_{s=1}\Gamma(s)\zeta(s) = 1`,
  `\operatorname{Res}_{x=0}\Gamma(x)^2 = -2\gamma`, and higher-order poles that
  previously deferred
  (`\operatorname{Res}_{x=-2} \Gamma(x)/(x+2) = 3/4 - \gamma/2`). Deferral
  behavior is unchanged where no exact expansion exists (branch points,
  essential singularities, two-sided pole limits).
- **The polygamma family expands, differentiates, and integrates through the
  ladder.** `Series` now produces correct Laurent expansions of `Trigamma` and
  integer-order `PolyGamma(m, x)` at their poles (previously a spurious regular
  expansion could be produced), and `D` knows `\psi_1' = \psi^{(2)}` and the
  general `d/du\,\psi^{(m)}(u) = \psi^{(m+1)}(u)`. `Series` at a `Digamma` pole
  is also about 20× faster.
- **Residues at infinity evaluate.** `Residue(f, x, \infty)` — any infinite
  point names the Riemann-sphere point at infinity — computes
  `-\operatorname{Res}_{s=0} f(1/s)/s^2` through the exact Laurent kernel:
  `\operatorname{Res}_\infty 1/x = -1`,
  `\operatorname{Res}_\infty \frac{3x^2+2}{x^3+x} = -3` (the negated sum of the
  finite residues).
- **Limits at poles resolve to signed infinities.** A _directional_ limit at a
  pole now evaluates to `\pm\infty` from the exact Laurent data:
  `\lim_{x\to0^+} 1/x = +\infty`, `\lim_{x\to0^-}\Gamma(x) = -\infty`,
  `\lim_{s\to1^\pm}\zeta(s) = \pm\infty`, `\lim_{x\to0^+}\ln x = -\infty`. A
  _two-sided_ limit resolves only when both sides agree (even pole order):
  `\lim_{x\to0} 1/x^2 = +\infty`, `\Gamma(x)^2 \to +\infty`,
  `\ln(x^2) \to -\infty`. Disagreeing two-sided limits (`\lim_{x\to0} 1/x`,
  `\Gamma`, `\ln x` at their poles) deliberately stay inert — the engine does
  not produce `ComplexInfinity` limits.
- **`Beta` joins the meromorphic pole family.** The Laurent kernel expands
  `\operatorname{B}(a,b)` through the `\Gamma`-quotient identity, so residues,
  limits and `Series` at Beta poles evaluate:
  `\operatorname{Res}_{x=0} \operatorname{B}(x,3) = 1`,
  `\lim_{x\to0} x\cdot\operatorname{B}(x,3) = 1`.
- **Numeric limits containing sums now converge instead of hanging.** `N()`
  respects evaluation limits when probing a `Limit` at `\infty` whose body
  contains a variable-length `Sum` or `Product`. Examples that now converge
  quickly include `\lim_{n\to\infty}(\sum_{k=1}^{n} 1/k - \ln n)`, which
  evaluates to the Euler–Mascheroni constant, and
  `\lim_{n\to\infty}\frac{4}{n^2}\sum_{k=1}^{n}\sqrt{n^2-k^2}`, which evaluates
  to `\pi`.
- **Numeric limits with odd-power error terms now converge correctly.** This
  fixes cases such as `H_n - \ln n - \gamma \sim 1/2n`, which previously
  returned `NaN`. Decaying oscillations such as `\operatorname{sinc}` at
  `-\infty` now resolve to `0`, while divergent oscillations such as `\sin x` at
  `\infty` still return `NaN`.

### Step-by-Step Explanations

- **`explain('Integrate')` traces symbolic integration through the Rubi rule
  chain.** With the opt-in integration rules loaded (`loadIntegrationRules(ce)`
  from `@cortex-js/compute-engine/integration-rules`),
  `ce.parse('\\int x\\sqrt{1+x}\\,dx').explain('Integrate')` replays the
  driver's derivation as whole-expression states — term-by-term splits
  (`integrate.sum`), constant factors moved out (`integrate.constant-factor`),
  each corpus rule application (a stable `rubi:…` id with a compact description
  such as _"Apply integration rule 1.1.1.2#19 (Rubi)"_), reductions to special
  functions (`integrate.si-ci`, `integrate.partial-fractions`, …), and a closing
  simplification. A **definite** integral is presented via the Fundamental
  Theorem of Calculus: the antiderivative derivation, then the bracket `F |_a^b`
  (`integrate.fundamental-theorem`), the bounds substituted unevaluated
  (`integrate.evaluate-bounds` — skipped for improper integrals, where the
  bracket is a limit), and the value. Symbolic bounds are supported. The result
  is identical to `evaluate()`. Without the rules loaded, or when the rules
  cannot close the integral, a precise error is thrown. (Also fixed: the LaTeX
  serialization of the two-bound `\left. F \right|_a^b` `EvaluateAt` form
  dropped the upper bound.)

- **`explain('solve')` traces systems of inequalities and mixed systems.** A
  `List`/`And` of linear inequalities in two variables is traced through
  constraint normalization (`solve.system.normalize-inequality`), boundary
  intersection (`solve.system.intersect-boundaries`), and the feasible vertices
  (`solve.system.vertices`); mixed equality/inequality systems show the
  elimination steps, then each candidate checked against the constraints
  (`solve.system.check-constraints`, `solve.system.reject`). Both previously
  threw "not supported" errors.

- **`explain('simplify')` surfaces the work done inside operands.**
  Simplifications applied while descending into the operands of a sum, product
  or function argument — previously summarized by an opaque bookkeeping step —
  now appear as labeled steps with their own rule ids
  (`\tan x\cot x + \frac{x^3+x^2}{x^2}` shows the $\tan x\cot x \to 1$ rewrite
  before the expansion). At default verbosity, consecutive applications of the
  same rule are coalesced into a single step; pass `verbosity: 'all'` for the
  raw chain.

### Integration (opt-in Rubi rules)

- **Integration consistently respects `timeLimitMs`.** Nested integration
  attempts now share the original time limit and recursion safeguards, avoiding
  runaway evaluation on cyclic or difficult subproblems.
- **Any integration variable works—not just `x`.** Integrals using another
  variable could previously return an expression in `x`; for example,
  `\int t^2\,dt` now correctly returns `t^3/3`.
- **Symbolic-coefficient quartic-denominator rationals close.**
  `\int \frac{d+e\,x^2}{a+b\,x^4}\,dx` — and shapes that reduce to it, such as
  `\int \frac{x^6}{(a+c\,x^4)^3}\,dx` — now reach the trinomial terminal rules
  instead of ping-ponging between integrand expansion and binomial splitting.
- **Symbolic-coefficient reciprocal hyperbolics close.**
  `\int \frac{1}{a+b\sinh x}\,dx` and the cosh/tanh/coth/sech/csch variants
  resolve via a rational-normal-form retry in the exponential-substitution
  fallback.
- **Complex special-function closures.** Rational integrands with irreducible
  quadratic denominators split over complex-conjugate roots in the Si/Ci
  fallback, reciprocal-argument integrands like `\int x^m \sin(a + b/x)\,dx`
  close, and inverse-trig antiderivatives producing complex-argument `Erfi`
  evaluate (riding the new complex error-function kernels).
- **`\int F(\ln(a\,x^n))/x\,dx` closes** via a function-of-logarithm recognizer
  (substitution `u = \ln(a\,x^n)`).
- **Products of sines and cosines reduce via product-to-sum** before
  integration, closing mixed-angle products the term-by-term rules could not
  reach.

### Arithmetic

- **Canonical expressions no longer depend on a variable's current value.** A
  mutable symbol holding `0`, `1`, or `-1` could be folded into an expression
  while it was boxed, producing stale and sometimes incorrect results after the
  symbol changed. Canonicalization now folds only literal numbers; symbol values
  are substituted during evaluation. Numeric `const` symbols follow the same
  evaluation behavior as `Pi`.
- **Huge scientific exponents no longer crash.** Parsing or serializing a number
  literal whose exponent exceeds what the bignum layer can represent
  (`1e999999999`) threw; it now overflows cleanly to `+\infty` (and `-\infty`
  for negative mantissas), matching float semantics.
- **Complex values with an infinite component type as `complex`.** A `Complex`
  whose real or imaginary part is infinite was typed `finite_complex`, so
  type-gated paths mishandled it; it now reports the non-finite `complex` type.

### Sums and Products

- **Telescoping sums and products evaluate in closed form.** A sum whose body is
  a `k \to k+1` shift pair collapses exactly, for arbitrary symbolic bounds and
  either orientation: `\sum_{k=0}^{n} \bigl(g(k+1) - g(k)\bigr)` evaluates to
  `g(n+1) - g(0)`. The product counterpart recognizes a shift-quotient body
  after combining it over a common denominator:
  `\prod_{k=1}^{n-1}\left(1 + \frac{1}{k}\right)` evaluates to `n`.
- **`\prod_{k=1}^{n} k` evaluates to `n!`.** The bare-index product with a
  symbolic upper bound returns `Factorial(n)` instead of staying inert.
- **Classic infinite series and products evaluate to their exact closed forms.**
  p-series reduce to the zeta function — `\sum_{k=1}^{\infty} \frac{1}{k^2}`
  evaluates to `\frac{\pi^2}{6}`, `\sum \frac{1}{k^2} + \frac{1}{k^3}` to
  `\frac{\pi^2}{6} + \zeta(3)` (term-wise splitting applies only when every
  summand has a closed form) — and the Wallis product
  `\prod_{k=1}^{\infty}\left(1 - \frac{1}{(2k)^2}\right)` evaluates to
  `\frac{2}{\pi}`. Series with no known closed form stay symbolic under exact
  `evaluate()`, per the infinite-domain contract.
- **`.N()` of convergent infinite sums reaches near machine precision.** The
  numeric path Richardson-extrapolates the partial sums instead of returning a
  plain 10⁴-term truncation: `\sum 1/k^2` now numericizes to ~2·10⁻¹⁶ of `π²/6`
  (previously ~10⁻⁴ off), and series without closed forms benefit equally
  (`\sum 1/(k^2+1)` to ~2·10⁻¹⁴). Divergent or non-smooth series are detected
  and fall back to the capped truncation.

### Equation Solving

- **Trigonometric equations with symbolic coefficients solve correctly.** For
  example, `x^2 - 2x\cos t + 1 = 0` solved for `t` now returns
  `\pm\arccos\left(\frac{x^2+1}{2x}\right)`.

### Assumptions

- **Transitive closure over assumed inequality chains.** Assumptions now chain:
  `a \ge b`, `b \ge c`, `c \ge d` entails `a \ge d`, strictness propagates
  (`p > q > r` entails `p > r` and `p \ne r`), and an antisymmetric cycle
  collapses to equality — Wester 21's `x \ge y, y \ge z, z \ge x` now proves
  `x = z` is `True`. A chain without a back-edge deliberately does _not_ prove
  equality.
- **Even-power monotonicity on ordered positives.** Wester 22's
  `x > y, y > 0 \vdash 2x^2 > 2y^2` now evaluates to `True` (a difference of
  equally-scaled squares factors as `k(x-y)(x+y)` with both factor signs settled
  from the assumptions). `x > y` alone deliberately does _not_ conclude
  `x^2 > y^2`, and solve()'s conservative root-filtering behavior is unchanged.

### Simplification and Exact Arithmetic

- **The Fu strategy reduces same-power sin/cos differences.**
  `simplify({ strategy: 'fu' })` now rewrites `\sin^4 x - \cos^4 x` to
  `-\cos 2x` (and the mirrored/2nd-power forms): a difference of squares whose
  Pythagorean sum factor is `1`, which the exponent-2-only TR5/TR6/TR7
  transforms could not reach. Verified numerically; the default `simplify()`
  path is deliberately unchanged (pinned by test).
- **Exact modulus of complex expressions with radical parts.** `Abs` of a
  constant `a + b\,i` with radical/rational parts computes the exact
  `\sqrt{a^2 + b^2}` when it genuinely folds: Kahan's
  `\left|3-\sqrt{7}+i\sqrt{6\sqrt{7}-15}\right|` simplifies to exactly `1` (its
  `.N()` alone carries a `1.0000000000000000315` float residue), `|5-12i| = 13`,
  `|2+\sqrt{5}\,i| = 3`, `|1+2i| = \sqrt{5}`. A split whose "imaginary part" is
  itself imaginary (a negative radicand) is rejected by a numeric cross-check,
  and symbolic `|x+iy|` never folds.
- **Matrices differentiate elementwise.** `D` over a vector/matrix `List`
  literal maps over the elements (recursively for nested lists) instead of
  producing a nonsensical scalar chain-rule expansion: the second derivative of
  the rotation matrix `[[\cos t, \sin t], [-\sin t, \cos t]]` is `-M`, as it
  should be. `Derivative` shares the fix.
- **`Together` combines fractions correctly.** It now uses a common denominator
  instead of adding numerators and denominators independently:
  `\frac{a}{b} + \frac{c}{d} \to \frac{ad + bc}{bd}`,
  `1 + \frac{1}{k} \to \frac{k+1}{k}`, reusing the denominator when terms
  already share it.

### Linear Algebra

- **Exact null spaces, ranks, and eigenvectors.** The exact bigint-fraction
  elimination introduced for `RowReduce` in 0.73.0 now backs `Kernel`
  (null-space basis vectors come out as exact rationals: `[[2,3],[0,0]]` → basis
  `[-3/2, 1]`), `MatrixRank` (rank = exact pivot count, with no float-tolerance
  ambiguity), and eigenvector computation (when the matrix and the eigenvalue
  are exact rationals, `A - \lambda I` is solved exactly — the eigenvectors of
  `[[4,1],[2,3]]` are the exact `[1, 1]` and `[-1/2, 1]`). Inexact or symbolic
  entries fall back to the numeric path unchanged.
- **`M · M^{-1}` simplifies to the identity for symbolic matrices.** Two fixes
  combine: `simplify()` now recurses into `List` elements (matrix entries were
  previously unreachable by any simplify rule), and a new rule combines a sum of
  fractions sharing an identical denominator into a single fraction so the
  diagonal entries `\frac{a^2 b}{a^2 b - b} + \frac{-b}{a^2 b - b}` cancel to
  `1`.
- **Symbolic matrix rank via the determinant.** `MatrixRank` of a small symbolic
  matrix now concludes when the simplified determinant settles the question: the
  trigonometric matrix
  `[[\sin 2t, \cos 2t], [2\sin t\cos t, \cos^2 t - \sin^2 t]]` has rank `1` (its
  determinant vanishes under `TrigReduce`). Indeterminate cases stay symbolic,
  as before.
- **Vandermonde determinants return the difference product.** The determinant of
  a symbolic Vandermonde matrix (either orientation) is produced directly in its
  factored closed form `\prod_{i<j}(x_j - x_i)` instead of an unfactored
  expansion.
- **The numeric eigensolver converges on hard spectra.** The QR iteration was
  rebuilt as Householder reduction to Hessenberg form followed by the Francis
  double-shift algorithm with deflation. The classic 8×8 Rosser stress matrix —
  double eigenvalue `1000`, a `±10\sqrt{10405}` pair, and a tiny eigenvalue
  `≈0.098` — now yields the true spectrum (the unshifted iteration returned
  wrong values), and non-symmetric matrices get proper complex-conjugate
  eigenvalue pairs (`[[0,-1],[1,0]]` → `\{i, -i\}`).
- **`MatrixPower(M, 1/2)` — principal matrix square root.** Half-integer powers
  of an exact 2×2 positive-semidefinite matrix evaluate exactly via the closed
  form
  `\sqrt{M} = (M + \sqrt{\det M}\,I)/\sqrt{\operatorname{tr} M + 2\sqrt{\det M}}`:
  `MatrixPower([[10,7],[7,17]], 1/2)` → `[[3,1],[1,4]]`, and `3/2`, `-1/2` etc.
  compose with the integer path.
- **New operator: `SingularValues`** — the singular values of a matrix,
  descending, zeros included; exact when the Gram matrix is at most 2×2 with
  rational entries (`SingularValues([[1,1],[2,2],[3,3]])` → `\{2\sqrt{7}, 0\}`),
  numeric via the SVD machinery otherwise. (Across this release's Wester rounds
  the `wester.test.ts` skip ledger drops from 21 to 3 — the remaining three are
  the radical-denesting tail.)

### Core

- **`String(…)` joins values, not serialized forms.** A string operand's quotes
  leaked into the result: `String("x = ", 3)` evaluated to a string whose
  _content_ was `"x = "3`. It now evaluates to `x = 3`. This also fixes Cortex
  string interpolation, which lowers to `String` — the documentation's headline
  example `"\(x) has type \(Type(x))"` now produces `"2047 has type integer"`.
- **`Type` reports the type of symbols and expressions.** The `Type` operator
  holds its operand unevaluated, but an unevaluated operand is not canonical and
  a non-canonical expression has no type — so `Type(y)` returned `"unknown"`
  even for a symbol bound to an integer, and `Type(1 + x)` returned `"unknown"`
  instead of `"number"`. The operand is now canonicalized (still not evaluated)
  before its type is read.

### Cortex Language (Experimental)

- **Runtime problems in non-final statements are no longer silent.** Only the
  last statement's value is returned from `executeCortex`, so an error value
  produced by an earlier statement used to vanish — an unsupported indexed
  assignment (`xs[2] = 9`) or a mid-program `const` reassignment went completely
  unreported. Each non-final statement that evaluates to an error value now
  emits a `runtime-error` diagnostic carrying the statement's source range; the
  final statement's errors stay in `value`, per the errors-are-values contract.
- **Verbatim symbols are truly literal.** The content of a backtick-quoted
  symbol (`` `while` ``) receives no escape processing and must be a valid
  MathJSON symbol name — the verbatim form exists to name reserved words.
  Previously, string escape sequences were applied inside the backticks
  (`` `\sin` `` silently cooked `\s` into a space) even though no valid symbol
  name contains an escapable character, so every such escape could only produce
  an invalid name.
- **New “Examples” documentation page.** Eighteen complete Cortex programs —
  iteration and accumulation, recursion, numeric methods, exact and symbolic
  computation, collections — from FizzBuzz-as-a-`Map` to Newton's method on
  exact rationals, the Basel problem against `\pi^2/6`, and a golden-ratio
  continued fraction checked against a `$…$` LaTeX island. Every program on the
  page is verified by an executable test suite.

### Collections

- **Symbolic-bound `Range` and `Linspace` stay inert instead of collapsing.** A
  symbolic bound was silently coerced to `1`, so `Range(1, n)` behaved as the
  one-element range `[1]` everywhere: `Count(Range(1, n))` evaluated to `1`,
  `Sum(Range(1, n))` to `1`, `Range(1, n) = Range(1, m)` to `True`, and
  materialization produced the literal `[1]`. All of these now stay
  symbolic/indeterminate, across the scalar accessors (`Count`, `At`, equality,
  `SubsetOf`, element sign), iteration, materialization, and the extrema
  (`Supremum`/`Infimum`/`Min`/`Max`). Likewise for `Linspace`: a _symbolic_
  point count is indeterminate (only a _missing_ count selects the default of
  50), and symbolic endpoints no longer materialize as `NaN` literals or fold
  `Sum(Linspace(a, 1, 3))` to `0` — a collection that reports a size but cannot
  compute its elements now keeps its lazy form rather than fold to the
  reduction's initial value. Concrete bounds are unaffected.
- **`Min`/`Max`/`Supremum`/`Infimum` keep unenumerable collections symbolic.**
  The extrema used to iterate any collection operand: an infinite one (a `Map`
  over a continuous `Interval`) ground through the interval's dense sampler
  until the evaluation deadline, and one that reports elements it cannot compute
  (a `Map` over a `Linspace` with a symbolic endpoint) silently _vanished_ from
  the result — `Min(Map(...), 5)` returned `5` even though the mapped values
  could be smaller. Both now stay in the symbolic result. A genuinely empty lazy
  collection (a `Filter` with no matches) still folds away, and finite
  collections fold as before.

### Compilation

- **New `iterationBudget` compile option.**
  `expr.compile({ iterationBudget: 1e6 })` caps the trip count of emitted
  `Sum`/`Product` loops: a loop whose iteration count would exceed the budget —
  including an _infinite_ bound, which previously compiled to a loop that never
  terminated — evaluates to `NaN` instead of running. Compilation without the
  option is unchanged (unbounded loops, zero overhead); the engine's numeric
  limit probes use it internally to stay interruptible.
- **The `interval-js` target compiles every operand of n-ary nodes.** Chained
  relations (`1<x<4`) compiled to only their first binary comparison, and n-ary
  `And`/`Or` dropped every operand past the first pair — for `Or` this was
  unsound in the exclusion direction (an interval admitted only by a dropped
  branch reported a definitive `"false"`, so a mask-driven consumer would
  wrongly cull it). Chains now emit the tri-state conjunction of all pairwise
  comparisons, and `And`/`Or` fold all operands; the `javascript`/`glsl` targets
  were always correct.
- **The `javascript` target fails closed on scalar arithmetic over a list-valued
  operand.** `L + x` with a list-valued `L` previously compiled with
  `success: true` to JS array coercion (returning a _string_). It now reports
  `success: false` with an explanatory error, and the interpretation fallback
  returns the correct broadcast list. Supported list compilation — broadcast
  (`\sin([x, 2x])`), literals, ranges, GPU vectors, custom vector operators — is
  unchanged.
- **Seeded, reproducible randomness: `ce.randomSeed`.** Assigning a `number` or
  `string` seed makes `Random()`/`Random(n)` (and `Shuffle`, `Sample`) draw from
  a per-engine deterministic PRNG stream; re-assigning the same seed resets the
  stream so identical evaluation sequences reproduce, and `null` (the default)
  restores non-deterministic behavior. With a seed set at compile time, each
  `Random` node in a `javascript`-target compilation bakes to a constant derived
  from the seed and the node's position — a compiled plot function returns the
  same value at the same call site on every invocation (one draw per
  compilation), instead of flickering per sample. The explicit per-call
  `Random(seed)` overload is unchanged.
- **GLSL masked branches emit an overridable `_gpu_nan()` helper.** The
  else-branch of a compiled `When`/`Which`/`If` was a bare `0.0 / 0.0`, whose
  NaN semantics GLSL ES 1.00 leaves implementation-defined. The literal now
  lives in a single selective-preamble helper that ES 3.00 hosts can replace
  with `intBitsToFloat(0x7FC00000)` for a guaranteed bit pattern.

### Parsing

- **Bare-command function names `\abs`, `\floor`, `\mod`, `\sign` parse as
  function calls.** `\abs\left(x\right)` → `Abs(x)`, `\floor(x)` → `Floor(x)`,
  `\mod(a, b)` → `Mod(a, b)`, `\sign(x)` → `Sign(x)` — common informal shorthand
  (and Desmos output) that previously errored with `unexpected-command`. The
  infix `a \mod b` (synonym of `\bmod`) is unchanged. Also,
  `\operatorname{sign}` now aliases to `Sign` like `sgn` (it previously parsed
  silently as a free symbol `sign` multiplied by the argument).
- **A dot-number after a closing group multiplies.**
  `\left(1-t\right).9\left(2\right)` and `t^{i}.4` parse the `.9`/`.4` as a
  decimal literal juxtaposed with the preceding operand (implicit
  multiplication), instead of erroring with `unexpected-operator`. Degenerate
  dot sequences after a _number_ (`1.2.3`) still error, and member access
  (`v.x`), ranges (`1..2`), and trailing-dot numbers (`(1., 2)`) are unaffected.
- **`\frac{d}{X}` is a division unless the denominator is a differential.**
  Leibniz-derivative parsing now requires an actual `d`-marker in the
  denominator (`\frac{d}{dx}`, `\frac{dy}{dx}`, `\frac{d^2}{dx^2}`…). A bare-`d`
  numerator over a plain denominator — `\frac{d}{L}` where `d` is an ordinary
  variable, common in pedagogy graphs — previously parsed to a malformed
  derivative `D(missing, L)`; it is now `Divide(d, L)`.
- **A matrix environment parses as a function argument.**
  `\operatorname{Trace}\left(\begin{pmatrix}1&2\\3&4\end{pmatrix}\right)` — and
  any library or user-declared function called on a `pmatrix`-family
  environment, with or without `\left`/`\right` — parsed the argument as a
  missing-argument error, so `Trace`, `Eigenvalues`, `Eigenvectors`, etc.
  appeared broken from LaTeX while working from MathJSON. The matrix (alone or
  among other arguments) now parses, evaluates, and round-trips.

### API

- **`ce.operatorInfo()` reports computability.** The returned record now carries
  `canEvaluate: boolean` — `true` when the operator's definition has an
  evaluation rule, `false` for a registered-but-inert head that only
  parses/serializes (e.g. `To`, `Tilde`). Together with an `undefined` return
  (no operator definition), integrators can gate free-form input on "can this
  actually compute" instead of hand-maintaining allowlists. Note: heads that
  reduce via canonicalization to another operator (`Exp` → `Power`, `Greater` →
  `Less`) report `false`; query the canonical form.

### Special Functions

- **New operators: `SinhIntegral` and `CoshIntegral`** — the hyperbolic sine and
  cosine integrals Shi and Chi, with numeric evaluation for real _and_ complex
  arguments (`Shi(2) ≈ 2.50157`, `Chi(2) ≈ 2.45267`; validated against mpmath)
  and derivatives (`\frac{d}{dx}\operatorname{Shi}(x) = \frac{\sinh x}{x}`,
  `\frac{d}{dx}\operatorname{Chi}(x) = \frac{\cosh x}{x}`). Exact arguments stay
  symbolic under `evaluate()`; `.N()` owns the numeric path.
- **`Erf` and `Erfi` evaluate for complex arguments.** Both error functions now
  have full complex-plane numeric kernels
  (`\operatorname{erf}(1+i) ≈ 1.31615 + 0.19045i`, validated against mpmath),
  instead of evaluating only on the real line.
- **Subscripted special-function notation parses.** `\operatorname{W}_{-1}(x)`
  now parses to the two-argument `["LambertW", x, -1]` (branch last), and
  `\operatorname{J}_{n}(x)` / `\operatorname{Y}` / `\operatorname{I}` /
  `\operatorname{K}` parse to `BesselJ(n, x)` et al. (order first) — these forms
  previously serialized but did not parse back, so LaTeX round-trips of
  non-principal Lambert branches and indexed Bessel functions now close.
- **The two-argument `LambertW(z, k)` differentiates.** Every fixed branch
  satisfies the same functional equation, so
  `d/dz W(z,k) = W(z,k)/(z·(1+W(z,k)))` now carries the branch through (chain
  rule included); the derivative with respect to the discrete branch index stays
  inert. Verified against central differences on both real branches.
- **Fungrim identities: `W₋₁(x·ln x) → ln x` fires.** The upstream entry
  `a172c7` published an _empty_ assumption interval
  (`OpenClosedInterval(0, −1/e)`); the corrected band `x ∈ (0, 1/e]` was fixed
  in the corpus fork (submitted upstream), and the recompiled identities
  artifact now carries the rule: with `loadIdentities(ce)` and
  `assume(0 < x ≤ 1/4)`, `simplify(W(x·ln x, −1))` returns `ln x`.
- **Fungrim identities: the polygamma family is live (+28 rules, artifact
  1,442).** The corpus' 2-argument `DigammaFunction(z, m)` (the order-`m`
  polygamma) now translates to CE's native `PolyGamma(m, z)` instead of a
  compat-shadowed 2-arg `Digamma`, so 28 previously skipped identities and
  special values compile and fire: `simplify(PolyGamma(1, 1)) → π²/6`,
  `PolyGamma(1, 1/4) → π² + 8·Catalan`, `PolyGamma(1, 1/2) → π²/2`, the
  digamma/polygamma recurrence and reflection identities, and more.
- **Fungrim identities: set-builder comprehensions get a real encoding (+8
  rules, artifact 1,450).** Corpus formulas of the shape
  `{f(x) : x \in S, P(x)}` used to translate to a literal `Set` that CE read as
  a two-element enumeration — producing wrong scalars where one was consulted
  (`Count` of a set-builder returned its operand count). They now translate to
  the faithful `Map(Filter(S, P), f)` form, which both fixed the miscounts and
  _recovered_ nine identities whose match side had been untranslatable — notably
  the prime-counting definition, so with `loadIdentities(ce)`, `simplify`
  rewrites `Count(\{p \in \mathrm{Primes} : p \le x\})` to
  `\operatorname{PrimePi}(x)`. Extrema over comprehensions
  (`\min\{f(x) : x \in S\}`) get the same encoding. The full 2,551-entry corpus
  now validates with **zero** numerically false entries.

## 0.73.0 _2026-07-09_

### New Operator: `Interpret`

- **`Interpret(expr)` gives formal meaning to elliptical notation.** Evaluating
  `["Interpret", expr]` turns a continuation-bearing sum or product (the inert
  notational objects produced by the ellipsis fold barrier, see below) into a
  formal `Sum`/`Product`: `Interpret(1 + 2 + \dots + n)` → `\sum_{k=1}^{n} k`,
  `Interpret(2 \cdot 4 \cdot \dots \cdot 2n)` → `\prod_{k=1}^{n} 2k`, and
  `Interpret(1 + 2 + \dots + 100)` → a `Sum` that evaluates to `5050`.
  Interpretation is an explicit opt-in — a plain `evaluate()` never guesses —
  and the gate is strict by design: at least two exact numeric sample terms in
  arithmetic progression and a single anchor whose implied upper bound is
  integral (so `1 + 3 + \dots + 2n`, whose even anchor does not belong to the
  odd progression, stays untouched). Anything the gate cannot prove is returned
  unchanged.
- **Polynomial and geometric patterns are recognized too (v2).** Successive
  finite differences identify polynomial general terms —
  `Interpret(1 + 4 + 9 + 16 + \dots + n^2)` → `\sum_{k=1}^{n} k^2`, cubes and
  triangular numbers likewise — and a constant exact ratio identifies geometric
  ones: `1 + 2 + 4 + \dots + 2^n` → `\sum_{k=1}^{n+1} 2^{k-1}`,
  `2 \cdot 4 \cdot 8 \cdot \dots \cdot 2^n` → `\prod_{k=1}^{n} 2^k`. Numeric
  anchors resolve to concrete bounds (`1 + 4 + 9 + \dots + 100` → a sum to 10
  that evaluates to `385`). An evidence discipline guards against overfitting: a
  degree-g polynomial needs its constant difference row witnessed twice, or one
  fewer sample when the anchor structurally confirms the general term — three
  samples fit _any_ quadratic, so `1 + 2 + 4 + \dots + m` stays untouched.
- **Linear recurrences are recognized (v3).** An exact-rational Berlekamp–Massey
  pass finds the minimal constant-coefficient recurrence (order ≥ 2) behind the
  samples, obtains a verified closed form through `RSolve`, and resolves numeric
  anchors by iterating the recurrence exactly:
  `Interpret(1 + 1 + 2 + 3 + 5 + 8 + \dots + 55)` →
  `\sum_{k=1}^{10} \operatorname{Fibonacci}(k)`, which evaluates exactly to
  `143`; Pell-number sums likewise (with a Binet-style body). The same evidence
  discipline applies — a recurrence of order L needs `2L+1` samples (or `2L`
  with a confirming anchor), so primes and factorials stay untouched. Closed
  forms are verified against every sample before being trusted.
- **Subtraction-spelled ellipses are protected too.**

### Number Theory

- **Modular arithmetic reaches common notation.** `Mod` and `Congruent` now
  reduce integer-valued expressions in ℤ/mℤ without materializing the
  (potentially astronomically large) intermediate value. Modular exponentiation,
  sums, products, negations and factorial reduction are all handled, so
  `2^{3^{20}} \pmod{100}` evaluates to `52` and
  `2^{3^{20}} \equiv 52 \pmod{100}` evaluates to `True`, where both used to stay
  inert. The floored-sign convention of `Mod` (the result follows the divisor)
  is preserved on the new path.
- **New `ModularInverse(a, m)`** returns the modular multiplicative inverse of
  `a` modulo `m` — the integer `x` in `[0, m)` with `a·x ≡ 1 (mod m)` — and
  stays symbolic when `a` and `m` are not coprime.
- **Linear congruences and CRT systems solve.** `solve` on a linear congruence
  returns the parametric residue family with a fresh integer parameter `t ∈ ℤ`
  (`6n \equiv 4 \pmod 7` → `7t + 3`), an empty result when there is no solution
  (`2x \equiv 1 \pmod 4`), and reduces gcd-divisible congruences
  (`4x \equiv 2 \pmod 6` → `3t + 2`). A system of simultaneous congruences in
  one unknown is combined via the Chinese Remainder Theorem — including
  non-coprime moduli — into a single family (`x \equiv 2 \pmod 3`,
  `x \equiv 3 \pmod 5`, `x \equiv 2 \pmod 7` → `105t + 23`); an inconsistent
  system reports no solution.
- **Huge exact products stay symbolic instead of overflowing.** `Multiply` now
  applies the same digit-count budget as `Power` when an exact power term
  (`base^exp`) would be folded into a product's numeric coefficient: if
  materializing that power would exceed the budget, the factor is kept as a
  symbolic `Power` term rather than computed eagerly (`2 \cdot 3^{5000000}`
  stays `2 \cdot 3^{5000000}` instead of building a multi-million-digit
  `bigint`). This also lets `Mod`/`Congruent` reduce such products —
  `2 \cdot 3^{5000000} \pmod 7` evaluates to `4` — without ever materializing
  the giant intermediate value.

### Arithmetic

- **New operator: `PolyLog` — the polylogarithm Liₛ(z).** Numeric evaluation for
  integer order s ≥ 2 over the whole complex plane (validated against mpmath to
  ≈5·10⁻¹⁵; branch cut z ∈ (1, ∞) with the below-the-cut convention), and exact
  reductions for the elementary orders and special points: `Li₁(z) → −ln(1−z)`,
  `Li₀(z) → z/(1−z)`, `Li₋₁(z) → z/(1−z)²`, `Liₙ(1) → ζ(n)`,
  `Liₙ(−1) → (2^{1−n}−1)·ζ(n)`, `Liₛ(0) → 0`. Parses and serializes as
  `\operatorname{Li}_s(z)` (the unsubscripted `\operatorname{Li}`,
  conventionally the _offset_ logarithmic integral, is deliberately not
  claimed).
- **`LogIntegral` now has its standard notation.** `\operatorname{li}(x)` parses
  to `LogIntegral` and serializes back (previously the fallback
  `\mathrm{LogIntegral}(x)`).
- **Repeating decimals box as exact rationals.** A LaTeX repeating-decimal
  literal — vinculum (`0.\overline{3}`), dots
  (`0.\overset{.}{1}4285\overset{.}{7}`), parenthetical (`1.54(2345)`), or arc
  (`0.\wideparen{142857}`) notation — and the MathJSON `{num: "0.(3)"}`
  shorthand now box directly to the exact `Rational` they represent
  (`0.\overline{3}` → `["Rational", 1, 3]`, `1.(2345)` →
  `["Rational", 12344, 9999]`) instead of a truncated decimal float carrying a
  repeating-decimal marker.
- **`Norm` accepts point-like `Tuple`s.** `\|(-3, 4)\|` now evaluates to `5`
  instead of leaving the expression inert.
- **Double-factorial symbolic reductions.** Under `simplify()`, `(2n)!!` reduces
  to `2^n \cdot n!` and `(2n+1)!!` reduces to `\frac{(2n+1)!}{2^n \cdot n!}`
  when `n` is integer-typed.

### Equation Solving

On a 40-case univariate solving benchmark derived from SymPy's own test suite
(graded by substituting the returned roots back into the equation), this release
reaches **38/40 — parity with both SymPy and Mathematica** — up from 26/40 for
the previous release (base engine, without the opt-in solve templates: 33/40, up
from 24). The two remaining cases (Dottie-style transcendental fixed points) are
unsolved by SymPy and Mathematica as well. What changed:

- **Inverse trigonometric and hyperbolic equations solve exactly.**
  `\arcsin x = c`, `\arccos x = c` and `\arctan x = c` return the exact root
  (`\arcsin x = \frac12` → `\sin\frac12`), with out-of-range constants correctly
  rejected (`\arctan x = 2` has no solution — `2` is outside arctan's range).
  `\sinh x = c` and `\tanh x = c` return their single root, and `\cosh x = c`
  returns **both** roots `\pm\operatorname{arcosh}(c)`.
- **Exponential-symmetric equations are recognized.** `e^x \pm e^{-x}`
  harmonizes to `2\cosh x` / `2\sinh x` before solving, so `e^x + e^{-x} = 4`
  returns both roots `\pm\operatorname{arcosh}(2)`.
- **Two-absolute-value equations solve.**
  `a\,\lvert f(x)\rvert = b\,\lvert g(x)\rvert` is squared into
  `a^2 f^2 - b^2 g^2` (candidates are validated against the original equation,
  so no extraneous roots): `\lvert x-1\rvert = \lvert x+3\rvert` → `-1`.
- **Rational equations cancel correctly before solving.** Clearing denominators
  no longer expands numerators past their common factor (`\frac{2x}{x+2} = 1` →
  `2`), and pure-number denominators are no longer multiplied through at all —
  rational constants stay where the solve patterns expect them.
- **`LambertW` gains the real lower branch W₋₁.** The 2-argument form
  `["LambertW", z, k]` selects the branch (`k` is `0` or `-1`; other branches
  stay symbolic): exact evaluation, machine- and arbitrary-precision numerics on
  the branch domain `[-1/e, 0)`, compilation, and `\operatorname{W}_{-1}(x)`
  LaTeX serialization. `W(-\frac1{10}, -1)` evaluates symbolically and `.N()`s
  to `-3.5771520639…`.
- **The opt-in solve templates now cover Lambert-type equations on both real
  branches.** With `loadIdentities(ce, { solve: true })` (from the `identities`
  bundle), equations reducible to `W` solve exactly and return **every real
  root**: `x e^x = -\frac1{10}` →
  `\{\operatorname{W}(-\frac1{10}), \operatorname{W}_{-1}(-\frac1{10})\}`,
  `e^x - x - 2 = 0` →
  `\{-2 - \operatorname{W}(-e^{-2}), -2 - \operatorname{W}_{-1}(-e^{-2})\}`, and
  mixed linear-exponential forms like `x + 2^x = 0` →
  `-\operatorname{W}(\ln 2)/\ln 2`. Exact rational, float, and integer
  right-hand sides are all handled. The identities library also simplifies
  `W(x e^x, -1) \to x` under `assume(x \le -1)`.

### Integration (opt-in Rubi rules)

New rule coverage in the `integration-rules` bundle (`loadIntegrationRules`):

- **Polynomial × csc²/sec² integrates by parts.** `\int x\csc^2 x\,dx` →
  `-x\cot x + \ln \sin x`, and likewise for `P(x)\sec^2(ax+b)` with any
  polynomial `P` (the recursion reduces the polynomial degree).
- **Rational × sin/cos of a linear argument reduces to Si/Ci.**
  `\int \frac{\sin x}{x+1}\,dx` returns the exact
  `\sin(-1)\operatorname{Ci}(x+1) + \cos(-1)\operatorname{Si}(x+1)` form via
  partial fractions over linear factors.
- **Secant-family binomials route through the dedicated secant rules.**
  Integrands like `\frac{1}{1+\sec x}` now resolve
  (`x - \frac{\tan x}{\sec x + 1}`) instead of returning unevaluated.
- **Cotangent integrands reflect onto the tangent rules**, closing forms like
  `\int \cot^3 x\,dx` → `-\frac{\cot^2 x}{2} - \ln \sin x`.

### Simplification and Exact Arithmetic (Wester round 1)

- **Rational radicands extract perfect-power factors.** `(1029/1000)^{1/3}` now
  canonicalizes to `\frac{7}{10}\sqrt[3]{3}` (numerator and denominator factored
  independently), extending the existing integer-radicand extraction. Also fixed
  an exactness leak where a higher root of an exact literal could evaluate to a
  float times `Root(1, n)` (e.g. Wester 28's `2^{1/3}` expressions now stay
  all-exact under `evaluate()`).
- **Pythagorean factoring in `simplify()`.**
  `\cos^3 x + \cos x\sin^2 x - \cos x` now simplifies to `0`: a sum with a
  shared factor times `\cos^2 u` and `\sin^2 u` combines
  (`g\cos^2 u + g\sin^2 u \to g`), generalizing the bare
  `\sin^2 x + \cos^2 x \to 1` case.
- **Rational-function cancellation fires in `simplify()`** (Wester 14):
  `\frac{x^2-4}{x^2+4x+4}` simplifies to `\frac{x-2}{x+2}`. The cancellation
  machinery existed but its result was destroyed by a subsequent
  expand-over-sum-denominator rewrite in the same pass; that split is now
  suppressed (it never reduces complexity).
- **`Binomial(n, k)` and `Pochhammer(a, k)` expand for small literal `k`** with
  a symbolic first argument: `Binomial(n, 3)` evaluates to
  `\frac{n(n-1)(n-2)}{6}`, `Pochhammer(a, 3)` to `a(a+1)(a+2)` (k ≤ 20).
  `Pochhammer` is a newly registered operator (it previously had no definition
  and was fully inert).
- Six Wester CAS-review tests unskipped in `wester.test.ts` (the skip ledger
  drops from 27 to 21).

### Linear Algebra

- **`RowReduce` is exact on exact input.** Reduction of an integer or rational
  matrix now uses exact bigint-fraction elimination — the RREF of an integer
  matrix has exact `-1`/`3` pivots instead of `-0.999…`/`2.999…` float
  artifacts. Float matrices use the numeric path unchanged.
  (`NullSpace`/`MatrixRank`'s float elimination is tracked in the ROADMAP for
  the same treatment.)
- **Products of declared matrices type correctly.** A product with a
  matrix/vector/list-typed operand now carries the collection type instead of
  collapsing to a numeric type: with `X` and `Y` declared `matrix`, `2Y`, `XY`,
  `X - Y` and `3X + 2Y` all type as `matrix` (previously `finite_number`, which
  made `\det(XY)` fail validation as an `incompatible-type` error). `Trace` of a
  matrix now types as `number`. All-scalar products are unchanged. Note:
  _undeclared_ symbols in a matrix-expecting argument (`\det(A+2B)` with fresh
  `A`, `B`) still infer as numbers — declare matrix/vector symbols for symbolic
  matrix algebra (see the ROADMAP "Matrix-operator typing" item for the planned
  inference-ordering fix).

### Units

- **Compound units cancel in quantity arithmetic.** Multiplying or dividing
  quantities now cancels units structurally instead of accumulating them:
  `18 \text{ in} / (12 \text{ in/ft})` evaluates to `1.5 \text{ ft}` (previously
  the inscrutable `1.5 \text{ in/in/ft}`). A repeated unit symbol cancels
  exactly — no conversion factors are introduced — while different units of the
  same dimension on opposite sides of a fraction bar are converted and folded
  into the magnitude: `\frac{10 \text{ m} \cdot 1 \text{ s}}{5 \text{ in}}` →
  `78.74 \text{ s}`. Products of same-dimension units are left as written
  (`2 \text{ in} \cdot 3 \text{ ft}` stays `6 \text{ in} \cdot \text{ft}`), and
  simplification to named derived SI units still applies afterwards
  (`2 \text{ N} \cdot 3 \text{ m}` → `6 \text{ J}`). Works with measurement
  (uncertainty-carrying) magnitudes as well.
- **New units: `yd`, `qt`, `pt`, `cup`, `wk`.** Yards, quarts, pints, cups (US
  liquid convention, consistent with the existing US `gal`) and weeks join the
  unit registry, with their English word aliases (`5 \text{ yards}` →
  `5 \text{ yd}`), and convert exactly: `1 \text{ gal} / 1 \text{ qt}` evaluates
  to `4`.
- **Currency: dollars and cents.** A new currency dimension backs the `USD` and
  `cent` units (`18 \text{ dollars}` → `18 \text{ USD}`,
  `1 \text{ dollar} + 50 \text{ cents}` → `1.5 \text{ USD}`), and currency
  participates in unit cancellation (`\$6 / (\$2/\text{lb})` → `3 \text{ lb}`).
  Other currencies are deliberately not modeled: exchange rates are not fixed
  constants, so cross-currency expressions stay inert rather than silently
  wrong.
- **Spaced unit phrases parse.** Multi-word unit text such as
  `60 \text{ miles per hour}` now parses to `60 \text{ mi/h}` — spaces inside
  `\text{...}` unit annotations are preserved and `per` reads as division —
  where previously the words ran together and the unit was not recognized.

### New Notations

- **Base-subscript numerals compute.** A numeral with an integer-literal
  subscript base, e.g. `10111_2` or `2748_{16}`, now parses to the numeric
  `BaseForm(value, base)` head (`10111_2` → `["BaseForm", 23, 2]`), so
  arithmetic on based numerals works: `1011_2 \cdot 101_2` evaluates to `55`,
  and `11_8 - 3_8 = 6_8` evaluates to `True`. The guard is strict — every digit
  must be valid for the base (`19_2` stays an inert `Subscript`), subscripted
  symbols (`x_2`) are unchanged, and values larger than 2⁵³ stay exact. The
  `BaseForm` LaTeX serializer was also fixed (it emitted an unbalanced
  parenthesis) and now round-trips: `BaseForm(23, 2)` serializes as `10111_{2}`.
  A numeral with a **symbol** subscript base, e.g. `161_b` or `161_{b}`, now
  parses to `BaseForm` of the digit polynomial in that base (`161_b` →
  `["BaseForm", ["Add", ["Power", "b", 2], ["Multiply", 6, "b"], 1], "b"]`, i.e.
  `b² + 6b + 1`), so arithmetic works symbolically (`161_b + 134_b` evaluates to
  `2b² + 9b + 5`) and the numeral round-trips back to `161_{b}`. Base equations
  solve: `161_b + 134_b = 315_b` reduces to `b² − 8b = 0` and solves to `b = 8`
  (and `b = 0`).
- **Sequence-braces notation.** `\{a_n\}_{n=1}^{\infty}` now parses to the new
  inert `IndexedSequence(term, index, lower, upper)` head instead of an
  `incompatible-type` error. The term uses the operator-call form
  (`["a_", "n"]`) so the index binding survives; `_{n\in\mathbb{N}}` subscripts
  map to the set's least element as the lower bound; the expression is inert
  under `evaluate()` and `simplify()` and round-trips through LaTeX. Bare
  `\{a_n\}` remains a `Set`, and the parenthesized form `(a_n)_{n\in\mathbb{N}}`
  is unchanged.

### Ellipsis Expressions

- **Sums and products no longer fold numeric terms across an ellipsis.** An
  `Add` or `Multiply` containing an ellipsis (`\dots`, the
  `ContinuationPlaceholder` symbol) is a notational pattern, not an arithmetic
  one: it now keeps its operands in source order with their structure intact,
  and is returned unchanged by `evaluate()`, `N()` and `simplify()`. Previously
  `1 + 2 + \dots + n` canonicalized to `n + 3 + \ldots` — folding the sample
  terms and destroying the pattern — and `2 \cdot 4 \cdot \dots \cdot 2n` folded
  to `16 \cdot \ldots \cdot n`, tearing the coefficient out of the `2n` anchor.
  Such products also round-trip through LaTeX now (an explicit `\times` is
  emitted around the ellipsis instead of juxtaposition).

### LaTeX Parsing

Recovery fixes from the Hendrycks-MATH genre sweep (`docs/mathnet/`), taking
that corpus from 97.09% to 97.38% clean parse:

- **Ordinal superscripts** devolve to the base number: `13^{\text{th}}` now
  parses as `13` (also `1^{\text{st}}`, `k^\text{th}`, `\mbox` variants). Only
  an exact ordinal suffix (`st`/`nd`/`rd`/`th`, case-insensitive) is dropped;
  other superscripts are unchanged.
- **Empty scripts are dropped:** `x^{}` and `x_{}` now parse as `x` instead of
  producing an error.
- **`{,}` thousands separator:** the LaTeX thin-separator idiom `1{,}000` now
  parses as the number `1000`. Only between digits, and a configured
  `decimalSeparator: '{,}'` (European convention) takes precedence — `3{,}14`
  still parses as `3.14` in that mode.
- **`\cancel`, `\bcancel`, `\xcancel`** unwrap to their body, and
  **`\cancelto{4}{72}`** parses to the replacement value `4` — matching the
  worked-solution usage the notation comes from.
- **`\not`-prefixed relations** compose into the negated relation: `\not=` →
  `NotEqual`, `\not\in` → `NotElement`, `\not\equiv` (incl. a trailing
  `\pmod n`) → the negated congruence, `\not\subset` → `NotSubset`, and
  relations without a dedicated negated head wrap in `Not(…)`.
- **Standalone `\pmod{7}`** now places the modulus as the second argument of
  `Mod` (previously the operands were flipped).
- **`(2n)!!` stays symbolic:** `Factorial2` accepts symbolic arguments (its
  signature was integer-only and rejected `2n` with an `incompatible-type`
  error); numeric double factorials are unchanged (`8!! = 384`).
- **Primed variables type-check as arguments:** `\sin a'` now parses to
  `Sin(Prime(a))` instead of a type error — `Prime` mirrors the type of its base
  (a primed value is a value; a primed function is a function). Derivative
  notation (`f'(x)` → `D(f(x), x)`) is unchanged.
- **Bare `N`/`D` devolve to variables in all argument positions:**
  `N \equiv 1 \pmod k` now parses as a congruence over the variable `N`
  (previously the standard-library `N` operator's function type failed the
  relation's numeric parameter check; the existing devolution fallback ran only
  for arithmetic operators). Applied uses (`N(2/3)`) still call the operator.
- **Congruence chains and fragments:**
  `3^{27}\equiv 3^7\pmod{100}\equiv 87\pmod{100}` folds into a conjunction of
  the adjacent congruence steps; a leading `\equiv b \pmod n` with an elided
  left-hand side recovers with a missing-operand placeholder.
- **Empty subscripts on multi-letter symbols are dropped:** `\alpha_{}` parses
  as `alpha` (completing the earlier `x_{}`/`13^{}` fix).
- **English unit words in `\text{…}` parse as quantities.** `18 \text{ inches}`
  → `["Quantity", 18, "in"]`: common measurement words (singular and plural —
  inches, feet, miles, gallons, pounds, minutes, hours, meters, liters, degrees,
  …) are normalized to their canonical unit symbols at the parse boundary,
  including inside compound units (`\text{ inches/foot}` → `in/ft`). An exponent
  _outside_ the text binds to the trailing unit factor:
  `7.5 \text{ gallons/ft}^3` → `Quantity(7.5, gal/ft³)` (gallons per cubic foot,
  not `(gal/ft)³`). Strictly gated: the whole text must resolve as a unit, so
  prose like `9\text{ to }80` is untouched. No `ton(s)` alias (a US short ton is
  not the metric tonne `t` — mapping it would be a silent 10% error).

### Restriction Braces

- **Comma-separated brace conditions combine as a union (`Or`).**
  `x^2\{x\ge0, x\le3\}` now parses to `["When", x², ["Or", 0≤x, x≤3]]` — each
  comma element is piecewise shorthand for `cond: 1` evaluated first-match, so
  the expression is defined where **any** condition holds. (Previously the
  condition was a `Tuple`, which is not boolean and could not compile.) Stacked
  braces (`\{c_1\}\{c_2\}`) still AND-combine, unchanged.
- **Colon groups parse as piecewise value selectors.** `x\{x>0:1, x<0:-1\}` now
  parses to `["Multiply", "x", ["Which", 0<x, 1, x<0, −1]]`: a brace group is a
  first-class piecewise _value_ (`{cond}` ≡ `{cond: 1}`) attached by
  juxtaposition — i.e. multiplication, the same convention that makes the
  bare-condition form a restriction. A trailing bare value is the else branch
  (`\{x>0:1, -1\}` → `…, "True", −1`), and a bare condition inside a colon group
  means `cond: 1`. (Previously the `cond:val` pairs were parsed as a `When`
  _gate_ for the body — inverted semantics.)
- **`When` now masks correctly on the `interval-js` compile target.** The
  interval comparisons return the tri-state string `'true' | 'false' | 'maybe'`
  — all truthy — so the previously-emitted JS ternary could never take its
  masking branch: an input interval entirely outside the restriction returned a
  normal interval result. `When` now compiles to a tri-state-aware runtime
  helper (`_IA.restrict`): `'false'` masks (`{kind: 'empty'}`), `'true'` passes
  the value through, and `'maybe'` — an input straddling the restriction
  boundary — reports the value range as domain-clipped
  (`{kind: 'partial', domainClipped: 'both'}`) so adaptive samplers see a domain
  edge rather than a clean interval. Scalar `javascript` and `glsl` `When`
  emission is unchanged.

### Pipelines and Held Operands

- **Hold operators reduce transformer heads.** `Solve`, `Integrate`, and `Limit`
  hold their expression operand (so an equation is not collapsed to a boolean
  before solving) — but a held operand whose head is an expression _transformer_
  (`Simplify`, `Expand`, `ExpandAll`, `Factor`, `Together`, `Distribute`,
  `TrigExpand`) is a computation step and is now reduced before the algorithm
  runs. `x^2+2x+1 \rhd \operatorname{Simplify} \rhd \operatorname{Solve}` now
  returns `[-1]` (previously `[]`: the solver found no roots in an expression
  whose operator was `Simplify`), and `\int \operatorname{Simplify}(x^2)\,dx` /
  `\lim` of a transformer-wrapped body compute instead of staying inert. Only
  the curated transformer set is reduced — full evaluation would collapse
  relations and substitute assigned values into the unknown.
- **Unknown-inference defers on the pipe topic placeholder.** Operators that
  infer their variable when omitted (`Solve`, `D`, `Series`, the polynomial
  operators) no longer run that inference on the pipeline topic placeholder `_`:
  `ce.box(["Solve", "_"])` stays `["Solve", "_"]` instead of canonicalizing to
  `["Solve", "_", "_"]`, which baked the placeholder into the unknown slot so a
  _prefix_ pipeline stage (`\rhd \operatorname{Solve}`) computed
  `Solve(expr, expr)` → `[0]` where the infix spelling returned `[-1]`. `Solve`
  re-infers the unknown when the applied stage evaluates; the two spellings now
  agree. Piping an _equation_ through the prefix form works too, now that an
  undecidable `Equal` survives the lambda's argument pre-evaluation (see
  "Undecidable Relations Stay Symbolic" below): `Apply(\rhd Solve, x^2 = 4)` →
  `[2, -2]`.

### Undecidable Relations Stay Symbolic

- **An equation with free variables is a condition, not a falsity.** `Equal` and
  `NotEqual` with an undecidable comparison now stay **inert** under
  `evaluate()`: `x^2 = 4` evaluates to itself instead of `False` (and `x \ne 4`
  to itself instead of `True`). This matches the inequality operators —
  `x^2 < 4` already stayed symbolic — and Mathematica's `==`. Decidable
  comparisons are unchanged (`2+2=4` → `True`, `2=3` → `False`, `x=x` → `True`),
  list/scalar elementwise comparisons are unchanged, and assumption discharge
  still applies (`assume(z > 0)` ⇒ `z \ne 0` → `True`). The previous collapse
  silently ruined stored equations: a notebook cell holding `x^2 = 4` evaluated
  to `False` at storage time, breaking every answer-referencing `Solve` pipe
  downstream.
- **`If` and `Which` stay unevaluated on an undecided condition.** A condition
  that is boolean-typed but not yet decidable (e.g. `x = 4` with a free `x`)
  leaves the conditional inert — it may become decidable once the variables are
  bound — instead of throwing `Condition must evaluate to "True" or "False"`
  (or, previously for `Equal` conditions, silently taking the else branch).
  Genuinely non-boolean conditions (a number, a misspelled symbol) still throw
  with the spell-check hint.

### Issues Resolved

- `toLatex({ digits: <number> })` no longer throws
  `RangeError: The number NaN cannot be converted to a BigInt` on a
  bignum-precision engine. A bare number — not part of the documented
  `DisplayDigits` forms, but the exact shape of a mechanical
  `fractionalDigits: n` → `digits: n` migration — is accepted with the
  deprecated numeric convention (`n ≥ 0` = fractional digits, `n < 0` =
  significant digits), and a genuinely invalid shape reports a clear validation
  error instead of crashing.
- The engine no longer trips its own
  `` `digits` and `fractionalDigits` were both specified `` deprecation warning.
  The serializer re-entered the public `toMathJson()` boundary — which always
  carries both (resolved) options — for any dictionary-_typed_ expression; for a
  symbol bound to a dictionary value this also recursed without bound (a warning
  flood followed by a stack overflow). Dictionary values now serialize inside
  the serializer proper; the warning fires only for genuine caller mistakes,
  once.
- `BoxedDictionary.toMathJson()` called without options no longer throws
  (`Cannot read properties of undefined`); it resolves the same defaults as
  every other expression kind.
- `.latex` on a dictionary-typed symbol with no value no longer overflows the
  stack; it serializes as the symbol. (`.latex` on a dictionary _value_ — which
  crashed in released builds — now returns an empty string: dictionaries have no
  LaTeX display form yet.)

### Benchmarks

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE (current) | CE 0.70.0 | SymPy | math.js | Mathematica |
| ------------------ | -----------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |           18 |        12 |   281 |     275 |         6.2 |
| $\sin 1$           |           34 |        36 |   353 |     945 |         7.1 |
| $\cos 1$           |           40 |        41 |   351 |   1,315 |          11 |
| $\ln 2$            |           27 |        24 |   598 |   8,195 |         5.8 |
| $e^{\pi}$          |           20 |        22 |   376 |   8,984 |         7.5 |
| $\zeta(3)$         |        2,715 |     2,787 |   494 |       — |         151 |
| $\Gamma(\tfrac13)$ |        1,452 |     1,424 | 4,843 |       — |         267 |
| $\psi(\tfrac13)$   |        1,269 |     1,241 | 3,782 |       — |         235 |

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE (current)** and **CE 0.70.0** columns to see
what is _new this release_ (a `—` under `0.70.0` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE (current) | CE + R/F | CE 0.70.0 |  SymPy  | math.js | Mathematica |
| -------------------------------------- | :----------: | :------: | :-------: | :-----: | :-----: | :---------: |
| **Antiderivatives**                    |              |          |           |         |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |     7.4×     |   3.0×   |   5.0×    |  0.6×   |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |     8.3×     |   1.2×   |   7.7×    |  0.08×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |     4.3×     |   0.7×   |   3.4×    |  0.3×   |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |      —       |   2.0×   |     —     |  0.1×   |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |      —       |   0.9×   |     —     | 0.008×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |      —       |   1.2×   |     —     | 0.006×  |    —    |     1×      |
| **Derivatives**                        |              |          |           |         |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |    0.01×     |  0.02×   |   0.02×   | 0.0009× | 0.002×  |     1×      |
| **Simplification**                     |              |          |           |         |         |             |
| $\sqrt{3+2\sqrt2}$                     |     29×      |   23×    |    27×    |    —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |     71×      |   36×    |    54×    |  2.8×   |  9.1×   |     1×      |
| **Evaluation**                         |              |          |           |         |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |     43×      |   20×    |    38×    |  2.5×   |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |     6.3×     |   4.2×   |   6.0×    |  2.1×   |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |    5213×     |  6049×   |   5202×   |   82×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |     332×     |   106×   |   279×    |  2.3×   |    —    |     1×      |
| **Solving**                            |              |          |           |         |         |             |
| $x^4+x^2-1=0$                          |     0.2×     |   0.2×   |   0.2×    |  0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |     1.2×     |   1.4×   |   1.4×    |  0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 6.3× faster than
Mathematica** (up to 5213×).

<sub>Measured 2026-07-10 · Compute Engine `0.72.0` @ `2cf87db4` (current build)
· published `0.70.0` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.72.0 _2026-07-09_

### Angular Units

- **Compilation targets honor `ce.angularUnit`.** Compiled code from every
  built-in target (`javascript`, `interval-js`, `glsl`, `wgsl`, `interval-glsl`,
  `python`) now reproduces the engine's angular-unit semantics instead of always
  computing in radians: direct trigonometric arguments (`Sin`…`Csc`,
  `Haversine`) are scaled by the unit→radian factor and inverse-trigonometric
  results (`Arcsin`…`Arccsc`, `Arctan2`, `InverseHaversine`) by its reciprocal,
  for all units (`deg`, `grad`, `turn`). With `ce.angularUnit = 'deg'`,
  `compile('\\sin(x)')` emits `Math.sin(0.017453… * x)` so `run({x: 90})`
  returns 1, matching `evaluate()` — previously a degree-mode expression
  _evaluated_ in degrees but _compiled_ (and therefore plotted) as if radians.
  Radian mode emits the same code as before.

- **Hyperbolic functions are now unit-independent.** Their argument (and an
  inverse hyperbolic's result) is a dimensionless real, not an angle, so `sinh`,
  `cosh`, `tanh`, `coth`, `sech`, `csch` and `arsinh`…`artanh` no longer convert
  under a non-radian `angularUnit`. Previously in degree mode `\sinh(1)`
  evaluated to $\sinh(\pi/180) \approx 0.0175$ instead of $1.1752$.

- **Exact inverse-trigonometric values are returned in the current angular
  unit.** In degree mode `\arcsin(1)` now evaluates to the exact integer `90`
  (previously the exact _radian_ value $\pi/2$, disagreeing with `.N()`, which
  returned 90). Similarly `100` in `grad` mode and the exact rational `1/4` in
  `turn` mode; radian mode still returns $\pi/2$.

- **`Arctan2` honors `angularUnit`,** consistently with `Arctan` (it previously
  always returned radians): in degree mode `Arctan2(1, 1)` evaluates to the
  exact `45`, with the quadrant corrections applied in the current unit
  (`Arctan2(1, -1)` → `135`).

  Symbolic calculus (`D`, `Integrate`) remains radian-based regardless of
  `angularUnit` (no $\pi/180$ chain-rule factor); this is a known limitation.

### Step-by-Step Explanations

- **`explain('D')` handles higher-order and mixed partial derivatives.** A new
  `order` option requests the $n$-th derivative
  (`ce.parse('x \\sin x').explain('D', { variable: 'x', order: 2 })`), and a
  receiver that is itself a `D` expression — including mixed partials such as
  `D(f, x, y)` — is traced through its whole differentiation sequence. The
  explanation differentiates one order at a time: each stage replays the
  textbook rule applications inside the remaining derivative operators, folds to
  the simplified derivative, then differentiates again.

- **`explain('solve')` traces systems of equations and alternatives.** A `List`
  or `And` of equations is traced through the same solvers `solve()` runs:
  Gaussian elimination shows one step per eliminated variable and per
  back-substituted variable (`solve.system.eliminate`,
  `solve.system.back-substitute`, `solve.system.parametric`), and nonlinear 2×2
  systems show the product–sum or solve-and-substitute strategy
  (`solve.system.product-sum`, `solve.system.solve-for`,
  `solve.system.substitute`). An `Or` of univariate equations is solved case by
  case (`solve.case`) with the roots merged. The solutions are identical to
  `solve()` — the trace is a pure observation channel. Systems of inequalities
  and mixed systems are not traced and throw a precise error. To support
  systems, the `variable` explain option now also accepts an array of unknowns.

### Cortex Language (Experimental)

- **Cortex ships as a new entry point `@cortex-js/compute-engine/cortex`.**
  Cortex is a text-syntax programming language for scientific computing whose
  intermediate representation is MathJSON, evaluated by the Compute Engine. The
  entry point exports `parseCortex()` (Cortex text → MathJSON),
  `serializeCortex()` (MathJSON → Cortex text), and `executeCortex()` (parse and
  evaluate a program against a host-created engine):

  ```js
  import { ComputeEngine, executeCortex } from '@cortex-js/compute-engine/cortex';
  const ce = new ComputeEngine();
  const { value } = executeCortex(ce, `
    let x = 1/2
    if (x < 1) { x + 1 } else { 0 }
  `);
  // value.toString() === '3/2'
  ```

  **This is experimental**: the syntax and semantics may change between
  releases.

### Pipeline Operator

- **A pipeline operator applies the expression on its left to the function on
  its right.** `x \rhd f` (also `x \triangleright f`, `x \vartriangleright f`,
  `x ⊳ f`, or the plain-text shortcut `x |> f`) parses to `f(x)`. A `\square`
  topic marker in the right-hand side names the position the piped value fills,
  so a stage can be a multi-argument call:
  `x^2 = 4 \rhd \operatorname{Solve}(\square, x)` is `Solve(x^2 = 4, x)`. Stages
  chain left to right (`4 \rhd \sqrt \rhd \ln` is `ln(√4)`), a bare function
  command such as `\ln`, `\lb` or `\sqrt` acts as a function reference
  (`12 \rhd \ln` is `ln(12)`), and the prefix form (`\rhd f`, with no left-hand
  side) denotes the anonymous unary function `_ ↦ f(_)`.

- **The unknown/variable argument of `Solve`, `D`, `Series` and the polynomial
  operators may now be omitted.** It defaults to the input's single free
  variable, or to `x` when there are several free variables and one of them is
  `x`; with no inferable default the expression stays unevaluated. This enables
  point-free pipelines such as `x^2 = 4 \rhd \operatorname{Solve}` or
  `x^2 \rhd \operatorname{D}`. Applies to `Solve`, `D`, `Series`,
  `PolynomialDegree`, `CoefficientList`, `PolynomialRoots`, `Discriminant`,
  `PolynomialQuotient`, `PolynomialRemainder`, `PolynomialGCD`, `Resultant`,
  `Cancel`, `PartialFraction` and `Apart` (`Factor` already inferred its
  variable). For the two-input polynomial operators the default is inferred from
  both operands together.

### LaTeX Parsing

Notation coverage driven by a cross-genre corpus sweep (Hendrycks MATH, 15,546
fragments across all seven subjects including worked solutions; see
`docs/mathnet/math-genre-sweep.md`), which took the measured clean-parse rate
from 95.3% to 97.1%:

- **Text-styling commands.** `\textbf`, `\textit`, `\emph`, `\texttt`,
  `\textsf`, and `\textup` parse their argument as a text run and produce an
  `Annotated` expression with the matching style (`\textbf{Sizes}` →
  `["Annotated", "'Sizes'", {dict: {fontWeight: "bold"}}]`) that round-trips
  back to the same LaTeX. `\textrm` and `\mbox` parse like `\text`. `\bold`,
  `\boldsymbol`, and `\bm` are synonyms of `\mathbf` (`\bold{v}` → the symbol
  `v_bold`).

- **Vector-norm bars.** The `\|` command is now recognized as a norm delimiter
  everywhere `\Vert` is: `\|\mathbf{a}\|`, `\left\| b \right\|`, and `\|a\|^2`
  all parse to `Norm`.

- **TeX-primitive binomial.** The infix `{n \choose k}` form parses to
  `Binomial(n, k)`, joining the already supported `\binom`, `\dbinom` and
  `\tbinom`.

- **Bare mod annotations.** `x \pmod n` with no preceding `\equiv` parses as
  `Mod(x, n)` (`-811 \pmod{24}` → `["Mod", -811, 24]`), matching the existing
  `\bmod` behavior. Congruence chains followed by an implication now parse
  correctly: `a+1 \equiv 4 \pmod 7 \implies a \equiv 3 \pmod 7` is
  `Implies(Congruent(…), Congruent(…))` (the congruence previously disintegrated
  when `\implies` followed the modulus). `\equiv` now binds at comparison
  precedence, tighter than `\implies` (zero snapshot impact).

- **Mixed braced/unbraced fraction and binomial arguments.** `\frac1{-1}`,
  `\frac{900}7`, `\binom{n}k`, `\binom n{k+1}` parse correctly. Each argument is
  now independently a group or a single token, per TeX semantics; previously
  both arguments were forced into the style of the first, and the mixed forms
  produced a `missing` error.

### Issues Resolved

- Reading `.latex` (or `.toString()`) on the canonical, unevaluated form of a
  scalar×tuple product — `ce.parse('3(1,2)').latex`,
  `ce.box(['Multiply', 2, ['Tuple', 1, 2]]).latex` — no longer throws
  `RangeError: Maximum call stack size exceeded`. The pretty-JSON `Multiply`
  serializer round-trips through `Product.asRationalExpression()`, and the
  tuple-aware branch of `canonicalDivide` returned an inert `Divide(expr, 1)`
  instead of stripping the trivial divisor, sending the serializer into infinite
  recursion. Trivial `/1` and `/-1` divisors of tuple-typed expressions are now
  reduced.

- Juxtaposing a scalar with a tuple-**typed** symbol now means scaling, not
  tuple construction: with `z` declared `tuple<number, number>`, `3z` parses to
  `["Multiply", 3, "z"]` (previously a spurious `["Tuple", 3, "z"]`). Literal
  tuples (`3(1,2)`) were already handled; heterogeneous tuples such as
  `tuple<string, number>` still group as a `Tuple`.

- Compiled broadcasts over a list operand now compute their values. The
  generated `.map()` callback read its element variable from the vars object
  instead of the callback parameter, so a compiled `\sin([x, 2x])` returned
  `[null, null]` for every input. Compiled broadcast results now agree with
  `evaluate()`.

- `\operatorname{csch}(x)` now parses to the `Csch` function (previously a free
  symbol named `csch`, silently turning the expression into an implicit
  multiplication), joining the existing `\csch` command and matching
  `\operatorname{sech}`.

- Constructing many `ComputeEngine` instances in a synchronous loop no longer
  balloons memory (~430 KB pinned per engine until the task yielded to the event
  loop, enough to exhaust the default V8 heap after a few thousand engines).
  Every constant definition subscribed to configuration changes through a
  `new WeakRef(...)`, and the ECMAScript kept-objects rule pins each `WeakRef`
  target until the next microtask checkpoint. The tracker now holds its
  listeners directly; since it is owned by the engine, the engine and its
  listeners form a self-contained cycle that is garbage-collected as a unit.

- A bare `\ln` or `\log` — with no argument, as in the pipeline
  `12 \triangleright \ln` — now parses to the function symbol (`"Ln"`, `"Log"`),
  consistent with `\cos`, `\lg` and `\lb`. It previously parsed to an empty
  function application, so piping a value into it produced a `missing` error
  instead of applying the function:
  `ce.parse('12 \\triangleright \\ln').evaluate()` now returns $2\ln 2 + \ln 3$.
  The bare symbols also serialize back to `\ln`, `\log` and `\lg` (previously
  `\ln()`).

- A bare `\lb` (binary log) now parses to the `Lb` function symbol, so
  `12 \triangleright \lb` computes $\log_2 12$. It previously parsed to `Log`,
  silently computing the base-10 logarithm instead.

- A log with a base but no argument (`\log_2`) now parses with the pipeline
  topic marker `\square` standing in for the argument: `8 \triangleright \log_2`
  fills the hole and computes $\log_2 8 = 3$ (composing with inverse
  superscripts too: `9 \triangleright \log_3^{-1}` gives $3^9$), and a
  standalone `\log_2` displays as $\log_2(\square)$. It previously parsed as
  $\log_{10} 2$ — the base was read as the _argument_ — so piping into it
  silently discarded the piped value.

- Likewise, a function with a superscript but no argument (`\cos^2`, `\ln^{-1}`,
  `\lg^{-1}`) holds a topic-marker hole: `x \triangleright \cos^2` computes
  $\cos^2 x$, `12 \triangleright \ln^{-1}` computes $e^{12}$, and a standalone
  `\cos^2` displays as $\cos(\square)^2$. These previously produced a `Power` of
  the bare function symbol, which failed to type when piped into.

## 0.71.0 _2026-07-08_

### Differential Equations

- **First-order nonlinear equations solve.** (contributed by
  [KingArth0r](https://github.com/KingArth0r)) `DSolve` now handles four
  classical first-order classes:
  - **Separable** equations return an implicit solution when no explicit form is
    available: $y' = x/y$ gives $\frac12 y(x)^2 = \frac12 x^2 + c_1$.
  - **Bernoulli** equations $y' = p(x)\,y + q(x)\,y^n$ reduce via the $v = y^{1-n}$ substitution and return explicit solutions.
  - **Homogeneous** equations of the form $y' = F(y/x)$ solve by the $v = y/x$
    substitution: $y' = 1 + y/x$ gives $y(x)/x = \ln x + c_1$.
  - **Exact** equations $M(x,y) + N(x,y)\,y' = 0$ return the implicit potential:
    $2xy + y^2 + (x^2 + 2xy)\,y' = 0$ gives $x^2\,y(x) + x\,y(x)^2 = c_1$.

  Implicit solutions are expressed in terms of $y(x)$ itself. Equations outside
  the supported classes (e.g. the Riccati equation $y' = x + y^2$) stay inert.

- **Initial and boundary conditions are applied.** Scalar conditions can be
  passed in a list alongside the equation:
  `DSolve([y'' = -y, y(0) = 0, y'(0) = 1], y, x)` returns $y(x) = \sin x$.
  Derivative conditions are recognized in both the `Apply(Derivative(y, 1), x0)`
  and flat `D(y(x0), x)` forms. Conditions also apply to supported implicit
  solutions ($y' = x/y$ with $y(0) = 1$ gives $\frac12 y(x)^2 = \frac12 x^2 + \frac12$), and free parameters survive: $y' = kx/y$ with $y(0) = 2$ gives
  $\frac12 y(x)^2 = \frac12 k x^2 + 2$ with $k$ untouched. If the conditions
  cannot be applied to the solution class, the equation stays inert rather than
  silently dropping them.

- **Nonhomogeneous constant-coefficient equations of any order.** The
  undetermined-coefficients method now covers **polynomial, exponential, and
  sinusoidal** forcing at any order (previously polynomial forcing was
  second-order only), including **resonant** cases, which retry the ansatz with
  powers of $x$: $y'' - y = e^x$ gives $c_1 e^x + c_2 e^{-x} + \frac12 x e^x$,
  and $y''' - y = \sin x$ and resonant $y'' + y = \sin x$ both solve.

- **First-order linear homogeneous systems solve.** Pass the equations and
  dependent functions as lists: `DSolve([y' = z, z' = y], [y, z], x)` returns
  the general solution built from the eigen-decomposition of the coefficient
  matrix. Systems with repeated — or numerically indistinguishable — eigenvalues
  stay inert rather than returning a degenerate basis.

- **`NDSolve` integrates first-order systems.** Fixed-step RK4 now handles
  systems, including nonlinear ones, with the dependent functions and initial
  values given as lists:
  `NDSolve([y' = z, z' = -y], [y, z], Limits(x, 0, 1), [0, 1], 200)` produces
  samples as `[x, [y, z]]` pairs. Malformed or unsupported systems stay inert
  rather than returning partial results.

### Recurrence Equations

- **New `RSolve` operator.** (contributed by
  [KingArth0r](https://github.com/KingArth0r)) `RSolve(equation, a, n)` solves
  **linear homogeneous constant-coefficient** recurrences via the characteristic
  polynomial: geometric ($a_{n+1} = 2a_n$ gives $a(n) = c_1\,2^n$),
  Fibonacci-style, repeated roots with $n^k r^n$ modes ($a_{n+2} + a_n = 2a_{n+1}$ gives $a(n) = c_1 + c_2\,n$), and complex roots ($a_{n+2} = -a_n$
  gives $a(n) = c_1\,i^n + c_2\,(-i)^n$). Initial conditions can be given in
  list form: `RSolve([a(n+1) = 2a(n), a(0) = 3], a, n)` gives $a(n) = 3 \cdot 2^n$. Nonhomogeneous and variable-coefficient recurrences stay inert.

## 0.70.0 _2026-07-08_

### Breaking Changes

- **The published `dist/` directory is reorganized into per-variant
  subdirectories.** The flat layout — where the variant was encoded in each
  filename (`compute-engine.min.esm.js`, `compute-engine.umd.cjs`, …) — is
  replaced by `esm/`, `esm-min/`, `umd/`, `umd-min/`, and the unchanged
  `types/`. The variant marker moves from the filename into the directory, so a
  bundle is now `<dir>/<name>.<ext>`. The general mapping is `<name>.esm.js` →
  `esm/<name>.js`, `<name>.min.esm.js` → `esm-min/<name>.js`, `<name>.umd.cjs` →
  `umd/<name>.cjs`, and `<name>.min.umd.cjs` → `umd-min/<name>.cjs`; for example
  `dist/compute-engine.min.esm.js` is now `dist/esm-min/compute-engine.js`.
  Consumers importing via the bare package specifier
  (`@cortex-js/compute-engine` and its sub-paths such as
  `@cortex-js/compute-engine/identities`) are **unaffected** — the package
  `exports` map absorbs the move. Only deep imports that reach into `…/dist/…`
  directly, and pinned CDN URLs, need to be updated. Each `esm*/` directory is
  now fully self-contained, with its own `chunks/` subdirectory holding only
  that variant's shared chunks, so vendoring a build is now "copy the directory
  for the variant you use."

- **The non-minified builds are no longer published to npm.** The package now
  ships `dist/esm-min/`, `dist/umd-min/`, and `dist/types/` only. The
  non-minified `esm/` and `umd/` directories — about 60% of the unpacked
  package, and never referenced by the `exports` map — are now build-only
  artifacts: `npm run build` still produces them locally for development and
  debugging, but if you need a readable (non-minified) bundle, build from
  source.

### Improvements

- **The declaration build and typecheck now run on TypeScript 7** (the native
  compiler), cutting `.d.ts` emission from ~31s to ~5s and the full production
  build from ~45s to ~29s. TS 7.0 ships no programmatic API, so it is installed
  side-by-side: the module name `typescript` stays aliased to the TS 6 API
  (`@typescript/typescript6`) for ts-jest, typedoc, typescript-eslint and madge,
  while the native compiler (`@typescript/native`) drives the CLI. No
  consumer-facing change — the published declarations are type-identical; only
  cosmetic emission differences appear (single-quoted string literals, sorted
  numeric-literal unions, literal non-ASCII property keys instead of `\uXXXX`
  escapes).

## 0.69.1 _2026-07-08_

### Issues Resolved

- **#318** Type declarations now resolve correctly in projects using
  `"module": "nodenext"`/`"node16"`. The published `.d.ts` files used
  extensionless relative imports, which produced `TS2834` errors (or collapsed
  every imported type to `any` with `skipLibCheck`). The build now rewrites the
  emitted declarations with explicit `.js` extensions and validates them against
  a `nodenext` consumer as part of every release build.

## 0.69.0 _2026-07-08_

### Breaking Changes

- **`\pm` now parses to a `Measurement`, not `PlusMinus`.** `a \pm b` parses to
  `["Measurement", a, b]` — a value with an uncertainty (see below) — replacing
  the previous `PlusMinus` head that evaluated to the two-branch tuple
  `(a−b, a+b)`. Consequences: solution sets that previously used `\pm` (e.g.
  quadratic roots) are now returned as an explicit `List` of the branches, and a
  numeric integral that reports an error estimate now returns
  `["Measurement", estimate, error]` instead of a `PlusMinus` tuple. Prefix
  `\pm b` parses to `["Measurement", 0, b]`.

- **`Loop` no longer produces a list — comprehensions moved to the new
  `Comprehension` operator.** `["Loop", body, ["Element", x, coll], …]` is now
  an imperative for-each evaluated **for effect**: its value is `Nothing` (or
  the value carried by a `Break`/`Return`), and it no longer collects the body
  values into a `List`. The trailing-`for` comprehension syntax
  (`x^2 \operatorname{for} x = [1...10]`) now parses to
  `["Comprehension", body, ["Element", …], …]`, which returns exactly what the
  collecting `Loop` used to — for consumers of the parse tree this is a head
  rename. The undocumented arity-2 form `["Loop", body, collection]` (body
  applied as a lambda to each element) has been removed: use `Map`, or an
  `Element` clause; a non-`Element` iterator argument is now an error.

- **`scalar + point` is now an error.** Adding a scalar to a numeric tuple
  (`1 + (2, 3)`) previously broadcast the scalar over the components; points are
  now proper vectors in ℝⁿ (see below) and a scalar term does not broadcast into
  them. Add a tuple explicitly (`(1,1) + (2,3)`) instead. Multiplying or
  dividing a point by a scalar still scales it.

- **Comparing a list to a scalar is now elementwise.** `[1, 4, 4] = 4`
  previously evaluated to `False` (whole-list comparison against a scalar); it
  now broadcasts and evaluates to `["List", "False", "True", "True"]`, as do
  `<`, `<=`, `>`, `>=`, and `!=`. Comparing two collections is unchanged:
  `Equal(L, M)` remains a whole-value comparison (`[1,2,3] = [1,2,3]` → `True`).

### Measurements and Uncertainty

- **New `Measurement` type — values with a propagated uncertainty.**
  `Measurement(value, error)` (written `value \pm error`) represents a measured
  quantity carrying a 1σ absolute uncertainty, and the uncertainty **propagates
  through arithmetic** using standard independent, first-order (quadrature)
  error propagation:
  - Algebraic and elementary operations propagate the error:
    `(5 \pm 0.2)(3 \pm 0.1)` → `15.00 \pm 0.78`, `\sqrt{4 \pm 0.2}` →
    `2.000 \pm 0.050`, `\sin(1 \pm 0.1)` → `0.841 \pm 0.054` (trig respects the
    engine's angular unit).
  - Measurements combine with **units**: `(5.1 \pm 0.2)\,\mathrm{cm}` is a
    measured quantity, and the error carries through quantity arithmetic and
    unit conversion (`UnitConvert` of `(5.1 \pm 0.2)\,\mathrm{cm}` to `m` →
    `(0.0510 \pm 0.0020)\,\mathrm{m}`). The bare form `5.1 \pm 0.2\,\mathrm{cm}`
    (no parentheses) parses to the same thing: a unit on only one operand of
    `\pm` scopes over the whole measurement (a dimensionless value with a
    dimensioned error is never meaningful). An error in a _different_ unit than
    the value (`5.1\,\mathrm{cm} \pm 2\,\mathrm{mm}`) stays as written.
  - **Display** follows the physics convention — the uncertainty is shown to two
    significant figures by default and the value is rounded to the same decimal
    place (`5.134 \pm 0.021`, `8.00 \pm 0.22`). Controlled by the `digits`
    serialization option (`{ significant: n }`, `{ fractional: n }`, `"max"`);
    `.toMathJson()` stays lossless.
  - **Correctness note:** propagation is _independent_ — exact when each
    measured quantity appears once (`A = L·W`) or in a single operation (`x^2`),
    but it over/under-estimates when one measured variable is reused across an
    expression (`x·x`, `x/(x+1)`), which are treated as independent. See the
    [Units guide](/compute-engine/guides/units/) for details and the `simplify`
    workaround.

### Points and Tuples

- **Numeric tuples are now points/vectors in ℝⁿ, distinct from lists.**
  Arithmetic on tuples is componentwise vector arithmetic and stays a `Tuple`:
  `(1,2) + (3,4)` → `(4,6)`, `3(1,2)` → `(3,6)`, `(4,2)/2` → `(2,1)`, `-(1,2)` →
  `(-1,-2)`. This fixes `(1,2)-(3,4)`, which previously produced a malformed
  nested list. `tuple · tuple` is an error (no implicit dot product — use
  `Dot`), and `scalar + tuple` is rejected (see Breaking Changes). Lists keep
  their existing broadcast semantics.

- **Tuple arithmetic and component access work symbolically for typed symbols.**
  A symbol declared `tuple<number, number>` participates in vector arithmetic
  without a value, and its components are accessible with the `.x`/`.y`/`.z`
  member syntax, which parses to `First`/`Second`/etc. (`P.x` →
  `["First", "P"]`). Component access on a point literal (`(1,2).x` → `1`) also
  works.

- **Color functions broadcast over lists**, so `rgb` and `hsv` applied to list
  arguments produce a list of colors, matching the other broadcastable numeric
  operators.

### Lists and Collections

- **Filtering a list with a condition in index position.** `L[L > 0]` evaluates
  to the elements of `L` where the condition holds — the Desmos list-filtering
  notation. The condition may reference the list itself (`L[L>0]`), another list
  (`L[d=4]` where `d` is a list), or compute a positional mask from a `Range`
  (`L[|[1...\operatorname{length}(L)]-i|>0]` removes the `i`-th element). A
  condition may be combined with integer indexes. The mask applies positionally
  and truncates to the shorter of list and mask.

- **Relational operators broadcast over lists.** `[-1, 2, -3] > 0` evaluates to
  `["List", "False", "True", "False"]`, typed `list<boolean>`. Scalar and
  symbolic comparisons are unchanged (`x > 0` stays symbolic). For `=` and `!=`
  the elementwise form applies only when exactly one operand is a collection —
  comparing two collections remains a whole-value equality (see Breaking
  Changes).

- **Broadcast results now report an honest `list<…>` type.** A broadcastable
  numeric operator applied to a list operand produces a list value, and its
  declared type now says so: `Sin([t, 1])` is typed `list<finite_number>`
  (previously the scalar `finite_number`, contradicting the value), and
  `[1,2] \cdot 2` / `[1,2] + x` report `vector<2>` rather than a scalar or a
  `number | vector<2>` union. Code that inspects `.type` before evaluating no
  longer needs to special-case list-broadcast expressions.

- **`When` broadcasts over a list-valued condition.** A domain restriction whose
  condition is a finite list of booleans now masks element by element — the
  Desmos restriction semantics. `x^2\{[1,2,3] > 0\}` evaluates to
  `[x^2, x^2, x^2]`, and with `x = 2`, `x\{x \le [1,2,3]\}` evaluates to
  `[Undefined, 2, 2]` (one masked branch per element: the value where the
  element condition is `True`, `Undefined` where `False`, a held `When` where
  the element is still symbolic). When the restricted expression is itself a
  list, the two are zipped elementwise, truncating to the shorter. Scalar
  restrictions (`x^2\{x > 0\}`) are unchanged, and the result type is lifted to
  `list<…>` only when the condition's type is a list of booleans.

### Parsing and Serialization

- **Fixed: bracket indexing after a symbol with `\left[` delimiters.**
  `A\left[1\right]` silently dropped the bracket group and parsed as bare `A`;
  it now parses to `["At", "A", 1]` like `A[1]` always did. Indexing also works
  on parenthesized groups and function applications: `(3,4)[1]` and `f(x)[i]`
  parse to `At` expressions.

- **Numbers with a leading or trailing decimal dot parse correctly.** `.85x`
  parses as `0.85 x`, and a trailing-dot literal inside delimiters (`(1., 2)`)
  is accepted.

- **Scaling a list/vector by juxtaposition is a `Multiply`, not a `Tuple`.** A
  scalar written next to a list- or vector-typed operand — including a scaled
  fraction whose numerator is a list or range, as in Desmos'
  `2\frac{[0,...,8]}{8}` — now canonicalizes to `Multiply` (element-wise
  scaling). Previously such juxtapositions produced a spurious `Tuple`, which
  raised an `incompatible-type` error when the result was used in further
  arithmetic. Genuine tuples (`2(3, 4)`) and plain list literals (`[1,2,3]`) are
  unaffected.

- **Restriction braces attach across visual space.** A `\{...\}`
  domain-restriction suffix now attaches to its base expression even when
  separated by spacing commands: `s(t) = (1-t)^2(1+2t)\ \{t\ge0\}\{t\le1\}`
  parses to a `When` with both conditions. The space-tolerance is specific to
  restriction braces: a space before an indexing bracket (`x\ \left[1,2\right]`)
  is still not an index access.

- **New inert `Polygon` operator.** `\operatorname{polygon}((0,0),(1,0),(0,1))`
  parses to `["Polygon", ...]`, an opaque geometric primitive like `Triangle`
  and `Segment`, for consumers that render it.

- **`histogram`, `pdf`, `cdf`, `length`, and `nCr` parse to `Histogram`, `PDF`,
  `CDF`, `Length`, and `Choose`.** The lowercase `\operatorname{...}` forms used
  by Desmos are now aliases of the existing operators. The member form `.length`
  (`S.\operatorname{length}`) also maps to `Length`, joining `.count`, `.max`,
  `.min`, `.total`, and the `.x`/`.y`/`.z` component accessors. `Histogram` and
  `BinCounts` accept any number as their bin specification (a non-integer bin
  count is left unevaluated; translate a Desmos bin _width_ to explicit bin
  edges at the import boundary).

- **New `digits` serialization option for significant-figures and decimal-place
  display control.** Available on `expr.toLatex()`, `expr.toMathJson()`, and
  honored by `expr.toString()`, `digits` controls how many digits of a number
  are _displayed_ (a formatting choice — it does not change the stored value or
  computation precision):
  - `digits: { significant: n }` rounds to `n` significant figures
    (`ce.parse("\\pi").N().toLatex({ digits: { significant: 3 } })` → `3.14`).
    Rounding is independent of notation (`1500` at two significant figures stays
    `1500` in fixed notation; use `notation: "scientific"` for
    `1.5 \cdot 10^{3}`), and exact integers, rationals, and radicals are shown
    in full — only inexact values are rounded.
  - `digits: { fractional: n }` shows `n` digits after the decimal point
    (`toFixed` semantics), and `digits: "auto"` / `"max"` behave as before.
  - The `fractionalDigits` option is **deprecated** in favor of `digits`. It
    continues to work (a numeric `n` is equivalent to
    `digits: { fractional: n }`); if both are provided, `digits` wins.

- **The pipeline operator `|>` supports a topic marker and a prefix form.** A
  `\square` in the right-hand side marks where the piped value is substituted,
  so the right-hand side may be a multi-argument call:
  `x^2 + 2x + 1 |> \operatorname{Solve}(\square, x)` parses to
  `Solve(x^2+2x+1, x)`. Without a marker the value is passed as the sole
  argument, as before (`x |> f` → `f(x)`). A prefix `|> f` (or
  `|> \operatorname{Solve}(\square, x)`) leaves the left-hand side implied and
  yields an anonymous unary function over the topic
  (`Function(Apply(f, _), _)`), which the caller applies to whatever value it
  wants to pipe in. `\rhd`, `\triangleright`, and `⊳` behave identically.

### Runtime and Scoping

- **`Declare` now accepts an optional initial value.** The three-operand form
  `["Declare", symbol, type, value]` declares the symbol with the given type,
  sets its initial value, and evaluates to that value (the previous form
  evaluated to `Nothing`). This matches the documented signature; earlier the
  value operand was silently dropped. The one- and two-operand forms are
  unchanged. A value-carrying `Declare` also compiles correctly (the initializer
  is emitted for the JavaScript and GLSL targets), not just when evaluated.

- **`Declare` can attach definition attributes via a trailing dictionary,
  including declaring constants.** An optional final `Dictionary` operand
  carries any of `type`, `value`, `constant`, and `holdUntil`, mirroring the
  JavaScript `ce.declare(name, def)` API. For example,
  `["Declare", "c", "real", 299792458, ["Dictionary", ["KeyValuePair", "constant", "True"]]]`
  declares an immutable constant (a later `Assign` to it is rejected), and
  `holdUntil` controls when the symbol's value is substituted (as for built-in
  constants such as `Pi`). A positional `type`/`value` takes precedence over the
  same key in the dictionary. This gives MathJSON a representation for constant
  declarations (e.g. the target for a `const` keyword in a surface language).

### Control Flow

- **`Loop` is now imperative control flow only** (see Breaking Changes above),
  and `["Loop", body]` is a real infinite loop: the body is evaluated repeatedly
  until it yields a `["Break", value?]` (the loop's value) or a `["Return", …]`
  (propagated), guarded by `ce.iterationLimit` and the evaluation deadline.
  Previously this form — documented as `while(true)` — evaluated the body only
  once. It compiles to `while (true) { … }` in JavaScript, and `Loop` with
  `Element` clauses compiles to plain `for` / `for…of` statement loops with no
  result array.

- **New `Comprehension` operator: value-producing list comprehensions.**
  `["Comprehension", body, ["Element", x, xs], …]` evaluates `body` for each
  combination of one or more `Element` clauses and collects the results into a
  `List`. Independent clauses produce a flat Cartesian product; a later clause's
  collection may reference an earlier binding
  (`[…, ["Element", "x", ["Range", 1, 3]], ["Element", "y", ["Range", 1, "x"]]]`
  iterates the triangle). Bound names do not leak. With a single clause it is
  equivalent to `Map(xs, x ↦ body)`; unlike `Map` (lazy) it materializes its
  result. Compiles to JavaScript as nested array-collecting loops (not available
  on the GLSL/WGSL targets, which have no dynamic arrays).

- **`Break` and `Continue` are now registered operators.** `Break(value?)` exits
  the enclosing loop immediately and its optional value becomes the loop's
  value; `Continue()` skips to the next iteration. Outside a loop both are
  inert.

- **Control flow now propagates out of `Block` statement results.** A `Break`,
  `Continue`, or `Return` produced by a statement's _result_ — e.g.
  `["If", cond, ["Break"]]` — now short-circuits the enclosing `Block` and
  propagates to the enclosing loop or function, as the documentation always
  specified. Previously only a statement that was _literally_ one of those heads
  short-circuited, so a conditional `Break` inside a block was silently
  discarded and the loop ran to the iteration limit. Consequences: the
  `while`-loop lowering `["Loop", ["Block", ["If", cond, ["Break"]], …body]]`
  now terminates correctly, and a `Block` whose value is a `Return` evaluates to
  the `["Return", value]` expression itself (unwrapped at the function
  application boundary), where it previously unwrapped eagerly.

- **`If` without an else branch is fixed.** `["If", cond, then]` — the
  documented two-operand form — failed to canonicalize (throwing
  `Cannot read properties of undefined`) and was left inert. It now
  canonicalizes and evaluates to `Nothing` when the condition is false.

- **Nested scopes now see the enclosing block's variables (lexical scoping
  fix).** A `Block`, `If` branch, or `Loop` body nested inside a `Block`
  resolved symbols against a stale canonicalization-time scope, so it could not
  read the values of the enclosing block's locals:
  `["Block", ["Declare", "k", "integer"], ["Assign", "k", 7], ["Block", "k"]]`
  evaluated to symbolic `k` instead of `7`, a `while`-style
  `["Loop", ["Block", ["If", cond, …], …]]` threw
  `Condition must evaluate to "True" or "False"`, and an `Element`-clause loop
  whose body is a `Block` left the loop variable symbolic
  (`Loop(Block(Assign(s, s + n)), Element(n, Range(1, 5)))` produced `5n`
  instead of accumulating `15`). Nested scopes now resolve enclosing block
  locals, loop variables, and — inside a function body — the function's
  parameters and locals correctly, so `while`/`for` lowerings with block bodies
  evaluate as expected.

- **Re-evaluating a program with `Declare` statements no longer throws.**
  Evaluating the same `Block` expression more than once — or a `Declare` inside
  a loop body, which re-executes every iteration — threw
  `The symbol "…" is already declared in this scope` on the second entry. A
  `Declare` statement now resets the binding it created on a previous run of the
  same scope. Genuine conflicts (redeclaring a function parameter, or
  `ce.declare()` on an explicitly declared symbol) still throw.

### Benchmarks

The numeric and symbolic state of this release is summarized below against the
last packed comparator release (`0.66.0`), SymPy, math.js, and **Mathematica** —
the reference baseline, since it is the broadest engine in the field. The tables
are generated by the harness in
[`benchmarks/`](https://github.com/cortex-js/compute-engine/tree/main/benchmarks)
(`node benchmarks/report_changelog.mjs`); every result is verified numerically
against an independent `mpmath` reference, never another tool. "CE 0.69.0" is
this release.

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE 0.69.0 | CE 0.66.0 | SymPy | math.js | Mathematica |
| ------------------ | --------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |       5.9 |       7.9 |   176 |     104 |         3.9 |
| $\sin 1$           |        20 |        20 |   222 |     442 |         5.2 |
| $\cos 1$           |        20 |        20 |   224 |     455 |         7.1 |
| $\ln 2$            |        13 |        81 |   339 |   4,315 |         3.8 |
| $e^{\pi}$          |        12 |        23 |   213 |   4,787 |         4.0 |
| $\zeta(3)$         |     1,542 |     3,395 |   268 |       — |          49 |
| $\Gamma(\tfrac13)$ |       830 |         — |   354 |       — |         214 |
| $\psi(\tfrac13)$   |       725 |         — | 2,810 |       — |         172 |

Biggest gains over `0.66.0`: $\ln 2$ **6.1× faster**, $\zeta(3)$ **2.2×
faster**.

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case; `✓` means it solves a case
Mathematica can't. Compare the **CE 0.69.0** and **CE 0.66.0** columns to see
what is _new this release_ (a `—` under `0.66.0` next to a number under the
current build). The **CE + R/F** column is the current build with the opt-in
Rubi integrator + Fungrim identities loaded (`loadIntegrationRules` /
`loadIdentities`), on the same minified bundle.

| Operation                              | CE 0.69.0 | CE + R/F | CE 0.66.0 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :-------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |           |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |   6.8×    |   3.1×   |   7.5×    |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |    11×    |   1.7×   |   10.0×   | 0.08×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |   6.3×    |   0.9×   |   6.7×    |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |     —     |   2.1×   |     —     |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |     —     |   1.4×   |     —     | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |     —     |   1.3×   |     —     | 0.007× |    —    |     1×      |
| **Derivatives**                        |           |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |   0.03×   |  0.03×   |   0.03×   | 0.001× | 0.004×  |     1×      |
| **Simplification**                     |           |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |    46×    |   30×    |    41×    |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |    98×    |   58×    |    97×    |  3.1×  |   19×   |     1×      |
| **Evaluation**                         |           |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |    55×    |   25×    |    56×    |  3.1×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |   9.7×    |   6.0×   |   5.1×    |  2.1×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |   7429×   |  7782×   |   7935×   |  90×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |   459×    |   153×   |   586×    |  2.5×  |    —    |     1×      |
| **Solving**                            |           |          |           |        |         |             |
| $x^4+x^2-1=0$                          |   0.3×    |   0.2×   |   0.1×    | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |   1.9×    |   2.0×   |   0.2×    | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 6.8× faster than
Mathematica** (up to 7429×).

<sub>Measured 2026-07-08 · Compute Engine `0.68.0` @ `5a2abce1` (current build)
· published `0.66.0` · SymPy `1.14.0` · math.js `15.2.0` · Mathematica
`14.3.0 for Mac OS X ARM` · Node `v22.13.1`. Correctness is verified numerically
against an independent `mpmath` reference, never another tool. Reproduce with
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

## 0.68.0 _2026-07-05_

### Breaking Changes

- **The ESM builds are no longer single-file: they load a shared chunk from
  `dist/chunks/`.** `compute-engine.esm.js`, `compute-engine.min.esm.js` and the
  corresponding `integration-rules` bundles are now built with code splitting,
  so the engine core is emitted once into a `chunks/chunk-*.js` file that both
  entry points import (this fixes `instanceof` failures when the
  integration-rules plugin is loaded alongside the main library, which
  previously carried its own duplicate copy of the engine). If you copy
  `compute-engine.min.esm.js` out of the package as a standalone file — for
  example to vendor it or serve it from your own static assets — you must now
  copy the `chunks/` directory alongside it, preserving the relative layout.
  Installing the package from npm, importing it from a bundler, or loading it
  from a CDN that serves the whole package (jsDelivr, unpkg, esm.sh) is
  unaffected. The `.umd.cjs` builds remain self-contained single files if you
  need a copyable artifact.

  Note that the chunk is required even if you don't use the integration-rules
  plugin: it contains the shared engine core, not the rule data. To vendor the
  Compute Engine _without_ the optional rule corpora, copy
  `compute-engine.min.esm.js` plus the `chunks/` directory and omit
  `integration-rules.*` (the Rubi corpus) and `identities.*` (the Fungrim
  corpus) — neither is loaded unless you import it explicitly. Each entry point
  imports exactly one chunk, so if you only ship the minified build you only
  need one of the two chunk files — the smaller one (the minified chunk), or
  definitively the one named in the entry file's first `import` statement. Just
  remember the names contain a content hash that changes between releases. All
  other sub-path bundles (`core`, `latex-syntax`, `numerics`, `compile`,
  `interval`, `identities`) remain self-contained. `Or`.\*\* `AB \parallel CD`
  is the parallelism relation, consistent with `\perp` → `Perpendicular`. Use
  `\lor` or `\vee` for disjunction (unchanged).

- **`\rightarrow` now parses to the mapping arrow `To`, not `Implies`.**
  `f: \mathbb{R} \rightarrow \mathbb{R}` now parses as a function signature,
  matching `\to`. This reverses the mapping introduced for issue #156:
  `\rightarrow`-as-implication was far rarer in practice than
  `\rightarrow`-as-mapping. Use `\Rightarrow`, `\implies`, or `\Longrightarrow`
  for implication (unchanged).

### New Operators

- **`Series`, `BigO`, and `Normal` provide symbolic series expansion.**
  `Series(f, x, x0, n)` returns the Taylor expansion of `f` in `x` about `x0`
  (default `x0 = 0`) up to and including the power `n` (default `n = 5`), plus
  an explicit remainder term. `x0` may be `±∞` for an asymptotic expansion in
  powers of `1/x`.
  - `Series(\sin x, x)` → $x - \tfrac{x^3}{6} + \tfrac{x^5}{120} + O(x^7)$;
    `Series(\ln(\cos x), x)` → $-\tfrac{x^2}{2} - \tfrac{x^4}{12} + O(x^6)$;
    `Series(\arctan x, x, +\infty)` → $\tfrac{\pi}{2} - \tfrac{1}{x} + \tfrac{1}{3x^3} - \dots$. Coefficients are exact
    (`Series(\sin x, x, \frac{\pi}{6})` gives $\tfrac12$, $\tfrac{\sqrt 3}{2}$,
    …), and an undeclared `f` yields the textbook form $f(0) + f'(0)x + \dots$.
  - At a **pole** the result is a Laurent expansion with a finite principal
    part: `Series(\frac{1}{\sin x}, x)` → $\tfrac{1}{x} + \tfrac{x}{6} + \tfrac{7x^3}{360} + O(x^7)$, `Series(\cot x, x)` → $\tfrac{1}{x} - \tfrac{x}{3} - \tfrac{x^3}{45} + \dots$, and the special functions expand at
    their poles with exact coefficients — `Series(\Gamma(x), x)` →
    $\tfrac{1}{x} - \gamma + (\tfrac{\gamma^2}{2} + \tfrac{\pi^2}{12})x + \dots$, `Series(\zeta(x), x, 1)` → $\tfrac{1}{x-1} + \gamma + O(x-1)$. Poles
    at `±∞` are handled too (`Series(\frac{x^2}{x-1}, x, +\infty)` → $x + 1 + \tfrac1x + \tfrac1{x^2} + \dots$). An essential singularity or branch point
    (e.g. `Series(e^{1/x}, x)`, `Series(\ln x, x)`) is still left unevaluated
    rather than expanded incorrectly.
  - `BigO(u)` is the inert Landau remainder, serialized `O\left(u\right)` and
    parsed from `\mathcal{O}(u)` and `\operatorname{O}(u)`. It is inert under
    `evaluate`/`simplify`; a numeric approximation (`.N()`) of any expression
    containing it is `NaN`.
  - `Normal(expr)` strips the `BigO` terms, yielding the compilable/plottable
    truncated polynomial: `Normal(Series(\sin x, x))` → $x - \tfrac{x^3}{6} + \tfrac{x^5}{120}$.

- **`TrigExpand`, `TrigToExp`, and `TrigReduce` rewrite trigonometric and
  hyperbolic expressions.** These are transformation verbs in the spirit of
  `Expand`/`Factor` and preserve exactness.
  - `TrigExpand` expands functions of sums and integer multiples of angles:
    `TrigExpand(\sin(a+b))` → $\sin a\cos b + \cos a\sin b$ and
    `TrigExpand(\cos(2x))` → $\cos^2 x - \sin^2 x$ (hyperbolic analogs, and
    `\sec`/`\csc`/`\cot` as reciprocals of the expanded `\cos`/`\sin`, are also
    handled).
  - `TrigToExp` rewrites trigonometric and hyperbolic functions in terms of the
    complex exponential, exactly: `TrigToExp(\sin x)` → $-\tfrac{i}{2}e^{ix} + \tfrac{i}{2}e^{-ix}$.
  - `TrigReduce` is the inverse of `TrigExpand`, rewriting products and integer
    powers as functions of multiple angles: `TrigReduce(\sin^2 x)` → $\tfrac{1 - \cos 2x}{2}$ and `TrigReduce(\sin x\cos x)` → $\tfrac{\sin 2x}{2}$.

- **Probability distributions: `NormalDistribution`, `BinomialDistribution`,
  `PoissonDistribution`, `UniformDistribution`, `ExponentialDistribution`,
  consumed by the generic `PDF`, `CDF`, and `Quantile` operators.** A
  distribution is a first-class value — assign it, pass it around, query it:
  - `PDF(dist, x)`, `CDF(dist, x)` and `Quantile(dist, p)` evaluate to **exact
    closed forms**: `CDF(NormalDistribution(0, 1), x)` → $\tfrac12\left(1 + \operatorname{erf}\tfrac{x}{\sqrt2}\right)$, an ordinary expression that can
    be simplified, differentiated, compiled and plotted. Exact arguments give
    exact results — `PDF(BinomialDistribution(4, \tfrac12), 2)` → $\tfrac38$ —
    and `.N()` numericizes at machine or arbitrary precision.
  - For discrete distributions `PDF` is the probability mass function, and
    `Quantile` (the least $k$ with $\operatorname{CDF}(k) \ge p$) is computed by
    exact search: `Quantile(PoissonDistribution(9), 0.95)` → `14`.
  - `Mean`, `Variance`, and `StandardDeviation` now also accept a distribution:
    `Mean(NormalDistribution(\mu, \sigma))` → $\mu$,
    `Variance(BinomialDistribution(n, p))` → $np(1-p)$.
  - `NormalDistribution(\mu, \sigma)` takes the standard deviation (not the
    variance), and `ExponentialDistribution(\lambda)` the rate — the Mathematica
    and scipy conventions.

- **`GammaRegularized` and `BetaRegularized` — the regularized incomplete gamma
  and beta functions.** `GammaRegularized(a, z)` is $Q(a, z) = \Gamma(a, z)/\Gamma(a)$ and `BetaRegularized(x, a, b)` is $I_x(a, b)$. They follow the
  exactness contract (special values fold — `GammaRegularized(1, z)` → $e^{-z}$
  — and exact arguments stay symbolic), evaluate numerically at machine and
  arbitrary precision, and compile to JavaScript and Python
  (`scipy.special.gammaincc`/`betainc`). The discrete distribution CDFs evaluate
  to closed forms in these functions, e.g.
  `CDF(PoissonDistribution(\lambda), k)` → $\operatorname{GammaRegularized}(k+1, \lambda)$.

- **`Covariance`, `PopulationCovariance` and `Correlation` measure the
  relationship between two data sets.** Each accepts either two equal-length
  collections or a single collection of $(x, y)$ pairs (a scatter of points).
  Exact data gives exact results — `Covariance([1,2,3,4,5], [2,4,5,4,5])` →
  $\tfrac32$ and the Pearson correlation of the same data is
  $\tfrac{\sqrt{15}}{5}$, exactly. `Covariance` uses the sample ($n-1$)
  convention, `PopulationCovariance` the population ($n$) convention, matching
  `Variance`/`PopulationVariance`. Parse aliases: `\operatorname{cov}` and
  `\operatorname{corr}`. Both compile to JavaScript and Python
  (`np.cov`/`np.corrcoef`).

- **`LinearRegression` and `PolynomialFit` compute least-squares fits.**
  `LinearRegression(xs, ys)` (or a collection of points) evaluates to
  `(intercept, slope)`, and `PolynomialFit(data, degree)` to the list of
  coefficients, constant term first. **Exact data yields exact coefficients**:
  points lying on $1 + x^2$ fit at degree 2 to exactly `[1, 0, 1]`, and rational
  data produces exact rational coefficients rather than floats. With a trailing
  variable argument the fitted **expression** is returned directly, ready to
  plot: `PolynomialFit([(0,1), (1,2), (2,5), (3,10)], 2, x)` → $x^2 + 1$.

- **`Quantile` computes empirical quantiles of data.** `Quantile(collection, p)`
  interpolates the sorted data so that `Quantile(xs, 1/4)`, `Quantile(xs, 1/2)`
  and `Quantile(xs, 3/4)` agree exactly with `Quartiles` and `Median`
  (Moore–McCabe convention), with general `p` interpolated through the order
  statistics in rank space. (Combined with the distribution form above,
  `Quantile` covers both the theoretical and the empirical case.)

- **`Divides` and `NotDivides` express divisibility.** `a \mid b` parses to
  `Divides(a, b)` and `p \nmid ab` to `NotDivides(...)`; both evaluate for
  concrete integers (`Divides(3, 12)` → `True`) and stay symbolic otherwise.

- **Geometry notation is transcribed as inert heads.** `\angle ABC` →
  `Angle(A, B, C)` (also `\varangle`, `∠`), `\triangle ABC` →
  `Triangle(A, B, C)`, `\square ABCD` → `Quadrilateral(A, B, C, D)`, `A \perp B`
  → `Perpendicular`, `AB \parallel CD` → `Parallel`, `\widehat{ABC}` → `Arc`,
  `\overparen{BC}` → `OverParen`, and `\langle a, b \rangle` → `AngleBracket`.
  These heads have no evaluation semantics — the Compute Engine does not model
  geometry — but they parse and serialize faithfully so downstream consumers
  (e.g. graphical clients) get the structure instead of an error. Angle and arc
  measures are typed as numbers, so `\angle A + \angle B + \angle C = 180^\circ`
  composes in arithmetic.

- **`\sim` parses to the generic similarity relation `Tilde`.** It covers
  triangle similarity (`\triangle ABC \sim \triangle DEF`), asymptotic
  equivalence, and "is distributed as" (`X \sim N(0, 1)`); `\nsim` negates it,
  and `\simeq` now maps to the existing `TildeEqual` head (it previously had no
  LaTeX trigger).

### Step-by-Step Explanations

- **`expr.explain()` returns a structured, step-by-step explanation of a
  simplification** — the textbook chain _expression → step (with a reason) → … →
  result_. Each step carries the expression state after the step, a stable
  machine `id` (the localization key for consumers), and a default English
  description; `explain().result` is always the same value `simplify()` returns.
  `ce.parse('\\frac{x^2-1}{x-1}').explain()` yields one step, _"Cancel the
  common factors"_, ending at `x + 1`.
  - The step chain is curated by default (driver bookkeeping is filtered out);
    pass `{verbosity: 'all'}` for the raw trace (rule authoring, debugging).
    `simplify()` options (`rules`, `costFunction`, `strategy`) are honored.
  - The most frequently fired simplification rules ship with curated
    descriptions ("Apply the Pythagorean identity: sin²x + cos²x = 1", "Combine
    powers with the same base: xⁿ·xᵐ = xⁿ⁺ᵐ", …); other rules get a readable
    fallback derived from the rule id. `registerStepLabels()` lets a host
    application override or extend the descriptions.
  - **`expr.explain('solve')` traces equation solving.** Step values are
    _equations_ — the state after each phase — so the chain reads like textbook
    working: `2x+1=5` → _Move all terms to one side_ `2x-4=0` → _Isolate the
    unknown_ `x=2`. The trace covers the solver's algorithmic phases (clearing
    denominators, squaring both sides, substitutions like `u = eˣ` with
    back-substitution, zero-product factoring, the quadratic formula, checking
    candidates and rejecting extraneous roots) and the root-template rules,
    which now carry stable `solve.*` ids. `explain('solve').result` is a `List`
    of the same roots `solve()` returns; the unknown is inferred or passed via
    `options.variable`. Systems of equations are not traced yet.
  - **`expr.explain('D')` traces differentiation.** Steps are whole-expression
    states in traversal order — each textbook rule (sum, product, quotient,
    power, chain, exponential, logarithmic differentiation, table lookups) first
    appears with its unresolved sub-derivatives as inert `D(…)` terms, which
    resolve step by step: `D(x·sin x, x)` → _Apply the product rule_
    `x·D(sin x, x) + sin x` → _Differentiate using a known derivative_
    `x·cos x + sin x`. The variable is inferred when unambiguous (or passed via
    `options.variable`), and the result always matches evaluating
    `D(expr, variable)`.

### Solving

- **`Solve` accepts a domain for the unknown.**
  `Solve(x^2-5x+6=0,\; x \in 1..1000)` restricts solutions to a collection: the
  equation is solved symbolically and the roots are filtered to the domain (an
  integer domain also discards non-integer roots up front). When the symbolic
  solver finds nothing and the domain is finite and reasonably sized, `Solve`
  falls back to enumeration with a compiled predicate, confirming every
  candidate exactly so float rounding never produces a wrong answer (budgeted,
  interruptible; an unaffordable search returns the expression unevaluated
  rather than a partial answer). The predicate is not limited to equations — any
  boolean condition works: `Solve(2^n \equiv 1 \pmod{7},\; n \in 1..20)` →
  `[3, 6, 9, 12, 15, 18]`, and an extra condition can ride on the domain
  (`n \in 1..100, n > 5`-style, as in `Sum` indexing sets). The two-argument
  form is unchanged.

- **Multiple unknowns enumerate over the product of their domains.**
  `Solve(x^3+y^3=1729,\; x \in 1..12,\; y \in 1..12)` →
  `[(1,12), (9,10), (10,9), (12,1)]` — a `List` of `Tuple`s in unknown order,
  with the same budget, exact-confirmation, and interruption guarantees as the
  univariate case.

- **Integer equations are solved symbolically (diophantine solving).** When
  every unknown ranges over integers, `Solve` recognizes **linear** equations in
  any number of unknowns and **Pell-family** equations $x^2 - Dy^2 = N$
  (including the elliptic case $x^2 + |D|y^2 = N$) and solves them in closed
  form — ported from SymPy's diophantine module and validated against its test
  suite. Over a bounded domain this reaches answers enumeration cannot:
  `Solve(x^2-29y^2=1,\; x \in 1..10^5,\; y \in 1..10^5)` → `[(9801, 1820)]` via
  continued fractions, where the $10^{10}$-candidate sweep would be refused; an
  unsolvable equation is decided instantly
  (`Solve(6x+9y=4,\; x \in \pm10^6,\; y \in \pm10^6)` → `[]`). With
  integer-typed unknowns and no domain — previously inert — `Solve` returns the
  **parametric family**: `Solve(3n+4m=7, n, m)` → `[(4t-7,\; -3t+7)]` with the
  fresh parameter `t` ranging over ℤ, and Pell equations yield their exact
  closed forms $\bigl(\tfrac{(3+2\sqrt2)^t + (3-2\sqrt2)^t}{2}, \dots\bigr)$,
  and **Pythagorean triples** return the complete classical parametrization:
  `Solve(x^2+y^2=z^2, x, y, z)` → $\bigl(t(t_1^2-t_2^2),\; 2t\,t_1 t_2,\; t(t_1^2+t_2^2)\bigr)$ and its leg-swap — every integer triple, including all
  signs, lies in one of the two families. Every concrete solution is
  exact-confirmed by substitution; half-bounded domains (e.g. $n \ge 1$ alone)
  are left unevaluated, and forms whose textbook parametrizations are provably
  incomplete (weighted coefficients, four or more squares) are declined rather
  than answered partially.

- **Periodic equations expand their root families over a bounded domain.**
  `Solve(\sin x = \tfrac12,\; x \in [0, 4\pi])` returns all four exact solutions
  $\tfrac{\pi}{6}, \tfrac{5\pi}{6}, \tfrac{13\pi}{6}, \tfrac{17\pi}{6}$ — not
  just the principal values. Scaled arguments work too (`\sin 2x = 1` over $[0, 2\pi]$ → $\tfrac{\pi}{4}, \tfrac{5\pi}{4}$). Expansion applies when the
  unknown appears only inside trigonometric functions of linear arguments; each
  family member is verified by exact substitution, and unreasonably large
  expansions degrade gracefully to the principal roots.

- **`assume()` bounds now filter solutions.** After `assume(n > 0)`,
  `Solve(n^2 = 16, n)` (and `expr.solve("n")`) returns `[4]` instead of
  `[4, -4]`; `assume(n \in 1..10)`, inequality, and `\ne` assumptions are
  honored the same way, conjunctively with any explicit domain. Roots are
  dropped only when an assumption definitely excludes them — symbolic roots that
  cannot be decided are kept.

### Parsing Resilience

The parser was hardened against a corpus of ~2,300 math fragments extracted from
real olympiad problems (the MathNet dataset); the clean-parse rate on that
corpus went from 85% to ~96%, and the one crash it exposed is fixed. See
`docs/mathnet/` for the corpus, the regression checker, and the work plan.

- **Ellipsis in a numeric context no longer throws.**
  `(1!)^2 + (2!)^2 + \dots + (2018!)^2` crashed with
  `The type of the constant "ContinuationPlaceholder" cannot be changed` (type
  inference attempted to narrow a constant). Inference is now a no-op on
  constants.

- **`\cdots`, `\dotsb`, `\dotsc`, `\dotsm`, and Unicode `…` parse as ellipsis.**
  Previously only `\dots`/`\ldots`/`...` did; `(2!+2)(3!+3) \cdots (2019!+3)`
  now parses with the placeholder as an inert operand instead of erroring.

- **A trailing sentence period no longer breaks an equation.** Input copied from
  prose often ends in `.`, `;` or `,` (e.g. `... = z^2.`). When — and only when
  — the parse would otherwise contain an error, the trailing punctuation is
  dropped and the input re-parsed. Valid input is unaffected: `5.` still parses
  as the decimal $5$.

- **Congruences parse and evaluate.** `a \equiv b \pmod{n}` (also `\bmod`, the
  parenthesized `(\bmod n)`, and the ASCII form `n ≡ 1 (mod 3)`) parse to
  `Congruent(a, b, n)`, which evaluates for concrete integers
  (`7 \equiv 1 \pmod{3}` → `True`) and now accepts symbolic moduli
  (`2^n \equiv 1 \pmod{p^{k+1}}` stays symbolic instead of erroring).

- **Common Unicode math symbols are accepted:** `≡` (congruence), `∈`, `∉`, `∪`,
  `∩`, `≈`, `∠`, and `…` — useful when input comes from plain-text sources
  rather than LaTeX.

- **Alignment environments parse as systems.**
  `\begin{aligned} a^2+ab+c=0 \\ b^2+bc+a=0 \end{aligned}` (also `align`,
  `gather`, `split`, `multline`, `eqnarray` and their starred variants) parses
  to a `List` of the row expressions — the same convention as `\begin{cases}`,
  accepted by `solve()`. Alignment markers are transparent: `x &= y` is `x = y`.

- **Qualified number sets parse.** `\mathbb{R}_{>0}` → `PositiveNumbers`,
  `\mathbb{Z}_{\ge0}` → `NonNegativeIntegers`, `\mathbb{N}^*` →
  `PositiveIntegers`, etc., and they round-trip to canonical LaTeX. A
  qualification with no named set (`\mathbb{N}_{>1}`) falls back to a faithful
  set-builder.

- **Structural odds and ends:** `A \backslash B` parses as `SetMinus` (the
  common alternative spelling of `\setminus`); a standalone quantified condition
  `\forall n \ge 1` parses instead of erroring; `\underbrace` mirrors
  `\overbrace`.

- **A symbol's inferred type narrows instead of erroring.** When a free symbol's
  type was inferred from one use and a later use requires a more specific type,
  argument validation now narrows the inference (when sound) instead of
  producing an `incompatible-type` error. This fixes
  `(A \setminus B) \cup (B \setminus A)` — where `B` was inferred as a value and
  then rejected as a set — as well as `-n!!` (double factorial of an undeclared
  symbol) and a family of similar mixed-use expressions. Declared types are
  unaffected: passing a declared string where a set is required is still an
  error.

### Packaging

- **The `integration-rules` plugin shares code with the main library.** The ESM
  builds of `compute-engine` and the opt-in
  `@cortex-js/compute-engine/integration-rules` entry point are now emitted with
  code splitting: the engine core lives in a shared chunk imported by both,
  instead of being bundled twice. This shrinks the combined download and fixes
  cross-bundle `instanceof` failures when a host mixed objects from the two
  bundles. The UMD builds remain self-contained single files.

### Lenient parsing and string helpers

- **The string helpers take a `strict` option.** `simplify()`, `evaluate()`,
  `N()`, `expand()`, `expandAll()`, `factor()`, `solve()`, and `compile()` parse
  string input in lenient (non-strict) mode by default. Note that lenient mode
  is not a pure superset of strict LaTeX: unbraced multi-digit scripts change
  meaning — `x^23` is $x^{23}$ (not $3x^2$), and `x_23`/`a_12` are single
  multi-digit subscripts. Pass `{ strict: true }` (e.g.
  `N('x^23', { strict: true })`) to restore the strict LaTeX grammar.

- **Lenient inverse functions, `atan2`, and letter runs parse correctly.**
  `sin^-1 x` now means $\arcsin x$ (the inverse function), not $1/\sin x$
  (matching strict `\sin^{-1}`); `sin^-2 x` stays $1/\sin^2 x$. `atan2(1, 2)`
  parses as `Arctan2(1, 2)`, and `acot`/`asec`/`acsc` are recognized. A
  multi-letter run with an embedded Greek constant is segmented (`2pix` → $2\pi x$, `xpi` → $x\pi$) instead of injecting a spurious imaginary unit, and an
  implicit subscript is accepted on a constant base (`alpha2` → $\alpha_2$).

### Differential Equations

- **Repeated roots produce correct general solutions.** `DSolve` now clusters
  numeric characteristic roots by multiplicity: $y'''' + 2y'' + y = 0$ gives
  $(c_1 + c_2 x)\cos x + (c_3 + c_4 x)\sin x$ instead of a degenerate basis with
  spurious $e^{\varepsilon x}$ factors, and repeated real roots keep their $x e^{x}$ modes. A structural self-check returns the equation unevaluated rather
  than emit a basis with fewer independent solutions than the order.

- **No more corrupted solutions.** Equations with variable coefficients on
  higher-order derivatives (e.g. $x^2 y'' + x y' = x$) previously returned a
  "solution" containing an internal `Error` node; they now stay unevaluated when
  the class is unsupported. Equations whose right-hand side references the
  dependent function with a transformed argument (e.g. $y'(x) = y(2x)$) stay
  unevaluated instead of returning an unevaluated integral as "solved".

- **Exponential forcing terms solve.** Variation of parameters was silently
  disabled for exponential bases (an internal Wronskian stayed unsimplified):
  $y'' - y = e^x$ now returns $c_1 e^x + c_2 e^{-x} + \frac12 x e^x - \frac14 e^x$, and $y'' + y = e^x$ returns $c_1 \cos x + c_2 \sin x + \frac12 e^x$,
  instead of the equation unevaluated. Solutions are returned in collected form
  (no $e^a \cdot e^b$ products or $A\sin^2 u + A\cos^2 u$ pairs).

- **Parsed LaTeX input works end-to-end.** `ce.parse("y''(x)+y(x)=0")` no longer
  canonicalizes the derivative of an undeclared function into an `Error` node: a
  derivative now reports a numeric result type, so prime/dot-notation equations
  flow from `parse()` through `DSolve` ($\dot x + \ddot x$ expressions are
  likewise no longer corrupted). The implicit first-order form
  `Apply(Derivative(y), x)` is also recognized (order defaults to 1).

### Evaluation

- **`Beta` is exact and pole-aware.** $\mathrm{B}(a, m)$ with a positive integer
  argument reduces exactly ($\mathrm{B}(2,3) = \frac{1}{12}$, $\mathrm{B}(-2,2) = \frac12$), and arguments at gamma-function poles return $\tilde\infty$
  instead of a silently wrong finite value ($\mathrm{B}(-1,2)$ previously
  returned $-2.97\times10^{49}$).

- **Multiplication by infinity respects sign information.** $x \cdot \infty$
  stays symbolic when the sign of $x$ is unknown, evaluates to $-\infty$ when
  $x$ is known negative, and to `NaN` when $x$ is zero — it no longer collapses
  to $+\infty$ unconditionally.

- **Inverse hyperbolic functions have values at their poles.**
  $\operatorname{artanh}(\pm 1)$ and $\operatorname{arcoth}(\pm 1)$ evaluate to
  $\pm\infty$, $\operatorname{arsech}(0)$ to $+\infty$, and
  $\operatorname{arcsch}(0)$ to $\tilde\infty$, with result types that no longer
  claim a finite value at a pole.

- **`Sum` reports incompatible elements.** Summing a collection containing a
  string returns a typed error instead of a silent `NaN`.

- **Sums and products over an infinite domain stay symbolic under
  `evaluate()`.** An infinite domain has no exact value by truncation, so
  $\sum_{n=1}^{\infty} \frac{1}{n^2}$ now evaluates to itself; `.N()` returns
  the truncated numeric approximation, as before. Previously `evaluate()`
  returned a silently truncated partial sum (off by $\sim 10^{-4}$ for this
  example) — a float where the exactness contract promises an exact value.

- **Sums and products with symbolic bounds no longer evaluate to a number.**
  `\sum_{k=1}^{n} k` with an unbound $n$ evaluated to $50\,015\,001$ — the sum
  truncated at an internal iteration cap of $10\,001$ — under both `evaluate()`
  and `.N()`. It now stays symbolic (`simplify()` still produces the closed form
  $\tfrac{n^2+n}{2}$).

- **`Expand` computes constant powers.** `Expand((2+3i)^{1000})` returns the
  exact 557-digit Gaussian integer (matching SymPy's `expand()`), and
  `Expand(2^{1000})` the exact integer; both previously returned unevaluated.
  Structural expansion of symbolic powers is unchanged, and powers too large for
  exact computation still stay symbolic.

- **Huge exact complex numbers are finite and print in full.** An exact Gaussian
  integer with components beyond float64 range (e.g. $(2+3i)^{1000}$) reported
  `isInfinity` `true`, serialized as $\tilde\infty$ in plain text, and had a
  `NaN` `bignumIm` — all artifacts of routing through the machine-float
  projection. It now types as `finite_complex`, prints its full digits, and
  `bignumIm` is exact.

- **Perfect-power radicands reduce.** $(997^3)^{1/6} = \sqrt{997}$, $8^{1/6} = \sqrt2$, $8^{1/4} = 2^{3/4}$: when canonicalization folds a power into an
  opaque integer, the root now recovers the structure by perfect-power
  decomposition. In particular the zero-equivalence test $\sqrt{997} - (997^3)^{1/6}$ evaluates to exact $0$ (it previously leaked a float residue).

- **Logarithms reduce when the argument and base are powers of a common base.**
  $\log_8 32768 = 5$, $\log_8 2 = \tfrac13$, $\log_4 8 = \tfrac32$ — exactly,
  honoring the exactness contract ($\ln 2$ and $\log_8 10$ stay symbolic).

- **`Xor` cancels repeated operands.** $a \oplus a = \mathrm{False}$, so
  `Xor(x, y, y)` evaluates to $x$; cancellation composes with the existing
  `True`/`False` folding.

### Linear Algebra

- **3×3 Eigenvalues returned wrong values — fixed.** The analytic solver used a sign-flipped term in its depressed cubic, mirroring every eigenvalue about $\operatorname{tr}/3$: e.g. $[[5,-3,-7],[-2,1,2],[2,-3,-4]]$ returned $\{\tfrac{10}{3}, -\tfrac53, \tfrac13\}$ instead of $\{1, -2, 3\}$. (Spectra symmetric about their mean — like $\{1,2,3\}$ — were unaffected, which is how it escaped notice.) Additionally, a complex-conjugate eigenvalue pair was returned as its real part twice ($\{2, \pm i\}$ came back $\{2, 0, 0\}$); complex eigenvalues are now returned as complex numbers.

### Rules and Pattern Matching

- **Rule conditions must return a boolean.** A `condition` function returning a
  non-boolean (e.g. the boxed symbol `False`, which is a truthy JavaScript
  object) no longer fires the rule; a one-time console warning identifies the
  malformed condition. Returning the boxed symbol `True` is accepted.

- **`e` and `i` work in string rules.** Rules such as `'e^2 -> 7'` now match:
  the constants are resolved to `ExponentialE` and the imaginary unit when the
  rule is parsed, instead of remaining inert symbols that could never match.

- **Explicit wildcards work in LaTeX match patterns.** An object-form rule such
  as `{match: '_a + 1', replace: '_a'}` now parses `_a`/`__a` as wildcards
  instead of an implicit product.

- **A throwing condition no longer discards subexpression rewrites.** If a rule
  condition throws, the rule is skipped at that node but successful rewrites of
  the operands are kept.

## 0.67.0 _2026-07-03_

This release improves correctness and predictability across the public Compute
Engine API: exact complex and integer arithmetic stays exact more often, partial
derivatives and assumptions are more capable, LaTeX and lenient parsing
round-trip more reliably, compiled output agrees more closely with interpreted
evaluation, and arbitrary-precision arithmetic is substantially faster. It also
fixes many cases where `evaluate()`, `N()`, `simplify()`, `isEqual()`,
`assume()`, `verify()`, serialization, or compilation could return a wrong
answer, lose exactness, hang, or silently accept invalid input.

### Exact and Numeric Evaluation

- **Exact complex arithmetic preserves exact values.** Gaussian integer and
  rational complex values now stay exact through arithmetic: $(1+i)^3$ evaluates
  to $-2+2i$, $(1+i)^{-2}$ to $-\frac{i}{2}$, $\frac{1}{1+i}$ to
  $\frac{1-i}{2}$, $\sqrt{3+4i}$ to $2+i$, and $\sqrt{-4}$ to $2i$. Exact
  complex numbers also round-trip through MathJSON as `["Complex", re, im]` with
  exact components.

- **Integer powers and large integers stay exact.** Integer powers such as
  $2^{127}$ now evaluate to exact integers, negative integer powers produce
  exact rationals such as $2^{-2} = \frac14$, and powers of Gaussian integers
  such as $(1+i)^2$ evaluate exactly. Very large exact integers are no longer
  rounded when used by `IsPrime`, `IsOdd`, `IsEven`, `FactorInteger`, `Mod`, or
  `DigitSum`.

- **Exact results are preserved more consistently.** `evaluate()` no longer
  turns exact arguments into floats in cases such as $\sqrt{-2}$,
  $\operatorname{Fract}(\frac12)$, $\Re(\frac12)$, $|1+i|$, $\log_2(\pi)$,
  `Distance`, and statistics functions. For example,
  $\operatorname{Mean}([1,2,3,4])$ now returns $\frac52$, and
  $\operatorname{StandardDeviation}([1,2,3,4])$ returns $\frac{\sqrt{15}}{3}$.

- **Special functions are more accurate.** `PolyGamma`, `Zeta`, `BesselI`,
  `BesselK`, Airy functions, logarithms, roots, trigonometric functions near
  zeros and poles, `LambertW`, `acos`, `erfInv`, `Hypergeometric2F1`, `Gamma`,
  `Beta`, Fresnel integrals, and complex elementary functions have improved
  numeric accuracy, including at high precision.

- **Negative logarithms and complex logarithms are consistent.** Inexact
  negative arguments now produce the principal complex value under both
  `evaluate()` and `N()`. Exact negative arguments stay symbolic under
  `evaluate()` and produce the principal complex value under `N()`. Logarithms
  with a complex argument and explicit base now agree between `evaluate()` and
  `N()`.

- **Roots and radicals are more reliable.** Exact perfect powers such as
  $64^{1/3}$ and $(27/8)^{1/3}$ evaluate exactly, `Root(64, 3).N()` returns
  exactly $4$, odd roots of negative numbers keep the real-root convention, and
  `N(\sqrt{4y})` now returns $2\sqrt{y}$ instead of dropping the radical.

- **Sums and infinite sums behave better.** Exact sums such as
  $\sum_{k=1}^{5}\sqrt{k}$ now remain exact, while sums over infinite index sets
  such as $\sum_{n \in \mathbb{Z}^+}\frac{1}{n^2}$ evaluate numerically when
  appropriate, remain symbolic when parameters prevent evaluation, and respect
  `timeLimit`.

### Differentiation, Integration, and Simplification

- **Partial derivatives of multivariate functions now work symbolically.**
  `D(f(x, y), x)` now represents the partial derivative with respect to the
  first argument, mixed partials accumulate correctly, and multivariate chain,
  product, power, and quotient rules compose as expected. For example,
  `D(f(x^2, y), x)` returns a symbolic chain-rule result proportional to $2x$.

- **Partial-derivative notation parses and evaluates.** Forms such as
  $\partial_x f(x,y)$, $\frac{\partial}{\partial x} f(x,y)$,
  $\frac{\partial^2}{\partial x \partial y} f(x,y)$, and
  $\frac{\partial^2}{\partial x^2} f(x,y)$ now parse to `D` and evaluate
  correctly.

- **Derivative notation is more robust.** Compact derivatives such as
  `d/dx(f(g(x)))` preserve unknown-function chain rules, higher-order
  derivatives round-trip through LaTeX, and $\frac{d}{dx}[\sin x]$ treats the
  square brackets as grouping rather than a one-element list.

- **Several derivative rules are corrected.** Variable-degree radicals such as
  `Root(x, x)` differentiate as $x^{1/x}$, $\frac{d}{dx}\operatorname{Mod}(x,5)$
  gives $1$ almost everywhere, and $D(\operatorname{arcoth}(x), x)$ returns
  $\frac{1}{1-x^2}$.

- **Definite integrals no longer return fabricated closed forms.** If no
  closed-form antiderivative is found, `evaluate()` keeps the definite integral
  symbolic instead of substituting bounds into the integrand. `N()` still
  computes a numeric value.

- **Default simplification covers more identities.** The sine addition identity
  $\sin(x)\cos(y)+\cos(x)\sin(y)=\sin(x+y)$ now applies in the default
  `simplify()` path. Pythagorean identities such as $\sin^2 x+\cos^2 x$ also
  simplify inside larger sums.

- **Simplification is more exact and branch-aware.** Combining powers keeps
  exact exponents, for example $x \cdot x^{\sqrt2}$ becomes $x^{1+\sqrt2}$. The
  simplification of $\ln(x^2)$ now produces $2\ln(|x|)$ for real $x$, and
  identities that require real arguments no longer apply to symbols declared as
  complex.

- **Some unsafe rewrites were removed.** `simplify()` no longer rewrites $|\sin x|$ as $\sin|x|$, `Arctan2` preserves the correct quadrant, rule conditions
  such as $x \ne 0$ require proof rather than assuming unknown symbols satisfy
  them, and alternating-binomial sum simplifications now check their validity
  bounds.

- **Differential equation solvers handle higher-order equations.** (contributed
  by [KingArth0r](https://github.com/KingArth0r)) `DSolve` now solves **linear
  constant-coefficient homogeneous** equations of any order via the
  characteristic polynomial — distinct real, repeated, and complex roots — for
  example `y''(x) = y(x)` → `[y(x) = c_1·e^x + c_2·e^{-x}]` and
  `y''(x) + y(x) = 0` → `[y(x) = c_1·cos(x) + c_2·sin(x)]`. Roots are kept exact
  when the characteristic polynomial factors and fall back to numeric roots
  otherwise. It also solves **second-order constant-coefficient nonhomogeneous**
  equations (undetermined coefficients for polynomial forcing, variation of
  parameters otherwise) and **second-order Cauchy–Euler** equations. Integration
  constants are now named `c_1`, `c_2`, … (fresh names are chosen if those are
  already in use). Correspondingly, `NDSolve` now solves explicit
  **higher-order** initial value problems `y⁽ⁿ⁾(x) = f(x, y, y', …, y⁽ⁿ⁻¹⁾)` by
  reducing them to a first-order RK4 system, with the initial condition given as
  a list `[y(x0), y'(x0), …]`. Equations outside these classes remain inert.

### Parsing and Serialization

- **`\binom` is supported.** `\binom{n}{k}`, `\dbinom{n}{k}`, and
  `\tbinom{n}{k}` parse to `Binomial(n, k)`, and `Binomial` serializes back to
  `\binom`.

- **LaTeX parsing accepts more common notation.** `N(...)` and `D(...)` parse as
  numeric evaluation and differentiation outside quantifier scopes, superscripts
  on `\log`, `\ln`, `\lg`, and `\exp` bind to the applied function, and `==`,
  `!=`, chained `\ne`, mixed-direction inequality chains, parenthesized
  relations, and double negation such as `x--y` now parse with the expected
  meaning.

- **Lenient parsing is more useful.** In lenient mode, digit suffixes parse as
  subscripts (`x2` as $x_2$), bare known function names apply to the following
  factor (`sin x`), `log2(8)` means $\log_2 8$, `[1,...,10]` parses as a range,
  and $\mathbb{Z}^+$ parses as `PositiveIntegers`.

- **The public string helpers accept their documented syntax.** `simplify()`,
  `evaluate()`, `N()`, `expand()`, `expandAll()`, `factor()`, `solve()`, and
  `compile()` now parse string input in non-strict mode, so expressions such as
  `sqrt(5)`, `sin(alpha)`, and `x**2` work as documented.

- **`verify()` and `assume()` accept strings.** `ce.verify('x > 0')` and
  `ce.assume('$x > 0$')` parse the predicate and report clear errors for
  unparseable input.

- **MathJSON `.json` serialization is lossless for more numbers.** Exact large
  integers, 16- and 17-digit values, high-precision complex numbers, exact
  rational/radical values such as $\frac{\sqrt3}{2}$, and repeating decimals now
  round-trip without silently changing value.

- **LaTeX round-trips are improved.** Repeating decimals serialize with an
  overline, sequence expressions no longer serialize as ambiguous adjacent
  numbers, set-builder notation attaches conditions to the comprehension, and
  `toMathJson({exclude: ...})` honors exclusions for number literals.

### Assumptions, Types, and Equality

- **The numeric type hierarchy is more natural.** `real` is now a subtype of
  `complex`, so real-typed symbols satisfy complex-typed signatures and guards.
  Union types flatten and canonicalize their member order, and type negation now
  distinguishes `never` from `nothing`.

- **Complex and non-finite type inference is more precise.** Expressions such as
  $\sqrt2 i$, $i^2$, $i/2$, $i^3$, $e^i$, and $\ln(-1)$ infer more accurate
  types. Non-finite values such as $\tan(\frac\pi2)$, $\Gamma(0)$, $\zeta(1)$,
  $\ln(0)$, $0 \cdot \infty$, and $k/0$ no longer claim finite types when that
  is unsound.

- **Assumptions can prove more facts.** Assumptions over signed integer and real
  sets refine both type and sign. Inequality bounds now affect equality checks,
  comparisons between bounded symbols, and `verify()`. Chained inequalities and
  equations with multiple roots are recorded correctly, contradictory
  assumptions are rejected atomically, and `forget()` clears values introduced
  by `assume('x = 5')` while preserving values set with `assign()`.

- **Assumptions respect scope.** Assumptions made inside a pushed scope no
  longer leak into parent scopes or continue to affect expression results after
  `popScope()`.

- **Equality and ordering are more coherent.** `isSame` is now an equivalence
  relation, `isEqual` returns `undefined` for indeterminate equality with free
  variables, equality and ordering share one tolerance, collection equality uses
  scalar tolerance semantics, and complex numbers are no longer ordered against
  real numbers.

- **Set, collection, and statistics behavior is corrected.** `Intersection`,
  `SymmetricDifference`, `Union`, and `SetMinus` produce correct finite-set
  results, `Reverse([1,2,3])` returns `[3,2,1]`, `Quartiles` consistently uses
  the Moore-McCabe convention, and single-argument
  $\operatorname{KroneckerDelta}(0)$ returns $1$.

### Compilation

- **Compiled JavaScript, Python, GLSL, WGSL, and interval output now match the
  interpreter more closely.** Equality uses the engine tolerance, `Mod` and
  `Remainder` use consistent conventions, chained relations evaluate middle
  operands once, dynamic $0^0$ returns `NaN`, non-boolean `Which` and `When`
  conditions throw, and interval arithmetic matches interpreter conventions for
  branches, rounding, modulus, and odd roots of negative numbers.

- **Compilation fails closed when a target cannot represent an expression
  correctly.** Unsupported or unsafe cases such as invalid shader constructs,
  reserved shader variable names, non-real values in real-only target helpers,
  multi-index sums or products that a target cannot express, and invalid
  constant folds now fail at compile time instead of emitting wrong code.

- **The Python target emits valid Python for more expressions.** Conditional
  expressions, `NaN`, logical operators, chained relations, assigned symbols,
  `vars`, and target options now compile consistently with the JavaScript target
  and the interpreter.

### Additional Resolved Issues

- **Evaluation limits are honored more reliably.** Hard limits such as
  nested-exponential limits, divergent infinite sums, and very large special
  function inputs now return promptly, remain symbolic, or throw a
  `CancellationError` when `timeLimit` or the recursion limit is exceeded.
  Examples include $\lim_{x\to\infty} e^{e^{e^x}}/e^{e^{e^{x-1}}}$,
  $\Gamma(10^{300})$, $\zeta(\pm 10^{300})$, $\operatorname{Fib}(10^9)$,
  $\binom{2 \times 10^9}{10^9}$, and $\operatorname{Subfactorial}(10^6)$.

- **`simplify()` honors more of its public contract.** `simplify({rules: null})`
  now applies no rewrite rules, as documented, and logarithmic simplifications
  such as $\ln(a)/\ln(b)$ no longer reduce to an integer unless the identity can
  be verified exactly. `simplify()` also preserves exact exponents when
  combining powers, so $x \cdot x^{\sqrt2}$ becomes $x^{1+\sqrt2}$ rather than a
  decimal exponent.

- **Numeric comparison and formatting edge cases are fixed.** Two large 15-digit
  values that previously compared in the wrong order now compare correctly,
  `toPrecision(15)` no longer corrupts `999999999999999`, NaN has a
  deterministic place in canonical ordering, and high-precision `toString()`,
  `.json`, and `toFixed()` avoid long stalls on enormous exponents.

- **Substitution and collection operations are more complete.** `subs()` now
  reaches into lists and tensors, for example `Median([a,b,c]).subs({a: 1})`.
  Finite set operations such as `Intersection({1,2}, {2})` and
  `SymmetricDifference` now evaluate correctly, and `Reverse([1,2,3])` returns
  `[3,2,1]` instead of throwing.

- **Strict and non-strict validation are more predictable.** In strict mode,
  user-declared function signatures are enforced for closed arguments, numeric
  operators reject provably non-numeric operands such as `Sin("hello")`, big-op
  bounds are type-checked, and `Map([1,2,3], "nf")` is rejected. In non-strict
  mode, missing required arguments such as `Sqrt()` or `Power(2)` no longer
  crash.

- **Rule replacement is safer.** Rule guards such as $x \ne 0$ must now be
  provable before they match, wildcard conditions such as `:notzero` no longer
  assume unknowns satisfy the condition, and failed sequence-wildcard matches no
  longer drop operands from the expression being transformed.

- **Special values and combinatorics are corrected.** `Choose` and `Binomial`
  now share standard conventions, including `Choose(2,3) = 0` and negative upper
  indices such as `Binomial(-2,3) = -4`. `Argument(1+i)` evaluates to $\pi/4$,
  several `Digamma` special values simplify when the Fungrim pack is loaded, and
  integer-domain functions such as `Fibonacci(+Infinity)` and
  `MoebiusMu(Infinity)` stay symbolic instead of throwing.

- **Modular arithmetic is consistent.** `Mod` is floored everywhere, so
  `Mod(-7, 3)` returns $2$, while `Remainder` uses round-to-nearest semantics.
  Exact rational inputs stay exact, for example `Mod(\frac12, \frac13)` returns
  $\frac16$.

- **Complex and matrix products no longer lose meaning.** Multiplying a scalar
  by a complex literal such as `["Complex", 1, 1]` preserves both real and
  imaginary parts, and symbolic matrix products preserve their written order, so
  a commutator such as $MP - PM$ no longer collapses to $0$ for declared matrix
  symbols.

- **Parsing rejects or preserves ambiguous forms more reliably.** `x^2^3` is now
  a parse error instead of an unintended list power, `Sequence(1,2)` no longer
  serializes as `1 2`, parenthesized relations are treated as atomic operands
  inside larger chains, and a scalar or matrix next to a function- or
  matrix-valued symbol is parsed as multiplication rather than a tuple.

- **`0^0` and non-finite values are consistent across paths.** `evaluate()`,
  `N()`, and compiled JavaScript now agree that $0^0$ is `NaN`. Trigonometric
  poles such as `N(\cot \pi)` and `N(\csc \pi)` now return complex infinity
  rather than huge finite artifacts.

### Performance

- **LaTeX parsing is 15-28% faster.** Parsing is faster on derivative,
  polynomial, matrix, and definite-integral inputs, with the same parse results
  as before.

- **Arbitrary-precision arithmetic is substantially faster.** At 100 significant
  digits, addition, subtraction, multiplication, division, and comparison are
  now much faster than in 0.66.0, and high-precision `ln`, `exp`, `Gamma`, and
  related operations also benefit. The improvements are visible in both direct
  numeric work and symbolic operations that depend on arbitrary-precision
  arithmetic.

  **Arbitrary-precision arithmetic at 100 significant digits** (ns per
  operation, lower is better; warm median, distinct operands per call):

  | op     | **CE 0.67.0** | CE 0.66.0 |  math.js¹ | Mathematica² |
  | ------ | ------------: | --------: | --------: | -----------: |
  | `add`  |        **75** |       152 |       278 |        1,023 |
  | `sub`  |        **91** |       167 |       329 |        1,212 |
  | `mul`  |       **202** |       319 |     7,984 |        1,025 |
  | `div`  |       **501** |     1,748 |    11,890 |        1,366 |
  | `cmp`  |        **29** |       198 |        61 |          984 |
  | `sqrt` |         3,163 |     4,018 |    54,696 |    **1,055** |
  | `exp`  |         4,795 |     8,698 |   728,876 |    **1,682** |
  | `ln`   |         5,887 |    32,398 |   670,206 |    **1,353** |
  | `cos`  |         6,914 |     7,467 | 1,666,292 |    **2,059** |

  <small>¹ math.js `BigNumber` (decimal.js) at precision 100. ² Mathematica 14.3
  timed inside the kernel with result caches disabled; its ~1 µs per-call
  dispatch floor dominates its small-op rows. CE and 0.66.0 from
  `benchmarks/big-decimal/ops-results.json`; reproduce with
  `node benchmarks/big-decimal/run-ops.mjs` and
  `wolframscript -file benchmarks/big-decimal/ops-bench.wls`.</small>

  **Symbolic operations** (ms per call, lower is better; warm median, from the
  cross-library suite in `benchmarks/REPORT.md`):

  | case                    | **CE 0.67.0** | CE 0.66.0 | math.js |   SymPy | Mathematica |
  | ----------------------- | ------------: | --------: | ------: | ------: | ----------: |
  | simplify `√(3+2√2)`     |      **0.07** |      0.09 | 🟡 0.92 | 🟡 3.56 |        3.28 |
  | simplify `√6·x + √2·x`  |      **0.16** |      0.19 |    1.13 |    5.69 |        18.0 |
  | simplify `(x²−1)/(x−1)` |      **0.10** |      0.15 | 🟡 0.99 |    8.53 |        0.17 |
  | `d/dx √(1−x²)`          |          0.22 |      0.21 |    2.13 |    5.70 |   **0.008** |
  | `d/dx xˣ`               |          0.04 |      0.04 |    1.83 |    1.80 |   **0.005** |
  | `∫ x eˣ dx`             |      **0.08** |      0.09 |       — |    6.53 |        0.57 |
  | `∫ x/(x²+1) dx`         |      **0.16** |      0.18 |       — |    7.23 |        0.60 |
  | `lim sin(x)/x`          |      **0.03** |      0.04 |       — |    0.62 |        1.93 |
  | `lim (1+1/x)ˣ`          |      **0.55** |      1.13 |       — |    2.76 |        5.81 |
  | solve `x⁴+x²−1 = 0`     |          1.88 |      4.65 |       — |    8.56 |    **0.55** |
  | solve `x³−x−1 = 0`      |      **0.11** |      1.18 |       — |    5.73 |        0.23 |

  <small>🟡 = value-correct but not fully simplified. — = not supported. SymPy
  1.14 via `sympify`/`evalf` (per-call parse included, as for every string-based
  tool). All engines measured warm, per-call from source, same protocol
  (`benchmarks/REPORT.md`, "Methodology").</small>

- **Integration, assumptions, polynomial solving, and factoring are faster.**
  Rubi-backed integration spends less time on integrals it cannot solve,
  sign-related assumption queries respond faster, polynomial equations solve
  faster, and `Factor` handles common square-pattern cases more efficiently.

## 0.66.0 _2026-06-28_

### New Features

- **`Multiply` now operates on vectors and matrices.** Previously a product with
  any list/matrix operand was left unevaluated — even `2 * [1, 2, 3]`.
  `Multiply` (i.e. `*`, `\cdot`, `\times`, and implicit products) now follows
  matrix-product / scalar-scaling semantics, matching `Add`'s existing
  element-wise threading:

  - **Scalar × tensor** scales every element: `2 * [1, 2, 3]` → `[2, 4, 6]`,
    `2 * \begin{pmatrix}1&2\\3&4\end{pmatrix}` →
    `\begin{pmatrix}2&4\\6&8\end{pmatrix}` (exact values are preserved, e.g.
    `\frac12 [2, 4, 6]` → `[1, 2, 3]`).
  - **Two or more matrices/vectors** form the **matrix product**, folded
    left-to-right in the written order:
    `\begin{pmatrix}1&2\\3&4\end{pmatrix}\begin{pmatrix}5&6\\7&8\end{pmatrix}` →
    `\begin{pmatrix}19&22\\43&50\end{pmatrix}`. The product is **not**
    commutative — operand order is preserved (including for `matrix·vector` vs
    `vector·matrix`), and `vector·vector` reduces to the dot product. This
    reuses the existing `MatrixMultiply` implementation.

  Element-wise (Hadamard) multiplication of two same-shape tensors is therefore
  **not** what `*` does; tensors of incompatible dimensions are left
  unevaluated, and symbolic operands of unknown shape are unaffected.

- **Hadamard (element-wise) product `\odot`.** A new `HadamardProduct` operator,
  written `\odot`, multiplies two vectors or matrices of the same shape entry by
  entry: `[1,2,3] \odot [4,5,6]` → `[4,10,18]` and
  `\begin{pmatrix}1&2\\3&4\end{pmatrix} \odot \begin{pmatrix}5&6\\7&8\end{pmatrix}`
  → `\begin{pmatrix}5&12\\21&32\end{pmatrix}` (compare the matrix product `*`,
  which gives `\begin{pmatrix}19&22\\43&50\end{pmatrix}`). Operands of
  incompatible shape report an `incompatible-dimensions` error. It binds like
  multiplication and round-trips through LaTeX as `\odot`.

### Resolved Issues

- **Mixed chained inequalities keep their middle term.** A chain combining
  different operators — e.g. `5 \le b \lt 7` — canonicalized to
  `And(5 \le 7, b \lt 7)`, dropping `b` from the first link (so `3 \le 2 \lt 7`
  wrongly evaluated to `True`). It now canonicalizes to `And(5 \le b, b \lt 7)`.
  Uniform chains (`5 \le b \le 7`) and the already-correct `a \lt b \le c` form
  are unchanged.

- **A transcendental of an exact _constant expression_ stays symbolic.** Per the
  exactness contract, `evaluate()` of a transcendental of an exact argument
  returns a symbolic result and only `.N()` numericizes. This held for number
  literals (`sin(2)` → `sin(2)`) but not for exact constant _expressions_:
  `sin(\pi^2)` numericized to `-0.4303…` instead of staying `sin(π²)` (and
  likewise `cos(√2)`, etc.). These now stay symbolic under `evaluate()`; an
  inexact (float) argument such as `sin(2.5)` still numericizes.

- **An exact real added to the imaginary unit keeps its exact real part.**
  `\frac12 + i` evaluated to `0.5 + i`, and `\frac34\sqrt3 + i` to `1.299… + i`
  — the exact real part was floatified when folded with `i`. Exact reals
  (rationals, radicals) are now preserved alongside the imaginary unit
  (`1/2 + i`, `3/4·√3 + i`); `.N()` still numericizes, and inexact reals
  (`1.5 + i`) are unchanged.

- **Matrix/vector arithmetic preserves exact entries.** A tensor with exact
  rational or radical entries was stored with a `float64` element type, so
  element-wise operations silently produced floats — e.g.
  `\begin{pmatrix}½&⅓\end{pmatrix} + \begin{pmatrix}½&⅓\end{pmatrix}` returned
  `[1, 0.666…]` instead of `[1, ⅔]`, and a matrix of `√2` entries decayed to
  decimals. Exact entries now use the `expression` element type and stay exact;
  inexact (machine/decimal) values continue to use `float64`.

- **`A^n` is now the matrix power for an integer exponent.** A power of a matrix
  was element-wise for non-negative exponents (`A^2` squared each entry, `A^0`
  gave a matrix of ones) yet `A^{-1}` already returned the inverse, and
  `\begin{pmatrix}…\end{pmatrix}^2` did not evaluate at all. `A^n` is now the
  matrix power — repeated matrix multiplication — consistent with `*` being the
  matrix product: `A^2 = A·A`, `A^0` is the identity, `A^{-1}` the inverse, and
  `A^{-n} = (A^n)^{-1}`. A non-square base reports `expected-square-matrix`.
  (Also fixes `MatrixPower(A, n)` for `n < -1`, which previously collapsed to
  `A^{-1}`.)

- **Element-wise functions now distribute over matrix/vector-valued
  sub-expressions.** A broadcastable unary function applied to an operand that
  only becomes a collection _after_ evaluation — e.g. `\sqrt{AB}`, `\sin(AB)`,
  `|AB|` where `AB` is a matrix product — was left unevaluated, because
  broadcasting was decided from the raw (un-evaluated) operand. It now also
  broadcasts over the evaluated operand, so these distribute element-wise like
  `\sqrt{M}` on a literal matrix already did. (`Add`/`Multiply` keep their
  dedicated tensor handling.)

- **Juxtaposed matrices now form the matrix product.** Writing two matrices next
  to each other (`\begin{pmatrix}…\end{pmatrix}\begin{pmatrix}…\end{pmatrix}`),
  or a scalar next to a matrix (`2\begin{pmatrix}…\end{pmatrix}`), previously
  produced a `Tuple` instead of a product, because the `Matrix(…)` wrapper is
  not reported as an indexed collection. The invisible (implicit) operator now
  treats matrix operands as multiplication, consistent with
  `*`/`\cdot`/`\times`.

- **`Negate` (and hence `Subtract`) of a matrix-valued product is distributed
  correctly.** A negation whose operand only became a vector/matrix after
  evaluation — e.g. `Negate(Multiply(A, B))` from `A B - A B` — was left
  undistributed, so the following `Add`/`Subtract` misclassified it as a scalar
  and broadcast it over the other matrix, yielding a bogus higher-rank result.
  Matrix subtraction (e.g. the commutator `AB - BA`) now evaluates correctly.

- **A `\textcolor` wrapping a bare operator now parses as that operator.** Input
  such as `x \textcolor{red}{=} y` previously failed — the `=` could not be
  parsed as a standalone group, producing a `Tuple` around an
  `expected-closing-delimiter` error. The color command is now transparent in
  operator position, so `x \textcolor{red}{=} y` parses as `Equal(x, y)` (and
  likewise for `+`, `<`, `\le`, `\times`, …). Because MathJSON has no way to
  annotate a lone operator glyph, the operator's color is dropped; coloring an
  operand (`\textcolor{red}{y}`, `\textcolor{red}{x+1}`) is unchanged and still
  yields an `Annotated`.

- **One-sided `\left( … \right.` enclosures now parse.** `\right.` (and the
  `\bigr.`/`\Bigr.`/… variants) is a TeX _null delimiter_: a fence with no
  visible closing glyph. Previously a one-sided group such as
  `\sin\left(x\right.` was rejected, leaking the `\left` out as an
  `unexpected-command` error; it now parses the same as `\sin\left(x\right)` (→
  `Sin(x)`). The null _open_ form (`\left.…\right|`, used by `EvaluateAt`) and
  ordinary two-sided delimiters are unchanged.

- **Summation/product indices written as a `\le` range are now recognized.** An
  index set of the form `\sum_{1 \le i \le 10} i^2` (and the one-sided
  `\sum_{i \le 10}`) is now turned into the expected `Limits`, so the index `i`
  is bound by the sum instead of falling through to the imaginary unit. The
  example above now evaluates to `385` rather than staying symbolic with
  `i → Complex(0, 1)`. This mirrors the existing handling of `i \ge 1` and
  `i = 1`; strict `<` chains are not yet treated as index sets.

## 0.65.0 _2026-06-28_

### New Features

- **Differential equation solvers.** (contributed by
  [KingArth0r](https://github.com/KingArth0r)) Two new functions in the calculus
  library provide an initial slice of ordinary differential equation (ODE)
  support:

  - **`DSolve(eq, y, x)`** — symbolic solver for **first-order linear scalar**
    equations of the form `y'(x) + p(x)·y(x) = q(x)`. It returns a `List` of
    solutions, each an `Equal` expression for `y(x)`, introducing an integration
    constant `C` (a fresh name is chosen if `C` is already in use). For example,
    `DSolve(y'(x) = y(x), y, x)` → `[y(x) = C·e^x]` and
    `DSolve(y'(x) + y(x) = x, y, x)` → `[y(x) = x - 1 + C·e^{-x}]`. Nonlinear or
    higher-order equations are left unevaluated (inert).

  - **`NDSolve(eq, y, limits, y0, steps?)`** — numerical solver for **explicit
    scalar first-order** initial value problems `y'(x) = f(x, y)`, `y(x0) = y0`,
    using a fixed-step fourth-order Runge–Kutta (RK4) method. It returns a
    `List` of `[x, y]` sample pairs over the interval given by `limits` (a
    `Limits` or `Tuple` of `(x, x0, x1)`); the number of steps defaults to 100.
    It handles integrands with no elementary antiderivative (e.g. a Gaussian IVP
    whose solution is expressed with `Erf`).

  This slice is intentionally narrow so the API and result shape can get
  feedback before broader ODE support (adaptive RK45, systems, higher-order
  reductions, stiff and implicit solvers) is added.

- **`\keyword{…}` command for control-flow and logic keywords.** Keyword
  constructs — `if`/`then`/`else`, `for`/`from`/`to`/`do`, `where`, `such that`,
  `and`, `or`, `iff`, `for all`, `there exists`, `break`, `continue`, `return` —
  can now be written with a dedicated `\keyword{…}` command, for example:

  ```latex
  \keyword{if} x > 0 \keyword{then} 1 \keyword{else} 0
  ```

  Unlike `\text{…}`, `\keyword{…}` keeps the input in math mode, and unlike
  `\operatorname{…}` it is rendered with symmetric keyword spacing. The existing
  `\text{…}` and `\operatorname{…}` spellings continue to work, and all three
  parse to the same expression. Multi-word keywords are written as a single
  token (e.g. `\keyword{for all}`). `\keyword{otherwise}` / `\keyword{else}`
  also serve as the default-branch marker inside a `cases` environment.

  A new `keywordStyle` serialization option — `"text"` (default), `"keyword"`,
  or `"operatorname"` — selects which spelling is emitted when serializing `If`,
  `Loop`, `Break`, `Continue`, and `Return` back to LaTeX. The default preserves
  the previous `\text{…}` output.

## 0.64.0 _2026-06-27_

### New Features

- **Expanded number-theory library.** A set of standard number-theoretic
  functions has been added to the `number-theory` library. Integer arguments use
  arbitrary-precision (bigint) arithmetic, and long-running cases honor the
  evaluation deadline.

  _Factorization & divisors:_

  - **`FactorInteger(n)`** — prime factorization as a list of
    `[prime, exponent]` tuples ordered by ascending prime: `FactorInteger(360)`
    → `[(2, 3), (3, 2), (5, 1)]`. Following Mathematica's conventions,
    `FactorInteger(0)` → `[(0, 1)]`, `FactorInteger(1)` → `[(1, 1)]`, and a
    negative integer carries its sign in a leading `[-1, 1]` tuple.
  - **`PrimeFactors(n)`** — the sorted distinct prime factors:
    `PrimeFactors(360)` → `[2, 3, 5]`.
  - **`Divisors(n)`** — the sorted positive divisors: `Divisors(12)` →
    `[1, 2, 3, 4, 6, 12]`. `Divisors(0)` is left unevaluated.
  - **`Radical(n)`** — the square-free kernel (product of distinct primes):
    `Radical(360)` → `30`.
  - **`PrimeNu(n)`** / **`PrimeOmega(n)`** — the number of prime factors without
    / with multiplicity (ω and Ω).
  - **`MoebiusMu(n)`** — the Möbius function μ(n).
  - **`DivisorSigma(k, n)`** — the divisor function σ_k(n) (generalizes the
    existing `Sigma0`/`Sigma1`).
  - **`IsSquareFree(n)`** — whether `n` is square-free.
  - **`IsPerfectPower(n)`** — whether `n = a^b` for integers `a`, `b ≥ 2`.

  _Primes:_

  - **`NthPrime(n)`** — the nth prime (1-based): `NthPrime(10)` → 29.
    (Mathematica names this `Prime`, but in the Compute Engine `Prime` denotes
    derivative notation, so the prime-number function is `NthPrime`.)
  - **`NextPrime(n)`** / **`NextPrime(n, k)`** — the smallest prime greater than
    `n`; with `k`, the kth prime after `n` (or the |k|th before it when
    `k < 0`).
  - **`PrimePi(n)`** — the prime-counting function π(n): `PrimePi(10)` → 4.
  - **`RandomPrime(n)`** / **`RandomPrime(m, n)`** — a random prime in the
    range.

    Primality for these uses exact 6k±1 trial division for small `n` and
    switches to Miller–Rabin above 2³² (deterministic for the supported range),
    so `NextPrime` and `RandomPrime` are fast even for very large arguments.

  _Modular arithmetic & GCD:_

  - **`PowerMod(a, b, m)`** — modular exponentiation `a^b mod m`; a negative `b`
    uses the modular inverse (undefined when `a` and `m` are not coprime).
  - **`ExtendedGCD(a, b)`** — the GCD with Bézout coefficients, as `(g, x, y)`.
  - **`ChineseRemainder(residues, moduli)`** — solves a system of simultaneous
    congruences (moduli need not be coprime).
  - **`MultiplicativeOrder(a, n)`** — the order of `a` modulo `n`;
    **`PrimitiveRoot(n)`** — the smallest primitive root mod `n`.
  - **`JacobiSymbol(a, n)`** / **`LegendreSymbol(a, p)`** — the Jacobi and
    Legendre symbols.

  _Other primitives:_

  - **`IntegerSqrt(n)`** — the integer (floor) square root.
  - **`CarmichaelLambda(n)`** — the reduced totient λ(n).
  - **`LucasL(n)`** — the nth Lucas number; **`CatalanNumber(n)`** — the nth
    Catalan number.
  - **`BernoulliB(n)`** — the nth Bernoulli number as an exact rational, with
    the convention B₁ = -1/2.
  - **`ContinuedFraction(x, n?)`** / **`FromContinuedFraction(list)`** — the
    continued-fraction expansion of a number (exact for rationals) and its
    inverse.
  - **`IntegerDigits(n, base?, length?)`** / **`FromDigits(list, base?)`** — the
    digits of `n` in a given base, and its inverse.
    **`DigitCount(n, base?, digit?)`** — digit-occurrence counts;
    **`DigitSum(n, base?)`** — the digit sum.

- **`IsPrime` is now reliable for large integers.** Primality was previously
  left unevaluated above ~10¹⁵ and could silently round integers beyond 2⁵³ to a
  wrong machine value. `IsPrime` (and `IsComposite`) now route through a single
  deterministic Miller–Rabin implementation shared with the number-theory
  library, so e.g. `IsPrime(2^61 - 1)` correctly returns `True`. (The previous
  duplicate Miller–Rabin code, which used random bases and overflowed for large
  inputs, has been removed.) Relatedly, the internal `toInteger` helper now
  returns `null` instead of a precision-lost value for integers beyond the
  safe-integer range, so this class of silent-rounding bug cannot recur in the
  operators that use it for counts and indices.

- **`Factorial2`, `Subfactorial`, and `BellNumber` no longer round a non-integer
  argument.** These are defined only on integers; in non-strict mode they
  previously rounded a non-integer (e.g. `Factorial2(5.5)` returned `6!!`). They
  now stay symbolic for non-integer arguments. (In strict mode the `(integer)`
  signature already rejected such inputs.)

- **`N(expr, precision)` evaluates to a requested number of significant
  digits.** The `N` function (and the `["N", expr]` MathJSON form) now accepts
  an optional precision argument: `["N", "Pi", 50]` returns π to 50 significant
  digits. When the requested precision exceeds the engine's working precision,
  the working precision is raised to match — and kept, since display precision
  is a global setting. When it is at or below the working precision, the result
  is rounded to that many significant digits without changing the global
  precision (`N(1/3, 4)` → `0.3333`).

- **New linear-algebra operators.**
  - **`Dot(a, b)`** — vector inner product / matrix product (Mathematica's `.`):
    `Dot([1,2,3], [4,5,6])` → `32`.
  - **`Cross(a, b)`** — cross product of two 3-vectors.
  - **`MatrixRank(m)`** — the rank (number of linearly independent rows/columns)
    via the rank–nullity theorem.
  - **`MatrixPower(m, n)`** — a square matrix raised to an integer power (the
    repeated matrix product `A·A·…`, with negative powers using the inverse).
    Distinct from `["Power", m, n]`, which threads element-wise.
  - **`CharacteristicPolynomial(m, x?)`** — the monic characteristic polynomial
    `det(x·I − A)` (variable defaults to `x`): `[[1,2],[3,4]]` → `x² − 5x − 2`.
  - **`RowReduce(m)`** — the reduced row echelon form (RREF) of a matrix.
  - **`IsSymmetric(m)`** / **`IsDiagonal(m)`** / **`IsSquareMatrix(m)`** —
    matrix-shape predicates returning `True`/`False`.

### Resolved Issues

- **`["N", expr]` now numerically evaluates its operand.** The `N` operator
  holds its argument unevaluated and previously called `.N()` on the still
  unbound operand — a no-op for symbolic constants — so `["N", "Pi"]` returned
  `Pi` unchanged (and `["N", ["Sqrt", 2]]` returned `Sqrt(2)`) instead of a
  numeric value. The operand is now bound before evaluation, making
  `["N", expr]` equivalent to `expr.N()`.

## 0.63.0 _2026-06-26_

### New Features

- **LaTeX parse errors carry their source location.** (contributed by
  [zojize](https://github.com/zojize)) The `Error` expressions produced by the
  LaTeX parser now include a `sourceOffsets: [start, end]` character range
  identifying where in the input the error occurred, so a consumer can map a
  parse error back to the offending span — e.g. to highlight an invalid token in
  a mathfield. Offsets are zero-based and end-exclusive into the serialized
  LaTeX (`tokensToString`); for input that round-trips through the tokenizer
  unchanged — editor-generated LaTeX, with no comments, Unicode normalization,
  or macro expansion — they match the original input string. Missing-operand
  errors (an empty `\sqrt{}` or `\frac{}{}`) use a zero-width range at the
  position where the token was expected. The new
  `Parser.sourceOffsets(startToken, endToken?)` helper lets custom dictionary
  entries attach a range to errors they raise. The raw parser output
  (`LatexSyntax().parse()`) always carries these offsets, so an `Error` node is
  now emitted in object form (`{ fn: ["Error", …], sourceOffsets }`) rather than
  the bare `["Error", …]` array whenever a range is available — a consumer
  matching `expr[0] === "Error"` should also handle `expr.fn?.[0] === "Error"`.
  Through the boxed path (`ce.parse(latex).toMathJson()`), source offsets are
  opt-in metadata like `latex` and `wikidata`: included with
  `metadata: ['sourceOffsets']` or `metadata: 'all'`, and omitted from the
  default serialization.

- **Long numerators over a single power serialize with an inline solidus.** When
  prettifying, a large numerator divided by a single power of a small base now
  serializes as `(3x^4+2x^3+x+5)/x^{23}` instead of the tall, lopsided fraction
  `\frac{3x^4+2x^3+x+5}{x^{23}}`. This rounds out the existing prettify
  heuristics, which already factor a small denominator out of a large numerator
  (`\frac{1}{x}(…)`) and write a small numerator over a large denominator with a
  negative exponent (`(a)(…)^{-1}`). The new form applies when the numerator is
  large and the denominator is a single power of a small base — `base^{k}` with
  an integer exponent `k ≥ 2` (`/x^{23}`), a square (`/x^2`), or a square root
  (`/\sqrt{x}`). Lone powers (`\frac{1}{x^{23}}`), products in the denominator
  (`a·x^n`), compound bases (`(x+1)^{23}`), and all other shapes are unchanged.
  As with the other rewrites, it is disabled by `prettify: false`.

- **Double-quoted string literals in LaTeX.** `"hello"` now parses to a string
  (previously `"` was an `unexpected-token`). Content is read verbatim up to the
  closing quote, with LaTeX commands normalized to Unicode like `\text{…}`
  (`"\alpha"` → `α`); there is no escaping (use `\text{…}` for a string that
  must contain a `"`). Strings still serialize back to `\text{…}`. A `"` inside
  `\unicode{…}`/`\char` remains a hex prefix and is unaffected.

- **Dictionary values can be read by key with `At`.** `["At", dict, "key"]`
  (string key) now returns the value of that entry in a dictionary — e.g.
  `["At", { dict: { height: 42 } }, "height"]` → `42`. A missing key yields
  `Nothing`. Previously `At` was restricted to _indexed_ (positional)
  collections and rejected dictionaries with an `incompatible-type` error; its
  value type is now `indexed_collection | dictionary`. In LaTeX, the postfix
  bracket form accepts a string key, so `\mathrm{data}["height"]` (or
  `\mathrm{data}[\text{height}]`) parses to `["At", "data", "height"]`.
  Dot-notation also works when the base is a symbol declared as a dictionary:
  `\mathrm{data}.height` → `["At", "data", "height"]` (the key is an alphabetic,
  space-free name; for a dictionary base, `.x` / `.real` are key lookups, not
  `First` / `Real` component access). Positional indexing of indexed collections
  is unchanged.

- **`BoxedExpression.referencedFunctions` and `BoxedExpression.references`.**
  Two accessors aimed at dependency graphs (e.g. notebooks). The operator head
  of a function application — the `f` in `f(x)` or `g(x) := f(x) + 1` — is not a
  symbol of the expression, so it appears in neither `symbols` nor
  `freeVariables`; `referencedFunctions` recovers those applied user-function
  names (excluding built-in operators, constants, and names bound by an
  enclosing scope, using the same predicate `freeVariables` applies to ordinary
  symbols). `references` is the complete in-edge set — `freeVariables` ∪
  `referencedFunctions`, minus `defines` — so it pairs with `defines` (the
  out-edges) to build a use/def graph in one call. Subtracting `defines` drops
  self-references, so a recursive `g(x) := g(x - 1)` reports no dependency on
  itself.

- **`ce.declare()` refines an auto-declared binding instead of throwing.**
  Parsing auto-declares the names it encounters (a free variable `a` in `a + 1`,
  a called function `f` in `f(x)`), recording an _inferred_ binding. Calling
  `ce.declare(name, …)` for such a name now refines that inferred binding rather
  than throwing `"… already declared in this scope"` — which is exactly what the
  `inferred` flag is for. This lets a declare-first workflow parse cells to
  discover names and then declare them on the **same** engine. Re-declaring an
  _explicit_ binding still throws, and a name bound to a value (e.g. a function
  argument) is still a genuine conflict.

### Resolved Issues

- **`canonical` and `structural` options are now honored by `parse()`, `expr()`,
  and `function()`.** These methods only consulted the `form` option when
  deciding how to box their result, so the documented `canonical` / `structural`
  shortcuts were silently ignored: `ce.parse(latex, { canonical: false })`
  returned a _canonical_ expression (and, as a side effect of canonicalization,
  auto-declared its symbols), and
  `ce.function('Power', ops, { structural: true })` returned canonical `Root`
  instead of a structural `Power`. The keys now resolve the same way `form`
  does, with an explicit `form` taking precedence. As part of this,
  `ce.assume()` now canonicalizes its predicate so the assumption machinery
  always sees a normalized form (e.g. `Negate(ImaginaryUnit)` folded to the
  complex literal `-i`) regardless of how the caller boxed it.

## 0.62.1 _2026-06-22_

### New Features

- **`indexStyle` serialization option for collection indexing.** The `At`
  operator (e.g. `["At", v, 1]`) can now be serialized either as a subscript
  (`v_1`, `M_{i,j}`) or with programming-style brackets (`v[1]`, `M[i,j]`). Like
  the other style options (`fractionStyle`, `rootStyle`, …) it is a callback
  `(expr, level) => 'subscript' | 'bracket'`, settable engine-wide via
  `ce.latexOptions.indexStyle` or per-call via `expr.toLatex({ indexStyle })`.
  The default is `'subscript'`.

### Resolved Issues

- **Collection indexing (`At`) now serializes to valid, round-tripping LaTeX.**
  `["At", v, 1]` previously serialized to `\lbrack v, 1\rbrack` — i.e. the
  _list_ `[v, 1]`, which re-parsed as `["List", v, 1]`, silently changing the
  meaning on a serialize→parse cycle. It now serializes as `v_1` (or `v[1]` with
  `indexStyle: 'bracket'`), both of which parse back to `At`.

- **Accents and decorations serialize with brace notation and round-trip.**
  `OverHat`, `OverVector`, `OverTilde`, `OverBar`, `UnderBar`, the over-arrows,
  `OverBrace`, etc. had no serializer and fell back to function-call notation —
  `\hat{x}` came back out as `\hat(x)`, which re-parsed to
  `["Multiply", x, ["OverHat"]]` instead of `["OverHat", x]`. They now serialize
  as `\hat{x}`, `\vec{v}`, `\overline{x}`, … and round-trip correctly, including
  when subscripted (`\hat{x}_0`).

- **Subscripted single-letter symbols serialize with an italic base instead of
  an upright one.** When a symbol name carried a subscript (e.g. `a_1`, `x_n`,
  `S_t`), the serializer chose its font style from the _decorated_ string rather
  than the base: the subscript inflated the token count, so the multi-character
  rule wrapped the whole thing in `\mathrm{…}` and rendered the base letter
  upright (`\mathrm{a_1}`). A single-letter variable with a subscript is now
  rendered italic, as a variable should be — `a_1` serializes to `a_1`, not
  `\mathrm{a_1}`. The font style is now decided from the base alone:
  multi-letter bases are still upright with the wrapper enclosing the whole
  symbol, so descriptive subscripts stay roman
  (`speed_max → \mathrm{speed_{max}}`), and explicit style modifiers (`\mathbf`,
  `\mathbb`, …) are unchanged. Greek single-letter bases are likewise rendered
  with their default (italic) style.

## 0.62.0 _2026-06-20_

### Resolved Issues

- **Arbitrary-precision sums of three or more terms no longer collapse to
  machine precision.** `BigNumericValue.add` had a fast path that, when adding
  to a zero value, cloned the other operand through a constructor that reads its
  **machine** real part (`decimal.toNumber()`), silently truncating a
  full-precision bignum to ~16 significant digits. The exact (rational/radical)
  arithmetic path was unaffected, and two-term sums were unaffected, so this
  only surfaced when summing **three or more inexact values** at a precision
  above machine: `ExactNumericValue.sum` folds those starting from a zero
  accumulator, and the very first `0 + xᵢ` step lost all extra precision. The
  degradation was invisible when the terms were of similar magnitude (the result
  was merely capped at ~16 digits), but became a wrong answer under cancellation
  — e.g. numerically evaluating a high-order symbolic derivative at a point
  (large factorial-scale terms cancelling to a small value) returned garbage at
  any working precision. The zero-accumulator path now reads the full-precision
  real part, matching the non-zero path. Coefficients were always computed
  exactly; only the final numeric summation was affected.

- **High-order derivatives are reduced instead of blowing up.** The `Derivative`
  operator applies the differentiation rules iteratively, and the quotient and
  product rules square the denominator at each step, so the r-th derivative of a
  quotient carried an `x^(2ʳ)`-scale denominator — e.g. the 75th derivative of
  `sin(x)/x` came back over `x^(2⁷⁵)`. The result was mathematically exact (the
  integer coefficients are computed exactly), but the enormous exponent made it
  unusable and overflowed to `NaN` when evaluated at a point. `Derivative` of
  order ≥ 2 now runs a single simplification at the end, cancelling the common
  factors back to a linear-degree denominator (`x^(2⁷⁵) → x⁷⁶`). It is applied
  once, not per step, so it is cheap (~30 ms at order 75) and leaves first
  derivatives and the existing low-order results unchanged.

- **`interval-glsl` is now outward-rounded, making it a sound standalone
  exclusion oracle in `float32` (preview).** As shipped in 0.61.0 the `_iv_*`
  ops clamped to the sentinel range but rounded to nearest, so an operation — or
  the cell box itself — could come back slightly **narrower** than the true
  range. At a boundary that is enough to flip the exclusion verdict for a box
  the curve only grazes (e.g. the unit circle's tangent corner at `(1, 0)`),
  violating the containment contract that the GLSL interval must _contain_ the
  `interval-js` (float64) result — a spuriously narrow interval can exclude a
  box the curve actually passes through. Every inexact operation now widens its
  result outward (`lo` toward −∞, `hi` toward +∞) before the clamp: by ~1 ulp
  for the correctly-rounded ops (`+ − ×`, `Square`), and by a larger relative
  margin for the GLSL ES built-ins that are not correctly rounded — 8 ulp for
  `/`, `Sqrt`, `Exp`/`Ln`/`Log`, and inverse trigonometry, and 32 ulp for
  `Power` (`x^n` with `n ≥ 3`, and fractional powers such as the astroid
  `x^{2/3}`). Crucially, the cell box that `compileExclusionShader`'s `main()`
  builds is itself outward-rounded (via the new `_iv_widen_box`): the float32
  `mix` that constructs it rounds to nearest and is the actual source of the
  grazing miss, which per-op widening alone cannot fix (with exact endpoints the
  op chain is exact). That box pad is scaled to the **domain extent**, not the
  edge value, since that is what bounds the `mix` error — a value-relative pad
  would vanish for a box edge near 0 in a wide domain. Widening only ever moves
  a bound outward, so it cannot break soundness; the `empty` (`lo > hi`) /
  `entire` (`±IV_INF`) encodings, the finite `IV_INF` sentinel, the per-op
  clamp, and exact empty-propagation are all preserved. `Sin`/`Cos` remain
  best-effort (see below).

- **`freeVariables` / `unknowns` no longer report the bound variables of
  `Function` literals and integrals.** A function literal leaked its own
  parameters, and `Integrate` / `Limit` leaked their variable — e.g.
  `freeVariables` of `f(x) := x^2 + b` wrongly included the parameter `x`, and a
  definite integral leaked its integration variable. They now return only
  genuinely free symbols (`[b, f]` for that definition, `[]` for `∫ sin(x) dx`),
  while a free coefficient is still reported (`∫ a·sin(x) dx → [a]`). `Sum` /
  `Product` were already correct, and `symbols` is unchanged (it still includes
  bound variables). This is a behavior change for code that relied on the
  previous, over-inclusive result.

- **Runaway user-function recursion now throws a catchable `CancellationError`
  instead of a native `RangeError`.** A recursive definition with no reachable
  base case (e.g. `f(x) := f(x-1) + 1`) previously overflowed the JavaScript
  call stack with an uninformative `RangeError`. `recursionLimit` — previously
  defined but never enforced — is now applied to user-function application:
  exceeding it throws a `CancellationError` with
  `cause: 'recursion-depth-exceeded'`, consistent with how `timeLimit` and
  `iterationLimit` are surfaced. The default `recursionLimit` is now **256**
  (was a nominal, unenforced 1024), chosen to fire below the native stack limit
  on typical engines; raise `ce.recursionLimit` for legitimately deep recursion.
  Iterating a user function (e.g. `\sum f(i)`) is **not** counted as recursion.
  (A sufficiently complex single call can still exceed the native stack before
  the limit is reached, so a robust caller catches `RangeError` as a backstop.)

- **`Integrate` binds only the integration variable in its canonical
  integrand.** `∫ a·sin(x) dx` previously canonicalized to
  `Integrate(Function(body, a, x), …)`, listing the free coefficient `a` as a
  spurious integrand parameter; it is now `Integrate(Function(body, x), …)`.
  Introspecting the integrand (`expr.op1`) therefore reports `a` as free, and
  the integrand is a proper single-variable function. Evaluation is unchanged.

- **Nested (multivariate) integrals now parse and evaluate correctly.**
  `\int_1^2\int_3^4 x y \, dx \, dy` previously attached _all_ the trailing
  differentials to the innermost integral, leaving the outer integrals with a
  `Nothing` integration variable — so the expression could not evaluate. Each
  `\int` now consumes only its own differential (the innermost `dx` pairs with
  the innermost `\int`, the next `dy` with the next), producing a properly
  nested `Integrate` where every level carries its own variable and limits
  (`\iint` / `\iiint` still bind 2 / 3 variables at one level). Combined with
  the definite-integral evaluator now applying the limits to a _parametric_
  antiderivative (e.g. `∫_3^4 k·x dx → 7/2·k`; the symbolic `f(b) - f(a)` was
  previously left as an unevaluated `EvaluateAt`), nested definite integrals
  evaluate to a value: `∫_1^2∫_3^4 x·y dx dy → 21/4`.

- **Multiple-integral and contour-integral serialization round-trips.** `\iint`
  / `\iiint` (and `\oiint` / `\oiiint`) now serialize back to the compact sign
  with a single region subscript (`\iint_{D}\!…`) instead of a stack of `\int`s,
  so a flat multiple integral round-trips to the same structure. A separate
  long-standing bug that emitted the literal text `\ointundefined` for any
  `\oint` with a region (its limit is a 3-element `Tuple`, serialized to
  MathJSON as `Triple`, which the serializer did not recognize) is also fixed:
  `\oint_V f(s)\,ds` now serializes as `\oint_{V}\!f(s)\, \mathrm{d}s`.

- **`1^x` simplifies to `1` for any finite exponent.** A symbolic or function
  exponent (e.g. `1^{n+1}`, `1^{\sin x}`) previously left `Power(1, x)`
  un-reduced because the canonicalizer bailed before its base-1 rule. `1^x → 1`
  now (matching SymPy / Mathematica); only a genuinely infinite or NaN exponent
  stays indeterminate (`1^∞ → NaN`, unchanged).

### New Features

- **`interval-glsl`: public outward-rounding helpers and an opt-in absolute trig
  pad (preview).** The widen helpers `_iv_widen` / `_iv_widen_t` /
  `_iv_widen_pow` / `_iv_widen_sc` / `_iv_widen_box`, and their epsilons
  `IV_EPS` / `IV_EPS_FN` / `IV_EPS_POW` / `IV_BOX_EPS`, are a stable, public
  part of the emitted preamble: a renderer that builds its own cell box (instead
  of using `compileExclusionShader`) outward-rounds it by calling
  `_iv_widen_box(vec2(lo, hi), extent)` per axis, where `extent` is the domain
  extent for that axis (the box pad is domain-scaled, not value-relative). The
  preamble is now emitted for any expression with free variables (not only ones
  that reference an `_iv_*` op), so those helpers are always available — e.g.
  for an axis line `f = x`. GLSL ES `Sin`/`Cos` carry an _absolute_,
  implementation-defined error (≈2⁻¹¹ in the worst case; macOS ANGLE→Metal
  differs) that no relative pad can cover. A new `trigAbsPad` option (default
  `0`, off) on `compile()`, `IntervalGLSLTarget.compileExclusionShader()`, and
  the new `IntervalGLSLTarget.getPreamble()` adds an absolute `Sin`/`Cos` pad,
  so a trigonometric implicit curve can be a strictly-sound standalone oracle at
  the cost of fatter trig intervals.

- **`BoxedExpression.defines`.** A new accessor returning the symbols an
  expression _defines_: the target of a top-level `Assign` / `Declare` (`a` in
  `a := 3`, `f` in `f(x) := …`), recursing through `Block`. It complements
  `freeVariables` (the symbols an expression _references_) — together they let
  tooling build a definition/use dependency graph, with
  `references = freeVariables` minus `defines`.

- **`ComputeEngine.appliedNonFunctions(latex)`.** Returns the symbols written in
  function-application syntax `f(…)` in `latex` that are **not** functions in
  the current scope, and so parse as implicit multiplication (`f·x`) or are left
  unresolved. The check is scope-aware (a symbol declared as a function is not
  reported) and has no side effects. Useful for flagging a likely call to an
  undefined function — e.g. warning that `f(x)` was read as `f·x`.

## 0.61.0 _2026-06-17_

### New Features

- **`interval-glsl` compilation target (preview).** A GPU compilation target
  that evaluates an expression with **interval arithmetic** in GLSL — each value
  is a `vec2 (lo, hi)` — so a robust implicit-curve renderer can run its
  per-cell exclusion test (`lo > 0 || hi < 0`) on the GPU instead of CPU-side
  via `interval-js`. (Reinstates the `interval-glsl` target removed in 0.52,
  with a simpler `vec2`-only representation — the GPU acts as an exclusion
  oracle and the CPU keeps curve extraction — instead of the former status-flag
  struct.) `compile(expr, { to: 'interval-glsl' })` emits `_iv_*` helper calls
  plus a preamble library. Coverage: arithmetic, integer and positive rational
  powers, `Abs`, `Sqrt`, `Exp`, `Ln`/`Log`/`Lb`, trigonometry / inverse
  trigonometry (`Sin`, `Cos`, `Tan`, `Arcsin`, `Arccos`, `Arctan`, with interval
  range reduction), and the step / rounding family (`Floor`, `Ceil`, `Round`,
  `Truncate`, `Fract`, `Sign`, `Heaviside`, `Mod`, `Min`, `Max`) — covering
  polynomial, rational, algebraic, trigonometric, and lattice/periodic implicit
  curves (conics, lemniscate, astroid, superellipse, trig lattices, floor/mod
  grids, …). Jump-discontinuity functions return a tight, sound value-range
  enclosure (so cells can still be excluded), with discontinuity classification
  left to the CPU; only genuine poles widen to the full range. A head that is
  not yet supported (e.g. hyperbolic functions) is reported in the result's
  `unsupported` field, so a caller can fall back to another target
  per-expression. Values use a finite ±∞ sentinel and a `lo > hi` encoding for
  the empty (domain-undefined) interval, propagated through every operation;
  domain-restricted functions (`sqrt`/`ln`/`asin`/rational `pow` of an
  out-of-domain argument) yield `empty`, and a pole (zero-spanning denominator,
  `tan` asymptote) yields the full range. Parity with the `interval-js` target
  is verified against a shared corpus.
  `IntervalGLSLTarget.compileExclusionShader()` emits a complete, self-contained
  fragment shader (preamble + an `_implicit` interval evaluator + a reference
  `main` that derives each fragment's cell box and applies the exclusion test)
  ready to drop into a WebGL2 renderer.

### Resolved Issues

- **A function parameter now shadows a same-named constant.** A parameter named
  like a constant (`i`, `e`, `Pi`/`\pi`, …) was rewritten to the constant while
  the function body was canonicalized, so the binding was lost — `λi. 2i`
  applied to `5` returned `2i` (the imaginary unit doubled) instead of `10`.
  Parameters now shadow whatever their name means in the enclosing scope — a
  constant, an assigned variable, or nothing — which is standard lexical
  scoping. A free symbol that is _not_ a parameter is unchanged (`i` outside a
  parameter is still the imaginary unit), and closure capture is preserved
  (`λi. λz. (z + i)` captures `i` correctly).

- **`compile()` no longer emits a dangling reference to a symbol that has an
  assigned value (GLSL, WGSL, JavaScript, and interval-JS targets).** When an
  expression referenced a symbol with an assigned value in the engine
  (`ce.assign("a", 1.5)`), `compile()` emitted a bare `a` — an undeclared GLSL
  identifier (a shader that silently fails to compile) or a bare JS global (a
  `ReferenceError` when the compiled function is called) — even though the
  symbol is omitted from `expr.unknowns` and folded by `evaluate()`. The value
  is now folded into the generated code (`sin(a·x)` → `sin(1.5 * x)`), making
  `compile()`, `evaluate()`, and `unknowns` consistent. This also folds
  user-declared constants (`ce.declare("c", { value: 3 })`), and applies on the
  direct-target `compile(expr, { target })` path as well. A symbol supplied
  through the `compile()` `vars` option is never folded — the mapping always
  wins, so a per-frame GLSL uniform / JS argument keeps updating the result
  without recompiling — and a genuinely free symbol is unchanged.

- **`compile()` folds a _symbolic_ assigned value correctly, parenthesizing it
  and resolving the free symbols it references.** When a symbol was assigned an
  expression rather than a number (`ce.assign("b", ce.parse("c + 1"))`), folding
  `b` into a larger expression had two bugs: the compound value was spliced in
  without parentheses, so `b · x` compiled to `c + 1 * x` (i.e. `c + x`) instead
  of `(c + 1) * x` — a **silently wrong result** (`2·b` → `2 * c + 1`, `b²` →
  `(c + 1 * c + 1)`); and the inner free symbol `c`, hidden behind `b`'s value
  and therefore absent from `expr.unknowns`, was emitted as a bare global
  (`ReferenceError` on the JS target). The folded value is now parenthesized for
  its context, and a free symbol reachable only through a folded value routes
  through the normal free-symbol plumbing (`_.c` on the JS / interval-JS
  targets; a uniform on GPU) and is reported in the result's `freeSymbols`.

- **GPU compilation rejects non-finite numbers instead of emitting a
  non-compilable shader.** GLSL and WGSL have no infinity or NaN literals, but
  `compile()` emitted `Infinity.0` / `NaN.0` for a `±∞` or `NaN` value (e.g.
  from a literal `\infty` or a constant-folded `1/0`) and reported
  `success: true` — a shader that silently fails to compile on the GPU. Such
  values now throw a clear error from the GLSL/WGSL targets (so the free
  `compile()` falls back to `success: false` with a diagnostic), consistent with
  how other GPU-unsupported constructs are handled. The JavaScript target is
  unchanged (`Infinity` / `NaN` are valid there).

- **The JavaScript compilation target now lowers the exponential, trigonometric,
  and logarithmic integrals.** `SinIntegral` (Si), `CosIntegral` (Ci),
  `ExpIntegralEi` (Ei), and `LogIntegral` (li) compile to `_SYS` runtime
  helpers, matching the existing support for `Erf`, `FresnelS`, `Gamma`,
  `BesselJ`, etc. These are the closed forms the antiderivative engine emits
  (e.g. `∫ sin x / x dx = SinIntegral(x)`), so an "evaluate then compile"
  pipeline — such as plotting `∫ f dx` from its closed form — no longer throws
  `Unknown operator` and falls back to numeric sampling. (GLSL/WGSL shader
  approximations of these are not yet provided.)

- **The JavaScript compilation target now lowers the elliptic, AGM, and
  hypergeometric kernels.** `AGM`, `EllipticK`, `EllipticE`, `EllipticF`,
  `EllipticPi`, `Hypergeometric2F1`, `Hypergeometric1F1`, `Erfi`, and `Choose`
  compile to `_SYS` runtime helpers. Like the integral functions above, these
  are closed forms `evaluate()`/`.N()` produces (e.g. a pendulum period or an
  arc length reduces to an elliptic integral), so they can now be plotted from
  the closed form rather than re-sampled numerically. `EllipticE` and
  `EllipticPi` keep their arity-overloaded complete/incomplete forms, and `AGM`
  accepts the one-argument `AGM(z) = AGM(1, z)` shorthand. (Real-valued like the
  other special functions on this target; GLSL/WGSL not provided.)

### Improvements

- **`compile()` results now report their external references.** A
  `CompilationResult` carries two new fields so a caller can check that a result
  is self-contained _declaratively_, instead of executing or GPU-compiling the
  code to discover a dangling reference:

  - `freeSymbols` — the identifiers the generated code references that the
    caller must supply at run time (JS vars-object keys / GLSL uniforms). These
    are the free symbols _as codegen sees them_: assigned values and constants
    are folded out, bound variables (lambda parameters, `Sum`/`Product`/
    `Integrate`/`Loop` indices, `Block` locals) are excluded, and `vars`-mapped
    symbols are always included. Unlike `expr.unknowns`, it also surfaces a free
    symbol reachable only through a folded value (e.g. `b` assigned `c + 1`
    exposes `c`). Use it to build a uniforms / vars mapping that is guaranteed
    consistent with the emitted code.
  - `unsupported` — operator heads the target cannot lower (no operator/function
    mapping, not a structural form). On a failed `compile()` this is populated
    alongside a human-readable `error`, so an unlowerable operator (e.g.
    `SinIntegral` on the GLSL target) surfaces as `success: false` with a
    machine-readable list rather than only a thrown exception.

  Built-in targets populate `freeSymbols` (and an empty `unsupported`) on every
  successful compile. The direct `getCompilationTarget(name).compile(expr)` path
  still throws on a genuinely unsupported operator (so the engine-level
  `compile()` can fall back to interpretation); the `unsupported` / `error`
  fields are how the engine-level `compile()` reports that condition without a
  throw.

## 0.60.0 _2026-06-16_

### Behavior Changes

- **`isFinite` is now known for finite symbolic constants.** Expressions such as
  `√π`, `1/π`, and `π^π` report `expr.isFinite === true` (previously
  `undefined`), because finiteness is propagated through `Sqrt`, `Root`,
  `Power`, and `Divide` of finite operands. Cases that are genuinely
  indeterminate (e.g. `1/x` for an unconstrained `x`) still report `undefined`.

- **Exact transcendental expressions now remain symbolic under `evaluate()`.**
  For example, `ln(2)` remains `ln(2)` instead of becoming `0.693…`. Use `.N()`
  or `{ numericApproximation: true }` when a numeric approximation is wanted.
  Inexact inputs still evaluate numerically, and known exact values such as
  `cos(π) = -1` and `arctan(1) = π/4` still simplify. As a result, definite
  integrals also preserve exact results, such as `∫₁² 1/x dx = ln(2)` and
  `∫₀¹ 1/(1+x²) dx = π/4`.

- **`(aⁿ)ᵐ` no longer folds to `aⁿᵐ` based solely on an odd inner exponent.**
  This combine was unsound on the principal branch: when `a < 0` and `m` is not
  an integer, the two sides differ by a phase. For example `(x³)^{1/2}` now
  stays `√(x³)` (which is `8i` at `x = -4`) instead of becoming the inequivalent
  `x^{3/2}` (`-8i`), and it is again confluent with the `√(x³)` form. The fold
  still applies when the base is non-negative or the outer exponent is an
  integer. (Roots are unaffected: `(x³)^{1/3} = x` still holds, since odd-index
  roots use the real-root convention.)

- **Logarithms are no longer combined across a branch cut.**
  `ln(a) + ln(b) → ln(ab)` (and the `log` and subtraction variants) is only
  valid on the principal branch; for arguments on the negative real axis the two
  sides differ by a multiple of `2πi`. For example `ln(-2) + ln(-3)` no longer
  simplifies to the inequivalent `ln(6)` (its true value is `ln(6) + 2πi`). The
  combine still applies to positive and unconstrained-symbolic arguments. The
  guard consults the analytic-property store's branch-cut records (see Special
  Functions).

- **`e^{iθ}` stays in exponential form under `evaluate()` for a symbolic
  angle.** Euler's formula `e^{iθ} → cos θ + i·sin θ` is now applied only when
  `θ` is a constant that reduces to a closed form (`e^{iπ/2} = i`,
  `e^{iπ} = -1`, `e^{ln y} = y` are unchanged); for a symbolic angle, `e^{ix}`
  stays `e^{ix}` — a basis change is not an evaluation, and it no longer differs
  from the previous inconsistency where `(e^{ix})²` expanded while `e^{ix}` did
  not. Convert to trigonometric form on demand with the new strategy
  `expr.simplify({ strategy: 'trig' })`.

- **`N()` at a known pole now returns `ComplexInfinity` instead of `NaN`.** When
  a function is evaluated numerically at a pole recorded in the new
  analytic-property metadata store (see Special Functions), the result is
  `ComplexInfinity` rather than `NaN` or an unevaluated expression — for example
  `Digamma(0).N()` and `Digamma(-2).N()`. Functions whose kernels already
  returned an infinity at their poles (such as `Gamma`) are unchanged.

### Benchmarks

The numeric and symbolic gains in this release are summarized below against the
last release (`0.59.0`), SymPy, math.js, and **Mathematica** — the reference
baseline, since it is the broadest engine in the field. The tables are generated
by the harness in
[`benchmarks/`](https://github.com/cortex-js/compute-engine/tree/main/benchmarks)
(`node benchmarks/report_changelog.mjs`); every result is verified numerically
against an independent `mpmath` reference, never another tool. "CE 0.60.0" is
this release.

#### Numeric performance (200-digit precision)

Median time per call, in **microseconds — lower is better**. `—` means the tool
returned no usable result at that precision.

| Expression         | CE 0.60.0 | CE 0.59.0 | SymPy | math.js | Mathematica |
| ------------------ | --------: | --------: | ----: | ------: | ----------: |
| $\pi^2$            |        15 |        20 |   174 |     107 |         3.9 |
| $\sin 1$           |        25 |        61 |   220 |     429 |         5.2 |
| $\cos 1$           |        24 |        60 |   222 |     455 |         7.1 |
| $\ln 2$            |        87 |       302 |   339 |   4,374 |         3.7 |
| $e^{\pi}$          |        31 |       398 |   214 |   4,771 |         4.6 |
| $\zeta(3)$         |     3,419 |         — |   264 |       — |          49 |
| $\Gamma(\tfrac13)$ |     1,867 |   427,938 |   341 |       — |         212 |
| $\psi(\tfrac13)$   |     1,689 |   404,300 | 2,831 |       — |         169 |

Biggest gains over `0.59.0`: $\psi(\tfrac13)$ **239× faster**,
$\Gamma(\tfrac13)$ **229× faster**, $e^{\pi}$ **13× faster** (it no longer
recomputes $\ln e$ on every call), $\ln 2$ **3.5× faster**, $\sin 1$ / $\cos 1$
**~2.5× faster**. The elementary functions widen further at 1000+ digits (e.g.
$\ln 2$ ≈ 21× faster, where it now also leads SymPy and mpmath). `0.59.0` could
not reach 200 digits for $\zeta(3)$ (it was capped near machine precision);
math.js has no arbitrary-precision ζ/Γ/ψ. Mathematica's native bignum kernel is
faster still on these constants.

#### Symbolic capability & performance

Each cell is **how many times faster than Mathematica** that engine is on the
case (`Mathematica ÷ engine`, so **higher is better**; Mathematica itself is
`1×`). `—` means the engine can't do the case. Compare the **CE 0.60.0** and
**CE 0.59.0** columns to see what is _new this release_ (a `—` under `0.59.0`
next to a number under **CE 0.60.0**). The **CE + R/F** column is CE 0.60.0 with
the opt-in Rubi integrator and Fungrim identities loaded (`loadIntegrationRules`
/ `loadIdentities`), on the same minified bundle: sometimes it improves
performance, sometimes it hurts it, but the overall effect is improved coverage.

| Operation                              | CE 0.60.0 | CE + R/F | CE 0.59.0 | SymPy  | math.js | Mathematica |
| -------------------------------------- | :-------: | :------: | :-------: | :----: | :-----: | :---------: |
| **Antiderivatives**                    |           |          |           |        |         |             |
| $\int\frac{1}{\sqrt x}\,dx$            |   1.5×    |   3.7×   |     —     |  0.5×  |    —    |     1×      |
| $\int\frac{x}{\sqrt{1-x^2}}\,dx$       |   2.5×    |   2.6×   |     —     | 0.09×  |    —    |     1×      |
| $\int\frac{1}{x^3+1}\,dx$              |   2.2×    |   11×    |     —     |  0.3×  |    —    |     1×      |
| $\int\frac{\sqrt x}{1+x}\,dx$          |     —     |   3.7×   |     —     |  0.1×  |    —    |     1×      |
| $\int\frac{x}{(1+x)^{1/3}}\,dx$        |     —     |   3.9×   |     —     | 0.01×  |    —    |     1×      |
| $\int\frac{x^2}{(1+x)^{1/3}}\,dx$      |     —     |   4.1×   |     —     | 0.007× |    —    |     1×      |
| **Derivatives**                        |           |          |           |        |         |             |
| $\tfrac{d}{dx}\sqrt{1-x^2}$            |   0.01×   |  0.03×   |   0.01×   | 0.001× | 0.004×  |     1×      |
| **Simplification**                     |           |          |           |        |         |             |
| $\sqrt{3+2\sqrt2}$                     |    11×    |   20×    |     —     |   —    |    —    |     1×      |
| $\sqrt6\,x+\sqrt2\,x$                  |    28×    |   65×    |    30×    |  3.3×  |   18×   |     1×      |
| **Evaluation**                         |           |          |           |        |         |             |
| $\lim_{x\to0}\tfrac{\sin x}{x}$        |   9.2×    |   23×    |     —     |  3.1×  |    —    |     1×      |
| $\lim_{x\to\infty}(1+\tfrac1x)^x$      |   1.6×    |   1.6×   |     —     |  2.1×  |    —    |     1×      |
| $\int_1^2\tfrac1x\,dx$                 |   1996×   |  1907×   |     —     |  92×   |    —    |     1×      |
| $\int_{-\infty}^{\infty} e^{-x^2}\,dx$ |   106×    |   428×   |     —     |  2.5×  |    —    |     1×      |
| **Solving**                            |           |          |           |        |         |             |
| $x^4+x^2-1=0$                          |   0.07×   |  0.08×   |     —     | 0.06×  |    —    |     1×      |
| $x^3-x-1=0$                            |   0.08×   |   0.1×   |     —     | 0.04×  |    —    |     1×      |

Across the cases both solve, Compute Engine is a **median 3.7× faster than
Mathematica** (up to 1996×). The `—` entries under `0.59.0` show what is new
this release: limits, exact definite/improper integrals, and polynomial solving.
The bottom three antiderivative rows are integrals the base engine still leaves
unevaluated but the opt-in **Rubi** rules solve. Mathematica still leads on raw
derivative and root-finding latency (the `<1×` rows), where its native kernel is
hard to beat.

<sub>Measured 2026-06-16 · SymPy 1.14.0 · math.js 15.2.0 · Mathematica 14.3.0 ·
Node 22 · verified against `mpmath`. Reproduce:
`npm run build production && ./venv/bin/python3 benchmarks/gen_cases.py && node benchmarks/report.mjs && node benchmarks/report_changelog.mjs`.</sub>

### Calculus

- **`Limit` can now return exact symbolic results.** This includes direct
  substitution, indeterminate quotients, rational functions at infinity,
  dominant-term analysis, and exponential forms. Examples include
  `lim(x→0) sin(x)/x = 1`, `lim(x→∞) (1+1/x)^x = e`, and
  `lim(x→∞) arctan(x) = π/2`. Limits that cannot be determined reliably fall
  back to numeric evaluation or remain unevaluated. `NLimit` remains numeric.

- **Limits no longer return a wrong value at a special-function pole.** A limit
  whose expression contains a special function (`Gamma`, `Digamma`, `PolyGamma`,
  `Zeta`, …) evaluated at one of its poles — e.g. `lim(x→-1) (x+1)·Digamma(x)` —
  previously substituted the pole as a finite value and returned a confident
  wrong result (`0`). Such limits now stay unevaluated (or are recovered
  numerically where sampling allows) rather than reporting a false value.

- **Symbolic integration supports many more integrands**, including:
  - Gaussian integrals and quadratic exponentials using `Erf` and `Erfi`
  - Fresnel integrals
  - Sine, cosine, exponential, and logarithmic integrals
  - Products of polynomials, exponentials, and trigonometric functions
  - More radical and quadratic-root integrands
  - Powers of secant, cosecant, tangent, and cotangent
  - Reverse power-chain forms such as `∫ln(x)/x dx = ½ln²(x)`
  - Products with symbolic exponents that previously failed or timed out
  - Powers and radicals of a linear function, e.g. `∫√(1+x) dx`, `∫x√(1+2x) dx`,
    and `∫(a+bx)^p dx`
  - Radical powers of a polynomial via the reverse chain rule, e.g.
    `∫x√(1−x²) dx = −⅓(1−x²)^{3/2}`
  - Quotients by a sum of two square roots, e.g. `∫1/(√(a+bx)+√(c+bx)) dx`, by
    conjugate rationalization
  - Absolute value of a linear argument, e.g. `∫|x| dx = x|x|/2` and
    `∫|ax+b| dx = (ax+b)|ax+b|/(2a)` (valid for all `x`)

- **Rational-function integration is more exact and complete.** Partial
  fractions now preserve rational and radical coefficients for a wider range of
  denominators, including `x³+1`, `x⁴+1`, `x⁴-1`, and biquadratic polynomials.
  Several cases that previously returned incomplete results, floating-point
  coefficients, or no result now return exact antiderivatives.

- **More improper integrals evaluate correctly.** Exact results now include
  Gaussian, rational, and Fresnel integrals over infinite intervals. Numeric
  integration of convergent oscillatory integrals is also more reliable, while
  divergent or low-confidence cases remain unevaluated instead of returning a
  misleading finite value.

- Fixed incorrect or missing antiderivatives for `sin²(ax+b)`, `cos²(ax+b)`,
  `√x`, `1/√x`, `1/√(1-x²)`, and related forms.

- **New `Residue(f, x, a)` operator** computes the residue of `f` at `x = a`
  (the coefficient of `(x-a)⁻¹` in its Laurent expansion). It detects the pole
  order and evaluates exactly via the symbolic limit engine, e.g.
  `Residue(1/(x²-1), x, 1) → 1/2`, `Residue(eˣ/(x-1)², x, 1) → e`, and
  `Residue(cot(x), x, 0) → 1`. Residues of `Gamma`, `Digamma`, and `Zeta` at
  their poles use closed forms gated by the analytic-property store, e.g.
  `Residue(Gamma(x), x, -2) → 1/2` and `Residue(Zeta(s), s, 1) → 1` — including
  in a product or quotient with an analytic cofactor, such as
  `Residue(Gamma(x)/(x-5), x, -2) → -1/14`.

### Algebra and Solving

- **`solve` handles equations between two different inverse-trigonometric
  functions** by applying `tan` to both sides to clear them, then solving the
  resulting algebraic equation. For example `arcsin(x) = arctan(x) → 0` and
  `arccos(x) = arctan(x) → √((√5−1)/2)`. As part of this, `√(f(x)) = g(x)` with
  a non-linear right-hand side now solves too (e.g. `√(1−x²) = x²`).

- **New `Solve` operator.** `Solve(equation, unknown)` returns the list of
  solutions of an equation for an unknown, using the same solver as the
  `expr.solve()` method — for example `["Solve", ["Equal", "x^2", 1], "x"]`
  returns `["List", 1, -1]`. The equation may be an `Equal` expression or a bare
  expression read as `= 0`; the arguments are held, so the equation is no longer
  prematurely reduced to a boolean.

- **`solve` now handles general cubic, quartic, and higher-degree polynomials.**
  Exact roots are still preferred; when no supported exact form is available,
  real roots are returned as numeric approximations.

- **Absolute-value equations solve more reliably.** This includes equations such
  as `|x| = 2`, `|x-1| = 2`, non-linear arguments such as `|x²-3| = 1`, and
  equations with an absolute value on both sides.

- **`solve` handles more transcendental and substitution equations.** Equations
  with equal exponential bases reduce by their exponents
  (`e^{2-x²} = e^{-x} → -1, 2`; `2^x = 2^3 → 3`); `a·sin(x) + b·cos(x) = 0`
  solves via the tangent (`sin x = cos x → π/4`); equations that are polynomials
  in a root of the unknown solve by substitution (`2√x + 3·⁴√x = 2 → 1/16`); and
  a single square root with a non-constant coefficient is eliminated by squaring
  (`x = 1/√(x²+1)`).

- **Biquadratic and sparse-power equations return exact roots.** Polynomials
  whose exponents share a common factor — such as `x⁴ + x² − 1` — are solved by
  substituting `u = x²` (or `x³`, …), so the roots are exact radicals
  (`±√((√5−1)/2)`) instead of numeric approximations.

- **`solve` handles equations that are polynomials in a single nonlinear
  generator**, by substituting `u = g(x)` for a logarithmic, exponential,
  trigonometric, or radical generator `g`, solving for `u`, and inverting. For
  example `(ln x)² = 4 → e², e⁻²`, `e^{2x} − 3eˣ + 2 = 0 → 0, ln 2`, and
  `√(ln x) = ln√x → 1, e⁴`.

- **`solve` factors a zero product.** When an equation is a product whose
  factors each involve the unknown — such as `ln(x)·(x − 1) = 0`, or an
  already-factored `(x + 1)·cos³(3x) = 0` — its roots are the union of the roots
  of each factor.

- **`GCD` now finds common polynomial factors** for univariate and multivariate
  polynomials. Integer operands retain their existing behavior; use
  `PolynomialGCD()` when an explicit polynomial result of `1` is needed for
  coprime inputs.

- **New `Resultant(a, b, x)` operator** computes the resultant of two
  polynomials with respect to a variable (the Sylvester-matrix determinant). It
  is zero exactly when the polynomials share a common factor, e.g.
  `Resultant(x² - 1, x - 1, x) → 0` and `Resultant(x² + 1, x² - 1, x) → 4`.
  Symbolic coefficients are supported: `Resultant(x² + a, x + b, x) → a + b²`.

- **Polynomial factorization is more complete and reliable.** In particular,
  `Factor(xⁿ-1)` now returns polynomial factors without introducing
  branch-dependent radicals, and the public `factor()` function once again
  factors expressions such as `x²+5x+6`.

- **Nested radicals are simplified when possible**, for example
  `√(3+2√2) = 1+√2`.

### Special Functions

- Added numeric evaluation for:
  - Complete and incomplete elliptic integrals: `EllipticK`, `EllipticE`,
    `EllipticF`, and `EllipticPi`
  - The arithmetic-geometric mean `AGM`
  - `Hypergeometric2F1`, `Hypergeometric1F1`, and `AppellF1`
  - Jacobi theta functions and the Dedekind eta function
  - `Erfi`, `SinIntegral`, `CosIntegral`, `ExpIntegralEi`, and `LogIntegral`

- **`Gamma` now accepts a second argument, the upper incomplete gamma function**
  `Γ(s, z) = ∫_z^∞ tˢ⁻¹ e⁻ᵗ dt` (e.g. `["Gamma", s, z]`). It is evaluated
  numerically for real and complex arguments, including negative and fractional
  orders `s` (`Gamma(-4, 2)`, `Gamma(1/2, -1)`), and honors the exactness
  contract: it stays symbolic under `evaluate()` and reduces `Γ(s, 0)` to the
  ordinary `Γ(s)`. Use `.N()` for a numeric value. The one-argument `Γ(z)` is
  unchanged.

- **`Hypergeometric2F1` now supports analytic continuation across most of the
  complex plane**, rather than being limited to its defining power series.

- **`Zeta` and `Gamma` now honor the requested precision.** At high
  `ce.precision`, numeric evaluation of `Zeta`, `Gamma`, `GammaLn`, `Beta`,
  `Digamma`, `Trigamma`, and `PolyGamma` previously stalled near machine
  precision (e.g. `Zeta(3)` was correct to only ~16 digits regardless of
  precision). They now return the full requested precision — `Zeta` uses the
  Cohen–Villegas–Zagier acceleration, and all of these kernels compute with
  guard digits.

- **`EulerGamma` (γ) now honors the requested precision.** It was previously a
  fixed ~858-digit constant, so at higher `ce.precision` it silently stopped at
  ~858 correct digits (making identities such as `Digamma(1) = -γ` appear wrong
  past that point). It is now computed on demand to the full working precision.

- **`Gamma` and the polygamma family are dramatically faster at high precision**
  (~340× at 300 digits — `Gamma(1/3)` ≈1.9 s → ≈5 ms; ~130× at 1000 digits). The
  Stirling-series kernels (`Gamma`, `GammaLn`, `Digamma`, `Trigamma`,
  `PolyGamma`) were both shifting their argument just short of where the series
  converges (running far more terms than needed) and letting intermediate
  products grow in size without bound; the shift, term count, and per-step
  rounding are now chosen so the series converges quickly with bounded-size
  arithmetic. Results are unchanged to full precision.

- The Identities Library has been updated from 1,350 to 1,376 verified rules,
  including corrected Jacobi theta identities.

- **Modular and theta-function identities now discharge under `Im(τ) > 0`.** The
  upper-half-plane condition guarding these identities is expressed as the part
  inequality `Im(τ) > 0`, so they apply once you `assume(Im(τ) > 0)` (previously
  an opaque `τ ∈ HH` set membership was required). A new LaTeX shorthand,
  `\mathbb{C}^+` (also `\C^+`), denotes the open upper half-plane:
  `z \in \mathbb{C}^+` canonicalizes to `Im(z) > 0`. As a side effect three
  further identities became available — the derivative of the modular j-function
  and the θ₁/θ₂ logarithmic derivatives — recovered because the inequality form
  is verifiable where the opaque set was not.

- **`EisensteinE(s, τ)` now evaluates numerically.** The normalized Eisenstein
  series of even weight `s ≥ 2` gets a numeric kernel (Lambert-series
  q-expansion in the upper half-plane), joining `JacobiTheta`/`DedekindEta`. For
  example `EisensteinE(4, i).N()` is `1.45576…`, `EisensteinE(2, i).N()` is
  `3/π`, and `EisensteinE(6, i).N()` is `0` (an elliptic fixed point). Exact
  arguments stay symbolic under `evaluate()`; the kernel requires `Im(τ) > 0`.

- **New analytic-property metadata store.** `ce.functionProperties(name)`
  exposes per-operator analytic properties drawn from the Fungrim corpus —
  poles, zeros, branch points and cuts, residues, and holomorphic/meromorphic
  domains. For example `ce.functionProperties('Gamma')?.poles` is the set
  `NonPositiveIntegers`. Convenience accessors (`poles`, `zeros`, `branchCuts`,
  `holomorphicDomain`, …) return the unconditional record of each kind;
  parametric records (such as residues that depend on parameters) are available
  via `entries`. This also powers pole-aware `N()` (see Behavior Changes).

### Numeric Evaluation

- **Arbitrary-precision elementary and transcendental functions are
  substantially faster**, especially at hundreds or thousands of digits.
  High-precision `π` and trigonometric functions are no longer limited to about
  2,350 digits. Square root is roughly twice as fast at 1,000+ digits (a
  giant-steps integer square root), the natural logarithm switches to the faster
  arithmetic–geometric-mean method from around 700 digits (previously ~1,250),
  and a power no longer recomputes the logarithm of its base on every call — at
  1,000 digits `Exp(x).N()` is about three times faster, and a repeated base
  such as `2^x` or `10^x` about 2.8 times faster. Results are unchanged.

- Odd roots of negative real numbers now use the real-root convention, so
  `Root(-8, 3)` and `(-8)^(1/3)` evaluate to `-2`.

- **`N()` of a non-unit rational power of a negative base no longer returns
  `NaN`.** Previously only unit fractions worked (they route through
  `Sqrt`/`Root`); `(-4)^{3/2}`, `(-8)^{2/3}`, and similar fell through to
  `Math.pow(negative, non-integer) = NaN`. They now follow the same branch
  conventions as the roots above: an even denominator takes the principal
  complex value (`(-4)^{3/2} = -8i`, consistent with `Sqrt(-4) = 2i`), and an
  odd denominator the real root (`(-8)^{2/3} = 4`, `(-8)^{5/3} = -32`,
  consistent with `(-8)^{1/3} = -2`).

- **Exact `evaluate()` of a non-unit rational power of a perfect power now
  reduces.** When `x^{p/q}` has a real base and its `q`-th root is an exact
  perfect power, it reduces to an exact value (`8^{2/3} = 4`, `27^{2/3} = 9`,
  `(-8)^{5/3} = -32`), extending the unit-fraction behavior (`8^{1/3} = 2`) to
  non-unit numerators and matching `N()`. Non-perfect powers (`2^{2/3}`) and the
  negative even-root branch (`(-4)^{3/2}`, complex) stay symbolic under
  `evaluate()`.

- `N()` now fully evaluates applied functions and constants such as `e`, `i`,
  and expressions in Euler form.

- Complex equality and arbitrary-precision complex square roots are more robust
  in the presence of small rounding errors.

### Collections and Matrices

- `Take`, `Drop`, `Slice`, and `Count` now operate on matrix rows consistently.
  For example, `Count(matrix)` returns the number of rows.

- `Join` now preserves list order, duplicates, and all elements when joining
  lists. Joining sets continues to produce a deduplicated set.

- Sums and products over ranges from `-∞` to a finite bound, or from `-∞` to
  `∞`, now iterate over an appropriate finite approximation instead of an empty
  range.

### Resolved Issues

- Significant performance boost when many boxed expressions are involved in
  computations, due to improved handling of configuration changes and listener
  management.

- **Long-running evaluation is interruptible.** Collection operations,
  number-theory functions, limits, differentiation, simplification, and
  integration now respect `ce.timeLimit` more consistently. Operations that
  cannot finish in time either throw `CancellationError` or return the best
  numeric estimate available, as appropriate.

- **Fractional powers and radicals now preserve the correct principal complex
  branch.** This fixes several unsafe transformations involving negative or
  unknown-sign values, including `x/√(x²)`, negative factors under roots,
  products and quotients raised to fractional powers, and `1/√u`.

- Infinity arithmetic is more reliable for finite symbolic denominators, while
  indeterminate forms such as `∞/∞` remain indeterminate.

- Numeric limits now reject overflow, catastrophic cancellation, oscillation,
  and other low-confidence results instead of returning spurious values.

- Fixed hangs and crashes when factoring certain sums, simplifying expressions
  with radical coefficients, or mixing non-finite rational values with
  arbitrary-precision integers.

- `ce.number()` now throws a helpful error when passed a MathJSON expression
  array; use `ce.expr()` for expressions.

- Fixed incorrect simplification or evaluation of `2^i`, division by a
  floating-point zero coefficient, and several exact expressions involving
  negative radicals.

- Fixed a rational function such as `1/(x(x²+x))` wrongly simplifying (and
  integrating) to `0` when its factored denominator contained factors sharing a
  common root. The partial-fraction solver now detects the inconsistent system
  instead of returning a spurious all-zero decomposition.

- `Factor` is more complete: it now extracts a common monomial factor (e.g.
  `x³+x² → x²(x+1)`, `3x⁴+2x³ → x³(3x+2)`) and fully factors already-factored
  products and powers, so partial-fraction decomposition sees irreducible
  factors with correct multiplicities.

- Partial-fraction decomposition now uses exact arbitrary-precision integer
  arithmetic, so decompositions of higher-degree denominators no longer lose
  precision (the previous machine-integer solver overflowed past 2⁵³ and could
  return wrong coefficients).

- Rational functions with **repeated** linear or irreducible-quadratic factors
  now integrate to a closed form via full partial-fraction decomposition — e.g.
  `∫1/(x²(x+1)) dx` and `∫1/(x(1+x²)²) dx`, which previously returned an
  unevaluated integral.

- **Nested powers serialize to LaTeX and round-trip correctly.** A `Power` whose
  base is itself a `Power` — i.e. `(aᵇ)ᶜ` — was serialized as `a^{bᶜ}`, which
  re-parses as `a^(bᶜ)`, a different expression. It now serializes as `{aᵇ}^ᶜ`,
  so e.g. `(x³)^{2/5}` round-trips instead of becoming `x^{3^{2/5}}`.

- **GLSL/WGSL compilation no longer declares `int`/`i32` for a `Block`'s local
  bindings.** An integer-valued local (e.g. `["Assign", "r", 3]`) was declared
  as `int r;` while its value was emitted as a float literal (`r = 3.0;`),
  producing non-compilable shader code that also poisoned downstream float
  arithmetic. Scalar locals are now declared as `float`/`f32` — consistent with
  the always-float number literals and scalar shader math — and an explicit
  `["Declare", "r", "complex"]` type is honored. Complex locals still declare as
  `vec2`/`vec2f`.

- **`Loop` now compiles to JavaScript that returns its collected values.** A
  value loop such as `Loop(i², Element(i, Range(1, 5)))` compiled to a
  `for`-loop IIFE with no `return`, so it evaluated to `undefined` at runtime
  instead of the `[1, 4, 9, 16, 25]` the interpreter produces. The compiled loop
  now collects each iteration's value and returns the array. Imperative loops
  that mutate an outer accumulator or use `Break`/`Continue`/`Return` are
  unchanged.

- **`Integrate` now compiles to JavaScript that returns a numeric estimate.**
  For the common `\int x^2 dx` parse shape (where the integrand is a `Function`
  expression), the integrand was wrapped in a double lambda
  (`(x) => ((x) => x*x)`), so the Monte-Carlo estimator never called the inner
  function and returned `NaN`; it now compiles to a single lambda and returns
  the estimate (e.g. `∫₀¹ x² dx ≈ 0.333`). Integration bounds are also no longer
  floored, so non-integer limits such as `∫₀^0.5` integrate over the correct
  interval.

## 0.59.0 _2026-06-10_

This is a significant update to the Compute Engine.

The headline feature of this release is a large collection of curated
mathematical identities, the Identities Library:

```js
// When the Identities Library is loaded, CE can prove that...
console.log(parse("\\arctan(2-\\sqrt{3})").simplify().latex);
// ➔ "\frac{\pi}{12}"

// Declare that n is a positive integer...
ce.declare("n", "integer");
ce.assume(parse("n > 0"));

// ...and the parity identity applies:
console.log(parse("\\sin(\\pi n + \\frac{\\pi}{2})").simplify().latex);
// ➔ "(-1)^n"
```

Read more about the Identities Library in the
[dedicated guide](https://mathlive.io/compute-engine/guides/identities/).

This release also includes a large collection of performance improvements and
Resolved Issues across the library.

This release includes some breaking changes.

### Breaking Changes

- **`replace()` no longer eagerly canonicalizes the complete result.** The
  requested `form`, or the form produced by the rule, applies to replaced
  subexpressions. Call `.canonical` on the result to restore the previous
  behavior.

- **Fixed-size numeric collections now infer dimensioned types.** For example,
  `[1, 2, 3]` is now `vector<3>` instead of `list<number>`, and a 3×3 numeric
  collection is `matrix<3x3>`.

### Features

- **Curated mathematical identities**: the new opt-in `loadIdentities()` API
  loads over 1,300 guarded simplification rules and special values derived from
  [Fungrim](https://fungrim.org). Identities can be selected by topic, class, or
  purpose, and rules apply only when their side conditions can be proven.

  ```ts
  import { ComputeEngine } from '@cortex-js/compute-engine';
  import { loadIdentities } from '@cortex-js/compute-engine/identities';

  const ce = new ComputeEngine();
  loadIdentities(ce); // Or: loadIdentities(ce, { topics: ['gamma'] })
  ce.parse('\\Gamma(\\frac12)').simplify(); // → √π
  ```

  The loader is synchronous and idempotent per engine. Importing the identities
  subpath is required, so applications that do not use it incur no bundle cost.

  Simplifying with the full Identities Library loaded is now substantially
  faster: `simplify()` runs at roughly 1.2–1.3× the unloaded baseline
  (previously ~1.6×). The many guarded rules that share a common arithmetic head
  — `Multiply`, `Add`, `Divide`, … — are dispatched together per head instead of
  one at a time, so the per-rule overhead on every arithmetic node is paid once
  per head rather than once per rule. Results are unchanged.

- **More control over replacements**:
  - `ReplaceOptions.form` controls the form of replacement expressions:
    `'canonical'`, `'structural'`, `'raw'`, or a specific canonical transform.
    The previous `canonical` option is deprecated and remains available as an
    alias for this release.
  - `ReplaceOptions.direction` selects left-to-right or right-to-left traversal
    for order-sensitive rules.
  - Custom rules can now match user-defined function operators in `replace()`
    and `simplify({ rules })`.

- **Improved algebra**:
  - `solve()` now handles quadratics with symbolic coefficients, including
    `x^2 - a x + 1 = 0` and the general `a x^2 + b x + c = 0`. (#300)
  - `Factor` infers the variable of a univariate polynomial and preserves
    extracted numeric content: `Factor(x^2 + 5x + 6)` returns `(x+2)(x+3)`, and
    `Factor(6x + 9)` returns `3(2x + 3)`. (#309)

- **Parsing improvements**:
  - Two-argument `\arctan(y, x)` and `\tan^{-1}(y, x)` now parse as `Arctan2`.
  - LaTeX input is normalized to Unicode NFC, so decomposed identifiers parse
    like their precomposed equivalents.
  - A trailing bare `\` and trailing visual spacing commands are tolerated.
  - Multi-character subscripted identifiers such as `D_{etectsize}` no longer
    collide with Euler derivative notation.

### Resolved Issues

- **Numeric evaluation and arithmetic**:
  - Corrected complex powers, reciprocals, roots, and logarithms, including
    `i^2`, `i^i`, negative complex exponents, and even roots of negative reals.
  - Restored arbitrary-precision accuracy for roots, `exp()`, `ln()`, `mod()`,
    `gammaln()`, and large integer conversion. Very small real results such as
    `Power(10, -100).N()` are no longer rounded to zero.
  - Exact `floor()`, `ceil()`, and `round()` no longer lose digits beyond 2^53.
    Large decimal powers no longer report false overflow.
  - Division by zero, `NaN * 0`, infinity comparisons, and signed infinities now
    behave consistently across numeric representations.
  - Corrected `Arctan2` quadrants, `ln(Root(a, b))`, non-integer logarithm
    bases, exact radicals such as `sqrt(8)`, and division of Gaussian integers.

- **Special functions and statistics**:
  - Added complex `Gamma` and `GammaLn` evaluation. Gamma and factorial poles at
    non-positive integers now return `ComplexInfinity`, while factorials of
    positive non-integers evaluate through `Gamma(x + 1)`.
  - Improved `Erf`/`Erfc` to machine precision and corrected small-argument
    `gammaln()`.
  - Corrected `GCD`, `LCM`, `Congruent`, `Subfactorial`, negative-index
    `Fibonacci`, `IsOctahedral`, `Multinomial`, and `BellNumber`.
  - Corrected skewness, kurtosis, interquartile range, histogram/bin endpoints,
    and exact combinatorial calculations.

- **Simplification, comparison, and assumptions**:
  - Indeterminate comparisons now remain unknown instead of becoming `false`;
    this also improves sign inference, `Boole`, and `KroneckerDelta`.
  - Fixed equality handling for unordered expressions and multi-variable
    equation equivalence.
  - Prevented invalid simplification of rational powers such as `(-x)^(3/4)`.
  - Set membership now remains undecided when a symbol's type is unknown, and
    `Subset`, `SubsetEqual`, `Superset`, and empty-set relations use the correct
    direction.
  - Symbolic common factors are now recognized, and unresolved derivatives
    remain symbolic instead of recursing indefinitely.

- **Collections, matrices, and tensors**:
  - Corrected `Rest`, `Slice`, `Drop`, `Cycle`, `Position`, `SetFrom`,
    `TupleFrom`, `Filter`, `Zip`, and compiled `Reduce` behavior.
  - Determinants now work for matrices of any supported size, with exact integer
    results; inverses work beyond 2×2.
  - Corrected matrix row access and the `isUpperTriangular`, `isDiagonal`, and
    `isTriangular` predicates.
  - Incompatible tensor broadcasts now throw instead of producing invalid data;
    `diagonal()` respects its axis arguments, and mixed real/complex dtype joins
    preserve precision.

- **Types and serialization**:
  - Dimensioned list and matrix type strings now parse and round-trip, including
    unknown dimensions, spaces, parenthesized element types, and single `^N`
    dimensions.
  - Corrected union reduction, `never` subtyping, narrowing of disjoint types,
    bare `matrix` handling, numeric literal subtyping, and invalid range
    validation.
  - String literals now remain strings after MathJSON round-trips, dictionary
    conversion retains every entry, and function literals can be applied
    directly.
  - Plain symbols no longer report themselves as empty finite collections.

- **LaTeX parsing and serialization**:
  - Corrected scaled/big delimiters, nested `\text{...}`, repeating decimals
    beginning with `.`, digit-like symbol names, prefixed-symbol errors, and
    unbalanced environment names.
  - Multiplication signs are now emitted where juxtaposition would merge numeric
    factors, for example `3 \times 2^2` instead of `32^2`. (#302)
  - Re-declaring a parser symbol with the same type no longer reports a
    conflict.

- **Compilation**:
  - Corrected JavaScript compilation of symbolic `Range`, compound-bounded
    interval `Sum`/`Product`, and interpreted fallback for multi-argument
    lambdas.
  - Corrected Python parentheses for `(a^b)^c`.
  - Corrected GLSL/WGSL output for `Degrees`, complex multiplication,
    `Gamma`/`Factorial`/`Beta`/`Erf`, and `If`/`Which`/`When`.
  - Corrected symbolic derivatives of `Arcsec` and `Arccsc`.

- **Interval arithmetic**:
  - Restored conservative enclosures for multiplication involving zero and
    infinity, negative-modulus `mod`, `clamp`, `binomial`, `gcd`, `lcm`,
    `gamma`, `gammaln`, `sinc`, and Fresnel integrals.

## 0.58.0 _2026-05-12_

### Added

- **`\operatorname{count}(L)` lowercase alias** — function-call form now parses
  to `["Length", L]`, matching the existing dot-notation form
  (`L.\operatorname{count}`) and the other lowercase aliases (`mod`, `var`,
  `shuffle`, `repeat`, `join`).

- **`Repeat(value, count)` 2-arg form** — `Repeat` now accepts an optional
  integer `count` and evaluates to a finite list of `count` copies of `value`.
  The 1-arg `Repeat(value)` keeps its existing infinite-sequence semantics.
  Materialization is gated by `ce.maxCollectionSize`; larger values stay lazy
  (still accessible via `.at()` / iterator).

- **`ce.maxCollectionSize`** — new configurable cap (default `10_000`) on the
  number of elements a collection may have when materialized into a concrete
  `List`. Assigning `<= 0` or `Infinity` disables the cap (matching
  `iterationLimit` and `recursionLimit`).

- **`Sum(L)` collection-reducer form** — `Sum` now accepts a single collection
  argument and reduces to the sum of its elements:
  `["Sum", ["List", 1, 2, 3, 4, 5]] // ➔ 15`. The big-op form
  `Sum(body, [i, a, b], …)` is unchanged. The `Sum` head is now preserved
  through canonicalization (previously rewritten to `Reduce(L, "Add", 0)`), so
  `L.\operatorname{total}` round-trips cleanly with
  `latexOptions.dotNotation = true`. The async path throws `CancellationError`
  on signal abort.

- **`At` extended with boolean-mask and integer-list indices** — `At(L, mask)`
  where `mask` is a finite collection of `True`/`False` returns the elements of
  `L` where the mask is `True`. `At(L, indices)` where `indices` is a finite
  collection of integers returns a sublist picked at those positions;
  out-of-range positions are filtered. Integer indices (`At(L, 2)`) and string
  keys (`At(d, "key")`) work as before.

- **Function-application broadcasting for user-defined lambdas** — when a user
  function with scalar-typed parameters is applied to a finite indexed
  collection, CE now broadcasts the call elementwise. For
  `ce.assign('f', ce.parse('x \\mapsto x^2 + 1'))`, the expression
  `["f", ["List", 1, 2, 3]]` evaluates to `["List", 2, 5, 10]`. Multi-arg
  functions broadcast with zip semantics, mixing scalars and lists naturally.
  The inferred default for `\mapsto` lambdas is scalar parameters, so most user
  functions broadcast by default. To opt out, declare an explicit list parameter
  type via `ce.declare(name, '(list<X>) -> Y')`.

- **List type for mixed-kind and mixed-dimension elements** — `widen()` now
  builds a structural union when the common supertype would otherwise collapse
  to a lossy generic category (`scalar`, `value`, `list`, `tuple`, `dictionary`,
  …). Consumers can detect heterogeneous lists by inspecting
  `expr.type.toString()`:
  - `[1, 2, 3]` → `list<number>` (precise)
  - `[1, "hello", 3]` → `list<finite_integer | string>` (union)
  - `[(1,2), (1,2,3)]` →
    `list<tuple<finite_integer, finite_integer> | tuple<finite_integer, finite_integer, finite_integer>>`
    (mixed dimension)
  - `[]` → `list<nothing>` (empty)

- **`ce.expr(true)` / `ce.expr(false)`** — JS boolean primitives now box to the
  `True` / `False` symbols (previously fell through to `Undefined`).

- **`Length` operator definition** — `ce.operatorInfo('Length')` now returns a
  valid entry. The evaluator returns an integer count for finite collections and
  leaves the expression unevaluated for non-collection or infinite inputs.

- **Library entries for `Complex`, `Colon`, `Prime`** — `ce.operatorInfo()` now
  returns introspection data for these heads (previously `undefined`). `Complex`
  boxing is unchanged — `["Complex", re, im]` still produces a `BoxedNumber`.

- **`ce.symbolInfo(name)`** — new public API parallel to `ce.operatorInfo()`,
  for introspecting constants and declared variables. Returns
  `{ kind: 'constant' | 'variable', type: BoxedType }` for symbols like `Pi`,
  `True`, `ExponentialE`, `ImaginaryUnit`. Returns `undefined` for unknown names
  and for operator heads. Added `SymbolInfo` type to the public type surface.
  - Note: `Infinity` is registered as `PositiveInfinity` / `NegativeInfinity`;
    `Undefined` has no value definition.

- **`ce.normalizeIdentifier(latex)`** — new public helper that converts a LaTeX
  identifier string to its canonical MathJSON name without side effects.
  Examples: `R_{3}` → `R_3`, `f_{Bm}` → `f_Bm`, `\theta_x` → `theta_x`. Inputs
  that aren't identifiers (`'1 + 2'`, empty string) return `''`. Useful in
  importer pipelines that need to call `ce.declare()` with normalized names
  before parsing referencing rows.

- **`First`/`Second`/`Third` compile entries** — component access (`p.x`, `p.y`,
  `p.z`) now compiles cleanly. JS uses `[0]`/`[1]`/`[2]` index access; GLSL/WGSL
  use `.x`/`.y`/`.z` swizzles, assuming the argument compiles to a
  `vec2`/`vec3`/`vec4`. 5+-element tuples (which compile to `float[N]` arrays)
  aren't supported.

- **`Range` GPU compile entry** — `Range(lo, hi[, step])` with
  compile-time-constant bounds emits an inline `float[N](...)` (GLSL) or
  `array<f32, N>(...)` (WGSL) literal. Non-constant bounds throw a clear error
  directing the caller to materialize on the JS host and upload as a uniform.
  Sequence count is capped at 256 elements per call site.

- **`Variance`/`GCD`/`Median` GPU compile entries** — GLSL+WGSL parity with
  their JS counterparts.
  - `Variance` is inlined (no size limit).
  - `GCD` uses a preamble function implementing the Euclidean algorithm.
  - `Median` is supported for list sizes 2–8; lists with 9+ elements throw.

- **`Random` GPU compile with deterministic seed** — `Random(seed)` in GLSL/WGSL
  compiles to a hash-based pseudorandom. `Random()` (no args) in GLSL falls back
  to a `gl_FragCoord`-derived seed (fragment-shader only); in WGSL it throws —
  callers must provide an explicit seed.
  - The fract-sin hash exhibits banding near `seed ≈ kπ`. For high-quality
    shader random, use a more robust hash (e.g. PCG or xxHash).
  - JS-side `Random` is unchanged (still `Math.random`, non-seeded). A seeded JS
    form will land in a future release.

- **`toSignedFunction()`** — new method on `BoxedExpression` for
  implicit-surface rendering and region classification:
  - `Equal(a, b)` → `a - b` (zero on the surface)
  - `Less(a, b)` / `LessEqual(a, b)` → `a - b` (negative when relation holds)
  - `Greater(a, b)` / `GreaterEqual(a, b)` → `b - a` (negative when relation
    holds)
  - `NotEqual(a, b)` → `a - b`
  - Non-relation expressions return `undefined`.

  Strictness and direction are encoded in `expr.operator`. Note that CE
  canonical form normalizes `GreaterEqual` to `LessEqual(b, a)` (and similarly
  `Greater` to `Less`), so callers will typically see the `Less`/`LessEqual`
  operator on parsed expressions — the signed-function semantics are preserved.

- **`BoxedExpression.getInterval(symbol)`** — new method for extracting domain
  bounds from restriction expressions. Returns `IntervalBounds` with
  `lower`/`upper`/`lowerStrict`/`upperStrict` for `When(e, cond)`,
  `And(c1, c2, …)`, and bare comparison expressions; returns `undefined` for
  unsupported shapes. Useful for 2D-plot domain derivation (e.g. clipping
  `y = f(x)\{0 < x < 5\}` to `[0, 5]`). Added `IntervalBounds` type to the
  public type surface.

- **Compact piecewise `\{cond_1 : val_1, …, default\}`** — now parses to
  `Which(c_1, v_1, …, True, default)`, the same head CE produces for
  `\begin{cases}…\end{cases}`. Disambiguated from set-builder `\{x : type\}` by
  inspecting the LHS of the top-level `Colon`: comparison/boolean heads (`Less`,
  `Greater`, `Equal`, `And`, `Or`, `Not`, …) → piecewise branch; otherwise →
  set-builder. Normal set literals (`\{1, 2, 3\}`) and set-builder via `\mid`
  are unchanged.

#### Fixed

- **`Linspace` endpoint inclusion** — `Linspace(a, b, n)` now produces `n`
  points evenly spanning `[a, b]` inclusive of both endpoints (matching NumPy,
  Julia, and MATLAB). Previously the last sample fell short of `b` (e.g.
  `Linspace(0, 1, 5)` yielded `0, 0.2, 0.4, 0.6, 0.8` instead of
  `0, 0.25, 0.5, 0.75, 1`). `Linspace(a, b, 1)` is the degenerate case and
  returns just `a`. The `contains` check is now tolerance-based (was an exact
  `%` test that failed for typical floating-point values).

- **Heterogeneous-list type rendering** — lists containing mixed kinds or
  mixed-dimension tuples previously rendered their type as `"[object Object]"`
  in some paths (`BoxedDictionary.type`, `collectionElementType`). Types are now
  constructed programmatically. Lists containing tuples, sets, dictionaries,
  records, or strings are no longer misclassified as numeric `BoxedTensor`s.

#### Known issues

- **JS `Loop` compile produces `undefined`** — the imperative `for`-loop IIFE
  generated for `Loop(body, Element(i, Range(lo, hi)))` has no `return`
  statement, so the compiled function returns `undefined` rather than the list
  of body values. Tracked for a future release.

- **JS `Integrate` compile produces `NaN`** — when `args[0]` is a `Function`
  expression (the common `\int x^2 dx` parse shape), `compileIntegrate` produces
  a double-lambda, so `_SYS.integrate` receives a function-returning function.
  Tracked for a future release.

## 0.57.0 _2026-05-10_

### Added

- **`verbatim` opt-in for `toLatex()`** — `expr.toLatex({ verbatim: true })`
  returns the original LaTeX source captured at parse time when the expression
  was parsed with `preserveLatex: true`. Falls back to normal re-serialization
  if no verbatim is available (e.g. for synthetic or transformed expressions).
  The default behavior of `expr.latex` and `expr.toLatex()` is unchanged —
  verbatim is strictly opt-in. Useful for round-tripping authored LaTeX (e.g.
  `p.x`, `\sin(x)`) without rewriting it to canonical form.
  - Verbatim is set only on the top-level boxed expression produced directly by
    `ce.parse(..., { preserveLatex: true })`. Canonicalization, `simplify()`,
    `evaluate()`, `subs()`, and `ce._fn()` produce fresh expressions with
    `verbatimLatex === undefined`.
  - Function expressions whose operator has a custom canonical handler (e.g.
    `Sin`, `Add`) currently do not preserve top-level verbatim through
    canonicalization — the handler reconstructs the result without threading
    metadata. Atoms (symbols, numbers) and functions without custom canonical
    handlers (e.g. `First`) do preserve it. Use `form: 'structural'` to skip
    canonical handlers when verbatim preservation matters.

- **`dotNotation` serialization option** — when enabled (default off),
  member-access heads serialize to dot notation rather than function-call form:
  `First(p)` → `p.x`, `Length(L)` → `L.\operatorname{count}`, etc. Useful for
  round-tripping editor-authored dot-notation back to its source form. Set via
  `ce.latexOptions.dotNotation = true` or per-call
  `expr.toLatex({ dotNotation: true })`. Only applies to arity-1 forms;
  multi-operand forms (e.g. `Sum` with an index range) keep their standard
  serialization.
  - **Serializer-only.** The flag lives in `SerializeLatexOptions` and has no
    effect on parsing. All input forms continue to parse as before regardless of
    the flag: `|L|`, `\operatorname{count}(L)`, `L.\operatorname{count}`,
    `\operatorname{length}(L)` all still parse to `["Length", L]` whether
    `dotNotation` is on or off. The flag only decides which form the serializer
    emits.

- **Component access** (`p.x`, `L.\operatorname{count}`, `z.\operatorname{re}`)
  — dot notation now parses to existing semantic heads at parse time. No generic
  accessor head was introduced.
  - Recognized members and their AST mapping: `x`/`y`/`z` →
    `First`/`Second`/`Third`; `real`/`re` → `Real`; `imag`/`im` → `Imaginary`;
    `count` → `Length`; `total` → `Sum`; `max` → `Max`; `min` → `Min`.
  - Disambiguation: after a terminated integer or decimal, `.` followed by a
    letter or `\operatorname{...}` is component access, not a decimal point.
    Examples: `1.x` parses as `["First", 1]` (not a malformed decimal); `1.5.x`
    parses as `["First", 1.5]`.
  - Only `\operatorname{...}` and bare-letter identifiers are recognized after
    `.`. `\mathrm{...}` is not accepted (deliberately tight).
  - `Third` is a new operator (parallels `First`/`Second`) with signature
    `(any) -> any`. `First`/`Second` were widened from `(collection) -> any` to
    `(any) -> any` so component access on a non-collection (e.g. `1.x`) defers
    type-checking to evaluation; evaluation returns an `Error` expression for
    incompatible types.

- **Restriction braces** (`expr\{cond\}`) — trailing brace predicates parse to a
  new `When` head.
  - `f(x)\{0 < x < 2\}` → `["When", ["f", "x"], ["Less", 0, "x", 2]]`.
  - **Stacked restrictions canonicalize**: `expr\{c_1\}\{c_2\}` →
    `["When", expr, ["And", c_1, c_2]]`. Downstream simplification, evaluation,
    interval intersection, and compilation see a single canonical shape
    regardless of source form.
  - Disambiguation from set literals is positional: standalone `\{1, 2, 3\}`
    continues to parse as a `Set`; `<expr>\{cond\}` parses as a `When`
    restriction. Allowed left operands include function calls, tuples, list/set
    literals, bare symbols, subscripted symbols, member access, power
    expressions, and chained restrictions.
  - Evaluator semantics: `When(e, True)` evaluates `e`; `When(e, False)` returns
    `Undefined`; indeterminate `cond` holds the form.
  - Serializer round-trips to the stacked-brace form (not `\wedge` inside one
    set of braces) so authored source and re-serialized output stay visually
    consistent.
  - JS and GLSL compilation: ternary `(cond ? e : NaN)`.

- **List-range ellipsis** (`[1...9]`, `[0, 0.1, ..., 1]`) — ranges inside list
  literals parse to the existing `Range` head.
  - Endpoint-only form: `[a...b]` → `["Range", a, b]`. Triggers `...`, `\ldots`,
    and `\dots` are all accepted.
  - Inferred-step form: `[a_0, a_1, ..., a_n]` → `["Range", a_0, a_n, step]`
    where `step = a_1 - a_0` is inferred from the first sample pair.
    Intermediate samples are validated against `a_0 + k·step` within
    `ce.tolerance`; inconsistent samples produce a parse error.
  - The float idiom `[0, 0.1, 0.2, ..., 1]` is supported (tolerance-aware
    comparison; `0.1 + 0.1 ≠ 0.2` exactly but is accepted within tolerance).
  - Outside `[...]` brackets, `\ldots`/`\dots`/`...` continue to parse as the
    `ContinuationPlaceholder` symbol. The trigger is bracket context.

- **For-comprehensions** (`(x, y) \operatorname{for} x=L_1, y=L_2`) — the `Loop`
  head now accepts multiple `Element` clauses, evaluated as nested loops with
  later bindings seeing earlier ones in scope.
  - `Loop(body, Element(x, L_1), Element(y, L_2), ...)` produces an
    `indexed_collection<T>` of body evaluations, in row-major order.
  - For independent bindings this is the Cartesian product:
    `(x, y) \operatorname{for} x = [1...2], y = [1...2]` → 4 tuples.
  - For dependent bindings later clauses see earlier:
    `(x, y) \operatorname{for} x = [1...3], y = [1...x]` → 6 tuples (triangle,
    not Cartesian).
  - Precedence: `\operatorname{for}` binds looser than `,` and `=`, tighter than
    `;`. So `(x + y) \operatorname{for} x = L_1, y = L_2` parses with body
    `x + y` and two bindings.
  - Bound names do not leak into the enclosing scope (uses
    `Scope.noAutoDeclare`).
  - Legacy single-Element form continues to round-trip via the existing
    `\text{for } i \text{ from } a \text{ to } b \text{ do } body` syntax.
    Multi-Element comprehensions serialize to the `\operatorname{for}` form.

- **`Range` type is now dynamic** — element type narrows based on the step
  argument: integer step (or no step) yields `indexed_collection<integer>`;
  non-integer step yields `indexed_collection<number>`. Previously the type was
  always `indexed_collection<integer>`, which was incorrect for float-step
  ranges.

- **`When` head** — new conditional-value operator. `When(expr, cond)` returns
  `expr` when `cond` is true, `Undefined` when `cond` is false, and holds when
  `cond` is indeterminate. Used by restriction-brace parsing (see above) but
  also usable directly.

- **`ce.operatorInfo(head)`** — new method on `ComputeEngine` for introspecting
  registered operator heads. Returns
  `{ kind: 'function' | 'opaque', signature?: BoxedType }` or `undefined`.
  - `'function'` — head has an `evaluate` handler or a `collection` handler
    (lazy producers like `Range`, `Linspace`, `Tuple` work via the latter).
  - `'opaque'` — head is declared with a signature but has neither (e.g.,
    `Triangle`, `Sphere`, `GeometricVector`).
  - `undefined` — no operator definition (constants like `Pi` and unknown
    heads).
  - Lets external tooling classify heads by capability without maintaining a
    parallel list of supported operators.

- **`tolerance` in `ParseLatexOptions`** — populated automatically from
  `ce.tolerance` when parsing through `ce.parse()`. Used by list-range sample
  validation; available to other parse handlers that need tolerance-aware
  comparison.

#### Fixed

- **`Loop` with `Element` clause** — single-Element
  `Loop(body, Element(i, range))` previously did not produce a list of body
  evaluations (the iteration path for `Element` form had a bug). The new
  variadic evaluator correctly yields a `List` of body values for each
  iteration.

## 0.56.0 _2026-03-10_

### Added

- **First-class color values** — colors are now typed values with a dedicated
  `color` primitive type and per-colorspace constructor heads, rather than
  anonymous tuples.
  - **Constructor heads**: `Rgb`, `Hsv`, `Hsl`, `Oklab`, `Oklch`. Each takes 3
    components plus an optional alpha. Channels follow each colorspace's own
    conventions (RGB: 0–1 sRGB; HSV/HSL: hue in degrees, S/V/L 0–1; Oklab/Oklch:
    standard ranges).
  - **LaTeX**: `\operatorname{rgb}(...)`, `\operatorname{hsv}(...)`,
    `\operatorname{hsl}(...)`, `\operatorname{oklab}(...)`,
    `\operatorname{oklch}(...)`, parsing and serialization both directions.
  - **Conversions**: `AsRgb`, `AsHsv`, `AsHsl`, `AsOklab`, `AsOklch` convert any
    color to the named space (identity if already there).
  - **`ColorDelta(a, b)`** — perceptual color difference (ΔE_OK, Euclidean
    distance in OKLab). Wide-gamut inputs are not clipped before measurement.

- **JavaScript compile-target support for color values** — all color
  constructors, the `As*` converters, `ColorDelta`, and `Distance` are
  supported. At runtime a color is a 3- or 4-element OKLCh array (`[L, C, H]` or
  `[L, C, H, alpha]`), matching the GPU target's `vec3`/`vec4` representation,
  so values move between JS, GLSL, and WGSL without conversion.

- **`Distance(p1, p2)`** — Euclidean distance between two points represented as
  tuples. Accepts any positive dimension; mismatched dimensions return a typed
  error. LaTeX trigger `\operatorname{distance}(p1, p2)`.

- **Geometric primitive heads** — `Triangle`, `Sphere`, `Segment`, and
  `GeometricVector` are now recognized as typed function heads (no evaluator,
  preserved structurally for downstream consumers). LaTeX triggers
  `\operatorname{triangle}`, `\operatorname{sphere}`, `\operatorname{segment}`,
  `\operatorname{vector}(p1, p2)`. `GeometricVector` is distinct from the
  existing `Vector` (column-vector construction).

- **`To` head registered** — `\to` already parsed to `["To", a, b]` but was
  classified as `unsupported-operator`; it is now a known typed head.

- **Function-style aliases** — lowercase `\operatorname{...}` forms common in
  Desmos-style notation now parse to their existing capitalized operators:
  `\operatorname{mod}` → `Mod`, `\operatorname{var}` → `Variance`,
  `\operatorname{shuffle}` → `Shuffle`, `\operatorname{random}` → `Random`,
  `\operatorname{repeat}` → `Repeat`, `\operatorname{join}` → `Join`.

- **`ce.latexOptions`** — new mutable, engine-wide bag of LaTeX parse/serialize
  options (e.g. `decimalSeparator`, `digitGroupSeparator`). Available as a
  constructor option and as a read/write property:
  ```ts
  const ce = new ComputeEngine({ latexOptions: { decimalSeparator: '{,}' } });
  // or post-construction:
  ce.latexOptions = { decimalSeparator: '{,}' };
  ```
  These options are merged into every `ce.parse()` and `expr.toLatex()` call.
  Precedence (most-specific wins): `LatexSyntax` instance defaults <
  `ce.latexOptions` < per-call options. Previously, options like
  `decimalSeparator` could only be changed per call post-construction (and
  `expr.latex` could not be customized at all).

#### Changed

- **`Color('...')`** now returns an `Oklch` head instead of a 0–1 sRGB `Tuple`.
  The string parser still accepts the same set of CSS-style inputs.
- **`ColorMix`** now returns an `Oklch` head and mixes in OKLCh directly,
  preserving out-of-gamut chroma. Hue interpolation takes the shortest path
  around the wheel; mixing with an achromatic endpoint carries the other
  endpoint's hue (matches CSS Color 4 `color-mix`).
- **`ContrastingColor`** now returns an `Rgb` head (was: 0–1 sRGB `Tuple`).
- **`Colormap`** now returns `Oklch` heads — either a `List(Oklch, ...)` or a
  single `Oklch` for position-sampling.
- **`ColorToString`** with `'oklch'` format serializes typed color inputs
  without an sRGB round-trip; out-of-gamut chroma serializes losslessly.
  `'hex'`/`'rgb'`/`'hsl'` paths are unchanged.
- **Color-consuming signatures tightened** — `(any, any)` →
  `(color | string | tuple, color | string | tuple)` for `ColorDelta`,
  `ColorContrast`, `ColorMix`, `ContrastingColor`, `ColorToString`,
  `ColorToColorspace`. The `As*` converters take `(color) -> color`.

#### Migration notes

Code that consumed the tuple output of `Color('...')`, `ColorMix`,
`ContrastingColor`, or `Colormap` now sees a typed color head. To get the
previous 0–1 sRGB shape, wrap with `AsRgb`:

```ts
// Before: const tuple = ce.expr(['Color', "'red'"]).evaluate();  // [r, g, b] in 0-1
// Now (equivalent 0-1 sRGB):
const rgb = ce.expr(['AsRgb', ['Color', "'red'"]]).evaluate();
// rgb is ['Rgb', r, g, b] with channels 0-1
```

`Rgb` head components are **0–1 sRGB** across all layers (engine, JS compile,
GPU compile).

#### Fixed

- **Super-linear parse time on deeply-nested parametric expressions** —
  `ce.parse()` could exhibit exponential blowup on inputs like nested rotation
  matrices `\left(\cos(\theta)\cdot S+\sin(\theta)\right)` (depth 6 took ~44s).
  Two underlying causes were addressed: the type/sign cache on `BoxedFunction`
  was effectively disabled (causing every `.type` access to recurse through all
  operands), and `parseEnclosure` was speculatively trying matchfix definitions
  whose close-delimiter token wasn't even present in the input. Parse time on
  the affected inputs is now linear.

- **`ce.parse()` ignored the injected `LatexSyntax` instance's
  `decimalSeparator`** — `ce.parse()` hardcoded `decimalSeparator: '.'`,
  silently overriding any value configured on a `LatexSyntax` passed via the
  constructor's `latexSyntax` option. The injected instance's configured
  separator now takes effect end-to-end.

- **`expr.toMathJson({ metadata: ['latex'] })` was silently dropped** — passing
  a metadata array of specific fields (e.g. `['latex']` or `['wikidata']`) was
  ignored; only `metadata: 'all'` worked. The array form now correctly populates
  the requested fields.

- **`expr.toMathJson({ shorthands: ['all'] })` disabled all shorthands** — the
  `['all']` array form had the opposite of its intended effect. The string form
  `'all'` and explicit lists like `['function']` were unaffected.

## 0.55.6 _2026-03-08_

### Resolved Issues

- **LaTeX parsing: `\lim` with postfix operators** —
  `\lim_{x\to 0}\left(x\right)^x` now correctly parses as `Limit(x^x)` instead
  of `Power(Limit(x), x)`. The `\lim` parser was using
  `parseArguments('implicit')` which stripped the delimiters and left the `^x`
  unconsumed; it now uses `parseExpression` so postfix operators are included in
  the limit body.

- **LaTeX parsing: style, size, and color switch commands** — `\displaystyle`,
  `\textstyle`, `\scriptstyle`, `\scriptscriptstyle`, `\tiny`..`\Huge` (10 size
  commands), and `\color{...}` were silently discarded during parsing. They now
  produce `Annotated` expressions that preserve the styling information and
  round-trip correctly through serialization. Added `\scriptstyle` /
  `\scriptscriptstyle` serialization support (previously only `\displaystyle`
  and `\textstyle` were handled).

- **LaTeX parsing: set-builder notation** — `\{x \in \R \mid x > 0\}` now parses
  to `["Set", expr, ["Condition", cond]]`. Registered `\mid` as an infix
  operator (`Divides`, precedence 160). The serializer round-trips set-builder
  notation correctly.

- **LaTeX serialization: `Complement`** — `["Complement", "A"]` now serializes
  to `A^\complement` instead of falling back to the generic function form.
  Removed stale `@todo` comments about a non-existent multi-argument case.

- **LaTeX parsing: spacing commands** — `\hspace{dim}`, `\hspace*{dim}`,
  `\hskip`, and `\kern` are now consumed during parsing (previously caused
  "unexpected token" errors). These are treated as visual spacing and skipped.

- **LaTeX serialization: `HorizontalSpacing` math classes** — the 2-argument
  form `["HorizontalSpacing", expr, "'bin'"]` now serializes to `\mathbin{expr}`
  (and similarly for `rel`, `op`, `ord`, `open`, `close`, `punct`, `inner`).
  Previously the second argument was silently dropped.

- **LaTeX serialization: redundant parens on matchfix operators** — `wrap()` no
  longer adds parentheses around `Abs`, `Floor`, `Ceil`, `Norm`, and other
  matchfix expressions that already have visible delimiters.

- **LaTeX serialization: tabular environments** — default environment serializer
  now renders matrix bodies (List of Lists) with `&` column separators and `\\`
  row separators instead of nested function calls.

- **LaTeX serialization: matchfix delimiter scaling** — default matchfix
  serializer now respects `groupStyle` to choose between bare delimiters,
  `\left..\right`, or `\bigl..\bigr` scaling.

- **LaTeX parsing: Greek symbols in string groups** — `\alpha`, `\beta`, etc. in
  `parseStringGroupContent()` (used by `\begin`/`\end`, color arguments) are now
  interpreted as their Unicode equivalents instead of passing through as raw
  LaTeX commands.

## 0.55.5 _2026-03-06_

### Resolved Issues

- **Deep-zoom fractal precision** — emulated-double (dp) and perturbation (pt)
  shaders now compute per-pixel coordinates from `v_uv` and viewport uniforms
  instead of the shader template's single-precision `mix()`, which lost
  distinguishability at high zoom levels.
- **Perturbation theory: absolute vs delta coordinates** — the perturbation
  Mandelbrot/Julia handlers were passing absolute single-precision coordinates
  to the shader instead of the small delta from the reference center. Fixed by
  introducing `_pt_delta()` which computes the per-pixel offset from viewport
  uniforms.
- **`compile()` free function dropped `hints`** — the `hints` option (viewport
  center/radius) was accepted but silently not forwarded to the language target.
  Fixed in `compile-expression.ts`.

### New Features

- **`BigDecimal` export** — the arbitrary-precision decimal class is now
  exported from the public API for use by plot engines and other consumers that
  need precision beyond float64.
- **`HighPrecisionCoord` type** — new union type
  (`number | string | { hi: number; lo: number }`) for passing
  extended-precision viewport coordinates through the compile API. The
  `viewport.center` option now accepts this type instead of plain
  `[number, number]`.

## 0.55.4 _2026-03-06_

### Resolved Issues

- **[#254](https://github.com/cortex-js/compute-engine/issues/254) LaTeX
  parsing: interval notation with `\lbrack`/`\lparen`** — parsing `\lbrack5,7)`
  or `\left\lbrack5,7\right)` now correctly produces an `Interval` expression.
  Previously, when the open delimiter was a LaTeX command (e.g., `\lbrack`), the
  parser incorrectly required the close delimiter to also be a LaTeX command
  (e.g., `\rparen` instead of `)`), causing mismatched-delimiter intervals to
  fail.
- **LaTeX parsing: invalid symbols in `\mathrm{}` and related prefixes** —
  invalid content inside `\mathrm{}`, `\operatorname{}`, etc. (e.g.,
  `\mathrm{=}` or `\mathrm{DavidBowie👨🏻‍🎤}`) now produces the correct
  `invalid-symbol` error instead of cascading parse errors. Also fixed
  `matchPrefixedSymbol` leaking parser state on failure, and emoji sequences are
  now properly recognized inside symbol prefixes (e.g.,
  `\operatorname{😎🤏😳🕶🤏}`).

### New Features

- **High-precision Mandelbrot/Julia compilation** — the GPU compilation targets
  (GLSL, WGSL) now support three precision tiers for fractal rendering, selected
  automatically based on viewport hints:
  - **Single float** (zoom < 10^6x): existing implementation, no overhead
  - **Emulated double** (zoom 10^6x–10^14x): double-single (float-float)
    arithmetic using Dekker/Knuth algorithms, ~48-bit mantissa from two 32-bit
    floats
  - **Perturbation theory** (zoom > 10^14x): reference orbit computed on CPU at
    arbitrary precision via `BigDecimal`, GPU iterates only the small delta from
    the reference, with glitch detection and single-float rebase fallback
- **Viewport-aware compile API** — `compile()` accepts optional
  `hints: { viewport: { center, radius } }`. The compiler auto-selects the
  precision strategy and returns `staleWhen` thresholds for cheap staleness
  checking by the plot engine.
- **`CompilationResult` extensions** — new optional fields: `staleWhen` (plain
  data staleness predicate), `uniforms` (scalar shader uniforms), `textures`
  (typed texture data with format/dimensions for GPU upload).

## 0.55.3 _2026-03-05_

### Improved

- **Compilation: constant folding** — `Add`, `Multiply`, `Subtract`, `Negate`,
  `Divide`, `Power`, `Sqrt`, and `Root` handlers now fold numeric literals at
  compile time and eliminate identity values.
  - `x + yi` compiles to `vec2(x, y)` instead of
    `vec2(x, 0.0) + (y * vec2(0.0, 1.0))`
  - `2 + 3` → `5.0`, `x + 0` → `x`, `x * 1` → `x`, `x * 0` → `0.0`
  - `Power(x, 2)` → `(x * x)` for simple operands, `pow(f(x), 2.0)` for complex
    expressions to avoid duplicate computation
  - `Power(x, 0.5)` → `sqrt(x)`, `Power(x, 0)` → `1.0`, `Power(x, -1)` →
    `(1.0 / x)`
  - `Sqrt(4)` → `2.0`, `Root(x, 2)` → `sqrt(x)`
- **`isComplexValued`** uses expression type system instead of hard-coded
  operator list.
- **Integer arguments** in GPU fractal functions emit as `200` instead of
  `int(200.0)`.
- **Type-based optimizations** — compilation handlers now use expression type
  information for better code generation:
  - `Floor`/`Ceil`/`Round`/`Truncate` are no-ops when the operand is
    integer-typed
  - `Abs` is a no-op when the operand is provably non-negative
  - `Power(x, 2)` only expands to `(x * x)` for simple operands (symbols,
    literals) — function calls like `Power(Sin(x), 2)` use `pow`/`Math.pow` to
    avoid duplicate evaluation
  - Integer `Mod` with non-negative dividend uses plain `%` instead of the
    Euclidean double-mod formula
  - GPU variable declarations infer `i32`/`int` type for integer-typed locals

### Resolved Issues

- **`Abs` signature**: return type is now `real` instead of propagating the
  input type (which incorrectly returned `complex` for complex inputs).
- **Compilation fallback**: uses `pushScope`/`assign` pattern instead of
  crashing when receiving a vars object.

### New Features

- **`Mandelbrot` and `Julia`** operators in JavaScript and GPU compilation
  targets.

## 0.55.2 _2026-03-04_

### Resolved Issues

- **`\text{}` flush bug**: `\text{a$x$b}` now correctly produces
  `["Text", "'a'", "x", "'b'"]`. Previously the text before and after inline
  math were merged due to a missing `flush()` call in `parseTextRun`.
- **`#` / `*` parsed as valid symbols**: Bare `#` and `*` tokens were
  incorrectly accepted as valid symbol names because they match the Unicode
  `Emoji` property (keycap base characters). They now produce `unexpected-token`
  errors as expected. The fix excludes ASCII characters from the emoji regex in
  symbol validation.
- **`Text` operator type**: The `Text` operator now has return type `string`
  instead of `expression`.
- **`\textcolor` inside `\text{}`**: `\textcolor{red}{RED}` inside `\text{}` now
  correctly parses the body as text (`'RED'`) instead of switching to math mode
  and treating each letter as a separate symbol.
- **`parseSyntaxError` token consumption**: Non-command tokens (like `#`, `&`)
  are now consumed when producing errors, preventing potential parser loops.
- **`parseSymbolToken` hardening**: Raw tokens are pre-validated against
  `\p{XIDC}` before being consumed as symbols, providing defense-in-depth
  against future `isValidSymbol` regressions.

### New Features

- **Text promotion**: When `InvisibleOperator` canonicalization encounters a
  `Text` expression or a string operand, it now absorbs all operands into a
  single `Text` expression. For example, `a\text{ in $x$ }b` canonicalizes to
  `["Text", "a", " in ", "x", " ", "b"]` instead of producing a `Tuple`.
- **Text infix keywords**: `\text{and}`, `\text{or}`, `\text{iff}`, and
  `\text{if and only if}` are now recognized as infix operators that produce
  `And`, `Or`, and `Equivalent` expressions respectively, following the existing
  `\text{where}` pattern.
- **Additional text keywords**: `\text{such that}` (maps to `Colon`),
  `\text{for all}` (maps to `ForAll`), and `\text{there exists}` (maps to
  `Exists`) are now recognized as operators.
- **`Text` serializer**: `Text` expressions now round-trip back to proper
  `\text{...}` LaTeX with inline `$...$` for math sub-expressions, instead of
  falling through to the default `\mathrm{Text}(...)` output.
- **`Text` evaluate handler**: Evaluating a `Text` expression now concatenates
  all operands into a single string.

## 0.55.1 _2026-03-04_

### Resolved Issues

- After `parse('f(x):=\\sin(x)')`, the symbol `f` is now immediately recognized
  as having type `function`. Previously its type remained `unknown` until the
  `Assign` expression was explicitly evaluated.
- `2f(x)` and `2f \left(x\right)` now both correctly parse as
  `["Multiply", 2, ["f", "x"]]` when `f` is a known function symbol. Previously,
  a space before `\left` caused the parser to produce a `Tuple` instead of
  `Multiply`, and expressions whose return type was `any` (e.g., calls to
  generically-typed functions) were also misclassified as `Tuple`.
- Expressions involving operators that return `expression` type (such as `D`,
  `Simplify`, `Annotated`) are now correctly treated as multiplicable in
  juxtaposition contexts. For example, `2f'(x)` now produces
  `["Multiply", 2, ["D", ...]]` instead of `Tuple`.
- The `D` (derivative) operator now returns a numeric type when its body is
  numeric, instead of always returning the generic `expression` type.
- Undeclared symbols followed by parenthesized multi-argument expressions (e.g.,
  `2g(x,y)`) are now auto-declared as functions in all invisible operator paths,
  not just the two-operand path.

## 0.55.0 _2026-03-04_

### Breaking Changes

- `ce.box()`/`box()` renamed to `ce.expr()`/`expr()` (`ce.box()` remains as a
  deprecated wrapper).
- Removed `ce.latexDictionary` getter/setter; configure dictionaries through
  `new LatexSyntax({ dictionary: [...] })`.
- Removed `ComputeEngine.getLatexDictionary()`; import dictionary constants from
  package exports.
- Removed deprecated type guard aliases: `isBoxedExpression`, `isBoxedNumber`,
  `isBoxedSymbol`, `isBoxedFunction`, `isBoxedString`, `isBoxedTensor` (use
  `isExpression`, `isNumber`, `isSymbol`, `isFunction`, `isString`, `isTensor`).
- Removed `LibraryDefinition.latexDictionary`; LaTeX dictionaries now live in
  the `latex-syntax` module.

### Resolved Issues

- **#295** The `parse()` free function now accepts the form options object, so
  `parse("\\frac{10}{2}", { form: "raw" })` return `["Divide", "10", "2"]`.
- Undeclared symbols followed by parenthesized numeric expressions are now
  interpreted as multiplication, not implicit function calls (for example,
  `q(2q)` -> `2q^2`). Function-call behavior remains for explicitly declared
  function symbols and non-numeric argument forms.

### New Features

- Modular package exports for smaller bundles: `@cortex-js/compute-engine/core`,
  `@cortex-js/compute-engine/compile`, `@cortex-js/compute-engine/latex-syntax`,
  `@cortex-js/compute-engine/numerics`, and `@cortex-js/compute-engine/interval`
  (with existing sub-paths still available, including `math-json`).
- New standalone `LatexSyntax` API (class + `parse()`/`serialize()` helpers) for
  LaTeX ↔ MathJSON without a `ComputeEngine` instance.
- New `ILatexSyntax` interface exposed via `IComputeEngine.latexSyntax` to allow
  custom LaTeX parser/serializer implementations.
- All 16 LaTeX domain dictionaries are now exported individually, plus the
  combined `LATEX_DICTIONARY`.
- `Parser` type is now exported from the main package for typed custom
  `LatexDictionaryEntry` parse handlers.

### Changed

- `ComputeEngine` now accepts an injectable `latexSyntax` dependency.
  - Full package imports still auto-create a LaTeX syntax instance.
  - Core-only imports do not bundle LaTeX support; `parse()`, `.latex`, and
    `toLatex()` require an injected `LatexSyntax`.
  - MathJSON serialization omits optional LaTeX metadata when no LaTeX syntax is
    present.
- `decimal.js` has been replaced with a native `bigint`-backed `BigDecimal`
  implementation, reducing dependency surface and bundle size.
- `BigDecimal` `add()`, `sub()`, and `mul()` are now exact; rounding is limited
  to operations that require it (`div()`, non-integer `pow()`, transcendentals).
- Numeric string/LaTeX serialization now respects precision settings:
  `.latex`/`.toString()` round to `ce.precision`, while `.json`/`toJSON()`
  remain lossless.
- High-precision special functions (`bigGamma`, `bigGammaln`, `bigDigamma`,
  `bigTrigamma`, `bigPolygamma`, `bigZeta`) now scale with
  `BigDecimal.precision`; integer Gamma values are exact.

## 0.54.0 _2026-02-26_

- **New `expr.polynomialCoefficients()` method**: Returns the coefficients of a
  polynomial expression in descending order of degree, or `undefined` if the
  expression is not a polynomial. Auto-detects the variable when the expression
  has exactly one unknown. Subsumes `isPolynomial` (check `!== undefined`) and
  degree computation (`length - 1`).

- **`polynomialCoefficients()` now accepts an array of variables**: Pass
  `['x', 'y']` to verify the expression is polynomial in all listed variables.
  Coefficients are decomposed by the first variable.

- **New `expr.polynomialRoots()` method**: Returns the roots of a polynomial
  expression, or `undefined` if not a polynomial. Handles degree 3+ polynomials
  with rational roots via the Rational Root Theorem.

- **New `Polynomial` CAS function**: Constructs a polynomial from a coefficient
  list (descending order) and a variable. Inverse of `CoefficientList`:
  `Polynomial([1, 0, 2, 1], x)` evaluates to `x³ + 2x + 1`.

- **Improved `Factor` for degree 3+ polynomials**: `Factor` now uses the
  Rational Root Theorem to factor polynomials with integer coefficients and
  rational roots. Previously only handled degree ≤ 2.

- **Improved `Factor` with content extraction**: `Factor` now extracts the GCD
  of integer coefficients before applying other strategies. For example,
  `Factor(6x² + 12x + 6, x)` now produces `6(x+1)²`.

- **New `PartialFraction` CAS function**: Decomposes rational expressions into
  partial fractions. Supports distinct and repeated linear factors, irreducible
  quadratic factors, and improper fractions (polynomial division performed
  first). Example: `PartialFraction(1/((x+1)(x+2)), x)` → `1/(x+1) - 1/(x+2)`.

- **New `Apart` CAS function**: Alias for `PartialFraction`.

- **New `PolynomialRoots` CAS function**: Returns the roots of a polynomial as a
  set. Example: `PolynomialRoots(x² - 5x + 6, x)` → `{2, 3}`.

- **New `Discriminant` CAS function**: Returns the discriminant of a polynomial
  of degree 2, 3, or 4. Supports symbolic coefficients. Example:
  `Discriminant(x² - 5x + 6, x)` → `1`.

- **`simplify()` auto-decomposes partial fractions**: When a `Divide` expression
  has a denominator already in factored form (product or power) and the
  decomposition is simpler, `simplify()` automatically applies partial fraction
  decomposition.

- **Breaking: `CoefficientList` now returns descending order**: The CAS function
  `CoefficientList` now returns coefficients from highest to lowest degree
  (e.g., `[1, 0, 2, 1]` for `x^3 + 2x + 1`), matching the new
  `polynomialCoefficients()` method and common external conventions. Previously
  it returned ascending order.

- **`expr.match()` now accepts string patterns with auto-wildcarding**: Pass a
  LaTeX string like `'ax^2+bx+c'` and single-character symbols are automatically
  treated as wildcards. Results use clean unprefixed keys (`{a: 3, b: 2, c: 5}`)
  with self-matches filtered out. `useVariations` and `matchMissingTerms`
  default to `true` for string patterns.

- **`expr.match()` now accepts MathJSON arrays directly**: Pass a raw MathJSON
  pattern like `['Add', '_a', '_b']` without calling `ce.box()` first.

- **New `matchMissingTerms` option for `match()`**: When enabled, expressions
  with fewer operands than the pattern can still match by treating missing terms
  as identity elements (0 for `Add`, 1 for `Multiply`). For example, `3x^2+5`
  matches the pattern `ax^2+bx+c` with `b = 0`. Enabled by default for string
  patterns.

- **Non-strict parsing: implicit superscript for letter+digit**: In non-strict
  mode, a single letter immediately followed by a digit 2–9 is parsed as an
  exponent: `x2 + y2` → `x^2 + y^2`. Handles common copy-paste from web pages.
  Only digits 2–9, only single ASCII letters, and only when adjacent (no space).

## 0.53.1 _2026-02-25_

- **`timeLimit` now reliably interrupts long-running evaluations**: `Factorial`,
  `Sum`, `Product`, `Loop`, and `Reduce` all respect the `timeLimit` property
  and throw `CancellationError` when the deadline is exceeded. Previously,
  generators yielded too infrequently (every 1,000–50,000 iterations), allowing
  a single `gen.next()` call to block for longer than the timeout. All
  generators now yield every iteration. The `Factorial` handler no longer
  silently swallows `CancellationError`, and `withDeadline`/`withDeadlineAsync`
  now use `try/finally` to always reset the engine deadline.

- **Fixed GPU compilation of `Sum`, `Product`, `Loop`, and `Function`**: These
  constructs no longer leak JavaScript-specific syntax (IIFEs, `let`, `while`,
  arrow functions, `{ re, im }` objects) into GLSL/WGSL output. `Sum`/`Product`
  with small constant bounds are unrolled inline; larger ranges emit native
  `for` loops. `Loop` emits a GPU `for` loop with `int`/`i32` index. `Function`
  (lambda) now throws a clear error for GPU targets. Block-level `Declare`
  statements infer `vec2`/`vec2f` type from subsequent complex-valued
  assignments.

- **Added GLSL/WGSL compilation for `Heaviside`, `Sinc`, `FresnelC`, `FresnelS`,
  `BesselJ`**: These five special functions now compile to GPU shader targets.
  `FresnelC`/`FresnelS` use a three-region rational Chebyshev approximation
  (ported from Cephes/scipy) with a shared `_gpu_polevl` helper. `BesselJ` uses
  power series, Hankel asymptotic, and Miller's backward recurrence depending on
  the argument range. Both GLSL and WGSL preambles are emitted on demand.

- **Fixed GLSL/WGSL block expression compilation**: Block expressions (produced
  by `\coloneq` / semicolon blocks) now emit valid GPU shader code instead of
  JavaScript syntax. Variable declarations use `float x` (GLSL) or `var x: f32`
  (WGSL) instead of `let x`, and blocks are emitted as plain statements instead
  of JavaScript IIFEs. `compileFunction` correctly formats multi-statement
  bodies.

- **Fixed `\;` in `\text{where}` clauses**: Visual spacing commands like `\;`,
  `\,`, `\quad`, etc. between comma-separated bindings in where-clauses are now
  correctly skipped instead of being parsed as `HorizontalSpacing` expressions
  wrapped in `InvisibleOperator`.

- **Fixed `require()` returning empty exports on Node 22+** (#292): Because the
  package sets `"type": "module"`, Node treated the UMD `.js` files as ESM,
  breaking the UMD factory pattern. The UMD builds now use a `.cjs` extension so
  Node always treats them as CommonJS.

## 0.53.0 _2026-02-21_

### Runtime and Scoping

- **True lexical scoping for `Function` expressions**: Functions now capture
  their defining scope and resolve free variables from that scope chain (not the
  call site), with a fresh child scope on each call.

- **BigOp scope pollution fixed**: `Sum`, `Product`, and other big operators now
  only declare their index variable locally. Other names are declared in the
  enclosing scope via `noAutoDeclare`.

- **Closure capture for nested functions**: Returned functions now correctly
  capture outer parameters across multiple nesting levels.

- **`EvalContext.values` removed**: Symbol values now live only in
  `BoxedValueDefinition.value`. The per-frame shadow map and `withArguments`
  option were removed.

- **`forget()` now resets values set by `assume()`**: `forget('x')` now clears
  values introduced by `assume('x = ...')` (value reset to `undefined`), in
  addition to clearing assumptions.

### Expressions and Equality

- **`expand()` now returns the input expression instead of `null`**: Both the
  free function and internal `expand()`/`expandAll()` now return the original
  expression when no expansion is possible.

- **New `.toRational()` method**: Returns `[numerator, denominator]` integers
  for rational expressions, or `null` otherwise.

- **New `.factors()` method**: Returns multiplicative factors as a flat array by
  decomposing `Multiply` and `Negate` structurally.

- **`.is()` now tries expansion**: After structural comparison, `.is()` expands
  both sides before numeric fallback, catching forms like `(x+1)^2` and
  `x^2+2x+1`.

- **`.is()` is now symmetric**: `a.is(b) === b.is(a)` now holds across all
  expression types.

### LaTeX Parsing

- **Parse `\mleft`/`\mright` delimiters**: Alternative delimiters from the
  `mleftright` package are now treated like `\left`/`\right`.

- **Parse `\color` in math mode**: `\color{...}` is now recognized in math mode;
  the color argument is consumed so the following math parses normally.

- **Parse `:` and `\colon` as infix operators**: Outside quantifier contexts, a
  bare `:`/`\colon` now parses as `Colon` (e.g. `f:[a,b]\to\R`), without
  affecting `:=` assignment or quantifier syntax.

- **Parse `\dfrac`, `\tfrac`, and `\cfrac` as fractions**: These variants now
  parse the same as `\frac`.

### Fractals

- **New `Mandelbrot` and `Julia` functions**: Added built-in escape-time fractal
  operators. `Mandelbrot(c, maxIter)` and `Julia(z, c, maxIter)` return a
  smooth, normalized value in `[0, 1]` (`1` for interior points, fractional for
  escaping points via `log₂(log₂(|z|²))` smoothing). Both evaluate in JavaScript
  and compile to GLSL/WGSL.

## 0.52.1 _2026-02-19_

### Expressions

- **Exact number literal check**: Use `isNumber(expr) && expr.isExact` to test
  for exact numeric literals.

- **`raw` form preserves subtraction**: `x-1` now parses as
  `["Subtract", "x", "1"]` (instead of `["Add", "x", -1]`) when using raw form.

### Parsing and Blocks

- **Fix `;\;` parsing in semicolon blocks**: Spacing commands after semicolons
  (`\;`, `\,`, `\quad`, etc.) no longer create spurious `Nothing` operands.

- **Fix `\text{if}` parsing with `\;` spacing**:
  `\text{if}\;...\;\text{then}\;...\;\text{else}\;...` now parses correctly as
  `If`.

- **Block serializer now uses `; `**: Serialization emits `; ` (not `;\; `) to
  avoid reintroducing spacing-related parse issues on round-trip.

- **Block compiler filters `Nothing` operands**: The Block compiler now removes
  `Nothing` symbols and empty compile results before generating code.

- **Subscripted variable names in blocks**: Names like `r_1` are treated as
  compound symbols (not `Subscript`) when the base is not a known collection.

- **Non-strict parser supports exponents on bare functions**: In `strict: false`
  mode, forms like `sin^2(x)` and `cos^{10}(x)` now parse correctly as powers.

- **Unicode superscript/subscript digits supported**: Superscript and subscript
  Unicode digits now normalize to `^{...}` / `_{...}` in parsing.

### Compilation

- **Selective GLSL interval preamble**: `interval-glsl` now emits only used
  helper functions (plus dependencies), typically reducing preamble size by
  60-80%.

- **Selective WGSL interval preamble**: `interval-wgsl` now applies the same
  used-only preamble strategy.

- **Fix recursive GLSL gamma helper**: Replaced recursive `_gpu_gamma()`
  reflection logic (illegal in GLSL) with a non-recursive implementation.

### Equality

- **`.is()` now works with assigned variables**: Numeric fallback now applies to
  expressions with no free variables, including variables with assigned values.

- **`.is()` now accepts an optional `tolerance`**: A per-call tolerance can
  override `engine.tolerance` for numeric comparison.

## 0.52.0 _2026-02-18_

### New Features

- **Smart `.is()` / exact `.isSame()` separation**: The `.is()` and `.isSame()`
  methods on expressions now have distinct roles:
  - **`.isSame(v)`** — Fast exact structural check. No evaluation, no tolerance.
    Now accepts primitives (`number`, `bigint`, `boolean`, `string`) in addition
    to `Expression`. This is the method used internally throughout the engine.

  - **`.is(v)`** — Smart check with numeric evaluation fallback. Tries
    `.isSame()` first; if that fails and the expression is constant (no free
    variables), evaluates numerically and compares within `engine.tolerance`.
    For literal numbers, behaves identically to `.isSame()` — tolerance only
    applies to expressions that require evaluation.

  This resolves a common pain point where `ce.parse('\\cos(\\pi/2)').is(0)`
  returned `false` because `.is()` was purely structural. Now it returns `true`:

  ```ts
  ce.parse('\\sin(\\pi)').is(0);            // true  (evaluates, within tolerance)
  ce.parse('\\cos(\\frac{\\pi}{2})').is(0); // true
  ce.number(1e-17).is(0);                   // false (literal number, no tolerance)
  ce.parse('x + 1').is(1);                  // false (not constant, no fallback)
  ```

- **`numericValue()` convenience helper**: New standalone function that combines
  the `isNumber()` guard with `.numericValue` access. Returns the numeric value
  if the expression is a number literal, or `undefined` otherwise. Useful for
  safely extracting numeric values without verbose ternary patterns:

  ```ts
  import { numericValue } from '@cortex-js/compute-engine';

  // Before
  const val = isNumber(expr) ? expr.numericValue : undefined;

  // After
  const val = numericValue(expr);
  ```

- **Stochastic equality check for expressions with unknowns**: `expr.isEqual()`
  now uses a stochastic fallback when symbolic methods (expand + simplify) can't
  prove equality. Both expressions are evaluated at 50 sample points (9
  well-known values + 41 random) and compared with relative+absolute tolerance.
  This detects equivalences like `sin²(x) + cos²(x) = 1`, `(x+y)² = x²+2xy+y²`,
  and `sin(2x) = 2sin(x)cos(x)` that were previously returned as `undefined`.
  Singularities (NaN at a sample point) are skipped rather than treated as
  disagreements. The check also works when the two expressions have different
  unknowns (e.g. `x - x + y` vs `y`).

- **`expr.freeVariables` property**: New property on `BoxedExpression` that
  returns the free variables of an expression — symbols that are not constants,
  not operators, not bound to a value, and not locally scoped by constructs like
  `Sum` or `Product`. Semantically identical to `expr.unknowns`.

- **New interval-js compilation functions**: Added `Binomial`, `GCD`, `LCM`,
  `Chop`, `Erf`, `Erfc`, `Exp2`, `Arctan2`, and `Hypot` to the interval-js
  compilation target, with corresponding interval arithmetic implementations.

- **GLSL/WGSL variable exponent support**: The interval GLSL and WGSL targets
  now support `Power` with variable exponents (e.g. `(-1)^k`, `x^n`). Previously
  these threw at compile time. Added `ia_pow_interval()` to both GPU library
  preambles using four-corner `exp(exp * ln(base))` evaluation with special
  cases for point-integer exponents and `(-1)^n`.

- **`Factorial`, `Gamma`, `GammaLn` for GLSL/WGSL interval targets**: Added
  `ia_factorial` (via `ia_gamma(x+1)`) to both GPU targets. Added `ia_gamma`
  (Lanczos approximation) and `ia_gammaln` (Stirling asymptotic) to the WGSL
  target, matching existing GLSL implementations.

### Resolved Issues

- **`parse()` with `form: 'structural'` ignored the structural flag**: The
  `structural` option from `formToInternal()` was dropped in
  `parseLatexEntrypoint()`, making `ce.parse(s, { form: 'structural' })` behave
  identically to `{ form: 'raw' }` (unbound, unsorted). Now correctly produces a
  bound, structural expression.

- **Partial canonicalization with `'Flatten'` form folded numerics**: Using
  `ce.parse(s, { form: ['Flatten', 'Order'] })` unexpectedly evaluated numeric
  operands (e.g. `3×2+1` became `7`) because `flattenForm()` used
  `ce.function()` which defaults to full canonical mode. Now uses `ce._fn()` to
  preserve operand structure. This enables structural comparison of expressions
  modulo commutativity and associativity without numeric evaluation — useful for
  checking the _method_ used to solve a problem rather than just the numeric
  result:

  ```ts
  const a = ce.parse('3\\times2+1', { form: ['Flatten', 'Order'] });
  const b = ce.parse('1+2\\times3', { form: ['Flatten', 'Order'] });
  a.isSame(b);  // ➔ true  (same structure, different order)

  const c = ce.parse('7', { form: ['Flatten', 'Order'] });
  a.isSame(c);  // ➔ false (different structure)
  ```

- **Sum/Product with symbolic bounds compiled incorrectly**: Expressions like
  `\sum_{k=0}^{n} f(k, x)` where the upper bound is a variable produced loops
  that iterated 10001 times instead of using the variable `n`. The compilation
  extracted bounds via `normalizeIndexingSet()` which converted symbolic bounds
  to `NaN` and fell back to a hardcoded limit. Now bounds are extracted as
  expressions and compiled to code (e.g. `Math.floor(_.n)` for JS,
  `Math.floor((_.n).hi)` for interval-js). This fixes Taylor series patterns
  like `\sum_{k=0}^{n} \frac{(-1)^k x^{2k+1}}{(2k+1)!}` for both JS and
  interval-js targets.

- **Interval `(-1)^k` returned `empty` instead of correct value**: The
  `powInterval()` function required positive bases for variable exponents,
  causing `(-1)^k` patterns in summations (e.g. Taylor series) to fail at
  runtime. Now correctly delegates to `intPow()` when the exponent is a point
  interval with an integer value, preserving even/odd parity. Also handles the
  case where base is `-1` and the exponent spans multiple integers by returning
  the conservative interval `[-1, 1]`.

- **`Factorial` missing from interval-js compilation target**: Expressions
  containing `n!` (e.g. `\frac{(-1)^k x^{2k+1}}{(2k+1)!}`) failed interval-js
  compilation with `success: false`. Added `Factorial` and `Factorial2` interval
  functions and compilation handlers.

- **`expr.unknowns` included bound variables**: Scoped constructs like `Sum`,
  `Product`, `Integrate`, and `Block` bind index variables in a local scope, but
  `expr.unknowns` was reporting them as free unknowns. For example,
  `\sum_{k=0}^{10} k \cdot x` returned `["k", "x"]` instead of `["x"]`. Now
  correctly excludes locally bound variables from the result.

- **Symbolic upper bounds missing from `expr.unknowns`**: In expressions like
  `\sum_{k=0}^{M} k \cdot x`, the symbolic upper bound `M` was incorrectly
  excluded from `unknowns` because the scope's bindings map captured all symbols
  referenced during canonicalization. Now extracts bound variables structurally
  from `Limits`/`Element`/`Assign`/`Declare` expressions, so only true bound
  variables are excluded. This also fixes `Block` expressions where locally
  assigned variables (via `Assign` or `Declare`) were reported as unknowns.

- **`Integrate` with symbolic bounds compiled incorrectly**: Same issue as
  Sum/Product — `compileIntegrate()` used `normalizeIndexingSet()` which
  converted symbolic bounds to `NaN`. Now uses `extractLimits()` and compiles
  bounds as expressions.

- **Interval `piecewise` test fix**: Fixed test that incorrectly accessed
  `result.lo` directly instead of unwrapping the `IntervalResult` envelope
  (`result.value.lo`). The `piecewise()` function correctly returns
  `IntervalResult` objects.

## 0.51.1 _2026-02-15_

### Features

- **#172 Degrees-Minutes-Seconds (DMS) notation**: Parse and serialize
  geographic angle notation such as `9°30'15"`. The LaTeX parser now recognizes
  arc-minute (`'`, `\prime`) and arc-second (`"`, `\doubleprime`) symbols when
  they follow a degree symbol, producing
  `Add(Quantity(…, deg), Quantity(…, arcmin), …)` expressions that evaluate and
  simplify through the existing unit system. Negative angles (e.g. `-45°30'`)
  are fully supported for latitude/longitude coordinates.
- **`dmsFormat` serialization option**: Set `dmsFormat: true` in
  `SerializeLatexOptions` to serialize angle quantities as DMS notation (e.g.
  `Quantity(9.5, deg)` → `9°30'`).
- **`angleNormalization` serialization option**: Normalize angles during
  serialization with `'0...360'` (useful for bearings) or `'-180...180'` (useful
  for longitude). Default is `'none'`.
- **`realOnly` compilation option**: Pass `{ realOnly: true }` to `compile()` to
  automatically convert complex `{ re, im }` results to real numbers — returns
  `re` when `im === 0`, `NaN` otherwise. Useful for plotting and other contexts
  that only need real-valued output.
- **`Sinc` function**: Unnormalized cardinal sine `sinc(x) = sin(x)/x` with
  `sinc(0) = 1`. Includes LaTeX parsing via `\operatorname{sinc}`, JavaScript
  and interval-arithmetic compilation targets.
- **Fresnel integrals (`FresnelS`, `FresnelC`)**: Numeric evaluation using
  Cephes rational Chebyshev approximation, LaTeX parsing via
  `\operatorname{FresnelS}` / `\operatorname{FresnelC}`, JavaScript and
  interval-arithmetic compilation targets.
- **`Heaviside` step function**: `H(x) = 0` for `x < 0`, `1/2` for `x = 0`, `1`
  for `x > 0`. LaTeX parsing via `\operatorname{Heaviside}`, JavaScript and
  interval-arithmetic compilation with singularity detection at zero.

### LaTeX Syntax

- **`Which` compilation**: `\begin{cases}` expressions now compile to JavaScript
  and interval-js targets as chained ternary operators with `NaN` fallback when
  no condition matches.
- **`Sum`/`Product` compilation**: `\sum_{k=a}^{b}` and `\prod_{k=a}^{b}`
  expressions with numeric bounds now compile to JavaScript loops with
  accumulator variables, including complex number support.
- **`Loop` compilation**: `Loop`, `Break`, `Continue`, and `Return` operators
  compile to JavaScript `for` loops wrapped in IIFEs with standard control flow
  keywords.
- **Inline `If` syntax**: Parse `\text{if } C \text{ then } A \text{ else } B`
  (or `\operatorname{if}`) to `["If", C, A, B]` expressions.
- **`where` syntax**: Parse `E \text{ where } x \coloneq V` to `Block`
  expressions with implicit variable declarations.
- **Semicolon block syntax**: Semicolons (`;`, `\;`) act as statement
  separators, building `Block` expressions with auto-declared variables when
  assignments are present.
- **`for` loop syntax**: Parse
  `\text{for } i \text{ from } a \text{ to } b \text{ do } body` to
  `["Loop", body, ["Element", "i", ["Range", a, b]]]`.

### Resolved Issues

- **Interval-JS compilation for Gamma functions**: Added missing `gamma` and
  `gammaln` exports and implementations in the interval-arithmetic library.
- **Interval-JS graceful fallback**: The `interval-js` target no longer throws
  when encountering unsupported functions. Unsupported operators now produce
  `{ success: false }` at compile time, and runtime errors return
  `{ kind: "entire" }` instead of propagating.
- **`CompilationResult.run` type signature**: The TypeScript type for `run` now
  correctly reflects the actual calling convention (`(...args: unknown[])`)
  instead of the previous misleading `(...args: (number | {re, im})[])`.
- **`Loop` compilation for interval-js target**: Loop counter now uses raw
  numbers (not `_IA.point()`) for the `for` statement, with loop index
  references properly wrapped in the body. Conditions in `if`/`break`/
  `continue` statements inside loops use scalar comparisons instead of interval
  comparison functions.

### Other Changes

- Updated color palettes
- Deduplicated runtime helper object (`SYS_HELPERS`) shared between
  `ComputeEngineFunction` and `ComputeEngineFunctionLiteral` in compilation
  target
- Centralized `sinc` implementation in `numerics/special-functions.ts` (shared
  by library evaluation and JS compilation runtime)
- Removed dead `args === null` checks in compilation base class

## 0.51.0 _2026-02-14_

### Colors

- **New `colors` library**: Four MathJSON operators for color manipulation and
  color space conversion, available as the `"colors"` library category.
- **`Color`**: Parse a color string (hex 3/6/8-digit, `rgb()`, `hsl()`, named
  CSS color, `transparent`) into a canonical sRGB `Tuple` with components
  normalized to 0-1. Alpha is included as a fourth component when not equal
  to 1.
- **`Colormap`**: Sample named visualization palettes. Three variants: no second
  argument returns the full palette as a `List`; integer _n_ >= 2 resamples to
  _n_ evenly spaced colors; real _t_ in [0, 1] interpolates at position _t_
  using OKLCh color space with shorter-arc hue interpolation. Includes 8
  sequential palettes (viridis, inferno, magma, plasma, cividis, turbo, rocket,
  mako), 6 categorical palettes (graph6, spectrum6, spectrum12, tableau10,
  tycho11, kelly22), and 12 diverging palettes (roma, vik, broc, rdbu, coolwarm,
  ocean-balance, plus reversed variants).
- **`ColorToColorspace`**: Convert an sRGB color (string or `Tuple`) to
  components in `"rgb"`, `"hsl"`, `"oklch"`, or `"oklab"` (alias `"lab"`).
  Preserves alpha when present.
- **`ColorFromColorspace`**: Convert color space components back to a canonical
  sRGB `Tuple`. Accepts the same color space names as `ColorToColorspace`.
- **`ColorToString`**: Convert a color (string or sRGB `Tuple`) to a formatted
  string. Supports optional format argument: `"hex"` (default), `"rgb"`,
  `"hsl"`, or `"oklch"` for CSS-style output. Alpha is included when not equal
  to 1.
- **`ColorMix`**: Blend two colors in OKLCh space with an optional ratio
  (default 0.5). Accepts color strings or sRGB `Tuple` values. Interpolates
  lightness and chroma linearly, hue with shorter-arc interpolation.
- **`ColorContrast`**: Compute the APCA contrast ratio between a background and
  foreground color. Returns a positive value for dark-on-light and negative for
  light-on-dark.
- **`ContrastingColor`**: Choose the foreground color with better APCA contrast
  against a background. With one argument, picks between white and black. With
  three arguments, picks the better of two foreground candidates.
- **LaTeX color support**: `\textcolor{color}{body}`, `\colorbox{color}{body}`,
  and `\boxed{body}` now roundtrip through `Annotated` expressions. Parsing and
  serialization are handled in the core `Annotated` infrastructure.
- **LaTeX font annotations**: `\textbf`, `\textit`, `\texttt`, `\textsf`,
  `\textup` now serialize correctly from `Annotated` expressions via
  `fontWeight`, `fontStyle`, and `fontFamily` dict keys.
- **JavaScript compilation**: All color operators (`Color`, `ColorToString`,
  `ColorMix`, `ColorContrast`, `ContrastingColor`, `ColorToColorspace`,
  `ColorFromColorspace`, `Colormap`) now compile to JavaScript.
- **`oklab()` CSS parsing**: `parseColor()` now accepts `oklab(L a b)` and
  `oklab(L a b / alpha)` syntax, matching the existing `oklch()` support.
- **GPU compilation**: `ColorMix`, `ColorContrast`, `ContrastingColor`,
  `ColorToColorspace`, and `ColorFromColorspace` now compile to GLSL and WGSL.
  Preamble functions provide sRGB ↔ OKLab ↔ OKLCh conversion, color mixing with
  shorter-arc hue interpolation, and APCA contrast on the GPU.
- Added `rgbToHsl()` conversion function. Exported `hslToRgb()` (previously
  private).

### Resolved Issues

- **(#290) Derivatives of user-defined functions**: `\frac{d}{dx} f` and `f'(x)`
  now correctly evaluate when `f` is a user-defined function (e.g.,
  `f(x) := 2x`). Previously `\frac{d}{dx} f` returned `0` and `f'(x)` returned a
  symbolic `Apply(Derivative(...))`.
- **Cleaner `D` canonical form**: `f'(x)` now canonicalizes to
  `["D", ["f", "x"], "x"]` instead of the verbose
  `["D", ["Function", ["Block", ["f", "x"]], "x"], "x"]`. Function calls are no
  longer redundantly wrapped in `Function(Block(...))`. Similarly,
  `\frac{d}{dx} f` where `f` is a known function symbol canonicalizes to
  `["D", ["f", "x"], "x"]` by applying the function to the differentiation
  variable.

### Free Functions

- Free functions (`simplify`, `evaluate`, `N`, `expand`, `expandAll`, `factor`,
  `solve`, `compile`) now accept `ExpressionInput` in addition to `LatexString`
  and `Expression`. This means you can pass numbers, MathJSON objects, or tuple
  arrays directly — e.g., `evaluate(["Add", 1, 2])` or
  `simplify(["Power", "x", 2])`.
- Added `declare()` free function to declare symbols without instantiating a
  `ComputeEngine` explicitly — e.g., `declare('x', 'integer')` or
  `declare({ x: 'integer', y: 'real' })`.

### Units and Quantities

- **New `units` library**: A comprehensive unit system for physical quantities,
  available as the `"units"` library category. Supports SI base units, 18 named
  derived units, SI prefixes (quetta through quecto), and common non-SI units
  (imperial, angles, logarithmic).
- **`Quantity` expression**: Pairs a numeric value with a unit:
  `["Quantity", 9.8, ["Divide", "m", ["Power", "s", 2]]]`. Accessors
  `QuantityMagnitude` and `QuantityUnit` extract the parts.
- **Quantity arithmetic**: `Add`, `Subtract`, `Multiply`, `Divide`, and `Power`
  are unit-aware. Addition and subtraction automatically convert compatible
  units and express the result in the unit with the largest scale factor (e.g.,
  `12 cm + 1 m` evaluates to `1.12 m`). Incompatible dimensions remain
  unevaluated.
- **Unit conversion**: `UnitConvert` converts between compatible units,
  including compound units like `m/s` to `km/h`. Supports affine temperature
  conversions (`degC`, `degF`, `K`). Returns an error for incompatible units.
  `UnitSimplify` reduces compound units to named derived units when possible
  (e.g., `kg*m/s^2` to `N`).
- **Dimensional analysis**: `IsCompatibleUnit` tests dimensional compatibility.
  `UnitDimension` returns the 7-element SI dimension vector. Both support
  compound unit expressions.
- **LaTeX parsing**: `\mathrm{...}` and `\text{...}` containing recognized units
  produce `Quantity` expressions when juxtaposed with numbers. Compound units
  with `/`, `^`, and `\cdot` are supported (e.g., `5\,\mathrm{m/s^{2}}`).
- **siunitx commands**: `\qty{value}{unit}`, `\SI{value}{unit}`, `\unit{unit}`,
  and `\si{unit}` are parsed.
- **LaTeX serialization**: `Quantity` expressions serialize to
  `value\,\mathrm{unit}` notation.
- **DSL string sugar**: Compound units can be specified as strings in MathJSON:
  `["Quantity", 9.8, "m/s^2"]` is canonicalized to the structured form.
  Parentheses are supported for grouping: `"kg/(m*s^2)"`.
- **Temperature units**: `degC` and `degF` with affine offset conversions.
- **Angular unit unification**: Trigonometric functions (`Sin`, `Cos`, `Tan`,
  etc.) accept `Quantity` arguments with angular units (`deg`, `rad`, `grad`,
  `arcmin`, `arcsec`) and convert to radians automatically.
- **Physics constants**: 11 CODATA 2018 constants defined as `Quantity`
  expressions: `SpeedOfLight`, `PlanckConstant`, `Mu0`, `StandardGravity`,
  `ElementaryCharge`, `BoltzmannConstant`, `AvogadroConstant`,
  `VacuumPermittivity`, `GravitationalConstant`, `StefanBoltzmannConstant`, and
  `GasConstant`.

### Compilation

- **Tuple and Matrix compilation**: `Tuple` and `Matrix` expressions can now be
  compiled across all targets. `compile('(\\sin(t), \\cos(t))')` produces
  `[Math.sin(t), Math.cos(t)]` in JavaScript, `vec2(sin(t), cos(t))` in GLSL,
  `vec2f(sin(t), cos(t))` in WGSL, and `(np.sin(t), np.cos(t))` in Python.
- **GPU-native matrix types**: Square matrices (2x2, 3x3, 4x4) compile to native
  GPU matrix constructors (`mat2`/`mat3`/`mat4` in GLSL,
  `mat2x2f`/`mat3x3f`/`mat4x4f` in WGSL) with proper column-major transposition.
  Column vectors are flattened to `vecN`/`vecNf` instead of nested
  single-element arrays.
- **Complex number compilation**: The JavaScript compilation target now supports
  complex-valued expressions. The compiler performs static type analysis at
  compile time to determine whether each subexpression is real or complex, and
  emits the appropriate code path. Simple arithmetic (Add, Subtract, Multiply,
  Divide, Negate) uses inline `{re, im}` field math to avoid allocation.
  Transcendental functions (Sin, Cos, Exp, Ln, Sqrt, Power, and others) delegate
  to runtime helpers backed by the `complex-esm` library. Mixed real/complex
  operands are promoted inline. `ImaginaryUnit` compiles to `{re: 0, im: 1}`.
  Symbols with unknown type are assumed real. Complex-aware `Sum` and `Product`
  loops emit `{re, im}` accumulators when the loop body is complex-valued.
  Reciprocal trig/hyperbolic functions (Cot, Sec, Csc, Coth, Sech, Csch) and
  their inverses dispatch to complex helpers when operands are complex.
- **Python complex compilation**: The Python target now supports complex-valued
  expressions using Python's native `complex()` constructor and the `cmath`
  module for transcendental functions. Real-valued expressions continue to use
  NumPy.
- **Gamma function compilation**: `Gamma` and `GammaLn` can now be compiled to
  `interval-js`, `glsl`, `wgsl`, and `interval-glsl` targets. The interval
  targets include pole detection at non-positive integers and correct
  monotonicity handling around the minimum at x ≈ 1.46.
- **Special function compilation**: 27 additional functions can now be compiled
  to JavaScript: `Erf`, `Erfc`, `ErfInv`, `Beta`, `Digamma`, `Trigamma`,
  `PolyGamma`, `Zeta`, `LambertW`, `BesselJ`, `BesselY`, `BesselI`, `BesselK`,
  `AiryAi`, `AiryBi`, `Factorial`, `Factorial2`, `Exp2`, `Log2`, `Log10`, `Lg`,
  `Arctan2`, `Hypot`, `Degrees`, `Haversine`, `InverseHaversine`, `Binomial`,
  and `Fibonacci`.
- **GPU special functions**: `Erf`, `Erfc`, `ErfInv`, `Beta`, `Factorial`,
  `Arctan2`, `Hypot`, `Haversine`, `InverseHaversine`, `Log10`, and `Lg` can now
  be compiled to GLSL and WGSL targets. `Erf`/`ErfInv` use Abramowitz & Stegun
  polynomial approximations; `Beta` and `Factorial` leverage the existing GPU
  Gamma preamble.

### Simplification

- **Factorial quotient simplification**: `n!/k!` is now simplified to a partial
  product for both concrete integers (e.g., `10!/7!` → `720`) and symbolic
  expressions with small constant difference (e.g., `n!/(n-2)!` → `n(n-1)`).
- **Binomial detection**: Expressions of the form `n!/(k!(n-k)!)` are
  automatically recognized and simplified to `Binomial(n, k)`.
- **Binomial identity simplification**: `C(n,0)` → `1`, `C(n,1)` → `n`, `C(n,n)`
  → `1`, `C(n,n-1)` → `n`.
- **Factorial sum factoring**: Sums and differences of factorials with related
  arguments are factored out, e.g., `n! - (n-1)!` → `(n-1)! * (n-1)`,
  `(n+1)! + n!` → `n! * (n+2)`.

## 0.50.2 _2026-02-12_

### Numerics

- **Centralized overflow protection**: Improved robustness of `Rational` and
  `ExactNumericValue` arithmetic by centralizing overflow checks and automatic
  promotion to `BigInt`.
- **\[#287\](https://github.com/cortex-js/compute-engine/issues/287) Improved
  precision for large integer products**: Multiplications and additions of large
  integers that would previously lose precision (exceeding
  `Number.MAX_SAFE_INTEGER`) are now automatically promoted to `BigInt` to
  maintain exact results.

### Symbols

- **[\#288](https://github.com/cortex-js/compute-engine/issues/288) Allow
  reassigning a symbol from operator to value**: `ce.assign()` no longer throws
  when assigning a plain value to a symbol that was previously declared as a
  function. Existing expressions using the symbol as a function head will
  produce a type error at evaluation time if the new value is not callable.

### Evaluation

- **Fixed scope leaks**: Ensured that evaluation contexts are correctly popped
  even when an error or timeout occurs in `BoxedFunction.evaluate()`,
  `findUnivariateRoots()`, and rule-boxing operations.
- **Improved numerical evaluation performance**: `Sum`, `Product`, `Divide`, and
  statistical operators (`Mean`, `Variance`, etc.) now correctly propagate the
  `numericApproximation` option, significantly speeding up large numerical
  calculations by avoiding expensive exact arithmetic.

## 0.50.1 _2026-02-11_

### Compilation

- **`CompilationResult.preamble` for shader targets**: `compile()` with
  `interval-wgsl` and `interval-glsl` targets now returns a `preamble` field
  containing the interval arithmetic library (struct definitions, helper
  functions). Previously, the compiled `code` referenced functions like `ia_div`
  and `ia_sin` that were not included in the output. Use `preamble + code` for a
  self-contained shader, or call `compileShaderFunction()` on the target
  directly.

## 0.50.0 _2026-02-11_

### Breaking API Changes

This release includes several breaking changes to the public API.

The most significant is the restructuring of the `Expression` type hierarchy and
the introduction of type-guarded role interfaces, which improves type safety and
API ergonomics but requires updates to code that accessed role-specific
properties directly on expression instances.

See
[`MIGRATION_GUIDE_0.50.0.md`](https://github.com/cortex-js/compute-engine/blob/main/MIGRATION_GUIDE_0.50.0.md)
for details.

#### Naming Alignment: `Expression`, `MathJsonExpression`, and `ExpressionInput`

- The compute-engine runtime type is now `Expression` (preferred name).
  `BoxedExpression` is retained as a deprecated alias for migration.
- The MathJSON type is now `MathJsonExpression` (the old MathJSON `Expression`
  name has been removed from the `math-json` entrypoint).
- `SemiBoxedExpression` is now `ExpressionInput` (with a deprecated alias for
  migration).

#### Role-Specific Properties Moved to Type-Guarded Interfaces

Properties that were previously on all `Expression` instances (returning
`undefined` when not applicable) have been moved to role interfaces. They are
now only accessible after narrowing with a type guard.

| Removed from `Expression`             | Access via                                                           |
| :------------------------------------ | :------------------------------------------------------------------- |
| `.symbol`                             | `isSymbol(expr)` or `isSymbol(expr, 'Pi')` then `expr.symbol`        |
| `.string`                             | `isString(expr)` then `expr.string`                                  |
| `.ops`, `.nops`, `.op1`/`.op2`/`.op3` | `isFunction(expr)` or `isFunction(expr, 'Add')` then `expr.ops` etc. |
| `.numericValue`, `.isNumberLiteral`   | `isNumber(expr)` then `expr.numericValue`                            |
| `.tensor`                             | `isTensor(expr)` then `expr.tensor`                                  |

```ts
// Before
if (expr.symbol !== null) console.log(expr.symbol);

// After
import { isSymbol, sym } from '@cortex-js/compute-engine';

if (isSymbol(expr)) console.log(expr.symbol);
// isSymbol() accepts an optional symbol name:
if (isSymbol(expr, 'Pi')) { /* expr is the Pi symbol */ }
// or use the convenience helper:
if (sym(expr) === 'Pi') { /* ... */ }

// isFunction() accepts an optional operator name:
if (isFunction(expr, 'Add')) {
  // expr is narrowed to a function AND has operator 'Add'
  console.log(expr.ops);
}
```

Properties that remain on `Expression`: `.operator`, `.re`/`.im`, `.shape`, all
arithmetic methods (`.add()`, `.mul()`, etc.), and all numeric predicates
(`.isPositive`, `.isInteger`, etc.).

#### Expression Creation: `form` Replaces `canonical`/`structural`

The `canonical` (boolean or array) and `structural` (boolean) options on
`ce.box()`, `ce.function()`, and `ce.parse()` have been unified into a single
`form` option.

```ts
ce.box(['Add', 1, 'x'], { form: 'canonical' }); // default
ce.box(['Add', 1, 'x'], { form: 'raw' });        // no canonicalization, no binding
ce.function('Add', [1, 'x'], { form: 'structural' }); // bound, not fully canonical
ce.box(['Add', 1, 'x'], { form: ['Number', 'Order'] }); // selective passes
```

#### New Free Functions

Top-level free functions are now available for common operations and use a
shared `ComputeEngine` instance created on first call.

| Function                               | Purpose                                                        |
| :------------------------------------- | :------------------------------------------------------------- |
| `getDefaultEngine()`                   | Return the shared default `ComputeEngine` instance.            |
| `parse(latex)`                         | Parse a LaTeX string into an `Expression`.                     |
| `simplify(exprOrLatex)`                | Simplify an expression or LaTeX input.                         |
| `evaluate(exprOrLatex)`                | Evaluate an expression or LaTeX input symbolically.            |
| `N(exprOrLatex)`                       | Numerically evaluate an expression or LaTeX input.             |
| `assign(id, value)` / `assign(record)` | Assign one symbol value or many at once.                       |
| `expand(exprOrLatex)`                  | Expand distributively at the top level (`Expression \| null`). |
| `expandAll(exprOrLatex)`               | Expand distributively recursively (`Expression \| null`).      |
| `solve(exprOrLatex, vars?)`            | Solve equations/systems (returns solve result variants).       |
| `factor(exprOrLatex)`                  | Factor an expression.                                          |
| `compile(exprOrLatex, options?)`       | Compile to a target language with `CompilationResult`.         |

```ts
import {
  getDefaultEngine,
  parse,
  simplify,
  evaluate,
  N,
  assign,
  expand,
  expandAll,
  solve,
  factor,
  compile,
} from '@cortex-js/compute-engine';

assign('x', 3);

const expr = parse('x^2 - 5x + 6');
solve(expr, 'x');           // [2, 3]
factor('(2x)(4y)');         // 8xy
compile('x^2 + 1').run({ x: 3 }); // 10
```

Except for `parse()`, `assign()`, and `getDefaultEngine()`, these free functions
accept either a LaTeX string or an existing `Expression`.

#### Free Function Notes

- `compile()` is now a top-level entry point returning `CompilationResult`.
  Custom compilation targets are managed with `ce.registerCompilationTarget()`
  and `ce.unregisterCompilationTarget()`.
- `expand()` and `expandAll()` return `null` when an expression is not
  expandable.
- `solve()` is available as a top-level wrapper over equation/system solving.
- `factor()` is the top-level factoring entry point. Specialized helpers such as
  `factorPolynomial()` and `factorQuadratic()` remain expression-only APIs.

#### `trigSimplify()` Method Removed

Use `simplify({ strategy: 'fu' })` instead, which is equivalent.

```ts
// Before
const result = expr.trigSimplify();

// After
const result = expr.simplify({ strategy: 'fu' });
```

#### Library System

The constructor now accepts a `libraries` option for controlling which libraries
are loaded. Libraries declare their dependencies and are loaded in topological
order.

```ts
// Load specific standard libraries
const ce = new ComputeEngine({
  libraries: ['core', 'arithmetic', 'trigonometry'],
});

// Add a custom library
const ce = new ComputeEngine({
  libraries: [
    ...ComputeEngine.getStandardLibrary(),
    { name: 'physics', requires: ['arithmetic'], definitions: { /* ... */ } },
  ],
});
```

#### User-Extensible Simplification Rules

`ce.simplificationRules` is now a public getter/setter. Users can push
additional rules or replace the entire rule set.

```ts
ce.simplificationRules.push({
  match: ['Power', ['Sin', '_x'], 2],
  replace: ['Subtract', 1, ['Power', ['Cos', '_x'], 2]],
});
```

### Canonicalization

- **Exact numeric folding during canonicalization**: `canonicalAdd` and
  `canonicalMultiply` now fold **exact** numeric operands at canonicalization
  time, making behavior consistent with `canonicalDivide` which already folded
  coefficients. This means expressions are reduced earlier in the pipeline
  without waiting for a `.simplify()` call.

  **What gets folded** (exact values):
  - Integers: `Add(2, x, 5)` &rarr; `Add(x, 7)`
  - Rationals: `Add(1/3, x, 2/3)` &rarr; `Add(x, 1)`
  - Radicals: `Add(√2, x, √2)` &rarr; `Add(x, 2√2)`
  - Mixed exact: `Multiply(2, x, 5)` &rarr; `Multiply(10, x)`
  - Full reduction: `Add(2, 3)` &rarr; `5`, `Multiply(2, 3)` &rarr; `6`
  - Identity elimination: `Multiply(1/2, x, 2)` &rarr; `x`
  - Complex promotion: `Add(1, Complex(0, -1))` &rarr; `Complex(1, -1)`

  **What is NOT folded** (non-exact values):
  - Machine floats: `Add(1.5, x, 0.5)` remains `Add(x, 0.5, 1.5)`
  - Infinity/NaN: `Multiply(0, ∞)` correctly returns `NaN`
  - Single numeric: `Multiply(5, Pi)` is unchanged (nothing to fold)

  The folding uses the existing `ExactNumericValue` arithmetic, which
  automatically handles radical grouping (`√2 + √2 = 2√2`) and rational
  simplification (`1/3 + 2/3 = 1`).

- **Exact numeric folding in `canonicalPower`**: Integer powers of numeric
  literals are now folded during canonicalization when the exponent is an
  integer with |e| &le; 64. For machine-number bases, the result must be a safe
  integer; for exact numeric values (rationals, radicals), `NumericValue.pow()`
  is used.
  - `Power(2, 3)` &rarr; `8`
  - `Power(3, 2)` &rarr; `9`
  - `Power(1/2, 2)` &rarr; `1/4`
  - `Power(-2, 3)` &rarr; `-8`
  - `Power(2, 100)` remains unevaluated (exponent exceeds limit)

- **Complex promotion handles non-adjacent operands**: `canonicalAdd` now
  combines a real float with imaginary terms even when they are not adjacent in
  the operand list. Previously, only a real immediately followed by an imaginary
  was promoted to a complex number.

### Type Inference

- **Type handlers for 25 operators**: Added explicit `type` handlers to
  operators that were missing them, enabling the type system to return precise
  types instead of the broad signature return type.
  - **Arithmetic**: `Factorial`, `Factorial2`, `Sign` return `finite_integer`;
    `Ceil` and `Floor` return `finite_integer` for finite inputs, `integer`
    otherwise.
  - **Trigonometry**: `Arctan` uses `numericTypeHandler` (returns `finite_real`
    for real inputs, `finite_number` for complex).
  - **Complex**: `Real`, `Imaginary`, `Argument` return `finite_real`.
  - **Number theory**: `Totient`, `Sigma0`, `Sigma1`, `Eulerian`, `Stirling`,
    `NPartition` return `finite_integer`; `SigmaMinus1` returns
    `finite_rational`.
  - **Combinatorics**: `Choose`, `Fibonacci`, `Binomial`, `Multinomial`,
    `Subfactorial`, `BellNumber` return `finite_integer`.
  - **`Truncate`, `GCD`, `LCM` type handlers**: `Truncate` returns
    `finite_integer` for finite inputs (matching `Ceil`/`Floor`); `GCD` and
    `LCM` always return `finite_integer`.

### Solving

- **`And` operator support for systems of equations**: `solve()` now accepts
  `And(Equal(...), Equal(...))` in addition to `List(Equal(...), Equal(...))`
  for representing systems of equations. Both forms route through the same
  linear, polynomial, and inequality solvers.

- **Parametric solution type filtering**: `filterSolutionByTypes` now uses
  `=== false` instead of `!== true` for type predicate checks. This allows
  underdetermined (parametric) solutions to pass through when type predicates
  return `undefined` (unknown) rather than being incorrectly rejected.

- **`Or` operator support in `solve()`**: Solving `Or(Equal(x,1), Equal(x,2))`
  returns the union of solutions from each branch, with deduplication. Works for
  both univariate (returns array of values) and multivariate (returns array of
  records) cases.

- **Mixed equality + inequality systems**: `solve()` now handles systems
  combining `Equal` and inequality operators (`Less`, `LessEqual`, `Greater`,
  `GreaterEqual`). Equalities are solved first, then solutions are filtered
  against the inequalities.

- **Parametric solutions omit free variables**: Underdetermined linear systems
  no longer include free variables (self-referential entries) in the result
  record. Only dependent variables with non-trivial expressions are returned.

### Special Functions

- **Numeric evaluation for Digamma, Trigamma, PolyGamma, Beta, Zeta, LambertW**:
  These six functions now evaluate numerically when `.N()` is called, at both
  machine precision and arbitrary precision (bignum). Returns unevaluated
  without numeric approximation.
  - `Digamma`/`Trigamma`: recurrence + asymptotic with Bernoulli numbers
  - `PolyGamma`: generalized recurrence for arbitrary order n
  - `Beta`: via gamma, with log-gamma fallback for large arguments
  - `Zeta`: Cohen-Villegas-Zagier acceleration, functional equation for
    $\operatorname{Re}(s)<0$
  - `LambertW`: Halley's method with branch-point handling

- **Arbitrary-precision (bignum) variants for special functions**: When
  `ce.precision > 15`, `Digamma`, `Trigamma`, `PolyGamma`, `Beta`, `Zeta`, and
  `LambertW` now compute results to the requested precision using bignum
  arithmetic. The asymptotic shift threshold scales with precision to maintain
  accuracy (e.g., `ce.precision = 50` produces 50-digit results for Digamma and
  Zeta).

- **Numeric evaluation for Bessel functions (`BesselJ`, `BesselY`, `BesselI`,
  `BesselK`)**: Integer-order Bessel functions now evaluate numerically.
  - `BesselJ`: power series for small $|x|$, Miller's backward recurrence for
    intermediate values, Hankel asymptotic expansion for large $|x|$
  - `BesselY`: DLMF 10.8.3 series for $Y_0$/$Y_1$, forward recurrence for higher
    orders, shared Hankel asymptotic with `BesselJ`
  - `BesselI`: power series + asymptotic expansion
  - `BesselK`: series for $K_0$, Wronskian-derived $K_1$, forward recurrence for
    higher orders, asymptotic for large $x$

- **Numeric evaluation for Airy functions (`AiryAi`, `AiryBi`)**: Power series
  using Maclaurin coefficients for $|x| \leq 5$, asymptotic expansions
  (exponential decay for Ai, exponential growth for Bi at positive $x$,
  oscillatory for negative $x$) for large arguments.

### Linear Algebra

(Fix [#285](https://github.com/cortex-js/compute-engine/issues/285))

- **`\begin{vmatrix}` now parses to `Determinant`**: The `vmatrix` LaTeX
  environment now produces `["Determinant", ["Matrix", ...]]` instead of
  `["Matrix", ..., "'||'"]`. Serialization round-trips correctly back to
  `\begin{vmatrix}...\end{vmatrix}` when the argument is a `Matrix` expression,
  and uses `\det\left(...\right)` for symbol arguments.

- **`\begin{Vmatrix}` now parses to `Norm`**: The `Vmatrix` LaTeX environment
  now produces `["Norm", ["Matrix", ...]]` instead of `["Matrix", ..., "'‖‖'"]`.
  Serialization round-trips to `\begin{Vmatrix}...\end{Vmatrix}` when the
  argument is a `Matrix`, and uses `\left\Vert...\right\Vert` for symbol
  arguments.

- **`A^{-1}` produces `Inverse` for matrix-typed symbols and matrix
  expressions**: When a symbol is declared with type `matrix`, parsing `A^{-1}`
  now returns `["Inverse", "A"]` instead of `["Power", "A", -1]`. This also
  works for inline matrix expressions, e.g.
  `\begin{pmatrix}...\end{pmatrix}^{-1}`. Undeclared symbols still fall through
  to the default `Power`/`Divide` handling, and function symbols still produce
  `InverseFunction` (e.g., `\sin^{-1}` &rarr; `Arcsin`).

- **`Inverse` serializes as `^{-1}`**: `["Inverse", "A"]` now serializes to
  `A^{-1}` instead of `\mathrm{Inverse}(A)`.

- **`Power(A, -1)` canonicalizes to `Inverse(A)` for matrices**: When `A` has a
  matrix type, `ce.box(["Power", "A", -1])` now canonicalizes to
  `["Inverse", "A"]` instead of `["Divide", 1, "A"]`.

- **`\det(A)` and `\tr(A)` now parse correctly**: Fixed `Determinant` and
  `Trace` LaTeX dictionary entries to use `latexTrigger` (`\det`, `\tr`) instead
  of `symbolTrigger`, which only matches plain identifiers. Both functions also
  accept plain text forms (`det(A)`, `tr(A)`).

- **`\det A` and `\tr A` work without parentheses**: `Determinant` and `Trace`
  now accept implicit arguments, so `\det A` parses as `["Determinant", "A"]`
  (like `\cos x` parses as `["Cos", "x"]`). Implicit arguments bind at
  multiplication precedence, so `\det 2A + 1` parses as `det(2A) + 1`.

- **`Determinant` serialization uses `\det A` for simple arguments**: Symbol
  arguments serialize as `\det A` instead of `\det\left(A\right)`. Matrix
  arguments still serialize as `\begin{vmatrix}...\end{vmatrix}`.

- **Added standard LaTeX operators `\ker`, `\dim`, `\deg`, `\hom`**: These
  commands are now in the MathJSON LaTeX dictionary as function entries with
  implicit arguments, so forms like `\ker V`, `\dim V`, `\deg p`, and
  `\hom(V, W)` parse correctly and serialize back to the corresponding standard
  operator notation. The corresponding function symbols (`Kernel`, `Dimension`,
  `Degree`, `Hom`) are also registered in the linear algebra library.

- **Implemented runtime evaluation for `Kernel`, `Dimension`, `Degree`, and
  `Hom`**:
  - `Kernel` now computes a numeric null-space basis (for scalar/vector/matrix
    real inputs) and returns it as a list of basis vectors.
  - `Dimension` now evaluates finite dimensions for concrete tensors and
    collections, and computes `dim(Hom(V, W)) = dim(V) * dim(W)` when both
    dimensions are inferable.
  - `Degree` now evaluates polynomial degree for polynomial-form expressions
    while keeping ambiguous bare symbols (for example `Degree(p)`) unevaluated.
  - `Hom` now evaluates/simplifies its arguments while preserving the symbolic
    `Hom(...)` form.

#### LaTeX Parsing

- **`arguments: 'implicit'` option for function dictionary entries**: Function
  entries in the LaTeX dictionary can now set `arguments: 'implicit'` to accept
  bare arguments without parentheses (e.g., `\det A`), matching the behavior of
  trig functions. The default remains `'enclosure'` (parentheses required).
  Applied to `\det`, `\tr`, `\Re`, `\Im`, `\arg`, `\max`, `\min`, `\sup`,
  `\inf`.

### Simplification

- **Infinity handling for 24+ functions**: `arctan(∞)`, `arccot(±∞)`,
  `tanh/coth/sech/csch(±∞)`, `arsinh(-∞)`, `arcosh(-∞)`, `arccoth(±∞)`,
  `arcsch(±∞)`, `π^∞`, `∞^n`, `(-∞)^{-n}`, `log_∞(x)`, `log_{0.5}(∞)`, `√∞`,
  `∛∞` now all return correct limits.

- **Root edge cases**: `Root(x, 0) → NaN`, `Root(0, n)`, `Root(1, n)`,
  `Root(+∞, n)`, and `Sqrt(+∞)` now handled correctly.

- **Division edge cases**: `a/a → 1` now works for compound expressions (e.g.,
  `(π+1)/(π+1)`); `2/0 → ComplexInfinity` and `1/(1/0) → 0` propagate correctly.

- **Logarithm edge cases**: Fixed infinity detection in `simplify-log.ts` (was
  using `sym()` which fails on `BoxedNumber` infinity values); added
  `log_∞(∞) → NaN`, base-aware `log_c(0)`, guards for `log_1(x)` and
  `log_c(c^x)` evaluation.

- **Absolute value of odd functions**: `|arcsin(x)|`, `|sinh(x)|`,
  `|arsinh(x)|`, `|artanh(x)|` now simplify to `f(|x|)`.

- **Even function with abs argument**: `cosh(|x+2|) → cosh(x+2)`.

- **Trig period shifts**: `cot(π+x) → cot(x)`, `csc(π+x) → -csc(x)`.

- **Ln simplification in Add/Multiply operands**: `ln(x^3) − 3·ln(x) → 0` and
  `ln(x^√2) → √2·ln(x)` now work; cost function bypassed for log rules that are
  mathematically valid but structurally more expensive.

- **Preserved function identity**: Removed unconditional expansions of
  `sinh/cosh → exp`, `arsinh/arcosh/artanh → ln`, and `arcsin → arctan2` that
  prevented abs/odd-function rules from firing.

### Compilation

- **WGSL (WebGPU Shading Language) Compilation Target**: New built-in WGSL
  target for compiling mathematical expressions to WebGPU shaders.

  ```ts
  // Via the registry
  const result = compile(expr, { to: 'wgsl' });
  ```

  WGSL-specific differences from GLSL:
  - `inverseSqrt` (camelCase) instead of `inversesqrt`
  - `%` operator for mod instead of `mod()` function
  - `vec2f`/`vec3f`/`vec4f` constructors instead of `vec2`/`vec3`/`vec4`
  - `array<f32, n>()` instead of `float[n]()`
  - `fn name(x: f32) -> f32` instead of `float name(float x)`
  - `@vertex`/`@fragment`/`@compute` entry points with struct-based I/O
  - `@group`/`@binding` uniform declarations and `@workgroup_size` for compute

- **Interval WGSL Compilation Target**: New `interval-wgsl` target for interval
  arithmetic in WebGPU shaders, mirroring the existing `interval-glsl` target.
  Since WGSL does not support function overloading, the library uses `_v`
  suffixes for internal vec2f-parameter implementations (e.g., `ia_add_v`),
  while the public API (`ia_add`, `ia_sin`, etc.) takes `IntervalResult` values.

### Resolved Issues

- **`Sequence` type inference now returns a proper tuple type**: Multi-argument
  `Sequence` expressions previously returned `'any'` as their inferred type,
  losing all type information. They now return a `tuple<...>` type with each
  element's individual type preserved (e.g., `Sequence(1, "a")` types as
  `tuple<integer, string>`), consistent with the `Tuple` operator.

- **Subscript parsing now checks for collection type**: The LaTeX subscript
  (`_`) parser now checks whether the LHS is a collection (symbol declared as
  `indexed_collection`, or a list literal) and produces `At()` directly at parse
  time, consistent with bracket indexing (`x[i]`). Multi-index subscripts on
  collections (`A_{k,j}`) are now correctly unpacked into separate `At`
  arguments instead of being wrapped in a `Tuple`.

- **`NumericValue(0).mul(Infinity)` now returns NaN**: All three `NumericValue`
  subclasses (`MachineNumericValue`, `BigNumericValue`, `ExactNumericValue`) had
  an early-return `if (this.isZero) return this` in `mul()`, which returned `0`
  without checking if the other operand was infinity. `0 × ±∞` is now correctly
  indeterminate (`NaN`), and `±∞ × 0` is handled symmetrically.

- **Power simplification `(a^n)^m -> a^{nm}` now correctly guarded**: The rule
  was applied unconditionally, which is mathematically incorrect when the base
  can be negative and exponents are non-integer. The classic counterexample:
  `((-1)^2)^{1/2} = 1`, but `(-1)^{2·1/2} = -1`. The rule is now only applied
  when: (1) the base is non-negative, (2) the outer exponent is an integer, or
  (3) the inner exponent is an odd integer. This fix applies to canonicalization
  (`canonicalPower`), the `pow()` helper, and simplification (`simplifyPower`).
  As a result, `(x^2)^{1/2}` now correctly simplifies to `|x|` instead of `x`.

- **Power distribution rules now guarded for non-integer exponents**: Three
  additional power distribution rules in `pow()` were applied unconditionally,
  producing wrong results when the exponent is non-integer and operands are
  negative. (1) `(a/b)^c -> a^c / b^c` — e.g. `((-2)(-3))^{1/2} = sqrt(6)` but
  distributing gives `(-2)^{1/2} * (-3)^{1/2} = -sqrt(6)`. (2)
  `(a*b)^c -> a^c * b^c` — same class of bug. (3) `(-x)^n` used `n % 2 === 0` to
  test parity, but for non-integer `n` (e.g. 0.5), `0.5 % 2 = 0.5` falls to the
  odd branch, giving `(-x)^{0.5} -> -(x^{0.5})` which is wrong. All three rules,
  plus the corresponding `canonicalPower()` Divide rule, now require integer
  exponents (or non-negative operands) before distributing.

- **Sqrt/Root exponent rearrangement now guarded**: Two more rules in `pow()`
  unconditionally rearranged exponents. (1) `(√a)^b -> √(a^b)` rearranges
  `(a^{1/2})^b` to `(a^b)^{1/2}`, which is wrong for negative `a` (e.g.
  `(√(-4))^3 = -8i` but `√((-4)^3) = 8i`). Now only applied when `a >= 0`. The
  even-integer branches (`(√a)^2 -> a`, `(√a)^{2k} -> a^k`) remain unconditional
  since integer outer exponents are always safe. (2) `Root(a,b)^c -> a^{c/b}`
  combined exponents unconditionally. Now guarded with `a >= 0` or `c` is
  integer. Audit of `simplify-power.ts` confirmed all rules there are already
  properly guarded.

- **Relational operators now evaluate**: Seven relational operators
  (`TildeFullEqual`, `TildeEqual`, `Approx`, `ApproxEqual`, `ApproxNotEqual`,
  `Precedes`, `Succeeds`) previously had `canonical` handlers but no `evaluate`
  handlers, so expressions like `Approx(3.14, 3.14)` returned unevaluated. The
  approximate-equality family (`TildeFullEqual`, `TildeEqual`, `Approx`,
  `ApproxEqual`) now checks whether `|a - b| <= tolerance` via `ce.chop()`, with
  support for multi-argument chains. `Precedes` and `Succeeds` evaluate as
  numeric `<` and `>` respectively. Negated variants (`NotApprox`,
  `NotTildeFullEqual`, etc.) work automatically through the `Not` operator.

- **`BoxedNumber.operator` now returns specific numeric types**: The `operator`
  property on `BoxedNumber` instances previously returned the generic `'Number'`
  for all numeric values. It now returns specific types that match the internal
  type system: `'Integer'` for integers, `'Rational'` for non-integer rationals,
  `'Real'` for floating-point numbers, `'Complex'` for complex numbers with
  non-zero imaginary part, and `'NaN'`, `'PositiveInfinity'`,
  `'NegativeInfinity'` for special values. This improves API consistency with
  the `type` property and enables more precise pattern matching and type
  discrimination in user code. **Breaking change**: Code that explicitly checks
  for `.operator === 'Number'` will need to be updated to check for specific
  numeric types or use the `isNumber()` type guard instead.

- **Non-XIDC Unicode characters in symbol names now encoded correctly**: When
  parsing LaTeX symbols containing non-identifier Unicode characters via
  `\unicode{...}`, `\char`, or `^^XX` escapes (e.g., figure dash U+2012 in
  `\operatorname{speed\unicode{"2012}of\unicode{"2012}sound}`), the characters
  are now encoded as `____XXXXXX` (4 underscores + 6 hex digits) in the symbol
  name. This encoding is valid per `isValidSymbol()` and round-trips correctly:
  the serializer decodes `____XXXXXX` back to `\unicode{"XXXX"}` in LaTeX
  output. Previously, these characters passed through raw and caused symbol
  validation to fail.

- **Assign to compound symbol names no longer misinterpreted as sequence
  definitions** (fixes
  [#286](https://github.com/cortex-js/compute-engine/issues/286)):
  `ce.box(["Assign", "t_half", 10])` previously failed because the Assign
  evaluate handler split any symbol containing `_` and treated it as a
  subscripted sequence definition. User-provided compound symbols like `t_half`
  or `half_life` are now assigned correctly. Sequence definitions via parsed
  LaTeX (e.g., `L_0 := 1`) continue to work as before.

## 0.35.6 _2026-02-07_

### Resolved Issues

- **Monte Carlo improper integrals**: Fixed two bugs in `monteCarloEstimate()`
  that produced incorrect results (typically `NaN` or `Infinity`) for improper
  integrals. The change-of-variables estimator was inverted ($f(x) / \mathrm{jacobian}$ instead of $f(x) * \mathrm{jacobian}$), and the
  finite-interval scale factor $b - a$ was applied to transformed domains where
  it is infinite. Affects `NIntegrate` and compiled `integrate` for any integral
  with infinite bounds.

### Compilation

- **`Truncate`, `Remainder`, and `Mod` for JS/GLSL targets**: Added `Truncate`
  (`Math.trunc` / `trunc`), `Remainder`, and `Mod` to the JavaScript and GLSL
  compilation targets, matching the Python target which already had them.

- **Interval `trunc` and `remainder`**: Added `trunc()` and `remainder()` to the
  interval arithmetic library. `trunc` has proper discontinuity detection
  (behaves like `floor` for positive, `ceil` for negative, continuous at zero).
  `remainder(a, b) = a - b * round(a/b)` composes existing interval operations
  with discontinuity detection inherited from `round`. Added corresponding
  mappings to both interval JavaScript and interval GLSL targets.

- **Interval `Lb`, `Log`, and `Root` for GLSL**: Added `ia_log2`, `ia_log10`,
  and `Root` to the interval GLSL target for consistency with the interval
  JavaScript target.

- **Reverse cross-reference test**: Added a test that verifies all core CE math
  functions have compilation support in every target. Currently all 5 targets
  have full coverage of the 47 compilable math functions.

## 0.35.5 _2026-02-06_

### Resolved Issues

- **Compilation Target Function Name Mismatches**: Fixed several function keys
  in compilation targets that did not match their canonical library operator
  names, causing silent compilation failures and runtime errors ("Unexpected
  value"). Affected mappings: `Ceiling` → `Ceil`, `Sgn` → `Sign`, `LogGamma` →
  `GammaLn`, `Arcsinh` → `Arsinh`, `Arccosh` → `Arcosh`, `Arctanh` → `Artanh`,
  `Re` → `Real`, `Im` → `Imaginary`, `Arg` → `Argument` across all five
  compilation targets.

- **Missing Library Operator Definitions**: Added library definitions for
  `Exp2`, `Fract`, `Log10`, `Log2`, `Remainder`, and `Truncate` which were
  referenced by compilation targets but had no corresponding library entries.
  `Exp2` canonicalizes to `Power(2, x)`, `Log10`/`Log2` canonicalize to `Log`
  with the appropriate base, and `Fract`, `Remainder`, `Truncate` have direct
  numeric evaluation.

- **Derivative Rule for GammaLn**: Fixed the derivative table entry that used
  the non-canonical name `LogGamma` instead of `GammaLn`, preventing the
  derivative `d/dx GammaLn(x) = Digamma(x)` from being computed.

## 0.35.4 _2026-02-06_

### Interval Arithmetic

- **Discontinuity Continuity Direction**: Singular interval results now include
  an optional `continuity` field (`'left'` or `'right'`) indicating from which
  side the function is continuous at a jump discontinuity. `Floor`, `Round`,
  `Fract`, and `Mod` report `'right'` (right-continuous), `Ceil` reports
  `'left'` (left-continuous). Pole-type singularities (e.g., `tan`, `1/x`) leave
  the field undefined. This is reflected in both the JavaScript and GLSL
  interval arithmetic targets (new `IA_SINGULAR_RIGHT` and `IA_SINGULAR_LEFT`
  status constants in GLSL).

## 0.35.3 _2026-02-06_

### Compilation

- **Expanded Function Support Across All Targets**: Added comprehensive function
  mappings to all five compilation targets (JavaScript, GLSL, Interval GLSL,
  Interval JavaScript, Python): reciprocal trig (`Cot`, `Csc`, `Sec`), inverse
  reciprocal trig (`Arccot`, `Arccsc`, `Arcsec`), hyperbolic (`Sinh`, `Cosh`,
  `Tanh`), reciprocal hyperbolic (`Coth`, `Csch`, `Sech`), inverse hyperbolic
  (`Arcosh`, `Arsinh`, `Artanh`, `Arcoth`, `Arcsch`, `Arsech`), and elementary
  functions (`Sgn`, `Lb`, `Log` with base, `Square`, `Root`, `Fract`).

- **Interval Discontinuity Detection**: `Floor`, `Ceil`, `Round`, `Sign`,
  `Fract`, and `Mod` now correctly report singularities when an interval spans a
  discontinuity point, in both the JavaScript and GLSL interval arithmetic
  targets. Previously these functions returned normal interval bounds even
  across jump discontinuities, which could cause incorrect connecting lines in
  plotted curves.

- **New Interval Functions**: Added `Round`, `Fract`, and `Mod` to the interval
  arithmetic targets (both JS and GLSL) with proper discontinuity detection.

## 0.35.2 _2026-02-05_

### Resolved Issues

- **Decimal Number Representation**: Numbers written with a decimal point (e.g.,
  `6.02e23`) are now correctly treated as approximate decimal values
  (`BigNumericValue`) rather than exact integers. Previously, `6.02e23` was
  incorrectly converted to the exact bigint `602000000000000000000000`, which
  implied false precision and caused memory inefficiency for very large
  exponents. Numbers without a decimal point (e.g., `602e21`) continue to be
  treated as exact integers when possible. This change aligns with the
  documented behavior of the `parseNumbers: 'auto'` option.

- **Scientific Notation Serialization**
  ([#284](https://github.com/cortex-js/compute-engine/issues/284)): Fixed
  `toLatex()` with `scientific` and `adaptiveScientific` notation options to
  produce properly normalized output. Previously, numbers like `6.02e23` would
  serialize as `602\cdot10^{21}` instead of the expected `6.02\cdot10^{23}`. The
  output now depends only on the numeric value and formatting options, not on
  the internal representation.

- **Numeric Sum Precision**: Fixed precision loss when summing large integers
  with rational values (e.g., `12345678^3 + 1/3`). The `ExactNumericValue.sum()`
  method now uses `bignumRe` instead of `re` to preserve full precision when
  handling large integer values from `BigNumericValue`.

- **Broadcastable Functions with Union/Any Types**
  ([#235](https://github.com/cortex-js/compute-engine/issues/235)):
  Broadcastable (threadable) functions like `Multiply` and `Add` no longer
  reject arguments whose type is a union of numeric and collection types (e.g.,
  `number | list`) or `any`. Previously, declaring a symbol as
  `ce.declare('a', 'number | list')` and using it in
  `ce.box(['Multiply', 'a', 'b'])` would produce an `incompatible-type` error.

- **Division Canonicalization Over-Simplification**
  ([#227](https://github.com/cortex-js/compute-engine/issues/227)): Fixed `A/A`
  being incorrectly simplified to `1` during canonicalization for constant
  expressions that evaluate to infinity or zero, such as `tan(π/2)/tan(π/2)`.
  This now correctly evaluates to `NaN` (since `∞/∞` is indeterminate) instead
  of `1`. Expressions with free variables (e.g., `x/x`, `sin(x)/sin(x)`)
  continue to simplify to `1` per standard algebraic convention. Also fixed
  deferred constant divisions like `0/(1-1)` and `(1-1)/(1-1)` to properly
  evaluate to `NaN` instead of remaining as unevaluated expressions.

## 0.35.1 _2026-02-03_

### Resolved Issues

- **Interval Arithmetic (JS/GLSL)**: Fixed interval evaluation of compound
  arguments (e.g. `sin(2x)`, `sin(x+x)`, `sin(x^2)`, `cos(2x)`) by propagating
  interval results through trig, elementary, and comparison functions in
  `interval-js`, and by adding `IntervalResult` overloads to the GLSL interval
  library for `interval-glsl`.

## 0.35.0 _2026-02-02_

### Parsing

- **Large Integer Precision**: Fixed precision loss when parsing integers
  exceeding `Number.MAX_SAFE_INTEGER` with `parseNumbers: 'rational'`. Large
  integers and rational numerators now use BigInt arithmetic to preserve exact
  values. Fixes #283.

### Compilation

- **Interval Arithmetic Targets**: Added two new compilation targets for
  reliable singularity detection:
  - `interval-js` - Compiles to JavaScript using interval arithmetic
  - `interval-glsl` - Compiles to GLSL for GPU-based interval evaluation

## 0.34.0 _2026-02-01_

### Parsing

- **`\mathopen` and `\mathclose`**: The LaTeX parser supports `\mathopen` and
  `\mathclose` delimiter prefixes for matchfix operators (explicit delimiter
  spacing control), e.g. `\mathopen(a, b\mathclose)` and
  `\mathopen{(}a, b\mathclose{)}`.

- **Interval Notation Parsing**: Added support for parsing mathematical interval
  notation from LaTeX, including half-open intervals. Addresses #254.

  ```javascript
  // Half-open intervals (American notation)
  ce.parse('[3, 4)').json;   // → ["Interval", 3, ["Open", 4]]
  ce.parse('(3, 4]').json;   // → ["Interval", ["Open", 3], 4]

  // Open intervals (ISO/European notation)
  ce.parse(']3, 4[').json;   // → ["Interval", ["Open", 3], ["Open", 4]]

  // LaTeX bracket commands and sizing prefixes
  ce.parse('\\lbrack 3, 4\\rparen').json;  // → ["Interval", 3, ["Open", 4]]
  ce.parse('\\left[ 3, 4 \\right)').json;  // → ["Interval", 3, ["Open", 4]]
  ce.parse('\\bigl( 3, 4 \\bigr]').json;   // → ["Interval", ["Open", 3], 4]
  ```

  **Contextual Parsing**: Lists and tuples are automatically converted to
  intervals when used in set contexts (Element, Union, Intersection, etc.):

  ```javascript
  ce.parse('x \\in [0, 1]').json;
  // → ["Element", "x", ["Interval", 0, 1]]

  ce.parse('[0, 1] \\cup [2, 3]').json;
  // → ["Union", ["Interval", 0, 1], ["Interval", 2, 3]]

  // Standalone notation remains backward compatible
  ce.parse('[0, 1]').json;  // → ["List", 0, 1]
  ce.parse('(0, 1)').json;  // → ["Tuple", 0, 1]
  ```

### Compilation

- **Custom Operator Compilation**: The `compile()` method now supports
  overriding operators to use function calls instead of native operators. This
  enables compilation of vector/matrix operations and custom domain-specific
  languages. Addresses #240.

  ```javascript
  // Override operators for vector operations
  const expr = ce.parse('v + w');
  const compiled = expr.compile({
    operators: {
      Add: ['add', 11],      // Convert + to add() function
      Multiply: ['mul', 12]  // Convert * to mul() function
    },
    functions: {
      add: (a, b) => a.map((v, i) => v + b[i]),
      mul: (a, b) => a.map((v, i) => v * b[i])
    }
  });

  const result = compiled({ v: [1, 2, 3], w: [4, 5, 6] });
  // → [5, 7, 9]
  ```

  Highlights:
  - Map operators via an object or a function
  - Function-name operators compile to calls; symbol operators compile to infix
  - Supports scalar/collection arguments and partial overrides

- **Exported Compilation Interfaces**: Advanced users can now create custom
  compilation targets by using the exported `CompileTarget` interface,
  `BaseCompiler` class, and `JavaScriptTarget` class.

  ```javascript
  import { BaseCompiler, JavaScriptTarget } from '@cortex-js/compute-engine';

  // Create a custom compilation target
  const customTarget = {
    language: 'my-dsl',
    operators: (op) => ({ Add: ['ADD', 11], Multiply: ['MUL', 12] }[op]),
    functions: (id) => id.toUpperCase(),
    var: (id) => `VAR("${id}")`,
    string: (s) => `"${s}"`,
    number: (n) => n.toString(),
    ws: () => ' ',
    preamble: '',
    indent: 0,
  };

  const expr = ce.parse('x + y * 2');
  const code = BaseCompiler.compile(expr, customTarget);
  // → "ADD(VAR("x"), MUL(VAR("y"), 2))"
  ```

  Exported building blocks include `CompileTarget`, `LanguageTarget`,
  `CompilationOptions`, `CompiledExecutable`, `BaseCompiler`,
  `JavaScriptTarget`, and `GLSLTarget` (plus helper types like
  `CompiledOperators` and `CompiledFunctions`).

- **Compilation Plugin Architecture**: The Compute Engine now supports
  registering custom compilation targets, allowing you to compile mathematical
  expressions to any target language beyond the built-in JavaScript and GLSL
  targets.

  ```javascript
  import { ComputeEngine, BaseCompiler } from '@cortex-js/compute-engine';

  const ce = new ComputeEngine();

  // Define a custom Python target
  class PythonTarget {
    // ... implementation (see documentation)
  }

  // Register the custom target
  ce.registerCompilationTarget('python', new PythonTarget());

  // Compile to Python
  const expr = ce.parse('\\sin(x) + \\cos(y)');
  const pythonCode = expr.compile({ to: 'python' });
  console.log(pythonCode.toString());
  // → math.sin(x) + math.cos(y)

  // Switch between targets
  const jsFunc = expr.compile({ to: 'javascript' });
  const glslCode = expr.compile({ to: 'glsl' });
  ```

  Notes:
  - Built-in targets: `javascript` (executable) and `glsl` (shader code)
  - Add targets via `ce.registerCompilationTarget(name, target)`
  - Switch targets with `compile({ to: ... })` (or override once with `target`)

- **Python/NumPy Compilation Target**: Added a complete Python/NumPy compilation
  target for scientific computing workflows. The `PythonTarget` class compiles
  mathematical expressions to NumPy-compatible Python code.

  ```javascript
  import { ComputeEngine, PythonTarget } from '@cortex-js/compute-engine';

  const ce = new ComputeEngine();
  const python = new PythonTarget({ includeImports: true });

  // Register the target
  ce.registerCompilationTarget('python', python);

  // Compile expressions to Python
  const expr = ce.parse('\\sin(x) + \\cos(y)');
  const code = expr.compile({ to: 'python' });
  console.log(code.toString());
  // → import numpy as np
  //
  //   np.sin(x) + np.cos(y)

  // Generate complete Python functions
  const func = python.compileFunction(
    ce.parse('\\sqrt{x^2 + y^2}'),
    'magnitude',
    ['x', 'y'],
    'Calculate vector magnitude'
  );
  // Generates:
  // import numpy as np
  //
  // def magnitude(x, y):
  //     """Calculate vector magnitude"""
  //     return np.sqrt(x ** 2 + y ** 2)
  ```

  Highlights:
  - NumPy-compatible output (including arrays)
  - Function mapping for common math + linear algebra
  - Helpers for full functions, lambdas, and vectorized code

- **GLSL Compilation Target**: New built-in GLSL (OpenGL Shading Language)
  target for compiling mathematical expressions to WebGL shaders.

  ```javascript
  const expr = ce.parse('x^2 + y^2');
  const glslCode = expr.compile({ to: 'glsl' });
  console.log(glslCode.toString());
  // → pow(x, 2.0) + pow(y, 2.0)

  // Generate complete GLSL functions
  import { GLSLTarget } from '@cortex-js/compute-engine';
  const glsl = new GLSLTarget();

  const distExpr = ce.parse('\\sqrt{x^2 + y^2 + z^2}');
  const func = glsl.compileFunction(distExpr, 'distance3D', 'float', [
    ['x', 'float'],
    ['y', 'float'],
    ['z', 'float'],
  ]);
  console.log(func);
  // → float distance3D(float x, float y, float z) {
  //     return sqrt(pow(x, 2.0) + pow(y, 2.0) + pow(z, 2.0));
  //   }

  // Generate complete shaders
  const shader = glsl.compileShader({
    type: 'fragment',
    version: '300 es',
    outputs: [{ name: 'fragColor', type: 'vec4' }],
    body: [
      {
        variable: 'fragColor',
        expression: ce.box(['List', 1, 0, 0, 1]),
      },
    ],
  });
  ```

  Highlights:
  - Native vector/matrix operators and constructors
  - Float literal formatting (`2.0`)
  - Helpers for functions and complete shaders

### Algebra

- **Polynomial Factoring**: The `Factor` function now supports comprehensive
  polynomial factoring including perfect square trinomials, difference of
  squares, and quadratic factoring with rational roots. Addresses #180 and #33.

  ```javascript
  // Perfect square trinomials
  ce.parse('x^2 + 2x + 1').factor().latex;
  // → "(x+1)^2"

  ce.parse('4x^2 + 12x + 9').factor().latex;
  // → "(2x+3)^2"

  // Difference of squares
  ce.parse('x^2 - 4').factor().latex;
  // → "(x-2)(x+2)"

  // Quadratic with rational roots
  ce.box(['Factor', ['Add', ['Power', 'x', 2], ['Multiply', 5, 'x'], 6], 'x'])
    .evaluate().latex;
  // → "(x+2)(x+3)"
  ```

  **Automatic Factoring in sqrt Simplification**: Square roots now automatically
  factor their arguments before applying simplification rules, enabling
  expressions like `√(x²+2x+1)` to simplify to `|x+1|`.

  ```javascript
  // Issue #180 - Now works!
  ce.parse('\\sqrt{x^2 + 2x + 1}').simplify().latex;
  // → "\\vert x+1\\vert"

  ce.parse('\\sqrt{4x^2 + 12x + 9}').simplify().latex;
  // → "\\vert 2x+3\\vert"

  ce.parse('\\sqrt{a^2 + 2ab + b^2}').simplify().latex;
  // → "\\vert a+b\\vert"
  ```

  Includes perfect square trinomials, difference of squares, and quadratics with
  rational roots. Helper functions are exported for advanced usage
  (`factorPerfectSquare`, `factorDifferenceOfSquares`, `factorQuadratic`,
  `factorPolynomial`).

  **MathJSON API**:

  ```json
  ["Factor", expr]              // Auto-detect variable
  ["Factor", expr, variable]    // Explicit variable specification
  ```

  The enhanced factoring system works seamlessly with existing polynomial
  functions like `Expand`, `Together`, `Cancel`, `PolynomialGCD`, and others.

### Simplification

- **Absolute Value Power Simplification**: Fixed simplification of `|x^n|`
  expressions with even and rational exponents. Previously, expressions like
  `|x²|` and `|x^{2/3}|` were not simplified. Now they correctly simplify based
  on the parity of the exponent's numerator. Addresses #181.

  ```javascript
  ce.parse('|x^2|').simplify().latex;      // → "x^2" (even exponent)
  ce.parse('|x^3|').simplify().latex;      // → "|x|^3" (odd exponent)
  ce.parse('|x^{2/3}|').simplify().latex;  // → "x^{2/3}" (even numerator)
  ce.parse('|x^{3/2}|').simplify().latex;  // → "|x|^{3/2}" (odd numerator)
  ```

- **Assumption-Based Simplification**: Simplification rules use assumptions
  about symbol signs:

  ```javascript
  ce.assume(ce.parse('x > 0'));
  ce.parse('\\sqrt{x^2}').simplify().latex;  // → "x" (was "|x|")
  ce.parse('|x|').simplify().latex;          // → "x" (was "|x|")

  ce.assume(ce.parse('y < 0'));
  ce.parse('\\sqrt{y^2}').simplify().latex;  // → "-y"
  ce.parse('|y|').simplify().latex;          // → "-y"
  ```

- **Nested Root Simplification**: Nested roots simplify to a single root:

  ```javascript
  ce.box(['Sqrt', ['Sqrt', 'x']]).simplify()     // → root(4)(x)
  ce.box(['Root', ['Root', 'x', 3], 2]).simplify() // → root(6)(x)
  ce.box(['Sqrt', ['Root', 'x', 3]]).simplify()  // → root(6)(x)
  ```

  Applies to all combinations: `sqrt(sqrt(x))`, `root(sqrt(x), n)`,
  `sqrt(root(x, n))`, and `root(root(x, m), n)`.

- **Extended Coefficient Factoring in Power Combination**: The power combination
  rule now handles additional coefficient forms when combining same-base powers
  in products:
  - **Multi-prime coefficients**: `12·2ˣ·3ˣ` &rarr; `2^(x+2)·3^(x+1)` (since 12
    = 2²·3). All primes in the factorization must have a matching base.
    Non-matching multi-prime coefficients like `6·2ˣ` are left unchanged.
  - **Negative coefficients**: `-4·2ˣ` &rarr; `-2^(x+2)`, `-8·2ˣ` &rarr;
    `-2^(x+3)`. The absolute value is factored and the sign is preserved.
  - **Rational-radical coefficients**: `√2·2ˣ` &rarr; `2^(x+½)`, `2√2·2ˣ` &rarr;
    `2^(x+3/2)`, `(√2/2)·2ˣ` &rarr; `2^(x-½)`. Decomposes `(num/den)·√radical`
    into prime contributions from all three components (radical primes get
    half-integer exponents, numerator primes get positive exponents, denominator
    primes get negative exponents).
  - **Rational coefficients**: `2ˣ/4` &rarr; `2^(x-2)`, `3ˣ/9` &rarr; `3^(x-2)`.
    Factors both numerator (positive exponents) and denominator (negative
    exponents).

- **Improved Cost Function for Negated Powers**: `Negate(Power(...))` now costs
  `3 + cost(exponent)`, consistent with the cost of `Multiply(-1, Power(...))`.
  This makes the cost model more accurate when comparing negated power forms.

### Assumptions & Types

- **Improved `ask()` Queries**: `ce.ask()` now matches patterns with wildcards
  correctly, can answer common "bound" queries such as
  `ask(["Greater", "x", "_k"])` and `ask(["Greater", "_x", "_k"])`, normalizes
  inequality patterns for matching (e.g. `ask(["Greater", "_x", 0])`), and falls
  back to `verify()` for closed predicates when the fact is known but not stored
  as an explicit assumption.

- **Tri-state `verify()`**: Implemented `ce.verify()` as a truth query that
  returns `true`, `false` or `undefined` when a predicate cannot be determined
  from the current assumptions and declarations. `And`/`Or`/`Not` use 3-valued
  logic.

- **`Element`/`NotElement` Type Membership**: `Element(x, T)` and
  `NotElement(x, T)` now support type-style RHS (e.g. `real`, `finite_real`,
  `number`, `any`) in addition to set collections (e.g. `RealNumbers`,
  `Integers`).

- **Value Resolution from Equality Assumptions**: After
  `ce.assume(['Equal', symbol, value])`, the symbol now evaluates to the assumed
  value:

  ```javascript
  ce.assume(ce.box(['Equal', 'one', 1]));
  ce.box('one').evaluate();               // → 1 (was: 'one')
  ce.box(['Equal', 'one', 1]).evaluate(); // → True (was: ['Equal', 'one', 1])
  ce.box(['Equal', 'one', 0]).evaluate(); // → False
  ce.box('one').type.matches('integer');  // → true
  ```

  This also fixes comparison evaluation: `Equal(symbol, assumed_value)` now
  correctly evaluates to `True` instead of staying symbolic.

- **Inequality Evaluation Using Assumptions**: Inequality comparisons can use
  transitive bounds extracted from assumptions.

  ```javascript
  ce.assume(ce.box(['Greater', 'x', 4]));
  ce.box(['Greater', 'x', 0]).evaluate();  // → True (x > 4 > 0)
  ce.box(['Less', 'x', 0]).evaluate();     // → False
  ce.box('x').isGreater(0);                // → true
  ce.box('x').isPositive;                  // → true
  ```

- **Type Inference from Assumptions**: Inequalities infer `real`; equalities
  infer from the value.

  ```javascript
  ce.assume(ce.box(['Greater', 'x', 4]));
  ce.box('x').type.toString();  // → 'real' (was: 'unknown')

  ce.assume(ce.box(['Equal', 'one', 1]));
  ce.box('one').type.toString();  // → 'integer' (was: 'unknown')
  ```

- **Tautology and Contradiction Detection**: `ce.assume()` returns `'tautology'`
  for redundant assumptions and `'contradiction'` for conflicts.

  ```javascript
  ce.assume(ce.box(['Greater', 'x', 4]));

  // Redundant assumption (x > 4 implies x > 0)
  ce.assume(ce.box(['Greater', 'x', 0]));  // → 'tautology' (was: 'ok')

  // Conflicting assumption (x > 4 contradicts x < 0)
  ce.assume(ce.box(['Less', 'x', 0]));     // → 'contradiction'

  // Same assumption repeated
  ce.assume(ce.box(['Equal', 'one', 1]));
  ce.assume(ce.box(['Equal', 'one', 1]));  // → 'tautology'

  // Conflicting equality
  ce.assume(ce.box(['Less', 'one', 0]));   // → 'contradiction'
  ```

### Solving

- **Systems of Linear Equations**: The `solve()` method now handles systems of
  linear equations parsed from LaTeX `\begin{cases}...\end{cases}` environments.
  Returns an object mapping variable names to their solutions.

  ```javascript
  const e = ce.parse('\\begin{cases}x+y=70\\\\2x-4y=80\\end{cases}');
  const result = e.solve(['x', 'y']);
  console.log(result.x.json);  // 60
  console.log(result.y.json);  // 10

  // 3x3 systems work too
  const e2 = ce.parse('\\begin{cases}x+y+z=6\\\\2x+y-z=1\\\\x-y+2z=5\\end{cases}');
  const result2 = e2.solve(['x', 'y', 'z']);
  // → { x: 1, y: 2, z: 3 }
  ```

  Non-linear systems that don't match known patterns and inconsistent systems
  return `null`.

- **Non-linear Polynomial Systems**: The `solve()` method now handles certain
  non-linear polynomial systems with 2 equations and 2 variables:
  - **Product + sum pattern**: Systems like `xy = p, x + y = s` are solved by
    recognizing that x and y are roots of the quadratic `t² - st + p = 0`.

  - **Substitution method**: When one equation is linear in one variable, it
    substitutes into the other equation and solves the resulting univariate
    equation.

  Returns an array of solution objects (multiple solutions possible):

  ```javascript
  // Product + sum pattern
  const e = ce.parse('\\begin{cases}xy=6\\\\x+y=5\\end{cases}');
  const result = e.solve(['x', 'y']);
  // → [{ x: 2, y: 3 }, { x: 3, y: 2 }]

  // Substitution method
  const e2 = ce.parse('\\begin{cases}x+y=5\\\\x^2+y=7\\end{cases}');
  const result2 = e2.solve(['x', 'y']);
  // → [{ x: 2, y: 3 }, { x: -1, y: 6 }]
  ```

  Only real solutions are returned; complex solutions are filtered out.

- **Exact Rational Arithmetic in Linear Systems**: The linear system solver now
  uses exact rational arithmetic throughout the Gaussian elimination process.
  Systems with fractional coefficients produce exact fractional results rather
  than floating-point approximations.

  ```javascript
  const e = ce.parse('\\begin{cases}x+y=1\\\\x-y=1/2\\end{cases}');
  const result = e.solve(['x', 'y']);
  console.log(result.x.json);  // ["Rational", 3, 4]  (exact 3/4)
  console.log(result.y.json);  // ["Rational", 1, 4]  (exact 1/4)

  // Fractional coefficients
  const e2 = ce.parse('\\begin{cases}x/3+y/2=1\\\\x/4+y/5=1\\end{cases}');
  const result2 = e2.solve(['x', 'y']);
  // → { x: 36/7, y: -10/7 }
  ```

- **Linear Inequality Systems**: The `solve()` method now handles systems of
  linear inequalities in 2 variables, returning the vertices of the feasible
  region (convex polygon). Supports all inequality operators: `<`, `<=`, `>`,
  `>=`.

  ```javascript
  // Triangle: x >= 0, y >= 0, x + y <= 10
  const e = ce.parse('\\begin{cases}x\\geq 0\\\\y\\geq 0\\\\x+y\\leq 10\\end{cases}');
  const result = e.solve(['x', 'y']);
  // → [{ x: 0, y: 0 }, { x: 10, y: 0 }, { x: 0, y: 10 }]

  // Square: 0 <= x <= 5, 0 <= y <= 5
  const square = ce.parse('\\begin{cases}x\\geq 0\\\\x\\leq 5\\\\y\\geq 0\\\\y\\leq 5\\end{cases}');
  square.solve(['x', 'y']);
  // → [{ x: 0, y: 0 }, { x: 5, y: 0 }, { x: 5, y: 5 }, { x: 0, y: 5 }]
  ```

  Vertices are returned in counterclockwise convex hull order. Returns `null`
  for infeasible systems or non-linear constraints.

- **Under-determined Systems (Parametric Solutions)**: The `solve()` method now
  returns parametric solutions for under-determined linear systems (fewer
  equations than variables) instead of returning `null`. Free variables appear
  as themselves in the solution, with other variables expressed in terms of
  them.

  ```javascript
  // Single equation with two variables
  const e = ce.parse('\\begin{cases}x+y=5\\end{cases}');
  const result = e.solve(['x', 'y']);
  // → { x: -y + 5, y: y }  (y is a free variable)

  // Two equations with three variables
  const e2 = ce.parse('\\begin{cases}x+y+z=6\\\\x-y=2\\end{cases}');
  const result2 = e2.solve(['x', 'y', 'z']);
  // → { x: -z/2 + 4, y: -z/2 + 2, z: z }  (z is a free variable)
  ```

  Inconsistent systems still return `null`.

- **Extended Sqrt Equation Solving**: The equation solver now handles sqrt
  equations of the form `√(f(x)) = g(x)` by squaring both sides and solving the
  resulting polynomial. Extraneous roots are automatically filtered.

  ```javascript
  ce.parse('\\sqrt{x+1} = x').solve('x');      // → [1.618...] (golden ratio)
  ce.parse('\\sqrt{2x+3} = x - 1').solve('x'); // → [4.449...]
  ce.parse('\\sqrt{3x-2} = x').solve('x');     // → [1, 2]
  ce.parse('\\sqrt{x} = x').solve('x');        // → [0, 1]
  ```

- **Two Sqrt Equation Solving**: The equation solver now handles equations with
  two sqrt terms of the form `√(f(x)) + √(g(x)) = e` using double squaring. Both
  addition and subtraction forms are supported, and extraneous roots are
  automatically filtered.

  ```javascript
  ce.parse('\\sqrt{x+1} + \\sqrt{x+4} = 3').solve('x');  // → [0]
  ce.parse('\\sqrt{x} + \\sqrt{x+7} = 7').solve('x');    // → [9]
  ce.parse('\\sqrt{x+5} - \\sqrt{x-3} = 2').solve('x');  // → [4]
  ce.parse('\\sqrt{2x+1} + \\sqrt{x-1} = 4').solve('x'); // → [46 - 8√29] ≈ 2.919
  ```

- **Nested Sqrt Equation Solving**: The equation solver now handles nested sqrt
  equations of the form `√(x + √x) = a` using substitution. These patterns have
  √x inside the argument of an outer sqrt. The solver uses u = √x substitution,
  solves the resulting quadratic, and filters negative u values.

  ```javascript
  ce.parse('\\sqrt{x + 2\\sqrt{x}} = 3').solve('x');  // → [11 - 2√10] ≈ 4.675
  ce.parse('\\sqrt{x + \\sqrt{x}} = 2').solve('x');   // → [9/2 - √17/2] ≈ 2.438
  ce.parse('\\sqrt{x - \\sqrt{x}} = 1').solve('x');   // → [φ²] ≈ 2.618
  ```

- **Quadratic Equations Without Constant Term**: Added support for solving
  quadratic equations of the form `ax² + bx = 0` (missing constant term). These
  are solved by factoring: `x(ax + b) = 0` → `x = 0` or `x = -b/a`.

  ```javascript
  ce.parse('x^2 + 3x = 0').solve('x');  // → [0, -3]
  ce.parse('2x^2 - 4x = 0').solve('x'); // → [0, 2]
  ```

### Subscripts & Indexing

- **Subscript Evaluation Handler**: Define custom evaluation functions for
  subscripted symbols like mathematical sequences using `subscriptEvaluate`:

  ```javascript
  // Define a Fibonacci sequence
  ce.declare('F', {
    subscriptEvaluate: (subscript, { engine }) => {
      const n = subscript.re;
      if (!Number.isInteger(n) || n < 0) return undefined;
      // Calculate Fibonacci number...
      return engine.number(fibValue);
    },
  });

  ce.parse('F_{10}').evaluate();  // → 55
  ce.parse('F_5').evaluate();     // → 5
  ce.parse('F_n').evaluate();     // → stays symbolic (handler returns undefined)
  ```

  Both simple subscripts (`F_5`) and complex subscripts (`F_{5}`) are supported.
  When the handler returns `undefined`, the expression stays symbolic.
  Subscripted expressions with `subscriptEvaluate` have type `number` and can be
  used in arithmetic operations: `ce.parse('F_{5} + F_{3}').evaluate()` works
  correctly.

- **Type-Aware Subscript Handling**: Subscripts on symbols declared as
  collection types (list, tuple, matrix, etc.) now automatically convert to
  `At()` indexing operations:

  ```javascript
  ce.declare('v', 'list<number>');
  ce.parse('v_n');      // → At(v, n)
  ce.parse('v_{n+1}');  // → At(v, n+1)
  ce.parse('v_{i,j}');  // → At(v, Tuple(i, j))
  ```

  This works for both simple subscripts (`v_n`) and complex subscripts
  (`v_{n+1}`). The type of the `At()` expression is correctly inferred from the
  collection's element type, allowing subscripted collection elements to be used
  in arithmetic.

- **Complex Subscripts in Arithmetic** (Issue #273): Subscript expressions like
  `a_{n+1}` can now be used in arithmetic operations without type errors:

  ```javascript
  ce.parse('a_{n+1} + 1');     // → Add(Subscript(a, n+1), 1)
  ce.parse('2 * a_{n+1}');     // → Multiply(2, Subscript(a, n+1))
  ce.parse('a_{n+1}^2');       // → Power(Subscript(a, n+1), 2)
  ```

  Previously, complex subscripts would fail with "incompatible-type" errors when
  used in arithmetic contexts.

- **Multi-Index `At()` Support**: The `At` function now supports multiple
  indices for accessing nested collections (e.g., matrices):

  ```javascript
  const matrix = ce.box(['List', ['List', 2, 3, 4], ['List', 6, 7, 9]]);
  ce.box(['At', matrix, 1, 2]).evaluate();  // → 3 (row 1, column 2)
  ```

  The signature was updated from single index to variadic:
  `(value: indexed_collection, index: (number|string)+) -> unknown`

- **Text Subscripts**: Added support for `\text{}` in subscripts, allowing
  descriptive subscript names:

  ```javascript
  ce.parse('x_{\\text{max}}');  // → symbol "x_max"
  ce.parse('v_{\\text{initial}}');  // → symbol "v_initial"
  ```

### Sequences

- **Declarative Sequence Definitions**: Define mathematical sequences using
  recurrence relations with the new `declareSequence()` method:

  ```javascript
  // Fibonacci sequence
  ce.declareSequence('F', {
    base: { 0: 0, 1: 1 },
    recurrence: 'F_{n-1} + F_{n-2}',
  });
  ce.parse('F_{10}').evaluate();  // → 55
  ce.parse('F_{20}').evaluate();  // → 6765

  // Arithmetic sequence: a_n = a_{n-1} + 2, a_0 = 1
  ce.declareSequence('A', {
    base: { 0: 1 },
    recurrence: 'A_{n-1} + 2',
  });
  ce.parse('A_{5}').evaluate();  // → 11

  // Factorial via recurrence
  ce.declareSequence('H', {
    base: { 0: 1 },
    recurrence: 'n \\cdot H_{n-1}',
  });
  ce.parse('H_{5}').evaluate();  // → 120
  ```

  Features:
  - Base cases as index → value mapping
  - Recurrence relation as LaTeX string or BoxedExpression
  - Automatic memoization for efficient evaluation (configurable)
  - Custom index variable name (default: `n`)
  - Domain constraints (min/max valid indices)
  - Symbolic subscripts stay symbolic (e.g., `F_k` remains unevaluated)

  Alternatively, sequences can be defined using natural LaTeX assignment
  notation:

  ```javascript
  // Arithmetic sequence via LaTeX
  ce.parse('L_0 := 1').evaluate();
  ce.parse('L_n := L_{n-1} + 2').evaluate();
  ce.parse('L_{5}').evaluate();  // → 11

  // Fibonacci via LaTeX
  ce.parse('F_0 := 0').evaluate();
  ce.parse('F_1 := 1').evaluate();
  ce.parse('F_n := F_{n-1} + F_{n-2}').evaluate();
  ce.parse('F_{10}').evaluate();  // → 55
  ```

  Base cases and recurrence can be defined in any order. The sequence is
  finalized when both are present.

- **Sequence Status API**: Query the status of sequence definitions with
  `getSequenceStatus()`:

  ```javascript
  ce.parse('F_0 := 0').evaluate();
  ce.getSequenceStatus('F');
  // → { status: 'pending', hasBase: true, hasRecurrence: false, baseIndices: [0] }

  ce.parse('F_n := F_{n-1} + F_{n-2}').evaluate();
  ce.getSequenceStatus('F');
  // → { status: 'complete', hasBase: true, hasRecurrence: true, baseIndices: [0] }

  ce.getSequenceStatus('x');
  // → { status: 'not-a-sequence', hasBase: false, hasRecurrence: false }
  ```

- **Sequence Introspection API**: Inspect and manage defined sequences:

  ```javascript
  // Get sequence information
  ce.getSequence('F');
  // → { name: 'F', variable: 'n', baseIndices: [0, 1], memoize: true, cacheSize: 5 }

  // List all defined sequences
  ce.listSequences();  // → ['F', 'A', 'H']

  // Check if a symbol is a sequence
  ce.isSequence('F');  // → true
  ce.isSequence('x');  // → false

  // Manage memoization cache
  ce.getSequenceCache('F');  // → Map { 2 => 1, 3 => 2, ... }
  ce.clearSequenceCache('F');  // Clear cache for specific sequence
  ce.clearSequenceCache();     // Clear all sequence caches
  ```

- **Generate Sequence Terms**: Generate a list of sequence terms with
  `getSequenceTerms()`:

  ```javascript
  ce.declareSequence('F', {
    base: { 0: 0, 1: 1 },
    recurrence: 'F_{n-1} + F_{n-2}',
  });

  ce.getSequenceTerms('F', 0, 10);
  // → [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]

  // With step parameter (every other term)
  ce.getSequenceTerms('F', 0, 10, 2);
  // → [0, 1, 3, 8, 21, 55]
  ```

- **Sum and Product over Sequences**: `Sum` and `Product` now work seamlessly
  with user-defined sequences:

  ```javascript
  ce.declareSequence('F', {
    base: { 0: 0, 1: 1 },
    recurrence: 'F_{n-1} + F_{n-2}',
  });

  ce.parse('\\sum_{k=0}^{10} F_k').evaluate();  // → 143
  ce.parse('\\prod_{k=1}^{5} A_k').evaluate();  // Works with any defined sequence
  ```

- **OEIS Integration**: Look up sequences in the Online Encyclopedia of Integer
  Sequences (OEIS) and verify your sequences against known mathematical
  sequences:

  ```javascript
  // Look up a sequence by its terms
  const results = await ce.lookupOEIS([0, 1, 1, 2, 3, 5, 8, 13]);
  // → [{ id: 'A000045', name: 'Fibonacci numbers', terms: [...], url: '...' }]

  // Check if your sequence matches a known OEIS sequence
  ce.declareSequence('F', {
    base: { 0: 0, 1: 1 },
    recurrence: 'F_{n-1} + F_{n-2}',
  });

  const result = await ce.checkSequenceOEIS('F', 10);
  // → { matches: [{ id: 'A000045', name: 'Fibonacci numbers', ... }], terms: [...] }
  ```

  Note: OEIS lookups require network access to oeis.org.

- **Multi-Index Sequences**: Define sequences with multiple indices like
  Pascal's triangle `P_{n,k}` or grid-based recurrences:

  ```javascript
  // Pascal's Triangle: P_{n,k} = P_{n-1,k-1} + P_{n-1,k}
  ce.declareSequence('P', {
    variables: ['n', 'k'],
    base: { 'n,0': 1, 'n,n': 1 },  // Pattern-based base cases
    recurrence: 'P_{n-1,k-1} + P_{n-1,k}',
    domain: { n: { min: 0 }, k: { min: 0 } },
    constraints: 'k <= n',  // k must not exceed n
  });

  ce.parse('P_{5,2}').evaluate();  // → 10
  ce.parse('P_{10,5}').evaluate(); // → 252
  ```

  Features:
  - Multiple index variables with `variables: ['n', 'k']`
  - Pattern-based base cases: `'n,0'` matches any (n, 0), `'n,n'` matches
    diagonal
  - Per-variable domain constraints
  - Constraint expressions (e.g., `'k <= n'`)
  - Composite key memoization (e.g., `'5,2'`)
  - Full introspection support with `isMultiIndex` flag

  Pattern matching for base cases:
  - Exact values: `'0,0'` matches only (0, 0)
  - Wildcards: `'n,0'` matches any value for n with k=0
  - Equality: `'n,n'` matches when both indices are equal
  - Priority: exact matches are checked before patterns

### Special Functions

- **Special Function Definitions**: Added type signatures for special
  mathematical functions, enabling them to be used in expressions without type
  errors:
  - `Zeta` - Riemann zeta function $\zeta(s)$
  - `Beta` - Euler beta function $B(a,b) = \Gamma(a)\Gamma(b)/\Gamma(a+b)$
  - `LambertW` - Lambert W function (product logarithm)
  - `BesselJ`, `BesselY`, `BesselI`, `BesselK` - Bessel functions of
    first/second kind
  - `AiryAi`, `AiryBi` - Airy functions

  These functions now have proper signatures and can be composed with other
  expressions: `ce.box(['Add', 1, ['LambertW', 'x']])` works correctly.

- **Special Function LaTeX Parsing**: Added LaTeX parsing support for special
  functions: `\zeta(s)`, `\Beta(a,b)`, `\operatorname{W}(x)`, Bessel functions
  via `\operatorname{J}`, `\operatorname{Y}`, etc., and Airy functions via
  `\operatorname{Ai}`, `\operatorname{Bi}`.

### Calculus

- **LambertW Derivative**: Added derivative rule for the Lambert W function:
  `d/dx W(x) = W(x)/(x·(1+W(x)))`

- **Bessel Function Derivatives**: Added derivative support for all four Bessel
  function types using order-dependent recurrence relations:

  ```javascript
  ce.box(['D', ['BesselJ', 'n', 'x'], 'x']).evaluate();
  // → 1/2 * BesselJ(n-1, x) - 1/2 * BesselJ(n+1, x)

  ce.box(['D', ['BesselI', 'n', 'x'], 'x']).evaluate();
  // → 1/2 * BesselI(n-1, x) + 1/2 * BesselI(n+1, x)

  ce.box(['D', ['BesselK', 'n', 'x'], 'x']).evaluate();
  // → -1/2 * BesselK(n-1, x) - 1/2 * BesselK(n+1, x)
  ```

  Chain rule is automatically applied for composite arguments.

- **Multi-Argument Function Derivatives**: Added derivative support for:
  - **Log(x, base)** - Logarithm with custom base:

    ```javascript
    ce.box(['D', ['Log', 'x', 2], 'x']).evaluate();  // → 1/(x·ln(2))
    ce.box(['D', ['Log', 'x', 'a'], 'x']).evaluate(); // → 1/(x·ln(a))
    ```

    Also handles cases where both x and base depend on the variable by applying
    the quotient rule to ln(x)/ln(base).

  - **Discrete functions (Mod, GCD, LCM)** - Return 0 as these are step
    functions with derivative 0 almost everywhere:
    ```javascript
    ce.box(['D', ['Mod', 'x', 5], 'x']).evaluate();  // → 0
    ce.box(['D', ['GCD', 'x', 6], 'x']).evaluate();  // → 0
    ```

- **Integration of `1/(x·ln(x))` Pattern**: Added support for integrating
  expressions where the denominator is a product and one factor is the
  derivative of another:

  ```javascript
  ce.parse('\\int \\frac{1}{x\\ln x} dx').evaluate();  // → ln(|ln(x)|)
  ce.parse('\\int \\frac{3}{x\\ln x} dx').evaluate();  // → 3·ln(|ln(x)|)
  ```

  This uses u-substitution: since `1/x = d/dx(ln(x))`, the integral becomes
  `∫ h'(x)/h(x) dx = ln|h(x)|`.

- **Cyclic Integration for e^x with Trigonometric Functions**: Added support for
  integrating products of exponentials and trigonometric functions that require
  the "solve for the integral" technique:

  ```javascript
  ce.parse('\\int e^x \\sin x dx').evaluate();
  // → -1/2·cos(x)·e^x + 1/2·sin(x)·e^x

  ce.parse('\\int e^x \\cos x dx').evaluate();
  // → 1/2·sin(x)·e^x + 1/2·cos(x)·e^x

  // Also works with linear arguments:
  ce.parse('\\int e^x \\sin(2x) dx').evaluate();
  // → -2/5·cos(2x)·e^x + 1/5·sin(2x)·e^x

  ce.parse('\\int e^x \\cos(2x) dx').evaluate();
  // → 1/5·cos(2x)·e^x + 2/5·sin(2x)·e^x
  ```

  These patterns cannot be solved by standard integration by parts (which would
  lead to infinite recursion) and instead use direct formulas:
  - `∫ e^x·sin(ax+b) dx = (e^x/(a²+1))·(sin(ax+b) - a·cos(ax+b))`
  - `∫ e^x·cos(ax+b) dx = (e^x/(a²+1))·(a·sin(ax+b) + cos(ax+b))`

- **Derivative Recursion Safety**: Added recursion protection to
  `differentiate()` with a depth limit (`MAX_DIFFERENTIATION_DEPTH`), returning
  `undefined` when the limit is exceeded.

- **Equation Equivalence in `isEqual()`** (Issue #275): Two equations are now
  recognized as equivalent if they have the same solution set:

  ```javascript
  ce.parse('2x+1=0').isEqual(ce.parse('x=-1/2'));   // → true
  ce.parse('3x+1=0').isEqual(ce.parse('6x+2=0'));   // → true
  ```

  Uses sampling to check whether (LHS₁-RHS₁)/(LHS₂-RHS₂) is a non-zero constant.

### Logic

- **Boolean Simplification Rules**: Added absorption laws and improved boolean
  expression simplification:
  - **Absorption**: `A ∧ (A ∨ B) → A` and `A ∨ (A ∧ B) → A`
  - **Idempotence**: `A ∧ A → A` and `A ∨ A → A`
  - **Complementation**: `A ∧ ¬A → False` and `A ∨ ¬A → True`
  - **Identity**: `A ∧ True → A` and `A ∨ False → A`
  - **Domination**: `A ∧ False → False` and `A ∨ True → True`
  - **Double negation**: `¬¬A → A`

  These rules are applied automatically during simplification:

  ```javascript
  ce.box(['And', 'A', ['Or', 'A', 'B']]).simplify();  // → A
  ce.box(['Or', 'A', ['And', 'A', 'B']]).simplify();  // → A
  ```

- **Prime Implicants and Minimal Normal Forms**: Added Quine-McCluskey algorithm
  for finding prime implicants/implicates and computing minimal CNF/DNF:
  - `PrimeImplicants(expr)` - Find all prime implicants (minimal product terms)
  - `PrimeImplicates(expr)` - Find all prime implicates (minimal sum clauses)
  - `MinimalDNF(expr)` - Convert to minimal DNF using prime implicant cover
  - `MinimalCNF(expr)` - Convert to minimal CNF using prime implicate cover

  ```javascript
  // Find prime implicants (terms that can't be further simplified)
  ce.box(['PrimeImplicants', ['Or', ['And', 'A', 'B'], ['And', 'A', ['Not', 'B']]]]).evaluate();
  // → [A] (AB and A¬B combine to just A)

  // Compute minimal DNF
  ce.box(['MinimalDNF', ['Or',
    ['And', 'A', 'B'],
    ['And', 'A', ['Not', 'B']],
    ['And', ['Not', 'A'], 'B']
  ]]).evaluate();
  // → A ∨ B (simplified from 3 terms to 2)
  ```

  Limited to 12 variables to prevent exponential blowup; larger expressions
  return unevaluated.

### Linear Algebra

- **Matrix Decompositions**: Added four matrix decomposition functions for
  numerical linear algebra:
  - `LUDecomposition(A)` → `[P, L, U]` - LU factorization with partial pivoting
  - `QRDecomposition(A)` → `[Q, R]` - QR factorization using Householder
    reflections
  - `CholeskyDecomposition(A)` → `L` - Cholesky factorization for positive
    definite matrices
  - `SVD(A)` → `[U, Σ, V]` - Singular Value Decomposition

  ```javascript
  ce.box(['LUDecomposition', [[4, 3], [6, 3]]]).evaluate();
  // → [P, L, U] where PA = LU

  ce.box(['QRDecomposition', [[1, 2], [3, 4]]]).evaluate();
  // → [Q, R] where A = QR, Q orthogonal, R upper triangular

  ce.box(['CholeskyDecomposition', [[4, 2], [2, 2]]]).evaluate();
  // → L where A = LL^T

  ce.box(['SVD', [[1, 2], [3, 4]]]).evaluate();
  // → [U, Σ, V] where A = UΣV^T
  ```

### Fixed

- **replace() Literal Matching in Object Rules**:
  `.replace({ match: 'a', replace: 2 })` no longer treats `'a'` as a wildcard
  (string rules like `"a*x -> 2*x"` still auto-wildcard).

  ```javascript
  const expr = ce.box(['Add', ['Multiply', 'a', 'x'], 'b']);
  expr.replace({match: 'a', replace: 2}, {recursive: true});
  // → 2x + b (was: 2 - incorrectly matched entire expression)
  ```

- **forget() Clears Assumed Values**: `ce.forget()` now clears values set by
  equality assumptions across all evaluation context frames.

  ```javascript
  ce.assume(ce.box(['Equal', 'x', 5]));
  ce.box('x').evaluate();  // → 5
  ce.forget('x');
  ce.box('x').evaluate();  // → 'x' (was: 5)
  ```

- **Scoped Assumptions Clean Up on popScope()**: Assumptions made inside a scope
  no longer leak after `popScope()`.

  ```javascript
  ce.pushScope();
  ce.assume(ce.box(['Equal', 'y', 10]));
  ce.box('y').evaluate();  // → 10
  ce.popScope();
  ce.box('y').evaluate();  // → 'y' (was: 10)
  ```

- **Extraneous Root Filtering for Sqrt Equations**: Candidate solutions are now
  validated against the original expression (before clearing denominators /
  harmonization) to filter extraneous roots.

  Examples of equations that now correctly filter extraneous roots:
  - `√x = x - 2` → returns `[4]` (filters out x=1)
  - `√x + x - 2 = 0` → returns `[1]` (filters out x=4)
  - `√x - x + 2 = 0` → returns `[4]` (filters out x=1)
  - `x - 2√x - 3 = 0` → returns `[9]` (filters out x=1)
  - `2x + 3√x - 2 = 0` → returns `[1/4]` (filters out x=4)

- **Simplification (#178)**:
  - Safer division canonicalization for denominators that may simplify to `0`
  - Implicit multiplication powers: `xx` → `x^2`
  - Targeted exp/log rewriting for `\exp(\log(x)±y)`

## 0.33.0 _2026-01-30_

### Resolved Issues

#### Arithmetic and Infinity

- **Division by Zero**: Improved handling of division by zero:
  - `0/0` returns `NaN` (indeterminate form)
  - `a/0` where `a ≠ 0` returns `ComplexInfinity` (~∞) as a "better NaN" that
    indicates an infinite result with unknown sign
  - This applies to all forms including `1/0`, `x/0`, and rational literals

- **Infinity Sign Propagation**: Fixed infinity multiplication not propagating
  signs correctly. Now `∞ * (-2) = -∞` and `-∞ * 2 = -∞` as expected.

- **Infinity Division**: Fixed `∞/∞` incorrectly returning `1`. Now correctly
  returns `NaN` (indeterminate form). The `a/a → 1` simplification rule now
  excludes infinity values.

#### Trigonometry

- **Trigonometric Period Identities**: Fixed incorrect sign handling for
  `csc(π+x)` and `cot(π+x)`:
  - `csc(π+x)` now correctly simplifies to `-csc(x)` (was incorrectly `csc(x)`)
  - `cot(π+x)` now correctly simplifies to `cot(x)` (was incorrectly `-cot(x)`,
    cotangent has period π)

- **Trigonometric Co-function Identities**: Fixed co-function identities not
  applying to canonical form expressions. Now correctly simplifies:
  - `sin(π/2 - x)` → `cos(x)`
  - `cos(π/2 - x)` → `sin(x)`
  - `tan(π/2 - x)` → `cot(x)`
  - `cot(π/2 - x)` → `tan(x)`
  - `sec(π/2 - x)` → `csc(x)`
  - `csc(π/2 - x)` → `sec(x)`

- **Double Angle with Coefficient**: Fixed `2sin(x)cos(x)` not simplifying to
  `sin(2x)`. The product-to-sum identity now handles coefficients:
  - `2sin(x)cos(x)` → `sin(2x)`
  - `c·sin(x)cos(x)` → `c·sin(2x)/2` for any coefficient `c`

- **Trigonometric Product Identities**: Improved handling of trig products in
  simplification. The Multiply rule now correctly defers to trig-specific rules
  for patterns like `sin(x)*cos(x)` and `tan(x)*cot(x)`, ensuring these are
  simplified to `sin(2x)/2` and `1` respectively.

#### Logarithms and Exponentials

- **Logarithm-Exponential Composition**: Fixed `log(exp(x))` incorrectly
  simplifying to `x`. Now correctly returns `x/ln(10)` ≈ `0.434x` since
  `log₁₀(eˣ) = x·log₁₀(e) = x/ln(10)`. The identity `log(exp(x)) = x` only holds
  for natural logarithm.

- **Logarithm of e**: Added simplification for `log(e)` → `1/ln(10)` ≈ `0.434`
  and `log_c(e)` → `1/ln(c)` for any base `c`.

- **Logarithm Combination Base Preservation**: Fixed `log(x) + log(y)` (base 10)
  incorrectly becoming `ln(xy)`. Now correctly produces `log(xy)` preserving the
  original base.

- **Logarithm Quotient Rule**: Added expansion rule for logarithm of quotients.
  `ln(x/y)` now simplifies to `ln(x) - ln(y)` when x and y are known positive.
  Similarly for any base: `log_c(x/y)` → `log_c(x) - log_c(y)`.

- **Exponential-Logarithm Composition**: Added simplification for `exp(log(x))`
  where log has a different base than e. Now `e^log(x)` → `x^{1/ln(10)}` and
  more generally `e^log_c(x)` → `x^{1/ln(c)}` for any base c.

#### Powers and Exponents

- **Zero Power with Symbolic Exponent**: Fixed `0^π` and similar expressions
  with positive symbolic exponents not simplifying. Now `0^x` → `0` when `x` is
  known to be positive (including `π`, `e`, etc.).

- **Exponent Evaluation in Products**: Fixed `(x³)² · (y²)²` not simplifying to
  `x⁶y⁴`. Numeric subexpressions in exponents (like `2×3` in `x^{2×3}`) are now
  evaluated when the expression is part of a product.

- **Negative Exponents on Fractions**: Fixed `(a/b)^{-n}` not simplifying
  properly. Now `(x³/y²)^{-2}` correctly simplifies to `y⁴/x⁶` during
  canonicalization by distributing the negative exponent.

- **Negative Base with Fractional Exponent**: Fixed `(-ax)^{p/q}` returning
  complex results when `p` and `q` are both odd. Now correctly factors out the
  negative sign: `(-2x)^{3/5}` → `-(2x)^{3/5}` = `-2^{3/5}·x^{3/5}`, giving real
  results. This affects products like `(-2x)^{3/5}·x` which now correctly
  simplify to `-2^{3/5}·x^{8/5}` instead of returning an imaginary value.

#### Radicals

- **Radical Perfect Square Factoring**: Fixed `√(x²y)` not simplifying to
  `|x|√y`. Adjusted cost function to penalize radicals containing perfect
  squares, enabling the simplification rule to apply.

- **Generalized Root Extraction**: Added comprehensive root simplification
  rules:
  - `√[n]{x^m}` → `x^{m/n}` for odd roots (always valid)
  - `√[n]{x^m}` → `|x|^{m/n}` for even roots with integer result
  - `√{x^{odd}}` → `|x|^n · √x` factoring (e.g., `√{x⁵}` → `|x|²√x`)
  - Handles all combinations: `√[4]{x⁶}` → `|x|^{3/2}`, `√[3]{x⁶}` → `x²`

- **Symbolic Radicals Preservation**: Fixed numeric radicals (`√2`, `∛5`,
  `2^{3/5}`) being evaluated to floating-point approximations during
  multiplication. Now `x * √2` stays as `√2 · x` instead of `1.414... · x`, and
  `x * 2^{1/3}` stays as `x · ∛2` instead of `1.259... · x`. This preserves
  exact irrational values and allows proper algebraic manipulation. Use `.N()`
  to get numeric approximations when needed.

#### LaTeX Parsing

- **LaTeX `\exp()` Juxtaposition**: Fixed adjacent `\exp()` calls not parsing as
  multiplication. Now `\exp(x)\exp(2)` correctly parses as `e^x · e^2` instead
  of producing a parse error. The expression then simplifies to `e^{x+2}` as
  expected.

### Features

#### Trigonometry

- **Fu Algorithm for Trigonometric Simplification**: Implemented the Fu
  algorithm based on Fu, Zhong, and Zeng's paper "Automated and readable
  simplification of trigonometric expressions" (2006). This provides systematic,
  high-quality trigonometric simplification through:
  - **Transformation Rules (TR1-TR22)**: Comprehensive set of rewrite rules
    including reciprocal conversions (sec→1/cos), ratio forms (tan→sin/cos),
    Pythagorean substitutions (sin²+cos²=1), power reductions, product-to-sum,
    sum-to-product, angle expansion/contraction, and Morrie's law for cosine
    product chains.

  - **Rule Lists (RL1, RL2)**: Organized application sequences for tan/cot
    expressions and sin/cos expressions respectively, with greedy selection of
    optimal results.

  - **Cost Function**: Minimizes trigonometric function count as primary metric,
    with leaf count as secondary, to find the most readable form.

  **Usage**:

  ```typescript
  // Option 1: Use strategy option with simplify()
  const result = expr.simplify({ strategy: 'fu' });

  // Option 2: Dedicated trigSimplify() method
  const result = expr.trigSimplify();
  ```

  **Examples**:
  - `sin(x)⁴ - cos(x)⁴` → `-cos(2x)`
  - `tan(x)·cot(x)` → `1`
  - `sin²(x) + cos²(x)` → `1`
  - `2sin(x)cos(x)` → `sin(2x)`
  - `cos(x)·cos(2x)·cos(4x)` → `sin(8x)/(8sin(x))` (Morrie's law)

  **Enhanced Transformations**:
  - **TRmorrie with Rational Coefficients**: Morrie's law now handles angles
    that are rational multiples of π, such as `cos(π/9)·cos(2π/9)·cos(4π/9)` →
    `1/8`. The algorithm detects maximal geometric sequences and handles cases
    where the sine terms cancel to produce pure fractions.

  - **TR12i Tangent Sum Identity**: Recognizes the pattern
    `tan(A) + tan(B) - k·tan(A)·tan(B)` and simplifies to `-tan(C)` when
    `A + B + C = π` and `k = tan(C)`. Works with standard angles (π/6, π/4, π/3,
    etc.) and handles sign variations.

  - **TRpythagorean for Compound Expressions**: Detects `sin²(x) + cos²(x)`
    pairs within larger Add expressions and simplifies them to 1, e.g.,
    `sin²(x) + cos²(x) + 2` → `3`.

  - **Early TR9 Sum-to-Product**: Applies sum-to-product transformation before
    angle expansion to catch patterns like `sin(x+h) + sin(x-h)` →
    `2sin(x)cos(h)` that would otherwise be expanded and lose their simplified
    form.

  - **Dual Strategy Approach**: The Fu strategy now tries both "Fu first" and
    "simplify first" approaches and picks the best result. This handles both
    Morrie-like patterns (which need Fu before evaluation) and period reduction
    patterns (which need simplification first for angle contraction).

- **Trigonometric Periodicity Reduction**: Trigonometric functions now simplify
  arguments containing integer multiples of π:
  - `sin(5π + k)` → `-sin(k)` (period 2π, with sign change for odd multiples)
  - `cos(4π + k)` → `cos(k)` (period 2π)
  - `tan(3π + k)` → `tan(k)` (period π)
  - Works for all six trig functions: sin, cos, tan, cot, sec, csc
  - Handles both positive and negative multiples of π

- **Pythagorean Trigonometric Identities**: Added simplification rules for all
  Pythagorean identities:
  - `sin²(x) + cos²(x)` → `1`
  - `1 - sin²(x)` → `cos²(x)` and `1 - cos²(x)` → `sin²(x)`
  - `sin²(x) - 1` → `-cos²(x)` and `cos²(x) - 1` → `-sin²(x)`
  - `tan²(x) + 1` → `sec²(x)` and `sec²(x) - 1` → `tan²(x)`
  - `1 + cot²(x)` → `csc²(x)` and `csc²(x) - 1` → `cot²(x)`
  - `a·sin²(x) + a·cos²(x)` → `a` (with coefficient)

- **Trigonometric Equation Solving**: The `solve()` method now handles basic
  trigonometric equations:
  - `sin(x) = a` → `x = arcsin(a)` and `x = π - arcsin(a)` (two solutions)
  - `cos(x) = a` → `x = arccos(a)` and `x = -arccos(a)` (two solutions)
  - `tan(x) = a` → `x = arctan(a)` (one solution per period)
  - `cot(x) = a` → `x = arccot(a)`
  - Supports coefficient form: `a·sin(x) + b = 0`
  - Domain validation: returns no solutions when |a| > 1 for sin/cos
  - Automatic deduplication of equivalent solutions (e.g., `cos(x) = 1` → single
    solution `0`)

#### Calculus

- **([#163](https://github.com/cortex-js/compute-engine/issues/163)) Additional
  Derivative Notations**: Added support for parsing multiple derivative
  notations beyond Leibniz notation:
  - **Newton's dot notation** for time derivatives: `\dot{x}` →
    `["D", "x", "t"]`, `\ddot{x}` for second derivative, `\dddot{x}` and
    `\ddddot{x}` for higher orders. The time variable is configurable via the
    new `timeDerivativeVariable` parser option (default: `"t"`).

  - **Lagrange prime notation with arguments**: `f'(x)` now parses to
    `["D", ["f", "x"], "x"]`, inferring the differentiation variable from the
    function argument. Works for `f''(x)`, `f'''(x)`, etc. for higher
    derivatives.

  - **Euler's subscript notation**: `D_x f` → `["D", "f", "x"]` and `D^2_x f` or
    `D_x^2 f` for second derivatives.

  - **Derivative serialization**: `D` expressions now serialize to Leibniz
    notation (`\frac{\mathrm{d}}{\mathrm{d}x}f`) for consistent round-trip
    parsing.

- **Derivative Rules for Special Functions**: Added derivative formulas for:
  - `d/dx Digamma(x) = Trigamma(x)`
  - `d/dx Erf(x)`, `d/dx Erfc(x)`, `d/dx Erfi(x)`
  - `d/dx FresnelS(x)`, `d/dx FresnelC(x)`
  - `d/dx LogGamma(x) = Digamma(x)`

#### Special Functions

- **Special Function Definitions**: Added type signatures for Digamma, Trigamma,
  and PolyGamma functions to the library:
  - `Digamma(x)` - The digamma function ψ(x), logarithmic derivative of Gamma
  - `Trigamma(x)` - The trigamma function ψ₁(x), derivative of digamma
  - `PolyGamma(n, x)` - The polygamma function ψₙ(x), nth derivative of digamma

#### Logarithms and Exponentials

- **Logarithm Combination Rules**: Added simplification rules that combine
  logarithms with the same base:
  - `ln(x) + ln(y)` → `ln(xy)` (addition combines via multiplication)
  - `ln(x) - ln(y)` → `ln(x/y)` (subtraction combines via division)
  - `log_c(x) + log_c(y)` → `log_c(xy)` (works with any base)
  - `log_c(x) - log_c(y)` → `log_c(x/y)`
  - Handles multiple terms: `ln(a) + ln(b) - ln(c)` → `ln(ab/c)`

- **Exponential e Simplification**: Added rules for combining powers of e:
  - `eˣ · eʸ` → `e^(x+y)` (same-base multiplication)
  - `eˣ / eʸ` → `e^(x-y)` (same-base division)
  - `eˣ · e` → `e^(x+1)` and `eˣ / e` → `e^(x-1)`
  - Preserves symbolic form instead of evaluating e^n numerically

#### Powers and Exponents

- **Negative Base Power Simplification**: Added rules to simplify powers with
  negated bases:
  - `(-x)^n` → `x^n` when n is even (e.g., `(-x)^4` → `x^4`)
  - `(-x)^n` → `-x^n` when n is odd (e.g., `(-x)^3` → `-x^3`)
  - `(-x)^{n/m}` → `x^{n/m}` when n is even and m is odd
  - `(-x)^{n/m}` → `-x^{n/m}` when both n and m are odd
  - `(-1)^{p/q}` → `-1` when both p and q are odd (real odd root)

- **Power Distribution**: Added rule to distribute integer exponents over
  products:
  - `(ab)^n` → `a^n · b^n` when n is an integer
  - Example: `(x³y²)²` → `x⁶y⁴`
  - Example: `(-2x)²` → `4x²`

- **Same-Base Power Combination**: Improved power combination for products with
  3+ terms:
  - `a³ · a · a²` → `a⁶` (combines all same-base terms)
  - Works with unknown symbols when sum of exponents is positive
  - Handles mixed products: `b³c²dx⁷ya⁵gb²x⁵(3b)` → `3dgyx¹²b⁶a⁵c²`

#### Sum and Product

- **([#133](https://github.com/cortex-js/compute-engine/issues/133))
  Element-based Indexing Sets for Sum/Product**: Added support for `\in`
  notation in summation and product subscripts:
  - **Parsing**: `\sum_{n \in \{1,2,3\}} n` now correctly parses to
    `["Sum", "n", ["Element", "n", ["Set", 1, 2, 3]]]` instead of silently
    dropping the constraint.

  - **Evaluation**: Sums and products over finite sets, lists, and ranges are
    now evaluated correctly:
    - `\sum_{n \in \{1,2,3\}} n` → `6`
    - `\sum_{n \in \{1,2,3\}} n^2` → `14`
    - `\prod_{k \in \{1,2,3,4\}} k` → `24`

  - **Serialization**: Element-based indexing sets serialize back to LaTeX with
    proper `\in` notation: `\sum_{n\in \{1, 2, 3\}}n`

  - **Range support**: Works with `Range` expressions via `ce.box()`:
    `["Sum", "n", ["Element", "n", ["Range", 1, 5]]]` → `15`

  - **Bracket notation as Range**: Two-element integer lists in bracket notation
    `[a,b]` are now treated as Range(a,b) when used in Element context:
    - `\sum_{n \in [1,5]} n` → `15` (iterates 1, 2, 3, 4, 5)
    - Previously returned `6` (treated as List with just elements 1 and 5)

  - **Interval support**: `Interval` expressions work with Element-based
    indexing, including support for `Open` and `Closed` boundary markers:
    - `["Interval", 1, 5]` → iterates integers 1, 2, 3, 4, 5 (closed bounds)
    - `["Interval", ["Open", 0], 5]` → iterates 1, 2, 3, 4, 5 (excludes 0)
    - `["Interval", 1, ["Open", 6]]` → iterates 1, 2, 3, 4, 5 (excludes 6)

  - **Infinite series with Element notation**: Known infinite integer sets are
    converted to their equivalent Limits form and iterated (capped at
    1,000,000):
    - `NonNegativeIntegers` (ℕ₀) → iterates from 0, like `\sum_{n=0}^{\infty}`
    - `PositiveIntegers` (ℤ⁺) → iterates from 1, like `\sum_{n=1}^{\infty}`
    - Convergent series produce numeric approximations:
      `\sum_{n \in \Z^+} \frac{1}{n^2}` → `≈1.6449` (close to π²/6)

  - **Non-enumerable domains stay symbolic**: When the domain cannot be
    enumerated (unknown symbol, non-iterable infinite set, or symbolic bounds),
    the expression stays symbolic instead of returning NaN:
    - `\sum_{n \in S} n` with unknown `S` → stays as
      `["Sum", "n", ["Element", "n", "S"]]`
    - `\sum_{n \in \Z} n` → stays symbolic (bidirectional, can't forward
      iterate)
    - `\sum_{x \in \R} f(x)` → stays symbolic (non-countable)
    - `\sum_{n \in [1,a]} n` with symbolic bound → stays symbolic
    - Previously these would all return `NaN` with no explanation

  - **Multiple Element indexing sets**: Comma-separated Element expressions now
    parse and evaluate correctly:
    - `\sum_{n \in A, m \in B} (n+m)` →
      `["Sum", ..., ["Element", "n", "A"], ["Element", "m", "B"]]`
    - Nested sums like `\sum_{i \in A}\sum_{j \in B} i \cdot j` evaluate
      correctly
    - Mixed indexing sets (Element + Limits) work together

  - **Condition/filter support in Element expressions**: Conditions can be
    attached to Element expressions to filter values from the set:
    - `\sum_{n \in S, n > 0} n` → sums only positive values from S
    - `\sum_{n \in S, n \ge 2} n` → sums values ≥ 2 from S
    - `\prod_{k \in S, k < 0} k` → multiplies only negative values from S
    - Supported operators: `>`, `>=`, `<`, `<=`, `!=`
    - Conditions are attached as the 4th operand of Element:
      `["Element", "n", "S", ["Greater", "n", 0]]`

#### Linear Algebra

- **Matrix Multiplication**: Added `MatrixMultiply` function supporting:
  - Matrix × Matrix: `A (m×n) × B (n×p) → result (m×p)`
  - Matrix × Vector: `A (m×n) × v (n) → result (m)`
  - Vector × Matrix: `v (m) × B (m×n) → result (n)`
  - Vector × Vector (dot product): `v1 (n) · v2 (n) → scalar`
  - Proper dimension validation with `incompatible-dimensions` errors
  - LaTeX serialization using `\cdot` notation

- **Matrix Addition and Scalar Broadcasting**: `Add` now supports element-wise
  operations on tensors (matrices and vectors):
  - Matrix + Matrix: Element-wise addition (shapes must match)
  - Scalar + Matrix: Broadcasts scalar to all elements
  - Vector + Vector: Element-wise addition
  - Scalar + Vector: Broadcasts scalar to all elements
  - Symbolic support: `[[a,b],[c,d]] + [[1,2],[3,4]]` evaluates correctly
  - Proper dimension validation with `incompatible-dimensions` errors

- **Matrix Construction Functions**: Added convenience functions for creating
  common matrices:
  - `IdentityMatrix(n)`: Creates an n×n identity matrix
  - `ZeroMatrix(m, n?)`: Creates an m×n matrix of zeros (square if n omitted)
  - `OnesMatrix(m, n?)`: Creates an m×n matrix of ones (square if n omitted)

- **Matrix and Vector Norms**: Added `Norm` function for computing various
  norms:
  - **Vector norms**: L1 (sum of absolute values), L2 (Euclidean, default),
    L-infinity (max absolute value), and general Lp norms
  - **Matrix norms**: Frobenius (default, sqrt of sum of squared elements), L1
    (max column sum), L-infinity (max row sum)
  - Scalar norms return the absolute value

- **Eigenvalues and Eigenvectors**: Added functions for eigenvalue
  decomposition:
  - `Eigenvalues(matrix)`: Returns list of eigenvalues (2×2: symbolic via
    characteristic polynomial; 3×3: Cardano's formula; larger: numeric QR)
  - `Eigenvectors(matrix)`: Returns list of corresponding eigenvectors using
    null space computation via Gaussian elimination
  - `Eigen(matrix)`: Returns tuple of (eigenvalues, eigenvectors)

- **Diagonal Function**: Now fully implemented with bidirectional behavior:
  - Vector → Matrix: Creates a diagonal matrix from a vector
    (`Diagonal([1,2,3])` → 3×3 diagonal matrix)
  - Matrix → Vector: Extracts the diagonal as a vector
    (`Diagonal([[1,2],[3,4]])` → `[1,4]`)

- **Higher-Rank Tensor Operations**: Extended `Transpose`, `ConjugateTranspose`,
  and `Trace` to work with rank > 2 tensors:
  - **Transpose**: Swaps last two axes by default (batch transpose), or specify
    explicit axes with `['Transpose', T, axis1, axis2]`
  - **ConjugateTranspose**: Same axis behavior as Transpose, plus element-wise
    complex conjugation
  - **Trace (batch trace)**: Returns a tensor of traces over the last two axes.
    For a `[2,2,2]` tensor, returns `[trace of T[0], trace of T[1]]`. Optional
    axis parameters: `['Trace', T, axis1, axis2]`

- **Reshape Cycling**: Implements APL-style ravel cycling. When reshaping to a
  larger shape, elements cycle from the beginning: `Reshape([1,2,3], (2,2))` →
  `[[1,2],[3,1]]`

- **Scalar Handling**: Most linear algebra functions now handle scalar inputs:
  - `Flatten(42)` → `[42]` (single-element list)
  - `Transpose(42)` → `42` (identity)
  - `Determinant(42)` → `42` (1×1 matrix determinant)
  - `Trace(42)` → `42` (1×1 matrix trace)
  - `Inverse(42)` → `1/42` (scalar reciprocal)
  - `ConjugateTranspose(42)` → `42` (conjugate of real is itself)
  - `Reshape(42, (2,2))` → `[[42,42],[42,42]]` (scalar replication)

- **Improved Error Messages**: Operations requiring square matrices
  (`Determinant`, `Trace`, `Inverse`) now return `expected-square-matrix` error
  for vectors and tensors (rank > 2).

### Performance

- **Pattern Matching Optimization**: Significantly improved performance of
  commutative pattern matching by adding early rejection guards:
  - **Arity Guard**: Patterns without sequence wildcards (`__`/`___`) now
    immediately reject expressions with mismatched operand counts instead of
    attempting factorial permutations
  - **Anchor Fingerprint**: Patterns with literal or symbolic anchors verify
    anchor presence before attempting permutation matching, eliminating
    impossible matches in O(n) time
  - **Universal Anchoring**: Extended the efficient anchor-based backtracking
    algorithm to all patterns with anchors, not just those with sequence
    wildcards
  - **Hash Bucketing**: For patterns with many anchors (4+) against large
    expressions (6+ operands), uses hash-based indexing to reduce anchor lookup
    from O(n×m) to O(n+m) average case
  - Example: Matching `a + b + c + 1` against `x + y + z` now rejects
    immediately (arity mismatch: 4 vs 3) instead of trying 24 permutations

### Resolved Issues

#### Arithmetic

- **Indeterminate Form Handling**: Fixed incorrect results for mathematical
  indeterminate forms:
  - `0 * ∞` now correctly returns `NaN` (previously returned `∞`)
  - `∞ / ∞` now correctly returns `NaN` (previously returned `1`)
  - `∞^0` now correctly returns `NaN` (was already correct)
  - All combinations (`0 * (-∞)`, `(-∞) / ∞`, etc.) are handled correctly

- **([#176](https://github.com/cortex-js/compute-engine/issues/176)) Power
  Combination Simplification**: Fixed simplification failing to combine powers
  with the same base when one factor has an implicit exponent or when there are
  3+ operands. Previously, expressions like `2 * 2^x`, `e * e^x * e^{-x}`, and
  `x^2 * x` would not simplify. Now correctly simplifies to `2^(x+1)`, `e`, and
  `x^3` respectively. The fix includes:
  - Extended power combination rules to support numeric literal bases
  - Added functional rule to handle n-ary Multiply expressions (3+ operands)
  - Adjusted simplification cost threshold from 1.2 to 1.3 to accept
    mathematically valid simplifications where exponents become slightly more
    complex (e.g., `2 * 2^x → 2^(x+1)`)

- **Symbolic Factorial**: Fixed `(n-1)!` incorrectly evaluating to `NaN` instead
  of staying symbolic. The factorial `evaluate` function was attempting numeric
  computation on symbolic arguments. Now correctly returns `undefined` (keeping
  the expression symbolic) when the argument is not a number literal.

#### Linear Algebra

- **Matrix Operations Type Validation**: Fixed matrix operations (`Shape`,
  `Rank`, `Flatten`, `Transpose`, `Determinant`, `Inverse`, `Trace`, etc.)
  returning incorrect results or failing with type errors. The root cause was a
  type mismatch: function signatures expected `matrix` type (a 2D list with
  dimensions), but `BoxedTensor.type` returned `list<number>` without
  dimensions. Now `BoxedTensor`, `BoxedFunction`, and `BoxedSymbol` correctly
  derive `shape` and `rank` from their type's dimensions. Additionally, linear
  algebra functions now properly evaluate their operands before checking if they
  are tensors.

#### Calculus

- **Numerical Integration**: Fixed `\int_0^1 \sin(x) dx` returning `NaN` when
  evaluated numerically with `.N()`. The integrand was already wrapped in a
  `Function` expression by the canonical form, but the numerical evaluation code
  was wrapping it again, creating a nested function that returned a function
  instead of a number. Now correctly checks if the integrand is already a
  `Function` before wrapping.

#### LaTeX Parsing and Serialization

- **Subscript Function Calls**: Fixed parsing of function calls with subscripted
  names like `f_\text{a}(5)`. Previously, this was incorrectly parsed as a
  `Tuple` instead of a function call because `Subscript` expressions weren't
  being canonicalized before the function call check. Now correctly recognizes
  that `f_a(5)` is a function call when the subscript canonicalizes to a symbol.

- **([#130](https://github.com/cortex-js/compute-engine/issues/130))
  Prefix/Postfix Operator LaTeX Serialization**: Fixed incorrect LaTeX output
  for prefix operators (like `Negate`) and postfix operators (like `Factorial`)
  when applied to expressions with lower precedence. Previously,
  `Negate(Add(a, b))` incorrectly serialized as `-a+b` instead of `-(a+b)`,
  causing round-trip failures where parsing the output produced a mathematically
  different expression. Similarly, `Factorial(Add(a, b))` now correctly
  serializes as `(a+b)!` instead of `a+b!`. The fix ensures operands are wrapped
  in parentheses when their precedence is lower than the operator's precedence.

- **([#156](https://github.com/cortex-js/compute-engine/issues/156)) Logical
  Operator Precedence**: Fixed parsing of logical operators `\vee` (Or) and
  `\wedge` (And) with relational operators. Previously, expressions like
  `3=4\vee 7=8` were incorrectly parsed with the wrong precedence. Now correctly
  parses as `["Or", ["Equal", 3, 4], ["Equal", 7, 8]]`. Logical operators have
  lower precedence (230-235) than comparison operators (245) and set relations
  (240), so compound propositions parse correctly without requiring parentheses.

- **([#156](https://github.com/cortex-js/compute-engine/issues/156)) Logical
  Connective Arrows**: Added support for additional arrow notation in logical
  expressions:
  - `\rightarrow` now parses as `Implies` (previously parsed as `To` for
    set/function mapping)
  - `\leftrightarrow` now parses as `Equivalent` (previously produced an
    "unexpected-command" error)
  - Long arrow variants now supported: `\Longrightarrow`, `\longrightarrow` →
    `Implies`; `\Longleftrightarrow`, `\longleftrightarrow` → `Equivalent`
  - The existing variants `\Rightarrow`, `\Leftrightarrow`, `\implies`, `\iff`
    continue to work
  - `\to` remains available for function/set mapping notation (e.g.,
    `f: A \to B`)

#### Simplification

- **Rules Cache Isolation**: Fixed rules cache building failing with "Invalid
  rule" errors when user expressions had previously polluted the global scope.
  For example, parsing `x(y+z)` would add `x` as a symbol with function type to
  the global scope. Later, when the simplification rules cache was built, rule
  parsing would fail because wildcards like `_x` in rules would be type-checked
  against the polluted scope where `x` had incompatible type. The fix ensures
  rule parsing uses a clean scope that inherits only from the system scope
  (containing built-in definitions), not from user-polluted scopes.

- **Simplification Rules**: Added and fixed several simplification rules:
  - `x + x` now correctly simplifies to `2x` (term combination)
  - `e^x * e^{-x}` now correctly simplifies to `1` (exponential inverse)
  - `sin(∞)` and `cos(∞)` now correctly evaluate to `NaN`
  - `tanh(∞)` now correctly evaluates to `1`, `tanh(-∞)` to `-1`
  - `log_b(x^n)` now correctly simplifies to `n * log_b(x)` (log power rule)
  - Improved cost function to prefer `n * ln(x)` form over `ln(x^n)`
  - Trigonometric functions now reduce arguments by their period (e.g.,
    `cos(5π + k)` simplifies using `cos(π + k) = -cos(k)`)

- **([#178](https://github.com/cortex-js/compute-engine/issues/178))
  Non-Canonical Expression Simplification**: Fixed `.simplify()` not working on
  expressions parsed with `{ canonical: false }`. Previously,
  `ce.parse('x+x', { canonical: false }).simplify()` would return `x+x` instead
  of `2x`. The bug was in the simplification loop detection: when canonicalizing
  before simplification, the non-canonical form was recorded in the "seen" set,
  and since `isSame()` considers non-canonical and canonical forms equivalent,
  the canonical form was incorrectly detected as already processed. Now the
  simplification correctly starts fresh when canonicalizing, allowing full
  simplification to proceed.

## 0.32.0 _2026-01-28_

### Resolved Issues

#### Calculus

- **([#230](https://github.com/cortex-js/compute-engine/issues/230)) Root
  Derivatives**: Fixed the `D` operator not differentiating expressions
  containing the `Root` operator (n-th roots). Previously, `D(Root(x, 3), x)`
  (derivative of ∛x) would return an unevaluated derivative expression instead
  of computing the result. Now correctly returns `1/(3x^(2/3))`, equivalent to
  the expected `(1/3)·x^(-2/3)`. The fix adds a special case in the
  `differentiate` function to handle `Root(base, n)` by applying the power rule
  with exponent `1/n`.

- **Abs Derivative**: Fixed `d/dx |x|` returning an error when evaluated with a
  variable that has an assigned value. The derivative formula now uses `Sign(x)`
  instead of a complex `Which` expression that couldn't be evaluated
  symbolically.

- **Step Function Derivatives**: Fixed `D(floor(x), x)`, `D(ceil(x), x)`, and
  `D(round(x), x)` causing infinite recursion. These step functions now
  correctly return 0 (the derivative is 0 almost everywhere). Also fixed a bug
  where derivative formulas that evaluate to 0 weren't recognized due to a falsy
  check.

- **Inverse Trig Integrals**: Fixed incorrect integration formulas for `arcsin`,
  `arccos`, and `arctan`. The previous formulas were completely wrong. Correct:
  - `∫ arcsin(x) dx = x·arcsin(x) + √(1-x²)`
  - `∫ arccos(x) dx = x·arccos(x) - √(1-x²)`
  - `∫ arctan(x) dx = x·arctan(x) - (1/2)·ln(1+x²)`

- **Erfc Derivative**: Fixed incorrect derivative formula for `erfc(x)`. Now
  correctly returns `-2/√π · e^(-x²)` (the negative of the `erf` derivative).

- **LogGamma Derivative**: Added derivative rule for `LogGamma(x)` which returns
  `Digamma(x)` (the digamma/psi function).

- **Special Function Derivatives**: Fixed derivative formulas for several
  special functions and removed incorrect ones:
  - Fixed `d/dx erfi(x) = (2/√π)·e^(x²)` (imaginary error function)
  - Fixed `d/dx S(x) = sin(πx²/2)` (Fresnel sine integral)
  - Fixed `d/dx C(x) = cos(πx²/2)` (Fresnel cosine integral)
  - Removed incorrect derivative formulas for Zeta, Digamma, PolyGamma, Beta,
    LambertW, Bessel functions, and Airy functions (these now return symbolic
    derivatives like `Digamma'(x)` instead of wrong numeric results)

- **Symbolic Derivative Evaluation**: Fixed derivatives of unknown functions
  returning `0` instead of symbolic derivatives. For example, `D(Digamma(x), x)`
  now correctly returns `Digamma'(x)` (as `Apply(Derivative(Digamma, 1), x)`)
  instead of incorrectly returning `0`.

#### LaTeX Parsing and Serialization

- **([#256](https://github.com/cortex-js/compute-engine/issues/256)) Subscript
  Symbol Parsing**: Fixed parsing of single-letter symbols with subscripts.
  Previously, `i_A` was incorrectly parsed as
  `["Subscript", ["Complex", 0, 1], "A"]` because `i` was recognized as the
  imaginary unit before the subscript was processed. Now `i_A` correctly parses
  as the symbol `i_A`. This applies to all single-letter symbols including
  constants like `e` and `i`. Complex subscripts containing operators (`n+1`),
  commas (`n,m`), or parentheses (`(n+1)`) still produce `Subscript`
  expressions.

- **LaTeX Serialization**: Fixed TypeScript error in power serialization where
  `denom` (a `number | null`) was incorrectly passed where an `Expression` was
  expected. Now correctly uses `operand(exp, 2)` to get the expression form.

- **([#168](https://github.com/cortex-js/compute-engine/issues/168)) Absolute
  Value**: Fixed parsing of nested absolute value expressions that start with a
  double bar (e.g. `||3-5|-4|`), which previously produced an invalid structure
  instead of evaluating correctly.

- **([#244](https://github.com/cortex-js/compute-engine/issues/244))
  Serialization**: Fixed LaTeX and ASCIIMath serialization ambiguity for
  negative bases and negated powers. Powers now render `(-2)^2` (instead of
  `-2^2`) when the base is negative, and negated powers now render as `-(2^2)`
  rather than `-2^2`.

- **([#243](https://github.com/cortex-js/compute-engine/issues/243)) LaTeX
  Parsing**: Fixed logic operator precedence causing expressions like
  `x = 1 \vee x = 2` to be parsed incorrectly as `x = (1 ∨ x) = 2` instead of
  `(x = 1) ∨ (x = 2)`. Comparison operators (`=`, `<`, `>`, etc.) now correctly
  bind tighter than logic operators (`\land`, `\lor`, `\veebar`, etc.).

- **([#264](https://github.com/cortex-js/compute-engine/issues/264))
  Serialization**: Fixed LaTeX serialization of quantified expressions
  (`ForAll`, `Exists`, `ExistsUnique`, `NotForAll`, `NotExists`). Previously,
  only the quantifier symbol was output (e.g., `\forall x` instead of
  `\forall x, x>y`). The body of the quantified expression is now correctly
  serialized.

- **([#257](https://github.com/cortex-js/compute-engine/issues/257)) LaTeX
  Parsing**: Fixed `\gcd` command not parsing function arguments correctly.
  Previously `\gcd\left(24,37\right)` would parse as
  `["Tuple", "GCD", ["Tuple", 24, 37]]` instead of the expected
  `["GCD", 24, 37]`. The `\operatorname{gcd}` form was unaffected. Also added
  support for `\lcm` as a LaTeX command (in addition to the existing
  `\operatorname{lcm}`).

- **([#223](https://github.com/cortex-js/compute-engine/issues/223))
  Serialization**: Fixed scientific/engineering LaTeX serialization dropping the
  leading coefficient for exact powers of ten. For example, `1000` now
  serializes to `1\cdot10^{3}` (or `1\times10^{3}` depending on
  `exponentProduct`) instead of `10^{3}`.

- **LaTeX Parsing**: Fixed `\cosh` incorrectly mapping to `Csch` instead of
  `Cosh`.

- **([#255](https://github.com/cortex-js/compute-engine/issues/255)) LaTeX
  Parsing**: Fixed multi-letter subscripts like `A_{CD}` causing
  "incompatible-type" errors in arithmetic operations. Multi-letter subscripts
  without parentheses are now interpreted as compound symbol names (e.g.,
  `A_{CD}` → `A_CD`, `x_{ij}` → `x_ij`, `T_{max}` → `T_max`). Use parentheses
  for expression subscripts: `A_{(CD)}` creates a `Subscript` expression where
  `CD` represents implicit multiplication. The `Delimiter` wrapper is now
  stripped from subscript expressions for cleaner output.

#### First-Order Logic

- **([#263](https://github.com/cortex-js/compute-engine/issues/263)) Quantifier
  Scope**: Fixed quantifier scope in First-Order Logic expressions. Previously,
  `\forall x.P(x)\rightarrow Q(x)` was parsed with the implication inside the
  quantifier scope: `["ForAll", "x", ["To", P(x), Q(x)]]`. Now it correctly
  follows standard FOL conventions where the quantifier binds only the
  immediately following formula: `["To", ["ForAll", "x", P(x)], Q(x)]`. This
  applies to all quantifiers (`ForAll`, `Exists`, `ExistsUnique`, `NotForAll`,
  `NotExists`) and all logical connectives (`\rightarrow`, `\to`, `\implies`,
  `\land`, `\lor`, `\iff`). Use explicit parentheses for wider scope:
  `\forall x.(P(x)\rightarrow Q(x))`. Also fixed quantifier type signatures to
  properly return `boolean`, enabling correct type checking when quantified
  expressions are used as arguments to logical operators.

#### Simplification

- **Sign Simplification**: Fixed `Sign(x).simplify()` returning `1` instead of
  `-1` when `x` is negative. The simplification rule incorrectly returned
  `ce.One` for both positive and negative cases.

#### Type System

- **Ceil Type Signature**: Fixed `Ceil` function signature from
  `(real) -> integer` to `(number) -> integer` to match `Floor`. This resolves
  "incompatible-type" errors when computing derivatives of ceiling expressions
  or using `Ceil` in contexts expecting a general number type.

#### Polynomials

- **Polynomial Degree Detection**: Fixed `polynomialDegree()` returning 0 for
  expressions like `e^x` or `e^(-x^2)` when it should return -1 (not a
  polynomial). When the base of a power is constant but the exponent depends on
  the variable, this is not a polynomial. This bug caused infinite recursion in
  simplification when simplifying expressions containing exponentials, such as
  the derivative of `erf(x)` which is `(2/√π)·e^(-x²)`.

#### Pattern Matching

- **([#258](https://github.com/cortex-js/compute-engine/issues/258)) Pattern
  Matching**: Fixed `BoxedExpression.match()` returning `null` when matching
  patterns against canonicalized expressions. Several cases are now handled:
  - `Rational` patterns now match expressions like `['Rational', 'x', 2]` which
    are canonicalized to `['Multiply', ['Rational', 1, 2], 'x']`
  - `Power` patterns now match `['Power', 'x', -1]` which is canonicalized to
    `['Divide', 1, 'x']`, returning `{_base: x, _exp: -1}`
  - `Power` patterns now match `['Root', 'x', 3]` (cube root), returning
    `{_base: x, _exp: ['Divide', 1, 3]}`

#### Sum and Product

- **([#252](https://github.com/cortex-js/compute-engine/issues/252))
  Sum/Product**: Fixed `Sum` and `Product` returning `NaN` when the body
  contains free variables (variables not bound by the index). For example,
  `\sum_{n=1}^{10}(x)` now correctly evaluates to `10x` instead of `NaN`, and
  `\prod_{n=1}^{5}(x)` evaluates to `x^5`. Mixed expressions like
  `\sum_{n=1}^{10}(n \cdot x)` now return `55x`. Also fixed `toString()` for
  `Sum` and `Product` expressions with non-trivial bodies (e.g., `Multiply`)
  which were incorrectly displayed as `int()`.

#### Equation Solving

- **([#242](https://github.com/cortex-js/compute-engine/issues/242)) Solve**:
  Fixed `solve()` returning an empty array for equations with variables in
  fractions. For example, `F = 3g/h` solved for `g` now correctly returns `Fh/3`
  instead of an empty array. The solver now clears denominators before applying
  solve rules, enabling it to handle expressions like `a + bx/c = 0`. Also added
  support for solving equations where the variable is in the denominator (e.g.,
  `a/x = b` now returns `x = a/b`).

- **([#220](https://github.com/cortex-js/compute-engine/issues/220)) Solve**:
  Fixed `solve()` returning an empty array for equations involving square roots
  of the unknown, e.g. `2x = \sqrt{5x}`. The solver now handles equations of the
  form `ax + b√x + c = 0` using quadratic substitution. Also added support for
  solving logarithmic equations like `a·ln(x) + b = 0` which returns
  `x = e^(-b/a)`.

### Improvements

#### First-Order Logic

- **([#263](https://github.com/cortex-js/compute-engine/issues/263)) First-Order
  Logic**: Added several improvements for working with First-Order Logic
  expressions:
  - **Configurable quantifier scope**: New `quantifierScope` parsing option
    controls how quantifier scope is determined. Use `"tight"` (default) for
    standard FOL conventions where quantifiers bind only the immediately
    following formula, or `"loose"` for scope extending to the end of the
    expression.
    ```typescript
    ce.parse('\\forall x. P(x)', { quantifierScope: 'tight' })  // default
    ce.parse('\\forall x. P(x)', { quantifierScope: 'loose' })
    ```
  - **Automatic predicate inference**: Single uppercase letters followed by
    parentheses (e.g., `P(x)`, `Q(a,b)`) are now automatically recognized as
    predicate/function applications without requiring explicit declaration. This
    enables natural FOL syntax like `\forall x. P(x) \rightarrow Q(x)` to work
    out of the box.
  - **Quantifier evaluation over finite domains**: Quantifiers (`ForAll`,
    `Exists`, `ExistsUnique`, `NotForAll`, `NotExists`) now evaluate to boolean
    values when the bound variable is constrained to a finite set. For example:
    ```typescript
    ce.box(['ForAll', ['Element', 'x', ['Set', 1, 2, 3]], ['Greater', 'x', 0]]).evaluate()
    // Returns True (all values in {1,2,3} are > 0)
    ce.box(['Exists', ['Element', 'x', ['Set', 1, 2, 3]], ['Greater', 'x', 2]]).evaluate()
    // Returns True (3 > 2)
    ce.box(['ExistsUnique', ['Element', 'x', ['Set', 1, 2, 3]], ['Equal', 'x', 2]]).evaluate()
    // Returns True (only one element equals 2)
    ```
    Supports `Set`, `List`, `Range`, and integer `Interval` domains up to 1000
    elements. Nested quantifiers are evaluated over the Cartesian product of
    their domains.
  - **Symbolic simplification for quantifiers**: Quantifiers now simplify
    automatically in special cases:
    - `∀x. True` → `True`, `∀x. False` → `False`
    - `∃x. True` → `True`, `∃x. False` → `False`
    - `∀x. P` → `P` (when P doesn't contain x)
    - `∃x. P` → `P` (when P doesn't contain x)
  - **CNF/DNF conversion**: New `ToCNF` and `ToDNF` functions convert boolean
    expressions to Conjunctive Normal Form and Disjunctive Normal Form
    respectively:
    ```typescript
    ce.box(['ToCNF', ['Or', ['And', 'A', 'B'], 'C']]).evaluate()
    // Returns (A ∨ C) ∧ (B ∨ C)
    ce.box(['ToDNF', ['And', ['Or', 'A', 'B'], 'C']]).evaluate()
    // Returns (A ∧ C) ∨ (B ∧ C)
    ```
    Handles `And`, `Or`, `Not`, `Implies`, `Equivalent`, `Xor`, `Nand`, and
    `Nor` operators using De Morgan's laws and distribution.
  - **Boolean operator evaluation**: Added evaluation support for `Xor`, `Nand`,
    and `Nor` operators with `True`/`False` arguments:
    ```typescript
    ce.box(['Xor', 'True', 'False']).evaluate()   // Returns True
    ce.box(['Nand', 'True', 'True']).evaluate()   // Returns False
    ce.box(['Nor', 'False', 'False']).evaluate()  // Returns True
    ```
  - **N-ary boolean operators**: `Xor`, `Nand`, and `Nor` now support any number
    of arguments:
    - `Xor(a, b, c, ...)` returns true when an odd number of arguments are true
    - `Nand(a, b, c, ...)` returns the negation of `And(a, b, c, ...)`
    - `Nor(a, b, c, ...)` returns the negation of `Or(a, b, c, ...)`
  - **Satisfiability checking**: New `IsSatisfiable` function checks if a
    boolean expression can be made true with some assignment of variables:
    ```typescript
    ce.box(['IsSatisfiable', ['And', 'A', ['Not', 'A']]]).evaluate()  // False
    ce.box(['IsSatisfiable', ['Or', 'A', 'B']]).evaluate()            // True
    ```
  - **Tautology checking**: New `IsTautology` function checks if a boolean
    expression is true for all possible variable assignments:
    ```typescript
    ce.box(['IsTautology', ['Or', 'A', ['Not', 'A']]]).evaluate()     // True
    ce.box(['IsTautology', ['And', 'A', 'B']]).evaluate()             // False
    ```
  - **Truth table generation**: New `TruthTable` function generates a complete
    truth table for a boolean expression:
    ```typescript
    ce.box(['TruthTable', ['And', 'A', 'B']]).evaluate()
    // Returns [["A","B","Result"],["False","False","False"],...]
    ```
  - **Explicit `Predicate` function**: Added a new `Predicate` function to
    explicitly represent predicate applications in First-Order Logic. Inside
    quantifier scopes (`\forall`, `\exists`, etc.), single uppercase letters
    followed by parentheses are now parsed as `["Predicate", "P", "x"]` instead
    of `["P", "x"]`. This distinguishes predicates from regular function
    applications and avoids naming conflicts with library functions.
    ```typescript
    ce.parse('\\forall x. P(x)').json
    // Returns ["ForAll", "x", ["Predicate", "P", "x"]]
    ```
    Outside quantifier scopes, `P(x)` is still parsed as `["P", "x"]` to
    maintain backward compatibility with function definitions like
    `Q(x) := ...`.
  - **`D(f, x)` no longer maps to derivative**: The LaTeX notation `D(f, x)` is
    not standard mathematical notation for derivatives and previously caused
    confusion with the `D` derivative function in MathJSON. Now `D(f, x)` in
    LaTeX parses as `["Predicate", "D", "f", "x"]` instead of the derivative.
    Use Leibniz notation (`\frac{d}{dx}f`) for derivatives in LaTeX, or
    construct the derivative directly in MathJSON: `["D", expr, "x"]`.
  - **`N(x)` no longer maps to numeric evaluation**: Similarly, `N(x)` in LaTeX
    is CAS-specific notation, not standard math notation. Now `N(x)` parses as
    `["Predicate", "N", "x"]` instead of the numeric evaluation function. This
    allows `N` to be used as a variable (e.g., "for all N in Naturals"). Use the
    `.N()` method for numeric evaluation, or construct it directly in MathJSON:
    `["N", expr]`.

#### Polynomials

- **Polynomial Simplification**: The `simplify()` function now automatically
  cancels common polynomial factors in univariate rational expressions. For
  example, `(x² - 1)/(x - 1)` simplifies to `x + 1`, `(x³ - x)/(x² - 1)`
  simplifies to `x`, and `(x + 1)/(x² + 3x + 2)` simplifies to `1/(x + 2)`.
  Previously, this required explicitly calling the `Cancel` function with a
  variable argument.

#### Sum and Product

- **Sum/Product Simplification**: Added simplification rules for `Sum` and
  `Product` expressions with symbolic bounds:
  - Constant body: `\sum_{n=1}^{b}(x)` simplifies to `b * x`
  - Triangular numbers (general bounds): `\sum_{n=a}^{b}(n)` simplifies to
    `(b(b+1) - a(a-1))/2`
  - Sum of squares: `\sum_{n=1}^{b}(n^2)` simplifies to `b(b+1)(2b+1)/6`
  - Sum of cubes: `\sum_{n=1}^{b}(n^3)` simplifies to `[b(b+1)/2]^2`
  - Geometric series: `\sum_{n=0}^{b}(r^n)` simplifies to `(1-r^(b+1))/(1-r)`
  - Alternating unit series: `\sum_{n=0}^{b}((-1)^n)` simplifies to
    `(1+(-1)^b)/2`
  - Alternating linear series: `\sum_{n=0}^{b}((-1)^n * n)` simplifies to
    `(-1)^b * floor((b+1)/2)`
  - Arithmetic progression: `\sum_{n=0}^{b}(a + d*n)` simplifies to
    `(b+1)(a + db/2)`
  - Sum of binomial coefficients: `\sum_{k=0}^{n}C(n,k)` simplifies to `2^n`
  - Alternating binomial sum: `\sum_{k=0}^{n}((-1)^k * C(n,k))` simplifies to
    `0`
  - Weighted binomial sum: `\sum_{k=0}^{n}(k * C(n,k))` simplifies to
    `n * 2^(n-1)`
  - Partial fractions (telescoping): `\sum_{k=1}^{n}(1/(k(k+1)))` simplifies to
    `n/(n+1)`
  - Partial fractions (telescoping): `\sum_{k=2}^{n}(1/(k(k-1)))` simplifies to
    `(n-1)/n`
  - Weighted squared binomial sum: `\sum_{k=0}^{n}(k^2 * C(n,k))` simplifies to
    `n(n+1) * 2^(n-2)`
  - Weighted cubed binomial sum: `\sum_{k=0}^{n}(k^3 * C(n,k))` simplifies to
    `n²(n+3) * 2^(n-3)`
  - Alternating weighted binomial sum: `\sum_{k=0}^{n}((-1)^k * k * C(n,k))`
    simplifies to `0` (n ≥ 2)
  - Sum of binomial squares: `\sum_{k=0}^{n}(C(n,k)^2)` simplifies to `C(2n, n)`
  - Sum of consecutive products: `\sum_{k=1}^{n}(k(k+1))` simplifies to
    `n(n+1)(n+2)/3`
  - Arithmetic progression (general bounds): `\sum_{n=m}^{b}(a + d*n)`
    simplifies to `(b-m+1)(a + d(m+b)/2)`
  - Product of constant: `\prod_{n=1}^{b}(x)` simplifies to `x^b`
  - Factorial: `\prod_{n=1}^{b}(n)` simplifies to `b!`
  - Shifted factorial: `\prod_{n=1}^{b}(n+c)` simplifies to `(b+c)!/c!`
  - Odd double factorial: `\prod_{n=1}^{b}(2n-1)` simplifies to `(2b-1)!!`
  - Even double factorial: `\prod_{n=1}^{b}(2n)` simplifies to `2^b * b!`
  - Rising factorial (Pochhammer): `\prod_{k=0}^{n-1}(x+k)` simplifies to
    `(x)_n`
  - Falling factorial: `\prod_{k=0}^{n-1}(x-k)` simplifies to `x!/(x-n)!`
  - Telescoping product: `\prod_{k=1}^{n}((k+1)/k)` simplifies to `n+1`
  - Wallis-like product: `\prod_{k=2}^{n}(1 - 1/k^2)` simplifies to `(n+1)/(2n)`
  - Factor out constants: `\sum_{n=1}^{b}(c \cdot f(n))` simplifies to
    `c \cdot \sum_{n=1}^{b}(f(n))`, and similarly for products where the
    constant is raised to the power of the iteration count
  - Nested sums/products: inner sums/products are simplified first, enabling
    cascading simplification
  - Edge cases: empty ranges (upper < lower) return identity elements (0 for
    Sum, 1 for Product), and single-iteration ranges substitute the bound value

## 0.31.0 _2026-01-27_

### Breaking Changes

- The `[Length]` function has been renamed to `[Count]`.
- The `xsize` property of collections has been renamed to `count`.
- The `xcontains()` method of collections has been renamed to `contains()`.
- Handling of dictionaries (`["Dictionary"]` expressions and `\{dict:...\}`
  shorthand) has been improved.
- **Inverse hyperbolic functions** have been renamed to follow the ISO 80000-2
  standard: `Arcsinh` → `Arsinh`, `Arccosh` → `Arcosh`, `Arctanh` → `Artanh`,
  `Arccoth` → `Arcoth`, `Arcsech` → `Arsech`, `Arccsch` → `Arcsch`. The "ar"
  prefix (for "area") is mathematically correct since these functions relate to
  areas on a hyperbola, not arc lengths. Both LaTeX spellings (`\arsinh` and
  `\arcsinh`) are accepted as input (Postel's law).

### Resolved Issues

#### LaTeX Parsing

- **Metadata Preservation**: Fixed `verbatimLatex` not being preserved when
  parsing with `preserveLatex: true`. The original LaTeX source is now correctly
  stored on parsed expressions (when using non-canonical mode). Also fixed
  metadata (`latex`, `wikidata`) being lost when boxing MathJSON objects that
  contain these attributes.

- **String Parsing**: Fixed parsing of `\text{...}` with `preserveLatex: true`
  which was incorrectly returning an "invalid-symbol" error instead of a string
  expression.

#### Calculus

- **Derivatives**: `d/dx e^x` now correctly simplifies to `e^x` instead of
  `ln(e) * e^x`. The `hasSymbolicTranscendental()` function now recognizes that
  transcendentals which simplify to exact rational values (like `ln(e) = 1`)
  should not be preserved symbolically.

- **Derivatives**: `d/dx log(x)` now returns `1 / (x * ln(10))` symbolically
  instead of evaluating to `0.434... / x`. Fixed by using substitution instead
  of function application when applying derivative formulas, which preserves
  symbolic transcendental constants.

#### Arithmetic

- **Rationals**: Fixed `reducedRational()` to properly normalize negative
  denominators before the early return check. Previously `1/-2` would not
  canonicalize to `-1/2`.

- **Arithmetic**: Fixed `.mul()` to preserve logarithms symbolically. Previously
  multiplying expressions containing `Ln` or `Log` would evaluate the logarithm
  to its numeric value.

#### Serialization

- **Serialization**: Fixed case inconsistency in `toString()` output for
  trigonometric functions. Some functions like `Cot` were being serialized with
  capital letters while others like `csc` were lowercase. All trig functions now
  consistently serialize in lowercase (e.g., `cot(x)` instead of `Cot(x)`).

- **Serialization**: Improved display of inverse trig derivatives and similar
  expressions:
  - Negative exponents like `x^(-1/2)` now display as `1/sqrt(x)` in both LaTeX
    and ASCII-math output
  - When a sum starts with a negative term and contains a positive constant, the
    constant is moved to the front (e.g., `-x^2 + 1` displays as `1 - x^2`)
    while preserving polynomial ordering (e.g., `x^2 - x + 3` stays unchanged)
  - `d/dx arcsin(x)` now displays as `1/sqrt(1-x^2)` instead of
    `(-x^2+1)^(-1/2)`

- **Scientific Notation**: Fixed normalization of scientific notation for
  fractional values (e.g., numbers less than 1).

#### Sum and Product

- **Compilation**: Fixed compilation of `Sum` and `Product` expressions.

- **Sum/Product**: Fixed `sum` and `prod` library functions to correctly handle
  substitution of index variables.

### New Features and Improvements

#### Serialization

- **Number Serialization**: Added `adaptiveScientific` notation mode. When
  serializing numbers to LaTeX, this mode uses scientific notation but avoids
  exponents within a configurable range (controlled by `avoidExponentsInRange`).
  This provides a balance between readability and precision for numbers across
  different orders of magnitude.

#### Type System

- Refactored the type parser to use a modular architecture. This allows for
  better extensibility and maintainability of the type system.

#### Pattern Matching

- **Pattern Matching**: The `validatePattern()` function is now exported from
  the public API. Use it to check patterns for invalid combinations like
  consecutive sequence wildcards before using them.

#### Polynomials

- **Polynomial Arithmetic**: Added new library functions for polynomial
  operations:
  - `PolynomialDegree(expr, var)` - Get the degree of a polynomial
  - `CoefficientList(expr, var)` - Get the list of coefficients
  - `PolynomialQuotient(dividend, divisor, var)` - Polynomial division quotient
  - `PolynomialRemainder(dividend, divisor, var)` - Polynomial division
    remainder
  - `PolynomialGCD(a, b, var)` - Greatest common divisor of polynomials
  - `Cancel(expr, var)` - Cancel common factors in rational expressions

#### Calculus

- **Integration**: Significantly expanded symbolic integration capabilities:
  - **Polynomial division**: Integrals like `∫ x²/(x²+1) dx` now correctly
    divide first, yielding `x - arctan(x)`
  - **Repeated linear roots**: `∫ 1/(x-1)² dx = -1/(x-1)` and higher powers
  - **Derivative pattern recognition**: `∫ f'(x)/f(x) dx = ln|f(x)|` is now
    recognized automatically
  - **Completing the square**: Irreducible quadratics like `∫ 1/(x²+2x+2) dx`
    now yield `arctan(x+1)`
  - **Reduction formulas**: `∫ 1/(x²+1)² dx` now works using reduction formulas
  - **Mixed partial fractions**: `∫ 1/((x-1)(x²+1)) dx` now decomposes correctly
  - **Factor cancellation**: `∫ (x+1)/(x²+3x+2) dx` simplifies before
    integrating
  - **Inverse hyperbolic**: Added `∫ 1/√(x²+1) dx = arcsinh(x)` and
    `∫ 1/√(x²-1) dx = arccosh(x)`
  - **Arcsec pattern**: Added `∫ 1/(x·√(x²-1)) dx = arcsec(x)`
  - **Trigonometric substitution**: Added support for `∫√(a²-x²) dx`,
    `∫√(x²+a²) dx`, and `∫√(x²-a²) dx` using trig/hyperbolic substitution
</ChangeLog>
