[GiNaC-list] Multiplication of Boolean variables

Vladimir V. Kisil kisilv at maths.leeds.ac.uk
Sat Aug 31 23:16:32 CEST 2013


>>>>> On Mon, 26 Aug 2013 00:15:45 +0800, tklam <argama at gmail.com> said:
    tklam> behaviour of symbolic multiplication such that: x*x == x
    tklam> (instead of x*x==x^2),

    The nearest solution I can propose, is to define a new function
  bool() of one variable and use, say,  bool(x) and bool(y) instead of
  your Boolean variables x and y. 

  The point is: for a function you have possibility to define
  its own behaviour under exponentiation, in particular,

  Best wishes,
Vladimir V. Kisil     email: kisilv at maths.leeds.ac.uk
                        www: http://www.maths.leeds.ac.uk/~kisilv/
Book: Geometry of Mobius Transformations

More information about the GiNaC-list mailing list