Created
December 7, 2022 15:06
-
-
Save galenseilis/2cde7b4f6b2e683dee609ac40ce41c2e to your computer and use it in GitHub Desktop.
Early attempt at zerocated numbers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import product | |
from sympy.abc import a,b,c | |
def phi(x,y): | |
if y != 0 and y not in (a,b,c): | |
return x / y | |
elif y in (a,b,c): | |
return x * y | |
elif x == 0 and y == 0: | |
return b | |
for prod in product((0,1,a,b,c), repeat=2): | |
print(prod, phi(*prod)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment