Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91213
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2015-05-25 14:03 -0700 |
| References | <b2e66a94-7a89-4be9-bbf7-9434396cc178@googlegroups.com> <mk00gr$kku$1@dont-email.me> |
| Message-ID | <a17f7167-0159-4c1f-b594-c753a4d5da1c@googlegroups.com> (permalink) |
| Subject | Re: a more precise distance algorithm |
| From | ravas <ravas@outlook.com> |
On Monday, May 25, 2015 at 1:27:24 PM UTC-7, Christian Gollwitzer wrote: > Wrong. Just use the built-in function Math.hypot() - it should handle > these cases and also overflow, infinity etc. in the best possible way. > > Apfelkiste:~ chris$ python > Python 2.7.2 (default, Oct 11 2012, 20:14:37) > [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import math > >>> math.hypot(3,4) > 5.0 > > Christian Thank you! :D I forgot about that one. I wonder how the sympy Point.distance method compares...
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
a more precise distance algorithm ravas <ravas@outlook.com> - 2015-05-25 12:21 -0700
Re: a more precise distance algorithm felix <felix@epepm.cupet.cu> - 2015-05-25 16:06 -0400
Re: a more precise distance algorithm Christian Gollwitzer <auriocus@gmx.de> - 2015-05-25 22:27 +0200
Re: a more precise distance algorithm ravas <ravas@outlook.com> - 2015-05-25 14:03 -0700
Re: a more precise distance algorithm Gary Herron <gary.herron@islandtraining.com> - 2015-05-25 13:20 -0700
Re: a more precise distance algorithm ravas <ravas@outlook.com> - 2015-05-25 14:05 -0700
Re: a more precise distance algorithm Steven D'Aprano <steve@pearwood.info> - 2015-05-26 13:11 +1000
Re: a more precise distance algorithm ravas <ravas@outlook.com> - 2015-05-25 21:13 -0700
Re: a more precise distance algorithm Gary Herron <gherron@digipen.edu> - 2015-05-25 22:09 -0700
Re: a more precise distance algorithm ravas <ravas@outlook.com> - 2015-05-25 22:49 -0700
Re: a more precise distance algorithm Christian Gollwitzer <auriocus@gmx.de> - 2015-05-26 07:33 +0200
Re: a more precise distance algorithm Brian Blais <bblais@gmail.com> - 2015-05-27 14:00 -0400
Re: a more precise distance algorithm Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-05-27 23:03 +0100
Re: a more precise distance algorithm Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-05-27 23:04 -0400
Re: a more precise distance algorithm Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-25 22:42 -0600
Re: a more precise distance algorithm ravas <ravas@outlook.com> - 2015-05-25 21:59 -0700
Re: a more precise distance algorithm random832@fastmail.us - 2015-05-26 09:40 -0400
Re: a more precise distance algorithm random832@fastmail.us - 2015-05-26 09:51 -0400
Re: a more precise distance algorithm Robin Becker <robin@reportlab.com> - 2015-05-27 14:02 +0100
csiph-web