I also cleaned up the first function

function signedsum(v::Vector, j::Uint)
    s = zero(eltype(v))
    for i in 1:length(v)
        if (j & one(Uint)) == zero(Uint)
            s += v[i]
        else
            s -= v[i]
        end
        j >>= 1
    end
    s
end


Reply via email to