#4630: bug in functions real() and imag().
------------------------------+---------------------------------------------
 Reporter:  ggrafendorfer     |       Owner:  somebody  
     Type:  defect            |      Status:  new       
 Priority:  major             |   Milestone:  sage-3.2.1
Component:  basic arithmetic  |    Keywords:            
------------------------------+---------------------------------------------
 Using sage-3.2 (compiled with make), but the same behaviour also happens
 on sage-3.1.4,
 OS:Debian on a 32-bit Core-Duo machine,

 the examples where I use 'a' as variable work well,
 the examples where I use 'b' as variable ('I' is substituted by 'CDF(I)')
 are buggy:

 {{{
 [EMAIL PROTECTED]:~/Daten/Sync/Phd/Code/sde$ sage
 ----------------------------------------------------------------------
 | Sage Version 3.2, Release Date: 2008-11-20                         |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------

 sage: a = exp(I*0.2*pi); a; type(a); real(a); real(a).n()
 e^(0.200000000000000*I*pi)
 <class 'sage.calculus.calculus.SymbolicComposition'>
 cos(0.200000000000000*pi)
 0.809016994374947
 sage: b = exp(CDF(I)*0.2*pi); b; type(b); real(b); real(b).n()
 e^(0.200000000000000*pi*I)
 <class 'sage.calculus.calculus.SymbolicComposition'>
 e^(0.200000000000000*pi*I)
 0.809016994374947 + 0.587785252292473*I
 sage: a = exp(I*0.2*pi); a; type(a); imag(a); imag(a).n()
 e^(0.200000000000000*I*pi)
 <class 'sage.calculus.calculus.SymbolicComposition'>
 sin(0.200000000000000*pi)
 0.587785252292473
 sage: b = exp(CDF(I)*0.2*pi); b; type(b); imag(b); imag(b).n()
 e^(0.200000000000000*pi*I)
 <class 'sage.calculus.calculus.SymbolicComposition'>
 0
 0.000000000000000
 sage: n(exp(CDF(I)*0.2*pi))
 0.809016994374947 + 0.587785252292473*I
 }}}

 Georg

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4630>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to