From dc738f052f397496c658ec837c8cf9b3510d78ca Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 15 May 2010 21:22:39 +0000 Subject: Follow the Fundamental Theory of Algebra. Disallow factorising of numbers less than 2 as it is not - naturally unique (negative numbers) - finite (0) - non-empty (1) Discussed with the kristaps and wiz --- factor/factor.6 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'factor/factor.6') diff --git a/factor/factor.6 b/factor/factor.6 index 69b1c535..32029eca 100644 --- a/factor/factor.6 +++ b/factor/factor.6 @@ -1,4 +1,4 @@ -.\" $NetBSD: factor.6,v 1.11 2010/04/22 06:57:13 wiz Exp $ +.\" $NetBSD: factor.6,v 1.12 2010/05/15 21:22:39 joerg Exp $ .\" .\" Copyright (c) 1989, 1993 .\" The Regents of the University of California. All rights reserved. @@ -37,7 +37,7 @@ .\" .\" chongo /\oo/\ .\" -.Dd April 22, 2010 +.Dd May 15, 2010 .Dt FACTOR 6 .Os .Sh NAME @@ -49,7 +49,7 @@ .Sh DESCRIPTION The .Nm -utility factors positive integers. +utility factors integers larger than 1. When a number is factored, it is printed, followed by a .Dq \&: , and the list of @@ -68,8 +68,8 @@ is invoked with no arguments, .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 +, although negative numbers -are rejected. +Numbers may be preceded by a single +. +Integer less than 2 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 -- cgit v1.2.3