Added simplify and differentiation tests
This commit is contained in:
parent
89b76ab261
commit
72c8b3d1c5
4 changed files with 37 additions and 2 deletions
18
eo/contrib/mathsym/test/test_simplify.cpp
Normal file
18
eo/contrib/mathsym/test/test_simplify.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
#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;
|
||||
|
||||
}
|
||||
|
||||
Reference in a new issue