Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ethan Furman Newsgroups: comp.lang.python Subject: Re: What is precision of a number representation? Date: Mon, 11 Jul 2016 15:17:13 -0700 Lines: 44 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: 8bit X-Trace: news.uni-berlin.de 6PaAyyHMHN1x/jOJ1yJZeQtSF4mJ6t+OmscjmY9IXRzA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.046 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'important,': 0.07; 'subject:number': 0.07; 'width': 0.07; 'accuracy.': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; '2016': 0.16; '6:56': 0.16; 'digits.': 0.16; 'fit,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'zeroes': 0.16; 'wrote:': 0.16; 'pace': 0.18; 'say,': 0.18; '(not': 0.20; 'precise': 0.22; 'am,': 0.23; 'accuracy': 0.23; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'figure': 0.27; 'record': 0.29; 'measure': 0.29; '~ethan~': 0.29; 'maybe': 0.33; 'tue,': 0.34; 'this?': 0.34; 'so,': 0.35; 'could': 0.35; 'knowledge': 0.35; 'unit': 0.35; 'but': 0.36; 'there': 0.36; 'depends': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'two': 0.37; '12,': 0.37; 'mean': 0.38; 'represent': 0.38; 'why': 0.39; 'does': 0.39; 'area': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'your': 0.60; 'leading': 0.61; 'is.': 0.63; 'more': 0.63; 'skip:\xe2 10': 0.70; 'jul': 0.72; 'present.': 0.72; 'square': 0.76; 'low': 0.83; '(four': 0.84; '8bit%:77': 0.84; 'clearance': 0.84; 'fridge': 0.84; 'meters': 0.84; 'distance.': 0.91; 'laser': 0.93; 'hundred': 0.96; 'hand,': 0.97 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.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: <57841AE9.3090508@stoneleaf.us> 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:111298 On 07/11/2016 02:51 PM, Chris Angelico wrote: > On Tue, Jul 12, 2016 at 6:56 AM, Ben Finney wrote: >> Precision is not a property of the number. It is a property of the >> *representation* of that number. >> >> The representation “1×10²” has a precision of one digit. >> The representation “100” has a precision of three digits. >> The representation “00100” has a precision of five digits. >> The representation “100.00” also has a precision of five digits. >> >> Those can all represent the same number; or maybe some of them represent >> “one hundred” and others represent “one hundred and a millionth”. >> > > Yep. Precision is also a property of a measurement, the same way that > a unit is. If I pace out the length of the main corridor in my house, > I might come up with a result of thirty meters. The number is "30"; > the unit is "meters", the precision is two significant digits, and the > accuracy depends on how good I am at pacing distance. > > 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, because those last tenths of a millimeter could be very important, while knowledge that there are no thousands of millimeters is already present. So, so far there is no explanation of why leading zeroes make a number more precise. -- ~Ethan~