Skip to main content

phi_series_terms

Function phi_series_terms 

Source
pub const fn phi_series_terms(n: usize, eps: f64) -> usize
Expand description

Series terms phi_N needs on |z| < N to converge to a relative eps.

The n-th term of sum z^n/(n+N)! relative to the leading 1/N! is z^n N!/(N+n)!. At z = N every factor N/(N+n) is below one, so the terms fall monotonically and the first one under eps bounds the whole tail (the ratio there is small, so the tail is barely more than that term). Bounded input, so this is a compile-time count.

Last built: 2026-09-08 21:35:55 UTC