From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.devel Subject: Re: bignum branch Date: Sat, 04 Aug 2018 20:28:45 +0200 Organization: Linux Private Site Message-ID: <87wot6x9ya.fsf@Rainer.invalid> References: <87o9fbbw1t.fsf@tromey.com> <86k1pxmvmx.fsf@gmail.com> <87efg4a9xc.fsf@tromey.com> <87a7qr8cz7.fsf@tromey.com> <86tvoy3je9.fsf@gmail.com> <86bmb0vbxf.fsf@gmail.com> <87k1pnfcg1.fsf@tromey.com> <86sh4b1833.fsf@gmail.com> <861sbgz3dm.fsf@gmail.com> <83a7q4ufxp.fsf@gnu.org> <86in4resc8.fsf@gmail.com> <831sbfvl11.fsf@gnu.org> <8636vv7ohh.fsf@gmail.com> <83y3dntwsw.fsf@gnu.org> <83wot7tkdh.fsf@gnu.org> <87y3dnyzkl.fsf@tromey.com> <42060bb4-3535-3b03-e007-0ae68134a30b@cs.ucla.edu> <87tvobywph.fsf@tromey.com> <87600qza2i.fsf@Rainer.invalid> <87k1p6m6qw.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1533407217 17839 195.159.176.226 (4 Aug 2018 18:26:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Aug 2018 18:26:57 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 04 20:26:53 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 1fm1GP-0004Xb-3O for ged-emacs-devel@m.gmane.org; Sat, 04 Aug 2018 20:26:53 +0200 Original-Received: from localhost ([::1]:55877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fm1IV-00017r-P4 for ged-emacs-devel@m.gmane.org; Sat, 04 Aug 2018 14:29:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fm1IO-00017Y-LJ for emacs-devel@gnu.org; Sat, 04 Aug 2018 14:28:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fm1IL-0005ct-HN for emacs-devel@gnu.org; Sat, 04 Aug 2018 14:28:56 -0400 Original-Received: from [195.159.176.226] (port=58010 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fm1IL-0005cj-9A for emacs-devel@gnu.org; Sat, 04 Aug 2018 14:28:53 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fm1GC-0004Im-2r for emacs-devel@gnu.org; Sat, 04 Aug 2018 20:26:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:9/arORXuzo7D7H5lWZQHkJ3pfH0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:228177 Archived-At: Tom Tromey writes: > Yes, I understand. What specifically is weird about this situation, for > me, is that min and max aren't like arithemetic operations like + or > -. As numerical comparison, they are defined to yield valid results over some domain. If one of the comparison partners is outside that domain, then you can't give back a result. It would be akin to declaring that "yellow is heavier than an apple". > And, the naive approach to writing min or max would not always > (depending on argument ordering) preserve NaN, because min and max, > presumably, are defined in terms of comparisons -- which always return > false with NaN. Yes, that needs to be special cased unless you do the sort in a way that the NaN always ends up at the appropriate end, i.e. whatever your comparison operator, it must preserve the NaN if it gives you back "false". One of the reasons that isnan() is a thing you'll find in libraries… Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada