From d023220cece92637c3e55051f127650f2131de44 Mon Sep 17 00:00:00 2001 From: Stefan Weinzierl Date: Sat, 12 Apr 2014 14:32:20 +0300 Subject: [PATCH] G_do_hoelder: fix the transformation of the imaginary part. The G_do_hoelder function transforms the arguments as z -> 1-z. If z has an imaginary part, the sign of the imagniary part transforms as s -> -s. In the special case where z is real and > 1, the transformed value is real and < 0. For (transformed) real negative values of z the sign of the imaginary part is not relevant (there are no branch cuts). The code requires that in this case the sign takes the default value +1. This is now fixed. --- ginac/inifcns_nstdsums.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ginac/inifcns_nstdsums.cpp b/ginac/inifcns_nstdsums.cpp index 62c6c62f..9f1e2cf0 100644 --- a/ginac/inifcns_nstdsums.cpp +++ b/ginac/inifcns_nstdsums.cpp @@ -1020,9 +1020,8 @@ G_do_hoelder(std::vector x, /* yes, it's passed by value */ std::vector qlsts; for (std::size_t j = r; j >= 1; --j) { qlstx.push_back(cln::cl_N(1) - x[j-1]); - if (instanceof(x[j-1], cln::cl_R_ring) && - realpart(x[j-1]) > 1 && realpart(x[j-1]) <= 2) { - qlsts.push_back(s[j-1]); + if (instanceof(x[j-1], cln::cl_R_ring) && realpart(x[j-1]) > 1) { + qlsts.push_back(1); } else { qlsts.push_back(-s[j-1]); } -- 2.44.0