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

Strange behavior with division on arithmetic sharing #189

Open
zyl2016 opened this issue Aug 21, 2023 · 0 comments
Open

Strange behavior with division on arithmetic sharing #189

zyl2016 opened this issue Aug 21, 2023 · 0 comments

Comments

@zyl2016
Copy link

zyl2016 commented Aug 21, 2023

Hello, sorry for disturbing you.
I observed that division on arithmetic sharing cannot be conducted successfully. I use the division as follows.

def void main(){
    uint32_al a1 = 5u;
    uint32_al a2 = 5u;
    uint32_al a3 = a1 / a2;
    output(CLIENT, a3);
}

The result is shown below.

Value of a3:
2407609618

It seems to be a random number.
In comparison, when I use division on boolean sharing in the same way. It outputs as expected.

def void main(){
    uint32_bl a1 = 5u;
    uint32_bl a2 = 5u;
    uint32_bl a3 = a1 / a2;
    output(CLIENT, a3);
}

The result is shown below.

Value of a3:
1

Can you help me by explaining this strange behavior? Did I use the division in the wrong way?

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

1 participant