[GiNaC-list] Fwd: GiNaC error when trying to evaluate sin(x)^2 expression

Vladimir V. Kisil kisilv at maths.leeds.ac.uk
Sun Dec 22 23:36:31 CET 2013

>>>>> On Sat, 21 Dec 2013 18:59:08 +0000, José Pontes <pontesjpc at gmail.com> said:

    JP> symbol x;
    JP> ex exTest = sin(x)*sin(x);
    JP> exmap map;
    JP> map[x] = 1.0;
    JP> cout << exTest.subs(map) << endl;

    I tried your code and get the answer


  The same output come out if the last line is written as:

cout << exTest.subs(x==1.0) << endl;

  I am using GiNaC v.1.6.2 and cln v1.3.3 on Debian unstable Linux.

  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