]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns_nstdsums.cpp
Added complex conjugation methods and GiNaC function "conjugate".
[ginac.git] / ginac / inifcns_nstdsums.cpp
index 4fe91ad391eeb7f41e40362c7fa67223339da3a6..55520e340c25d408e39fca3969c613f0c7658800 100644 (file)
@@ -2033,25 +2033,25 @@ static ex H_eval(const ex& m_, const ex& x)
        if ((x == _ex1) && (*(--m.end()) != _ex0)) {
                return convert_H_to_zeta(m);
        }
-//     if (step == 0) {
-//             if (pos1 == _ex0) {
-//                     // all zero
-//                     if (x == _ex0) {
-//                             return H(m_, x).hold();
-//                     }
-//                     return pow(log(x), m.nops()) / factorial(m.nops());
-//             } else {
-//                     // all (minus) one
-//                     return pow(-pos1*log(1-pos1*x), m.nops()) / factorial(m.nops());
-//             }
-//     } else if ((step == 1) && (pos1 == _ex0)){
-//             // convertible to S
-//             if (pos2 == _ex1) {
-//                     return S(n, p, x);
-//             } else {
-//                     return pow(-1, p) * S(n, p, -x);
-//             }
-//     }
+       if (step == 0) {
+               if (pos1 == _ex0) {
+                       // all zero
+                       if (x == _ex0) {
+                               return H(m_, x).hold();
+                       }
+                       return pow(log(x), m.nops()) / factorial(m.nops());
+               } else {
+                       // all (minus) one
+                       return pow(-pos1*log(1-pos1*x), m.nops()) / factorial(m.nops());
+               }
+       } else if ((step == 1) && (pos1 == _ex0)){
+               // convertible to S
+               if (pos2 == _ex1) {
+                       return S(n, p, x);
+               } else {
+                       return pow(-1, p) * S(n, p, -x);
+               }
+       }
        if (x == _ex0) {
                return _ex0;
        }