tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: silly behavior of factor(6)
On Wed, Apr 28, 2010 at 12:30:29AM +0200, Kristaps Dzonsons wrote:
>> I'm currently inclined to change it to error on 0, print a leading -1
>> for negatives, and leave the rest alone...
>
> -1 isn't a prime factor. "Unless it is." I'll let this speak for
> itself as to the can of worms opened by introducing x<1 as input without
> having factor.6 contain a lesson in number fields. Please, please keep
> input in N.
And 1 has no prime factors either. That's great, but the whole point
of this thread is to strike a balance between what's strictly
meaningful and what makes the most ad hoc sense.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index