[GiNaC-list] Automatic transformation of expressions in GiNaC
abpetrov
abpetrov at ufacom.ru
Wed Jan 11 20:30:54 CET 2017
Hello,
I wrote some program to do some calculations
with GiNaC. But I can see program makes some unwanted transformations
of expressions automatically. Below is simple example. Can I avoid that
transformations?
Wanted output is sqrt(m/2).
Best regards Petrov A.B.
--------------------------------------------------------------------
Output for program:
Starting: ./test2
1/2*sqrt(2)*sqrt(m)
*** Exited normally ***
------------------------------------------------------------------
Program:
#include <iostream>
using namespace std;
#include<ginac/ginac.h>
using namespace GiNaC;
void calc_example(){
possymbol m("m");
ex e = sqrt(m/2);
cout << e << endl;
}
int main(int argc, char** argv)
{
calc_example();
return 0;
}
More information about the GiNaC-list
mailing list