Skip to content

Commit 12c257f

Browse files
authored
Cope with life after Base removal of special functions (#20)
1 parent 2c5df13 commit 12c257f

File tree

1 file changed

+56
-50
lines changed

1 file changed

+56
-50
lines changed

src/SpecialFunctions.jl

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,64 @@ __precompile__()
22

33
module SpecialFunctions
44

5-
# On older versions these are exported from Base
6-
# TODO: Uncomment me once these have been removed!
7-
#if VERSION >= v"0.6.0-dev.XXXX"
8-
# export
9-
# airyai,
10-
# airyaiprime,
11-
# airybi,
12-
# airybiprime,
13-
# airyaix,
14-
# airyaiprimex,
15-
# airybix,
16-
# airybiprimex,
17-
# besselh,
18-
# besselhx,
19-
# besseli,
20-
# besselix,
21-
# besselj,
22-
# besselj0,
23-
# besselj1,
24-
# besseljx,
25-
# besselk,
26-
# besselkx,
27-
# bessely,
28-
# bessely0,
29-
# bessely1,
30-
# besselyx,
31-
# dawson,
32-
# erf,
33-
# erfc,
34-
# erfcinv,
35-
# erfcx,
36-
# erfi,
37-
# erfinv,
38-
# eta,
39-
# digamma,
40-
# invdigamma,
41-
# polygamma,
42-
# trigamma,
43-
# hankelh1,
44-
# hankelh1x,
45-
# hankelh2,
46-
# hankelh2x,
47-
# zeta
48-
#end
5+
if VERSION >= v"0.6.0-dev.2767"
6+
if isdefined(Base, :airyai)
7+
import Base: airyai, airyaix, airyaiprime, airyaiprimex,
8+
airybi, airybix, airybiprime, airybiprimex,
9+
besselh, besselhx, besseli, besselix, besselj, besselj0, besselj1,
10+
besseljx, besselk, besselkx, bessely, bessely0, bessely1, besselyx,
11+
hankelh1, hankelh1x, hankelh2, hankelh2x,
12+
dawson, erf, erfc, erfcinv, erfcx, erfi, erfinv,
13+
eta, digamma, invdigamma, polygamma, trigamma, zeta
14+
else
15+
export
16+
airyai,
17+
airyaiprime,
18+
airybi,
19+
airybiprime,
20+
airyaix,
21+
airyaiprimex,
22+
airybix,
23+
airybiprimex,
24+
besselh,
25+
besselhx,
26+
besseli,
27+
besselix,
28+
besselj,
29+
besselj0,
30+
besselj1,
31+
besseljx,
32+
besselk,
33+
besselkx,
34+
bessely,
35+
bessely0,
36+
bessely1,
37+
besselyx,
38+
dawson,
39+
erf,
40+
erfc,
41+
erfcinv,
42+
erfcx,
43+
erfi,
44+
erfinv,
45+
eta,
46+
digamma,
47+
invdigamma,
48+
polygamma,
49+
trigamma,
50+
hankelh1,
51+
hankelh1x,
52+
hankelh2,
53+
hankelh2x,
54+
zeta
55+
end
56+
end
4957

50-
# On older versions libopenspecfun is included in Base
51-
# TODO: Uncomment me once Base no longer ships with it!
52-
#if VERSION >= v"0.6.0-dev.XXXX"
53-
# const openspecfun = "libopenspecfun"
54-
#else
58+
if isdefined(Base.Math, :openspecfun)
5559
const openspecfun = Base.Math.openspecfun
56-
#end
60+
else
61+
const openspecfun = "libopenspecfun"
62+
end
5763

5864
include("bessel.jl")
5965
include("erf.jl")

0 commit comments

Comments
 (0)