Open videlec opened 6 years ago
Thanks for reporting these. I guess it should be possible to bisect to find the specific commits where the enclosures got larger?
On the arb development branch (https://github.com/fredrik-johansson/arb/commit/512ada96748dc64d29b8113e80d60f78a528c3f6), for these four examples with prec=53
and printing with digits=13
I see
(0.7871684267473 + 0.2749254173721j) +/- (6.38e-14, 4.54e-14j)
(0.4441122268685 + 0.1551100567338j) +/- (3.59e-14, 2.55e-14j)
(0.08984375 + 0j) +/- (7.29e-17, 0j)
(-83825154.36008 - 34721515.80396j) +/- (2.2e-06, 2.02e-06j)
indicating that the enclosures of the first, second, and fourth examples have tightened since 2.12 and 2.13, but that the enclosure for the third example is still regressed to its 2.12 state.
I didn't do a git bisection search for the commit responsible for the regression, but if arb_hypgeom/legendre_p_ui_rec.c in the development branch is replaced with https://github.com/fredrik-johansson/arb/blob/0021661d618a7d392db8a7292230c593d849b59b/arb_hypgeom/legendre_p_ui_rec.c then I recover the interval
(0.08984375 + 0j) +/- (4.55e-18, 0j)
reported by the original poster for 2.12, and if I replace that file with https://github.com/fredrik-johansson/arb/blob/3959e07b5a4caf4673e9304f3fa1273c2f4d726e/arb_hypgeom/legendre_p_ui_rec.c then I get back the interval
(0.08984375 + 0j) +/- (7.29e-17, 0j)
reported for 2.13 and for the development branch, suggesting that the commit https://github.com/fredrik-johansson/arb/commit/3959e07b5a4caf4673e9304f3fa1273c2f4d726e was likely responsible. I tried to git checkout
old commits but they didn't build because of the since-fixed "-r and -pie may not be used together" issue.
The enclosures have tightened because some code improved significantly, but it's possible that the problem that caused the initial small regression is still present somewhere else. It would be nice to track it down, though I don't think it's a high priority. (Things like #153 are more important.)
The specific regression for Legendre polynomials is not much of an issue. We could perhaps increase the number of guard bits again if benchmarking shows that there is no slowdown for G-L nodes. Here we could also improve things further by making evaluation of Legendre polynomials exact at exact floating-point constants (again, ideally without slowdown). Basic idea: inspect the exponent and bit length of x and do some quick test to see if the numerator and denominator of P_n(x) would both be smaller than 2^(2*prec). In that case use an exact version of the basecase recurrence or hypergeometric series.
While moving to arb 2.13.0 in Sage (see upstream ticket #24927) I noted the following enclosure regressions