Adding another infix operator?(programing)

Christian Bauer cbauer at
Thu Mar 21 17:35:17 CET 2002


On Wed, Mar 20, 2002 at 01:49:50PM -0800, Mark Stankus wrote:
> Is it possible/easy/hard to add a "**" infix operator to ginac?

Impossible because you can't define new operators in C++ (only overload
existing ones). Besides, noncommutativity in GiNaC is a property of the
objects, and the ordinary '*' operator is used for both commutative and
noncommutative products (that's handled automatically). Symbols are
commutative by default, but you can subclass your own, noncommutative

For more information, see the GiNaC tutorial, section "Non-commutative


  / Coding on PowerPC and proud of it

More information about the GiNaC-list mailing list