[sage-support] Re: how to stop a Sage program from consuming all available memory?

2010-02-07 Thread zieglerk
I'm using sage from the command line (or more precisely through emacs sagemode). Let me ask the opposite question: How can I allocate *more* memory to the sage process. Sometimes extensive calculations break of with an out of memory message. (Or is this more an issue of my OS?) As a footnote:

Re: [sage-support] Re: how to stop a Sage program from consuming all available memory?

2010-02-07 Thread David Joyner
On Sun, Feb 7, 2010 at 12:30 PM, zieglerk konstantin.zieg...@gmail.com wrote: I'm using sage from the command line (or more precisely through emacs sagemode). Let me ask the opposite question:  How can I allocate *more* memory to the sage process.  Sometimes extensive calculations break of

[sage-support] Re: how to cast finite field elements into p-adic ring

2010-02-07 Thread dmharvey
Please, keep sending these bugs and feature requests for p-adic   extensions.  I don't think the code has gotten much use, and I'd   like to see actual use cases. what about even just coercing from a p-adic field to its residue field? sage: R.a = Zq(9) sage: K = R.residue_field() sage:

[sage-support] Re: displaying graphs

2010-02-07 Thread pong
I've installed the SAGE 4.3.1. Looks like the problem I mentioned persist. I tried to obtain an account to open a ticket about a month ago but did not get a reply. I hope this issue will be addressed some how. On Jan 6, 12:43 am, Nathann Cohen nathann.co...@gmail.com wrote: Hello

[sage-support] Solving a^2+n*b^2

2010-02-07 Thread Rolandb
Hi, Consider Euler’s famous expression x=a^2+n*b^2. I want to solve a and b, given x and n. Because solve_mod is totally broken, I tried to develop a clever method myself. Counterintuitively, I found that the most simple brute force method in SAGE is relatively fast. def bruteforce(number,n):

Re: [sage-support] Re: displaying graphs

2010-02-07 Thread William Stein
On Sun, Feb 7, 2010 at 12:27 PM, pong wypon...@gmail.com wrote:     I've installed the SAGE 4.3.1. Looks like the problem I mentioned persist.     I tried to obtain an account to open a ticket about a month ago but did not get a reply. Anyone can now register on the web for a trac account

Re: [sage-support] Solving a^2+n*b^2

2010-02-07 Thread William Stein
On Sun, Feb 7, 2010 at 12:35 PM, Rolandb rola...@planet.nl wrote: Hi, Consider Euler’s famous expression x=a^2+n*b^2. I want to solve a and b, given x and n. Because solve_mod is totally broken, I tried to develop a clever method myself. Counterintuitively, I found that the most simple brute

[sage-support] using n.factor()

2010-02-07 Thread davedo2
I want to run a range of numbers through the factor() function and if I run a loop through a list as in: for i in [25,37,205]: print i.factor() it works fine, but if I try for i in range(1,5): print i.factor() I get the error message 'int' object has no attribute 'factor' - how do I get

Re: [sage-support] using n.factor()

2010-02-07 Thread William Stein
On Sun, Feb 7, 2010 at 3:17 PM, davedo2 dave...@gmail.com wrote: I want to run a range of numbers through the factor() function and if I run a loop through a list as in: for i in [25,37,205]:    print i.factor() it works fine, but if I try for i in range(1,5):    print i.factor() I get the

Re: [sage-support] using n.factor()

2010-02-07 Thread Jaap Spies
davedo2 wrote: I want to run a range of numbers through the factor() function and if I run a loop through a list as in: for i in [25,37,205]: print i.factor() it works fine, but if I try for i in range(1,5): print i.factor() I get the error message 'int' object has no attribute

Re: [sage-support] using n.factor()

2010-02-07 Thread Alex Ghitza
On Sun, 7 Feb 2010 15:17:08 -0800 (PST), davedo2 dave...@gmail.com wrote: I want to run a range of numbers through the factor() function and if I run a loop through a list as in: for i in [25,37,205]: print i.factor() it works fine, but if I try for i in range(1,5): print i.factor()

[sage-support] Re: how to stop a Sage program from consuming all available memory?

2010-02-07 Thread Alasdair
The problem was mine, which I first asked Minh, who kindly communicated it to the group. I have since discovered ulimit, which is a very powerful part of the bash shell. There is documentation: type help ulimit in a bash shell and you'll see the equivalent of a man page. (man bash is too huge.)

[sage-support] Re: using n.factor()

2010-02-07 Thread davedo2
Thanks to all of you...Dave On Feb 7, 3:23 pm, Alex Ghitza aghi...@gmail.com wrote: On Sun, 7 Feb 2010 15:17:08 -0800 (PST), davedo2 dave...@gmail.com wrote: I want to run a range of numbers through the factor() function and if I run a loop through a list as in: for i in [25,37,205]:    

[sage-support] Re: Solving a^2+n*b^2

2010-02-07 Thread Rolandb
Thanks William, Actually I try to solve it for different x and n. A typical example of (x,n) is: %time bruteforce(7^10*29^5,973) [(3899224, 2437015)] CPU time: 25.88 s, Wall time: 26.12 s Roland On 7 feb, 22:29, William Stein wst...@gmail.com wrote: On Sun, Feb 7, 2010 at 12:35 PM, Rolandb