mulmid
Torbjorn Granlund
tg at gmplib.org
Wed Oct 5 12:23:00 CEST 2011
nisse at lysator.liu.se (Niels Möller) writes:
As I understand try.c, it's intended to detect writes outside of the
intended areas, and not primarily to detect other miscomputations. Some
of the make check tests also uses marker limbs before and after certain
areas to detect overwrites, but try.c does that a lot more
systematically.
We can allow try to ake an arbitrary time, while the "make check" tests
should not take more than roughly one second each. A plan "make check"
should NOT be interpreted as a certificate of correctness of some
arbitrary hack; the role is mainly to check that GMP did not
misconfigure itself and--perhaps most importantly--that GMP has not
triggered compiler bugs for a particular build.
A full "make check" should cover every source line.
Sounds a bit to tricky to get right. My gut feeling is that one
shouldn't do tricky things in the refmpn functions. But on the other
hand, it may be good to have a reference implementation which is
radically different from the one under test.
Note that refmpn_mul uses schoolbook in the main mul function's
schoolbook and karatsuba ranges, then refmpn_mul uses karatsuba in the
main toom3 range, and finally it used toom3 in the toom4 range.
This is not ideal, and no other ref function is that complex. For
motivation why this strategy was necessary, please see my previous
message.
--
Torbjörn
More information about the gmp-devel
mailing list