[Mapserver-dev] Floating point precision problem in the WMS m odule

Ned Harding nharding at extendthereach.com
Tue May 25 10:06:42 EDT 2004


I have not looked at this code in particular, but the problem is probably on
the output of the #, not the input.  Most implementations of sprintf and
related will only show 6 or so decimal places unless you specifically
request more.

Ned.


-----Original Message-----
From: Daniel Morissette [mailto:dmorissette at dmsolutions.ca] 
Sent: Tuesday, May 25, 2004 7:42 AM
To: Jean-Henry Berevoescu
Cc: mapserver-dev at lists.gis.umn.edu
Subject: Re: [Mapserver-dev] Floating point precision problem in the WMS
module


Jean-Henry Berevoescu wrote:
> 
> And yes, I tried strtold too (when I tried the lesser strtod). (I run 
> on Mandrake 10 - but I don't think that should be an issue. After all 
> Mandrake is a Linux and it originally started as an RH clone)
> 

I'm not sure what to suggest, even K&R (the ultimate C reference) says 
that atof() should return a double:

   double atof(const char *s)
       atof converts s to double; it is equivalent to
       strtod(s, (char**)NULL).

I have created a bug about this:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=678

Could you please add yourself to the CC of the bug, and add an example 
of a GetMap request (at least the BBOX part) where the digits are 
truncated... we'll continue the discussion there.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------

_______________________________________________
Mapserver-dev mailing list
Mapserver-dev at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list