simon-git: spigot (master): Simon Tatham
Commits to Tartarus CVS repository.
tartarus-commits at lists.tartarus.org
Sat Apr 18 14:28:13 BST 2015
TL;DR:
98e611f Deferred enforcement of range checks.
2fcb4ed Explicitly specify direction in spigot_monotone_invert.
28292a6 Add a special case for the lower bound when computing Wn.
0ecb941 Document the exactness hazard in W/Wn as fixed.
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-04-18 14:28:13
commit 98e611f3e275cdea54f296a77b60954a445fcb03
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=98e611f3e275cdea54f296a77b60954a445fcb03;hp=5c034ab778c16b6cbfe319f9a7dbf9b1bccd2571
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Dec 31 10:59:44 2014 +0000
Deferred enforcement of range checks.
The range check against -1/e in lambertw.cpp is unusual for having an
irrational bound, and therefore introducing an exactness hazard during
the bounds check if the input value is exactly -1/e. Fixed by
introducing a new 'spigot_enforce' wrapper, which acts as the identity
function on its input number, but also continues to check it against a
provided bound as more detail is computed, and throws an exception
later in computation if the bound turns out to be violated.
This doesn't fix the exactness hazard in W(-1/e) by itself; there's a
second hazard at the same place, which I'll fix next.
Makefile.am | 4 +--
enforce.cpp | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
error.h | 14 ++++++++++
lambertw.cpp | 28 +++++++++++++++++--
python/setup.py | 1 +
5 files changed, 123 insertions(+), 4 deletions(-)
commit 2fcb4ed156fe756542da2719b9b8fa2110c5de08
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=2fcb4ed156fe756542da2719b9b8fa2110c5de08;hp=98e611f3e275cdea54f296a77b60954a445fcb03
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Apr 18 14:17:37 2015 +0100
Explicitly specify direction in spigot_monotone_invert.
Sometimes the output value of spigot_monotone_invert turns out to be
_at_ one of the endpoints, in which case the initial sign check that
expected f(x)-t to have opposite signs at the endpoints would have
caused an exactness hazard.
That sign check was pure laziness on my part, so that callers of
spigot_monotone_invert wouldn't have to deduce from theory whether
their function was increasing or decreasing. Now they do have to say
that (which isn't hard anyway), so spigot_monotone_invert can lose
that initial hazardous sign test. (They now also have to provide their
interval bounds in the right order, but that's less vital.)
As a result, W(-1/e) is now no longer an exactness hazard, although
Wn(-1/e) still is (for yet a third reason).
erf.cpp | 3 ++-
funcs.h | 2 +-
lambertw.cpp | 6 +++---
monotone.cpp | 45 +++++++++++++++++++--------------------------
test.sh | 1 +
5 files changed, 26 insertions(+), 31 deletions(-)
commit 28292a6f1297a5e46a3297cfe128aaab39726a1c
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=28292a6f1297a5e46a3297cfe128aaab39726a1c;hp=2fcb4ed156fe756542da2719b9b8fa2110c5de08
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Apr 18 08:36:19 2015 +0100
Add a special case for the lower bound when computing Wn.
If we're asked for Wn(-1/e), we can't find a number between -1 and the
right answer to use as the interval upper bound, so we have to fall
back to using -1 itself as the interval bound in that situation.
lambertw.cpp | 23 +++++++++++++++++++----
test.sh | 1 +
2 files changed, 20 insertions(+), 4 deletions(-)
commit 0ecb9419d89a5fb57cdad4fb10c29c13bc292257
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=0ecb9419d89a5fb57cdad4fb10c29c13bc292257;hp=28292a6f1297a5e46a3297cfe128aaab39726a1c
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Apr 18 14:17:46 2015 +0100
Document the exactness hazard in W/Wn as fixed.
manpage.but | 7 +++----
manual.but | 11 +++--------
2 files changed, 6 insertions(+), 12 deletions(-)
More information about the tartarus-commits
mailing list