pub fn hankel2_scaled<T: BesselFloat>(
nu: T,
z: Complex<T>,
) -> Result<Complex<T>, Error>Expand description
Scaled Hankel function of the second kind, exp(iz) · Hν(2)(z).
H^(2) grows exponentially in the upper half-plane; the scaling factor removes this growth, preventing overflow.
Supports negative ν via the same reflection formula as hankel2.
See crate-level docs for the full scaling table.
§Example
use complex_bessel::hankel2_scaled;
use num_complex::Complex;
let z = Complex::new(1.0_f64, 0.0);
let h_s = hankel2_scaled(0.0, z).unwrap();
assert!((h_s.re - 0.4877).abs() < 1e-3); // exp(i) * H^(2)_0(1), Re ≈ 0.4877§Errors
Error::InvalidInputif z = 0.Error::Overflowif |z| is too small or too large for a finite result.Error::TotalPrecisionLossif |z| or |ν| is too large for any significant digits (roughly > 10⁹ for f64).Error::ConvergenceFailureif an internal series or recurrence does not converge (rare).