Version 1.4.42:
Align memory for vector ops on 64- or 128- instead of 16-byte boundarys.
Added VEC_* macros for non-SSE2 x86 machines.

Version 1.4.41:
Fixed *_clock() functions to return CPU times in Windows. Previous versions
 used clock() when getrusage() was not available, but clock() returns
 elapsed time instead of CPU time in Windows. (clock.c).

Version 1.4.40: (Posted 6 May 2007)
Use VEC8_* and VEC16_* macros instead of VEC4_* macros in SSE2 code path.

Version 1.4.39: (Posted 17 April 2007)
Fixed a bad CPUID parameter in the non-intel cache detection code (cpu.c).

Version 1.4.38: (Posted 16 April 2007)
Use VEC4_* macros instead of vec4_* inline functions.

Version 1.4.37: (Posted 7 April 2007)
New vec4_* functions to fill arrays 4 elements at a time in SSE2 code path.

Version 1.4.36: (Posted 24 March 2007, source only)
Added missing definition of CPU_DIR_NAME for ppc64/Linux in cpu.c
Set BASE=0 to allow the base b in k*b^n+c to be determined at runtime. Set
 BASE=b to fix base b at compile time, as in previous versions. With BASE=0
 the filenames will be as for BASE=2: sr2work.txt etc.

Version 1.4.35: (Posted 20 March 2007, source only)
Fixed some problems with the source archive and Makefile: factors.o was
 included in source instead of factors.c; end-of-line comments in the
 Makefile were not being stripped. Thanks Ed for finding these bugs.

Version 1.4.34: (Posted 18 March 2007)
Fixed the cpuid cache size detection code on AMD machines. Thanks
 `Flatlander' for reporting this bug.

Version 1.4.33: (Posted 17 March 2007)
Replaced some 64-bit variables with 32-bit ones in the Sieve of Eratosthenes
 main sieving loop. Performance on 32-bit machines is a little better,
 hopefully not at a cost to 64-bit machines.
ppc64/Linux cache detection now checks directories in /proc/device-tree/cpus
 for cache size files and sets the cache size from the first one found.

Version 1.4.32: (Posted 15 March 2007)
Detect L1/L2 data cache size by reading /proc on ppc64/Linux. Thanks Ed for
 the code.
Added SSE2 detection and a seperate SSE2 code path selectable at runtime.
 `--sse2' or `--no-sse2' can be used to override automatic detection.
Added Makefile targets x86-intel/x86-amd to create binaries that will run on
 any Pentium compatible, but with base code path tuned for Pentium2/Athlon
 and SSE2 code path tunes for Pentium4/Athlon64.

Version 1.4.31: (Posted 11 March 2007, source only)
Checkpoint whenever SIGUSR1 is raised (if SIGUSR1 is defined in signal.h).
New command line switch `-C -cache-file FILE' loads the cache from FILE if
 it exists, or writes a new cache to FILE if it doesn't.
Existing command line switch `-c --cache' now continues sieving after
 writing the new cache file `sr5cache.bin'.
Checkpoint file now also records accumulated cpu time for the range, and the
 fraction of the range that has been done (for use by BOINC wrapper).
Detect L1/L2 data cache size using sysctl on ppc64/MacOS X. Thanks Alex for
 the code.

Version 1.4.30: (Posted 9 March 2007)
Detect L1/L2 data cache size using cpuid instruction on x86/x86_64.
Set UPDATE_BITMAPS=1 to remove terms as factors are found, UPDATE_BITMAPS=0
 for compatibility with proth_sieve.

Version 1.4.29: (Posted 7 March 2007)
If no command line arguments are given, read them from a file called
 `sr5sieve-command-line.txt' if one exists in the current directory.
Report and log the number of found factors even if the range is not complete
 when the program is stopped.
Once a factor has been found, alternate status line between reporting ETA
 and factor rate.
Truncate the status line to 80 characters.

Version 1.4.28: (Posted 24 February 2007)
Added switches `-z --idle' to start at idle priority, the default, and
 `-Z --no-idle' to not alter the priority level. Set IDLE_DEFAULT=0 in
 sr5sieve.h to make -Z the default.

Version 1.4.27: (Posted 22 February 2007)
The -k8 build was broken in version 1.4.21 due to faulty L1_CACHE_SIZE and
 L2_CACHE_SIZE Makefile parameters. Fixed.
Added `-i --input FILE' command line switch to read the sieve from FILE
 instead of sr5data.txt.
Added `-p --pmin P0' and `-P --pmax P1' command line switches to sieve for
 factors p in P0 <= p <= P1 instead of reading ranges from sr5work.txt.
Added `-u --uid STRING' command line switch to append -STRING to the base of
 per-process file names (checkpoint.txt,factors.txt,sr5work.txt,sr5sieve.log).
 This allows multiple sr5sieve processes to run in the same directory.
Include the `-d --delete' `-g --newpgen' `-a --abc' command line switches
 only when compiled with BASE=5. These are used for the SR5 project.
Moved some initialization from init_bsgs(), which is done before each new
 range, to init_sieve() which is only done once.

Version 1.4.26: (Posted 21 February 2007)
Replaced the huge switch in setup64() with an if-elif-else construct using a
 runtime-computed table. This may be slightly slower on some machines, but
 avoids the need for manually constructing the switch, which was tedious and
 susceptible to human error. It should now be possible to set a different
 value for POWER_RESIDUE_LCM without any other changes to the source.

Version 1.4.25: (Posted 19 February 2007)
Added USE_SETUP_HASHTABLE option to use a small hashtable lookup instead of
 a linear search to find the power residue partial products in setup64().
Extended power residue tests to 16-th powers.

Version 1.4.24: (Posted 18 February 2007)
Relaxed the unnecessarily conservative limit on the size of the squarefree
 part of k introduced in version 1.4.21. (I forgot to note it here). Thanks
 `Cruelty' for reporting this.

Version 1.4.23: (Posted 16 February 2007)
Decoupled the power residue test limit from the subsequence base exponent.
 Now it is possible to test for 5,8,9th power residues while sieving in
 subsequence base b^60, previously it was necessary to use base b^360.

Version 1.4.22:
Extended power residue tests to 9-th power residues. Faster for SoB.dat and
 riesel.dat, but no gain for sr5data.txt.
Replaced the power residue bitmaps with pre-computed tables of lists.

Version 1.4.21: (Posted 14 February 2007)
Set CHECK_FOR_GFN=1 in sr5sieve.h to recognise when a sequence consists of
 Generalised Fermat numbers A^2^y+1 and thus only consider candidate factors
 p=x*2^(y+1)+1 for that sequence.
Set HAVE_MMAP=1 in config.h to use mmap() instead of malloc()/read() to load
 Legendre symbol tables from the cache file. If mmap() fails, warn and fall
 back to using malloc()/read() instead.
Set HAVE_MALLOPT=1 in config.h to reduce the threshold below which malloc()
 allocates blocks using anonymous mmap(). This reduces heap fragmentation
 during init and allows more memory to be released before the sieve starts.

Version 1.4.20: (Posted 9 February 2007)
Calculate the optimal baby/giant steps ratio based on the actual instead of
 expected number of subsequences passing the power residue tests.
If USE_SETUP_LADDER=1, check whether it is faster to use an addition ladder
 to fill the (1/b^d) (mod p) array.
Added -v switch to print some information useful for debugging or tuning.
Added -l -L switches to set L1 and L2 cache size (in Kb).
Added -H -Q switches to allow hashtable size and subsequence base to be
 manually overriden.

Version 1.4.19: (Posted 5 February 2007)
Don't double the hashtable size if it would exceed the maximum size for the
 type of hashtable element (2^15 by default).
Pre-compute the largest power b^(Q/d) < p_min, where d divides Q.
Use the 2nd variant of inline mulmod code for the ppc64. Thanks Ed for
 testing the alternatives.
The sieve limit for ppc64 is 2^63 when using assembler mulmods, not 2^52.
Added x86-64 assembler powmod (powmod-k8.S)

Version 1.4.18: (Posted 10 January 2007)
Improved the SSE2 powmod code a little.
Added Mark Rodenkirch's changes to the ppc64 assembler mulmod() function.

Version 1.4.17: (Posted 8 January 2007)
Added SSE2 assembler powmod function for 32-bit machines. 7% gain for P4.
Updated srtest to check SSE2 vector functions.

Version 1.4.16: (Posted 6 January 2007)
Added SSE2 assembler vec2_mulmod64_*() and lshift128() functions for 32-bit
 machines. Set USE_VECTOR=1 to enable. About 9% gain on my P4/Celeron.
Build 32-bit *-pentium4 binaries with 8Kb/256Kb cache and SSE2 enabled.

Version 1.4.15:
Used the fact that for b in {2,3,5} and p=1 (mod 120), b^((p-1)/120) has
 order mod p strictly less than 120 to simplify manipulation of the power
 residue bitmaps. (Max left shift will not exceed 60 bits for these bases).
Added USE_FPU_MULMOD option (but not enabled) to use FPU instead of SSE2
 instructions in the x86-64 assembler mulmod64(). This will be slower, but
 should allow sieving for factors up to 2^62, as with the i386 versions.
Added L1/L2_CACHE_SHIFT options: i586 build assumes 8Kb/128Kb, i686 build
 assumes 16Kb/256Kb, k8 and ppc64 builds assume 32Kb/512Kb.
 Initial hashtable size is doubled if it will still fit in half of L1 cache.
 The sieve of Eratosthenes bitmap will use half of L2 cache.

Version 1.4.14: (Posted 30 December 2006)
Fixed a bug introduced in version 1.4.12 where the bitmap code used by the
 octic residue test performed a shift equal to the width of the bitmap word.
 This only affected performance, not results.

Version 1.4.13: (Posted 29 December 2006)
Fixed a bug in version 1.4.12 which could cause 1/240 of factors to be
 missed (about half of those factors for which -kbc is a 120th power residue
 would be missed).
Only consider the square-free part of b when constructing Legendre symbol
 lookup tables for k*b^n+c.

Version 1.4.12: (Posted 28 December 2006)
Check whether -ckb^n is an octic residue before including k*b^n+c in the
 sieve. This is of marginal benefit for the base 5 projects, but a 5% gain
 for sr2sieve with SoB.dat. (Set OCTIC_CHECK=0 in sr5sieve.h to disable).

Version 1.4.11:
Fixed a (probably harmless) bug in mod64_init/fini() that may have prevented
 the FPU control word being correctly restored on i386.
Added inline assembler mulmod64()/sqrmod64() functions for x86-64.

Version 1.4.10:
Three options for testing on ppc64, change -DUSE_INLINE_ASSEMBLER=X in the
 Makefile to X=1, X=2 or X=3. X=1 gives same behaviour as version 1.4.8.
Added -Xassembler -mregnames to CPPFLAGS for PPC/Linux.

Version 1.4.9:
Use inline assembler mulmod64() by default on PPC.
Enforce a minimum hashtable size of 2^10. (faster for very small projects
 like S/R base 4).

Version 1.4.8: (Posted 8 December 2006)
`sr5sieve -a K N0 N1' will write an ABC format file `K.txt' for sequence
 K*5^n+/-1 with terms N0 <= n <= N1 taken from sr5data.txt.
Removed .parity field from seq_t, calculate parity as needed instead.

Version 1.4.7: (Posted 7 December 2006)
Fixed a bug that prevented a range in sr5work.txt sepearated by a '-'
 character being parsed correctly. Thanks `Xentar' for reporting this.

Version 1.4.6: (Posted 4 December 2006)
`sr5sieve -c' will create a cache file sr5cache.bin of Legendre symbol
 lookup tables for sequences in sr5data.txt, then exit. If a normal
 invocation of sr5sieve finds a valid cache file in the current directory
 when started, it will load the lookup tables from the file instead of
 building them from scratch. Thanks Micha for the suggestion.
Make CONST_EMPTY_SLOT=0 the default for 64-bit machines.

Version 1.4.5: (Posted 1 December 2006)
Fixed another bitmap related bug introduced in version 1.2.4 that caused
 half of the found factors to be incorrectly reported as duplicates on
 64-bit machines. Thanks Ed for the report.
Added a warning to the linux64-k8 binary that it is untested.

Version 1.4.4: (Posted 30 November 2006)
Save and restore r2 register in expmod-ppc64.S, fixes segfault on PPC/Linux.
 Thanks Ed for the report and Mark for the fix.
A few more tweaks to the i386 assembler mulmod/powmod code: 2% faster on P4,
 no change for P3.
The range `100,101' in sr5work.txt can now be given as `100-101' or `100 101'
 if preferred. Thanks Micha for the suggestion.
Report the expected number of factors for a range when beginning a new range
 and log along with the actual number found when the range is finished.
Fixed trial factoring in core32() which could cause init delays for
 sequences with large prime k. Thanks Citrix for reporting this bug.

Version 1.4.3: (Posted 27 November 2006)
Fixed an overflowing left shift in bitmap.h that wrecked havoc with the
 bitmaps on machines where uint_fast32_t is wider than 32 bits. This bug was
 introduced in version 1.2.4 and probably caused about 75% of factors to be
 missed on affected machines. Thanks Ed for the help tracking this problem
 down.
Test for __ppc64__ or __powerpc64__ to recognise PowerPC 64.

Version 1.4.2: (Posted 26 November 2006)
Fixed a typo in arithmetic.h which was preventing the sqrmod code being used.
Test sqrmod64() in srtest too.
Restored ASFLAGS for ppc64 which were accidentally deleted in version 1.4.1.
Made assembler pre2_* functions into PRE2_* macros. Benefits GCC 4.1.
Better FPU instruction scheduling in i386 assembler mulmod64()/powmod64().
 Speedup for P3 is about 10% compared to version 1.4.0.

Version 1.4.1: (Posted 24 November 2006)
Fixed mpz_get/set_uint64() in srtest to work on 32-bit MSB systems.
Added a 'make check' target which builds and runs srtest.
Renamed assembler *.s files to *.S so that CPP can remove comments.
Added NEED_UNDERSCORE option to config.h for those systems (mingw32, OS X)
 which need an underscore prepended to global assembler symbols.
Run 'make ARCH=ppc64linux' to compile for Linux/PPC64 (same as ARCH=ppc64
 but no underscores on global assembler symbols, registers rN renamed to N.
 This is just for ease of testing as there are still unresolved problems
 with this build).

Version 1.4.0: (Posted 22 November 2006)
New i386 assembler mulmod64() and powmod64() functions give correct results
 for all primes up to 2^62. Testing against GMP revealed that all earlier
 versions could give occasional incorrect results for primes as low as 2^46.
 (To date the Base 5 project distributed sieve has not yet reached 2^42).
Added sqrmod64() function for use by generic powmod64().

Version 1.3.5:
Print Legendre symbol table data when compiled with DEBUG=yes.

Version 1.3.4: (Posted 19 November 2006)
Exchange %ebx,%ebp in powmod64().
Set CONST_EMPTY_SLOT in hashtable.h to use a constant value to mark empty
 hashtable slots. This requires one extra 16-bit register/constant comparison
 in lookup(), but avoids a 64-bit register/memory comparison when the slot is
 in fact empty. A 3% gain for P2/P3 machines, 1% for the P4.

Version 1.3.3: (Posted 31 October 2006)
When range is complete write the number of factors found to sr5sieve.log.

Version 1.3.2: (Posted 28 October 2006)
Save the factor count to the checkpoint file so that status line reports
 total factors found since the start of the current range. Thanks `tnerual'
 for the suggestion.

Version 1.3.1: (Posted 24 October 2006)
Assembler powmod64() for i586.
Check whether -ckb^n is a quintic residue.

Version 1.3.0: (Posted 20 October 2006)
Check whether -ckb^n is a cubic or quartic residue before adding k*b^n+c to
 the BSGS list.
Assembler powmod64() for i686 (just hand tweaking of the GCC output).
Removed redundant SUBSEQ[].mcount field when not debugging.
Allow sieving with p < 2^32 provided p is greater than the greatest k value.
 (pmin is automatically increased to kmax+1 with a warning if necessary).
Ensure that the number of baby steps cannot exceed maximum hash table size.

Version 1.2.7: (Posted 20 October 2006)
Compute (p/2)%m instead of [p%(2*m)]/2 in setup64().
Added -r and -s command line switches to read SoB.dat and riesel.dat when
 compiled with BASE=2.

Version 1.2.6: (Posted 1 October 2006)
Fixed yet another division by zero, this one in progress_report() occurs if
 more than one factor is found per millisecond. Thanks to Micha for
 reporting this bug.
Removed a redundant call to fill_bits() in prime_sieve().
Added memset_fast32() to replace memset() in prime_sieve() and make_bitmap().

Version 1.2.5: (Posted 28 September 2006)
Fixed an array bound bug introduced in version 1.2.4. Only affected GCC 3.4,
 and then only when sr5data.txt contained more than 320 sequences.
Fixed a division by zero in print_status() that occurs in versions 1.2.[34]
 if a factor is found before one calendar second has elapsed. Thanks to
 Carlos for reporting this bug.

Version 1.2.4: (Posted 27 September 2006)
Use uint_fast32_t type for bitmap words. This should give ideal results on
 both 32-bit and 64-bit machines.
Error instead of warning if there is a problem writing to the factors file.
Write all warning and error messages to the log file.
Added code for i386 to avoid computing some 64->32 remainders (which require
 a library call) by computing some extra 32->32 remainders (which can be
 done inline). However the gain is slight, 0.5% at best.

Version 1.2.3: (Posted 25 September 2006)
Precompute Legendre(-ckb^n,p) for each sequence k*b^n+c and store the
 positive results in a bitmap. This increases memory use and initialisation
 time significantly, but also increases throughput by 3-12% depending on
 machine (3% for P4/Celeron, 8% for Katmai P3, 12% for Coppermine P3).
Print some progress messages during the initialisation step.
Use non-scrolling output for progress reports.

Version 1.2.2: (Posted 17 September 2006)
Variable sized local arrays are slower with GCC 3.4, faster with other GCC
 versions. Use fixed size local arrays when compiling with GCC 3.4.

Version 1.2.1: (Posted 13 September 2006)
Reduce HASH_MAX_DENSITY from 0.8 to 0.65.
setup64() routine now efficiently handles sequences with both odd and even n.

Version 1.2.0: (Posted 10 September 2006)
For each sequence k*5^n+c, check whether -ck (or -5ck if n is odd) is a
 quadratic residue with respect to p. If not, don't apply BSGS to this
 sequence for p. This increases throughput by 28% on my P3.

Version 1.1.6:
Use uniformly sized bitmaps for each subsequence so .m_low and .m_high
 fields are no longer needed.
Removed unnecessary sequence .type field.

Version 1.1.5: (Posted 6 September 2006)
New invmod32_64() function taken from Jason Papadopoulos's Msieve 1.10
 results in a 10% speedup on my P3.
Removed unused mod64(), addmod64(), submod64() functions.

Version 1.1.4: (Posted 3 September 2006)
Uncommented changes to assembler verions of memset32_8() which were
 accidentally left commented out in version 1.1.3.
Take advantage of the fact that all our sequences k*b^n+c have c=+/-1 to
 save one mulmod when computing -c/k (mod p).

Version 1.1.3: (Posted 1 September 2006)
Relaxed asm constraints on i386 memset32_8(). Added x86-64 version.
Small improvement to powmod64() saves one mulmod per call.
Removed unused sieve_high variable.
Use invmod32_64(a,p) instead of invmod64(a,p), gives 10% speedup on my P3.

Version 1.1.2: (Posted 27 August 2006)
Removed unused lmod64().
Unrolled clear_hashtable() loop, optimising seperately for 32 or 64 bit
 machines, with inline assembler version for i386 (about 5% faster on P3).

Version 1.1.1: (Posted 12 August 2006)
Adjusted the formula for choosing b^Q to favour slightly lower Q. sieving in
 base 5^60 is a little faster than in base 5^240 with the current (309
 sequences) sr5data.txt.

Version 1.1.0: (Posted 9 August 2006)
Changed the way that Q is chosen for sieving in base b^Q, uses the same
 method as srsieve 0.4.1 allowing more Q values to be considered.

Version 1.0.1:
Added ARCH=k8 entry in Makefile.
Removed unused remaining_terms variable.
Changed pre2_mulmod64_init() to make use of stack created by mod64_init().

Version 1.0.0: (Posted 28 July 2006)
Split from srsieve source archive srsieve-0.3.13.tar.gz.
Made many variables into compile-time constants.
Removed sections of the code that never get used, e.g. 32 bit arithmetic.
