unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Bill Schottstaedt" <bil@ccrma.Stanford.EDU>
To: bug-guile@gnu.org
Subject: -0.0 treated as negative?
Date: Mon, 7 Jun 2010 07:00:42 -0700	[thread overview]
Message-ID: <20100607135908.M46502@ccrma.Stanford.EDU> (raw)

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	other threads:[~2010-06-07 14:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 14:00 Bill Schottstaedt [this message]
2010-06-07 21:28 ` -0.0 treated as negative? Andy Wingo
2010-06-08 11:32   ` Bill Schottstaedt
2010-06-08 11:51   ` Bill Schottstaedt
  -- strict thread matches above, loose matches on Subject: below --
2010-06-08  9:49 Bill Schottstaedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100607135908.M46502@ccrma.Stanford.EDU \
    --to=bil@ccrma.stanford.edu \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).