Hi Andrius, On Sat, 22 Nov 2003, Andrius Kurtinaitis wrote:
it appears that the GiNaC expressions do not support the complex conjugation... :-( I need it,
It would be helpful (for us and yourself, probably) to quickly whip up a list of what exactly you want to do with the conjugation. On numeric types it's clear. On polynomials, there wouldn't be much you can do, probably, because you cannot just stick assumptions on free symbols. On other functions without any free symbols involved, what would you expect? Would you expect a transformation like this one being performed by the evaluator? conjugate(sin(2)) -> sin(2) Oops! Knowledge about sin() would be needed...
but I do not know yet how to implement it.
Maybe the best approach would be as an ordinary pseudofunction just like abs() or csgn(). If you want transformations like the above you would have to hand up information like "I am real" or "I am purely imaginary" from inner pseudofunctions to their outer wrapping pseudofunction. You would have to implement that as well, since it's not there yet. For simple cases this isn't very difficult.
Has anybody tried to do this? Clearly conjugation is a function ;-) Ok, i'll try to read the tutorial. Let's see if I get this working...
Luck -richy. -- Richard B. Kreckel <Richard.Kreckel@GiNaC.DE> <http://www.ginac.de/~kreckel/>