Re: Positive random number



santosh said:

Johannes Bauer wrote:

<snip discussion about whether zero should be considered
positive or not>

The status of zero in mathematics seems to be similar to that of the
photon in physics. The "correct" definition in a particular case is the
definition that yields good results!

The important thing is not what mathematicians think about 0, but what C
programmers think about 0. And it can be shown from the Standard that 0 is
neither positive nor negative.

See, for example, 3.3.5 (Multiplicative operators - and I'm quoting from
C89 here), which says (of division / and modulo %) that "if the value of
the second operand is zero, the behavior is undefined", before going on to
define the behaviour for positive and negative operands. If zero is either
positive or negative, a contradiction arises. Therefore, it cannot be
either.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.



Relevant Pages

  • Re: Bobby Fischers Conquest of Everest..
    ... attended Robin Wilson?s talk a few months ago about zero in mathematics ... more important and pivotal in all sorts of ways of thinking about the ... the void and the vacuum that we?re familiar with. ...
    (rec.games.chess.misc)
  • Re: Bobby Fischers Conquest of Everest..
    ... attended Robin Wilson?s talk a few months ago about zero in mathematics ... more important and pivotal in all sorts of ways of thinking about the ... the void and the vacuum that we?re familiar with. ...
    (rec.games.chess.misc)
  • Re: The annotated annotated annotated C standard
    ... outside the Standard in order to achieve a platform-specific goal. ... mathematics found itself ... it is true that there are some cases where division by zero ...
    (comp.programming)
  • Re: The annotated annotated annotated C standard
    ... outside the Standard in order to achieve a platform-specific goal. ... mathematics found itself ... it is true that there are some cases where division by zero ...
    (comp.programming)
  • Re: .999... ?= 1
    ... the meaning of a number it might be premature to exclude the possibility ... For instance zero ... much of decimals (or alternatively an overbar even in case of omitted ... Now we are at the roots of mathematics. ...
    (sci.math)