Skip to content

Commit

Permalink
Cope with life after Base removal of special functions (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan authored Feb 11, 2017
1 parent 2c5df13 commit 12c257f
Showing 1 changed file with 56 additions and 50 deletions.
106 changes: 56 additions & 50 deletions src/SpecialFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,64 @@ __precompile__()

module SpecialFunctions

# On older versions these are exported from Base
# TODO: Uncomment me once these have been removed!
#if VERSION >= v"0.6.0-dev.XXXX"
# export
# airyai,
# airyaiprime,
# airybi,
# airybiprime,
# airyaix,
# airyaiprimex,
# airybix,
# airybiprimex,
# besselh,
# besselhx,
# besseli,
# besselix,
# besselj,
# besselj0,
# besselj1,
# besseljx,
# besselk,
# besselkx,
# bessely,
# bessely0,
# bessely1,
# besselyx,
# dawson,
# erf,
# erfc,
# erfcinv,
# erfcx,
# erfi,
# erfinv,
# eta,
# digamma,
# invdigamma,
# polygamma,
# trigamma,
# hankelh1,
# hankelh1x,
# hankelh2,
# hankelh2x,
# zeta
#end
if VERSION >= v"0.6.0-dev.2767"
if isdefined(Base, :airyai)
import Base: airyai, airyaix, airyaiprime, airyaiprimex,
airybi, airybix, airybiprime, airybiprimex,
besselh, besselhx, besseli, besselix, besselj, besselj0, besselj1,
besseljx, besselk, besselkx, bessely, bessely0, bessely1, besselyx,
hankelh1, hankelh1x, hankelh2, hankelh2x,
dawson, erf, erfc, erfcinv, erfcx, erfi, erfinv,
eta, digamma, invdigamma, polygamma, trigamma, zeta
else
export
airyai,
airyaiprime,
airybi,
airybiprime,
airyaix,
airyaiprimex,
airybix,
airybiprimex,
besselh,
besselhx,
besseli,
besselix,
besselj,
besselj0,
besselj1,
besseljx,
besselk,
besselkx,
bessely,
bessely0,
bessely1,
besselyx,
dawson,
erf,
erfc,
erfcinv,
erfcx,
erfi,
erfinv,
eta,
digamma,
invdigamma,
polygamma,
trigamma,
hankelh1,
hankelh1x,
hankelh2,
hankelh2x,
zeta
end
end

# On older versions libopenspecfun is included in Base
# TODO: Uncomment me once Base no longer ships with it!
#if VERSION >= v"0.6.0-dev.XXXX"
# const openspecfun = "libopenspecfun"
#else
if isdefined(Base.Math, :openspecfun)
const openspecfun = Base.Math.openspecfun
#end
else
const openspecfun = "libopenspecfun"
end

include("bessel.jl")
include("erf.jl")
Expand Down

0 comments on commit 12c257f

Please sign in to comment.