[Proj] cs2cs differences between Windows and Linux

Even Rouault even.rouault at spatialys.com
Mon Apr 13 07:20:45 PDT 2015


Le lundi 13 avril 2015 16:12:46, Daniel Buse a écrit :
> Hello,
> 
> I noticed some small discrepancies in cs2cs between Windows and Linux.
> 
> Version for both is "Rel. 4.8.0, 6 March 2012"
> 
> Command used:
> cs2cs -f "%.17g" +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0
> +ellps=bessel +datum=potsdam +units=m +no_defs +to +proj=utm +zone=33
> +ellps=WGS84 +datum=WGS84 +units=m +no_defs
> 
> Coordinates used:
> 5398786.5625 5672047.509765625
> 
> Result Windows:
> 398690.85663695924 5670224.1293941503
> 
> Result Linux:
> 398690.85663695924 5670224.1293941513
> 
> Difference is with 5670224.1293941503 in the second to last place.

The difference occurs at the 16th decimal place which is the limit of 
significance of 64bit floating point numbers. The reason for the difference is 
probably a different set of floating point instructions and optimizations used 
by the compilers (SSE vs x87, etc...). Nothing to really worry about. You 
should likely reduce your "%.17g" to something smaller as you probably don't 
need a precision of 0,1 nanometers as you currently ask for ;-)

> 
> Can anybody explain why this might be happening and what I could do
> about it?
> 
> Best regards,
> Daniel
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com



More information about the Proj mailing list