[Top][All Lists]

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

Re: bignum branch

From: Achim Gratz
Subject: Re: bignum branch
Date: Fri, 20 Jul 2018 22:02:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Paul Eggert writes:
> On 07/18/2018 12:25 PM, Achim Gratz wrote:
>> the established FP math says these
>> two values should not compare equal anyway.
> Sure, and = still does that. = is about numeric comparison; eql is
> about value comparison. Neither dominates the other: for example, they
> disagree about 0.0 vs -0.0 (= says they're equal, but eql says they're
> distinguishable values and so are not equal), and conversely they
> disagree about 0.0e+NaN versus 0.0e+NaN (= says they're not equal,
> whereas eql says they're indistinguishable values are so are equal).

I was obliquely hinting at this part of the documentation:

--8<---------------cut here---------------start------------->8---
eql is a built-in function in ‘C source code’.

(eql OBJ1 OBJ2)

Return t if the two args are the same Lisp object.
Floating-point numbers of equal value are ‘eql’, but they may not be ‘eq’.
--8<---------------cut here---------------end--------------->8---

This seems to say that eql returns a predicate for same-objectness,
except for FP numbers where it compares values instead.  Your
documentation clarification (I think) is about different ways of
comparing FP numeric values, so maybe the doc string for eql should
directly indicate that the representations of the FP numbers are
compared bit-wise, which is distinct from their numerical values as
prescribed by IEEE754 (and that comparison is done via =)?

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:

reply via email to

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