From: Jens Vollinga Date: Wed, 12 Oct 2005 18:05:03 +0000 (+0000) Subject: Changed the conditions for the application of the (1-x)/(1+x) transformation, X-Git-Tag: release_1-4-0~147 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=270969d036bd27a8454442501f8eb241fa66c9b2 Changed the conditions for the application of the (1-x)/(1+x) transformation, which caused an endless recursion for certain arguments around +-I. --- diff --git a/ginac/inifcns_nstdsums.cpp b/ginac/inifcns_nstdsums.cpp index 3920bf9e..88f0fa4e 100644 --- a/ginac/inifcns_nstdsums.cpp +++ b/ginac/inifcns_nstdsums.cpp @@ -2839,10 +2839,16 @@ static ex H_evalf(const ex& x1, const ex& x2) } } - // since the transformations produce a lot of terms, they are only efficient for - // argument near one. - // no transformation needed -> do summation - if (cln::abs(x) < 0.95) { + // check for the applicability of transformations + // + // first condition: since the transformations produce a lot of terms, + // they are only efficient for argument near the boundary |x| = 1, then no + // transformation is needed + // second condition: veto for region around +-I to avoid endless recursion + // with the (1-x)/(1+x) transformation. 1.198 is sqrt(1.4142) is the + // boundary of the problematic transformation. + // + if (cln::abs(x) < 0.95 || (cln::abs(x) < 1 && cln::abs(x-1) >= 1.198)) { lst m_lst; lst s_lst; ex pf;