From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: A question on the range of floats in Emacs Date: Wed, 18 Jul 2007 06:19:53 +0300 Message-ID: References: <87sl7nzt23.fsf@gmail.com> <878x9e4vbr.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1184728800 32430 80.91.229.12 (18 Jul 2007 03:20:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2007 03:20:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: jay.p.belanger@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 18 05:19:59 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IB050-0005vB-S8 for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2007 05:19:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IB050-0000yI-9e for ged-emacs-devel@m.gmane.org; Tue, 17 Jul 2007 23:19:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IB04w-0000y3-Mn for emacs-devel@gnu.org; Tue, 17 Jul 2007 23:19:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IB04u-0000xn-Pq for emacs-devel@gnu.org; Tue, 17 Jul 2007 23:19:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IB04u-0000xk-Mj for emacs-devel@gnu.org; Tue, 17 Jul 2007 23:19:52 -0400 Original-Received: from romy.inter.net.il ([213.8.233.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IB04u-00066k-Cc for emacs-devel@gnu.org; Tue, 17 Jul 2007 23:19:52 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-229-209-204.inter.net.il [84.229.209.204]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id IJO52364 (AUTH halo1); Wed, 18 Jul 2007 06:19:47 +0300 (IDT) In-reply-to: <878x9e4vbr.fsf@gmail.com> (message from Jay Belanger on Tue, 17 Jul 2007 15:41:12 -0500) X-detected-kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75033 Archived-At: > From: Jay Belanger > Date: Tue, 17 Jul 2007 15:41:12 -0500 > Cc: jay.p.belanger@gmail.com > > I played around with the largest and smallest floats, and I > was wondering about precision. Near the smallest float, the precision > can be small; on my computer, 5e-324, 5.1e-324 and 4.9e-324 all evaluate to > 5e-324; 3.47e-323 evaluates to 3.5e-324, etc. Is there a range (say > from smallest-exponent + N to largest-exponent - N) in which the > precision is fixed? (It appears that way here; is it true in general?) The numbers where you see the loss of precision are denormalized (i.e. some of the mantissa bits are zero). The range you are looking for (where there's no loss of precision) is between least-positive-normalized-float and most-positive-float.