Skip to content

Commit

Permalink
avoid using an internal variable that is deleted on 1.12+
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored and tkluck committed Mar 1, 2025
1 parent 271edb2 commit db52412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Iterations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ iterate(K::Type{<:BinaryField}, state) = state < 2^n(K) ? (K(Bits(), state), sta
and is at least Int.
"""
function safepow(q::Signed, n)
q = q isa Base.SmallSigned ? Int(q) : q
q = (q isa Int16 || q isa Int32 || q isa Int8) ? Int(q) : q
bits = leading_zeros(zero(q)) - leading_zeros(q)
m = n * bits
if m <= leading_zeros(zero(Int))
Expand Down

0 comments on commit db52412

Please sign in to comment.