a more precise distance algorithm
ravas
ravas at outlook.com
Mon May 25 17:03:09 EDT 2015
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...
More information about the Python-list
mailing list