pub fn besselj_seq<T: BesselFloat>(
nu: T,
z: Complex<T>,
n: usize,
scaling: Scaling,
) -> Result<BesselResult<T>, Error>Expand description
Compute J_{ν+j}(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 via DLMF reflection formulas:
- Non-integer ν: J_{−ν}(z) = cos(νπ) J_ν(z) − sin(νπ) Y_ν(z)
- Integer ν: J_{−n}(z) = (−1)^n J_n(z)
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);
// J_0(z), J_1(z), J_2(z) in one call
let result = besselj_seq(0.0, z, 3, Scaling::Unscaled).unwrap();
assert_eq!(result.values.len(), 3);
assert!((result.values[0].re - 0.7652).abs() < 1e-3); // J_0(1) ≈ 0.7652§Errors
Returns Error::InvalidInput if n < 1.