[sage-support] Generating Matrices with variables

2009-06-22 Thread Jens
Hello, I try to define a matrix (in particular a skew symmetric) with some variables as entries. I know how to do it by hand defining some variables and then put then into a matrix but what I want to have seems to more complicated. 1. I choose a size for the 2g x 2g matrix say g=2 2. I want to g

[sage-support] Re: how to controll precision when show'ing formulas?

2009-06-22 Thread kcrisman
> > I want that > > show(function) would give me just 1 precision digit after comma > > how could I achieve this? > > You can use Python's string > formatting:http://docs.python.org/library/stdtypes.html#string-formatting > > To get floating-point numbers to display with one decimal point, do >

[sage-support] Re: Install problem for Sage

2009-06-22 Thread lim
Thanks for the instructions, Paul. Sage is up & running now. On Jun 22, 12:05 am, Paul Sargent wrote: > On 21 Jun 2009, at 16:21, lim wrote: > > > When I try to drag the "sage" folder from /Applications to Terminal, > > the following message appears: > > Why would you do that? (dragging from A

[sage-support] sage 4 for oldish notebook

2009-06-22 Thread Martin Rubey
Hi all, is there any way to get a recent sage version running on my laptop? output of /proc/cpuinfo below, operating system is linux ubuntu 8.04.2. compiling from source won't work anymore (3.4 was already rather difficult. Or did things improve there?), and the binaries from sagemath for ubunt

[sage-support] Re: sage 4 for oldish notebook

2009-06-22 Thread William Stein
On Mon, Jun 22, 2009 at 6:20 PM, Martin Rubey wrote: > > Hi all, > > is there any way to get a recent sage version running on my laptop? > output of /proc/cpuinfo below, operating system is linux ubuntu 8.04.2. > > compiling from source won't work anymore (3.4 was already rather > difficult.  Or d

[sage-support] EC search problem

2009-06-22 Thread harivola
Hi all, I am running a small script on a windows xp machine and some time I am getting this error message: /usr/local/sage/local/bin/sage-sage: line 348: 19954 Killed python "$@" I don't get the meaning of that. By the way, does someone know an efficient way in Sage to search for EC with pres

[sage-support] Re: EC search problem

2009-06-22 Thread William Stein
On Mon, Jun 22, 2009 at 5:35 PM, harivola wrote: > > Hi all, > >  I am running a small script on a windows xp machine and some time I > am getting this error message: >  /usr/local/sage/local/bin/sage-sage: line 348: 19954 Killed >  python "$@" You're probably running out of memory (=RAM). Try e

[sage-support] Re: Generating Matrices with variables

2009-06-22 Thread Rob Beezer
Jens, Does the following Sage command-line session begin to do what you want? Various parts could be more streamlined and/or automated for a larger matrix. Rob sage: for i in range(4): : var("a"+str(i)) : a0 a1 a2 a3 sage: J = matrix(2,2,[a0,a1,a2,a3]) sage: J [a0 a1] [a2 a3] sage

[sage-support] cmath module out of date?

2009-06-22 Thread Ethan Van Andel
I'm writing code for a cython module, but right now I'm doing it in the sage worksheet for convenience. This means that I don't have access to sage's arg(complex number) function. Therefore, I decided to use the cmath module's "phase(x)" function which does the same thing. When I import cmath, how

[sage-support] Build on Pardus 2009 beta of sage 4.0.2 (from source)

2009-06-22 Thread Scott
I am unable to build sage from source on under Pardus 2009B and could not find any obvious flags to try. V/R Scott gcc, g++, make, m4, perl, ranlib, tar. gas/as, gld/ld, gnm/nm, gas/ as, gld/ld, gnm/nm are all installed. The standard output for the error is: bzip2-1.0.5/ manual.xml bzip2-1.

[sage-support] Re: EC search problem

2009-06-22 Thread adam mohamed
Hi, Thanks for the very quick response. I will try that tomorrow. Now I understand the problem that we met when running the same code in a linux machine. I am doing this search for cryptographic applications, so I am dealing with primes from the size of 170 bit Length. I would like the 2-sylo

[sage-support] Re: cmath module out of date?

2009-06-22 Thread William Stein
On Mon, Jun 22, 2009 at 8:37 PM, Ethan Van Andel wrote: > > I'm writing code for a cython module, but right now I'm doing it in > the sage worksheet for convenience. This means that I don't have > access to sage's arg(complex number) function. Therefore, I decided to > use the cmath module's "phas

[sage-support] Re: Build on Pardus 2009 beta of sage 4.0.2 (from source)

2009-06-22 Thread William Stein
e On Mon, Jun 22, 2009 at 8:53 PM, Scott wrote: > > I am unable to build sage from source on under Pardus 2009B and could > not find any obvious flags to try. What is Pardus. The error you get below is: /usr/include/bits/sigcontext.h:28:29: error: asm/sigcontext.h: No such file or directo

[sage-support] roots of neg. numbers, but not the question you think

2009-06-22 Thread kcrisman
Dear support: sage: z = (-1)^(1/3) sage: z (-1)^(1/3) sage: z.n() 0.500 + 0.866025403784439*I So far, so good - known behavior, take "primitive" root. But: sage: z^2 1 sage: (z.n())^2 -0.500 + 0.866025403784439*I This seems problematic, and is because ((-1)^(1/3))^2 ==

[sage-support] coding theory minimum distance -1

2009-06-22 Thread Rado
I noticed that the minimum_distance() function returns -1 (sometimes even returning error message), when the code is identically zero at some coordinate. Although it makes sense to puncture the code first, -1 is not very gracefull. Besides it should be a fast check to find the all zero column and

[sage-support] Re: coding theory minimum distance -1

2009-06-22 Thread David Joyner
Can you tell me what version you are using? In version 4.0.2.rc3, I get sage: C=LinearCode(Matrix(GF(2),[1,0,1,1,0,1])) sage: C Linear code of length 6, dimension 1 over Finite Field of size 2 sage: C.minimum_distance() 4 On Mon, Jun 22, 2009 at 6:27 PM, Rado wrote: > > I noticed that the min

[sage-support] Re: coding theory minimum distance -1

2009-06-22 Thread Rado
sage: version() 'Sage Version 4.0.1, Release Date: 2009-06-06' That probably explains it. I will update and try again. Thanks, Rado On Jun 22, 5:36 pm, David Joyner wrote: > Can you tell me what version you are using? > > In version 4.0.2.rc3, I get > > sage: C=LinearCode(Matrix(GF(2),[1,0,1,1

[sage-support] Re: coding theory minimum distance -1

2009-06-22 Thread Rado
Yep, that fixed. That would teach me to upgrade before posting for "bugs". Rado On Jun 22, 5:49 pm, Rado wrote: > sage: version() > 'Sage Version 4.0.1, Release Date: 2009-06-06' > > That probably explains it. I will update and try again. > > Thanks, > Rado > > On Jun 22, 5:36 pm, David Joyner

[sage-support] Re: Build on Pardus 2009 beta of sage 4.0.2 (from source)

2009-06-22 Thread Scott
Professor Stein Thank you for your work with SAGE. I could not find the package to install that would provide /usr/ include/asm/sigcontext.h and have filed a bug report for the Pardus 2009 Beta version. The respository did not seem to have *-dev packages for the compilers. Respectfully, Scot

[sage-support] Re: create a subdiagonal matrix quickly

2009-06-22 Thread Jason Grout
Rajeev Singh wrote: > I should mention that these methods are all nice for this problem, but > they also end up copying an awful lot of zeros. I think it would be way > more efficient in general to make a zero matrix, then set the right > diagonal by hand using a for loop. > > >

[sage-support] Re: how to controll precision when show'ing formulas?

2009-06-22 Thread Robert Bradshaw
On Jun 22, 2009, at 6:01 AM, kcrisman wrote: >>> I want that >>> show(function) would give me just 1 precision digit after comma >>> how could I achieve this? >> >> You can use Python's string formatting:http://docs.python.org/ >> library/stdtypes.html#string-formatting >> >> To get floating-poi