Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!nntp-feed.chiark.greenend.org.uk!ewrotcd!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:14:42 -0400 Lines: 27 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de HrH0a09RseG7Cq+R9e9WlQ0EsV0LpMAPMmFgoi0n51vw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; '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; '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; 'subtraction': 0.16; 'wrote:': 0.16; 'say,': 0.18; '(not': 0.20; 'precise': 0.22; 'accuracy': 0.23; 'nearly': 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; 'point.': 0.27; 'cancel': 0.27; 'record': 0.29; 'measure': 0.29; 'equal': 0.34; 'this?': 0.34; 'could': 0.35; 'but': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'wrong': 0.38; 'mean': 0.38; 'why': 0.39; 'does': 0.39; 'area': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'received:96': 0.63; 'square': 0.76; 'low': 0.83; '(four': 0.84; 'clearance': 0.84; 'fridge': 0.84; 'meters': 0.84; '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: 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> Xref: csiph.com comp.lang.python:111313 On 7/11/2016 5: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). Wrong as to the last point. 2147 - 1973 = 174 has only 3 sig. figures. 2147 - 2144 = 3 has 1 significant figure. Subtraction of nearly equal numbers can cancel sig. figures. > How do you > record this? Is it 174.0? 0174? "174 with four significant figures"? None of these. -- Terry Jan Reedy