[sage-support] Re: Factorization class

2008-12-02 Thread Tim Lahey
On Dec 3, 2008, at 1:03 AM, Craig Citro wrote: Thanks. That works, but Sage automatically expands things so you need to do, [(i^j).factor() for i,j in f] To ensure that each polynomial term is shown factorized. Do you want a list of pairs of the form (p,e) for each term in the factorizati

[sage-support] Re: Factorization class

2008-12-02 Thread Craig Citro
> Thanks. That works, but Sage automatically expands things so you > need to do, > [(i^j).factor() for i,j in f] > > To ensure that each polynomial term is shown factorized. > Do you want a list of pairs of the form (p,e) for each term in the factorization of f? (That's actually how the factoriza

[sage-support] Re: Factorization class

2008-12-02 Thread Tim Lahey
On Dec 3, 2008, at 12:18 AM, Jason Grout wrote: An easier way: sage: f=factor(16200) sage: f 2^3 * 3^4 * 5^2 sage: [i^j for i,j in f] [8, 81, 25] Thanks. That works, but Sage automatically expands things so you need to do, [(i^j).factor() for i,j in f] To ensure that each polynomial term

[sage-support] Re: Factorization class

2008-12-02 Thread Jason Grout
Tim Lahey wrote: > Hi, > > Does the Factorization class not have a > routine to return just a list of the factors? > Basically, something like the value function > but instead of multiplying them, puts > each term into a list? > > I ask because the output of a squarefree_decomposition > is a fac

[sage-support] Re: Setting symbol for imaginary unit?

2008-12-02 Thread Jason Grout
Tim Lahey wrote: > Hi, > > Thanks. I was kind of hoping for something less drastic, > but that works. In Maple there is just a variable you can > set which controls things, so you can do it on a per script > basis. > This is something that has come up before too. I think it might make sense

[sage-support] Factorization class

2008-12-02 Thread Tim Lahey
Hi, Does the Factorization class not have a routine to return just a list of the factors? Basically, something like the value function but instead of multiplying them, puts each term into a list? I ask because the output of a squarefree_decomposition is a factorization and I'd like to use those

[sage-support] Re: Setting symbol for imaginary unit?

2008-12-02 Thread Tim Lahey
Hi, Thanks. I was kind of hoping for something less drastic, but that works. In Maple there is just a variable you can set which controls things, so you can do it on a per script basis. Thanks. Tim. --- Tim Lahey PhD Candidate, Systems Design Engineering University of Waterloo http://www.linke

[sage-support] Re: Setting symbol for imaginary unit?

2008-12-02 Thread Jason Grout
Tim Lahey wrote: > > On Dec 2, 2008, at 10:14 PM, Jason Grout wrote: > >> >> Tim Lahey wrote: >>> Hi, >>> >>> The discussion of imaginary numbers reminded me of a >>> question I've had for some time. Is there a way to set >>> what's used for the imaginary unit? I often set it to >>> _j in Maple

[sage-support] Re: Setting symbol for imaginary unit?

2008-12-02 Thread Tim Lahey
On Dec 2, 2008, at 10:14 PM, Jason Grout wrote: Tim Lahey wrote: Hi, The discussion of imaginary numbers reminded me of a question I've had for some time. Is there a way to set what's used for the imaginary unit? I often set it to _j in Maple and I was wondering if there was any way to do it

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi Jason, OK, thank you very much, it's clear, now I understand the performance explanation when doing 'CDF(i^2)', sage in this case does not perform a simplification before coercing to CDF, clearly (for performance reasons), the key is the represantation of "i^2" as -1, so may this is not good ?

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Jason Grout
ggrafendorfer wrote: > Hi Jason, > thanks for your suggestion and your detailed answer, > > but actually I did not start this thread for performance reasons, > I did start it to ask why "i^2" is not treated like an exact symbolic > expression in sage: > >

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi Jason, thanks for your suggestion and your detailed answer, but actually I did not start this thread for performance reasons, I did start it to ask why "i^2" is not treated like an exact symbolic expression in sage: -- | Sage

[sage-support] Re: Setting symbol for imaginary unit?

2008-12-02 Thread Jason Grout
Tim Lahey wrote: > Hi, > > The discussion of imaginary numbers reminded me of a > question I've had for some time. Is there a way to set > what's used for the imaginary unit? I often set it to > _j in Maple and I was wondering if there was any way to > do it in Sage. Do you mean the variable th

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Jason Grout
ggrafendorfer wrote: > Hi Robert, > this was not a misunderstanding, there is an "n" missing :-), I > corrected it: > I wanted to write > > then i^2 should also be of type CDF, but > > rather then > > the i^2 should also > > as an answer to your statement, namely that i^2 is getting turne

[sage-support] Setting symbol for imaginary unit?

2008-12-02 Thread Tim Lahey
Hi, The discussion of imaginary numbers reminded me of a question I've had for some time. Is there a way to set what's used for the imaginary unit? I often set it to _j in Maple and I was wondering if there was any way to do it in Sage. Cheers, Tim. --- Tim Lahey PhD Candidate, Systems Design

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi Robert, > > what I want to say is that I nevertheless don't understand why i^2 is > > not be treated like a symbolic expression ... > > I hope I will sometimes ..:-) > > In your case, it's not treated like a symbolic expression because > it's not a symbolic expression. Looks again like a misun

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Robert Bradshaw
On Dec 2, 2008, at 6:27 PM, ggrafendorfer wrote: > Hi Robert, >>> Again, if I want performance I could use i^2., >> >> Um... that's *slower*, right? > > I really did not expect that i^2. is slower than i^2, > in my problem I needed performance, for this I wrote > i = CDF(I) > in the first line of

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi Robert, this was not a misunderstanding, there is an "n" missing :-), I corrected it: I wanted to write then i^2 should also be of type CDF, but rather then the i^2 should also as an answer to your statement, namely that i^2 is getting turned into CDF(i)^CDF(2) I hope this is clear no

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi Robert, > > Again, if I want performance I could use i^2., > > Um... that's *slower*, right? I really did not expect that i^2. is slower than i^2, in my problem I needed performance, for this I wrote i = CDF(I) in the first line of my script, not just for performance, it can also leed to error

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Robert Bradshaw
On Dec 2, 2008, at 6:12 PM, ggrafendorfer wrote: > Hi Robert >> symbolic expression "i^2" is getting turned into CDF(i)^CDF(2). > > the i^2 should also be of type CDF, but > > sage: type(i^2) > Ah, I think I see the misunderstanding now. i^2 should not be of type CDF, because i is not of type

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Robert Bradshaw
On Dec 2, 2008, at 6:04 PM, ggrafendorfer wrote: >> Perhaps we should special case for (small) integer powers, but that >> would slow other stuff down. What's happening here is that the >> symbolic expression "i^2" is getting turned into CDF(i)^CDF(2). >> Simplification happens on printing, not o

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi Robert, > Perhaps we should special case for (small) integer powers, but that > would slow other stuff down. What's happening here is that the > symbolic expression "i^2" is getting turned into CDF(i)^CDF(2). Then "i^2" should be of type CDF, but sage: type(i^2) Georg --~--~-~--

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi Robert > symbolic expression "i^2" is getting turned into CDF(i)^CDF(2). the i^2 should also be of type CDF, but sage: type(i^2) Georg --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, s

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
> Perhaps we should special case for (small) integer powers, but that > would slow other stuff down. What's happening here is that the > symbolic expression "i^2" is getting turned into CDF(i)^CDF(2). > Simplification happens on printing, not on construction. > > sage: CDF(simplify(i^2)) > -1.0

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Robert Bradshaw
On Dec 2, 2008, at 5:40 PM, ggrafendorfer wrote: > > Hi Michael, > >> You are using CDF == Complex Double Field, so numerical noise is >> to be >> expected. IEEE arithmetic might be fast, but you pay for that speed >> with imprecise results. It might be possible to compile without >> optimizati

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread mabshoff
On Dec 2, 5:40 pm, ggrafendorfer <[EMAIL PROTECTED]> wrote: > Hi Michael, > > > You are using CDF == Complex Double Field, so numerical noise is to be > > expected. IEEE arithmetic might be fast, but you pay for that speed > > with imprecise results. It might be possible to compile without > > o

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi Michael, > You are using CDF == Complex Double Field, so numerical noise is to be > expected. IEEE arithmetic might be fast, but you pay for that speed > with imprecise results. It might be possible to compile without > optimization and get a "correct" result in that case, but that could > cha

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread mabshoff
On Dec 2, 5:29 pm, ggrafendorfer <[EMAIL PROTECTED]> wrote: > Hi, Hi Georg, > I'm using sage 3.2 (compiled from sources) on a 32-bit Core Duo > machine running Debian Etch: > > I'm not sure if this bug, > why does > > sage: CDF(i^2) > -1.0 + 1.22460635382e-16*I > > I'm not complaining about th

[sage-support] question about the imaginary unit i ..

2008-12-02 Thread ggrafendorfer
Hi, I'm using sage 3.2 (compiled from sources) on a 32-bit Core Duo machine running Debian Etch: I'm not sure if this bug, why does sage: CDF(i^2) -1.0 + 1.22460635382e-16*I I'm not complaining about the "wrong" result, I understand the following: sage: CDF(i^2.) -1.0 + 1.22460635382e-16*I bu

[sage-support] parametric_plot3d with imaginary numbers

2008-12-02 Thread acardh
Hi, I am not sure why I am not getting the same 3D image than the one at the bottom of the next page: http://reference.wolfram.com/mathematica/ref/ParametricPlot3D.html I am using these commands: u, v = var('u,v') parametric_plot3d((u*cos(v),u*sin(v),imaginary(u*exp((I*v)^5)^(1/5))), (u,0,2), (v

[sage-support] Re: Conversion to/from polynomial?

2008-12-02 Thread Tim Lahey
Hmmm, This works: R. = PolynomialRing(QQ,"x") a = x^2 +3*x b = x^3 - x^2 - x+1 c = a/b c.partial_fraction_decomposition() (0, [-1/2/(x + 1), (3/2*x + 1/2)/(x^2 - 2*x + 1)]) So, it likely has to do with the specific a and b since in the original, a/b works (with a remainder). Note that this i

[sage-support] Re: Conversion to/from polynomial?

2008-12-02 Thread David Joyner
Yes, sage: R. = PolynomialRing(QQ,"x") sage: a = 3*x^3+x^2+x+5 sage: b = 5*x^2-3*x +1 sage: c = a/b sage: c.partial_fraction_decomposition() --- TypeError Traceback (most recent call last) ...

[sage-support] FYI............"broken web link"

2008-12-02 Thread Kevin Loranger
http://modular.math.washington.edu/sage/paper-letter/ Kevin --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups

[sage-support] Re: prevent complex numbers ?

2008-12-02 Thread Stan Schymanski
Hi Robert, On Dec 2, 5:50 am, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > Are you saying you would like to pass in a domain when creating the   > variables? Something like > > sage: var('omega', domain=RR) YES, that would be great. > > > Here is the error I found. The result given by omgo.sim

[sage-support] Conversion to/from polynomial?

2008-12-02 Thread Tim Lahey
Hi, I'm working my way through Bronstein's Symbolic Integration book and one thing I've noticed is that it appears that in Sage you can work with symbolics, or polynomials, but not both. So, if I define: x = polygen(QQ,'x') a = 3*x^3+x^2+x+5 b = 5*x^2-3*x +1 I can do, a.quo_rem(b) and all is fi

[sage-support] f(x)=abs(x); f(vector([1,2,3])) gives error

2008-12-02 Thread Scott Walck
Hello, Is there a reason why I cannot do f(x)=abs(x) f(vector([1,2,3])) Many related things work fine: abs(vector([1,2,3])) # works def f(x): return abs(x) f(vector([1,2,3])) # works Session below shows the trouble. Thanks, Scott [EMAIL PROTECTED]:~$ sage

[sage-support] Re: Ideas for Sage Notebook functionality?

2008-12-02 Thread Jason Grout
Tim Lahey wrote: > > On Dec 2, 2008, at 4:00 PM, mabshoff wrote: >> That was discussed in the "Mathematica 7" thread and the conclusion >> was that PIL (the Python image library) could do much of that >> functionality. There is no reason not to include it per default in >> Sage, but so far no one

[sage-support] Re: Ideas for Sage Notebook functionality?

2008-12-02 Thread Tim Lahey
On Dec 2, 2008, at 4:00 PM, mabshoff wrote: >> > > That was discussed in the "Mathematica 7" thread and the conclusion > was that PIL (the Python image library) could do much of that > functionality. There is no reason not to include it per default in > Sage, but so far no one has started the pro

[sage-support] Re: Ideas for Sage Notebook functionality?

2008-12-02 Thread mabshoff
On Dec 2, 12:56 pm, Tim Lahey <[EMAIL PROTECTED]> wrote: > Hi, hi Tim, > I was looking at a blog post on Mathematica's > Image Processing features, > > http://blog.wolfram.com/2008/12/01/the-incredible-convenience-of-math... > > and realized that if the notebook supported the > image input fea

[sage-support] Ideas for Sage Notebook functionality?

2008-12-02 Thread Tim Lahey
Hi, I was looking at a blog post on Mathematica's Image Processing features, http://blog.wolfram.com/2008/12/01/the-incredible-convenience-of-mathematica-image-processing/ and realized that if the notebook supported the image input feature like Mathematica, much of what's in the blog post could

[sage-support] Re: Sage install damaged my Global R configuration

2008-12-02 Thread mabshoff
On Dec 2, 8:37 am, Flavio Coelho <[EMAIL PROTECTED]> wrote: > Hi, Hi, > a recent sage installation damaged my global R installation. This might be a config issue with RHOME. What does "env | grep RHOME" return? > now, every time I try to install a package within R I get the > following error

[sage-support] Re: jsMath issue and solution with error code -7

2008-12-02 Thread Pierre
Here's a solution to my problem -- I'm pretty sure it could be useful to other people. Trying to follow the instructions above, I misinterpreted "unzip the .zip here" (i *always* get these things wrong). the way i understood it, i ended up with files like /home/ foobar/.fonts/cmr10.ttf. However,

[sage-support] Sage install damaged my Global R configuration

2008-12-02 Thread Flavio Coelho
Hi, a recent sage installation damaged my global R installation. now, every time I try to install a package within R I get the following error message: cannot open file '/home/was/build/sage-3.1.4/local/lib/R/doc/ CRAN_mirrors.csv', reason 'Ficheiro ou directoria inexistente' sage must have ch

[sage-support] Re: jsMath issue and solution with error code -7

2008-12-02 Thread mabshoff
On Dec 2, 6:55 am, dpvc <[EMAIL PROTECTED]> wrote: Hi Davide, > > I'm pretty sure we don't use the easy/load.js (and I'm not sure why). > > Probably because it didn't exist when jsMath support was added to > sage.  The easy/load.js file was a relatively late addition to jsMath, > but certain

[sage-support] Re: stock take for non-stock items for sage line 50 account plus

2008-12-02 Thread Keanes
many thanks anyways! On Dec 2, 3:18 pm, mabshoff <[EMAIL PROTECTED] dortmund.de> wrote: > On Dec 2, 7:15 am, Keanes <[EMAIL PROTECTED]> wrote: > > Hi Hi Keanes, > > > Thanks Michael for coming back to me so soon. > > > Example: > > When I click on Product icon on the tool bar and go into stock ta

[sage-support] Re: stock take for non-stock items for sage line 50 account plus

2008-12-02 Thread mabshoff
On Dec 2, 7:15 am, Keanes <[EMAIL PROTECTED]> wrote: Hi Hi Keanes, > Thanks Michael for coming back to me so soon. > > Example: > When I click on Product icon on the tool bar and go into stock take. > I type in the product code and tab, straight away, a window with > message says - options not a

[sage-support] Re: stock take for non-stock items for sage line 50 account plus

2008-12-02 Thread Keanes
Thanks Michael for coming back to me so soon. Example: When I click on Product icon on the tool bar and go into stock take. I type in the product code and tab, straight away, a window with message says - options not avaialble to items marked 'non-stock items'. I can't input the stock quantity I a

[sage-support] Re: stock take for non-stock items for sage line 50 account plus

2008-12-02 Thread mabshoff
On Dec 2, 6:56 am, Keanes <[EMAIL PROTECTED]> wrote: > Hi there, Hi Keanes, > I tried to input quantities for stock take for products set as non- > stock items and it will not allow it. At the moment, all stock level > reads minus. I would like to put the correct stock level onto sage. > How c

[sage-support] stock take for non-stock items for sage line 50 account plus

2008-12-02 Thread Keanes
Hi there, I tried to input quantities for stock take for products set as non- stock items and it will not allow it. At the moment, all stock level reads minus. I would like to put the correct stock level onto sage. How can I do so for the non-stock items? Other options would be changing the set u

[sage-support] Re: jsMath issue and solution with error code -7

2008-12-02 Thread dpvc
> We have an optional sage package for the > image fonts that is easy to install.  You're right, we decided to not > make it standard because of the size. OK, sounds good. > Currently, if the jsmath image fonts are not installed, we add the > following code to the header of the page: > > src="/

[sage-support] Re: Doc-testing cdef'd methods

2008-12-02 Thread Robert Bradshaw
On Dec 1, 2008, at 10:52 AM, Craig Citro wrote: >> Question for all: is there a good reason for writing cdef >> functions? Or >> should we make all cython functions cpdef? Python convention >> seems to >> be to expose the internals of the class, but just mark (with "_" or >> "__") the funct

[sage-support] Re: jsMath issue and solution with error code -7

2008-12-02 Thread Pierre
are you able to select "native tex fonts" in the jsmaths preferences ? i can only use "unicode fonts", they look okay but they're not the usual Tex fonts, that's for sure. On Dec 1, 5:17 pm, Jason Grout <[EMAIL PROTECTED]> wrote: > dpvc wrote: > > The real problem is not the missing fonts, but th

[sage-support] Re: Fwd: maths-staff: Help ....

2008-12-02 Thread Tim Lahey
It sounds like he wants a Digital Elevation Model (DEM) http://en.wikipedia.org/wiki/Digital_elevation_model and then be able to visualize it. This kind of thing is usually part of a Geographic Information System (GIS) http://en.wikipedia.org/wiki/GIS There is an open source GIS called GRASS

[sage-support] Fwd: maths-staff: Help ....

2008-12-02 Thread John Cremona
I don't suppose that Sage can do this? It is not clear what the input would be exactly. John Cremona -- Forwarded message -- From: Colin Rourke <[EMAIL PROTECTED]> Date: 2008/12/1 Subject: Re: maths-staff: Help To: [EMAIL PROTECTED] Hi guys A software problem. Does any