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

xor can make internal integers negative #7

Open
anmolitor opened this issue Oct 10, 2022 · 1 comment
Open

xor can make internal integers negative #7

anmolitor opened this issue Oct 10, 2022 · 1 comment

Comments

@anmolitor
Copy link

Here is an example:

> minusOne = Int64.fromInt32s 0 -1
Int64 0 4294967295 : Int64.Int64
> xored = Int64.xor (Int64.fromInt 0) minusOne
Int64 0 -1 : Int64.Int64

The issue is that other operations do not work as expected anymore - comparing does not return EQ and == returns False.

@anmolitor
Copy link
Author

Workaround: Int64.complement >> Int64.complement after xor.

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