GCD, sieves, fast exponentiation — number theory with every intermediate value shown.
57 visualizations
Finds the greatest common divisor by repeatedly replacing (a, b) with (b, a mod b) until b is 0.
Finds all primes up to n by repeatedly crossing out the multiples of each prime.
Computes xⁿ (optionally mod m) in O(log n) multiplications by repeatedly squaring — the engine behind modular exponentiation in cryptography.
Decomposes n into its prime factors by dividing out each candidate 2…√n; whatever remains above 1 is itself prime.
Computes gcd(a, b) plus the Bézout coefficients x, y with a·x + b·y = gcd — the key to modular inverses.
Uses extended Euclid to find x such that a·x ≡ 1 (mod m).
Combines pairwise-coprime congruences into one solution modulo the product.
Computes φ(n) from n's distinct prime factors and highlights the coprime integers.
Uses deterministic witnesses and modular squaring to test primality in the supported integer range.
Uses a pseudorandom modular walk and GCD cycle differences to find a factor.
Checks Fermat congruences and reports probable prime rather than claiming proof.
Computes a binomial coefficient modulo a prime from base-p digits.
Raises a 2×2 matrix by repeated squaring with an optional modulus.
Sweeps site and circle events while maintaining a beach line.
Incrementally retriangulates circumcircle cavities around inserted points.
Reports segment intersections with an event queue and ordered sweep status.
Builds a convex hull as lower and upper left-turn chains.
Combines small hulls with output-sensitive gift wrapping.
Locates a query point by descending a hierarchy of planar triangulations.
Evaluates a polynomial at roots of unity using divide-and-conquer butterflies.
Performs FFT-style butterflies exactly in a finite field.
Multiplies large integers with three recursive half-size products.
Reduces block matrix multiplication from eight recursive products to seven.
Moves between feasible bases to optimize a linear objective.
Finds a functional-graph cycle with power-of-two blocks and constant space.
Alternates nearest-centroid assignment and centroid recomputation until convergence.
Discovers frequent itemsets by level-wise joining and anti-monotone pruning.
Traces a two-layer MLP forward pass and gradient update.
Slides a kernel with explicit multiply-accumulate frames.
Traces vanilla RNN hidden-state transitions.
Alternates nearest-centroid assignments and exact mean updates.
Updates feasible pairs of SVM dual multipliers.
Computes smoothed priors and token likelihoods in log space.
Builds covariance and traces normalized power iteration.
Tracks MSE and simultaneous slope/intercept updates.
Minimizes stable binary cross-entropy.
Alternates Gaussian responsibilities and weighted estimates.
Updates normalized example weights from weak-learner error.
Runs bit reversal and Cooley-Tukey butterfly stages.
Reconstructs time-domain samples from a complex spectrum.
Combines seven block products for matrix multiplication.
Uses maximum-magnitude pivots and back-substitution.
Factors a matrix into unit-lower and upper triangles.
Traces gcd and Bézout coefficients.
Runs deterministic 64-bit strong-prime witnesses.
Validates primes and derives public/private exponents.
Derives and verifies a modular shared secret.
Performs ratio-tested standard-form tableau pivots.
Integrates with four weighted derivative samples.
Tracks tangent updates and convergence residuals.
Generates primes through quadratic-residue toggles.
Projects a signal onto orthonormal cosine bases.
Alternates prediction and covariance-weighted correction.
Applies explicit image-kernel multiply-accumulate windows.
Generates raster pixels with integer decision variables.
Recursively interpolates a Bézier control polygon.
Traces the IEEE-754 magic seed and Newton refinement.