Only in .: CHANGES Only in ../1.4: IN diff -c -r ../1.4/README ./README *** ../1.4/README Tue Oct 26 18:05:27 1993 --- ./README Tue Oct 26 18:07:32 1993 *************** *** 1,9 **** RSA-129 Information Derek Atkins ! 21 Sept 1993 ! Version: $Id: README,v 1.4 1993/09/21 21:05:06 warlord Exp $ INTRODUCTION ------------ --- 1,9 ---- RSA-129 Information Derek Atkins ! 26 Oct 1993 ! Version: $Id: README,v 1.5 1993/10/26 21:54:57 warlord Exp $ INTRODUCTION ------------ *************** *** 34,42 **** S4S_mpqs Sun4 (Solaris) VS_mpqs VAXstation (bsd43) alpha_mpqs DEC alpha (osf/1) ! HP_mpqs HP/UX rs6000_mpqs RS/6000 (AIX) ! Gen_mpqs Linux, possibly others. (A good starting point) You should now have a file called "mpqs" in the current build directory. This should be moved to some place where all the worker --- 34,46 ---- S4S_mpqs Sun4 (Solaris) VS_mpqs VAXstation (bsd43) alpha_mpqs DEC alpha (osf/1) ! HP_mpqs HP/UX (requires unbundled compiler) ! HP_gcc_mpqs HP/UX with gcc compiler rs6000_mpqs RS/6000 (AIX) ! SGI1_mpqs r2000/r3000 CPU ! SGI2_mpqs r4000 CPU ! linux_mpqs i86/Linux ! Gen_mpqs (A good starting point) You should now have a file called "mpqs" in the current build directory. This should be moved to some place where all the worker *************** *** 152,162 **** --- 156,180 ---- path# your-email-address id# number-of-ids-you-want + Note: The strings "path#" and "id#" are *required* to be + there, as the response software keys off those phrases. + When you send this, it should respond with that appropriate number of UIDs which you can now be sure are unique to the RSA-129 project. This assures that no one will duplicate any efforts. + MAILING LISTS + ------------- + + There is a mailing list for all the RSA129 workers. If you + want to be on this list, please send mail to: + rsa129-request@iastate.edu + and ask to be put on the worker list. This list receives notices + about software updates, and statistics about the progress of the + project. All workers are highly recommended to be on this list, and + non workers can also be added at their request. + NOTES ----- *************** *** 169,175 **** This UID is an MPQS Universal IDentifier, and has no relation to UNIX UID or any other IDs you may think of. The mpqs process may be run as any user on each machine, but the UID for the mpqs process, ! which you obtain from factorid@hot-spare.mit.edu, must be unique! The mpqs process, as it is built my this Makefile, will take approximately 12 Meg of core space. If it needs to swap at all, it --- 187,198 ---- This UID is an MPQS Universal IDentifier, and has no relation to UNIX UID or any other IDs you may think of. The mpqs process may be run as any user on each machine, but the UID for the mpqs process, ! which you obtain from factorid@hot-spare.mit.edu, must be unique! In ! actuality, the MPQS UID is a seed into a random number generator. If ! two mpqs processes are running with the same UID, then they will ! generate the same random numbers, and hence both processes will cover ! the same space. We do not want this to happen, which is why we say ! that each mpqs process should have its own UID. The mpqs process, as it is built my this Makefile, will take approximately 12 Meg of core space. If it needs to swap at all, it *************** *** 186,192 **** for help with this. Any questions, please mail to rsa129-info@iastate.edu, and it ! will be answered quickly. ! Thank you for joining the RSA-129 project. God Speed, and ! Good Luck. --- 209,216 ---- for help with this. Any questions, please mail to rsa129-info@iastate.edu, and it ! will be answered as quickly as possible. ! Thank you for joining the RSA-129 project. ! ! -RSA129 Project Coordinators Only in .: Samples Common subdirectories: ../1.4/src and ./src diff -c -r ../1.4/src/Makefile ./src/Makefile *** ../1.4/src/Makefile Tue Oct 26 18:06:17 1993 --- ./src/Makefile Tue Oct 26 18:07:36 1993 *************** *** 60,69 **** $(AS) $(ASMFLAGS) -o $*.o $*.s default: ! @echo "Type make , where is one of" ! @echo "DS_mpqs, S4_mpqs, S4a_mpqs, S4S_mpqs, VS_mpqs," ! @echo "alpha_mpqs, HP_mpqs, rs6000_mpqs, SGI1_mpqs," ! @echo "SGI2_mpqs, or Gen_mpqs" # This is the all-encompasing rule to make the program. This should # work for all platforms, and let you know how you made it. --- 60,69 ---- $(AS) $(ASMFLAGS) -o $*.o $*.s default: ! @echo "Type make , where is one of:" ! @echo " DS_mpqs, S4_mpqs, S4a_mpqs, S4S_mpqs, VS_mpqs," ! @echo " alpha_mpqs, HP_mpqs, HP_gcc_mpqs, rs6000_mpqs," ! @echo " SGI1_mpqs, SGI2_mpqs, linux_mpqs, or Gen_mpqs" # This is the all-encompasing rule to make the program. This should # work for all platforms, and let you know how you made it. *************** *** 82,91 **** S4_mpqs: mpqs.c lip.c $(MAKE) all CC=gcc CFLAGS=-O OBJS="mpqs.o lip.o" FILE=made_S4_mpqs ! # Sun-4 with assembler speed-up S4a_mpqs: sparc-sunos.s mpqs.c lip.c $(MAKE) all CC=gcc CFLAGS="-O -DCONTRIBUTION_8" ASMFLAGS="-P -DFPU" \ ! OBJS="mpqs.o lip.o sparc-sunos.o" FILE=made_S4a_mpqs # Sun-4 with assembler, small memory S4a_mpqs_small: sparc-sunos.s mpqs.c lip.c --- 82,92 ---- S4_mpqs: mpqs.c lip.c $(MAKE) all CC=gcc CFLAGS=-O OBJS="mpqs.o lip.o" FILE=made_S4_mpqs ! # Sun-4 with assembler speed-up. MAXSIEVE=850000 tested on SS10 w/ 1MB ! # cache. This may not be right for you! S4a_mpqs: sparc-sunos.s mpqs.c lip.c $(MAKE) all CC=gcc CFLAGS="-O -DCONTRIBUTION_8" ASMFLAGS="-P -DFPU" \ ! OBJS="mpqs.o lip.o sparc-sunos.o" MAXSIEVE=850000 FILE=made_S4a_mpqs # Sun-4 with assembler, small memory S4a_mpqs_small: sparc-sunos.s mpqs.c lip.c *************** *** 107,113 **** # An Alpha running OSF/1 alpha_mpqs: mpqs.c lip.c $(MAKE) all CFLAGS=-O2 OBJS="mpqs.c lip.c" \ ! FILE=made_alpha_mpqs # An RS/6000 running AIX (3.2) rs6000_mpqs: mpqs.c lip.c --- 108,114 ---- # An Alpha running OSF/1 alpha_mpqs: mpqs.c lip.c $(MAKE) all CFLAGS=-O2 OBJS="mpqs.c lip.c" \ ! FILE=made_alpha_mpqs MAXSIEVE=850000 # An RS/6000 running AIX (3.2) rs6000_mpqs: mpqs.c lip.c *************** *** 114,125 **** $(MAKE) all CFLAGS="-O -qmaxmem=10000" OBJS="mpqs.o lip.o" \ FILE=made_rs6000_mpqs ! # HP/UX HP_mpqs: mpqs.c lip.c $(MAKE) all OBJS="mpqs.c lip.c" \ CFLAGS="-O -Aa -D_HPUX_SOURCE -DNO_TIMING" \ FILE=made_HP_mpqs # SGI. This will compile a more generic (r2000/3000 cmd set) mpqs SGI1_mpqs: mpqs.c lip.c $(MAKE) all CFLAGS="-mips1 -O3 -G16" OBJS="mpqs.c lip.c" \ --- 115,132 ---- $(MAKE) all CFLAGS="-O -qmaxmem=10000" OBJS="mpqs.o lip.o" \ FILE=made_rs6000_mpqs ! # HP/UX (You cannot use standard native compiler. You need the spiffy, ! # expensive one, or use gcc ;-) HP_mpqs: mpqs.c lip.c $(MAKE) all OBJS="mpqs.c lip.c" \ CFLAGS="-O -Aa -D_HPUX_SOURCE -DNO_TIMING" \ FILE=made_HP_mpqs + # HP/UX with native, stupid compiler + HP_gcc_mpqs: mpqs.c lip.c + $(MAKE) all CC=gcc OBJS="mpqs.o lip.o" \ + CFLAGS="-O -D_HPUX_SOURCE -DNO_TIMING" FILE=made_HP_gcc_mpqs + # SGI. This will compile a more generic (r2000/3000 cmd set) mpqs SGI1_mpqs: mpqs.c lip.c $(MAKE) all CFLAGS="-mips1 -O3 -G16" OBJS="mpqs.c lip.c" \ *************** *** 129,134 **** --- 136,149 ---- SGI2_mpqs: mpqs.c lip.c $(MAKE) all CFLAGS="-mips2 -sopt -O3 -non_shared -G16 -kpicopt" \ OBJS="mpqs.c lip.c" FILE=made_SGI1_mpqs + + # Linux + linux_mpqs: mpqs.c lip.c + $(MAKE) all OBJS="mpqs.o lip.o" CFLAGS="-O6" \ + FILE=made_linux_mpqs + @echo "Rebuilding binary with shared libc" + $(RM) $(PROG) + $(CC) -o $(PROG) mpqs.o lip.o -lm # Generic Unix. Use gcc if you wish. Only in ../1.4/src: RCS diff -c -r ../1.4/src/lip.c ./src/lip.c *** ../1.4/src/lip.c Tue Oct 26 18:06:37 1993 --- ./src/lip.c Tue Oct 26 18:07:55 1993 *************** *** 514,523 **** } /* ! zdiv21 returns quot, rem so quot = (numhigh*RADIX + numlow)/denom; ! rem = (numhigh*RADIX + numlow)%denom; Assumes 0 <= numhigh < denom < RADIX and 0 <= numlow < RADIX. */ --- 514,523 ---- } /* ! zdiv21 returns quot, numhigh so quot = (numhigh*RADIX + numlow)/denom; ! numhigh = (numhigh*RADIX + numlow)%denom; Assumes 0 <= numhigh < denom < RADIX and 0 <= numlow < RADIX. */ *************** *** 524,534 **** #if 0 ! #define zdiv21(numhigh, numlow, denom, quot, rem) \ { \ register long lr21; \ register long lq21 = (long) (((fradix * (double) (numhigh)) \ ! + (double) (numlow)) / (double) (denom)); \ /* Following works in many two's complement architectures. */ \ lr21 = (numhigh << NBITS) + numlow - lq21 * denom; \ --- 524,534 ---- #if 0 ! #define zdiv21(numhigh, numlow, denom, deninv, quot) \ { \ register long lr21; \ register long lq21 = (long) (((fradix * (double) (numhigh)) \ ! + (double) (numlow)) * (deninv)); \ /* Following works in many two's complement architectures. */ \ lr21 = (numhigh << NBITS) + numlow - lq21 * denom; \ *************** *** 547,562 **** lq21++; \ }; \ } \ ! *quot = lq21; \ ! *rem = lr21; \ } #else ! #define zdiv21(numhigh, numlow, denom, quot, rem) \ { \ register long lr21; \ register long lq21 = (long) (((fradix * (double) (numhigh)) \ ! + (double) (numlow)) / (double) (denom)); \ long lprodhigh = 0; \ long lprodlow = 0; \ \ --- 547,562 ---- lq21++; \ }; \ } \ ! quot = lq21; \ ! numhigh = lr21; \ } #else ! #define zdiv21(numhigh, numlow, denom, deninv, quot) \ { \ register long lr21; \ register long lq21 = (long) (((fradix * (double) (numhigh)) \ ! + (double) (numlow)) * (deninv)); \ long lprodhigh = 0; \ long lprodlow = 0; \ \ *************** *** 577,584 **** lq21++; \ }; \ } \ ! *quot = lq21; \ ! *rem = lr21; \ } #endif --- 577,584 ---- lq21++; \ }; \ } \ ! quot = lq21; \ ! numhigh = lr21; \ } #endif *************** *** 2121,2126 **** --- 2121,2127 ---- else { register long den = d; + register double deninv; register long carry = 0; register long i; long flag = (*a < 0 ? 2 : 0) | (den < 0 ? 1 : 0); *************** *** 2127,2157 **** if (den < 0) den = -den; if (a[sa] < den && sa > 1) carry = a[sa--]; ! if (den < RADIXROOT) { ! register long rdivd = RADIX / den; ! register long rmodd = RADIX - den * rdivd; ! register long temp; ! ! for (i = sa; i; i--) ! { ! temp = a[i] + rmodd * carry; ! b[i] = rdivd * carry + temp / den; ! carry = temp % den; ! } } - else - { - for (i = sa; i; i--) - { - long newcarry; - - zdiv21(carry, a[i], den, &b[i], &newcarry); - carry = newcarry; - } - } while ((sa > 1) && (!(b[sa]))) sa--; b[0] = sa; --- 2128,2140 ---- if (den < 0) den = -den; + deninv = (double)1/den; if (a[sa] < den && sa > 1) carry = a[sa--]; ! for (i = sa; i; i--) { ! zdiv21(carry, a[i], den, deninv, b[i]); } while ((sa > 1) && (!(b[sa]))) sa--; b[0] = sa; *************** *** 3243,3248 **** --- 3226,3232 ---- double flo; double num; double den; + double dirt; #ifndef START if (fudge < 0) *************** *** 3319,3330 **** else { ilo = (long)lo; ! if (!ilo || ilo < (long)hi) fast = 0; else { dt = lo; ! lo = flo / (hi - ilo); if (dt > ilo) hi = fhi / (dt - ilo); else --- 3303,3315 ---- else { ilo = (long)lo; ! dirt = hi - ilo; ! if (!dirt || !ilo || ilo < (long)hi) fast = 0; else { dt = lo; ! lo = flo / dirt; if (dt > ilo) hi = fhi / (dt - ilo); else *************** *** 5389,5395 **** s = zmakeodd(&u) - 1; if (firstbase < 0) firstbase = -firstbase; ! if (!firstbase && (sm = m[1]) <= RADIXROOT) sm = RADIXM - 3; if (t < 0) i = -t; --- 5374,5380 ---- s = zmakeodd(&u) - 1; if (firstbase < 0) firstbase = -firstbase; ! if (!firstbase && (sm = (m[1]-3)) <= (RADIXROOT-3)) sm = RADIXM - 3; if (t < 0) i = -t; *************** *** 5411,5417 **** zintoz(firstbase, &a); zexpmod(a, u, m, &a); } ! if ((sm = m[1]) <= RADIXROOT) sm = RADIXM - 3; } if ((a[0] != 1 || a[1] != 1) && zcompare(m1, a)) --- 5396,5402 ---- zintoz(firstbase, &a); zexpmod(a, u, m, &a); } ! if ((sm = (m[1]-3)) <= (RADIXROOT-3)) sm = RADIXM - 3; } if ((a[0] != 1 || a[1] != 1) && zcompare(m1, a)) diff -c -r ../1.4/src/mpqs.c ./src/mpqs.c *** ../1.4/src/mpqs.c Tue Oct 26 18:06:56 1993 --- ./src/mpqs.c Tue Oct 26 18:08:15 1993 *************** *** 1263,1269 **** } else if (t1[0] == 1) { long pj = t1[1]; if (pj == 1) { ! dumpfac(&ful,fulid,fulidc,index,factors,1,1,qisq); if (ival>maxful) maxful = ival; if (ivalmaxful) maxful = ival; if (ivalmaxpar) maxpar = ival; if (ivalmaxpar) maxpar = ival; if (ival