tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: silly behavior of factor(6)



On Fri, Apr 23, 2010 at 06:13:14PM +0700, Robert Elz wrote:
 > That is, as has been stated, it makes no sense to even consider factoring 0
 > (I agree it doesn't make much sense to attempt to factor 1 either, but I
 > don't mind that factor pretends that it can) - so, what's wrong with using 0
 > as a "quit now" input value?

Nothing, except that it doesn't make sense to interpret it that way
when passed on the command line.

I'm currently inclined to change it to error on 0, print a leading -1
for negatives, and leave the rest alone...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index