summaryrefslogtreecommitdiffstats
path: root/games/primes
Commit message (Collapse)AuthorAgeFilesLines
* dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
|
* Merge from head@274682sjg2014-11-194-10/+209
|\
| * Switch primes(6) from using unsigned long to using uint64_t. This fixescperciva2014-09-272-11/+14
| | | | | | | | | | 'limited range of type' warnings about comparisons on 32-bit systems, and allows 32-bit systems to compute the full range of primes.
| * Correctly enumerate primes between 4295098369 and 3825123056546413050.cperciva2014-09-264-2/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit, primes(6) relied solely on sieving with primes up to 65537, with the effect that composite numbers which are the product of two non-16-bit primes would be incorrectly identified as prime. For example, # primes 1099511627800 1099511627820 would output 1099511627803 1099511627807 1099511627813 when in fact only the first of those values is prime. This commit adds strong pseudoprime tests to validate the candidates which pass the initial sieving stage, using bases of 2, 3, 5, 7, 11, 13, 17, 19, and 23. Thanks to papers from C. Pomerance, J.L. Selfridge, and S.S. Wagstaff, Jr.; G. Jaeschke; and Y. Jiang and Y. Deng, we know that the smallest value which passes these tests is 3825123056546413051. At present we do not know how many strong pseudoprime tests are required to prove primality for values larger than 3825123056546413050, so we force primes(6) to stop at that point. Reviewed by: jmg Relnotes: primes(6) now correctly enumerates primes up to 3825123056546413050 MFC after: 7 days Sponsored by: EuroBSDCon devsummit
* | Updated dependenciessjg2014-05-161-1/+0
| |
* | Updated dependenciessjg2014-05-101-0/+2
| |
* | Merge headsjg2014-04-281-1/+1
|\ \ | |/
| * NO_MAN= has been deprecated in favor of MAN= for some time, go aheadimp2014-04-131-1/+1
| | | | | | | | | | | | and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit.
* | Updated dependenciessjg2013-03-111-0/+1
| |
* | Updated dependenciessjg2013-02-161-2/+0
| |
* | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+20
|/ | | | Requested by: Simon Gerraty <sjg@juniper.net>
* Remove the third clause for the Berkeley parts of games, per theimp2010-02-154-20/+4
| | | | letter in /COPYRIGHT.
* Start the dreaded NOFOO -> NO_FOO conversion.ru2004-12-211-1/+1
| | | | OK'ed by: core
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+2
| | | | any fake value.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-012-2/+2
| | | | especially in troff files.
* Last commit was slightly hasty: #include <string.h> is required onfanf2002-10-091-0/+1
| | | | -CURRENT to be WARNS-safe (but not -STABLE for some reason)
* Kill obsolete #include <memory.h> which I didn't spot earlier becausefanf2002-10-091-1/+0
| | | | it's still in the NetBSD version.
* Style fixes to: #include ordering; use const and static; ANSI functions;fanf2002-10-094-33/+39
| | | | | | | | | various usage synopses; bogus and/or unnecessary casting; exit values; use LINE_MAX instead of magic numbers; declare extern variables in a header; add $FreeBSD$ where missing. Reviewed by: markm, obrien Obtained from: NetBSD | fanf
* staticize functions and variablesbillf2002-02-212-19/+17
| | | | | | change function declarations to ANSI change a variable that stores sizeof() values to size_t use return to escape the end of main(), not exit(3)
* use the typedef 'ubig' to declare pr_limit, not what ubig is typedef'dbillf2002-02-211-1/+1
| | | | | | | | to be. PR: misc/35181 Submitted by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> MFC after: 3 days
* Remove __Pimp2002-02-181-3/+3
| | | | | | Remove __STDC__ (which means we now use stdarg rather than vararg) Remove register Remove main prototype
* Fix a typo. While 'iff' might make sense in a mathematics-related text,roam2001-12-271-1/+1
| | | | | | | 'if and only iff' does not. PR: 33242 Submitted by: Eric Yu <ericyu@mail2000.com.tw>
* copyright/sccsid/rcsid cleanup.billf1999-11-303-3/+13
|
* Sync our register usage with NetBSD's (non-)usage.billf1999-11-161-5/+5
|
* Add $FreeBSD$billf1999-11-161-0/+2
|
* Fix printf errors in the hflag case.imp1999-01-061-2/+2
| | | | | | | Fix old bug with bogus casing to (long). Document the true limits of factor on 64-bit architectures. Submitted by: bde
* added -h flag to allow for hexidecimal output.imp1999-01-061-8/+13
| | | | | | | | | | Use '0' for base rather than 10 to allow for more flexible input bases. Inspired by changes in PR 7402, but mostly redone by me to get past bde filter. Submitted by: Timo J. Rinne PR: 7402
* Revert the last commit, it made the Bruce filter flip:phk1998-08-091-18/+13
| | | | | | | | | | | | | | | | PR7402 was even less suitable for committing almost verbatim than at first appearance. Rev.1.9 of primes.c has at least the following defects. - no update for man page. - no update for usage string. - blowing away of a previous commit to change EOF to -1 in getopt() test. - blowing away of a previous commit to fix printf format errors. - new printf format errors. - one gratuitous ANSIism. - two style bugs. - ... and a partition in a pear tree. PR: 7402
* Games primes and factor don't understand hexadecimals.phk1998-08-071-13/+18
| | | | | | | | This would make these `games' somewhat useful tools. PR: 7402 Reviewed by: phk Submitted by: Timo J. Rinne <tri@iki.fi>
* Fixed printf format errors.bde1998-06-301-2/+2
|
* Cast pointers to longs, not ints.jb1998-05-091-3/+3
| | | | | Hopefully that's the last of the 64-bit cleaning of src/games. That is, without adding -Wall to the compiler flags. That's not a pretty sight.
* Wargh! Who went and changed all the getopt() comparisons from -1 tojkh1998-03-011-1/+1
| | | | | | | EOF? The getopt(3) manpage clearly states that the return value is *-1*, not EOF! Besides, getopt(3) isn't reading from a file. :) Noticed-while: merging to 2.2 (where this is correct).
* Remove so-called revoke, this game never installed sguidache1997-09-011-4/+0
|
* Change games from setuid games to setgid games.eivind1997-09-011-0/+4
| | | | | Reviewed by: maybe@yes.no Obtained from: OpenBSD (mostly deraadt@openbsd.org)
* Merge from Lite2 (oops, nearly forgot these ones)peter1997-03-111-1/+2
|
* Remove trailing whitespace.rgrimes1995-05-303-6/+6
|
* Bring in the 4.4 Lite games directory, modulo man page changes and segregationjkh1994-09-045-0/+1379
of the x11 based games. I'm not going to tag the originals with bsd_44_lite and do this in two stages since it's just not worth it for this collection, and I've got directory renames to deal with that way. Bleah. Submitted by: jkh
OpenPOWER on IntegriCloud