Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feed.xsnews.nl!fbe001.ams.xsnews.nl!ecngs!feeder.ecngs.de!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tends': 0.09; 'algorithm': 0.13; 'wed,': 0.15; 'digits.': 0.16; 'doubles.': 0.16; 'fpu': 0.16; 'message- id:@4ax.com': 0.16; 'precision,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:distance': 0.16; 'intermediate': 0.18; 'url:home': 0.18; '(or': 0.21; '64-bit': 0.22; 'precise': 0.22; '2015': 0.23; 'header:X-Complaints-To:1': 0.26; 'decimal': 0.29; 'values': 0.30; 'point': 0.33; 'to:addr :python-list': 0.35; 'next': 0.35; 'but': 0.36; 'brian': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'subject:more': 0.61; 'more': 0.62; 'overall': 0.70; '14-15': 0.84; 'loses': 0.84; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: a more precise distance algorithm Date: Wed, 27 May 2015 23:04:51 -0400 Organization: IISS Elusive Unicorn References: <5563e453$0$12990$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-221-217.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432782300 news.xs4all.nl 2885 [2001:888:2000:d::a6]:41412 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91345 On Wed, 27 May 2015 14:00:24 -0400, Brian Blais declaimed the following: > >where all of the methods deviate at the 13/14 decimal place. > Historically, double precision floating point is considered to have 14-15 significant /digits/ TOTAL. Internally, IEEE floating point hardware tends to work with 80bit floats -- so as long as the intermediate computations stay in the FPU for the majority of the calculation one may get a more precise result when downconverting to 64-bit doubles. But if the algorithm (or runtime) tends to pull values out of the FPU and reloads them for the next stage, one loses all the excess precision, and the resultant truncations may multiple to give an overall result of less than 14 significant digits. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/