"Don Guinn" <[EMAIL PROTECTED]> writes:

> One of the reasons that APL and now J have been so appealing to me is that
> they adhere to mathematics more than to computers. The developers
> have hidden the peculiarities of particular hardware platforms while
> maintaining reasonable efficiency. Taking advantage of peculiarities of IEEE
> floating point is simply locking one into a particular hardware platform.
> Ok, IEEE floating point is common to many platforms and probably on all that
> J support, but there are platforms that represent floating point
> differently. And IEEE floating point may be superseded in some future
> hardware. But if one really wants to take advantage of the peculiarities of
> IEEE then there are bunches of goodies in it beyond having both a positive
> and negative zero. Personally, I am glad that J does not.
>
> I have not followed this discussion too closely because it is trying to take
> advantage of a hardware peculiarity, but really - zero is not a positive
> number and neither is it a negative number. Just because it is internally
> formatted as a positive or negative number internally is just a convenience
> of a hardware design.

No. The point of ieee 754 was precisely to make the programmer's life easier
at the cost to putting an increased burden on hardware designers. Signed zero
isn't there because it's convenient from a hardware point of view, but because
it was deemed to be useful for writing robust numerical code, see e.g.

 http://docs.sun.com/source/806-3568/ncg_goldberg.html

or have a look at Kahan's website (who got a Turing award for his work on ieee
754). 

Personally I think the design is flawed (it looks to me like there should be 3
zeros, +0, 0 and -0 and that dividing by non-signed 0 ought to be always an
error and that the signed zeros should only result from underflowing
operations), but then I know next to nothing about numerics.

'as
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to