On 24 Oct 99, at 15:55, Robert van der Peijl wrote:
> [ ... snip ... ]
> Show Number
> Show me the last few digits of the
> current Lucas number at each iteration.
This is distinctly non-trivial. The residue doesn't exist in a nice
form in work vectors in the program's memory, it has to be specially
constructed when it needs to be output.
This construction of the binary residue takes CPU power.
> Number of digits to display (1-100): 16
>
> Representation
> (What kind of digits do you want to see)
> * hexadecimal (h)
> decimal (d)
> binary (b)
Have you any idea of the amount of CPU time needed to convert a 10
million bit binary number to a 3 million digit decimal number? You'd
certainly do quite a lot more iterations in that time! And I don't
think you can print the last few digits of a decimal expansion
without converting the whole number.
>From a teaching point of view it might be better to start with a
(much slower) program like Richard Crandall's lucdwt program. This is
"simple" enough that it's easy to see what's going on, and, being
entirely written in a fairly portable version of C, it is relatively
easy to add code to output residuals at intervals of your choice.
I used this technique to generate intermediate residuals for
exponents up to 79 million which were used for cross-checking the
operation of the new code in Prime95 v19.
Once we're into serious numbercrunching, only three things matter:
accuracy, speed and nothing else.
> During the LL test, you might even spot any periodicity occurring ;-)
I very much doubt it, for reasons which have been explored
exhaustively on this list before.
Regards
Brian Beesley
_________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers