Added simplify and differentiation tests
This commit is contained in:
parent
89b76ab261
commit
72c8b3d1c5
4 changed files with 37 additions and 2 deletions
17
eo/contrib/mathsym/test/test_diff.cpp
Normal file
17
eo/contrib/mathsym/test/test_diff.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include <Sym.h>
|
||||
#include <FunDef.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
|
||||
Sym v = SymConst(1.2);
|
||||
|
||||
Sym g = exp(-sqr(v));
|
||||
|
||||
cout << g << endl;
|
||||
cout << differentiate(g, v.token()) << endl;
|
||||
|
||||
}
|
||||
|
||||
Reference in a new issue