simon-git: spigot (master): Simon Tatham
Commits to Tartarus CVS repository.
tartarus-commits at lists.tartarus.org
Mon Dec 15 17:02:06 GMT 2014
TL;DR:
d4a70b1 Debug facility for a single spigot.
72fa2fb Use mpz_tdiv_* in place of mpz_div.
f4d0979 Normalise signs in spigot_rational().
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: 2014-12-15 17:02:06
commit d4a70b12d12f6315efde3e7f2d637401eb6eba28
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=d4a70b12d12f6315efde3e7f2d637401eb6eba28;hp=0fdbeaf00bb127e90eaed270968a98d37342cbeb
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Dec 15 16:17:31 2014 +0000
Debug facility for a single spigot.
This isn't used in the normal running of the program, but if I find a
computation going wrong, I can insert a single s->enable_debug() call
in an appropriate part of the code to get a dump of just _that_
spigot's matrix manipulations to standard output.
spigot.cpp | 43 ++++++++++++++++++++++++++++++++++++++++++-
spigot.h | 7 +++++++
2 files changed, 49 insertions(+), 1 deletion(-)
commit 72fa2fb63e288e31750f62c12a82c048ef257bf5
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=72fa2fb63e288e31750f62c12a82c048ef257bf5;hp=d4a70b12d12f6315efde3e7f2d637401eb6eba28
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Dec 15 16:52:44 2014 +0000
Use mpz_tdiv_* in place of mpz_div.
I had intended my 'bigint' class to have / and % operators following
the usual C semantics (division rounded towards zero, hence remainder
with the same sign as the numerator), but apparently mpz_div doesn't
actually have those semantics. Switch mpz_div and mpz_mod to
mpz_tdiv_{q,r}, which do.
bi_gmp.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
commit f4d09798f4e5979d75474735c499b7b65f276489
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=f4d09798f4e5979d75474735c499b7b65f276489;hp=72fa2fb63e288e31750f62c12a82c048ef257bf5
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Dec 15 16:37:27 2014 +0000
Normalise signs in spigot_rational().
The gcd loop in spigot_rational() was accidentally depending on the
wrong semantics of mpz_div(), which I've just fixed.
bi_gmp.h | 2 ++
bi_internal.h | 2 ++
rational.cpp | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
More information about the tartarus-commits
mailing list