Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: What is precision of a number representation? Date: Tue, 12 Jul 2016 11:57:16 +1000 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> <57841AE9.3090508@stoneleaf.us> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de l9ZHz7DXbEuAlsT9GquvzwrywnTKMF8A5lu6CN35Bddg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.040 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'important,': 0.07; 'subject:number': 0.07; 'width': 0.07; 'cc:addr:python-list': 0.09; 'accuracy.': 0.09; 'sake': 0.09; '2016': 0.16; 'example)': 0.16; 'fit,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'measured': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'integer': 0.18; 'say,': 0.18; '(not': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'implicit': 0.22; 'precise': 0.22; 'am,': 0.23; 'accuracy': 0.23; 'header:In-Reply-To:1': 0.24; 'figure': 0.27; 'message- id:@mail.gmail.com': 0.27; 'record': 0.29; '0.5': 0.29; 'measure': 0.29; 'tue,': 0.34; 'this?': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'displays': 0.35; 'knowledge': 0.35; 'but': 0.36; 'there': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'display': 0.37; '12,': 0.37; 'one,': 0.37; 'mean': 0.38; 'why': 0.39; 'does': 0.39; 'area': 0.39; 'your': 0.60; 'complete': 0.63; 'jul': 0.72; 'present.': 0.72; 'square': 0.76; 'low': 0.83; '(four': 0.84; 'chrisa': 0.84; 'clearance': 0.84; 'fridge': 0.84; 'meters': 0.84; 'to:none': 0.91; 'ethan': 0.91; 'furman': 0.91; 'laser': 0.93; 'hand,': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=jyxAZUWi2DsoOXW1KY+BiC6+LdP/iAxahMHIFbdoKLg=; b=0yIyqWKddCWm+H+MHxmDeayCBmJB8F9PmG1+Co2Q8fh3BQK9B9soqq8vXcwMD2n6T6 qgp5DwH/IH9CYGJPbgiI/7WyaKKzN6pUG2xTc5CEZSMGbfGdiuSiCcEggsFaLNkJUnP2 R2dx3zyeK6bJVmR17SlZ1FW6OoVAd9iKxnBuUZP6tuFt75QouTcB3pbahs32iFkg293h NtZ6dJsxiBrW4jRwHtv6R6OoeuShDwWCV+tYcnbUKNuHsj8SOdN7raL9+XcFNDWWIPo3 LZZRVqMDfQRc0pVtKmPWIpEAwRfr0fsKqsThjrGxzGKHSt2dtp9xIi1I34xvIxnVPeQy r12w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=jyxAZUWi2DsoOXW1KY+BiC6+LdP/iAxahMHIFbdoKLg=; b=AJLRnbBE//09uXiBZiYBKOXhzBq36YeFfvezB4AlnCng6JIAeNNo/es6OxACsSO1Tf +bvYieOpODbDwT/k8UZNe3iLoivW3gFKcvcx+9IZRiVWFHLupBQ6V5cSMcHc2T4Tzj8y RLF4DIm7RfquCyDJC7shx6B6dGwlvKU7wOqGN2KcAojXI5tzWxhokmYLLiUM6b7PZ/6M 9cejyKB5g9oR8aHDASOz94yhPtqzUolLJNhjzah7VGOUwNiXwnj/Q3QqTAWQ1PpdL+39 T2O81MuvnTJtPFXolMb7llC9ikVL3sUfv0n57FJDKBOcuc5SPS0ZFhgCnhhz9365LC03 thVQ== X-Gm-Message-State: ALyK8tLVnq80kzG6hmFe3WPNxBiDwvhbFOtFzxgo1zgpwo0m7qiTnIx8W0GubmyuI9AOIC6Imi8zZfIp41Xrjg== X-Received: by 10.28.44.131 with SMTP id s125mr129430wms.61.1468288637498; Mon, 11 Jul 2016 18:57:17 -0700 (PDT) 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:111308 On Tue, Jul 12, 2016 at 8:17 AM, Ethan Furman 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, because those last tenths of a millimeter could be very important, > while knowledge that there are no thousands of millimeters is already > present. > But I never measured it to tenths of a millimeter. The display on my laser measurer (I don't actually have one, by the way, so all this is complete fabrication for the sake of the example) displays integer millimeters, with an implicit "+/- 0.5 mm". ChrisA