We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
digits has the same issue that ndigits had before #29148:
digits
ndigits
julia> digits(typemax(UInt), base=-2) ERROR: InexactError: check_top_bit(UInt64, 18446744073709551615) Stacktrace: [1] throw_inexacterror(::Symbol, ::Any, ::UInt64) at ./boot.jl:567 [2] check_top_bit at ./boot.jl:581 [inlined] [3] toInt64 at ./boot.jl:642 [inlined] [4] Type at ./boot.jl:717 [inlined] [5] Type at ./boot.jl:741 [inlined] [6] convert at ./number.jl:7 [inlined] [7] #digits!#309(::Int64, ::Function, ::Array{Int64,1}, ::UInt64) at ./intfuncs.jl:747 [8] #digits! at ./none:0 [inlined] [9] #digits#308(::Int64, ::Int64, ::Function, ::Type{Int64}, ::UInt64) at ./intfuncs.jl:709 [10] #digits at ./none:0 [inlined] [11] #digits#307 at ./intfuncs.jl:705 [inlined] [12] (::getfield(Base, Symbol("#kw##digits")))(::NamedTuple{(:base,),Tuple{Int64}}, ::typeof(digits), ::UInt64) at ./none:0 [13] top-level scope at none:0
Can probably be fixed using the same trick.
The text was updated successfully, but these errors were encountered:
fix digits(n::Unsigned) with neg base for n > typemax(n)÷2
n > typemax(n)÷2
4273a98
Fixes #29183. The same idea as in #29148 is used.
This can probably be closed because of #29205.
Sorry, something went wrong.
rfourquet
No branches or pull requests
digits
has the same issue thatndigits
had before #29148:Can probably be fixed using the same trick.
The text was updated successfully, but these errors were encountered: