X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=cint%2Fexam_mansamples.cpp;h=b38122b529e04223f7e2542818831f98f5a28802;hp=6f1b404eec026aaa5ff2662335908b247ad6874b;hb=f54584fc4f72d28a070c26981a98fa34919ca455;hpb=0a0378c1130848c226a8ae496a336a6430a80deb diff --git a/cint/exam_mansamples.cpp b/cint/exam_mansamples.cpp index 6f1b404e..b38122b5 100755 --- a/cint/exam_mansamples.cpp +++ b/cint/exam_mansamples.cpp @@ -2,29 +2,29 @@ unsigned result = 0; symbol x("x"), y("y"), z("z"); { - 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()) { - ++result; - } - if (!(s.normal()-(-2+x)/(1+x)).is_zero()) { - ++result; - } + 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()) { + ++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); + symbol xi; + const ex generator = pow(cosh(xi),-1); + return generator.diff(xi,n).subs(xi==0); } if (EulerNumber(42) != numeric("-10364622733519612119397957304745185976310201")) { - ++result; + ++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; + ++result; } exit(result);