Skip to content

Commit

Permalink
Merge pull request JuliaLang#8996 from goretkin/master
Browse files Browse the repository at this point in the history
digits should accept values of "pad" that are unsigned
  • Loading branch information
staticfloat committed Nov 12, 2014
2 parents 55b32ec + 07f26b4 commit caf02ef
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 @@ -306,7 +306,7 @@ bits(x::Union(Char,Int32,UInt32,Float32)) = bin(reinterpret(UInt32,x),32)
bits(x::Union(Int64,UInt64,Float64)) = bin(reinterpret(UInt64,x),64)
bits(x::Union(Int128,UInt128)) = bin(reinterpret(UInt128,x),128)

function digits{T<:Integer}(n::Integer, base::T=10, pad::Int=1)
function digits{T<:Integer}(n::Integer, base::T=10, pad::Integer=1)
2 <= base || error("invalid base: $base")
m = max(pad,ndigits0z(n,base))
a = zeros(T,m)
Expand Down

0 comments on commit caf02ef

Please sign in to comment.