Skip to content
New issue

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

support max of DistInt #7

Open
guyvdbroeck opened this issue Apr 9, 2022 · 1 comment
Open

support max of DistInt #7

guyvdbroeck opened this issue Apr 9, 2022 · 1 comment

Comments

@guyvdbroeck
Copy link
Member

code = @dice begin

    function uniform(bitrange::Int, bitwidth::Int)
        ans = fill(DistBool(dicecontext(), false), bitwidth)
        for i = 1:bitrange
            ans[i] = flip(0.5)
        end
        DistInt(ans)
    end

    a = uniform(3, 4)
    b = uniform(3, 4)
    max(a,b)
end

infer(code, :bdd)
ERROR: MethodError: no method matching isless(::DistInt, ::DistInt)
@PoorvaGarg
Copy link
Member

This issue is resolved in hybit-merge-main #198 and will be closed when the branch is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants