Francois Morain on Wed, 20 Jan 1999 17:55:46 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Bug in arithmetic?


o.osf1-alpha/gp-sta 
                   GP/PARI CALCULATOR Version 2.0.13 (alpha)
                              Alpha 64-bit version
                (readline disabled, extended help not available)

                           Copyright (C) 1989-1998 by
          C. Batut, K. Belabas, D. Bernardi, H. Cohen and M. Olivier.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

   realprecision = 38 significant digits
   seriesprecision = 16 significant terms
   format = g0.38

parisize = 8000000, primelimit = 500000
? n=10^2000+4561;

For n, we should have 2^(n-1) = 1 mod n, but the answer is not:

%2 =
Mod(688626264081083205890839680400440229271155163964679011219152085089146127409063268927574191396489517790074125166838151443632133444270555207436088307440615734963273307313520604356097248199365834363009001425567801279341199178790398773280516117218580272470737987438629726530424079312180739691115391803987186897155962985966551027546583163906206822930514747096565854590151374370061325880994299514790328108879386831207021055735413499515100021498734819041895770590093214201306323826198318392304829686116828584064228691949587275363562529836907261077201629861882988321340410326317896575843085513259287863178469375760299100964771516925981200529030039767696224653059091663176181823838071944530069983134208400521210687678625672648220796373047799408105029813220782932105840345238439974511339580407645820771945734087189923598004839130530131434870553997058006890389850817167786074877512582651307953998606768402870246539748449723358443065828322064782918335157484180205791183831293835198682450664803154344!
!
8524284935036850782532373061169388709509638410297301294806115089745760384127039661947526842232130731752359991420078890404808208859732264856509238754010796377138181422825148613655086026654284460822366333315340284200582916388206444759982304695993613550268538955442458695327609213859846024741566493048558360918662661723694159665924041601814002145531906616303936577557151937464367521107096085324022553950971887632377787131355921250342180572936893200798313293762618444812165757458459109121746565972351137803946054776169128239281262255059330110047802390016548770801792392677777366479809311302641002088482792176769307952386639744701672906183917314743093335127753718242502932447320681816571188815031800877137043156010209034572862142772830662167356538771748966672396797959694933259608951174554199730178747401238616598877277282297028773322981340031031379601258712408205231401541425208900863370544394364130084002311960959834198846578464058683663903120811890522673021298693738224637285726736817326658252!
!
6306114629929017453950,

It was good in version 2.0.11beta .

F. Morain