I'll give you a small example so hopefully you can figure out the rest. 

The following code first defines the function custom_divide and then prints all 
possible values of that function together with the input. You could also add 
the values to a list or a set to process them later.

def custom_divide(x,y):
    if y==0:
        return 0
    return x/y

F.<a>=GF(8)
for a,b in F^2:
    print "a: ",a,"b: ",b,"a/b:",custom_divide(a,b)

#an example where we add the values to a set

values = set([])
for i,j in F^2:
    values.add(custom_divide(i,j)^7)
print values

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to