[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: 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] 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