tech-userlevel archive

# Re: silly behavior of factor(6)

```On Fri, May 14, 2010 at 06:15:43AM +0000, David Holland wrote:
> Specifically, I see four criteria:
>
>    1. The numbers printed, when multiplied together, should equal the
>       input number.
>    2. The numbers printed should be uniquely determined.
>    3. The numbers printed should be prime except for special cases.
>    4. The numbers printed should be prime in the strictest sense.
>
> [...] This leaves these possibilities:
>    - for 1: print 1, or print no factors;
>    - for 0: print 0, or error;
>    - for negatives, insert -1 and factor the absolute value, or error.
>
> For each of these, the first case satisfies the first three criteria
> but not the fourth; the second case satisfies the fourth as well.
> Therefore it seems that there are only two real possibilities here,
> and the choice is whether to adopt the fourth criterion or relax it.
>

Perhaps I missed something in your analysis, but it seems like criterion 3 and 4
are somewhat mutually exclusive. For how can criterion 3 allow special cases if
those special cases would then violate criterion 4?

--
Christopher Berardi
http://www.natoufa.com/

Be still, and know that I am God (Psalms 46:10)
```

Home | Main Index | Thread Index | Old Index