ex a = pow(x,2)-x-2;
ex b = pow(x+1,2);
ex s = a/b;
- if (!(s.diff(x)-2*pow(1+x,-3)*(-2-x+pow(x,2))-(-1+2*x)*pow(1+x,-2)).is_zero()) {
+ if (!(s.diff(x)+2/pow(1+x,3)*(-2-x+pow(x,2))-(-1+2*x)/pow(1+x,2)).is_zero()) {
++result;
}
if (!(s.normal()-(-2+x)/(1+x)).is_zero()) {
++result;
}
}
+//GiNaC-cint.function
+ex EulerNumber(unsigned n)
+{
+ symbol xi;
+ const ex generator = pow(cosh(xi),-1);
+ return generator.diff(xi,n).subs(xi==0);
+}
+if (EulerNumber(42) != ex(numeric("-10364622733519612119397957304745185976310201"))) {
+ ++result;
+}
+ex f = expand((x*y*z-1)*(x*y*z+3));
+ex g = expand((x*y*z-1)*(x*y*z-3));
+if (gcd(f, g) != x*y*z-1) {
+ ++result;
+}
exit(result);
#include "G__ci.h" /* G__atpause is defined in G__ci.h */
-#if (!defined(G__CINTVERSION)) || (G__CINTVERSION < 501438)
-#error You need at least cint 5.14.38 to compile GiNaC-cint. Download it via http from root.cern.ch/root/Cint.html or via ftp from ftpthep.physik.uni-mainz.de/pub/cint
+#if (!defined(G__CINTVERSION)) || (G__CINTVERSION < 501439)
+#error You need at least cint 5.14.39 to compile GiNaC-cint. Download it via http from root.cern.ch/root/Cint.html or via ftp from ftpthep.physik.uni-mainz.de/pub/cint
#endif // (!defined(G__CINTVERSION)) || (G__CINTVERSION < 501438)
#include <iostream>
char * process_permanentfile(string const & command)
{
char *tmpfilename = tempnam(NULL,"ginac");
- cout << "creating file " << tmpfilename << endl;
+ if (!silent)
+ cout << "creating file " << tmpfilename << endl;
ofstream fout;
fout.open(tmpfilename);
fout << command << endl;
<< " (__) * | Germany. Cint C/C++ interpreter: (C) 1995-2000 Masaharu\n"
<< " ._) i N a C | Goto and Agilent Technologies, Japan. This is free software\n"
<< "<-------------' with ABSOLUTELY NO WARRANTY. For details, type `.warranty'\n"
- << "Type .help for help.\n\n";
+ << "Type `.help' for help.\n\n";
return;
}
void cleanup(void)
{
for (cplist::iterator it=filenames.begin(); it!=filenames.end(); ++it) {
- cout << "removing file " << *it << endl;
+ if (!silent)
+ cout << "removing file " << *it << endl;
remove(*it);
free(*it);
}
(is_command(command,preprocessed,"q"))) {
quit = true;
} else if (is_command(command,preprocessed,"function")) {
- cout << "next expression can be a function definition" << endl;
+ if (!silent)
+ cout << "next expression can be a function definition" << endl;
next_command_is_function = true;
} else if (is_command(command,preprocessed,"cint")) {
cout << endl << "switching to cint interactive mode" << endl;