Skip to main content

hankel2_scaled

Function hankel2_scaled 

Source
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