69. std.poly: formal power series over NTT on plain List<Mod<P>> (2026-11-21)
std.polyoperates directly onList<Mod<P>>with explicit output lengthn(inv,log,exp,pow,sqrt, plusderiv,integral).- Reason: Using plain
List<Mod<P>>(lowest degree first) gives zero-overhead interop withstd.ntt.convolve<P>,Comb<M>, and list comprehensions without introducing a wrapperPoly<P>type. Requiring explicit truncation lengthn: Int(modulox^n) matches every contest FPS call site (ucup5s06a,ucup5s03a,ucup5s05f) and avoids sentinel defaults.invuses half-size Newton doubling (5 NTTs of size2mper step),integraluses linear-time modular inverses1..=m,powhandles leading zeros and largekviaexp(k * log(...)), andsqrtreturns?List<Mod<P>>via Tonelli-Shanks + Newton doubling. - Reverse: Remove
stdlib/poly.cp, remove its rows fromstdlib/README.md,site/content/stdlib.md,editors/vscode/,spec/lib/math.md§2.5, andplan/STDLIB.md, and switch the four migrated ports back tolib.math.poly.
- Reason: Using plain