Skip to content

Commit 97192c2

Browse files
committed
Remove trailing whitespace, and fix wrapping
1 parent b15874f commit 97192c2

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
lines changed

README.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
77
[![JET QA](https://img.shields.io/badge/JET.jl-%E2%9C%88%EF%B8%8F-%23aa4444)](https://github.com/aviatesk/JET.jl)
88

9-
This package provides functions to compute the zeros of the J and Y functions,
10-
and the zeros of their derivatives, where J and Y are Bessel functions of the first and second kind, respectively.
11-
12-
For all functions described below, the order `nu::Real` is a finite number and `n::Integer` is a positive integer.
13-
When `nu isa AbstractFloat`, the returned value has the same type as `nu`. When `nu isa Integer`, the usual
14-
promotion rules apply, so that for most builtin integer types the output type will be `Float64`. However,
15-
when `nu isa BigInt` the output type will be `BigFloat`.
16-
17-
When the output type is `Float64`, the exported functions (`besselj_zero`,
18-
`bessely_zero`, `besselj_deriv_zero`, and `bessely_deriv_zero`) will use lookup tables to rapidly
19-
return function zeros if the order `nu` is one of the first few values of `0, 1, ...` and the enumerator
20-
`n` is one of the first values of `1, 2, 3, ...`. See the individual function docstrings for the actual
9+
This package provides functions to compute the zeros of the J and Y functions, and the zeros of
10+
their derivatives, where J and Y are Bessel functions of the first and second kind, respectively.
11+
12+
For all functions described below, the order `nu::Real` is a finite number and `n::Integer` is a
13+
positive integer. When `nu isa AbstractFloat`, the returned value has the same type as `nu`. When
14+
`nu isa Integer`, the usual promotion rules apply, so that for most builtin integer types the output
15+
type will be `Float64`. However, when `nu isa BigInt` the output type will be `BigFloat`.
16+
17+
When the output type is `Float64`, the exported functions (`besselj_zero`, `bessely_zero`,
18+
`besselj_deriv_zero`, and `bessely_deriv_zero`) will use lookup tables to rapidly return function
19+
zeros if the order `nu` is one of the first few values of `0, 1, ...` and the enumerator `n` is one
20+
of the first values of `1, 2, 3, ...`. See the individual function docstrings for the actual
2121
extents of the lookup tables.
2222

2323
### Exported Functions
@@ -28,7 +28,7 @@ extents of the lookup tables.
2828
besselj_zero(nu, n)
2929
```
3030

31-
Return the `n`th zero of the Bessel J function of order `nu`.
31+
Return the `n`th zero of the Bessel J function of order `nu`.
3232

3333
#### bessely_zero(nu, n)
3434

@@ -44,8 +44,7 @@ Return the `n`th zero of the Bessel Y function of order `nu`.
4444
besselj_deriv_zero(nu, n)
4545
```
4646

47-
Return the `n`th nonvanishing zero of the derivative of the Bessel J
48-
function of order `nu`.
47+
Return the `n`th nonvanishing zero of the derivative of the Bessel J function of order `nu`.
4948

5049
#### bessely_deriv_zero(nu, n)
5150

@@ -81,8 +80,7 @@ Asymptotic formula for the `n`th zero for the Bessel Y function of order `nu`.
8180
FunctionZeros.besselj_deriv_zero_asymptotic(nu, n)
8281
```
8382

84-
Asymptotic formula for the `n`th nonvanishing zero of the derivative of the
85-
Bessel J function of order `nu`.
83+
Asymptotic formula for the `n`th nonvanishing zero of the derivative of the Bessel J function of order `nu`.
8684

8785

8886
#### FunctionZeros.bessely_deriv_zero_asymptotic(nu, n)
@@ -92,5 +90,3 @@ FunctionZeros.bessely_deriv_zero_asymptotic(nu, n)
9290
```
9391

9492
Asymptotic formula for the `n`th zero of the derivative of the Bessel Y function of order `nu`.
95-
96-

src/FunctionZeros.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""
33
FunctionZeros
44
This module provides functions to compute the zeros of the J and Y functions,
5-
and the zeros of their derivatives, where J and Y are Bessel functions of the first and second kind, respectively.
5+
and the zeros of their derivatives, where J and Y are Bessel functions of the first and second kind, respectively.
66
"""
77
module FunctionZeros
88
import SpecialFunctions
@@ -15,7 +15,7 @@ const nupre_max = 1
1515
const npre_max = 500
1616

1717
# Strings used in multiple function docstrings:
18-
const speeddocstr = """For greater speed, table lookup is used for `Float64` outputs when
18+
const speeddocstr = """For greater speed, table lookup is used for `Float64` outputs when
1919
`nu ∈ 0:$nupre_max` and `n ∈ 1:$(npre_max)`."""
2020
const argstr = """## Arguments
2121
- `nu::Real`: The order of the Bessel function.
@@ -84,7 +84,7 @@ end
8484
_besselj_zero(nu, n)
8585
8686
`n`th zero of the Bessel J function of order `nu`,
87-
for `n` = `1,2,...`.
87+
for `n` = `1,2,...`.
8888
8989
$argstr
9090
"""
@@ -101,7 +101,7 @@ const jzero_pre = [_besselj_zero(nu, n) for nu in 0:nupre_max, n in 1:npre_max]
101101
besselj_zero(nu, n)
102102
103103
Return the `n`th zero of the Bessel J function of order `nu`,
104-
for `n` = `1,2,...`.
104+
for `n` = `1,2,...`.
105105
106106
$argstr
107107
$speeddocstr
@@ -146,7 +146,7 @@ const yzero_pre = [_bessely_zero(nu, n) for nu in 0:nupre_max, n in 1:npre_max]
146146
bessely_zero(nu, n)
147147
148148
Return the `n`th zero of the Bessel Y function of order `nu`,
149-
for `n` = `1,2,...`.
149+
for `n` = `1,2,...`.
150150
151151
$argstr
152152
$speeddocstr
@@ -185,7 +185,7 @@ bessely_deriv_zero_asymptotic(nu, n) = bessel_deriv_zero_asymptotic(nu, n, 2)
185185
"""
186186
bessel_deriv_zero_asymptotic(nu, n, kind=1)
187187
188-
Asymptotic formula for the `n`th zero of the the derivative of Bessel J (Y) function
188+
Asymptotic formula for the `n`th zero of the the derivative of Bessel J (Y) function
189189
of order `nu`. `kind == 1 (2)` for Bessel function of the first (second) kind, J (Y).
190190
"""
191191
function bessel_deriv_zero_asymptotic(nu_in::Real, n::Integer, kind=1)
@@ -218,11 +218,11 @@ end
218218
_besselj_deriv_zero(nu, n)
219219
220220
Return the `n`th nonvanishing zero of the derivative of Bessel J function of order `nu`,
221-
for `n` = `1,2,...`.
221+
for `n` = `1,2,...`.
222222
223223
$argstr
224224
"""
225-
function _besselj_deriv_zero(nu::Real, n::Integer)
225+
function _besselj_deriv_zero(nu::Real, n::Integer)
226226
# Ref: https://dlmf.nist.gov/10.6.E1
227227
iszero(nu) && (n += 1) # Skip the zero occuring at zero
228228
return Roots.find_zero(bessel_deriv_zero_asymptotic(nu, n, 1)) do x
@@ -237,7 +237,7 @@ const jderivzero_pre = [_besselj_deriv_zero(nu, n) for nu in 0:nupre_max, n in 1
237237
besselj_deriv_zero(nu, n)
238238
239239
Return the `n`th nonvanishing zero of the derivative of the Bessel J function of order `nu`,
240-
for `n` = `1,2,...`.
240+
for `n` = `1,2,...`.
241241
242242
$argstr
243243
$speeddocstr
@@ -276,7 +276,7 @@ const yderivzero_pre = [_bessely_deriv_zero(nu, n) for nu in 0:nupre_max, n in 1
276276
bessely_deriv_zero(nu, n)
277277
278278
Return the `n`th zero of the derivative of the Bessel Y function of order `nu`,
279-
for `n` = `1,2,...`.
279+
for `n` = `1,2,...`.
280280
281281
$argstr
282282
$speeddocstr

0 commit comments

Comments
 (0)