two possible coding porjects
Tue, 29 Jul 2003 08:58:27 +1000
> Actually, once the data field is prepared it should accellerate
> just about any division-related operation against n.
How? Division isn't done by trial subtraction, but by a limb quotient
and a submul, per Knuth. Or a multi-limb quotient when divisor size
is big enough for the divide-and-conquer sub-quadratic algorithm.
> this would at the very least admit error reporting when
> non-reallocable storage overflows.
You mean at the mpn level? Routines using those must simply take care
not to go past their defined operands. Some of the hairier ones have
some ASSERTs to see that theory accords with practice, but that's
about the limit of the checking we think is needed.