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

Re: negative zero




Ah, now that actually makes sense!

I think (and I might mention this to the appropriate powers that be) that
when design decisions are made for those reasons, they need to be noted in
the R^nRS spec!  Otherwise, people might think the design decision was made
because Scheme thinks it's the most ideal design rather than a purely
pragmatic one.

They noted the behavior for the round function for similar reasons, citing
that it rounds to even integers in order to conform to IEEE floating point
standards.

I think the behavior of round is totally reprehensible and unsuitable for
pixel rounding or doing business programming (or any other purpose I can
even imagine) so I write my own rounding functions for those purposes; but
I'm at least empathetic with Scheme's design decisions because at least
they explained the rationale.

I think it's quite sad that Scheme makes design decisions based on such
pragmatic concerns.  I'd rather (for instance) have round do the right
thing and ceiling not return negative 0; and have libraries of Scheme
idioms available to people for doing things the wrong/pragmatic ways (call
it the IEEE code library).

The problem with deciding for the pragmatic is that when things change
industry-wide (as they often do, despite how entrenched they appear),
you're left with incomprehensible artifacts of a bygone age codified into
the language as the standard.

I thought Common LISP was the language committed to industry, backward
compatibility, and the pragmatic; not Scheme!!!




John Clements <clements@cs.rice.edu> on 06/20/2000 04:22:40 PM

To:   Andre_M_Van_Meulebrouck@countrywide.com
cc:   plt-scheme@fast.cs.utah.edu

Subject:  Re: negative zero


>What is the purpose in returning negative zero in the first place?

Negative zero is associated with IEEE numerical standards.  I just
did a little web-research, but you can probably do as well or better
than I did with your favorite search engine.  Suffice it to say that
in order to conform to IEEE floating point number standards (and to
exchange numerical data with other applications that conform to these
standards), you need to make room in your world for negative zero.

john