Skip to content

Commit

Permalink
Update cbrt to use ldexpk
Browse files Browse the repository at this point in the history
  • Loading branch information
musm committed Jun 3, 2017
1 parent e1c240b commit 50badb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function cbrt(d::T) where {T<:IEEEFloat}
v = dadd(dsqu(z), y)
v = dmul(v, d)
v = dmul(v, q2)
z = ldexp(T(v), (e + 6144) ÷ 3 - 2048)
z = ldexpk(T(v), (e + 6144) ÷ 3 - 2048)
isinf(d) && (z = flipsign(T(Inf), q2.hi))
d == 0 && (z = flipsign(T(0), q2.hi))
return z
Expand Down

0 comments on commit 50badb5

Please sign in to comment.