Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.freenet.ag!ecngs!feeder2.ecngs.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3a.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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'received:internal': 0.09; 'algorithm.': 0.16; 'fallback': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'subject:distance': 0.16; 'thoughts?': 0.16; 'which,': 0.16; 'wrote:': 0.16; 'python?': 0.18; 'library': 0.20; 'function,': 0.22; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'function': 0.30; 'to:addr:python-list': 0.35; 'there': 0.36; 'should': 0.37; 'received:10': 0.37; 'subject:: ': 0.37; 'received:66': 0.38; 'version': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'your': 0.60; 'from:no real name:2**0': 0.61; 'subject:more': 0.61; 'header:Message-Id:1': 0.62; 'concerns': 0.66; 'internally.': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=NTD6U4rj3Ta7XdnXH45A0jVJIRg=; b=W4+3bC sGnjxyuvh/lXs2CrT/MZOgthlcDYGOP6fB9b7ZquH7RxkoNkvP95H7Dy+5q5ialm aWwdAjsVhUg1rWSiAZdZN+Nf+TokZ9b8Y60F9IdXJ6oKTU3fOB5dntdjBJarF8ch ax/UKp9ufMvQHQNSAjcgIcUc/FZP9uFwIMYDQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=NTD6U4rj3Ta7Xdn XH45A0jVJIRg=; b=S0tmBB09Jc0DkHRZNz+U8EtUbHYlaqxlE6nPOxS0I98dnVJ z/WlfsgcCL9F6JYyc1xq4G3QbEn1LK8SKy+kp0x11O6zOR/W1KSIV0Ncxi9MI61G W4vcsi6wrqDhDK5UodpamfVwzhTjB4NvoBi3tS2evbSm3frV37f9Cn8q+2/I= X-Sasl-Enc: XN7+Ih/EsPYs+QWvperyV27LplTu8VwytPKip0GP2plE 1432647653 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-073992ec In-Reply-To: References: Subject: Re: a more precise distance algorithm Date: Tue, 26 May 2015 09:40:53 -0400 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: 8 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432647662 news.xs4all.nl 2853 [2001:888:2000:d::a6]:50262 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91244 On Mon, May 25, 2015, at 15:21, ravas wrote: > Is this valid? Does it apply to python? > Any other thoughts? :D The math.hypot function uses the C library's function which should deal with such concerns internally. There is a fallback version in case the C library does not have this function, in Python/pymath.c - which, incidentally, does use your algorithm.