Module Name:    src
Committed By:   dholland
Date:           Thu Apr 22 04:42:21 UTC 2010

Modified Files:
        src/games/factor: factor.6

Log Message:
Sync with reality. Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/games/factor/factor.6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/factor/factor.6
diff -u src/games/factor/factor.6:1.9 src/games/factor/factor.6:1.10
--- src/games/factor/factor.6:1.9	Sun Feb  8 13:16:25 2004
+++ src/games/factor/factor.6	Thu Apr 22 04:42:21 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: factor.6,v 1.9 2004/02/08 13:16:25 jsm Exp $
+.\"	$NetBSD: factor.6,v 1.10 2010/04/22 04:42:21 dholland Exp $
 .\"
 .\" Copyright (c) 1989, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -37,7 +37,7 @@
 .\"
 .\"   chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\
 .\"
-.Dd February 8, 2004
+.Dd April 22, 2010
 .Dt FACTOR 6
 .Os
 .Sh NAME
@@ -49,10 +49,12 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility will factor integers between \-2147483648 and 2147483647 inclusive.
+utility factors positive integers.
 When a number is factored, it is printed, followed by a
 .Dq \&: ,
-and the list of factors on a single line.
+and the list of
+.Pq prime
+factors on a single line.
 Factors are listed in ascending order, and are preceded by a space.
 If a factor divides a value more than once, it will be printed more than once.
 .Pp
@@ -66,16 +68,30 @@
 .Nm
 reads numbers, one per line, from standard input, until end of file or error.
 Leading white-space and empty lines are ignored.
-Numbers may be preceded by a single - or +.
+Numbers may be preceded by a single - or +, although negative numbers
+are rejected.
 Numbers are terminated by a non-digit character (such as a newline).
 After a number is read, it is factored.
-Input lines must not be longer than 255 characters.
+Input lines must not be longer than
+.Dv LINE_MAX - 1
+(currently 2047) characters.
+.Pp
+By default,
+.Nm
+is compiled against the OpenSSL bignum implementation
+.Xr openssl_bn 3 ,
+which lets it handle arbitrarily large values.
+.Pq Note however that very large values can take a very long time to factor.
+If
+.Nm
+is compiled without OpenSSL it is limited to the maximum value of
+.Vt unsigned long .
 .Sh DIAGNOSTICS
 Out of range or invalid input results in
 an appropriate error message
 being written to standard error.
-.Sh BUGS
-.Nm
-cannot handle the
-.Dq 10 most wanted
-factor list.
+.\".Sh BUGS
+.\".Nm
+.\"cannot handle the
+.\".Dq 10 most wanted
+.\"factor list.

Reply via email to