[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] #460 eqv? deliberations
- To: scheme-reports@x
- Subject: Re: [Scheme-reports] #460 eqv? deliberations
- From: Mark H Weaver <mhw@x>
- Date: Mon, 13 Aug 2012 13:57:58 -0400
- Cc: Bradley Lucier <lucier@x>
- In-reply-to: <email@example.com>
- References: <CAMMPzYO+oh6g19qcNpo4Oz1ZmtAwzEHyLwmAGENUwk00N23N5A@mail.gmail.com> <20120813081014.GA3868@mercury.ccil.org> <CAMMPzYNGL1mnCfOLudCWt==GB+XK=dj6TY02k2rgXzVERoDhbw@mail.gmail.com> <20120813154446.GE3868@mercury.ccil.org> <firstname.lastname@example.org>
On 08/13/2012 11:58 AM, Bradley Lucier wrote:
> On Mon, 2012-08-13 at 11:44 -0400, John Cowan wrote:
>> Alex Shinn scripsit:
>> > > 1) If -0.0 exists, then (eqv? 0.0 -0.0) => #f.
>> > There has be no proposal which would guarantee this. same-bits gives
>> > the strongest guarantees for this, since most implementations use
>> > IEEE 754.
>> Indeed. For whatever reason, no Schemes use the GNU MPFR library, which
>> provides multiple-precision floating point in the style of IEEE 754, but
>> without binary compatibility. It is available in other languages, though.
>> The MPFR format provides 0.0 and -0.0, +inf.0 and -inf.0, and just
>> two representations of +nan.0 (one with a positive sign bit, one with
>> a negative sign bit). Yet because it is not IEEE 754, the same-bits
>> proposal *requires* eqv? to behave differently on an MPFR-based system
>> than on an otherwise identical IEEE-based system. That can't be right.
> All these issues are why I wanted eqv? to be unspecified on inexact
> arithmetic that is not IEEE 754-2008 compatible.
> If a Scheme provides inexacts through mpfr, or some other system, then
> it can say what it means for two inexact numbers to be eqv?.
Since most implementors have little knowledge of numerical computing, it
would be helpful if the R7RS would provide more guidance than this.
I'm concerned that there will be no way to portably memoize numerical
procedures in the R7RS. Is it the position of this working group that
memoization is not important?
What job is appropriate for an equivalence predicate for which
(eqv? 0 0.0) => #false and (eqv? 0.0 -0.0) => #true? I asked this
question a while back and never received an answer, and yet this is the
behavior that you voted for on non-IEEE-754-2008 platforms.
Scheme-reports mailing list