[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
Hi,
>>>>> 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
0.70807341827357119353
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
--
Vladimir V. Kisil email: kisilv at maths.leeds.ac.uk
www: http://www.maths.leeds.ac.uk/~kisilv/
Book: Geometry of Mobius Transformations
http://www.worldscientific.com/worldscibooks/10.1142/p835
More information about the GiNaC-list
mailing list