Bug fix in the routine H_evalf (a minus sign should not be forgotten). master
authorStefan Weinzierl <weinzierl@uni-mainz.de>
Wed, 9 Jun 2021 12:10:23 +0000 (14:10 +0200)
committerStefan Weinzierl <weinzierl@uni-mainz.de>
Wed, 9 Jun 2021 12:10:23 +0000 (14:10 +0200)
This bug was reported by Bin Zhou.

ginac/inifcns_nstdsums.cpp

index c6f5012afbab8da2305854cec7094d340b8540a9..51ba0641447ef7e33682818cb22beafdeeb9e6ce 100644 (file)
@@ -3318,7 +3318,9 @@ static ex H_evalf(const ex& x1, const ex& x2)
                        // x -> 1-x
                        if (has_minus_one) {
                                map_trafo_H_convert_to_Li filter;
-                               return filter(H(m, numeric(x)).hold()).evalf();
+                                // 09.06.2021: bug fix: don't forget a possible minus sign from the case realpart(x) < 0
+                               res *= filter(H(m, numeric(x)).hold()).evalf();
+                               return res;
                        }
                        map_trafo_H_1mx trafo;
                        res *= trafo(H(m, xtemp).hold());