[sage-support] random number generation from cython

2009-11-03 Thread Flavio Coelho
Hi, anyone know how could I access the Python's builtin mersenne twister random number generator from Cython? I'd like to generate random numbers in the interval [0,1[ faster than by calling random.random(). I know the implementation of random.random is in C, but there is the cost of a python

[sage-support] Re: random number generation from cython

2009-11-03 Thread Jason Grout
Flavio Coelho wrote: Hi, anyone know how could I access the Python's builtin mersenne twister random number generator from Cython? I'd like to generate random numbers in the interval [0,1[ faster than by calling random.random(). I know the implementation of random.random is in C, but

[sage-support] Re: Matrix inconsistency with decimal/fraction representations

2009-11-03 Thread Jason Grout
Michael Orlitzky wrote: You're going to have a rather hard time convincing me that, upon encountering a decimal point, any other math software is going to flip out and silently return incorrect results for basic matrix operations. Recall: sage: m = matrix([ [-0.3, 0.2, 0.1],

[sage-support] Re: partial fraction error

2009-11-03 Thread ma...@mendelu.cz
The Maxima version which is present in Sage fails for this problem, se the session below. Which version of Maxima do you use on your computer? In Sage there is version 5.19.1. Does your computation work in this version of Maxima? Robert

[sage-support] Re: partial fraction error

2009-11-03 Thread Bryan Wilcox
Hi Robert, Thanks for the response. I'm using Maxima 5.13.0 out of the Ubuntu 8.04 repository. Here is the version printout. -- Maxima version: 5.13.0 Maxima build date: 3:56 12/15/2007 host type: x86_64-unknown-linux-gnu lisp-implementation-type: GNU Common Lisp (GCL)

[sage-support] Re: Ubuntu 9.10

2009-11-03 Thread davedo2
Hi William, No, I don't do that, but who knows what happened? Anyway, after slightly changing the command you suggested to: ~~ chown mdobbs -R /home/mdobbs/.sage ~~ things work as expected ;-) Thanks to all for the help!...Dave On Nov 3, 11:05 am, William Stein wst...@gmail.com

[sage-support] Segmentation fault with find_fit function

2009-11-03 Thread cchristy...@gmail.com
Hello ! Since I have compiled the new version of sage, 'Sage Version 4.1.2, Release Date: 2009-10-14' , the find_fit function of my programs don't want to work any more. The error message is : /sage/sage/local/bin/sage-sage: line 353: 14218 Segmentation fault python $@ Connection to localhost

[sage-support] maxima to sage

2009-11-03 Thread Mikie
Is there anyway to convert a maxima expression ('sage.interfaces.maxima.MaximaElement') to ('sage.calculus.SymbolicArithmetic')? I need to use Sage's factor instead of Maxima's. Thanx --~--~-~--~~~---~--~~ To post to this group, send email to

[sage-support] partial fraction error

2009-11-03 Thread Bryan Wilcox
I am trying to do a partial fraction expansion as follows var('z') theta_c=1.4 k=10 T=0.1 D=1 G=k*((2*T-1+exp(-2*T))*z+1-exp(-2*T)-2*T*exp(-2*T))/(z-1)/(z-exp(-2*T)) theta_a=G*theta_c theta_a.partial_fraction(z) sage returns the following error traceback: -- Traceback (most recent call last):

[sage-support] Re: Matrix inconsistency with decimal/fraction representations

2009-11-03 Thread Michael Orlitzky
William Stein wrote: This is really no different than: sage: n = 5; m = Mod(5, 19) sage: n == m True sage: n.additive_order() +Infinity sage: m.additive_order() 19 I don't consider this a bug. The original poster's issues might stem from misunderstanding about how floating point

[sage-support] Re: Ubuntu 9.10

2009-11-03 Thread William Stein
On Tue, Nov 3, 2009 at 10:41 AM, davedo2 dave...@gmail.com wrote: Marshall, It's a bit lengthy, but here goes: ~~ sage: pari(7).isprime() --- IOError                                   Traceback

[sage-support] Re: maxima to sage

2009-11-03 Thread Mikie
Yes, David, thanks. I fixed it with repr and SR. On Nov 3, 1:38 pm, David Joyner wdjoy...@gmail.com wrote: Does this help? sage: f = maxima(x^2-1) sage: type(f) class 'sage.interfaces.maxima.MaximaElement' sage: ff = f.sage() sage: type(ff) type 'sage.symbolic.expression.Expression'

[sage-support] Re: maxima to sage

2009-11-03 Thread David Joyner
Does this help? sage: f = maxima(x^2-1) sage: type(f) class 'sage.interfaces.maxima.MaximaElement' sage: ff = f.sage() sage: type(ff) type 'sage.symbolic.expression.Expression' sage: ff.factor() (x - 1)*(x + 1) On Tue, Nov 3, 2009 at 3:28 PM, Mikie thephantom6...@hotmail.com wrote: Is

[sage-support] partial fraction error

2009-11-03 Thread Bryan Wilcox
NOTE: sorry about the double send. I accidentally fat fingered the keyboard and happened upon a gmail shortcut apparently. I am trying to do a partial fraction expansion as follows Sage cell: -- var('z') theta_c=1.4 k=10 T=0.1 D=1

[sage-support] Re: Ubuntu 9.10

2009-11-03 Thread davedo2
Marshall, It's a bit lengthy, but here goes: ~~ sage: pari(7).isprime() --- IOError Traceback (most recent call last)

[sage-support] Re: Matrix inconsistency with decimal/fraction representations

2009-11-03 Thread Michael Orlitzky
Jason Grout wrote: The problem here is that no one has really implemented a numerically stable version of echelon_form for RR. I thought we called scipy for rank calculations over RDF, but apparently we don't even do that! Scipy answers correctly: sage: import scipy sage:

[sage-support] Re: Matrix inconsistency with decimal/fraction representations

2009-11-03 Thread Jason Grout
Michael Orlitzky wrote: Jason Grout wrote: The problem here is that no one has really implemented a numerically stable version of echelon_form for RR. I thought we called scipy for rank calculations over RDF, but apparently we don't even do that! Scipy answers correctly: sage:

[sage-support] Re: Matrix inconsistency with decimal/fraction representations

2009-11-03 Thread Robert Bradshaw
On Nov 3, 2009, at 8:13 PM, Jason Grout wrote: Michael Orlitzky wrote: Jason Grout wrote: The problem here is that no one has really implemented a numerically stable version of echelon_form for RR. I thought we called scipy for rank calculations over RDF, but apparently we don't even

[sage-support] Re: partial fraction error

2009-11-03 Thread ma...@mendelu.cz
Hello Bryan If you are interested in this, compile CVS version of Maxima and look, if the CVS version has the same problem. If yes, report the problem at http://sourceforge.net/tracker/?group_id=4933atid=104933 I did similar work for inequality solver few week ago and this issue has been fixed

[sage-support] Re: partial fraction error

2009-11-03 Thread ma...@mendelu.cz
the bug is not in Maxima, but the problem is in the fact that sage has keepfloat set to true. look at this: (maxima called from sage wit your expr:1.4*(.1873*z+.1752)/(z-1)/(z-. 8187) ) maxima: keepfloat:false false maxima: partfrac(expr,z)

[sage-support] Re: partial fraction error

2009-11-03 Thread Jason Grout
ma...@mendelu.cz wrote: the bug is not in Maxima, but the problem is in the fact that sage has keepfloat set to true. look at this: (maxima called from sage wit your expr:1.4*(.1873*z+.1752)/(z-1)/(z-. 8187) ) maxima: keepfloat:false false maxima: partfrac(expr,z)