From: Marius Vollmer <mvo@zagadka.de>
Cc: bug-guile@gnu.org, Aubrey Jaffer <agj@alum.mit.edu>
Subject: Re: bug in eqv?
Date: 22 Mar 2006 01:52:40 +0200 [thread overview]
Message-ID: <87acbjs6d3.fsf@minimini.mvo.home> (raw)
In-Reply-To: <87mzfkd36j.fsf@zip.com.au>
Kevin Ryde <user42@zip.com.au> writes:
> Aubrey Jaffer <agj@alum.mit.edu> writes:
> >
> > Because (= 0.0 -0.0) is #t, (eqv? 0.0 -0.0) must be #t.
>
> Ah dear, thanks. Bit too much creativity with the nans and infs.
Hmm. I think SRFI 77 (Preliminary Proposal for R6RS Arithmetic) would
require (eqv? 0.0 -0.0) => #f, since it says
The eqv? procedure returns #f if obj1 and obj2 yield different
results (in the sense of eqv?) when passed as arguments to any
other procedure that can be defined as a finite composition of
Scheme's standard arithmetic procedures.
and, for example, (eqv? (flatan2 -1.0 -0.0) (flatan2 1.0 -0.0)) => #f.
See also "Lucier's Proposal" in the SRFI 77 document.
I originally copied the behavior of PLT Scheme and I'd say it is OK to
follow SRFI 77 for the behavior of negative zero, infinities and NaNs
now that it exists.
(We get (integer? +inf.0) => #f wrong, then, and probably other
things.)
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
next prev parent reply other threads:[~2006-03-21 23:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-18 3:42 bug in eqv? Aubrey Jaffer
2006-03-21 0:58 ` Kevin Ryde
2006-03-21 23:52 ` Marius Vollmer [this message]
2006-03-24 0:17 ` Aubrey Jaffer
2006-03-24 21:56 ` Kevin Ryde
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=87acbjs6d3.fsf@minimini.mvo.home \
--to=mvo@zagadka.de \
--cc=agj@alum.mit.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).