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:
Accuracy::Normal— no significant precision lossAccuracy::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.
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
Error::InvalidInputif n < 1, or if 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).