invalid expression in content|unit|...()

Pearu Peterson pearu at cens.ioc.ee
Thu Nov 22 18:36:51 CET 2001



On Thu, 22 Nov 2001, Christian Bauer wrote:

> On Thu, Nov 22, 2001 at 03:21:30PM +0200, Pearu Peterson wrote:
> >   content(a*c,a)        -> exception 'invalid expression in unit()' ?!
<snip>
 
> Seeing that a constant is just a global symbol with a special evalf()
> behavior, maybe these two classes should be integrated better...

Indeed, while wrapping GiNaC to Python, I also noticed that this is the
only relevant difference. That is, in addition diff(<constant>) returns
always 0.

I went ahead and derived constant from symbol. It was quite simple, I just
had to remove some constant methods that were almost identical with the
corresponding methods in symbol (there were some stylistic differences).
Right now I am running checks, and if they pass, I will send patches if
you are interested in. Currently it looks like with these changes
GiNaC will be also backward compatible.

Pearu




More information about the GiNaC-devel mailing list