Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: Re: What is precision of a number representation? Date: Tue, 12 Jul 2016 00:17:37 -0400 Lines: 26 Message-ID: References: <834b1cce-38dd-474c-8915-4ff1cd6b27ec@googlegroups.com> <7fcc8c21-106f-41d4-a5ba-409f3b54a56d@googlegroups.com> <5783c91e$0$1622$c3e8da3$5496439d@news.astraweb.com> <5783D63F.5040307@stoneleaf.us> <8560sbvqqd.fsf_-_@benfinney.id.au> <57841AE9.3090508@stoneleaf.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de Z/s/lYXuqaspITrUD3/jGA37CULlCw2aNDYxpYknuyNg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.033 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.01; 'subject:number': 0.07; 'width': 0.07; 'accuracy.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'jan': 0.11; 'fit,': 0.16; 'opposite': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'wrote:': 0.16; 'figures': 0.18; 'say,': 0.18; '(not': 0.20; 'first,': 0.20; 'precise': 0.22; 'accuracy': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'chris': 0.26; 'figure': 0.27; 'record': 0.29; 'measure': 0.29; 'common': 0.33; 'this?': 0.34; 'could': 0.35; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'one,': 0.37; 'mean': 0.38; 'why': 0.39; 'does': 0.39; 'area': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'close': 0.61; 'received:96': 0.63; 'square': 0.76; 'low': 0.83; '(four': 0.84; 'clearance': 0.84; 'fridge': 0.84; 'meters': 0.84; 'cancelled': 0.91; 'ethan': 0.91; 'furman': 0.91; 'received:fios.verizon.net': 0.91; 'laser': 0.93; 'hand,': 0.97 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pool-96-227-207-81.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: <57841AE9.3090508@stoneleaf.us> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <834b1cce-38dd-474c-8915-4ff1cd6b27ec@googlegroups.com> <7fcc8c21-106f-41d4-a5ba-409f3b54a56d@googlegroups.com> <5783c91e$0$1622$c3e8da3$5496439d@news.astraweb.com> <5783D63F.5040307@stoneleaf.us> <8560sbvqqd.fsf_-_@benfinney.id.au> <57841AE9.3090508@stoneleaf.us> Xref: csiph.com comp.lang.python:111315 On 7/11/2016 6:17 PM, Ethan Furman wrote: > On 07/11/2016 02:51 PM, Chris Angelico wrote: >> This is why it's important to be able to record precisions of >> arbitrary numbers. If I then measure the width of this corridor with a >> laser, I could get an extremely precise answer - say, 2,147 >> millimeters, with a precision of four significant digits, and >> excellent accuracy. But if I multiply those numbers together to >> establish the floor area of the corridor, the result does NOT have >> four significant figures. It would be 64 square meters (not 64.41), >> and the accuracy would be pretty low (effectively, the *in*accuracies >> of both measurements get combined). But on the other hand, if you want >> to know whether your new fridge will fit, you could measure it with >> the same laser and come up with a figure of 1,973 mm (four sig fig), >> which would mean your clearance is 174mm (four sig fig). How do you >> record this? Is it 174.0? 0174? "174 with four significant figures"? > > 174.0, A common fallacy. There are only 3 significant figures because one, the first, was cancelled by subtracting close numbers. The same is true of adding numbers of opposite signs. -- Terry Jan Reedy