Re: What's ANSI Up To?

Ken Tilton <kennytilton@xxxxxxxxxxxxx> writes:

Scott Burson wrote:
On Sep 12, 9:34 pm, Ken Tilton <kennytil...@xxxxxxxxxxxxx> wrote:

Listen, - is the only Lisp operator with two entries in the CLHS under
No it's not. / behaves the same way: in the unary case, it applies
the operation to the identity value (in this case, the multiplicative
identity value, 1) and the single argument.

Thanks, I was hoping I could sucker someone into doing my legwork for
me. <g>

Btw, I did not even know that (/ 2) -> 1/2, and I only learned a
coupla months ago here that 1/2 was legal syntax.... hmmm, I think we
should add that to the list of Lisp Sins.

One reason there are two signature lines for -, btw, is that the functions
are really different in that case. It's more of an overloading, not the
usual degenerate case of a generic function on n args...

(- 0 0.0) => 0.0
(- 0.0 0.0) => 0.0

(- 0.0) => -0.0

Note the latter is negation, not subtraction, and is managed differently.
I think it's IEEE that says this is the right thing, and I think they
got this one right.