bug-guile
[Top][All Lists]
Advanced

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

-0.0 treated as negative?


From: Bill Schottstaedt
Subject: -0.0 treated as negative?
Date: Mon, 7 Jun 2010 07:00:42 -0700

I just noticed a case where -0.0 is apparently negative:

scheme@(guile-user)> (/ 1.0 0.0)
+inf.0
scheme@(guile-user)> (/ -1.0 0.0)
-inf.0
scheme@(guile-user)> (/ 1.0 -0.0)   
-inf.0
scheme@(guile-user)> (/ -1.0 -0.0)
+inf.0
scheme@(guile-user)> (negative? -0.0)
#f

And here's a separate oddity:

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




reply via email to

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