pub fn hankel2_seq<T: BesselFloat>(
nu: T,
z: Complex<T>,
n: usize,
scaling: Scaling,
) -> Result<BesselResult<T>, Error>Expand description
Compute H_{ν+j}^(2)(z) for j = 0, 1, …, n−1 in a single call.
Returns a BesselResult containing n values and an Accuracy:
Accuracy::Normal— full machine precisionAccuracy::Reduced— more than half of significant digits may be lost (|z| or ν very large)
The scaling parameter selects Scaling::Unscaled or Scaling::Exponential;
see crate-level docs for details.
Negative orders are supported: H^(2)_{−ν}(z) = exp(−νπi) H^(2)_ν(z) (DLMF 10.4.6).
See crate-level docs for more on sequence functions.
§Example
use complex_bessel::*;
use num_complex::Complex;
let z = Complex::new(1.0_f64, 0.0);
// H^(2)_0(z), H^(2)_1(z) in one call
let result = hankel2_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
Returns Error::InvalidInput if n < 1.