Re: CVS commit: src/games/factor

2010-05-16 Thread Aleksej Saushev
Joerg Sonnenberger jo...@britannica.bec.de writes: On Sat, May 15, 2010 at 09:44:34PM +, David Holland wrote: On Sat, May 15, 2010 at 09:22:39PM +, Joerg Sonnenberger wrote: Modified Files: src/games/factor: factor.6 factor.c Log Message: Follow the Fundamental Theory

Re: CVS commit: src/games/factor

2010-05-16 Thread David Laight
On Sat, May 15, 2010 at 09:22:39PM +, Joerg Sonnenberger wrote: Log Message: 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) The 'Natural numbers (N)' are the positive

Re: CVS commit: src/games/factor

2010-05-16 Thread Martin Husemann
On Sun, May 16, 2010 at 09:54:49AM +0100, David Laight wrote: The notion of 'primes' is valid in Z - the definition of a prime is a number that has no non-unit factors. Well, I only took the forced (for CS students) math courses at university, and it's been quite some time, but I would have

Re: CVS commit: src/games/factor

2010-05-16 Thread Aleksej Saushev
David Laight da...@l8s.co.uk writes: On Sat, May 15, 2010 at 09:22:39PM +, Joerg Sonnenberger wrote: Log Message: 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)

Re: CVS commit: src/games/factor

2010-05-16 Thread Aleksej Saushev
Martin Husemann mar...@duskware.de writes: On Sun, May 16, 2010 at 09:54:49AM +0100, David Laight wrote: The notion of 'primes' is valid in Z - the definition of a prime is a number that has no non-unit factors. Well, I only took the forced (for CS students) math courses at university, and

Re: CVS commit: src/games/factor

2010-05-16 Thread Joerg Sonnenberger
On Sun, May 16, 2010 at 02:10:35PM +0400, Aleksej Saushev wrote: Following the logic Joerg uses, one should reject all arguments to sqrt, asin, acos, atan, clog, casinh, cacosh, and other inverse functions just because they have more than one branch. In fundamental theory of mathematics be it

Re: CVS commit: src/games/factor

2010-05-16 Thread Joerg Sonnenberger
On Sun, May 16, 2010 at 11:03:42AM +0400, Aleksej Saushev wrote: Yes and it was quite interesting. I don't like your single-handed decision, referring to wiz or kristaps doesn't make honour to any of them (did Thomas present any arguments in public at all?). Essentially, you're using force

Re: CVS commit: src/games/factor

2010-05-16 Thread Quentin Garnier
On Sun, May 16, 2010 at 02:10:35PM +0400, Aleksej Saushev wrote: [...] So nothing about algebra stops you factoring negative numbers. However, since the 'prime factors' should be prime numbers, they shouldn't include -1, but maybe the smallest factor should be negative. While it may be

Re: CVS commit: src/games/factor

2010-05-16 Thread Martin Husemann
On Sun, May 16, 2010 at 01:11:08PM +, Quentin Garnier wrote: [..] The likely source for input for factor(6) is a cut-and-paste, or the end of a pipeline crunching some numbers. Sounds like quite a stretch from common sense to a pipeline of number crunching scripts with factor at the end,

Re: CVS commit: src/games/factor

2010-05-16 Thread Martin Husemann
On Sun, May 16, 2010 at 04:26:32PM +0200, Martin Husemann wrote: [..] We should make our factor(6) compaible to the coreutils one, just in case POSIX picks it up in the next revision ;-} Just in case it's not clear from upthread (tech-userlevel): that compatibility means: - negative input

Re: CVS commit: src/games/factor

2010-05-16 Thread David Laight
On Sun, May 16, 2010 at 11:37:43AM +0200, Martin Husemann wrote: On Sun, May 16, 2010 at 09:54:49AM +0100, David Laight wrote: The notion of 'primes' is valid in Z - the definition of a prime is a number that has no non-unit factors. Well, I only took the forced (for CS students) math

Re: CVS commit: src/games/factor

2010-05-16 Thread Aleksej Saushev
Joerg Sonnenberger jo...@britannica.bec.de writes: On Sun, May 16, 2010 at 11:03:42AM +0400, Aleksej Saushev wrote: Yes and it was quite interesting. I don't like your single-handed decision, referring to wiz or kristaps doesn't make honour to any of them (did Thomas present any arguments

Re: CVS commit: src/games/factor

2010-05-16 Thread Aleksej Saushev
Joerg Sonnenberger jo...@britannica.bec.de writes: On Sun, May 16, 2010 at 02:10:35PM +0400, Aleksej Saushev wrote: Following the logic Joerg uses, one should reject all arguments to sqrt, asin, acos, atan, clog, casinh, cacosh, and other inverse functions just because they have more than one

Re: CVS commit: src/games/factor

2010-05-16 Thread Dennis den Brok
On 2010-05-16, David Laight da...@l8s.co.uk wrote: The definition of primality gets taken from that of the positive (or non-negative integers) and applied more generally to other mathematical objects - in particular 'fields'. In field theory you need a definition that applies to any field, not

Re: CVS commit: src/games/factor

2010-05-16 Thread Joerg Sonnenberger
On Sun, May 16, 2010 at 08:12:57PM +0400, Aleksej Saushev wrote: I have spent several years studying math and I say that this approach is wrong both in mathematical and procedural sense. It is perfectly valid to count 0, +1 and -1 as prime numbers and thus factor any finite ones, it just

Re: CVS commit: src/games/factor

2010-05-16 Thread David Holland
On Sun, May 16, 2010 at 04:30:45PM +0200, Martin Husemann wrote: [..] We should make our factor(6) compaible to the coreutils one, just in case POSIX picks it up in the next revision ;-} Just in case it's not clear from upthread (tech-userlevel): that compatibility means: -

re: CVS commit: src/games/factor

2010-05-16 Thread matthew green
I'm surprised to see so little common sense in all the discussions about factor(6). The reasons why 1, -1 or negative numbers are not defined as i couldn't agree more. i don't even seen why it matters what the definition of prime is for this. irrespective of what a prime number is, 1 is a

Re: CVS commit: src/games/factor

2010-05-16 Thread Martin Husemann
On Sun, May 16, 2010 at 07:30:54PM +, David Holland wrote: of which at least the 0 case is clearly incorrect... That obviously depends on the meaning you give the output, which is not well defined in the man page and obviously a lot people around here disagree about. I would say the list of

Re: CVS commit: src/games/factor

2010-05-16 Thread Joerg Sonnenberger
On Mon, May 17, 2010 at 12:47:53AM +0400, Aleksej Saushev wrote: Joerg Sonnenberger jo...@britannica.bec.de writes: On Sun, May 16, 2010 at 08:12:57PM +0400, Aleksej Saushev wrote: I have spent several years studying math and I say that this approach is wrong both in mathematical and

Re: CVS commit: src/games/factor

2010-05-16 Thread Aleksej Saushev
Martin Husemann mar...@duskware.de writes: On Sun, May 16, 2010 at 07:30:54PM +, David Holland wrote: of which at least the 0 case is clearly incorrect... That obviously depends on the meaning you give the output, which is not well defined in the man page and obviously a lot people

Re: CVS commit: src

2010-05-16 Thread David Holland
On Sun, May 16, 2010 at 03:33:30PM +, Jukka Ruohonen wrote: As was done with the man-page for sys/types.h, move dir(5) to dirent(3). Add a table describing the stat - dirent types. Note IFTODT() and DTTOIF(). Once upon a time, that page documented the on-disk format of FFS directories,

Re: CVS commit: src/games/factor

2010-05-16 Thread Aleksej Saushev
Joerg Sonnenberger jo...@britannica.bec.de writes: On Mon, May 17, 2010 at 12:47:53AM +0400, Aleksej Saushev wrote: Joerg Sonnenberger jo...@britannica.bec.de writes: On Sun, May 16, 2010 at 08:12:57PM +0400, Aleksej Saushev wrote: I have spent several years studying math and I say that

Re: CVS commit: src/games/factor

2010-05-16 Thread David Holland
On Sun, May 16, 2010 at 10:49:22PM +0200, Martin Husemann wrote: On Sun, May 16, 2010 at 07:30:54PM +, David Holland wrote: of which at least the 0 case is clearly incorrect... That obviously depends on the meaning you give the output, which is not well defined in the man page and

Re: CVS commit: src/games/factor

2010-05-16 Thread Jukka Ruohonen
On Sun, May 16, 2010 at 01:11:08PM +, Quentin Garnier wrote: Honestly, I don't see anyone doing stricto sensu maths on a computer limiting their tools to NetBSD'd games.tgz. Indeed. Maybe add some math book as a reference so that we can blame the author instead of each other from the