> < ^ From:

< ^ Subject:

In his e-mail message of 1993/01/26 Edward Spitznagel wrote:

I tried factoring the 6th Fermat number using the code below and

got F6 returned to me, suggesting that F6 is prime. Since one

factor of F6 is 274177, this seems to contradict Section 10.20

of the documentation, which states that "FactorsInt is

guaranteed to find all factors less than 10^6."gap> FactorsInt( 2^(2^6) + 1); [ 18446744073709551617 ] gap> (2^(2^6) + 1) / 274177; 67280421310721 gap> quit;

This is indeed a bug in the function 'IsPrime'. Since 'IsPrime(2^64+1)'

returns 'true', 'Factors' doesn't even attempt to factor it. A fix for

that bug is in the upgrade from GAP 3.1 patchlevel 2 to GAP 3.1

patchlevel 3, which is available as 'upg3r1p3.dif.Z' from

'samson.math.rwth-aachen.de'.

More about the problem (i.e., the reason why 'IsPrime' failed), can be

found in one of my e-mails to the GAP Forum, which is in the file

'forum92d.txt' (GAP Forum mails of 4th quarter 92), on

'samson.math.rwth-aachen.de' in the directory 'tmp' (not in 'pub/gap' as

the rest of GAP).

In his e-mail message of 1993/01/26 Ansgar Kaup answered

I tried factoring the 6th Fermat number in order to check the result that

Edward Spitznagel got with his NeXT and FactorsInt found the correct factors.

I am using a SUN SPARC station 10 and got the executable from SAMSON aswell.

So the bug must have something to do with Edwards Hardware or is contained in

the executable obtained from SAMSON.

I think the NeXT people would be quite offended by the idea that their

hardware is to blame ;-). (Oh, and of course the executables we

distribute never have bugs. Well, hardly ever ;-)

Martin.

-- .- .-. - .. -. .-.. --- ...- . ... .- -. -. .. -.- .- Martin Sch"onert, Martin.Schoenert@Math.RWTH-Aachen.DE, +49 241 804551 Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, D 51 Aachen, Germany

> < [top]