Floating-point glitches with the math module. Bug? Or am I missing something?
newsgroups at jhrothjr.com
Tue Sep 21 04:52:10 CEST 2004
"Chris Metzler" <cmetzler at speakeasy.snip-me.net> wrote in message
news:pan.2004.09.21.00.32.24.949382 at speakeasy.snip-me.net...
> On Mon, 20 Sep 2004 19:03:57 -0500, Jeff Epler wrote:
>> Incidentally, the second part of your expression goes to 0 here, with
>> the given values:
> Yeah, I noticed this later (it's sorta implicit in the content of my
> other, followup post).
> This kinda sucks because I need to do some precision surveying calcs
> -- computing lat/lons for a variety of points separated by known
> distances and angles from a point of known lat/lon. If I do everything
> in spherical trig, I run into this issue (that whole dividing-by-earth
> -radius thing). But if I do things using planar approximations, for
> most of the points I get lat/lons that are too far off from where they
> should be.
As Jeff points out, Python is at the mercy of the platform's
C library - it does not have it's own numerical computation
library. It simply wraps the C library functions.
You might want to look at one of the math packages.
SciPy comes highly recommended, it might do what
More information about the Python-list