GiNaC-0.7.0

Christian Bauer cbauer at student.physik.uni-mainz.de
Fri Jan 12 15:46:15 CET 2001


Hi!

On Sat, Jan 06, 2001 at 03:45:36PM +0200, Eugene Gorshkov wrote:
> When I'm entering command like this:
> > normal(a^b*a^c, 2);
> in ginsh or simple c++ code, GiNaC stops to work or exits by
> Segmentation fault (there is no output).

This is fixed now in CVS (meaning it doesn't crash any more). But "normal()"
only works on rational functions and it will leave expressions such as those
above unmodified. BTW, the second parameter to normal() can usually be
omitted; it will normalize the whole expression then.

> But I need a^(b+c)!

I don't think that there's currently a way to do this with GiNaC (i.e. it
doesn't do a^b*a^c -> a^(b+c)). Theoretically, you should be able to
expand(a^(b+c)) and get a^b*a^c but this doesn't seem to be implemented yet.
I will have a look at this.

> 1. If I need to normalize expression (a+b)^2 and result must be
> a^2+b^2+2*a*b.
> Have I need to call only normal() method or expand() also?

expand() is what you want here. normal() leaves this expression as it is.
For a more detailed explanation of what normal() does and what it doesn't,
see the GiNaC tutorial (section "Rational Expressions").

> 2. Do you planning to include some simple operations with
> vectors in GiNaC?

Yes.

> Also, I'd like to help you in extending GiNaC.

Any help is greatly appreciated.

Bye,
Christian

-- 
  / Coding on PowerPC and proud of it
\/ http://www.uni-mainz.de/~bauec002/



More information about the GiNaC-devel mailing list