lumbda/tests
russell@unturf.com 2f342c3be2
c-tier bignum — arbitrary-precision integers unblock secp256k1 widths
Adds tagged bignum support alongside the existing 48-bit fixnum on the C
tier. Tag 6 = bignum, heap struct sign-magnitude with u64 little-endian
limbs. Reader emits bignums for any literal past the fixnum range; +, -,
*, quotient, remainder, modulo, expt, =, <, >, abs, odd?, even?,
integer?, exact?, number->string, string->number all promote fixnum →
bignum on overflow & demote back when results fit. Boehm GC owns every
allocation. Schoolbook O(n²) mul + shift-subtract divmod is sufficient
at our 4-limb / 256-bit scale.

Before: (expt 2 48) = 0, (expt 2 256) = 0, secp256k1-p = -4294968273.
After: all three return their exact arbitrary-precision values, matching
Python tier byte-for-byte.

Validated:
- c/test.c — 85/85 pass (+2 new bignum unit tests).
- tests/functional.lsp — 205/205 pass on both C & Python tiers.
- tests/bignum-cross-tier.lsp — 33/33 pass byte-identical on both tiers
  (diff produces no output).
- ecdsa/runs/lumbda-sweep-003/c-tier-bignum-probe.lsp — all four
  assertions now match the Python oracle.
- ecdsa Phase B byte-identity sweep inside QEMU guest:
  n+1=9  p=251           sha256 c668bbe3... — matches Python oracle.
  n+1=18 p=131071        sha256 8a031f96... — matches Python oracle.
  n+1=33 p=2³²-5         sha256 0bc56905... — matches Python oracle.
  Previously the n+1=33 C tier emitted sha256 b024d6d9... (26,078 fewer
  Toffolis due to silent fixnum wrap). Bignums close that gate.

secp256k1 production-width emit (n+1=257) is now structurally unblocked
on C tier; downstream agent (#55) drives that next-step on the ecdsa
side. Asm tier inherits in a follow-up port.
2026-06-06 20:23:37 -04:00
..
bench-3way.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
bench-gc-adaptive.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
bench-gc-arena.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
bench-gc-http.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
bench-gc-memory.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
bench-hashset.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
bench-lumbda-www.sh lumbda-www: asm-gc static file server for lumbda.com + caddy race 2026-04-19 12:12:59 -04:00
bench-proof.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
bench-www-race.sh lumbda-www: sendfile(2) primitive + adaptive preload — matches caddy throughput at 9x less RSS 2026-04-19 12:41:40 -04:00
bignum-cross-tier.lsp c-tier bignum — arbitrary-precision integers unblock secp256k1 widths 2026-06-06 20:23:37 -04:00
cl-compat.lsp asm: values + call-with-values + #(...) reader + exit + vector equal? 2026-04-24 12:38:47 -04:00
functional.lsp portal-rng: add (random-seed-from-os!) across all three tiers 2026-04-20 15:50:26 -04:00
portal-benchmark.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
portal-cross-load.lsp asm/c/py: add (load), ports, write-file/file->string — full cross-impl parity 2026-04-16 16:37:40 -04:00
portal-cross-save.lsp asm/c/py: add (load), ports, write-file/file->string — full cross-impl parity 2026-04-16 16:37:40 -04:00
portal-cross-test.sh portal-rng: asm xoshiro256** + cross-impl tests + default seed=0 2026-04-20 11:11:47 -04:00
portal-exchange.lsp rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
portal-formats.lsp rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
portal-rng-cross-test.sh portal-rng: 9-cell cross-impl stream matches independent Python baseline 2026-04-23 20:19:16 -04:00
portal-rng-load.lsp portal-rng: asm xoshiro256** + cross-impl tests + default seed=0 2026-04-20 11:11:47 -04:00
portal-rng-save.lsp portal-rng: asm xoshiro256** + cross-impl tests + default seed=0 2026-04-20 11:11:47 -04:00
prove-ursa-runs.sh tests: prove-ursa-runs.sh — runs Zoë's live source on every tier 2026-04-24 12:48:09 -04:00
regression-named-let-leak.lsp c: enable Boehm GC by default, GC_INIT, file ops, regression test 2026-06-04 00:55:31 -04:00
regression-named-let-leak.sh c: enable Boehm GC by default, GC_INIT, file ops, regression test 2026-06-04 00:55:31 -04:00
rpc-chain-bench.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
ursa-scheme.lsp asm: values + call-with-values + #(...) reader + exit + vector equal? 2026-04-24 12:38:47 -04:00
ursa.lsp asm: values + call-with-values + #(...) reader + exit + vector equal? 2026-04-24 12:38:47 -04:00
web-benchmark.sh rename: uncommonlisp -> lumbda throughout the repo 2026-04-19 10:20:11 -04:00
zoe-favorites-test.sh zoe-favorites-test: cover all four tiers (Python + C + asm + asm-full) 2026-04-24 12:27:51 -04:00