complex conjugation
chrisd at sci.kun.nl
chrisd at sci.kun.nl
Sun Nov 23 00:55:43 CET 2003
Hello,
On Sat, 22 Nov 2003, Richard B. Kreckel wrote:
> 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.
I would just assume that all symbols are real. If a user then wants
complex ones, he can have additionally a list looking like
{a==astar,astar==a,b==bstar,bstar==b}
and do something like
conjugate(x).subs(symbolconjs)
if he wants conjugation.
> 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...
I would say that the default behaviour of functions should be
conjugate(f(arg)) --> f(conjugate(arg)). Then there should be a new
function option to specify a different behaviour for your particular
function. I was wondering a bit about what to do with the log. For that
function the default behaviour is okay, except for the real negative axis.
I would say that just bluntly using the default behaviour, ignoring
possible problems, would be best.
>
> > but I do not know yet how to implement it.
>
Bye,
Chris Dams
More information about the GiNaC-list
mailing list