simon-git: spigot (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Wed Mar 7 20:01:05 GMT 2018
TL;DR:
47f74b8 New number: Catalan's constant.
14496e5 New functions: sinc, both unnormalised and normalised.
e7e8a3f Fix a few compile warnings.
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-03-07 20:01:05
commit 47f74b8ec533f64d86fb70c0d230ec79eb3545e1
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=47f74b8ec533f64d86fb70c0d230ec79eb3545e1;hp=56128fc27e5b0d58982f23d1717f186b22423a1b
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Mar 7 19:16:21 2018 +0000
New number: Catalan's constant.
I've been doing loads of spigot work recently, but it's all been NFC -
refactoring and tidying. It seems a shame not to leave spigot in some
kind of _user-visibly_ nicer state than it started, so while I've
still got the enthusiasm to work on it, perhaps I should add an extra
feature or two.
An email from a user recently mentioned Catalan's constant in the
context of listing things that other calculating programs supported
and spigot didn't. I hadn't heard of it before that email, but I
looked it up, and although Wikipedia gave a fairly painful formula for
it in the form of a spigotisable series that then has to be added to
pi*log(2+sqrt(3)), I managed to dig up a paper on arXiv that has a
much nicer series representation that generates the whole constant all
by itself.
consts.cpp | 115 ++++++++++++++++++++++++++++++++++++++++++++++++
expr.cpp | 1 +
funcs.h | 1 +
manpage.but | 5 +++
manual.but | 5 ++-
python-doc/api.rst | 8 ++++
python-module/testsuite | 1 +
test.sh | 1 +
8 files changed, 136 insertions(+), 1 deletion(-)
commit 14496e50d06bb373b4420af437af8e167a80a081
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=14496e50d06bb373b4420af437af8e167a80a081;hp=47f74b8ec533f64d86fb70c0d230ec79eb3545e1
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Mar 7 19:32:54 2018 +0000
New functions: sinc, both unnormalised and normalised.
sinc sounded easy before I started (it's just sin(x)/x), and it even
_looks_ easy now I read over the finished code, but it was
surprisingly fiddly to get right somewhere in the middle - I needed a
HoleFiller derivative to fill in the removable singularity at zero
without causing an exactness hazard, and the normalised version (i.e.
sin(πx)/(πx)) turned out to be better written as sind(180x)/(πx)
because otherwise you get further exactness hazards at all the other
integers.
expr.cpp | 2 ++
funcs.h | 1 +
manpage.but | 6 +++++
manual.but | 7 +++++
python-doc/api.rst | 4 +++
python-module/__init__.py | 2 ++
python-module/testsuite | 2 ++
test.sh | 15 +++++++++++
trig.cpp | 67 +++++++++++++++++++++++++++++++++++++++++++++++
9 files changed, 106 insertions(+)
commit e7e8a3f429d90b5769440ca7ec8344c52d88f3d8
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=e7e8a3f429d90b5769440ca7ec8344c52d88f3d8;hp=14496e50d06bb373b4420af437af8e167a80a081
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Mar 7 19:40:47 2018 +0000
Fix a few compile warnings.
All benign, I think. The code is now clean under -Wall -Wextra in both
g++ and clang++, except that clang++ complains endlessly about
initialisations such as 'matrix = { 1, 0, 0, 1 }' suggesting an extra
pair of braces, which I think I'd rather not put in if I can avoid it.
(With -Wno-missing-braces, it's silent.)
bi_internal.h | 4 ++--
error.h | 1 +
expr.cpp | 5 ++---
main.cpp | 3 +--
spigot.cpp | 1 -
spigot.h | 7 +++++--
6 files changed, 11 insertions(+), 10 deletions(-)
More information about the tartarus-commits
mailing list