Re: On writing negative zero - with or without sign



To summarize:

Point one: when used to simulate the continuous real numbers,
floating point is *always* inexact. There is no "exact zero",
or any other real number. There are only approximations.
There is no such thing as an "exact zero" (or any other "exact"
number) when using float for simulating continuous reals
because that's an inherent property of the use of *any* discrete
representation to simulate continuous values. Nor is there any
reason zeros can't have signs. Numbers were invented by people.
People have in fact invented several thousand different kinds
of mathematics (my introductory abstract algebra course covered
nearly a hundred). To invent a number system with signed
zeros is neither shocking nor illicit. It's damned useful. Claiming
that zeros *can't* have signs under any circumstances because
of some inherent characteristics they have is correctly identified
as numerological mysticism. In a given invented number system,
signs can adorn anything the inventors want them to.

Point two: on output the I/O implementation should always
correctly display a minus sign if the number's internal sign
bit was set. This is true for all magnitudes of values being
output. Not to do so is irresponsible.

Now, another contributor to this thread consistently confuses
these separate points. They have nothing to do with one another.
A clear demonstration of the fact that differences of identically
represented numbers are *not* exact zeros verifies the first
point. Nothing about that example is relevant to the second
point in any way at all. Similarly,since the I/O library has
no idea about the origin or meaning of

--
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare


.



Relevant Pages

  • Re: On writing negative zero - with or without sign
    ... number) when using float for simulating continuous reals ... representation to simulate continuous values. ... But that doesn't mean that zeros must always have signs. ... To invent a number system with signed ...
    (comp.lang.fortran)
  • Re: Adding Regressors to ARIMA.
    ... differencing produces an MA process with zeros on the unit circle.. ... to invent or reinvent incorporating functions of t circa 1988 into the ... AR model which predates the W.S. WEI book. ...
    (sci.stat.math)