We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8090d8 commit 7a0d383Copy full SHA for 7a0d383
base/intfuncs.jl
@@ -186,7 +186,7 @@ ndigits0z(x::Integer) = ndigits0z(unsigned(abs(x)))
186
187
const ndigits_max_mul = Core.sizeof(Int) == 4 ? 69000000 : 290000000000000000
188
189
-function ndigits0znb(n::Integer, b::Integer)
+function ndigits0znb(n::Signed, b::Int)
190
d = 0
191
while n != 0
192
n = cld(n,b)
@@ -198,7 +198,7 @@ end
198
function ndigits0z(n::Unsigned, b::Int)
199
200
if b < 0
201
- d = ndigits0znb(n, b)
+ d = ndigits0znb(signed(n), b)
202
else
203
b == 2 && return (sizeof(n)<<3-leading_zeros(n))
204
b == 8 && return div((sizeof(n)<<3)-leading_zeros(n)+2,3)
0 commit comments