On 24 Oct 1999, at 23:03, Brian Beesley replied:

> 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.

Thank you for pointing this out.
I'd rather use the CPU power on LL tests.

> >   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!

Actually, yes. (That's why I proposed the coding compromise for the
decimal display).
Maybe the binary and hex display _could_ work without too much overhead
for an all-int LL-tester?

> And I don't think you can print the last few digits of a decimal
> expansion without converting the whole number.

I know, it's a problem.
And we certainly wouldn't want to compute in BCD! :-)

> >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.

lucdwt. I can't wait to try that. Thank for the tip.

> 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.

"Simple" programs have their advantages too.
Once the uniform savefile format is implemented on the various
platforms, cross-checking should become easier.

Prime95 should perforce remain a black box during a Lucas Lehmer test,
for educational purposes one would also utilize a program that shows
(part of) the number after each LL iteration.

> Once we're into serious numbercrunching, only three things matter:
> accuracy, speed and nothing else.

Accuracy is essential, speed important. Understandability would help to
get more people running the program. Distributed numbercrunching by
volunteers depends on it.

Robert van der Peijl <[EMAIL PROTECTED]>

_________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

Reply via email to