fn regularized_beta(x: f64, a: f64, b: f64) -> f64
Regularized incomplete beta function I_x(a, b) using the NR continued fraction.