simon-git: spigot (master): Simon Tatham
Commits to Tartarus CVS repository.
tartarus-commits at lists.tartarus.org
Mon Nov 9 20:12:05 GMT 2015
TL;DR:
b535eb0 Complete re-fix of cfrac multiple-term output.
41dede0 New function: the (real-valued) Riemann zeta function!
Repository: git://git.tartarus.org/simon/spigot.git
On the web: http://tartarus.org/~simon-git/gitweb/?p=spigot.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2015-11-09 20:12:05
commit b535eb0f4896c7635aec66d8eda0c2cb15403d2e
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=b535eb0f4896c7635aec66d8eda0c2cb15403d2e;hp=e831d185bdb21fe4f439053f69d0c35141cdb426
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Nov 9 20:08:33 2015 +0000
Complete re-fix of cfrac multiple-term output.
Commit e831d185b was almost entirely misguided: the idea of setting
and clearing a 'refine' flag was OK, but I'd got completely wrong the
places to set and clear it, not least because one of the
iterate_to_bounds loops was nested inside another, so the inner one
left 'refine' in an unhelpful state the next time we went round the
outer.
The right thing, I now think, is not to clear the 'refine' flag before
starting a loop. Instead, we set 'refine' immediately after any call
to iterate_to_bounds, on the basis that unless we got some useful
progress out of the return value we'll need to force further
refinement the next time we call it; then we start examining the
results, and we clear the refine flag if and only if we conclude that
_progress has been made_ as a result. So if we get all the way back
round to any iterate_to_bounds call with the flag still set, that
means we got nothing useful from the last call.
cfracout.cpp | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
commit 41dede0782fff64ab687547aa462b88432bbe69e
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=41dede0782fff64ab687547aa462b88432bbe69e;hp=b535eb0f4896c7635aec66d8eda0c2cb15403d2e
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Nov 9 20:08:33 2015 +0000
New function: the (real-valued) Riemann zeta function!
I mentioned in commit 3dc07d936 that I thought this was probably out
of reach of spigot's techniques, but in fact Tom Womack helpfully
pointed me to a paper (citation in the new zeta.cpp) containing a more
or less practical way to compute it. In particular, it works on both
sides of the singularity, allowing us to numerically confirm the
famous result that zeta(-1) = -1/12 (often overblown as saying that
1+2+3+4+5+... = -1/12).
As part of the error analysis I needed, I've written a small and not
very complete class for interval arithmetic on bigints. I could move
that out somewhere more central if any other module needed it, but if
I do that, I'll probably need to write a bit more of it first...
Makefile.am | 6 +-
expr.cpp | 1 +
funcs.h | 3 +
manpage.but | 4 +
manual.but | 7 ++
test.sh | 18 +++
zeta.cpp | 352 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 388 insertions(+), 3 deletions(-)
More information about the tartarus-commits
mailing list