Skip to content

Commit 2ebf96d

Browse files
fix(uncertainbessels): update documentation for clarity and consistency in mathematical notation
1 parent faa48ae commit 2ebf96d

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

docs/src/refs.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@misc{NIST:DLMF,
22
key = {DLMF},
33
title = {NIST Digital Library of Mathematical Functions},
4-
editor = {Olver, F. W. J. and Olde Daalhuis, A. B. and Lozier, D. W. and Schneider, B. I. and Boisvert, R. F. and Clark, C. W. and Miller, B. R. and Saunders, B. V. and Cohl, H. S. and McClain, M. A.},
4+
note = {Olver, F. W. J. and Olde Daalhuis, A. B. and Lozier, D. W. and Schneider, B. I. and Boisvert, R. F. and Clark, C. W. and Miller, B. R. and Saunders, B. V. and Cohl, H. S. and McClain, M. A., eds.},
55
year = {2025},
66
institution = {National Institute of Standards and Technology (NIST)},
77
howpublished = {[{https://dlmf.nist.gov/}]({https://dlmf.nist.gov/}), Release 1.2.4 of 2025-03-15},

src/uncertainbessels/UncertainBessels.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ Uncertainty-aware wrappers for Bessel functions.
66
[`UncertainBessels`](@ref) lifts selected functions from `SpecialFunctions` so they accept
77
`Measurement` and `Complex{Measurement}` inputs. The wrapper evaluates the
88
underlying function at the nominal complex argument and propagates uncertainty
9-
via first-order finite differences using the four partial derivatives ``\\frac{\\partial \\Re f}{\\partial x}, \\frac{\\partial \\Re f}{\\partial y}, \\frac{\\partial \\Im f}{\\partial x}, \\frac{\\partial \\Im f}{\\partial y}`` with ``x = \\Re z`` and ``y = \\Im z``. No new Bessel algorithms are implemented:
10-
for plain numeric inputs, results and numerical behaviour are those of
9+
via first-order finite differences using the four partial derivatives ``\\frac{\\partial \\mathrm{Re} \\, f}{\\partial x}, \\frac{\\partial \\mathrm{Re} \\, f}{\\partial y}, \\frac{\\partial \\mathrm{Im} \\, f}{\\partial x}, \\frac{\\partial \\mathrm{Im} \\, f}{\\partial y}`` with ``x = \\mathrm{Re}(z)`` and ``y = \\mathrm{Im}(z)``. No new Bessel algorithms are implemented: for plain numeric inputs, results and numerical behaviour are those of
1110
`SpecialFunctions`.
1211
1312
Numerical scaling (as defined by `SpecialFunctions`) is supported for the
1413
“x” variants (e.g. `besselix`, `besselkx`, `besseljx`, …) to improve stability
1514
for large or complex arguments. In particular, the modified functions use
16-
exponential factors to temper growth along ``\\Re z`` (e.g. ``I_\\nu`` and ``K_\\nu``);
15+
exponential factors to temper growth along ``\\mathrm{Re}(z)`` (e.g. ``I_\\nu`` and ``K_\\nu``);
1716
other scaled variants follow conventions in `SpecialFunctions` and DLMF guidance
1817
for complex arguments. See [NIST:DLMF](@cite) and [6897971](@cite).
1918
@@ -22,12 +21,13 @@ for complex arguments. See [NIST:DLMF](@cite) and [6897971](@cite).
2221
- Thin, uncertainty-aware wrappers around `SpecialFunctions` (`besselj`, `bessely`,
2322
`besseli`, `besselk`, `besselh`) and their scaled counterparts (`…x`).
2423
- For `Complex{Measurement}` inputs, uncertainty is propagated using the 4-component
25-
gradient with respect to ``\\Re z`` and ``\\Im z``.
24+
gradient with respect to ``\\mathrm{Re}(z)`` and ``\\mathrm{Im}(z)``.
2625
- For `Measurement` (real) inputs, a 1-D finite-difference derivative is used.
2726
- No change in semantics for `Real`/`Complex` inputs: calls delegate to `SpecialFunctions`.
2827
2928
# Dependencies
3029
30+
- `SpecialFunctions`
3131
$(IMPORTS)
3232
3333
# Exports
@@ -37,6 +37,8 @@ $(EXPORTS)
3737
# Usage
3838
3939
```julia
40+
# do not import SpecialFunctions directly
41+
using LineCableModels.UncertainBessels
4042
z = complex(1.0, 1.0 ± 0.5)
4143
J0_cpl = besselj(0, z) # Complex{Measurement}
4244
J0_nom = besselj(0, value(z)) # nominal comparison
@@ -45,7 +47,7 @@ I1 = besselix(1, z) # scaled I1 with uncertainty
4547
4648
# Numerical notes
4749
48-
- Scaled modified Bessels remove large exponential factors along ``\\Re z`` (e.g., ``I_\\nu`` and ``K_\\nu`` are scaled by opposite signs of ``|\\Re z|``), improving conditioning. Scaled forms for the other families follow the definitions in `SpecialFunctions` and DLMF.
50+
- Scaled modified Bessels remove large exponential factors along ``\\mathrm{Re}(z)`` (e.g., ``I_\\nu`` and ``K_\\nu`` are scaled by opposite signs of ``|\\mathrm{Re}(z)|``), improving conditioning. Scaled forms for the other families follow the definitions in `SpecialFunctions` and DLMF.
4951
- Uncertainty propagation is first order (linearization at the nominal point).
5052
Large uncertainties or strong nonlinearity may reduce accuracy.
5153

0 commit comments

Comments
 (0)