SyFi  0.3
simple.cpp
Go to the documentation of this file.
00001 #include <SyFi.h>
00002 
00003 using namespace GiNaC; 
00004 using namespace SyFi; 
00005 using namespace std; 
00006 
00007 int main() {
00008     ex pi = 3.14; 
00009     cout <<"pi="<<pi<<endl; 
00010     ex x = symbol("x"); 
00011     cout <<"x="<<x<<endl; 
00012     ex f = cos(x); 
00013     cout <<"f="<<f<<endl; 
00014     ex list = lst(pi,x,f); 
00015     cout <<"list="<<list<<endl; 
00016 
00017     lst list2 = lst(pi,x,f); 
00018     cout <<"list="<<lst2string(list2)<<endl; 
00019 
00020     for (unsigned int i=0; i< list.nops(); i++) {
00021         cout <<"item "<<i+1<<" = "<<list[i]<<endl; 
00022     }
00023 
00024     return 0; 
00025 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator