summaryrefslogtreecommitdiffstats
path: root/factor
Commit message (Collapse)AuthorAgeFilesLines
* Properly print string.joerg2011-05-231-3/+3
|
* Follow the Fundamental Theory of Algebra. Disallow factorising ofjoerg2010-05-152-14/+10
| | | | | | | | numbers less than 2 as it is not - naturally unique (negative numbers) - finite (0) - non-empty (1) Discussed with the kristaps and wiz
* cast isblank(3)'s argument to unsigned char.tnozaki2010-05-131-3/+3
|
* rename pollard_pminus1->pollard_rho for consistencydrochner2010-04-281-8/+6
|
* -Fix an old bug in the "pollard" code: it gets its argument passeddrochner2010-04-271-28/+59
| | | | | | | | | | | | by reference, and changes the value behind the pointer under some circumstances (basically if it finds more than 2 different factors). It also calls itself if it finds a factor which is not considered prime (by openssl's miller-rabin check) and uses the call argument afterwards. This doesn't work -- we need to copy the argument into its own storage. -Modify the code to do the "rho" algorithm as was initially announced. It takes somewhat longer in rare cases, but still works in cases where the "p-1" algorithm is unusable. This might fix PR misc/43192 by Luiz Henrique de Figueiredo. -Add some optional debug support, minor cleanup.
* fix an obvious flaw in bounds check: the array of precomputed primesdrochner2010-04-221-4/+5
| | | | | could be overrun if its last entry (65537) was a factor of the input (this does not affect PR misc/43192 -- the factors are much larger here: 7742394596501*159455563099482401)
* Add backslash before a dash to get a minus.wiz2010-04-221-3/+3
|
* Sync with reality. Bump date.dholland2010-04-221-11/+27
|
* sprinkle staticdholland2009-08-121-16/+15
|
* Remove the \n and tabs from the __COPYRIGHT() strings.lukem2008-07-201-4/+4
|
* convert __attribute__s to applicable cdefs.h macrosperry2007-12-151-3/+3
|
* Fixed a comment that said the factors in the output would be strictlyrillig2005-06-271-3/+3
| | | ascending.
* Add -lcrypt where -lcrypto is specified.christos2005-03-091-3/+3
|
* Separate primes manpage from that of factor. Correct DIAGNOSTICSjsm2004-02-082-46/+7
| | | information.
* Check large factor for being prime before applying Pollard'sjsm2004-02-081-6/+14
| | | | | | algorithm; fixes "factor 2147483647111311". Correct comment; algorithm is Pollard p-1, not Pollard rho. Increase base if p-1 algorithm reaches 1; fixes "factor 99999999999991". Testcases from David A Bagley <bagleyd@tux.org>.
* Move UCB-licensed code from 4-clause to 3-clause licence.agc2003-08-072-13/+5
| | | Patches provided by Joel Baker in PR 22269, verified by myself.
* Lots of minor fixes resulting from reading these man pages in detail.wiz2002-09-261-9/+6
|
* use NETBSDSRCDIR as appropriatelukem2002-09-191-3/+5
|
* Provide a BN_dec2bn() shim for the non-openssl case that reports an errorsimonb2002-06-181-3/+21
| | | if strtoul() fails.
* Fix a logic botch where if a number smaller than the square of the seivesimonb2002-06-171-12/+25
| | | | | | | | was prime to still called the Pollard Rho function when it didn't have to. Problem report by Nathan Williams. Unfortunately this one can't be picked up by a simple regression test since the broken way still produced the correct output, but just took far longer...
* make factor work with and without openssl.itojun2002-06-162-4/+55
|
* Use libcrypto's bignum support to implement a Pollard Rho factoringsimonb2002-06-152-40/+111
| | | algorithm so we can factorise numbers larger than a host long.
* Whitespace and/or punctuation fixes.wiz2001-04-021-5/+5
|
* Add use of `const' where appropriate to the games.jsm1999-09-081-5/+5
| | | | | | | | | This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at). Some such changes were previously covered in PRs bin/6041, bin/6146, bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994, bin/8039, bin/8057 and bin/8093.
* mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>)hubertf1998-09-131-3/+3
|
* use CPPFLAGS instead of CFLAGSlukem1997-10-221-2/+2
|
* WARNSifylukem1997-10-102-13/+14
|
* Back out the .PATH.c changes. The .depend problem (and others)gwr1997-05-081-2/+2
| | | will be fixed using the new .NOPATH make feature instead.
* Use .PATH.c: ...gwr1997-05-061-2/+2
|
* Sync to 4.4BSD-Lite2tls1997-01-071-3/+4
|
* merge with Lite, new RCS id conventions, etc.cgd1995-03-233-243/+103
|
* specify man pages the new way.cgd1994-12-221-2/+2
|
* bring in limits.hderaadt1994-03-031-1/+2
|
* Eliminate a compiler warning.mycroft1993-12-081-2/+2
|
* Update to use new -mandoc macros.jtc1993-08-051-40/+48
|
* Add RCS identifiers.mycroft1993-08-011-1/+2
|
* Add RCS indentifiers.mycroft1993-08-011-1/+2
|
* Add RCS identifiers.mycroft1993-08-011-1/+2
|
* initial import of 386bsd-0.1 sourcescgd1993-03-213-0/+472