Hi Adh, On Sat, Jan 19, 2008 at 03:20:36PM -0800, [EMAIL PROTECTED] wrote: > > In [15]: x, y, z = symbols('xyz', real=True) > > In [16]: exp(I*x).expand(complex=True) > Out[16]: I*sin(x) + cos(x) > > In [17]: re(_) > Out[17]: re(cos(x)) > > In [18]: im(__) > Out[18]: im(cos(x)) + sin(x) > > Obviously the output should have been cos(x) and sin(x) respectively.
Thanks for reporting it! > I created an issuse for this > http://code.google.com/p/sympy/issues/detail?id=644 Replied there. Basicaly your patch is ok and welcomed, but could you please write tests? > Adding simple _eval_is_real for cos, tan, cot, atan, acot works but > for asin and acos, the domain is [-1,1]. I am wondering if SymPy > currently features assumption to limit a variable's range just as we > can assume it to be real, so that a variable x can be defined as real > in the range [-1,1]. At present, no. However, some time ago, there was an idea to base assumption model on intervals: http://code.google.com/p/sympy/issues/detail?id=398 -- Всего хорошего, Кирилл. http://landau.phys.spbu.ru/~kirr/aiv/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---