[Top][All Lists]

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

Re: -0.0 treated as negative?

From: Andy Wingo
Subject: Re: -0.0 treated as negative?
Date: Mon, 07 Jun 2010 23:28:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Hi Bill,

On Mon 07 Jun 2010 16:00, "Bill Schottstaedt" <address@hidden> writes:

> I just noticed a case where -0.0 is apparently negative:
> scheme@(guile-user)> (/ 1.0 -0.0)   
> -inf.0
> scheme@(guile-user)> (negative? -0.0)
> #f

Interesting. R5RS seems to be mute on negative zeros. The behavior of
negative? is correct according to R6RS, and the result (/ 1.0 -0.0)
follows IEEE 754, I think; so while odd, it does not seem to be a bug.
Let me know if I'm missing something here.

> scheme@(guile-user)> (expt #t 0)
> 1

Haha, that's amusing :) Will fix. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]