Skip to main content

carlson_rc

Function carlson_rc 

Source
pub fn carlson_rc<P, E, V>(x: V, y: V) -> V
Expand description

Carlson degenerate integral R_C(x, y) = R_F(x, y, y), closed form. Assumes y > 0 (the only cases that arise inside R_J and the third-kind reductions); the y < 0 Cauchy-principal-value branch is not handled here.

Writing t = (y - x)/x, R_C(x, y) = S(t)/sqrt(x) where S(t) = atan(sqrt(t))/sqrt(t) = 1 - t/3 + t^2/5 - t^3/7 + ... is smooth and the same series for either sign of t (atanh for t < 0). The closed atan/ln forms lose ~sqrt(eps) precision as t -> 0 (e.g. ln(1 + sqrt|t|) with tiny sqrt|t|), which matters because R_J calls this with y -> x every iteration once p nears an argument. So for small |t| we use the series instead; the two agree to full precision at the crossover. This keeps R_C (and hence R_J near the p == arg degeneracy) accurate without resorting to extended precision.

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