Simple explanation of my problem (if the previous one was too complicated):
Let
GF(2^4)={0, 1, a, a+1, a^2, a^2+1, a^2+a, a^2+a+1, a^3, a^3+1, a^3+a, a^3+a+
1, a^3+a^2, a^3+a^2+1, a^3+a^2+a, a^3+a^2+a+1} and a^4+a+1=0.
Let
T:= x*([c^2((y/x)^4+(y/x))+c^2(1+c+c^2)((y/x)^3+(y/x))]/[(y/x)^4+c(y/x)^2+1
])+(xy)^(1/2),
where c is constant in GF(16) (for example c=a^2+a). Convention: if x=0
then y/x=0 (custom_divide).
Now I want to calculate all values of the function T:
x=0 y=0 T=...
x=0 y=1 T=...
x=0 y=a T=...
...
x=a^3+a^2+a+1 y=a^3+a^2+1 T=...
x=a^3+a^2+a+1 y=a^3+a^2+a T=...
x=a^3+a^2+a+1 y=a^3+a^2+a+1 T=...
I've to define this function T with this constant c (for example c=a^2+a).
W dniu wtorek, 8 maja 2012 20:34:31 UTC+2 użytkownik ArturZ napisał:
>
> Hi,
>
> I've one problem in the following task.
> My calculations:
>
> I'm defining following function:
>
>
> def custom_divide(x,y):
> if x==0:
> return 0
> return y/x
>
>
> Next, I'm calculating all possible values over *GF(16)* for the function *
> T*:
>
>
> F.<a>=GF(16)
> for a,b in F^2:
> print "x=",a,"y=",b, "T:",a*custom_divide((c+1)*((custom_divide(a,
> b))^3+1)+(c^3+c)*((custom_divide(a,b))^2+custom_divide(a,b)),(
> custom_divide(a,b))^4+(c+1)*(custom_divide(a,b))^2+1)+(a*b).nth_root(2)
>
>
> I know that c is not defined in that code but I wrote it there because it
> helps me with describing my problem.
> *c+1* and *c^3+c* are constants and I don't know how can I write them in
> my code. If I'll write:
>
>
> F.<a>=GF(16)
> for a,b in F^2:
> print "x=",a,"y=",b, "T:",a*custom_divide((a+1)*((
> custom_divide(a,b))^3+1)+(a^3+a)*((custom_divide(a,b))^2+custom_divide(a,b
> )),(custom_divide(a,b))^4+(a+1)*(custom_divide(a,b))^2+1)+(a*b).nth_root(2
> )
>
>
> then this constants will be equal to the variable *a* and will be change
> in every steps, but they should be the same in all cases.
>
> How can I correct my code?
>
> I'll be grateful for any help in this task.
>
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org