Reference

Everything in the library

Every export of @ratmath/chaos, with what it takes and what it returns. Numbers go in as whole numbers, fractions or decimal strings; a JavaScript number that is not whole is refused where an exact value is meant.

Maps

ExportWhat it does
map(formula, { variable, params, critical })A map of the line from a formula in analytic's notation. Returns an IteratedMap.
logistic(r = 4), tent(mu = 2), quadratic(c = -2)The standard families rx(1−x)rx(1 - x), μ(12−∣x−12∣)\mu(\tfrac12 - |x - \tfrac12|) and x2+cx^2 + c.
doubling(x0, { base })x↦2x mod 1x \mapsto 2x \bmod 1 on a rational, exactly: { orbit, preperiod, period, cycle, floatReachesZeroAt }.
IteratedMapThe class. Fields: text, variable, params, polynomial (coefficients, or null), tree.

Methods of a map

MethodWhat it does
at(x), enclose(X, bits), float(x), derivativeAt(x)One step: exact, as an interval, in doubles; and f′.
orbit(x0, n, { maxBits })The true orbit in rationals. See Orbits.
enclosedOrbit(x0, n, { digits, bits })The true orbit as intervals: { terms, bits, width }.
floatOrbit(x0, n), cobweb(x0, n)The orbit in doubles; the corner points of a cobweb diagram.
compare(x0, n, { digits })Float beside true: { rows, parted }.
fixedPoints(), periodicPoints(n)Exact points of least period n with multiplier and stability. See Periodic points.
cycles(n)The points grouped into cycles, each with its multiplier and Lyapunov exponent.
periodicPointsIn(n, [a, b], { digits })Certified periodic points of any formula.
iterate(n), criticalPoints([a, b]), with(params)fnf^n as coefficients; zeros of f′; the family at other parameters.

Exponents, bifurcations, symbols

ExportWhat it does
lyapunov(f, x0, { steps, transient, digits })The average of log|f′| along the true orbit, enclosed. See Lyapunov exponents.
lyapunovExponent(f, { distribution, interval, digits }), invariantDensity(f)The exponent of almost every orbit as a certified integral of log|f′| against the invariant measure. See Lyapunov exponents.
sensitivity(f, x0, delta, { steps, threshold })The separation of two true orbits, step by step.
bifurcationPoint(family, { parameter, period, multiplier, near, digits })A parameter where a cycle's multiplier is ±1, proven. See Bifurcations.
periodDoubling(family, { parameter, levels, start })The cascade, each doubling proven, and the ratios of the gaps.
periodicWindow(family, { parameter, period, near })Birth, superstable parameter and first doubling of a window.
superstable(family, { parameter, period, range, critical })Parameters where the critical point has the given period.
bifurcationDiagram(family, { parameter, range, count, transient, keep })Data for the picture, in doubles, marked estimated.
itinerary(f, x0, n), kneading(f, n)Symbol strings on true orbits. See Symbolic dynamics.
sharkovskii{ order(limit), compare(a, b), forces(a, b), forced(n, limit) }.
ChaosErrorWhat the library throws, with a code: inexact, too-large, escapes, not-polynomial, not-proven and others.
planThe phases still to come. Every phase is built, so the list is empty.

Maps of the plane

ExportWhat it does
planeMap([f, g], { variables, params }), henon(a, b), standardMap(k), PlaneMapA map of the plane from two formulas. Fields: text, variables, params, determinant (when constant), areaPreserving. See Maps of the plane.
at(p), float(p), enclose(P, bits), jacobian()One step: exact, in doubles, as intervals; the Jacobian as formulas.
orbit, floatOrbit, enclosedOrbit, compareAs for maps of the line, on pairs.
periodicPoints(n, region, { all }), fixedPoints(region), cycles(n, region)Every point of least period n in a box, each proven and alone in its enclosure, with multipliers and stability; complete says none was missed.
exactPeriodicPoints(n)The points as algebraic numbers, when one coordinate can be eliminated.
lyapunov(p, n)Both exponents, estimated; their sum enclosed when the determinant is constant.
catMap(), torusMap(matrix), TorusMapInteger matrices on the torus, exact: at, orbit, period, periods(q), fixedPointCount(n), eigen(), entropy(), floatPartsAt. See The cat map and the horseshoe.
horseshoe(), HorseshoeSmale's horseshoe in exact coordinates: at, itinerary, periodicPoint(word), periodicPoints(n), orbitCount(n), strips(n), dimension.

Flows

ExportWhat it does
flow(field, { variables, params }), FlowA system x′ = f(x) from one formula per variable. Fields: n, text, variables, params; with(params), jacobian(), velocity(p).
lorenz(s, r, b), rossler(a, b, c), vanDerPol(mu), pendulum(damping)The standard systems.
solve(p0, until, { order, maxStep, maxSteps })The solution through a point or a box, enclosed: { final, complete, reason, reached, steps, width, at(t) }. See Flows.
floatOrbit(p0, until, { steps })A path in doubles for drawing: { t, points }.
returnMap(section, start, { returns })The return map of a section { variable, value, direction }: enclosures of the point, the time and the derivative. See Sections and periodic orbits.
periodicOrbit(section, guess, { returns, radius })A periodic orbit proven to exist near the guess, with period, multipliers and stability; or { proven: false, reason }.
equilibria(region)Every equilibrium in a box, with eigenvalues and kind. See Equilibria.
bifurcations(param, [from, to], region, { samples, tol })Parameter brackets where equilibria appear, merge or change stability, named.

Fractals

ExportWhat it does
new IFS(maps, { name, probabilities }), AffineAn iterated function system of affine maps with rational coefficients: stage(n), step, fixedPoint(i), contraction(), similarityDimension(), chaosGame(n, { seed }). See Iterated function systems.
attractorssierpinski, carpet, vicsek, cantorDust, heighway, levyDragon, barnsley.
moran(ratios, { bits })The s with Σ rᵢ^s = 1: exact or certified.
boxCounting(points, { scales }), seeded(seed)An estimated box dimension; a repeatable random generator.
cantor({ base, digits })A DigitCantor: contains(q), expansion(q), stage(n), measure(n), dimension(). See Cantor sets.
lsystem(spec), lsystems, LSystem, Q3L-systems: generate(n), counts(n), turtle(n). See L-systems.

Automata and pictures

ExportWhat it does
elementary(rule), Elementary, showRows(rows)Wolfram's rules: table, mirror, complement, equivalents, additive, step, run, fromCell, cycle. See Cellular automata.
life(cells, { rule }), Life, patternsLife and its relatives on the unbounded plane: step, run, population, bounds, classify, toString.
mandelbrot(options), julia(c, options)PixelGrid of proved inside / outside / undecided pixels. See Mandelbrot and Julia sets.
mandelbrotPoint(c), juliaPoint(c, z0)One exact point: { verdict, reason, period or escape }.
newtonBasins(coefficients, options)PixelGrid labelled by proved root. See Newton basins.
PixelGridwidth, height, kind, counts, at(i, j), toText(chars).
Try itEdit the code and run it with @ratmath/chaos and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs