[GiNaC-list] Multiplication of Boolean variables

tklam argama at gmail.com
Sun Aug 25 18:15:45 CEST 2013


I am implementing an arithmetic system for only Boolean variables based on
GiNaC. May I know how I can
modify the behaviour of symbolic multiplication such that: x*x == x
(instead of x*x==x^2), and the multiplication of numeric remains unchanged
(eg 3*4 == 12) ?

Using subs(x^2 == x) works but I found it is slow if my expressions are
huge and there are many symbols.

Thank you very much.

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20130826/5ba7cce8/attachment.html>

More information about the GiNaC-list mailing list