On 2015-10-16 18:20, Even Rouault wrote:
Le vendredi 16 octobre 2015 17:57:10, Hermann Peifer a écrit :
On 2015-10-12 11:28, Even Rouault wrote:
I've changed to '%.15g' formatting for WKT in
https://trac.osgeo.org/gdal/ticket/6145

Hi Even,

Why did you choose '%.15g', rather than '%.17g'? The latter format
should guarantee a lossless binary->decimal->binary round-trip, whereas
the former one might also do -- or not. I don't think that any precision
loss between '%.15g', and '%.17g' would result into "a real life
problem", I am asking just out of curiosity.

Hi Hermann,

re'adding the list in CC.

Your point is valid. My idea was to avoid making WKT returned by the modified
version potentially longer than it is currently


I am pretty sure you know: '%.17g' could also result into shorter string values, compared to the earlier '%.15f', as in the below (admittedly unfair) example.

Hermann

$ printf "%.15f\n" 50.375
50.375000000000000
$
$ printf "%.17g\n" 50.375
50.375

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to