[sage-support] Coefficients of polynomial over finite field are not reduced?

2013-05-05 Thread geo909
Hi all, This is my first time with sage and I'm trying to work with polynomials over finite fields. Probably due to my lack of knowledge, I'm getting some unexpected behaviour. In particular, the output of, let's say F = GF(3) R. = F[] T(x)=5*x^2+3 T is x |→ 5x2+3 I also get the same o

[sage-support] Notebook: How to print long output lines (>72 characters) without breaks?

2013-05-19 Thread geo909
Hi all, I am using Sage 4.3 with the notebook interface. I would like to have very long output lines, probably 100 characters or more, without breaks on the screen. For instance, if I give print 72*"x" I get xxx which is fine.

[sage-support] Re: Coefficients of polynomial over finite field are not reduced?

2013-05-19 Thread geo909
Thank you very much! I couldn't understand what I was doing wrong for the life of me, now it's clear. On Monday, May 6, 2013 2:05:56 AM UTC-3, Simon King wrote: > > Hi, > > On 2013-05-05, William Stein > wrote: > >> F =3D GF(3) > >> R. =3D F[] > >> T(x)=3D5*x^2+3 > > > > This is wrong. Do

[sage-support] Checking if list of integers is a Lyndon word

2013-12-11 Thread geo909
Hi all, >From wikipedia: *In mathematics, in the areas of combinatorics and computer science, a Lyndon word is a string that is strictly smaller in lexicographic order than all of its rotations. Lyndon words are named after mathematician Roger Lyndon, who introduced them in 1954, calling them

Re: [sage-support] Checking if list of integers is a Lyndon word

2013-12-11 Thread geo909
On Wednesday, December 11, 2013 10:31:03 AM UTC-5, Ivan Andrus wrote: > > On Dec 11, 2013, at 8:22 AM, geo909 > > wrote: > > Hi all, > > From wikipedia: > > *In mathematics, in the areas of combinatorics and computer > science, a Lyndon word is a s

[sage-support] Best strategy for exporting/importing big lists or tuples to human-readable files?

2014-03-06 Thread geo909
Dear all, I kindly ask for your feedback on the following. My work involves the use of big lists that are of two kinds: a) lists of integers b) lists of lists of integers The contents of those lists come from quite long computations and I need to reuse those tuples often, so it is necessary t

[sage-support] Re: Best strategy for exporting/importing big lists or tuples to human-readable files?

2014-03-06 Thread geo909
I finally decided to use the csv goodies of python as described here: http://docs.python.org/2/library/csv.html On Thursday, March 6, 2014 11:56:22 AM UTC-5, geo909 wrote: > > Dear all, > > I kindly ask for your feedback on the following. > > My work involves the use of big lis

[sage-support] Optimizing this function with Cython

2014-03-12 Thread geo909
Hi all, I'm trying to get the grasp on Cython. I know a little bit of C, so I understand the concept of data types. But I'm still not sure how to use things properly. So, for instance, is the following optimization reasonable? (there is an ~30% increase in speed from pure python code) %cython