Skip to content

Commit

Permalink
Fix deprecation warnings on 0.7 (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Sep 6, 2017
1 parent cc7f9aa commit 16be5ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gamma.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end

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

Expand Down Expand Up @@ -437,7 +437,7 @@ end

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

Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ using Base.Test

const SF = SpecialFunctions

if isdefined(Base, :MathConstants) && isdefined(Base.MathConstants, )
import Base.MathConstants: γ
end

# useful test functions for relative error, which differ from isapprox
# in that relerrc separately looks at the real and imaginary parts
relerr(z, x) = z == x ? 0.0 : abs(z - x) / abs(x)
Expand Down

0 comments on commit 16be5ad

Please sign in to comment.