1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Internal algorithm modules for Bessel function computation.
//!
//! These modules implement the core numerical routines from Amos Algorithm 644.
//! All functions are `pub(crate)` — they are not part of the public API.
//!
//! # Return value convention
//!
//! Most internal routines return `Result<usize, Error>` where the `usize`
//! value (`nz`) indicates the number of trailing output components set to zero
//! due to underflow. The upper-interface functions (`zbesj`, `zbesy`, etc.)
//! translate these into the public `Result<(usize, Accuracy), Error>`.
//!
//! Some routines (notably `zbknu`) return `nz` as a raw `i32` internally:
//! - `nz >= 0`: number of underflowed trailing components
//! - `nz == -1`: overflow detected
//! - `nz == -2`: convergence failure
//!
//! These sentinel values are converted to the appropriate `Error` variant
//! before reaching the public API.
//!
//! # Clippy suppressions
//!
//! Most algorithm modules carry module-level `#![allow(...)]` attributes:
//!
//! - `clippy::excessive_precision` / `clippy::approx_constant` — Fortran DATA
//! constants are transcribed at full f64 precision for 1:1 traceability against
//! zbsubs.f. Letting clippy round them would silently break verification.
//! - `clippy::too_many_arguments` — internal functions mirror Fortran subroutine
//! signatures (often 8–12 parameters). Restructuring would obscure the
//! correspondence with the reference implementation.
pub
// K function core path
pub
pub
pub
pub
pub
pub
// H function + Wronskian
pub
pub
// I, J, Y + analytic continuation
pub
pub
pub
pub
pub
pub
// Region 1 uniform asymptotic
pub
pub
pub
// Airy analytic continuation helper
pub
// Region 2 uniform asymptotic + dispatchers
pub
pub
pub
pub
pub