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 12:43:17 +0200 Organization: Linux Private Site Message-ID: <87600qza2i.fsf@Rainer.invalid> References: <87o9fbbw1t.fsf@tromey.com> <86in5jdj49.fsf@gmail.com> <83wotxaiwi.fsf@gnu.org> <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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1533379297 2736 195.159.176.226 (4 Aug 2018 10:41:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Aug 2018 10:41:37 +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 12:41:33 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 1flu03-0000Zk-B8 for ged-emacs-devel@m.gmane.org; Sat, 04 Aug 2018 12:41:31 +0200 Original-Received: from localhost ([::1]:54577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1flu28-0003mY-5K for ged-emacs-devel@m.gmane.org; Sat, 04 Aug 2018 06:43:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1flu1y-0003mB-6w for emacs-devel@gnu.org; Sat, 04 Aug 2018 06:43:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1flu1v-0007s7-2N for emacs-devel@gnu.org; Sat, 04 Aug 2018 06:43:30 -0400 Original-Received: from [195.159.176.226] (port=57108 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1flu1u-0007r8-Qt for emacs-devel@gnu.org; Sat, 04 Aug 2018 06:43:26 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fltzl-0000MF-IG for emacs-devel@gnu.org; Sat, 04 Aug 2018 12:41:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:XJPBR8yTTF5MVBOh8srH0edzMBA= 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:228148 Archived-At: Tom Tromey writes: > Paul> min and max propagate any NaNs they find. > > This part I don't understand, since my mental mode of min/max is that > they are iteratively applying < or > The point of having NaN at all is to set aside a tiny bit of the symbol space for floating point numbers to encode certain error conditions and propagate them in-band. Otherwise they'd need to be signalled via side channels like traps and exceptions, which usually significantly slow down the error-free cases also or complicate the code even further. Getting an NaN indicates that your computation has left the domain it was defined in. So no matter what you do, after you get an NaN this indication must be preserved, hence all results must propagate NaN until you get to the point where you do error handling. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds