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

**To**:**tech-userlevel%NetBSD.org@localhost****Subject**:**Re: silly behavior of factor(6)****From**:**Christopher Berardi <cberardi%natoufa.com@localhost>**- Date: Sat, 15 May 2010 15:58:32 -0400

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)

**Follow-Ups**:**Re: silly behavior of factor(6)***From:*David Holland

**References**:**Re: silly behavior of factor(6)***From:*David Holland

**silly behavior of factor(6)***From:*David Holland

**Re: silly behavior of factor(6)***From:*markucz

**Re: silly behavior of factor(6)***From:*Kristaps Dzonsons

**Re: silly behavior of factor(6)***From:*Robert Elz

**Re: silly behavior of factor(6)***From:*David Holland

**Re: silly behavior of factor(6)***From:*Kristaps Dzonsons

**Re: silly behavior of factor(6)***From:*David Holland

**Re: silly behavior of factor(6)***From:*David Holland

- Prev by Date:
**vi: invalid conversion, truncated file** - Next by Date:
**Re: silly behavior of factor(6)** - Previous by Thread:
**Re: silly behavior of factor(6)** - Next by Thread:
**Re: silly behavior of factor(6)** - Indexes: