Skip to content

Instantly share code, notes, and snippets.

@galenseilis
Created December 7, 2022 15:06
Show Gist options
  • Save galenseilis/2cde7b4f6b2e683dee609ac40ce41c2e to your computer and use it in GitHub Desktop.
Save galenseilis/2cde7b4f6b2e683dee609ac40ce41c2e to your computer and use it in GitHub Desktop.
Early attempt at zerocated numbers.
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