Ask Your Question

Alex Karenin's profile - activity

2023-12-01 09:58:26 +0200 commented answer Overflow in list_plot?

Thank you! It would work just fine for me.

2023-11-30 09:39:53 +0200 received badge  Famous Question (source)
2023-11-30 08:10:27 +0200 asked a question Overflow in list_plot?

Overflow in list_plot? The code: l = [1.4312706585e12, -1.4575266189e12, 4.9459419278e11, -4.8146621292e12] list_plot(l

2023-08-17 13:49:15 +0200 asked a question Does sympy break CyclotomicField?

Does sympy break CyclotomicField? One can define a cyclotomic field as CyclotomicField(16) for example. But the code bel

2023-08-17 13:40:07 +0200 received badge  Famous Question (source)
2023-08-17 13:39:48 +0200 received badge  Popular Question (source)
2023-07-13 03:51:34 +0200 received badge  Famous Question (source)
2023-06-07 01:27:33 +0200 received badge  Notable Question (source)
2023-05-28 07:47:34 +0200 received badge  Popular Question (source)
2022-12-12 07:45:40 +0200 asked a question Are rings of integers incompatible with multiprocessing?

Are rings of integers incompatible with multiprocessing? The code below crashen on sage 9.5: from multiprocessing impor

2022-10-21 10:43:58 +0200 received badge  Editor (source)
2022-10-21 10:43:58 +0200 edited question Sage fails to check if NumberField is UFD

Sage fails to check if NumberField if UFD The field Q(sqrt(-5)) if not a unique factorization domain. Yet the code below

2022-10-21 10:43:14 +0200 asked a question Sage fails to check if NumberField is UFD

Sage fails to check if NumberField if UFD The field Q(sqrt(-5)) if not a unique factorization domain. Yet the code below

2022-09-28 15:22:33 +0200 received badge  Nice Question (source)
2022-09-28 07:31:45 +0200 commented answer Determinants over cyclotomic fields are broken?

Note that if you define OK = K.ring_of_integers() L, U = matrix(OK,L), matrix(OK,U) then it magically works. Also

2022-09-28 07:30:54 +0200 commented answer Determinants over cyclotomic fields are broken?

Note that if you define OK = K.ring_of_integers() L, U = matrix(OK,L), matrix(OK,U) then it magically works. Also

2022-09-27 12:58:31 +0200 commented question Determinants over cyclotomic fields are broken?

UPD: the code works as intended if I define matrices L and U over the ring of integers of the field K.

2022-09-27 12:58:19 +0200 commented question Determinants over cyclotomic fields are broken?

UPD: the code works as intended if I definine matrices L and U over the ring of integers of the field K.

2022-09-27 09:36:54 +0200 asked a question Determinants over cyclotomic fields are broken?

Determinants over cyclotomic fields are broken? I launch the code below which generates two unimodular matrices L and U

2022-09-25 19:11:53 +0200 received badge  Notable Question (source)
2022-08-25 13:27:44 +0200 received badge  Notable Question (source)
2022-08-25 13:27:44 +0200 received badge  Popular Question (source)
2022-08-19 12:10:33 +0200 asked a question NameError: name '...' is not defined

NameError: name '...' is not defined I got the preparsed with sage --preparse command keflll.py file with the function i

2022-07-12 11:19:42 +0200 asked a question MAC M1 Unhandled SIGILL: An illegal instruction occurred.

MAC M1 Unhandled SIGILL: An illegal instruction occurred. I got MAC OS 12.4 installed and after attempting to do matrix

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.