Python trig precision problem

casevh at casevh at
Thu May 18 23:56:58 CEST 2006

Cary West wrote:
> Hello all, having a small problem with a trig routine using python math
> module. This code is designed to convert geodetic coordinates to lambert
> conformal conic coordinates. It implements the formulas found at
> .  The
> problem is that, at least on my machine, the precision is off to the tune of
> around 1 km, which is unacceptable. (using the calculator found at
> ) Anyone have any ideas?
> here is the offending code.

I'd assume you are exceeding the precision available with standard
64-bit floating point. Here is a library for extended precision
floating point, including trig functions.


More information about the Python-list mailing list