unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* Re: -0.0 treated as negative?
@ 2010-06-08  9:49 Bill Schottstaedt
  0 siblings, 0 replies; 5+ messages in thread
From: Bill Schottstaedt @ 2010-06-08  9:49 UTC (permalink / raw)
  To: bug-guile

> Let me know if I'm missing something here.

Independent of standards, it means your arithmetic is inconsistent:

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




^ permalink raw reply	[flat|nested] 5+ messages in thread
* -0.0 treated as negative?
@ 2010-06-07 14:00 Bill Schottstaedt
  2010-06-07 21:28 ` Andy Wingo
  0 siblings, 1 reply; 5+ messages in thread
From: Bill Schottstaedt @ 2010-06-07 14:00 UTC (permalink / raw)
  To: bug-guile

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-08 11:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-08  9:49 -0.0 treated as negative? Bill Schottstaedt
  -- strict thread matches above, loose matches on Subject: below --
2010-06-07 14:00 Bill Schottstaedt
2010-06-07 21:28 ` Andy Wingo
2010-06-08 11:32   ` Bill Schottstaedt
2010-06-08 11:51   ` Bill Schottstaedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).