simon-git: spigot (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Wed Jan 10 20:06:15 GMT 2018
TL;DR:
97cb839 BaseOutputGenerator: revise handling of exponent lower bound.
82acb52 BaseFormatter: add missing check of has_dlimit.
13af035 HoleFiller: use 'dgreet' for the diagnostic greeting message.
Repository: https://git.tartarus.org/simon/spigot.git
On the web: https://git.tartarus.org/?p=simon/spigot.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2018-01-10 20:06:15
commit 97cb839d703637bfbe795a40b61944a895c075ef
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=97cb839d703637bfbe795a40b61944a895c075ef;hp=d92301d2340965a403b843234cfe7a438239935b
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jan 10 19:55:13 2018 +0000
BaseOutputGenerator: revise handling of exponent lower bound.
A user reported an assertion failure in the near-trivial spigot
invocation 'spigot -d10 -b2 e', which was caused by the exponent-
finding loop in BaseOutputGenerator getting to the point where it knew
the input was in the interval (1,3), which is small enough (size at
most 2) that you can't guarantee to get it any smaller without zooming
in. But the code for zooming in noticed that we were already at
minimum exponent, so it exited the exponent loop early and put the
wrong value in scale.
Now that I look at it, the code that judged when to exit early was
clearly misguided, because it was basing its judgment solely on the
variable 'exponent' itself, which indicates by how much the exponent
loop has _zoomed in_ to look at the situation, not what it thinks the
exponent might actually _be_ after accounting for that zoom.
In the revised version of the code, _every_ exit from the exponent
loop is based on a value actually returned from compute_exponent(), so
this problem should not recur. I've added the reporting user's test
case as a new regression test.
baseout.cpp | 116 ++++++++++++++++++++++++++++++++++++------------------------
test.sh | 1 +
2 files changed, 70 insertions(+), 47 deletions(-)
commit 82acb524691b8426dc6de2a7d3758b369154bc7e
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=82acb524691b8426dc6de2a7d3758b369154bc7e;hp=97cb839d703637bfbe795a40b61944a895c075ef
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jan 10 19:58:06 2018 +0000
BaseFormatter: add missing check of has_dlimit.
The BaseFormatter constructor was adjusting its minimum exponent value
based on the digit limit, without first having checked the flag that
said whether there _was_ a digit limit, i.e. sometimes it would update
the exponent bound based on a completely spurious int value.
(The bug fixed by the previous commit would have shown up even without
-d10 if it hadn't been for this secondary bug!)
baseout.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 13af0357916d927f57a74998de51e93ddadc96a4
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=13af0357916d927f57a74998de51e93ddadc96a4;hp=82acb524691b8426dc6de2a7d3758b369154bc7e
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jan 10 20:00:48 2018 +0000
HoleFiller: use 'dgreet' for the diagnostic greeting message.
I happened to notice the statement dprint("hello HoleFiller"), which
is a violation of the principle introduced by commit bb574df8d that
greeting messages should use 'dgreet' in place of 'dprint' so that
they show up in --debug=greetings mode.
holefiller.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the tartarus-commits
mailing list