From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: bignum branch Date: Thu, 19 Jul 2018 13:32:24 -0700 Organization: UCLA Computer Science Department Message-ID: <447774de-c305-5478-1438-7794344456d4@cs.ucla.edu> References: <87o9fbbw1t.fsf@tromey.com> <838t6c9wx5.fsf@gnu.org> <53ba128d-7888-e15a-c4a2-1d7a65f51345@cs.ucla.edu> <83wotu7fcj.fsf@gnu.org> <83k1pt7q1e.fsf@gnu.org> <83h8kx7oeu.fsf@gnu.org> <83fu0h7nr6.fsf@gnu.org> <83d0vl7kg2.fsf@gnu.org> <4bc2a6ba-bc73-c4a9-f7a6-20303955bc7f@cs.ucla.edu> <838t696zb2.fsf@gnu.org> <5095f6d2-c8c1-8d9b-4f4f-ccb74a68d58e@cs.ucla.edu> <8547e501-a41f-68eb-6e00-5fed6c593da4@gmail.com> <73e5dd79-d7d5-3bec-f991-04ceb5d3472d@gmail.com> <87o9f45ot8.fsf@Rainer.invalid> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2919E45384820BA387757A01" X-Trace: blaine.gmane.org 1532032283 30079 195.159.176.226 (19 Jul 2018 20:31:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2018 20:31:23 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: Achim Gratz , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 19 22:31:19 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgFa3-0007j2-Bb for ged-emacs-devel@m.gmane.org; Thu, 19 Jul 2018 22:31:19 +0200 Original-Received: from localhost ([::1]:45221 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgFc9-0002fl-SX for ged-emacs-devel@m.gmane.org; Thu, 19 Jul 2018 16:33:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgFbC-0002di-SB for emacs-devel@gnu.org; Thu, 19 Jul 2018 16:32:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgFb9-0000Vs-NQ for emacs-devel@gnu.org; Thu, 19 Jul 2018 16:32:30 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:55601) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fgFb9-0000Vb-CF for emacs-devel@gnu.org; Thu, 19 Jul 2018 16:32:27 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 097E91607CC; Thu, 19 Jul 2018 13:32:26 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id NcRCkkk21alf; Thu, 19 Jul 2018 13:32:25 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 06E3E16087B; Thu, 19 Jul 2018 13:32:25 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id j37ES7VHiysN; Thu, 19 Jul 2018 13:32:24 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B47391607CC; Thu, 19 Jul 2018 13:32:24 -0700 (PDT) Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBBYCAwECH In-Reply-To: <87o9f45ot8.fsf@Rainer.invalid> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227562 Archived-At: This is a multi-part message in MIME format. --------------2919E45384820BA387757A01 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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 =3D still does that. =3D is about numeric comparison; eql is ab= out value=20 comparison. Neither dominates the other: for example, they disagree about= 0.0 vs=20 -0.0 (=3D says they're equal, but eql says they're distinguishable values= and so=20 are not equal), and conversely they disagree about 0.0e+NaN versus 0.0e+N= aN (=3D=20 says they're not equal, whereas eql says they're indistinguishable values= are so=20 are equal). > If you stray from that > convention there should be a really good reason for that and it needs t= o > be prominently documented. There is good reason: eq, eql, and equal are about distinguishing objects= (vital=20 for hash tables, e.g.) whereas =3D is about numeric comparison. These are= =20 different things, and the numeric-comparison rule for NaNs is inconsisten= t with=20 how hash tables should work. I gave a shot at documenting this by install= ing the=20 attached patch. --------------2919E45384820BA387757A01 Content-Type: text/plain; charset=UTF-8; name="0001-Improve-doc-for-floating-point-vs-eql.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Improve-doc-for-floating-point-vs-eql.txt" RnJvbSA5NmQ3N2Y5ZWI4ODJiNjhlOTk0ZTE4N2VkOWMyMTU2YTIzZTMyNzlkIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUaHUsIDE5IEp1bCAyMDE4IDEzOjI5OjI4IC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gPT9VVEYtOD9xP0ltcHJvdmU9MjBkb2M9MjBmb3I9MjBmbG9hdGluZz0yMHBvaW50PTIw Pz0KID0/VVRGLTg/cT89RTI9ODA9OTg9M0Q9RTI9ODA9OTk9MjB2cz0yMD1FMj04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