every atom is complex?



Am Dienstag, den 30.11.2010, 12:29 -0800 schrieb Valery Pipin:

> > There might be another change, which is responsible for a different
> > behavior of your code. Can you show more examples.
> > 
> That is right. I think the behaviour for tensors was changed
> take, e.g.,
> realpart(EH([],[])*B([],[%1],%3)*dlt([],[%2,%3])*G([],[%4])*V([%1],[],
> %2)*G([%4],[])*em);
> Everything is supposed to real here.

Yes, with revision 1.21 of rpart.lisp im May 2009 (that is between
Maxima 5.18 and Maxima 5.19) functions no longer are real by default:

(%i2) rectform(f(x));
(%o2) 'realpart(f(x))+%i*'imagpart(f(x))

(%i3) declare(f,real);
(%o3) done

(%i4) rectform(f(x));
(%o4) f(x)

I think, we had a discussion about this. This change was part of an
attempt to get a more consistent handling of complex expressions in
Maxima. At the moment I do not oversee all consequences, when we change
this behavior again.

All expressions of your example looks like functions for the code in
rpart.

A solution might be to introduce a global switch to control the behavior
of rectform. This is easy to implement and might be part of the next
release.

Another solution might be to introduce a property 'tensor and to handle
these objects different in rpart. But we get the same result when
declaring all tensor objects to be real.

Dieter Kaiser