Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.

click to hide/show revision 2
None

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 -0.75735931288071485359493
2 0.74754689570642838213503
3 2.7345908033901357840028 2.7345908033901357840028
4 0.076504843704676803069591 0.076504843704676803069591
5 1.0485281374238889523706 1.0485281374238889523706
6 0.13254046199725214558851 0.13254046199725214558851
7 -0.090964954340477885594991 -0.090964954340477885594991
8 0.35391568118499587774957

0.35391568118499587774957

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