*/
/*
- * GiNaC Copyright (C) 1999-2016 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2018 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// the switching point was empirically determined. the optimal point
// depends on hardware, Digits, ... so an approx value is okay.
// it solves also the problem with precision due to the u=-log(1-x) transformation
- if (cln::abs(cln::realpart(x)) < 0.25) {
-
+ if (cln::abs(x) < 0.25) {
return Li2_do_sum(x);
} else {
+ // Li2_do_sum practically doesn't converge near x == ±I
return Li2_do_sum_Xn(x);
}
} else {
if (cln::realpart(x) < 0.5) {
// choose the faster algorithm
// with n>=12 the "normal" summation always wins against the method with Xn
- if ((cln::abs(cln::realpart(x)) < 0.3) || (n >= 12)) {
+ if ((cln::abs(x) < 0.3) || (n >= 12)) {
return Lin_do_sum(n, x);
} else {
+ // Li2_do_sum practically doesn't converge near x == ±I
return Lin_do_sum_Xn(n, x);
}
} else {