From 39eceef41403ae77569110626f1fc957243228b7 Mon Sep 17 00:00:00 2001 From: Stefan Weinzierl Date: Wed, 12 Dec 2018 22:53:12 +0100 Subject: [PATCH] G_do_hoelder: fix case with real x values which are not of type cl_R. In CLN, a complex number of type cl_N with vanishing imaginary part is not necessarily a real number of type cl_R. This bug has been reported by T. Huber. --- ginac/inifcns_nstdsums.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ginac/inifcns_nstdsums.cpp b/ginac/inifcns_nstdsums.cpp index c39bfb7c..ce6ceb19 100644 --- a/ginac/inifcns_nstdsums.cpp +++ b/ginac/inifcns_nstdsums.cpp @@ -1006,7 +1006,7 @@ 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) { + if (imagpart(x[j-1])==0 && realpart(x[j-1]) >= 1) { qlsts.push_back(1); } else { qlsts.push_back(-s[j-1]); -- 2.46.1