Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove some special functions from Base
Browse files Browse the repository at this point in the history
ararslan committed Feb 9, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7f34449 commit 3e8fb7a
Showing 15 changed files with 33 additions and 1,956 deletions.
94 changes: 21 additions & 73 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
@@ -226,14 +226,9 @@ for f in (
# base/special/log.jl
:log, :log1p,
# base/special/gamma.jl
:gamma, :lfact, :digamma, :trigamma, :zeta, :eta,
# base/special/erf.jl
:erfcx, :erfi, :dawson,
# base/special/bessel.jl
:airyai, :airyaiprime, :airybi, :airybiprime,
:besselj0, :besselj1, :bessely0, :bessely1,
:gamma, :lfact,
# base/math.jl
:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :exp, :erf, :erfc, :exp2,
:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :exp, :exp2,
:expm1, :exp10, :sin, :cos, :tan, :asin, :acos, :acosh, :atanh,
#=:log,=# :log2, :log10, :lgamma, #=:log1p,=# :sqrt,
# base/floatfuncs.jl
@@ -252,8 +247,6 @@ for f in ( :acos_fast, :acosh_fast, :angle_fast, :asin_fast, :asinh_fast,
@eval FastMath Base.@dep_vectorize_1arg Number $f
end
for f in (
:invdigamma, # base/special/gamma.jl
:erfinc, :erfcinv, # base/special/erf.jl
:trunc, :floor, :ceil, :round, # base/floatfuncs.jl
:rad2deg, :deg2rad, :exponent, :significand, # base/math.jl
:sind, :cosd, :tand, :asind, :acosd, :atand, :asecd, :acscd, :acotd, # base/special/trig.jl
@@ -292,11 +285,7 @@ end
# Deprecate @vectorize_2arg-vectorized functions from...
for f in (
# base/special/gamma.jl
:polygamma, :zeta, :beta, :lbeta,
# base/special/bessel.jl
:besseli, :besselix, :besselj, :besseljx,
:besselk, :besselkx, :bessely, :besselyx, :besselh,
:besselhx, :hankelh1, :hankelh2, :hankelh1x, :hankelh2x,
:beta, :lbeta,
# base/math.jl
:log, :hypot, :atan2,
)
@@ -672,65 +661,6 @@ end
# Deprecate isimag (#19947).
@deprecate isimag(z::Number) iszero(real(z))

@deprecate airy(z::Number) airyai(z)
@deprecate airyx(z::Number) airyaix(z)
@deprecate airyprime(z::Number) airyaiprime(z)
@deprecate airy{T<:Number}(x::AbstractArray{T}) airyai.(x)
@deprecate airyx{T<:Number}(x::AbstractArray{T}) airyaix.(x)
@deprecate airyprime{T<:Number}(x::AbstractArray{T}) airyprime.(x)

function _airy(k::Integer, z::Complex128)
depwarn("`airy(k,x)` is deprecated, use `airyai(x)`, `airyaiprime(x)`, `airybi(x)` or `airybiprime(x)` instead.",:airy)
id = Int32(k==1 || k==3)
if k == 0 || k == 1
return Base.Math._airy(z, id, Int32(1))
elseif k == 2 || k == 3
return Base.Math._biry(z, id, Int32(1))
else
throw(ArgumentError("k must be between 0 and 3"))
end
end
function _airyx(k::Integer, z::Complex128)
depwarn("`airyx(k,x)` is deprecated, use `airyaix(x)`, `airyaiprimex(x)`, `airybix(x)` or `airybiprimex(x)` instead.",:airyx)
id = Int32(k==1 || k==3)
if k == 0 || k == 1
return Base.Math._airy(z, id, Int32(2))
elseif k == 2 || k == 3
return Base.Math._biry(z, id, Int32(2))
else
throw(ArgumentError("k must be between 0 and 3"))
end
end

for afn in (:airy,:airyx)
_afn = Symbol("_"*string(afn))
suf = string(afn)[5:end]
@eval begin
function $afn(k::Integer, z::Complex128)
afn = $(QuoteNode(afn))
suf = $(QuoteNode(suf))
depwarn("`$afn(k,x)` is deprecated, use `airyai$suf(x)`, `airyaiprime$suf(x)`, `airybi$suf(x)` or `airybiprime$suf(x)` instead.",$(QuoteNode(afn)))
$_afn(k,z)
end

$afn(k::Integer, z::Complex) = $afn(k, float(z))
$afn{T<:AbstractFloat}(k::Integer, z::Complex{T}) = throw(MethodError($afn,(k,z)))
$afn(k::Integer, z::Complex64) = Complex64($afn(k, Complex128(z)))
$afn(k::Integer, x::Real) = $afn(k, float(x))
$afn(k::Integer, x::AbstractFloat) = real($afn(k, complex(x)))

function $afn{T<:Number}(k::Number, x::AbstractArray{T})
$afn.(k,x)
end
function $afn{S<:Number}(k::AbstractArray{S}, x::Number)
$afn.(k,x)
end
function $afn{S<:Number,T<:Number}(k::AbstractArray{S}, x::AbstractArray{T})
$afn.(k,x)
end
end
end

# Deprecate vectorized xor in favor of compact broadcast syntax
@deprecate xor(a::Bool, B::BitArray) xor.(a, B)
@deprecate xor(A::BitArray, b::Bool) xor.(A, b)
@@ -1227,6 +1157,24 @@ for name in ("alnum", "alpha", "cntrl", "digit", "number", "graph",
@eval @deprecate ($f)(s::AbstractString) all($f, s)
end

# Special functions have been moved to a package
for f in (: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, :zeta, :digamma, :invdigamma, :polygamma, :trigamma,
:hankelh1, :hankelh1x, :hankelh2, :hankelh2x,
:airy, :airyx, :airyprime)
@eval begin
function $f(args...; kwargs...)
error(string($f, args, " has been moved to the package SpecialFunctions.jl.\n",
"Run Pkg.add(\"SpecialFunctions\") to install SpecialFunctions on Julia v0.6 and later,\n",
"and then run `using SpecialFunctions`."))
end
export $f
end
end

# END 0.6 deprecations

# BEGIN 1.0 deprecations
66 changes: 0 additions & 66 deletions base/docs/helpdb/Base.jl
Original file line number Diff line number Diff line change
@@ -304,13 +304,6 @@ This would create a 25-by-30000 `BitArray`, linked to the file associated with s
"""
Mmap.mmap(io, ::BitArray, dims = ?, offset = ?)

"""
bessely0(x)
Bessel function of the second kind of order 0, ``Y_0(x)``.
"""
bessely0

"""
filter!(function, collection)
@@ -647,13 +640,6 @@ for use in `Mmap.mmap`. Used by `SharedArray` for creating shared memory arrays.
"""
Mmap.Anonymous

"""
erfi(x)
Compute the imaginary error function of `x`, defined by ``-i \\operatorname{erf}(ix)``.
"""
erfi

"""
floor([T,] x, [digits, [base]])
@@ -695,13 +681,6 @@ The item or field is not defined for the given object.
"""
UndefRefError

"""
bessely1(x)
Bessel function of the second kind of order 1, ``Y_1(x)``.
"""
bessely1

"""
append!(collection, collection2) -> collection.
@@ -798,13 +777,6 @@ julia> getfield(a, :num)
"""
getfield

"""
besselj1(x)
Bessel function of the first kind of order 1, ``J_1(x)``.
"""
besselj1

"""
select!(v, k, [by=<transform>,] [lt=<comparison>,] [rev=false])
@@ -933,35 +905,13 @@ behavior, including program corruption or segfaults, at any later time.
"""
unsafe_convert

"""
erfinv(x)
Compute the inverse error function of a real `x`, defined by ``\\operatorname{erf}(\\operatorname{erfinv}(x)) = x``.
"""
erfinv

"""
seek(s, pos)
Seek a stream to the given position.
"""
seek

"""
besselj0(x)
Bessel function of the first kind of order 0, ``J_0(x)``.
"""
besselj0

"""
erfcinv(x)
Compute the inverse error complementary function of a real `x`, defined by
``\\operatorname{erfc}(\\operatorname{erfcinv}(x)) = x``.
"""
erfcinv

"""
popdisplay()
popdisplay(d::Display)
@@ -1605,14 +1555,6 @@ Equivalent to [`readdlm`](@ref) with `delim` set to comma, and type optionally d
"""
readcsv

"""
erfcx(x)
Compute the scaled complementary error function of `x`, defined by ``e^{x^2} \\operatorname{erfc}(x)``.
Note also that ``\\operatorname{erfcx}(-ix)`` computes the Faddeeva function ``w(x)``.
"""
erfcx

"""
UndefVarError(var::Symbol)
@@ -2482,11 +2424,3 @@ seekend
Integer division was attempted with a denominator value of 0.
"""
DivideError

"""
dawson(x)
Compute the Dawson function (scaled imaginary error function) of `x`, defined by
``\\frac{\\sqrt{\\pi}}{2} e^{-x^2} \\operatorname{erfi}(x)``.
"""
dawson
39 changes: 0 additions & 39 deletions base/exports.jl
Original file line number Diff line number Diff line change
@@ -309,19 +309,11 @@ export
csc,
cscd,
csch,
dawson,
deg2rad,
denominator,
digamma,
div,
divrem,
eps,
erf,
erfc,
erfcinv,
erfcx,
erfi,
erfinv,
exp,
exp10,
exp2,
@@ -345,7 +337,6 @@ export
hypot,
imag,
inv,
invdigamma,
invmod,
isapprox,
iseven,
@@ -416,7 +407,6 @@ export
tanh,
trailing_ones,
trailing_zeros,
trigamma,
trunc,
unsafe_trunc,
typemax,
@@ -430,37 +420,8 @@ export
,

# specfun
airyai,
airyaiprime,
airybi,
airybiprime,
airyaix,
airyaiprimex,
airybix,
airybiprimex,
besselh,
besselhx,
besseli,
besselix,
besselj,
besselj0,
besselj1,
besseljx,
besselk,
besselkx,
bessely,
bessely0,
bessely1,
besselyx,
beta,
eta,
hankelh1,
hankelh1x,
hankelh2,
hankelh2x,
lbeta,
polygamma,
zeta,

# arrays
broadcast!,
35 changes: 5 additions & 30 deletions base/math.jl
Original file line number Diff line number Diff line change
@@ -10,18 +10,10 @@ export sin, cos, tan, sinh, cosh, tanh, asin, acos, atan,
acosd, acotd, acscd, asecd, asind, atand, atan2,
rad2deg, deg2rad,
log, log2, log10, log1p, exponent, exp, exp2, exp10, expm1,
cbrt, sqrt, erf, erfc, erfcx, erfi, dawson,
significand,
cbrt, sqrt, significand,
lgamma, hypot, gamma, lfact, max, min, minmax, ldexp, frexp,
clamp, clamp!, modf, ^, mod2pi, rem2pi,
airyai, airyaiprime, airybi, airybiprime,
airyaix, airyaiprimex, airybix, airybiprimex,
besselj0, besselj1, besselj, besseljx,
bessely0, bessely1, bessely, besselyx,
hankelh1, hankelh2, hankelh1x, hankelh2x,
besseli, besselix, besselk, besselkx, besselh, besselhx,
beta, lbeta, eta, zeta, polygamma, invdigamma, digamma, trigamma,
erfinv, erfcinv, @evalpoly
beta, lbeta, @evalpoly

import Base: log, exp, sin, cos, tan, sinh, cosh, tanh, asin,
acos, atan, asinh, acosh, atanh, sqrt, log2, log10,
@@ -224,28 +216,13 @@ Compute the inverse hyperbolic sine of `x`.
"""
asinh(x)

"""
erf(x)
Compute the error function of `x`, defined by ``\\frac{2}{\\sqrt{\\pi}} \\int_0^x e^{-t^2} dt``
for arbitrary complex `x`.
"""
erf(x)

"""
erfc(x)
Compute the complementary error function of `x`, defined by ``1 - \\operatorname{erf}(x)``.
"""
erfc(x)

"""
expm1(x)
Accurately compute ``e^x-1``.
"""
expm1(x)
for f in (:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :erf, :erfc, :exp2, :expm1)
for f in (:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :exp2, :expm1)
@eval begin
($f)(x::Float64) = ccall(($(string(f)),libm), Float64, (Float64,), x)
($f)(x::Float32) = ccall(($(string(f,"f")),libm), Float32, (Float32,), x)
@@ -284,7 +261,7 @@ julia> exp2(5)
```
"""
exp2(x::AbstractFloat) = 2^x
for f in (:sinh, :cosh, :tanh, :atan, :asinh, :exp, :erf, :erfc, :expm1)
for f in (:sinh, :cosh, :tanh, :atan, :asinh, :exp, :expm1)
@eval ($f)(x::AbstractFloat) = error("not implemented for ", typeof(x))
end

@@ -918,7 +895,7 @@ muladd(x,y,z) = x*y+z
# Float16 definitions

for func in (:sin,:cos,:tan,:asin,:acos,:atan,:sinh,:cosh,:tanh,:asinh,:acosh,
:atanh,:exp,:log,:log2,:log10,:sqrt,:lgamma,:log1p,:erf,:erfc)
:atanh,:exp,:log,:log2,:log10,:sqrt,:lgamma,:log1p)
@eval begin
$func(a::Float16) = Float16($func(Float32(a)))
$func(a::Complex32) = Complex32($func(Complex64(a)))
@@ -935,8 +912,6 @@ cbrt(a::Float16) = Float16(cbrt(Float32(a)))

# More special functions
include("special/trig.jl")
include("special/bessel.jl")
include("special/erf.jl")
include("special/gamma.jl")

module JuliaLibm
64 changes: 3 additions & 61 deletions base/mpfr.jl
Original file line number Diff line number Diff line change
@@ -8,13 +8,12 @@ export
big_str

import
Base: (*), +, -, /, <, <=, ==, >, >=, ^, besselj, besselj0, besselj1, bessely,
bessely0, bessely1, ceil, cmp, convert, copysign, div,
Base: (*), +, -, /, <, <=, ==, >, >=, ^, ceil, cmp, convert, copysign, div,
exp, exp2, exponent, factorial, floor, fma, hypot, isinteger,
isfinite, isinf, isnan, ldexp, log, log2, log10, max, min, mod, modf,
nextfloat, prevfloat, promote_rule, rem, rem2pi, round, show,
sum, sqrt, string, print, trunc, precision, exp10, expm1,
gamma, lgamma, digamma, erf, erfc, zeta, eta, log1p, airyai,
gamma, lgamma, log1p,
eps, signbit, sin, cos, tan, sec, csc, cot, acos, asin, atan,
cosh, sinh, tanh, sech, csch, coth, acosh, asinh, atanh, atan2,
cbrt, typemax, typemin, unsafe_trunc, realmin, realmax, rounding,
@@ -505,8 +504,7 @@ end
^(x::BigFloat, y::Integer) = typemin(Clong) <= y <= typemax(Clong) ? x^Clong(y) : x^BigInt(y)
^(x::BigFloat, y::Unsigned) = typemin(Culong) <= y <= typemax(Culong) ? x^Culong(y) : x^BigInt(y)

for f in (:exp, :exp2, :exp10, :expm1, :digamma, :erf, :erfc, :zeta,
:cosh,:sinh,:tanh,:sech,:csch,:coth, :cbrt)
for f in (:exp, :exp2, :exp10, :expm1, :cosh, :sinh, :tanh, :sech, :csch, :coth, :cbrt)
@eval function $f(x::BigFloat)
z = BigFloat()
ccall(($(string(:mpfr_,f)), :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Int32), &z, &x, ROUNDING_MODE[])
@@ -522,17 +520,6 @@ function big_ln2()
return c
end

function eta(x::BigFloat)
x == 1 && return big_ln2()
return -zeta(x) * expm1(big_ln2()*(1-x))
end

function airyai(x::BigFloat)
z = BigFloat()
ccall((:mpfr_ai, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Int32), &z, &x, ROUNDING_MODE[])
return z
end

function ldexp(x::BigFloat, n::Clong)
z = BigFloat()
ccall((:mpfr_mul_2si, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Clong, Int32), &z, &x, n, ROUNDING_MODE[])
@@ -547,51 +534,6 @@ ldexp(x::BigFloat, n::ClongMax) = ldexp(x, convert(Clong, n))
ldexp(x::BigFloat, n::CulongMax) = ldexp(x, convert(Culong, n))
ldexp(x::BigFloat, n::Integer) = x*exp2(BigFloat(n))

function besselj0(x::BigFloat)
z = BigFloat()
ccall((:mpfr_j0, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Int32), &z, &x, ROUNDING_MODE[])
return z
end

function besselj1(x::BigFloat)
z = BigFloat()
ccall((:mpfr_j1, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Int32), &z, &x, ROUNDING_MODE[])
return z
end

function besselj(n::Integer, x::BigFloat)
z = BigFloat()
ccall((:mpfr_jn, :libmpfr), Int32, (Ptr{BigFloat}, Clong, Ptr{BigFloat}, Int32), &z, n, &x, ROUNDING_MODE[])
return z
end

function bessely0(x::BigFloat)
if x < 0
throw(DomainError())
end
z = BigFloat()
ccall((:mpfr_y0, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Int32), &z, &x, ROUNDING_MODE[])
return z
end

function bessely1(x::BigFloat)
if x < 0
throw(DomainError())
end
z = BigFloat()
ccall((:mpfr_y1, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, Int32), &z, &x, ROUNDING_MODE[])
return z
end

function bessely(n::Integer, x::BigFloat)
if x < 0
throw(DomainError())
end
z = BigFloat()
ccall((:mpfr_yn, :libmpfr), Int32, (Ptr{BigFloat}, Clong, Ptr{BigFloat}, Int32), &z, n, &x, ROUNDING_MODE[])
return z
end

function factorial(x::BigFloat)
if x < 0 || !isinteger(x)
throw(DomainError())
2 changes: 1 addition & 1 deletion base/replutil.jl
Original file line number Diff line number Diff line change
@@ -223,7 +223,7 @@ function showerror(io::IO, ex::DomainError, bt; backtrace=true)
if !code.from_c
if code.func == :nan_dom_err
continue
elseif code.func in (:log, :log2, :log10, :sqrt) # TODO add :besselj, :besseli, :bessely, :besselk
elseif code.func in (:log, :log2, :log10, :sqrt)
print(io, "\n$(code.func) will only return a complex result if called ",
"with a complex argument. Try $(string(code.func))(complex(x)).")
elseif (code.func == :^ && code.file == Symbol("intfuncs.jl")) ||
497 changes: 0 additions & 497 deletions base/special/bessel.jl

This file was deleted.

217 changes: 0 additions & 217 deletions base/special/erf.jl

This file was deleted.

475 changes: 0 additions & 475 deletions base/special/gamma.jl

Large diffs are not rendered by default.

32 changes: 0 additions & 32 deletions doc/src/manual/mathematical-operations.md
Original file line number Diff line number Diff line change
@@ -513,40 +513,8 @@ asind acosd atand acotd asecd acscd

| Function | Description |
|:------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`erf(x)`](@ref) | [error function](https://en.wikipedia.org/wiki/Error_function) at `x` |
| [`erfc(x)`](@ref) | complementary error function, i.e. the accurate version of `1-erf(x)` for large `x` |
| [`erfinv(x)`](@ref) | inverse function to [`erf()`](@ref) |
| `erfcinv(x)` | inverse function to [`erfc()`](@ref) |
| [`erfi(x)`](@ref) | imaginary error function defined as `-im * erf(x * im)`, where [`im`](@ref) is the imaginary unit |
| [`erfcx(x)`](@ref) | scaled complementary error function, i.e. accurate `exp(x^2) * erfc(x)` for large `x` |
| [`dawson(x)`](@ref) | scaled imaginary error function, a.k.a. Dawson function, i.e. accurate `exp(-x^2) * erfi(x) * sqrt(pi) / 2` for large `x` |
| [`gamma(x)`](@ref) | [gamma function](https://en.wikipedia.org/wiki/Gamma_function) at `x` |
| [`lgamma(x)`](@ref) | accurate `log(gamma(x))` for large `x` |
| [`lfact(x)`](@ref) | accurate `log(factorial(x))` for large `x`; same as `lgamma(x+1)` for `x > 1`, zero otherwise |
| [`digamma(x)`](@ref) | [digamma function](https://en.wikipedia.org/wiki/Digamma_function) (i.e. the derivative of [`lgamma()`](@ref)) at `x` |
| [`beta(x,y)`](@ref) | [beta function](https://en.wikipedia.org/wiki/Beta_function) at `x,y` |
| [`lbeta(x,y)`](@ref) | accurate `log(beta(x,y))` for large `x` or `y` |
| [`eta(x)`](@ref) | [Dirichlet eta function](https://en.wikipedia.org/wiki/Dirichlet_eta_function) at `x` |
| [`zeta(x)`](@ref) | [Riemann zeta function](https://en.wikipedia.org/wiki/Riemann_zeta_function) at `x` |
| [`airyai(z)`](@ref) | [Airy Ai function](https://en.wikipedia.org/wiki/Airy_function) at `z` |
| [`airyaiprime(z)`](@ref) | derivative of the Airy Ai function at `z` |
| [`airybi(z)`](@ref) | [Airy Bi function](https://en.wikipedia.org/wiki/Airy_function) at `z` |
| [`airybiprime(z)`](@ref) | derivative of the Airy Bi function at `z` |
| [`airyaix(z)`](@ref), [`airyaiprimex(z)`](@ref), [`airybix(z)`](@ref), [`airybiprimex(z)`](@ref) | scaled Airy AI function and `k` th derivatives at `z` |
| [`besselj(nu,z)`](@ref) | [Bessel function](https://en.wikipedia.org/wiki/Bessel_function) of the first kind of order `nu` at `z` |
| [`besselj0(z)`](@ref) | `besselj(0,z)` |
| [`besselj1(z)`](@ref) | `besselj(1,z)` |
| [`besseljx(nu,z)`](@ref) | scaled Bessel function of the first kind of order `nu` at `z` |
| [`bessely(nu,z)`](@ref) | [Bessel function](https://en.wikipedia.org/wiki/Bessel_function) of the second kind of order `nu` at `z` |
| [`bessely0(z)`](@ref) | `bessely(0,z)` |
| [`bessely1(z)`](@ref) | `bessely(1,z)` |
| [`besselyx(nu,z)`](@ref) | scaled Bessel function of the second kind of order `nu` at `z` |
| [`besselh(nu,k,z)`](@ref) | [Bessel function](https://en.wikipedia.org/wiki/Bessel_function) of the third kind (a.k.a. Hankel function) of order `nu` at `z`; `k` must be either `1` or `2` |
| [`hankelh1(nu,z)`](@ref) | `besselh(nu, 1, z)` |
| [`hankelh1x(nu,z)`](@ref) | scaled `besselh(nu, 1, z)` |
| [`hankelh2(nu,z)`](@ref) | `besselh(nu, 2, z)` |
| [`hankelh2x(nu,z)`](@ref) | scaled `besselh(nu, 2, z)` |
| [`besseli(nu,z)`](@ref) | modified [Bessel function](https://en.wikipedia.org/wiki/Bessel_function) of the first kind of order `nu` at `z` |
| [`besselix(nu,z)`](@ref) | scaled modified Bessel function of the first kind of order `nu` at `z` |
| [`besselk(nu,z)`](@ref) | modified [Bessel function](https://en.wikipedia.org/wiki/Bessel_function) of the second kind of order `nu` at `z` |
| [`besselkx(nu,z)`](@ref) | scaled modified Bessel function of the second kind of order `nu` at `z` |
40 changes: 0 additions & 40 deletions doc/src/stdlib/math.md
Original file line number Diff line number Diff line change
@@ -153,13 +153,6 @@ Base.flipsign
Base.sqrt
Base.isqrt
Base.Math.cbrt
Base.Math.erf
Base.Math.erfc
Base.Math.erfcx
Base.Math.erfi
Base.Math.dawson
Base.Math.erfinv
Base.Math.erfcinv
Base.real(::Complex)
Base.imag
Base.reim
@@ -182,41 +175,8 @@ Base.powermod
Base.Math.gamma
Base.Math.lgamma
Base.Math.lfact
Base.Math.digamma
Base.Math.invdigamma
Base.Math.trigamma
Base.Math.polygamma
Base.Math.airyai
Base.Math.airyaiprime
Base.Math.airyaix
Base.Math.airyaiprimex
Base.Math.airybi
Base.Math.airybiprime
Base.Math.airybix
Base.Math.airybiprimex
Base.Math.besselj0
Base.Math.besselj1
Base.Math.besselj
Base.Math.besseljx
Base.Math.bessely0
Base.Math.bessely1
Base.Math.bessely
Base.Math.besselyx
Base.Math.hankelh1
Base.Math.hankelh1x
Base.Math.hankelh2
Base.Math.hankelh2x
Base.Math.besselh
Base.Math.besselhx
Base.Math.besseli
Base.Math.besselix
Base.Math.besselk
Base.Math.besselkx
Base.Math.beta
Base.Math.lbeta
Base.Math.eta
Base.Math.zeta(::Complex)
Base.Math.zeta(::Any, ::Any)
Base.ndigits
Base.widemul
Base.Math.@evalpoly
2 changes: 0 additions & 2 deletions test/bigint.jl
Original file line number Diff line number Diff line change
@@ -345,8 +345,6 @@ end
@test typeof(exp2(a)) == BigFloat
@test typeof(exp10(a)) == BigFloat
@test typeof(expm1(a)) == BigFloat
@test typeof(erf(a)) == BigFloat
@test typeof(erfc(a)) == BigFloat
@test typeof(cosh(a)) == BigFloat
@test typeof(sinh(a)) == BigFloat
@test typeof(tanh(a)) == BigFloat
408 changes: 1 addition & 407 deletions test/math.jl

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions test/mpfr.jl
Original file line number Diff line number Diff line change
@@ -420,16 +420,6 @@ setprecision(256) do
@test_throws DomainError factorial(BigFloat(331.3))
end

# bessel functions
setprecision(53) do
@test besselj(4, BigFloat(2)) besselj(4, 2.)
@test besselj0(BigFloat(2)) besselj0(2.)
@test besselj1(BigFloat(2)) besselj1(2.)
@test bessely(4, BigFloat(2)) bessely(4, 2.)
@test bessely0(BigFloat(2)) bessely0(2.)
@test bessely1(BigFloat(2)) bessely1(2.)
end

# trigonometric functions
setprecision(53) do
for f in (:sin,:cos,:tan,:sec,:csc,:cot,:acos,:asin,:atan,
@@ -848,11 +838,6 @@ i3 = trunc(Integer,f)
@test i3+1 > f
@test i3+1 >= f

let err(z, x) = abs(z - x) / abs(x)
@test 1e-60 > err(eta(parse(BigFloat,"1.005")), parse(BigFloat,"0.693945708117842473436705502427198307157819636785324430166786"))
@test 1e-60 > err(exp(eta(big(1.0))), 2.0)
end

# issue #8318
@test convert(Int64,big(500_000_000_000_000.)) == 500_000_000_000_000

3 changes: 2 additions & 1 deletion test/random.jl
Original file line number Diff line number Diff line change
@@ -120,7 +120,8 @@ end
ziggurat_table_size = 256
nmantissa = Int64(2)^51 # one bit for the sign
ziggurat_nor_r = parse(BigFloat,"3.65415288536100879635194725185604664812733315920964488827246397029393565706474")
nor_section_area = ziggurat_nor_r*exp(-ziggurat_nor_r^2/2) + erfc(ziggurat_nor_r/sqrt(BigFloat(2)))*sqrt(big(π)/2)
erfc_zigg_root2 = parse(BigFloat,"2.580324876539008898343885504487203185398584536409033046076029509351995983934371e-04")
nor_section_area = ziggurat_nor_r*exp(-ziggurat_nor_r^2/2) + erfc_zigg_root2*sqrt(big(π)/2)
emantissa = Int64(2)^52
ziggurat_exp_r = parse(BigFloat,"7.69711747013104971404462804811408952334296818528283253278834867283241051210533")
exp_section_area = (ziggurat_exp_r + 1)*exp(-ziggurat_exp_r)

0 comments on commit 3e8fb7a

Please sign in to comment.