[GRASS-SVN] r38755 - grass/branches/develbranch_6/raster/r.what

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Aug 16 22:56:21 EDT 2009


Author: hamish
Date: 2009-08-16 22:56:20 -0400 (Sun, 16 Aug 2009)
New Revision: 38755

Modified:
   grass/branches/develbranch_6/raster/r.what/main.c
Log:
use %.15g instead of %.10f for doubles (trac #335)

Modified: grass/branches/develbranch_6/raster/r.what/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.what/main.c	2009-08-16 14:01:25 UTC (rev 38754)
+++ grass/branches/develbranch_6/raster/r.what/main.c	2009-08-17 02:56:20 UTC (rev 38755)
@@ -402,7 +402,7 @@
 			fprintf(stdout, "%c%s", fs, null_str);
 			continue;
 		    }
-		    sprintf(tmp_buf, "%.10f", cache[point].dvalue[i]);
+		    sprintf(tmp_buf, "%.15g", cache[point].dvalue[i]);
 		    G_trim_decimal(tmp_buf);
 		    fprintf(stdout, "%c%s", fs, tmp_buf);
 		}



More information about the grass-commit mailing list