Bitwise operators #485
Unanswered
sumanblack666
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hi @sumanblack666, There is OR and AND already: https://astroautomata.com/PySR/operators/. binary_operators=["logical_and", "logical_or", "logical_xor(x, y) = xor(x > 0, y > 0) ? one(x) : zero(x)"],
extra_sympy_mappings={
"logical_xor": lambda x, y: sympy.Piecewise((1.0, (x > 0) ^ (y > 0)), (0.0, True)),
} Cheers, |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi , I would like to know how do i use bitwise operators such as XOR, OR ,AND ? .
Beta Was this translation helpful? Give feedback.
All reactions