summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6304288)
Make sure G_numeric makes use of scaling relation (G_do_hoelder) only if
there are no traling zeros. Use G_do_trafo otherwise (which can handle
trailing zeros).
// check for convergence and necessary accelerations
bool need_trafo = false;
bool need_hoelder = false;
// check for convergence and necessary accelerations
bool need_trafo = false;
bool need_hoelder = false;
+ bool have_trailing_zero = false;
std::size_t depth = 0;
for (std::size_t i = 0; i < x.size(); ++i) {
if (!zerop(x[i])) {
std::size_t depth = 0;
for (std::size_t i = 0; i < x.size(); ++i) {
if (!zerop(x[i])) {
- if (zerop(x[x.size() - 1]))
+ if (zerop(x[x.size() - 1])) {
+ have_trailing_zero = true;
if (depth == 1 && x.size() == 2 && !need_trafo)
return - Li_projection(2, y/x[1], cln::float_format(Digits));
// do acceleration transformation (hoelder convolution [BBB])
if (depth == 1 && x.size() == 2 && !need_trafo)
return - Li_projection(2, y/x[1], cln::float_format(Digits));
// do acceleration transformation (hoelder convolution [BBB])
+ if (need_hoelder && !have_trailing_zero)
return G_do_hoelder(x, s, y);
// convergence transformation
return G_do_hoelder(x, s, y);
// convergence transformation