#7557: conversion of complex numbers in symbolic expressions to maxima broken
-------------------------+--------------------------------------------------
   Reporter:  burcin     |       Owner:  burcin  
       Type:  defect     |      Status:  new     
   Priority:  major      |   Milestone:  sage-4.3
  Component:  symbolics  |    Keywords:          
Work_issues:             |      Author:          
   Upstream:  N/A        |    Reviewer:          
     Merged:             |  
-------------------------+--------------------------------------------------
 Reported on sage-support:

 {{{
 var('y', domain='real')
 assume(y, 'real')

 abs(exp(y*I)).simplify()
     1

 abs(exp(1.1*y*I)).simplify()
     e^(1.1*I*y)

 The last result is incorrect. It seems simplify() doesn't like
 floating point?
 }}}

 In this thread:

 http://groups.google.com/group/sage-
 support/browse_thread/thread/c6d4c757cef8cc4a


 More evidence:

 {{{
 sage: t = abs(exp(y*I)); t
 abs(e^(I*y))
 sage: t._maxima_init_()
 'abs(exp((y)*(0+%i*1)))'

 sage: u = abs(exp(1.1*y*I)); u
 abs(e^(1.10000000000000*I*y))
 sage: u._maxima_init_()
 'abs(exp((y)*(1.1000000000000001*I)))'
 }}}

 This might be the reason:

 {{{
 sage: t.operands()[0].operands()[0].operands()[1].pyobject()
 I
 sage: type(t.operands()[0].operands()[0].operands()[1].pyobject())
 <type
 
'sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_quadratic'>

 sage: u.operands()[0].operands()[0].operands()[1].pyobject()
 1.10000000000000*I
 sage: type(u.operands()[0].operands()[0].operands()[1].pyobject())
 <type 'sage.rings.complex_number.ComplexNumber'>
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7557>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--

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