RC
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2710 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
6f384f4a59
commit
e3a610506b
1731 changed files with 105122 additions and 63920 deletions
21
branches/rc2.0/eo/contrib/mathsym/test/test_simplify.cpp
Normal file
21
branches/rc2.0/eo/contrib/mathsym/test/test_simplify.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
#include <FunDef.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
|
||||
Sym c1 = SymConst(0.4);
|
||||
Sym c2 = SymConst(0.3);
|
||||
Sym v1 = SymVar(0);
|
||||
|
||||
Sym expr = (c1 + c2) * ( (c1 + c2) * v1);
|
||||
|
||||
cout << expr << endl;
|
||||
cout << simplify(expr) << endl;
|
||||
|
||||
Sym dv = differentiate( exp(expr) , v1.token());
|
||||
cout << dv << endl;
|
||||
cout << simplify(dv) << endl;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue