Skip to main content

hankel1_seq

Function hankel1_seq 

Source
pub fn hankel1_seq<T: BesselFloat>(
    nu: T,
    z: Complex<T>,
    n: usize,
    scaling: Scaling,
) -> Result<BesselResult<T>, Error>
Expand description

Compute Hν+j(1)(z) for j = 0, 1, …, n−1 in a single call.

Returns a BesselResult containing n values and an Accuracy:

The scaling parameter selects Scaling::Unscaled or Scaling::Exponential; see crate-level docs for details.

Supports negative ν via the same reflection formula as hankel1.

§Example

use complex_bessel::*;
use num_complex::Complex;

let z = Complex::new(1.0_f64, 0.0);

// H^(1)_0(z), H^(1)_1(z) in one call
let result = hankel1_seq(0.0, z, 2, Scaling::Unscaled).unwrap();
assert_eq!(result.values.len(), 2);
assert!((result.values[0].im - 0.0883).abs() < 1e-3); // Im = Y_0(1) ≈ 0.0883

§Errors