Skip to content

Commit

Permalink
Call 0z version of ndigitsnb, which avoids an extra branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
danluu committed Sep 14, 2014
1 parent 4156fab commit 4324103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/intfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ end
function ndigits0z(n::Unsigned, b::Int)
d = 0
if b < 0
d = ndigitsnb(signed(n), b)
d = ndigits0znb(signed(n), b)
else
b == 2 && return (sizeof(n)<<3-leading_zeros(n))
b == 8 && return div((sizeof(n)<<3)-leading_zeros(n)+2,3)
Expand Down

0 comments on commit 4324103

Please sign in to comment.