From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Making 'eq' == 'eql' in bignum branch Date: Fri, 10 Aug 2018 22:45:12 +0300 Message-ID: <83mutum2ev.fsf@gnu.org> References: <29f933ac-a6bf-8742-66a7-0a9d6d3e5a88@disroot.org> <765767b2-d2e5-a9a6-f724-d58ecf4847bb@cs.ucla.edu> <76081b5d-8c10-0a37-2c97-d4864c0faa80@cs.ucla.edu> <09153aed-361d-4f82-d9ac-b502314769ae@cs.ucla.edu> <83600yt8ih.fsf@gnu.org> <83h8kgpnir.fsf@gnu.org> <7dd71d44-69bc-3adf-576b-8b9e31184a24@cs.ucla.edu> <83d0v4p1si.fsf@gnu.org> <827beb76-3adf-f2f9-33b1-1baee55680cd@cs.ucla.edu> <83wotbo04h.fsf@gnu.org> <77d5f8b0-2277-b28e-8565-d3e00c411795@cs.ucla.edu> <83ftzyocry.fsf@gnu.org> <837elao4bo.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1533930202 29603 195.159.176.226 (10 Aug 2018 19:43:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2018 19:43:22 +0000 (UTC) Cc: eggert@cs.ucla.edu, monnier@iro.umontreal.ca, pipcet@gmail.com, emacs-devel@gnu.org To: John Yates Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 10 21:43:17 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 1foDJd-0007Zy-0I for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2018 21:43:17 +0200 Original-Received: from localhost ([::1]:57769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foDLj-0004sZ-LW for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2018 15:45:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foDLY-0004qt-3l for emacs-devel@gnu.org; Fri, 10 Aug 2018 15:45:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foDLU-0008DR-5X for emacs-devel@gnu.org; Fri, 10 Aug 2018 15:45:16 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foDLU-0008D6-2N; Fri, 10 Aug 2018 15:45:12 -0400 Original-Received: from [176.228.60.248] (port=4086 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1foDLT-0005VB-Gw; Fri, 10 Aug 2018 15:45:11 -0400 In-reply-to: (message from John Yates on Fri, 10 Aug 2018 12:52:53 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:228392 Archived-At: > From: John Yates > Date: Fri, 10 Aug 2018 12:52:53 -0400 > Cc: Eli Zaretskii , Paul Eggert , > Stefan Monnier , > Emacs developers > > More importantly the standard says that two NaN values (even if fetched > from the same container within a single expression) _always_ compare > not equal. > > Were I that "occasional user who wants" IEEE compliance in my elisp > code I would expect comparisons of NaNs (whether via either eq or eql) > to return nil. My sense is that to achieve that effect one must _always_ > compare floating point objects, even if they reside at the same address. We decided to follow IEEE for numerical comparisons ('='), but not for object comparisons. I'm using IEEE fp calculations all the time on my daytime job, and it still makes no sense to me to compare NaN _objects_ not equal. IEEE only talks about comparing numerical values.