Skip to content

Commit

Permalink
fix bigfloat itrunc error
Browse files Browse the repository at this point in the history
backport of 9ce91ff, ref #9138
  • Loading branch information
simonbyrne authored and tkelman committed Dec 2, 2014
1 parent 6fe7d7a commit d7c9518
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 131 deletions.
2 changes: 1 addition & 1 deletion base/mpfr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ end

function itrunc(x::BigFloat)
z = BigInt()
ccall((:mpfr_get_z, :libmpfr), Int32, (Ptr{BigInt}, Ptr{BigFloat}, Int32), &z, &x, 0)
ccall((:mpfr_get_z, :libmpfr), Int32, (Ptr{BigInt}, Ptr{BigFloat}, Int32), &z, &x, to_mpfr(RoundToZero))
return z
end

Expand Down
Loading

0 comments on commit d7c9518

Please sign in to comment.