freebsd-skq/games
Tony Finch 38281fea3e Fix a performance bug in factor(6).
Check if large factor is prime before applying Pollard's algorithm;
fixes "factor 2147483647111311".  Increase base if p-1 algorithm
reaches 1; fixes "factor 99999999999991".

Testcases from David A Bagley <bagleyd@tux.org>.
Fixes from Joseph Myers <jsm@NetBSD.org>.
Problem rediscovered by an attempt to factor my phone number.

A few other incidental fixes: correct a couple of factually incorrect
comments; use ident string macros; move from 4-clause to 3-clause
BSD licence (University of California copyright).

Obtained from:	NetBSD
2009-11-26 00:38:13 +00:00
..
bcd Resolve a couple of warnings and bump WARNS to 6. 2004-07-11 17:26:18 +00:00
caesar Make caesar and pom WARNS 6 clean. While there, use prototypes everywhere. 2005-05-01 19:34:22 +00:00
factor Fix a performance bug in factor(6). 2009-11-26 00:38:13 +00:00
fortune Properly sort a math fortune after the changes in r193486 2009-11-07 22:13:29 +00:00
grdc
morse Fixed the output grammar to properly speak non-terminal dits. 2008-06-08 19:35:47 +00:00
number Make number(6) build with WARNS=6. 2009-10-13 06:25:53 +00:00
pom Make caesar and pom WARNS 6 clean. While there, use prototypes everywhere. 2005-05-01 19:34:22 +00:00
ppt Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
primes Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
random Suggections from bde@ 2008-08-11 23:24:42 +00:00
Makefile
Makefile.inc