[sage-support] Re: regarding jsMath

2008-12-29 Thread William Stein
On Mon, Dec 29, 2008 at 8:54 PM, wrote: > > Hi > I got sage installed (compiled from source). > > However, when I check the Typeset checkbox in the sage notebook I get > the following error > "It looks like jsMath failed to set up properly (error code 7)". > > Due to this the display is not very

[sage-support] regarding jsMath

2008-12-29 Thread freewill1729
Hi I got sage installed (compiled from source). However, when I check the Typeset checkbox in the sage notebook I get the following error "It looks like jsMath failed to set up properly (error code 7)". Due to this the display is not very good. I would be deeply thankful for some help in this

[sage-support] Re: Terminal in Mac OS X 10.4 only opens with SAGE

2008-12-29 Thread Spike
Sorry to reply so late. Hmmm... I upgraded that computer to Mac OS 10.5. I'll be putting SAGE back on it and if I have the same problem again I'll be sure to let you guys know. It sounds like I did something wrong in the original install. Thanks for your help though! Happy New Year On Dec 9, 10:

[sage-support] Re: Polynomial Problem

2008-12-29 Thread Robert Bradshaw
On Dec 29, 2008, at 4:47 PM, William Stein wrote: > > On Mon, Dec 29, 2008 at 4:34 PM, Robert Bradshaw > wrote: >> >> +1 to (deprecating then removing) removing X.list(), and replacing it >> with X.entries(). > > Very good point. We *must* remember to make X.list() use the > deprecation warning

[sage-support] Re: Polynomial Problem

2008-12-29 Thread William Stein
On Mon, Dec 29, 2008 at 4:34 PM, Robert Bradshaw wrote: > > +1 to (deprecating then removing) removing X.list(), and replacing it > with X.entries(). Very good point. We *must* remember to make X.list() use the deprecation warning system, and only remove it after 6 months. Could you make a tra

[sage-support] Re: Polynomial Problem

2008-12-29 Thread Robert Bradshaw
On Dec 29, 2008, at 4:15 PM, William Stein wrote: > On Mon, Dec 29, 2008 at 2:43 PM, Justin Walker wrote: >> >> On Dec 29, 2008, at 5:23 PM, John Cremona wrote: >> >>> >>> Maybe I missed the point here but after >> >> The point was a minor one... >> >>> R.=QQ[] >>> M=matrix(R,1,2,[x1+x2,x1*x2])

[sage-support] Re: coercing an arbitrary precision real number to a complex number?

2008-12-29 Thread William Stein
On Mon, Dec 29, 2008 at 4:16 PM, ggrafendorfer wrote: > > Hi, > this is somehow related to this thread: > > http://groups.google.com/group/sage-support/browse_thread/thread/151415480ecebc1a > > Assume that 'a' is a *negative* real number with some precision not > equal to 53 bit and I want to coe

[sage-support] coercing an arbitrary precision real number to a complex number?

2008-12-29 Thread ggrafendorfer
Hi, this is somehow related to this thread: http://groups.google.com/group/sage-support/browse_thread/thread/151415480ecebc1a Assume that 'a' is a *negative* real number with some precision not equal to 53 bit and I want to coerce it to a complex number preserving its precision (for example to t

[sage-support] Re: Polynomial Problem

2008-12-29 Thread William Stein
On Mon, Dec 29, 2008 at 2:43 PM, Justin Walker wrote: > > > On Dec 29, 2008, at 5:23 PM, John Cremona wrote: > >> >> Maybe I missed the point here but after > > The point was a minor one... > >> R.=QQ[] >> M=matrix(R,1,2,[x1+x2,x1*x2]) >> >> you can get at the entries like this: >> sage: M[0,0] >

[sage-support] Plotting a joint probability density function

2008-12-29 Thread Vijay
Hi: Is there a way to plot a joint probability density function in Sage? I looked at 3D plots in the Sage reference manual (http://www.sagemath.org/doc/ref/ node29.html) but could not find anything close. For example, here is a simple joint probability density function: { 2 : x

[sage-support] Re: bug/feature? increasing precision of a complex number

2008-12-29 Thread ggrafendorfer
Hi All, thanks for all the answers, especially for John Cremona for being the only one recognizing what I actually wanted to point out :-) It's probably my fault, I'll take away obscuring examples the next time and try to focus on the issue For better understanding why I did "CC(-5).n(prec=100)"

[sage-support] Re: Polynomial Problem

2008-12-29 Thread Justin Walker
On Dec 29, 2008, at 5:23 PM, John Cremona wrote: > > Maybe I missed the point here but after The point was a minor one... > R.=QQ[] > M=matrix(R,1,2,[x1+x2,x1*x2]) > > you can get at the entries like this: > sage: M[0,0] > x1 + x2 > sage: M[0,1] > x1*x2 For the OP, it was surprising that "lis

[sage-support] Re: Polynomial Problem

2008-12-29 Thread John Cremona
Maybe I missed the point here but after R.=QQ[] M=matrix(R,1,2,[x1+x2,x1*x2]) you can get at the entries like this: sage: M[0,0] x1 + x2 sage: M[0,1] x1*x2 where the only non-obvious thing to a mathematician is that the row/col indices start at at 0. The list() discussion seems separate to me.

[sage-support] Re: Polynomial Problem

2008-12-29 Thread Justin Walker
On Dec 29, 2008, at 4:53 PM, Robert Bradshaw wrote: > > On Dec 29, 2008, at 1:38 PM, Justin Walker wrote: > >> On Dec 29, 2008, at 3:32 PM, Santanu Sarkar wrote: >> >>> I write a program in SAGE as follows: >>> R.=QQ[] >>> M=matrix(R,1,2,[x1+x2,x1*x2]) >>> may i do following steps to extract poly

[sage-support] Re: Polynomial Problem

2008-12-29 Thread Robert Bradshaw
On Dec 29, 2008, at 1:38 PM, Justin Walker wrote: > On Dec 29, 2008, at 3:32 PM, Santanu Sarkar wrote: > >> I write a program in SAGE as follows: >> R.=QQ[] >> M=matrix(R,1,2,[x1+x2,x1*x2]) >> may i do following steps to extract polynomials from matrix? >> 1) x = list(M) >> 2) f1 = x[0] >> 3) f2

[sage-support] Re: Polynomial Problem

2008-12-29 Thread Justin Walker
On Dec 29, 2008, at 3:32 PM, Santanu Sarkar wrote: > I write a program in SAGE as follows: > R.=QQ[] > M=matrix(R,1,2,[x1+x2,x1*x2]) > may i do following steps to extract polynomials from matrix? > 1) x = list(M) > 2) f1 = x[0] > 3) f2 = x[1] > is f1 & f2 are polynomials? > if not how i can get

[sage-support] Polynomial Problem

2008-12-29 Thread Santanu Sarkar
I write a program in SAGE as follows: R.=QQ[] M=matrix(R,1,2,[x1+x2,x1*x2]) may i do following steps to extract polynomials from matrix? 1) x = list(M) 2) f1 = x[0] 3) f2 = x[1] is f1 & f2 are polynomials? if not how i can get them? please help me! --~--~-~--~~~---~--~-

[sage-support] Re: bug/feature? increasing precision of a complex number

2008-12-29 Thread William Stein
On Mon, Dec 29, 2008 at 9:48 AM, mabshoff wrote: > > > > On Dec 29, 9:40 am, "John Cremona" wrote: >> There really are two different issues here. The one which William and >> Michael concentrate on is that adding .n(100) to a 53-bit complex >> number does not increase its precision in any meani

[sage-support] Re: bug/feature? increasing precision of a complex number

2008-12-29 Thread mabshoff
On Dec 29, 9:40 am, "John Cremona" wrote: > There really are two different issues here.  The one which William and > Michael concentrate on is that adding .n(100) to a 53-bit complex > number does not increase its precision in any meaningful sense, it > just pads with 47 bits of 0. > > But the

[sage-support] Re: bug/feature? increasing precision of a complex number

2008-12-29 Thread John Cremona
2008/12/29 John Cremona : > There really are two different issues here. The one which William and > Michael concentrate on is that adding .n(100) to a 53-bit complex > number does not increase its precision in any meaningful sense, it > just pads with 47 bits of 0. > > But the second point is to

[sage-support] Re: bug/feature? increasing precision of a complex number

2008-12-29 Thread John Cremona
There really are two different issues here. The one which William and Michael concentrate on is that adding .n(100) to a 53-bit complex number does not increase its precision in any meaningful sense, it just pads with 47 bits of 0. But the second point is to do with Georg's original observation

[sage-support] Re: bug/feature? increasing precision of a complex number

2008-12-29 Thread Alex Ghitza
> > > Dear William, > > With "ln(CC(-5).n(prec=100))" I'm not taking the log of a number with > > 53-bit precision hoping that it magically turns into a 100-bit > > precision number, what you mean would be "ln(CC(-5)).n(prec=100)", > > I'm taking the log of CC(-5).n(prec=100) which obviously should

[sage-support] Re: bug/feature? increasing precision of a complex number

2008-12-29 Thread mabshoff
On Dec 29, 8:55 am, ggrafendorfer wrote: Hi Georg, > > You should do it the right way instead of the wrong way.  It is a very > > bad idea to do stuff like "ln(CC(-5).n(prec=100))", which basically > > says "take -5, think of it as a complex number with 53 bits of > > precision, take the log,

[sage-support] Re: bug/feature? increasing precision of a complex number

2008-12-29 Thread ggrafendorfer
> You should do it the right way instead of the wrong way. It is a very > bad idea to do stuff like "ln(CC(-5).n(prec=100))", which basically > says "take -5, think of it as a complex number with 53 bits of > precision, take the log, then view the answer as magically having 100 > bits of precisi

[sage-support] Re: getting digits

2008-12-29 Thread agi
On 28 Dez., 23:14, "William Stein" wrote: > Is this the sort of thing you want? > > sage: n = 123.45 > sage: n > 123.4500 > sage: len(str(n).rstrip('0')) - 1 > 5 > Thank you. That's exactly what I need. --~--~-~--~~~---~--~~ To post to this group, send em