RatMath ShelfCourse guide

Mathematics · teaching and practice

Course guide

Explore 40 lectures and problem sets per course, from counting collections to undergraduate proofs. Each day pairs a worked example with a RatMath calculation or a hand solution.

School: elementary and middle

School: high school

University: first two years

University: upper level

Input ranges, performance and accuracy

The typical ranges are teaching estimates for the 185 units. A lesson reports its actual worked input, additional checks where available, and the workload used to explore cost. Changing a matrix’s rank, a graph’s density, a pole’s location or an integer’s factors can matter more than increasing a single size parameter.

938 different programs ran. 1,519 additional arithmetic substitutions were compared with Python’s exact fractions. 106 parameterized workloads supplied 779 separate runs. 755 passed their stated checks and 0 disagreed with the stated mathematical check. The tables give refusals and resource stops individually.

How time, memory and correctness were measured

Workloads ran under Node v24.22.3 on linux x64 with AMD EPYC 9V74 80-Core Processor. Each size used a fresh process, with up to two such processes in parallel. The timer around the public call excludes imports and oracle checks. The four-second controller deadline includes fixture setup and calculation. The oracle has a separate four-second budget. Peak RSS includes runtime, imports, input, call and checker. The controller sampled RSS every 35 ms, capped it at 384 MiB, and set a 224 MiB V8 old-space limit. A dash means no completed call timing was recorded. “Heap exhausted” means the child reached its configured allocation limit. Baseline and stretch points are shared across courses. The 100 ms and one-second marks are reference points for interactive use. These single runs identify practical scale and ordering; timings vary with hardware and load.

Per-lesson timings use one run in a shared Node process. Package-test observations came from 168 source test files run under Bun. 1 files had failing tests. Only successful test callbacks with a matching pass result contributed from those files. 0 files were excluded completely. The former unused linear-algebra fixture power was removed, and the 20-atom model count now passes on Bun 1.4.2. Passing cases can contain several API calls and only assert on the final result. Test links open the source at the exact package revision.

Root revision dbdb1187cd75441ac90871b4d7d446902a9b0060.

Reproduced accuracy and runtime findings

Input contract · An integer can lose a digit before RatMath receives it

The decimal integer 9007199254740993 supplied as a JavaScript Number has already become 9007199254740992. The Rational constructor refuses this unsafe Number. Supply a BigInt or an exact string. Converting a rounded Number back to BigInt preserves the earlier error.

Node v24.22.3 · {"numberSeen":"9007199254740992","constructorResult":"Rational numerator must be a safe integer; use a string or bigint for exact values","fromString":"9007199254740993","fromBigInt":"9007199254740993"}

Bun 1.4.2 · {"numberSeen":"9007199254740992","constructorResult":"Rational numerator must be a safe integer; use a string or bigint for exact values","fromString":"9007199254740993","fromBigInt":"9007199254740993"}

Runtime limit · BigInt capacity depends on the runtime

Bun 1.4.2 and Node both accepted 2^1048575 and 2^1048576. The latter shift failed on Bun 1.4.0. Core now declares Bun ≥1.4.2. Passing these two shifts only establishes a lower bound on capacity.

Node v24.22.3 · ["accepted","accepted"]

Bun 1.4.2 · ["accepted","accepted"]

Fixed · The 20-atom model count passes

The disjunction of 20 distinct atoms has 2²⁰−1 = 1048575 satisfying assignments. Both runtimes now return that count. Logic also removed the extra bit required by its earlier intermediate mask.

Node v24.22.3 · "1048575"

Bun 1.4.2 · "1048575"

Fixed · Mixed-denominator mediants stay inside the interval

Splitting [1/(−2),1/3] now gives a common endpoint 0/5. Both child intervals lie inside the parent.

Node v24.22.3 · [["1/-2","0/5"],["0/5","1/3"]]

Bun 1.4.2 · [["1/-2","0/5"],["0/5","1/3"]]

Qualified · A density can carry unproven total mass

On [0,1], (1+10⁻⁵⁰)cos(x)/sin(1) has mass 1+10⁻⁵⁰. The default result reports massProven=false and supplies its enclosure. Pass {requireExactMass:true} when a proof of unit mass is required. The strict option refuses this example.

Node v24.22.3 · {"mass":"enclosure","massProven":false,"strict":"StatsError"}

Bun 1.4.2 · {"mass":"enclosure","massProven":false,"strict":"StatsError"}

Fixed · Large sample sizes preserve the exact ceiling

At margin 10⁻⁹, σ=1 and 95% confidence, n and the ceilings of both bound endpoints now equal 3841458820694125959. The large result is a BigInt. Preserve that type during further calculations.

Node v24.22.3 · ["3841458820694125959","3841458820694125959","3841458820694125959"]

Bun 1.4.2 · ["3841458820694125959","3841458820694125959","3841458820694125959"]

Fixed · Power at the null is handled explicitly

For μ=μ₀, σ=1 and α=0.05, the continuous known-σ test has power 0.05 for every positive sample size. The planner returns the minimum n=1 for a target of 0.04.

Node v24.22.3 · 1

Bun 1.4.2 · 1

Fixed · Bisection identifies the root selected by its trace

For (x−1)(x−6)(x−9) on [0,10], the certificate now returns the root 1 inside the last displayed bracket. A sign-changing interval can still contain several roots.

Node v24.22.3 · ["1:1",0.9999847412109375,1.0000038146972656]

Bun 1.4.2 · ["1:1",0.9999847412109375,1.0000038146972656]

Fixed · The verifier rejects a false tail index

For aₙ=1/(1+(n−50)²) and ε=1/2, changing N to 1 now fails verification. The later term a₅₀=1 proves the modified claim false.

Node v24.22.3 · false

Bun 1.4.2 · false

Fixed · The first-order checker rejects variable capture

Equality substitution from x=a and ∀x P(a) to ∀x P(x) now produces errors. A two-element model with x assigned to a and P true only of a refutes the conclusion.

Node v24.22.3 · "errors"

Bun 1.4.2 · "errors"

Fixed · A display name no longer identifies a dynamical family

The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.

Node v24.22.3 · {"error":"ChaosError","message":"no closed form for the invariant density of this map is known here; pass { distribution, interval } to lyapunovExponent yourself"}

Bun 1.4.2 · {"error":"ChaosError","message":"no closed form for the invariant density of this map is known here; pass { distribution, interval } to lyapunovExponent yourself"}

Fixed · Invalid boundary counts are rejected

Euler characteristic 2 with orientability true and −2 boundary circles now raises GeoError. The boundary count must be a nonnegative integer.

Node v24.22.3 · {"error":"GeoError","message":"the number of boundary circles is a whole number, 0 or more; got -2"}

Bun 1.4.2 · {"error":"GeoError","message":"the number of boundary circles is a whole number, 0 or more; got -2"}

Open · Very large clock durations can lose whole seconds

Adding 9007199254740993 seconds to midnight returns second 27392 of the day. Exact reduction modulo 86400 gives 27393. ClockTime converts the duration to Number before wrapping. For huge durations, reduce with BigInt before constructing a classroom clock.

Node v24.22.3 · [27392,27393]

Bun 1.4.2 · [27392,27393]

Open · Two distinct categorical tuples can merge

A uniform table on the two arrays [‘a,sb’,‘c’] and [‘a’,‘b,sc’] should give each probability 1/2. The table reports one outcome with probability 1 because the composite string keys collide. Use unambiguous scalar IDs for such labels. Ordinary numeric dice faces have distinct keys.

Node v24.22.3 · [1,"1","1"]

Bun 1.4.2 · [1,"1","1"]

How much space do seven dice need?

Seven fair independent dice have 6⁷ = 279,936 ordered rolls. The former implementation retained about 191 MiB of heap for the seven-die product. At the reviewed Stats revision die().power(7) keeps the seven factors and their integer weights. It built the same distribution in 0.34 ms with a measured heap change of 0.02 MiB. Implementation

  • One roll. Each valid roll has probability 1/279936. Its fixed-length base-six ID fits in 19 bits. .p(tuple) combines the factors directly. Use .count for an exact BigInt cardinality.
  • A sum. die().sumOf(7).p(24) gives 24017/279936. Convolution keeps only totals 7 through 42. Ignoring order but keeping the six face counts instead gives 792 patterns, each weighted by its multinomial coefficient.
  • An event. “First equals last and at least one die shows six” has 6⁶−5⁶=31,031 favorable rolls. .prob(predicate) streams integer weights and divides once. .entries explicitly allocates and caches tuples. Its two-million-outcome guard permits eight dice and excludes listing nine. Point lookup, factorwise sampling and streaming can still use nine dice. A complex predicate can remain expensive.
Separate Node processes · 3 GiB V8 old-space limit · 4 GiB RSS guard
DiceRepresentationBuild msQuery msRetained heap MiBBuffer change, bytesPeak process RSS MiB
6Stored 32-bit IDs0.8728.450.0218662459.09
6Base-six reference scan07.360058.33
6RatMath sum distribution6.640.180.08059.11
6RatMath implicit product0.329.330.05061.3
6RatMath explicit entries69.649.2517.15082.33
7Stored 32-bit IDs1.7254.990.02111974465.82
7Base-six reference scan018.640059.37
7RatMath sum distribution2.590.220.09058.37
7RatMath implicit product0.3433.460.02063.58
7RatMath explicit entries583.82140.62105.490222.08
8Stored 32-bit IDs8.03152.160.02671842871.39
8Base-six reference scan079.10060.22
8RatMath sum distribution3.690.250.1059.95
8RatMath implicit product3.0173.970.02064.2
8RatMath explicit entries2470.61339.52642.860842.93
9Stored 32-bit IDs21.42982.890.0240310784102.88
9Base-six reference scan0381.390060.06
9RatMath sum distribution5.750.210.1058.99
9RatMath implicit product0.31387.430.02064.32

The nine-die API visited 10,077,696 rolls in 387.43 ms and returned 1288991/10077696. Single-run timings depend on hardware and load. Heap and buffer figures are changes from a post-import baseline after garbage collection. All ordered rows check the same event. The explicit entries scan also checks each weight. Sum rows check the probability of the integer below or equal to the mean against a separate counting recurrence. The ID array and base-six scanner are reference implementations.

All 106 workload tables
core.R · whole-number operand

(n+7)(n−3) by independent BigInt arithmetic. Exact integer arithmetic grows with operand bit length. Enter large integers as decimal strings or BigInts before any JavaScript Number conversion.

Largest passing sample 9,007,199,254,740,991 (1.67 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

whole-number operand · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed1.7575
1BaselinePassed1.7075.7
10BaselinePassed1.7875.1
20BaselinePassed1.8875.4
100BaselinePassed1.5575.4
1,000BaselinePassed1.3675.3
1,000,000BaselinePassed1.3974.8
1,000,000,000StretchPassed1.6976.3
9,007,199,254,740,991StretchPassed1.6775.3
core.Rational.add · denominator

Cross-multiply 1/n + 1/(n+1) against (2n+1)/(n(n+1)). Exact work depends on the bit lengths of both numerator and denominator. A long sum of relatively prime fractions can build a large common denominator.

Largest passing sample 1,000,000,007 (0.038 ms, 76.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

denominator · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.03474.9
2BaselinePassed0.03675.6
3BaselinePassed0.04075.9
12BaselinePassed0.03975.2
100BaselinePassed0.04175
1,000BaselinePassed0.03575.8
1,000,003StretchPassed0.04475
1,000,000,007StretchPassed0.03876.3
core.Rational.multiply · operand bits

Cross-multiply the unreduced integer products; operands have unlike denominators. Intermediate products can have twice the bit length of their factors. Repeated squaring can exhaust the engine’s BigInt allocation limit in a small number of steps.

Largest passing sample 131,072 (1.53 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

operand bits · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
8BaselinePassed0.31774.6
32BaselinePassed0.03575.5
64BaselinePassed0.04575.1
256BaselinePassed0.10674
1,024StretchPassed0.03575.3
8,192StretchPassed0.07575.8
32,768StretchPassed0.24575
131,072StretchPassed1.5375.5
core.range · terms

Check length and every consecutive integer from 1 through n. Keeping the entire result requires storage proportional to its length. Shortening the displayed list after construction still pays that cost.

Largest passing sample 1,000,000 (141 ms, 277.5 MiB peak process RSS). The first sampled passing call above 100 ms used 1,000,000 (141 ms). The runs did not locate a ceiling for this family.

terms · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.17375.5
10BaselinePassed0.19274.9
100BaselinePassed0.26974.7
1,000BaselinePassed1.5275.6
10,000StretchPassed5.2980.9
100,000StretchPassed11.57109.6
1,000,000StretchPassed141277.5
core.Rational.roundTo · decimal places

Round one third toward zero and compare with (10^d−1)/(3×10^d). Extra decimal places require longer integers and more output. Choose rounding mode and decimal places explicitly for money or signed values.

Largest passing sample 1,000 (0.132 ms, 75.8 MiB peak process RSS). The runs did not locate a ceiling for this family.

decimal places · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.11375
1BaselinePassed0.15175
2BaselinePassed0.12375.6
4BaselinePassed0.11975.1
10BaselinePassed0.12076.2
50StretchPassed0.41875.2
250StretchPassed0.12475.2
1,000StretchPassed0.13275.8
units.Q · length in metres

After conversion to cm the numeric value is exactly 100n. These tests convert lengths. Check units and dimensional compatibility, especially for areas, volumes, affine temperature scales and compound units.

Largest passing sample 1,000,000,000 (0.305 ms, 75.7 MiB peak process RSS). The runs did not locate a ceiling for this family.

length in metres · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.51476.1
10BaselinePassed0.44474.1
100BaselinePassed0.44275.3
1,000BaselinePassed0.48074.4
1,000,000StretchPassed0.71075
1,000,000,000StretchPassed0.30575.7
symbolic.solve · absolute coefficient

Solve n·x+1=3n+1; the unique root is 3. One linear unknown has a simple root here. A vanishing coefficient may produce no solution or infinitely many. Multiple parameters require case analysis.

Largest passing sample 1,000,000,000 (6.48 ms, 75.9 MiB peak process RSS). The runs did not locate a ceiling for this family.

absolute coefficient · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed16.7675.8
2BaselinePassed7.7274.9
10BaselinePassed29.1075.2
100BaselinePassed12.7974.6
10,000StretchPassed28.5076.3
1,000,000,000StretchPassed6.4875.9
symbolic.expand · degree

Sum the expanded coefficients at x=1 by direct substitution; result 2^n. Also check at x=0 and 2. A univariate binomial has n+1 terms. With several variables the number of monomials can grow combinatorially even at modest degree.

Largest passing sample 128 (47.68 ms, 96.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

degree · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed26.1075.9
2BaselinePassed3.0575.5
4BaselinePassed2.7577.3
8BaselinePassed4.2379.5
16StretchPassed5.8882.6
32StretchPassed6.1287.9
64StretchPassed15.7389.5
128StretchPassed47.6896.3
symbolic.sym.diff · degree

Derivative of x^n at 2 is n·2^(n−1). A monomial differentiates to one term. Products, repeated derivatives and expression expansion can make intermediate expressions much larger.

Largest passing sample 1,024 (0.459 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family.

degree · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.15775.7
2BaselinePassed0.19275.7
4BaselinePassed0.27675.2
8BaselinePassed0.64275.5
16StretchPassed18.8374.7
64StretchPassed0.40675
256StretchPassed0.24175.3
1,024StretchPassed0.45974.4
symbolic.integrate · degree

The integral of x^n over [0,1] is 1/(n+1). Polynomial primitives are a favorable case. Singular endpoints, non-elementary primitives and unevaluated integrals need separate treatment.

Largest passing sample 500 (195 ms, 88.7 MiB peak process RSS). The first sampled passing call above 100 ms used 500 (195 ms). The runs did not locate a ceiling for this family.

degree · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed5.9875.7
1BaselinePassed8.6675.9
2BaselinePassed7.1475.7
5BaselinePassed9.2275.5
10BaselinePassed8.4875.8
30StretchPassed56.1188.9
100StretchPassed78.0688.4
500StretchPassed19588.7
symbolic.limit · polynomial degree

For n≥1, (x^n−1)/(x−1) tends to n at x=1. Cancellation is valid on a punctured neighborhood. Left and right limits and branch choices still require checking in general.

Largest passing sample 128 (1,021 ms, 91.5 MiB peak process RSS). The first sampled passing call above one second used 128 (1,021 ms). The runs did not locate a ceiling for this family.

polynomial degree · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed9.6676.6
2BaselinePassed9.6676.4
3BaselinePassed10.3577
6BaselinePassed16.3977.6
12StretchPassed16.7178.7
32StretchPassed44.0188.5
128StretchPassed1,02191.5
algebraic.sqrt · integer scale k

√(k²) has the nonnegative rational value k. This sweep uses perfect squares. Nonsquares involve algebraic representations and higher-degree combinations can cost substantially more.

Largest passing sample 1,000,000 (0.266 ms, 74.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

integer scale k · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.31275.2
2BaselinePassed0.27575.7
7BaselinePassed0.23775.3
50BaselinePassed0.23874.1
10,000StretchPassed0.28574.1
1,000,000StretchPassed0.26674.3
linalg.det.exact · square matrix side

Dense matrix I+J has eigenvalues 1 (n−1 times) and n+1. Even with small dimensions, large integer minors increase the cost of exact elimination. The dense structured fixture has small entries.

Largest passing sample 200 (383 ms, 131.8 MiB peak process RSS). The first sampled passing call above 100 ms used 200 (383 ms). The runs did not locate a ceiling for this family.

square matrix side · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.73176.1
2BaselinePassed0.81074.8
3BaselinePassed0.87675.2
5BaselinePassed1.3275.4
10BaselinePassed1.5876.1
25StretchPassed7.1077.5
50StretchPassed21.2881.7
100StretchPassed67.1190.3
200StretchPassed383131.8
linalg.solve.exact · unknowns

For dense I+J and b=(n+1)·1 every component of x must be one. Solving a nonsingular system checks one solution. Singular or inconsistent systems require rank and consistency checks. Large denominators increase exact cost.

Largest passing sample 128 (64.25 ms, 90.7 MiB peak process RSS). The runs did not locate a ceiling for this family.

unknowns · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed22.3275.6
2BaselinePassed2.2875.3
4BaselinePassed7.0275.1
8BaselinePassed2.4775.3
16StretchPassed4.3477.1
32StretchPassed8.0679.4
64StretchPassed63.8789.9
128StretchPassed64.2590.7
linalg.eigenvalues.exact · matrix side

An upper bidiagonal matrix has diagonal entries 1 through n as its full spectrum. The triangular example has rational eigenvalues. General characteristic polynomials, repeated roots and algebraic root isolation are harder.

Largest passing sample 18 (18.30 ms, 87.1 MiB peak process RSS). The runs did not locate a ceiling for this family.

matrix side · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed1.9275.5
2BaselinePassed6.1475.2
3BaselinePassed3.1175
4BaselinePassed7.0576.1
6StretchPassed4.2675.4
10StretchPassed7.9078.4
18StretchPassed18.3087.1
linalg.leastSquares.exact · observations

For y=2+3x, recover both coefficients with zero residual. Cost depends on both observations and independent columns. Collinearity can destroy uniqueness, and near-collinearity makes floating fits sensitive.

Largest passing sample 2,000 (68.14 ms, 92.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

observations · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed1.8875.3
3BaselinePassed2.8175.9
5BaselinePassed2.0574.7
20BaselinePassed2.4375.7
100StretchPassed4.0075.9
500StretchPassed18.4881.3
2,000StretchPassed68.1492.5
stats.mean · observations

Mean of integers 1 through n is (n+1)/2. Exact sums take at least one visit per observation. Unrelated denominators can make the running sum much larger than in this integer sample.

Largest passing sample 100,000 (129 ms, 142.2 MiB peak process RSS). The first sampled passing call above 100 ms used 100,000 (129 ms). The runs did not locate a ceiling for this family.

observations · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.79675.5
5BaselinePassed0.23174.8
20BaselinePassed0.65675.1
100BaselinePassed0.37074.4
1,000StretchPassed2.2975.2
10,000StretchPassed10.1483.6
100,000StretchPassed129142.2
stats.median · observations

The median of n descending consecutive integers 1…n is (n+1)/2. Retaining or ordering the observations costs memory. Even-length and repeated values need the stated convention for the statistic.

Largest passing sample 100,000 (89.20 ms, 116 MiB peak process RSS). The runs did not locate a ceiling for this family.

observations · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
3BaselinePassed0.77474.4
6BaselinePassed0.68574.5
25BaselinePassed0.54576.1
100BaselinePassed0.69875.3
1,000StretchPassed1.8376.2
10,000StretchPassed9.5581.4
100,000StretchPassed89.20116
stats.binomial.pmf · trials

For fair trials, P(exactly one success)=n/2^n. Very large trial counts create long rational probabilities. Near the tails, converting to floating point can erase small positive probabilities.

Largest passing sample 10,000 (0.836 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family.

trials · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.52776.3
5BaselinePassed0.49574.4
20BaselinePassed0.72375.1
100BaselinePassed10.6175.4
500StretchPassed0.55975.8
2,000StretchPassed0.53675.1
10,000StretchPassed0.83674.4
stats.normal.cdf · standard deviations from mean

Compare both endpoints against tabulated Φ(z) at 0,1,2,3,5 and symmetry Φ(−z)=1−Φ(z); check nonzero negative tail. For extreme tails, rounding a CDF to 1 before subtracting loses information. Inspect a direct tail enclosure and its width at the required precision.

Largest passing sample 24 (1.25 ms, 75.1 MiB peak process RSS). The first sampled passing call above 100 ms used 8 (112 ms). The runs did not locate a ceiling for this family.

standard deviations from mean · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed1.1074.6
1BaselinePassed15.8485.7
2BaselinePassed57.8587.5
3BaselinePassed37.7388.1
5StretchPassed67.2888.3
8StretchPassed11288.6
12StretchPassed23689.9
24StretchPassed1.2575.1
stats.tTest · observations per sample

A symmetric sample centered at its hypothesized mean has t=0 and a two-sided p-value of 1. Tail probability, degrees of freedom, ties and variance assumptions matter. A larger sample cannot repair an inappropriate test or model.

Largest passing sample 10,000 (83.32 ms, 88.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

observations per sample · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
3BaselinePassed1.6275.7
8BaselinePassed1.7775
20BaselinePassed1.6875.4
50BaselinePassed1.2875.1
200StretchPassed3.2475
1,000StretchPassed5.5078.8
10,000StretchPassed83.3288.5
stats.leastSquares · observations

All residuals must vanish on the exact line y=2x+3. Rows, predictors and coefficient bit lengths all affect cost. A perfect line tests arithmetic, while noisy, singular or nearly collinear data require different diagnostics.

Largest passing sample 20,000 (276 ms, 132.4 MiB peak process RSS). The first sampled passing call above 100 ms used 20,000 (276 ms). The runs did not locate a ceiling for this family.

observations · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed3.1174.8
4BaselinePassed0.57875.9
10BaselinePassed1.7476
50BaselinePassed2.6275
200StretchPassed4.2176.8
2,000StretchPassed36.0088.2
20,000StretchPassed276132.4
stats.die.sumOf · six-sided dice

For a sum of n fair dice, E[X]=7n/2 and Var[X]=35n/12. A sum of dice has only 5n+1 totals. Exact convolution still slows as support and rational weights grow. Enumerating ordered tuples grows as 6ⁿ.

Largest passing sample 100 (1,985 ms, 215.1 MiB peak process RSS). Time cutoff at 250, 500. The first sampled passing call above one second used 100 (1,985 ms).

six-sided dice · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed3.9475.1
2BaselinePassed1.6375.2
5BaselinePassed3.0377.2
10BaselinePassed10.1979.1
30BaselinePassed67.1889.7
100StretchPassed1,985215.1
250StretchTime cutoff—250.2
500StretchTime cutoff—274.8
stats.markovChain.stationary · states

A strictly positive uniform transition matrix has uniform stationary probabilities. An explicit transition matrix has n² entries. Check row sums, closed communicating classes and periodicity before interpreting a stationary law as a limit.

Largest passing sample 100 (655 ms, 144.2 MiB peak process RSS). The first sampled passing call above 100 ms used 50 (112 ms). The runs did not locate a ceiling for this family.

states · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed5.0374.6
3BaselinePassed1.6175.6
5BaselinePassed2.6975
10BaselinePassed16.4877
20StretchPassed36.5783.9
50StretchPassed11292.9
100StretchPassed655144.2
stats.fromDensity · monomial degree

For density proportional to x^k on [0,1], the normalizing constant is k+1 and mean is (k+1)/(k+2). Check total mass and nonnegativity on the full support. An interval containing one may leave room for an invalid density.

Largest passing sample 32 (12.81 ms, 77.8 MiB peak process RSS). The runs did not locate a ceiling for this family.

monomial degree · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed2.8574.6
1BaselinePassed4.0275.5
2BaselinePassed5.2675.6
4BaselinePassed5.7176.2
8StretchPassed5.3775.4
16StretchPassed7.1477.1
32StretchPassed12.8177.8
stats.sampleSize · decimal places in margin

For the 95% known-σ mean interval, both bound endpoints must have the same ceiling and the returned n must equal that exact integer. Required size grows roughly as the inverse square of the margin. Check the exact ceiling of both returned bound endpoints before trusting a large integer n.

Largest passing sample 10 (117 ms, 89.1 MiB peak process RSS). The first sampled passing call above 100 ms used 10 (117 ms). The runs did not locate a ceiling for this family.

decimal places in margin · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed57.4788.6
2BaselinePassed41.2487.9
3BaselinePassed34.9388.9
4BaselinePassed36.8588.8
6StretchPassed55.5389.2
8StretchPassed43.7688.7
9StretchPassed45.0488.3
10StretchPassed11789.1
numtheory.gcd · operand bits

Consecutive integers m,m+1 are coprime, so gcd(7m,7(m+1))=7. Euclidean reduction depends on operand size and their quotient sequence. Consecutive Fibonacci numbers need more steps than many inputs of the same bit length.

Largest passing sample 32,768 (0.183 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

operand bits · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
4BaselinePassed0.17174.8
8BaselinePassed0.13274.7
16BaselinePassed0.12974.8
32BaselinePassed0.13176.2
256StretchPassed0.12474.5
4,096StretchPassed0.16574.9
32,768StretchPassed0.18375.3
numtheory.modPow · exponent bits

Reduce the exponent independently modulo the order 3 of 2 mod 7. Modular reduction keeps residues bounded. Cost depends on modulus size and exponent bit length. Negative exponents require an inverse.

Largest passing sample 8,192 (2.51 ms, 81.1 MiB peak process RSS). The runs did not locate a ceiling for this family.

exponent bits · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.08375.3
4BaselinePassed0.08175.5
8BaselinePassed0.12974.3
16BaselinePassed0.08574.9
64StretchPassed0.08874.5
1,024StretchPassed0.20475.4
8,192StretchPassed2.5181.1
numtheory.factor · known semiprime

Recover both planted prime factors, including exponent one. Equal-length integers can have very different factoring times. These planted semiprimes give sample timings, with no general bound for the next integer.

Largest passing sample 1,000,036,000,099 (5.12 ms, 77 MiB peak process RSS). The runs did not locate a ceiling for this family.

known semiprime · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
15BaselinePassed0.33176
77BaselinePassed0.30976.3
899BaselinePassed0.29874.9
10,403BaselinePassed0.32775.7
1,022,117StretchPassed0.39775.8
100,160,063StretchPassed0.92275.4
1,000,036,000,099StretchPassed5.1277
numtheory.primePi · upper endpoint

Compare with known π(10^k) values 4,25,168,1229,9592,78498,664579. Sieving trades storage for time as the endpoint grows. Counting primes and listing or factoring large integers are different workloads.

Largest passing sample 10,000,000 (20.56 ms, 81 MiB peak process RSS). The runs did not locate a ceiling for this family.

upper endpoint · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
10BaselinePassed0.18575.3
100BaselinePassed0.16375.4
1,000BaselinePassed0.23574.5
10,000BaselinePassed0.67875.6
100,000StretchPassed2.6375.4
1,000,000StretchPassed4.6776.1
10,000,000StretchPassed20.5681
discrete.binomial · objects

Check k!(n−k)!·C(n,k)=n! for k=floor(n/2). Coefficient bit length grows with n and k. Counting is far cheaper than actually listing all k-subsets.

Largest passing sample 10,000 (8.36 ms, 88 MiB peak process RSS). The runs did not locate a ceiling for this family.

objects · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.14474.7
5BaselinePassed0.15173.9
10BaselinePassed0.14275.1
52BaselinePassed0.14175.9
100StretchPassed0.12875
500StretchPassed0.17176
2,000StretchPassed0.52678.6
10,000StretchPassed8.3688
discrete.stirling2 · elements

S(n,2)=2^(n−1)−1 from counting the two nonempty, unlabeled blocks. The check holds the number of blocks at two. Keeping all possible block counts or listing partitions can be substantially more expensive.

Largest passing sample 512 (181 ms, 113 MiB peak process RSS). The first sampled passing call above 100 ms used 512 (181 ms). The runs did not locate a ceiling for this family.

elements · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.17475.3
4BaselinePassed0.17376.4
8BaselinePassed0.19574
15BaselinePassed0.27874.8
32StretchPassed0.25074.8
128StretchPassed3.4575.8
512StretchPassed181113
structures.symmetric.orderStatistics · permuted points

Count every permutation by order; the histogram totals n! and contains one identity. An explicit order histogram visits group elements. Sₙ has n! elements. A formula for the order of Sₙ avoids this enumeration.

Largest passing sample 7 (73.20 ms, 89.4 MiB peak process RSS). Library refusal at 8. The first sampled passing call above 100 ms used 6 (157 ms).

permuted points · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed1.1675.6
3BaselinePassed1.3675.1
4BaselinePassed2.0775.2
5BaselinePassed10.2880.6
6StretchPassed15790.6
7StretchPassed73.2089.4
8StretchLibrary refusal · RangeError: the group has more than 20000 elements26.9990.1
structures.Zn.units · modulus

Enumerate the residues independently and select those coprime to n by Euclid's algorithm. Enumerating units or ideals scales with the size of the residue ring. A large modulus encoded in a few digits can still imply a large list.

Largest passing sample 10,000 (22.59 ms, 87 MiB peak process RSS). The runs did not locate a ceiling for this family.

modulus · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.37374.3
6BaselinePassed0.61175.5
12BaselinePassed0.47375.1
30BaselinePassed0.54175
120StretchPassed1.2974.5
1,000StretchPassed6.5976.5
10,000StretchPassed22.5987
algebraic.galoisGroup · prime radicand

x³−p is Eisenstein and has nonsquare discriminant −27p², so its Galois group has order 6. Coefficient size is varied at fixed cubic degree. Resolvents, factoring and composita at larger degree can change the difficulty sharply.

Largest passing sample 10,007 (2.41 ms, 74.9 MiB peak process RSS). The runs did not locate a ceiling for this family.

prime radicand · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed2.5374.8
3BaselinePassed2.3075.6
5BaselinePassed2.0275.1
11BaselinePassed2.3975.4
101StretchPassed1.9275.6
1,009StretchPassed3.4776.6
10,007StretchPassed2.4174.9
structures.smithForm · square matrix side

For a diagonal matrix with 1,2,4,… each invariant factor already divides the next. Diagonal input is favorable. Dense integer matrices can create large intermediate coefficients even when their final invariant factors are small.

Largest passing sample 50 (7.52 ms, 81.2 MiB peak process RSS). The runs did not locate a ceiling for this family.

square matrix side · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.31074.3
2BaselinePassed0.44875.9
3BaselinePassed0.40075.2
5BaselinePassed0.42374.8
10StretchPassed0.56575.5
25StretchPassed2.5576.1
50StretchPassed7.5281.2
complex.complex · absolute component

The product (n+i)(n−i) has imaginary part zero and real part n²+1. Exact rational complex arithmetic retains both coordinates. Branches, singularities and transcendental functions introduce a separate precision question.

Largest passing sample 1,000,000,000 (0.540 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

absolute component · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed1.2076
3BaselinePassed0.88775
10BaselinePassed0.51975.2
100BaselinePassed0.54974.5
100,000StretchPassed0.53475.6
1,000,000,000StretchPassed0.54075.5
complex.winding · positive circuits

A counterclockwise diamond traversed n times has winding n about the origin. Cost grows with path segments. A contour meeting the target point has undefined winding. Verify clearance and orientation before interpreting a count.

Largest passing sample 1,024 (49.38 ms, 89 MiB peak process RSS). The runs did not locate a ceiling for this family.

positive circuits · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed1.1975.2
2BaselinePassed1.6074.7
4BaselinePassed1.1675.6
8BaselinePassed1.4975.1
32StretchPassed2.5976
128StretchPassed7.5078.1
1,024StretchPassed49.3889
complex.residue · pole location

The coefficient of (z−a)^−1 in 1/(z−a) is exactly one. This fixture has one isolated simple pole. Nearby singularities, high order and cancellation can drastically increase the enclosure cost.

Largest passing sample 1,000,000 (111 ms, 91.4 MiB peak process RSS). The first sampled passing call above 100 ms used 0 (141 ms). The runs did not locate a ceiling for this family.

pole location · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed14192.4
1BaselinePassed16390
2BaselinePassed14490.1
5BaselinePassed15792.2
50StretchPassed16090.4
1,000StretchPassed13291.3
1,000,000StretchPassed11191.4
discrete.isBipartite · cycle vertices

A cycle has a bipartition precisely when its length is even. Graph traversal depends on vertices and edges. A long sparse cycle has far fewer edges than a dense graph of the same order.

Largest passing sample 10,000 (21.70 ms, 92.2 MiB peak process RSS). The runs did not locate a ceiling for this family.

cycle vertices · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
3BaselinePassed0.25275.7
4BaselinePassed0.38274.8
5BaselinePassed0.40675
12BaselinePassed0.42474.9
30BaselinePassed0.34975.7
100StretchPassed0.60975.9
1,000StretchPassed20.7277.9
10,000StretchPassed21.7092.2
discrete.spanningTreeCount · complete-graph vertices

Cayley's formula gives n^(n−2) labeled spanning trees of K_n. Each complete graph has n(n−1)/2 edges and a rapidly growing exact tree count. Listing the trees would be much more expensive.

Largest passing sample 128 (387 ms, 123.2 MiB peak process RSS). The first sampled passing call above 100 ms used 128 (387 ms). The runs did not locate a ceiling for this family.

complete-graph vertices · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.23076.4
3BaselinePassed3.5275.2
5BaselinePassed0.30475.5
8BaselinePassed0.38974.7
16StretchPassed0.80974.9
32StretchPassed9.9077.8
64StretchPassed23.8388.7
128StretchPassed387123.2
discrete.chromaticNumber · cycle vertices

Odd cycles require three colours, even cycles two. Cycles are easy to color. Exact coloring, clique and isomorphism searches can take much longer on less structured graphs of the same size.

Largest passing sample 101 (8.06 ms, 79 MiB peak process RSS). The runs did not locate a ceiling for this family.

cycle vertices · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
3BaselinePassed0.59274.6
4BaselinePassed0.68475
5BaselinePassed1.1574.9
10BaselinePassed0.86674.7
15BaselinePassed1.7475.6
25StretchPassed1.6075.6
50StretchPassed1.1776
101StretchPassed8.0679
discrete.maximumMatching · vertices per side

K_(n,n) has a diagonal perfect matching of size n. Complete bipartite input has n² edges. Verifying a matching uses its vertices and edges. More general optimization objectives need their own check.

Largest passing sample 100 (102 ms, 125.5 MiB peak process RSS). The first sampled passing call above 100 ms used 100 (102 ms). The runs did not locate a ceiling for this family.

vertices per side · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.86975.2
2BaselinePassed0.51174.2
5BaselinePassed0.78376.1
10BaselinePassed1.2175
25StretchPassed4.0678.9
50StretchPassed24.2291.6
100StretchPassed102125.5
discrete.linearProgram · variables

Maximize Σxᵢ under xᵢ≤i+1 and x≥0. The positive objective saturates every coordinate. A bounded box gives an easy linear program. Constraint count, degeneracy and intermediate rational bit lengths affect pivot cost.

Largest passing sample 100 (57.90 ms, 84.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

variables · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed1.3075.3
2BaselinePassed1.2875.1
3BaselinePassed3.7674
5BaselinePassed1.9875.1
10StretchPassed2.8375.6
25StretchPassed3.7175.6
50StretchPassed9.6678.2
100StretchPassed57.9084.5
discrete.integerProgram · binary choices

With equal unit weights and capacity n/2, the optimum takes the largest floor(n/2) profits. This fixture has an easy relaxation. Branch-and-bound can take exponentially many nodes on indivisible or tightly coupled choices.

Largest passing sample 32 (38.64 ms, 90.8 MiB peak process RSS). The runs did not locate a ceiling for this family.

binary choices · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed2.0675.6
4BaselinePassed3.0775.2
6BaselinePassed4.1775.4
10BaselinePassed4.8476.8
16StretchPassed13.4481.5
24StretchPassed30.4590.7
32StretchPassed38.6490.8
discrete.assignment · rows and columns

Unit diagonal and strictly larger off-diagonal costs force the unique identity assignment, cost n. Materializing the cost table takes n² entries. Exact optimization can take much longer than evaluating the cost of a proposed assignment.

Largest passing sample 16 (565 ms, 127.2 MiB peak process RSS). Time cutoff at 32, 64, 128. The first sampled passing call above 100 ms used 16 (565 ms).

rows and columns · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed2.6274.8
2BaselinePassed2.0575.5
4BaselinePassed10.5277.3
8BaselinePassed52.5092.3
16StretchPassed565127.2
32StretchTime cutoff—271.4
64StretchTime cutoff—315.2
128StretchTime cutoff—333.5
discrete.matrixGame · strategies per player

The identity payoff game has value 1/n by uniform mixing for both players. The identity game has an obvious symmetric solution. Enumerating supports or equilibria in general games can grow exponentially.

Largest passing sample 20 (19.80 ms, 79.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

strategies per player · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed3.6075.7
3BaselinePassed2.0275
4BaselinePassed3.6575.1
5BaselinePassed2.6975.9
8StretchPassed3.3176.3
12StretchPassed4.7976.6
20StretchPassed19.8079.3
geo.midpoint · absolute coordinate

Midpoint of (−k,0) and (k,2k) equals (0,k). Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.

Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

absolute coordinate · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.19374.9
1BaselinePassed0.19775.2
10BaselinePassed0.15175.4
100BaselinePassed0.16975.6
1,000,000StretchPassed0.29876.3
1,000,000,000StretchPassed0.17575.5
geo.triangle · scale on a 3–4–5 triangle

The unsigned area scales by k² from 6. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.

Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

scale on a 3–4–5 triangle · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.27074.8
2BaselinePassed0.38874.9
5BaselinePassed0.28776.4
10BaselinePassed0.26475.6
100StretchPassed0.27875.3
10,000StretchPassed0.26876.8
1,000,000StretchPassed0.27375.3
geo.countTopologies · labeled points

Compare the counts of labeled topologies with 1,4,29,355,6942,209527. The number of labeled topologies grows rapidly. An explicit census on a finite set is much harder than checking a given topology.

Largest passing sample 5 (941 ms, 88.6 MiB peak process RSS). Library refusal at 6. The first sampled passing call above 100 ms used 5 (941 ms).

labeled points · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.17275
2BaselinePassed0.20975.4
3BaselinePassed0.29876.1
4BaselinePassed18.8677.3
5StretchPassed94188.6
6StretchLibrary refusal · GeoError: counting by preorders is limited to n ≤ 5 here (6 points have 209527 topologies)0.17075.6
logic.countModels · Boolean atoms

A disjunction of n distinct atoms is false in exactly one of its 2^n valuations. An n-atom truth table has 2ⁿ rows. This implementation guards tables above 22 atoms. SAT search has different resource costs.

Largest passing sample 20 (21.16 ms, 97.1 MiB peak process RSS). Library refusal at 24.

Boolean atoms · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.29075.3
2BaselinePassed0.26874.6
4BaselinePassed0.42676.4
8BaselinePassed0.37175.4
12StretchPassed0.72075.6
16StretchPassed2.3378
19StretchPassed10.5088.2
20StretchPassed21.1697.1
24StretchLibrary refusal · LogicError: a table over 24 atoms has 2^24 rows; use satisfiable() or valid() instead0.44075.4
logic.entails · successive implications

The assumptions p₀, p₀→p₁, … imply pₙ by repeated modus ponens. A chain of implications is a favorable entailment instance. Search depth, branching and quantifiers can be decisive even for short formulas.

Largest passing sample 128 (20.49 ms, 89.4 MiB peak process RSS). The runs did not locate a ceiling for this family.

successive implications · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed1.8475.5
2BaselinePassed1.9175.9
4BaselinePassed2.1875.8
8BaselinePassed2.7576.8
16StretchPassed3.0576.1
32StretchPassed9.7275.9
64StretchPassed6.8678.4
128StretchPassed20.4989.4
logic.regexToNFA / logic.toDFA · literal word length

A recognizer for a literal word accepts that word and rejects the shorter and longer neighbours. Determinization may require up to 2ⁿ subsets of n NFA states. Literal words are a favorable family without that branching.

Largest passing sample 128 (5.46 ms, 78.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

literal word length · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.70074.6
2BaselinePassed0.84775.5
4BaselinePassed1.00075.6
8BaselinePassed1.1175
16StretchPassed7.0675.8
32StretchPassed4.5675.7
64StretchPassed2.3276.7
128StretchPassed5.4678.5
logic.binaryIncrement.run · input bits

Incrementing a string of n ones gives 1 followed by n zeroes. Simulation cost depends on executed transitions and tape use. Reaching a step budget establishes an incomplete trace only.

Largest passing sample 2,048 (21.81 ms, 75.1 MiB peak process RSS). The runs did not locate a ceiling for this family.

input bits · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.24875.8
2BaselinePassed0.14174.4
4BaselinePassed0.14176
8BaselinePassed0.14974.7
32StretchPassed0.20174.9
128StretchPassed0.34975.1
512StretchPassed1.5675.1
2,048StretchPassed21.8175.1
chaos.logistic.orbit · exact iterations

At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q². For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].

Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms).

exact iterations · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed1.1675.6
1BaselinePassed0.79375.7
3BaselinePassed0.79774.5
6BaselinePassed0.88974.8
10BaselinePassed1.2877.4
12StretchPassed3.3676.7
15StretchPassed17488.4
18StretchLibrary refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits77289
20StretchLibrary refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits71288.5
chaos.cantor.stage · construction depth

At stage n the middle-thirds construction consists of exactly 2^n intervals. The middle-thirds set has 2ⁿ surviving intervals at stage n. Drawing or retaining every interval therefore consumes exponential space.

Largest passing sample 18 (2,501 ms, 378.4 MiB peak process RSS). The first sampled passing call above one second used 18 (2,501 ms). The runs did not locate a ceiling for this family.

construction depth · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.15675.4
1BaselinePassed0.37475.8
3BaselinePassed0.40576.1
6BaselinePassed10.8475.8
10StretchPassed13.8290.6
14StretchPassed156129.1
18StretchPassed2,501378.4
analytic.bisection · decimal tolerance exponent

Both the returned root and its final bracket must contain or agree with √2 to the requested tolerance, allowing one double-precision ulp for the floating trace. Check enclosure endpoint squares. The displayed iteration trace uses doubles; precision eventually stops improving. A bracket with several roots can select different roots under different starting bounds. Compare the returned enclosure with the trace.

Largest passing sample 24 (7.66 ms, 79.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

decimal tolerance exponent · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed4.2474.7
4BaselinePassed4.7277.2
6BaselinePassed4.1277
8BaselinePassed6.6776.9
10StretchPassed4.2777.4
12StretchPassed4.1875.9
16StretchPassed4.9076.4
24StretchPassed7.6679.5
analytic.sequence.nFor · decimal tolerance exponent

For |1/n|<10^−d the first index is 10^d+1, including the strict-boundary case. A tiny ε may force a very large witness index. Check the whole tail when certifying an N for a nonmonotone sequence.

Largest passing sample 12 (10.71 ms, 78.8 MiB peak process RSS). Library refusal at 16.

decimal tolerance exponent · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed8.2079.8
2BaselinePassed10.1079.5
3BaselinePassed8.4080.3
4BaselinePassed18.4980.5
6StretchPassed8.6780.2
8StretchPassed8.8480.3
12StretchPassed10.7178.8
16StretchLibrary refusal · AnalyticError: no index was found where the terms are within ε of the limit10.3580.5
analytic.quadratureRule · Simpson panels

Simpson's rule integrates x³ on [0,1] exactly, giving 1/4 at every panel count. A cubic integrates exactly under Simpson’s rule. Other integrands need an error estimate, smoothness conditions and checks near singular endpoints.

Largest passing sample 2,048 (120 ms, 90.9 MiB peak process RSS). The first sampled passing call above 100 ms used 2,048 (120 ms). The runs did not locate a ceiling for this family.

Simpson panels · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed4.6775.8
2BaselinePassed5.0675.8
4BaselinePassed5.8075.6
10BaselinePassed10.2076.9
32StretchPassed8.7777.8
128StretchPassed19.6587.5
512StretchPassed37.5490.1
2,048StretchPassed12090.9
analytic.odeMethod · Euler steps

For y′=y and h=1/n, check the floating Euler iterate against exp(n log1p(1/n)) within 10⁻¹¹. Method error relative to e is separate. Smaller steps reduce Euler truncation error for a suitably stable problem. The teaching trace uses doubles. Stiff equations can require vastly smaller steps.

Largest passing sample 1,000 (292 ms, 90.4 MiB peak process RSS). The first sampled passing call above 100 ms used 300 (117 ms). The runs did not locate a ceiling for this family.

Euler steps · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed51.0090.3
4BaselinePassed34.0189.8
10BaselinePassed36.2489.6
50BaselinePassed61.4389.9
100StretchPassed66.4590.3
300StretchPassed11789.3
1,000StretchPassed29290.4
analytic.interpolate · distinct nodes

For nodes sampled on y=2x+1 the interpolant reproduces that line at the off-grid point n+1. Interpolation needs distinct nodes. More equispaced nodes can worsen oscillation between them even when the nodal values match exactly.

Largest passing sample 64 (17.06 ms, 89.7 MiB peak process RSS). The runs did not locate a ceiling for this family.

distinct nodes · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.86975.6
3BaselinePassed0.79575.3
5BaselinePassed0.95275.4
8BaselinePassed1.2875.2
16StretchPassed2.2376.2
32StretchPassed5.3577.9
64StretchPassed17.0689.7
analytic.curve.length · parameter interval end

The straight curve (3t,4t) from 0 to n has length 5n. Smooth straight-line speed is constant here. Near a cusp or a zero of speed, curvature can be undefined and length integration harder.

Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family.

parameter interval end · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed2.8775.7
2BaselinePassed2.8975.5
5BaselinePassed2.8175.3
10BaselinePassed2.8576.1
100StretchPassed2.9375.3
1,000StretchPassed3.1675.2
10,000StretchPassed3.1076.2
analytic.surface · coefficient of the mixed term

The graph z=k u v at the origin has Gaussian curvature −k². The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.

Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family.

coefficient of the mixed term · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed4.6676.2
2BaselinePassed14.6776
3BaselinePassed7.0877.2
5BaselinePassed5.0476.2
10StretchPassed4.9776.7
50StretchPassed4.7376.7
100StretchPassed5.0976.7
analytic.heat · requested sine terms

At x=1/2, t=1/10 a unit sine mode decays to exp(−π²/10). Test containment against the closed form to double precision. A loose tail bound at low order reduces usable precision. Tail enclosure and precision can dominate the mode count. Compare both endpoints at the evaluation point, particularly near initial time.

Largest passing sample 16 (1,510 ms, 127.2 MiB peak process RSS). Time cutoff at 32, 64. The first sampled passing call above one second used 16 (1,510 ms).

requested sine terms · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed45890.1
2BaselinePassed49192.1
4BaselinePassed63290.8
8BaselinePassed82893
16StretchPassed1,510127.2
32StretchTime cutoff—135.3
64StretchTime cutoff—136
analytic.wave · integer periods

Unit string with initial displacement sin(πx) and zero velocity returns to amplitude one at its midpoint at time 2n. A single smooth eigenmode has known periodicity. Nonsmooth initial data may require many terms and can exhibit oscillations near a jump.

Largest passing sample 1,000 (3.94 ms, 77.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

integer periods · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed3.5576.5
2BaselinePassed3.1976.9
3BaselinePassed3.4077
5BaselinePassed3.3176.5
10StretchPassed5.4577.1
100StretchPassed3.3076.7
1,000StretchPassed3.9477.3
analytic.fourier.exact · partial-sum order

For odd f(x)=x, every cosine coefficient vanishes, including the constant term. Check enclosure widths as well as inclusion of the target. High harmonics require increasingly oscillatory integrals.

Largest passing sample 16 (2,617 ms, 131.8 MiB peak process RSS). Time cutoff at 32, 64. The first sampled passing call above one second used 16 (2,617 ms).

partial-sum order · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed32.7989.7
2BaselinePassed10990.9
4BaselinePassed21591
8BaselinePassed76492.7
16StretchPassed2,617131.8
32StretchTime cutoff—133.5
64StretchTime cutoff—134.2
analytic.dft · sample count

The DFT of a unit impulse is identically one in every frequency bin. The result keeps one complex value per frequency. For signals with general phases, precision and transform length can dominate cost.

Largest passing sample 256 (134 ms, 91.3 MiB peak process RSS). The first sampled passing call above 100 ms used 256 (134 ms). The runs did not locate a ceiling for this family.

sample count · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.88776.2
4BaselinePassed0.81575.4
8BaselinePassed1.0775.8
16BaselinePassed2.0875.7
32StretchPassed3.2976.4
64StretchPassed17.1079.6
128StretchPassed29.3583.2
256StretchPassed13491.3
finance.compound · annual periods

At 5%, the balance on 100 is exactly 100·21^n/20^n. Fixed-period exact compounding raises rational factors to a power, increasing numerator and denominator lengths. Match rate units to periods.

Largest passing sample 10,000 (207 ms, 89.3 MiB peak process RSS). The first sampled passing call above 100 ms used 10,000 (207 ms). The runs did not locate a ceiling for this family.

annual periods · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.43375.2
5BaselinePassed1.1476
10BaselinePassed0.56575.8
30BaselinePassed0.41975.3
100StretchPassed0.46875.6
500StretchPassed0.90575.9
2,000StretchPassed5.5978.5
10,000StretchPassed20789.3
finance.annuity · payments

At 5% per period a unit annuity-immediate has PV 20·(1−(20/21)^n). Exact sums can contain very large fractions even when the monetary answer needs only cents. Distinguish payment timing and the zero-rate case.

Largest passing sample 20,000 (2,553 ms, 89.5 MiB peak process RSS). The first sampled passing call above one second used 20,000 (2,553 ms). The runs did not locate a ceiling for this family.

payments · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.46175.3
12BaselinePassed0.52175.2
60BaselinePassed0.53875.1
360BaselinePassed1.0875.3
1,000StretchPassed4.2377.9
5,000StretchPassed11789.3
20,000StretchPassed2,55389.5
finance.binomialTree · time steps

A zero-strike European call on a non-dividend-paying stock is worth the spot. Exact factors satisfy d<g<u. Backward induction works through a triangular collection of nodes. Exact fractions grow with depth. The fast floating mode changes the precision contract.

Largest passing sample 250 (703 ms, 90.7 MiB peak process RSS). Library refusal at 2,001. The first sampled passing call above 100 ms used 250 (703 ms).

time steps · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.67575.5
2BaselinePassed0.87975.8
5BaselinePassed0.65676.8
10BaselinePassed1.5175.6
25BaselinePassed3.3078.6
50StretchPassed11.2683.3
100StretchPassed56.4090.2
250StretchPassed70390.7
2,001StretchLibrary refusal · FinanceError: an exact tree is limited to 2000 steps (its fractions grow with every step); use float: true for a quick preview0.33075.5
analytic.gradientDescent · iterations

For f=x²+y², step 1/4 and start (1,1), each coordinate halves every iteration. Starting point and step size affect convergence. A converged local iterate does not establish global optimality.

Largest passing sample 300 (7.03 ms, 81.6 MiB peak process RSS). The runs did not locate a ceiling for this family.

iterations · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.97675.6
2BaselinePassed0.94275.8
4BaselinePassed0.86075.8
10BaselinePassed1.0775.7
30StretchPassed1.5575.4
100StretchPassed2.9077
300StretchPassed7.0381.6
stats.die.power · six-sided dice in the ordered sample space

The implicit product has 6^n ordered tuples. Check the exact count and the probability of the all-sixes tuple without listing it. An independent product stores its factors. Point lookup multiplies one weight per die. An arbitrary predicate may visit 6ⁿ tuples; asking for all entries also consumes exponential space.

Largest passing sample 100 (2.08 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family.

six-sided dice in the ordered sample space · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.65074.9
2BaselinePassed0.65475.1
3BaselinePassed0.95375.2
4BaselinePassed0.75575.3
7StretchPassed0.75175.6
9StretchPassed0.78875.6
32StretchPassed1.6875.5
100StretchPassed2.0876.7
symbolic.evaluate / symbolic.parse · scalar multiplier

At π/6, n sin(π/6)=n/2. Check inclusion or double agreement. Angle units and distance to poles matter more than multiplier size. Use enclosures when cancellation or a near-zero denominator affects the answer.

Largest passing sample 1,000,000 (6.79 ms, 75.2 MiB peak process RSS). The runs did not locate a ceiling for this family.

scalar multiplier · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed2.2875.9
2BaselinePassed2.4676.7
10BaselinePassed2.3076.1
100BaselinePassed2.2675.9
1,000StretchPassed4.4876.4
1,000,000StretchPassed6.7975.2
algebraic.interpolate · equally spaced nodes

The polynomial interpolating 3+2x has coefficients 3,2 and all higher terms vanish. Node count and spacing matter. Duplicate nodes can make interpolation undefined. Exact rational coefficients often grow with degree.

Largest passing sample 100 (10.18 ms, 83.9 MiB peak process RSS). The runs did not locate a ceiling for this family.

equally spaced nodes · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.50775.3
3BaselinePassed0.67074.3
4BaselinePassed0.47375.4
6BaselinePassed0.57375
10StretchPassed0.53974.7
25StretchPassed2.4275.3
50StretchPassed7.1477.7
100StretchPassed10.1883.9
analytic.legendre · polynomial degree

P_n(1)=1 and P_n(−1)=(−1)^n; coefficients of opposite parity vanish. Storing coefficients in the power basis can create large alternating terms. Evaluating near cancellation in floating point may lose digits.

Largest passing sample 100 (65.44 ms, 88.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

polynomial degree · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.10075
1BaselinePassed0.07375.1
2BaselinePassed0.70075.7
5BaselinePassed0.70275.1
10BaselinePassed0.74576
20StretchPassed2.4676.1
50StretchPassed8.7786.5
100StretchPassed65.4488.3
analytic.pde.classify · mixed-derivative coefficient B

A=C=1 gives discriminant B²−4. Its sign identifies elliptic, parabolic and hyperbolic cases. The sign of B²−4AC assumes the coefficient of the mixed derivative is B. A different convention uses a different discriminant.

Largest passing sample 10,000 (2.74 ms, 75.2 MiB peak process RSS). The runs did not locate a ceiling for this family.

mixed-derivative coefficient B · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.64774.8
1BaselinePassed0.50274.5
2BaselinePassed0.82175.6
3BaselinePassed0.71774.8
5BaselinePassed0.51676.5
50StretchPassed0.66574.6
10,000StretchPassed2.7475.2
analytic.pde.transport · wave speed

At x=1,t=2 with initial data x², translation gives (1−2c)². This sweep uses exact polynomial data and a constant speed. Characteristics must stay inside the problem domain and satisfy the supplied boundary data.

Largest passing sample 10,000 (2.52 ms, 76.1 MiB peak process RSS). The runs did not locate a ceiling for this family.

wave speed · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed3.1073.6
2BaselinePassed2.1574.4
3BaselinePassed1.4176.2
5BaselinePassed1.9075.2
10StretchPassed2.3175.6
100StretchPassed1.3675.6
10,000StretchPassed2.5276.1
chaos.catMap.fixedPointCount · iterate

Tr(A^n) satisfies T₀=2,T₁=3,Tₙ=3Tₙ₋₁−Tₙ₋₂. Fixed-point count equals Tₙ−2. Repeated exact matrix powers grow in bit length with the iterate. The determinant formula counts fixed points of the iterate, including shorter periods.

Largest passing sample 10,000 (35.52 ms, 88.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

iterate · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.23775.4
2BaselinePassed0.18574.8
3BaselinePassed0.22374.8
5BaselinePassed0.18974.6
10BaselinePassed0.22074.7
100StretchPassed0.48076.4
1,000StretchPassed1.2277.4
10,000StretchPassed35.5288.3
chaos.sharkovskii.forces · period exponent k

A period 2^k forces a period 2^(k−1) and the reverse implication fails. The period-forcing order concerns continuous interval maps. A period forced by a theorem need not be found by a short numerical orbit.

Largest passing sample 30 (0.094 ms, 76.1 MiB peak process RSS). The runs did not locate a ceiling for this family.

period exponent k · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.11375.8
2BaselinePassed0.08975.2
3BaselinePassed0.14774.2
5BaselinePassed0.09974.3
10StretchPassed0.16775.2
20StretchPassed0.11175.3
30StretchPassed0.09476.1
structures.cyclic.elementOrder · group order

The element 2 of Z/n has order n/gcd(2,n). Element orders are cheap compared with constructing every subgroup. Check the representation and group operation before transferring a timing.

Largest passing sample 1,000 (116 ms, 80.6 MiB peak process RSS). RSS cutoff at 10,000. The first sampled passing call above 100 ms used 1,000 (116 ms).

group order · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.73974.6
4BaselinePassed0.82775.3
6BaselinePassed0.93775.2
12BaselinePassed0.95476.2
24BaselinePassed1.5275.9
100StretchPassed7.1976.4
1,000StretchPassed11680.6
10,000StretchRSS cutoff—393.3
numtheory.multiplicativeOrder · prime modulus

Compute the order by multiplying 2 repeatedly modulo p until the first return to 1. The least positive exponent requires a unit modulo the modulus. Modular factoring and order structure affect running time.

Largest passing sample 10,007 (0.475 ms, 74.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

prime modulus · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
3BaselinePassed0.28175.7
5BaselinePassed0.41376.2
7BaselinePassed0.30074.5
11BaselinePassed0.35274.9
23BaselinePassed0.33875.6
101StretchPassed0.38475.7
1,009StretchPassed0.51275.9
10,007StretchPassed0.47574.3
numtheory.primitiveRoot · prime modulus

Powers of a primitive root must visit every nonzero residue modulo p. Primitive roots exist for prime moduli here. Composite moduli need existence checks. Generating and retaining every power is linear in the group order.

Largest passing sample 10,007 (0.286 ms, 75.6 MiB peak process RSS). The runs did not locate a ceiling for this family.

prime modulus · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
3BaselinePassed0.24475.7
5BaselinePassed0.24775.4
7BaselinePassed0.37375.4
11BaselinePassed0.33574.6
23BaselinePassed0.40674.9
101StretchPassed0.30275.7
1,009StretchPassed0.28373.9
10,007StretchPassed0.28675.6
structures.galoisField · prime characteristic

Choose an irreducible quadratic over F_p. Exhaustively check a·a⁻¹=1 for each nonzero field element. At fixed extension degree two the field already has p² elements. Exhaustive field checks scale with pᵈ at degree d.

Largest passing sample 31 (17.96 ms, 88.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

prime characteristic · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed0.24675
3BaselinePassed0.30275.4
5BaselinePassed0.73575.8
7BaselinePassed3.0675.8
11StretchPassed1.6376.9
19StretchPassed9.4680.9
31StretchPassed17.9688.5
linalg.rref.exact · matrix side

A lower triangular square matrix with diagonal 1 is invertible and reduces to the identity. Exact elimination preserves pivots. Input dimensions, rank and the size of intermediate fractions affect memory and time.

Largest passing sample 128 (119 ms, 92.8 MiB peak process RSS). The first sampled passing call above 100 ms used 128 (119 ms). The runs did not locate a ceiling for this family.

matrix side · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.93776.1
2BaselinePassed0.80075.3
4BaselinePassed1.0575.4
8BaselinePassed2.4574.4
16StretchPassed3.0775.6
32StretchPassed8.8278.7
64StretchPassed19.6789.3
128StretchPassed11992.8
analytic.spline · equally spaced knots

Natural cubic interpolation reproduces affine data at the midpoint between the first two knots. A natural cubic spline prescribes endpoint second derivatives. Check the knot ordering and boundary conditions before extrapolating.

Largest passing sample 200 (1,588 ms, 186.4 MiB peak process RSS). Library refusal at 2. The first sampled passing call above one second used 200 (1,588 ms).

equally spaced knots · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselineLibrary refusal · AnalyticError: a spline needs at least three points0.43375.6
3BaselinePassed1.1076.1
5BaselinePassed0.89276.2
10BaselinePassed2.1175.8
20StretchPassed5.6678.3
50StretchPassed69.5392.4
100StretchPassed226122.1
200StretchPassed1,588186.4
finance.simpleInterest · years at 5% per year

Interest on 100 at 5% per year is 5n, giving balance 100+5n. The time and rate must use the same unit. Large decimal inputs first parsed as JavaScript Numbers can already have lost information.

Largest passing sample 100,000 (0.378 ms, 74.2 MiB peak process RSS). The runs did not locate a ceiling for this family.

years at 5% per year · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.29176.1
1BaselinePassed0.36574.3
5BaselinePassed0.44675.1
10BaselinePassed0.56574.9
30BaselinePassed0.28075
100StretchPassed0.34575.6
1,000StretchPassed0.28976.3
100,000StretchPassed0.37874.2
finance.deMoivre.completeExpectation · current age; limiting age 100

Under de Moivre’s uniform lifetime law, remaining life at age x is uniform on [0,100−x] and has mean (100−x)/2. An age in this finite-lifetime model must lie in the model’s support. An expectation describes a population and depends on its survival law.

Largest passing sample 99 (0.647 ms, 75.4 MiB peak process RSS). The runs did not locate a ceiling for this family.

current age; limiting age 100 · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed1.4974.9
20BaselinePassed0.83375.3
40BaselinePassed1.8575.1
65BaselinePassed0.82875.7
90BaselinePassed0.58275.4
98StretchPassed0.52376
99StretchPassed0.64775.4
finance.loan · monthly payments

At 6% nominal annual interest with monthly payments, the unrounded level payment on 100 equals (1/2)·201^n/(201^n−200^n). A schedule may retain one row per payment and exact balances can grow rapidly. Loan rounding conventions and the compounding frequency affect the result.

Largest passing sample 600 (48.69 ms, 88.1 MiB peak process RSS). Library refusal at 1,200, 2,400.

monthly payments · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.96374.7
12BaselinePassed1.5875.5
60BaselinePassed3.6476.7
360BaselinePassed10.6681.7
600StretchPassed48.6988.1
1,200StretchLibrary refusal · FinanceError: in period 1 the payment 0.50 does not cover the interest 0.5013.0981.6
2,400StretchLibrary refusal · FinanceError: in period 1 the payment 0.50 does not cover the interest 0.5087.1089
logic.recursive.examples.factorial.at · natural-number argument

Compare primitive-recursive factorial with the integer product 1⋯n. A definition by primitive recursion can be much slower than direct integer multiplication. Track recursion depth or the evaluator’s budget.

Largest passing sample 7 (28.86 ms, 88 MiB peak process RSS). Time cutoff at 12, 20, 50, 100.

natural-number argument · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.12574.5
1BaselinePassed0.14875.1
4BaselinePassed0.24974.6
7BaselinePassed28.8688
12StretchTime cutoff—89.4
20StretchTime cutoff—88.4
50StretchTime cutoff—88.1
100StretchTime cutoff—88.9
logic.minimizeAutomaton · literal word length

Minimizing a DFA for a singleton word preserves acceptance of the word and rejects every strict prefix and its one-letter extension. The determinized automaton may already be large before minimization starts. Count reachable states and verify acceptance at boundary words.

Largest passing sample 64 (4.99 ms, 82.1 MiB peak process RSS). The runs did not locate a ceiling for this family.

literal word length · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed0.79375.8
2BaselinePassed0.65475.4
4BaselinePassed0.50974.8
8BaselinePassed0.91775.3
16StretchPassed1.5576.1
32StretchPassed6.9576.8
64StretchPassed4.9982.1
geo.metric.distance · absolute coordinate

Taxicab distance from (0,−n) to (n,n) equals 3n. The metric determines the distance. Coordinate singularities or unsupported metrics need a different argument.

Largest passing sample 1,000,000 (0.283 ms, 75.1 MiB peak process RSS). The runs did not locate a ceiling for this family.

absolute coordinate · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed3.8375.1
1BaselinePassed0.38475.1
3BaselinePassed0.28673.9
10BaselinePassed0.31975.6
10,000StretchPassed0.28675.3
1,000,000StretchPassed0.28375.1
discrete.bimatrixGame.pureEquilibria · strategies per player

For identical identity payoff matrices, exactly the n matching pure profiles are Nash equilibria. Pure equilibria can be checked cell by cell. Mixed equilibria require solving on supports and can be much more expensive at the same matrix size.

Largest passing sample 100 (777 ms, 126.8 MiB peak process RSS). The first sampled passing call above 100 ms used 50 (110 ms). The runs did not locate a ceiling for this family.

strategies per player · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
2BaselinePassed1.1775.7
3BaselinePassed1.7475.1
4BaselinePassed4.5675.5
5BaselinePassed6.4675.8
10StretchPassed4.2777.6
25StretchPassed39.6590.2
50StretchPassed11092.4
100StretchPassed777126.8
stats.linearModel · observations; one predictor

Check recovery of intercept 3 and slope 2 from exact data y=3+2x. The number of predictors and matrix rank matter independently of row count. A perfect fit can make standard-error or inference formulas degenerate.

Largest passing sample 5,000 (106 ms, 124.9 MiB peak process RSS). The first sampled passing call above 100 ms used 5,000 (106 ms). The runs did not locate a ceiling for this family.

observations; one predictor · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
4BaselinePassed1.0176.4
5BaselinePassed0.94174.6
10BaselinePassed5.1874.7
50BaselinePassed20.9175.7
200StretchPassed10.0780.1
1,000StretchPassed33.3989.1
5,000StretchPassed106124.9
complex.Complex.parse · real part of the numerator

For (n+i)/(1−i), the exact real and imaginary components are (n−1)/2 and (n+1)/2. The exact components are rational. A zero complex denominator makes division undefined and large denominators increase intermediate bit lengths.

Largest passing sample 1,000,000 (1.36 ms, 75.6 MiB peak process RSS). The runs did not locate a ceiling for this family.

real part of the numerator · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed1.0274.5
2BaselinePassed1.8174.8
5BaselinePassed0.61575.2
10BaselinePassed0.62575.7
100StretchPassed0.83874.7
1,000,000StretchPassed1.3675.6
symbolic.together · pole separation parameter

Combine 1/(x−n)+1/(x+n); at x=0, n+1 and −n−1 compare with 2x/(x²−n²). Exclude both original poles. Combining fractions can conceal holes at canceled factors. Keep the original exclusions even when the printed numerator and denominator simplify.

Largest passing sample 1,000 (9.92 ms, 75.6 MiB peak process RSS). The runs did not locate a ceiling for this family.

pole separation parameter · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed3.0776.4
2BaselinePassed3.7977.5
3BaselinePassed3.2675.4
5BaselinePassed3.5376.3
10StretchPassed6.8876.9
50StretchPassed3.9675
1,000StretchPassed9.9275.6
logic.foEntails · unary predicate premises

Universal premises ∀x Pᵢ(x) entail their conjunction at the named individual a by instantiation. These cases use universal instantiation over a nonempty domain. Alternating quantifiers and function symbols can lead to unbounded proof search. A bounded search result needs its status and assumptions.

Largest passing sample 20 (7.98 ms, 77.7 MiB peak process RSS). The runs did not locate a ceiling for this family.

unary predicate premises · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed4.2774.7
2BaselinePassed4.6475.5
3BaselinePassed3.4175.6
5BaselinePassed2.7774.7
8StretchPassed7.0676.2
12StretchPassed10.0977.2
20StretchPassed7.9877.7
logic.pda · balanced block length

The PDA accepts aⁿbⁿ (including ε) and rejects aⁿbⁿ⁺¹. The sample PDA is nearly deterministic. Epsilon moves and a branching stack can generate many more configurations for words of the same length.

Largest passing sample 500 (8.81 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family.

balanced block length · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.14374.8
1BaselinePassed0.19675.5
2BaselinePassed0.22575.9
5BaselinePassed0.22975.3
10BaselinePassed0.25275.7
25StretchPassed0.36574.8
100StretchPassed2.3475.3
500StretchPassed8.8176.7
logic.recursive.compose · natural-number input

Compose addition with two identical projections; the result must equal 2n. Doubling has a simple answer, though recursive evaluation depends on depth and on the chosen building blocks.

Largest passing sample 1,000 (1.33 ms, 75.4 MiB peak process RSS). The runs did not locate a ceiling for this family.

natural-number input · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.09274.7
1BaselinePassed0.10874.8
5BaselinePassed0.11476.3
21BaselinePassed0.91875.4
100StretchPassed0.25575.1
500StretchPassed5.1675.1
1,000StretchPassed1.3375.4
logic.recursive.mu · nonnegative radicand

Unbounded minimization with the predicate (y+1)²>n computes floor(√n). Check adjacent integer squares. This test has a witness within the square root of the input. For an arbitrary partial recursive predicate there may be no witness at all.

Largest passing sample 1,000,000 (0.488 ms, 74.2 MiB peak process RSS). The runs did not locate a ceiling for this family.

nonnegative radicand · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.06874.7
1BaselinePassed0.05874.1
9BaselinePassed0.05874.7
30BaselinePassed0.06275.3
100StretchPassed0.06674.8
10,000StretchPassed0.07874.8
1,000,000StretchPassed0.48874.2
chaos.attractors.carpet.similarityDimension · requested bits

For eight self-similar pieces of ratio 1/3, dimension d solves 3^d=8. Compare enclosure endpoints to log(8)/log(3) to floating precision. The formula assumes the specified contraction ratios and separation hypotheses. Requested bits control the computational accuracy, not validity of those hypotheses.

Largest passing sample 256 (12.53 ms, 79.5 MiB peak process RSS). The runs did not locate a ceiling for this family.

requested bits · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
8BaselinePassed3.6475.7
16BaselinePassed6.6576.7
24BaselinePassed3.4775.9
40BaselinePassed4.7077.1
64StretchPassed4.7477.9
128StretchPassed14.3078.2
256StretchPassed12.5379.5
geo.proofs.parallelogram · coordinate scale of a separate specialization

Check the fixed symbolic result, then specialize A=(0,0), B=(2n,0), C=(3n,n), D=(n,n). Both diagonal midpoints equal (3n/2,n/2). The theorem entry has no numeric argument. These times include an additional coordinate check. The symbolic certificate, with its hypotheses, supplies the general argument.

Largest passing sample 10,000 (15.36 ms, 79.4 MiB peak process RSS). The runs did not locate a ceiling for this family.

coordinate scale of a separate specialization · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed23.1879.8
2BaselinePassed13.2980
5BaselinePassed23.2380.3
10BaselinePassed16.8180.3
100StretchPassed12.3881.3
10,000StretchPassed15.3679.4
geo.proofs.ninePointCircle · coordinate scale of a separate specialization

Check the fixed theorem result and a right triangle with legs 4n and 2n. The side-midpoint circle has center (n,n/2) and squared radius 5n²/4. The built-in theorem has fixed symbolic inputs. The independent right-triangle specialization tests coordinates at several scales; degenerate triangles fall outside the theorem.

Largest passing sample 10,000 (114 ms, 91.3 MiB peak process RSS). The first sampled passing call above 100 ms used 1 (118 ms). The runs did not locate a ceiling for this family.

coordinate scale of a separate specialization · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed11891.2
2BaselinePassed20191
5BaselinePassed10192.3
10BaselinePassed10990.8
100StretchPassed91.3291.6
10,000StretchPassed11491.3
geo.solids · number of catalog solids checked

Compare the vertex, edge and face counts with the known convex polyhedra and verify V−E+F=2 for each. These inputs select named solids from a finite catalog. Mesh processing for an arbitrary number of faces would be a different operation.

Largest passing sample 9 (939 ms, 99.7 MiB peak process RSS). The first sampled passing call above 100 ms used 5 (444 ms). The runs did not locate a ceiling for this family.

number of catalog solids checked · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
1BaselinePassed1.2375.4
2BaselinePassed3.7375.8
3BaselinePassed3.4276.6
5BaselinePassed44494.9
7StretchPassed43795.5
9StretchPassed93999.7
units.Q · quarters of a dollar

Each quarter is exactly 25 cents. The supported currency is USD with US coin denominations. Amounts can remain exact rational values until the problem specifies cent rounding.

Largest passing sample 1,000,000 (0.226 ms, 74 MiB peak process RSS). The runs did not locate a ceiling for this family.

quarters of a dollar · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.20375.4
1BaselinePassed0.18675.8
3BaselinePassed0.18474.7
10BaselinePassed0.18674.3
40BaselinePassed0.23775.2
1,000StretchPassed0.32574.7
1,000,000StretchPassed0.22674
units.clock.add · elapsed minutes after 23:30

Integer division gives the number of midnight crossings and the remainder gives the exact time on the 24-hour clock. Clock arithmetic accepts whole seconds and tracks midnight crossings. Keep the shift plus starting seconds within the safe integer range. Very large exact durations can lose seconds on conversion to Number.

Largest passing sample 525,600 (0.580 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family.

elapsed minutes after 23:30 · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.44475.4
1BaselinePassed0.45375.2
30BaselinePassed0.51675.1
90BaselinePassed0.41274.4
1,440BaselinePassed0.43575.1
10,080StretchPassed0.46076
525,600StretchPassed0.58075.3
units.simpleDate.addDays · days after 2000-02-28

Compare the Gregorian date against UTC calendar arithmetic over days, centuries and a 400-year cycle. Simple dates use the proleptic Gregorian calendar for years 1 through 9999. For elapsed civil time across zones or daylight-saving changes use a zoned time library.

Largest passing sample 146,097 (0.227 ms, 75.7 MiB peak process RSS). The runs did not locate a ceiling for this family.

days after 2000-02-28 · one run per input
InputSampleResultCall (ms)Peak RSS (MiB)
0BaselinePassed0.26175.1
1BaselinePassed0.22475.4
2BaselinePassed0.28974.8
7BaselinePassed0.23275
30BaselinePassed0.27175.8
365BaselinePassed0.29175.6
1,461StretchPassed0.22275.3
36,524StretchPassed0.23874.4
146,097StretchPassed0.22775.7
Examples, software and verification

The guide adapts the Shelf Course Test and adds classroom problems on reasoning, modeling and boundary cases. Related courses share selected examples. Course ratings count one focal problem per day. Each displayed calculation ran against the integrated checkout. Expected values, stored predicates or numerical tolerances check the displayed examples. A passing numerical check establishes agreement on that input. Proofs and modeling choices are explained in the worked solutions.

Package versions: core 0.12.0 (commit 4e8c3f5), algebraic 0.1.0 (commit 04a0898), analytic 0.1.0 (commit 08d78e7), linalg 0.1.0 (commit 77cf842), graphics 0.1.0 (commit 17713ff), structures 0.5.0 (commit 0eabfd2), symbolic 0.2.0 (commit decb4bf), complex 0.3.0 (commit 180da31), discrete 0.3.0 (commit 94d099a), stats 0.3.0 (commit 8f9d83c), numtheory 0.3.0 (commit e340cee), logic 0.2.0 (commit 29a99e9), chaos 0.3.0 (commit a0dd13b), geo 0.4.0 (commit f147654), finance 0.2.0 (commit 4d9d4e8).

Shelf source · Set up the packages