Ask Your Question

Alex Karenin's profile - activity

2021-11-29 11:09:27 +0200 received badge  Notable Question (source)
2021-10-22 11:54:39 +0200 commented question FractionFieldElement works incorrectly over large fields

That's my suspition as well. Is there I can do anything about this issue? I'd like to be able to handle 63 bit numbers.

2021-10-20 20:08:59 +0200 asked a question FractionFieldElement works incorrectly over large fields

FractionFieldElement works incorrectly over large fields The code below returns a*b/a instead of b if characteristic of

2021-06-23 13:28:47 +0200 received badge  Popular Question (source)
2020-11-06 23:33:47 +0200 received badge  Popular Question (source)
2020-11-01 21:04:57 +0200 received badge  Supporter (source)
2020-10-30 00:12:38 +0200 asked a question canonicalize_radical and evaluation return different answers

This code return proof that f^8(x)=f(f(f(f(f(f(f(f(x))))))))=x if f(x)=(x(sqrt(2)-1)-1)/(x-1):

def yx(x): 
    cst=sqrt(2)-1
    if(x==1):
        return -Infinity
    return (cst*x-1)/(x-1)
tmp=x 
for t in range(1,9): 
    tmp=(yx(tmp)).canonicalize_radical() 
    print(t, tmp.canonicalize_radical())

But this code looks directly at orbit of a point and shows that the statement above is false:

tmp=1.5
lst=[]
for t in range(1,9): 
    tmp=(yx(tmp)).canonicalize_radical() 
    print(t, tmp.canonicalize_radical().n(80))
    lst.append((t,tmp.n()))

By giving the next output:

1 -0.75735931288071485359493 2 0.74754689570642838213503 3 2.7345908033901357840028 4 0.076504843704676803069591 5 1.0485281374238889523706 6 0.13254046199725214558851 7 -0.090964954340477885594991 8 0.35391568118499587774957

Why the output is so different? Bit precision don't seem to be a problem.

2020-10-30 00:10:19 +0200 asked a question canonicalize_radical() and evaluation return different answers

This code return proof that f^8(x)=f(f(f(f(f(f(f(f(x))))))))=x if f(x)=(x(sqrt(2)-1)-1)/(x-1):

def yx(x): 
    cst=sqrt(2)-1
    if(x==1):
        return -Infinity
    return (cst*x-1)/(x-1)
tmp=x 
for t in range(1,9): 
    tmp=(yx(tmp)).canonicalize_radical() 
    print(t, tmp.canonicalize_radical())

But this code looks directly at orbit of a point and shows that the statement above is false:

tmp=1.5
lst=[]
for t in range(1,9): 
    tmp=(yx(tmp)).canonicalize_radical() 
    print(t, tmp.canonicalize_radical().n(80))
    lst.append((t,tmp.n()))

By giving the next output:

1 -0.75735931288071485359493
2 0.74754689570642838213503
3 2.7345908033901357840028
4 0.076504843704676803069591
5 1.0485281374238889523706
6 0.13254046199725214558851
7 -0.090964954340477885594991
8 0.35391568118499587774957

Why the output is so different? Bit precision don't seem to be a problem.

2020-04-23 04:27:46 +0200 received badge  Student (source)
2020-04-22 13:12:39 +0200 asked a question Substitution into polynomial defined over finite field

I am new to SAGE. While attempting to substitute finite field element into polynomial over finite field instead of variable i get positive characteristic not allowed in symbolic computations error. How am i supposed to substitute in this case? Sage notebook 8.5. Not working code:

x,y=var('x'),var('y')
fx=PolynomialRing(GF(32),x)(x^2+x)
fx.substitute(x==1)

Thanks in advanse fot answer.

2020-04-22 13:12:39 +0200 asked a question Substitution in polynomial defined over finite field

I am new to Sage. While attempting to substitute finite field element into polynomial over finite field, instead of variable i get positive characteristic not allowed in symbolic computations error. How am i supposed to substitute in this case? Sage notebook 8.5. Not working code:

x, y = var('x'), var('y')
fx = PolynomialRing(GF(32), x)(x^2 + x)
fx.substitute(x == 1)

Thanks in advance for answer.