Dynamic Gauss-Legendre numerical integration in C#: computing nodes and weights on the fly without overflow
A C# walkthrough of Gauss-Legendre quadrature that computes Legendre polynomial roots and weights at runtime instead of shipping precomputed tables. Bonnet's recurrence keeps the polynomial evaluation stable past degree 15, and Newton's method finds each root to about 1e-10 in a few iterations.