Description: Limit unit test checks to 8 digit precision
 .
 This helps some architecture passing the tests.
Author: Jean-Michel Vourgère <nirgal@debian.org>
Forwarded: https://github.com/oetiker/rrdtool-1.x/pull/652
Last-Update: 2015-08-09

Index: rrdtool/tests/dcounter1.output
===================================================================
--- rrdtool.orig/tests/dcounter1.output
+++ rrdtool/tests/dcounter1.output
@@ -1,25 +1,25 @@
-1300000800: -1.170925000e-03 3.678486942e-02
-1300001400: -9.698291667e-04 3.635424604e-02
-1300002000: -9.119541667e-04 3.596822650e-02
-1300002600: -8.563833333e-04 3.559656183e-02
-1300003200: -8.841666667e-04 3.523403971e-02
-1300003800: -8.271666667e-04 3.487834121e-02
-1300004400: -8.556666667e-04 3.452460017e-02
-1300005000: -8.556666667e-04 3.417131125e-02
-1300005600: -7.986625000e-04 3.382345987e-02
-1300006200: -7.700041667e-04 3.349336804e-02
-1300006800: -6.560000000e-04 3.319680079e-02
-1300007400: -5.705000000e-04 3.294191550e-02
-1300008000: -4.570458333e-04 3.272901004e-02
-1300008600: -3.993333333e-04 3.255259075e-02
-1300009200: -3.423333333e-04 3.239795992e-02
-1300009800: -3.136666667e-04 3.225936887e-02
-1300010400: -3.138333333e-04 3.212701475e-02
-1300011000: -3.421666667e-04 3.199287379e-02
-1300011600: -3.423333333e-04 3.185289975e-02
-1300012200: -3.993333333e-04 3.169681013e-02
-1300012800: -4.563333333e-04 3.152022212e-02
-1300013400: -5.412833333e-04 3.131382025e-02
-1300014000: -6.560000000e-04 3.106526071e-02
-1300014600: -9.404583333e-04 3.073564350e-02
-1300015200: -1.679979167e-03 3.023341000e-02
+1300000800: -1.1709250e-03 3.6784869e-02
+1300001400: -9.6982917e-04 3.6354246e-02
+1300002000: -9.1195417e-04 3.5968226e-02
+1300002600: -8.5638333e-04 3.5596562e-02
+1300003200: -8.8416667e-04 3.5234040e-02
+1300003800: -8.2716667e-04 3.4878341e-02
+1300004400: -8.5566667e-04 3.4524600e-02
+1300005000: -8.5566667e-04 3.4171311e-02
+1300005600: -7.9866250e-04 3.3823460e-02
+1300006200: -7.7000417e-04 3.3493368e-02
+1300006800: -6.5600000e-04 3.3196801e-02
+1300007400: -5.7050000e-04 3.2941916e-02
+1300008000: -4.5704583e-04 3.2729010e-02
+1300008600: -3.9933333e-04 3.2552591e-02
+1300009200: -3.4233333e-04 3.2397960e-02
+1300009800: -3.1366667e-04 3.2259369e-02
+1300010400: -3.1383333e-04 3.2127015e-02
+1300011000: -3.4216667e-04 3.1992874e-02
+1300011600: -3.4233333e-04 3.1852900e-02
+1300012200: -3.9933333e-04 3.1696810e-02
+1300012800: -4.5633333e-04 3.1520222e-02
+1300013400: -5.4128333e-04 3.1313820e-02
+1300014000: -6.5600000e-04 3.1065261e-02
+1300014600: -9.4045833e-04 3.0735643e-02
+1300015200: -1.6799792e-03 3.0233410e-02
Index: rrdtool/tests/functions
===================================================================
--- rrdtool.orig/tests/functions
+++ rrdtool/tests/functions
@@ -12,7 +12,7 @@ DIFF="diff -u"
 DIFF9=seddif
 
 function seddif {
-   perl -p -e 's/([-+]?\d\.\d+e[-+]\d+)/sprintf("%0.9e",$1)/ge' | $DIFF $@
+   perl -p -e 's/([-+]?\d\.\d+e[-+]\d+)/sprintf("%0.7e",$1)/ge' | $DIFF $@
 }
 
 #
Index: rrdtool/tests/modify-test1.create.dump
===================================================================
--- rrdtool.orig/tests/modify-test1.create.dump
+++ rrdtool/tests/modify-test1.create.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,27 +25,27 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -53,27 +53,27 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.000000000e+01</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.700000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.200000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.700000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.0000000e+01</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.7000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.2000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.7000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify-test1.mod1.dump
===================================================================
--- rrdtool.orig/tests/modify-test1.mod1.dump
+++ rrdtool/tests/modify-test1.mod1.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,37 +25,37 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -63,27 +63,27 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.000000000e+01</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.700000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.200000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.700000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.0000000e+01</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.7000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.2000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.7000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify-test3.create.dump
===================================================================
--- rrdtool.orig/tests/modify-test3.create.dump
+++ rrdtool/tests/modify-test3.create.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -23,12 +23,12 @@
 		<name> b </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>10510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -36,12 +36,12 @@
 		<name> c </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>20510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -51,39 +51,39 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
-			<primary_value>1.051000000e+04</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>1.0510000e+04</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
-			<primary_value>2.051000000e+04</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>2.0510000e+04</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v><v>1.042000000e+04</v><v>2.042000000e+04</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v><v>1.043000000e+04</v><v>2.043000000e+04</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v><v>1.044000000e+04</v><v>2.044000000e+04</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v><v>1.045000000e+04</v><v>2.045000000e+04</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v><v>1.046000000e+04</v><v>2.046000000e+04</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v><v>1.047000000e+04</v><v>2.047000000e+04</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v><v>1.048000000e+04</v><v>2.048000000e+04</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v><v>1.049000000e+04</v><v>2.049000000e+04</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v><v>1.050000000e+04</v><v>2.050000000e+04</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v><v>1.051000000e+04</v><v>2.051000000e+04</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v><v>1.0420000e+04</v><v>2.0420000e+04</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v><v>1.0430000e+04</v><v>2.0430000e+04</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v><v>1.0440000e+04</v><v>2.0440000e+04</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v><v>1.0450000e+04</v><v>2.0450000e+04</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v><v>1.0460000e+04</v><v>2.0460000e+04</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v><v>1.0470000e+04</v><v>2.0470000e+04</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v><v>1.0480000e+04</v><v>2.0480000e+04</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v><v>1.0490000e+04</v><v>2.0490000e+04</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v><v>1.0500000e+04</v><v>2.0500000e+04</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v><v>1.0510000e+04</v><v>2.0510000e+04</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -91,39 +91,39 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
-			<primary_value>1.047000000e+04</primary_value>
-			<secondary_value>1.049000000e+04</secondary_value>
-			<value>2.101000000e+04</value>
+			<primary_value>1.0470000e+04</primary_value>
+			<secondary_value>1.0490000e+04</secondary_value>
+			<value>2.1010000e+04</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
-			<primary_value>2.047000000e+04</primary_value>
-			<secondary_value>2.049000000e+04</secondary_value>
-			<value>4.101000000e+04</value>
+			<primary_value>2.0470000e+04</primary_value>
+			<secondary_value>2.0490000e+04</secondary_value>
+			<value>4.1010000e+04</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.000000000e+01</v><v>1.003000000e+04</v><v>2.003000000e+04</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.000000000e+01</v><v>1.007000000e+04</v><v>2.007000000e+04</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v><v>1.012000000e+04</v><v>2.012000000e+04</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.700000000e+02</v><v>1.017000000e+04</v><v>2.017000000e+04</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.200000000e+02</v><v>1.022000000e+04</v><v>2.022000000e+04</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.700000000e+02</v><v>1.027000000e+04</v><v>2.027000000e+04</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v><v>1.032000000e+04</v><v>2.032000000e+04</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.700000000e+02</v><v>1.037000000e+04</v><v>2.037000000e+04</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v><v>1.042000000e+04</v><v>2.042000000e+04</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v><v>1.047000000e+04</v><v>2.047000000e+04</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.0000000e+01</v><v>1.0030000e+04</v><v>2.0030000e+04</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.0000000e+01</v><v>1.0070000e+04</v><v>2.0070000e+04</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v><v>1.0120000e+04</v><v>2.0120000e+04</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.7000000e+02</v><v>1.0170000e+04</v><v>2.0170000e+04</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.2000000e+02</v><v>1.0220000e+04</v><v>2.0220000e+04</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.7000000e+02</v><v>1.0270000e+04</v><v>2.0270000e+04</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v><v>1.0320000e+04</v><v>2.0320000e+04</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.7000000e+02</v><v>1.0370000e+04</v><v>2.0370000e+04</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v><v>1.0420000e+04</v><v>2.0420000e+04</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v><v>1.0470000e+04</v><v>2.0470000e+04</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify-test3.mod1.dump
===================================================================
--- rrdtool.orig/tests/modify-test3.mod1.dump
+++ rrdtool/tests/modify-test3.mod1.dump
@@ -10,12 +10,12 @@
 		<name> b </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>10510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -23,12 +23,12 @@
 		<name> c </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>20510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -38,43 +38,43 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>1.051000000e+04</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>1.0510000e+04</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
-			<primary_value>2.051000000e+04</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>2.0510000e+04</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>1.032000000e+04</v><v>2.032000000e+04</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>1.032000000e+04</v><v>2.032000000e+04</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>1.032000000e+04</v><v>2.032000000e+04</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>1.037000000e+04</v><v>2.037000000e+04</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>1.037000000e+04</v><v>2.037000000e+04</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>1.037000000e+04</v><v>2.037000000e+04</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>1.037000000e+04</v><v>2.037000000e+04</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>1.037000000e+04</v><v>2.037000000e+04</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>1.042000000e+04</v><v>2.042000000e+04</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>1.042000000e+04</v><v>2.042000000e+04</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>1.042000000e+04</v><v>2.042000000e+04</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>1.043000000e+04</v><v>2.043000000e+04</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>1.044000000e+04</v><v>2.044000000e+04</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>1.045000000e+04</v><v>2.045000000e+04</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>1.046000000e+04</v><v>2.046000000e+04</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>1.047000000e+04</v><v>2.047000000e+04</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>1.048000000e+04</v><v>2.048000000e+04</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>1.049000000e+04</v><v>2.049000000e+04</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>1.050000000e+04</v><v>2.050000000e+04</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>1.051000000e+04</v><v>2.051000000e+04</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>1.0320000e+04</v><v>2.0320000e+04</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>1.0320000e+04</v><v>2.0320000e+04</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>1.0320000e+04</v><v>2.0320000e+04</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>1.0370000e+04</v><v>2.0370000e+04</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>1.0370000e+04</v><v>2.0370000e+04</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>1.0370000e+04</v><v>2.0370000e+04</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>1.0370000e+04</v><v>2.0370000e+04</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>1.0370000e+04</v><v>2.0370000e+04</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>1.0420000e+04</v><v>2.0420000e+04</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>1.0420000e+04</v><v>2.0420000e+04</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>1.0420000e+04</v><v>2.0420000e+04</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>1.0430000e+04</v><v>2.0430000e+04</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>1.0440000e+04</v><v>2.0440000e+04</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>1.0450000e+04</v><v>2.0450000e+04</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>1.0460000e+04</v><v>2.0460000e+04</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>1.0470000e+04</v><v>2.0470000e+04</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>1.0480000e+04</v><v>2.0480000e+04</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>1.0490000e+04</v><v>2.0490000e+04</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>1.0500000e+04</v><v>2.0500000e+04</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>1.0510000e+04</v><v>2.0510000e+04</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -82,33 +82,33 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>1.047000000e+04</primary_value>
-			<secondary_value>1.049000000e+04</secondary_value>
-			<value>2.101000000e+04</value>
+			<primary_value>1.0470000e+04</primary_value>
+			<secondary_value>1.0490000e+04</secondary_value>
+			<value>2.1010000e+04</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
-			<primary_value>2.047000000e+04</primary_value>
-			<secondary_value>2.049000000e+04</secondary_value>
-			<value>4.101000000e+04</value>
+			<primary_value>2.0470000e+04</primary_value>
+			<secondary_value>2.0490000e+04</secondary_value>
+			<value>4.1010000e+04</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>1.003000000e+04</v><v>2.003000000e+04</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>1.007000000e+04</v><v>2.007000000e+04</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.012000000e+04</v><v>2.012000000e+04</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.017000000e+04</v><v>2.017000000e+04</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>1.022000000e+04</v><v>2.022000000e+04</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>1.027000000e+04</v><v>2.027000000e+04</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>1.032000000e+04</v><v>2.032000000e+04</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>1.037000000e+04</v><v>2.037000000e+04</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>1.042000000e+04</v><v>2.042000000e+04</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>1.047000000e+04</v><v>2.047000000e+04</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>1.0030000e+04</v><v>2.0030000e+04</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>1.0070000e+04</v><v>2.0070000e+04</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.0120000e+04</v><v>2.0120000e+04</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.0170000e+04</v><v>2.0170000e+04</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>1.0220000e+04</v><v>2.0220000e+04</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>1.0270000e+04</v><v>2.0270000e+04</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>1.0320000e+04</v><v>2.0320000e+04</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>1.0370000e+04</v><v>2.0370000e+04</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>1.0420000e+04</v><v>2.0420000e+04</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>1.0470000e+04</v><v>2.0470000e+04</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify2-testa-create.dump
===================================================================
--- rrdtool.orig/tests/modify2-testa-create.dump
+++ rrdtool/tests/modify2-testa-create.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,12 +25,12 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
@@ -86,56 +86,56 @@
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:06:00 CET / 1299999960 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:07:00 CET / 1300000020 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>2.000000000e+01</v></row>
-			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>3.000000000e+01</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.000000000e+01</v></row>
-			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>5.000000000e+01</v></row>
-			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>6.000000000e+01</v></row>
-			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>7.000000000e+01</v></row>
-			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>8.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.000000000e+01</v></row>
-			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>1.000000000e+02</v></row>
-			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.100000000e+02</v></row>
-			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.200000000e+02</v></row>
-			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.300000000e+02</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.400000000e+02</v></row>
-			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.500000000e+02</v></row>
-			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.600000000e+02</v></row>
-			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.700000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.800000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.900000000e+02</v></row>
-			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>2.000000000e+02</v></row>
-			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.100000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.200000000e+02</v></row>
-			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.300000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.400000000e+02</v></row>
-			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.500000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.600000000e+02</v></row>
-			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.700000000e+02</v></row>
-			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.800000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.900000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>3.000000000e+02</v></row>
-			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.100000000e+02</v></row>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.300000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.400000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.500000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.600000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.800000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.900000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>4.000000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.100000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v></row>
+			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>2.0000000e+01</v></row>
+			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>3.0000000e+01</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.0000000e+01</v></row>
+			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>5.0000000e+01</v></row>
+			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>6.0000000e+01</v></row>
+			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>7.0000000e+01</v></row>
+			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>8.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.0000000e+01</v></row>
+			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>1.0000000e+02</v></row>
+			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.1000000e+02</v></row>
+			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.2000000e+02</v></row>
+			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.3000000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.4000000e+02</v></row>
+			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.5000000e+02</v></row>
+			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.6000000e+02</v></row>
+			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.7000000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.8000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.9000000e+02</v></row>
+			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>2.0000000e+02</v></row>
+			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.1000000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.2000000e+02</v></row>
+			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.3000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.4000000e+02</v></row>
+			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.5000000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.6000000e+02</v></row>
+			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.7000000e+02</v></row>
+			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.8000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.9000000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>3.0000000e+02</v></row>
+			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.1000000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.3000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.4000000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.5000000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.6000000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.8000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.9000000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>4.0000000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.1000000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -143,19 +143,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -163,19 +163,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.500000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.000000000e+02</value>
+			<primary_value>4.5000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.0000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.000000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.500000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.0000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.5000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -183,19 +183,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.900000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.100000000e+02</value>
+			<primary_value>4.9000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.1000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -203,19 +203,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.900000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.100000000e+02</value>
+			<primary_value>4.9000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.1000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify2-testb-mod1.dump
===================================================================
--- rrdtool.orig/tests/modify2-testb-mod1.dump
+++ rrdtool/tests/modify2-testb-mod1.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,12 +25,12 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
@@ -86,56 +86,56 @@
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:06:00 CET / 1299999960 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:07:00 CET / 1300000020 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>2.000000000e+01</v></row>
-			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>3.000000000e+01</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.000000000e+01</v></row>
-			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>5.000000000e+01</v></row>
-			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>6.000000000e+01</v></row>
-			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>7.000000000e+01</v></row>
-			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>8.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.000000000e+01</v></row>
-			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>1.000000000e+02</v></row>
-			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.100000000e+02</v></row>
-			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.200000000e+02</v></row>
-			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.300000000e+02</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.400000000e+02</v></row>
-			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.500000000e+02</v></row>
-			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.600000000e+02</v></row>
-			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.700000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.800000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.900000000e+02</v></row>
-			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>2.000000000e+02</v></row>
-			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.100000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.200000000e+02</v></row>
-			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.300000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.400000000e+02</v></row>
-			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.500000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.600000000e+02</v></row>
-			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.700000000e+02</v></row>
-			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.800000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.900000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>3.000000000e+02</v></row>
-			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.100000000e+02</v></row>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.300000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.400000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.500000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.600000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.800000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.900000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>4.000000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.100000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v></row>
+			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>2.0000000e+01</v></row>
+			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>3.0000000e+01</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.0000000e+01</v></row>
+			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>5.0000000e+01</v></row>
+			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>6.0000000e+01</v></row>
+			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>7.0000000e+01</v></row>
+			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>8.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.0000000e+01</v></row>
+			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>1.0000000e+02</v></row>
+			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.1000000e+02</v></row>
+			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.2000000e+02</v></row>
+			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.3000000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.4000000e+02</v></row>
+			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.5000000e+02</v></row>
+			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.6000000e+02</v></row>
+			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.7000000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.8000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.9000000e+02</v></row>
+			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>2.0000000e+02</v></row>
+			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.1000000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.2000000e+02</v></row>
+			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.3000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.4000000e+02</v></row>
+			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.5000000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.6000000e+02</v></row>
+			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.7000000e+02</v></row>
+			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.8000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.9000000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>3.0000000e+02</v></row>
+			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.1000000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.3000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.4000000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.5000000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.6000000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.8000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.9000000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>4.0000000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.1000000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -143,29 +143,29 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
 			<!-- 2011-03-13 08:00:00 CET / 1299999600 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.000000000e+01</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.700000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.200000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.700000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.0000000e+01</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.7000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.2000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.7000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -173,29 +173,29 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.500000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.000000000e+02</value>
+			<primary_value>4.5000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.0000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
 			<!-- 2011-03-13 08:00:00 CET / 1299999600 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>2.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>5.000000000e+01</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.000000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.500000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.000000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.500000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.000000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.500000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.000000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.500000000e+02</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>2.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>5.0000000e+01</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.0000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.5000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.0000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.5000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.0000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.5000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.0000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.5000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -203,29 +203,29 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.900000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.100000000e+02</value>
+			<primary_value>4.9000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.1000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
 			<!-- 2011-03-13 08:00:00 CET / 1299999600 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.000000000e+01</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.400000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.900000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.400000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.900000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.400000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.900000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.0000000e+01</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.4000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.9000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.4000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.9000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.4000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.9000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -233,29 +233,29 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.900000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.100000000e+02</value>
+			<primary_value>4.9000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.1000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
 			<!-- 2011-03-13 08:00:00 CET / 1299999600 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.000000000e+01</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.400000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.900000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.400000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.900000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.400000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.900000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.0000000e+01</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.4000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.9000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.4000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.9000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.4000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.9000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify2-testc-mod1.dump
===================================================================
--- rrdtool.orig/tests/modify2-testc-mod1.dump
+++ rrdtool/tests/modify2-testc-mod1.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,12 +25,12 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
@@ -86,56 +86,56 @@
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:06:00 CET / 1299999960 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:07:00 CET / 1300000020 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>2.000000000e+01</v></row>
-			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>3.000000000e+01</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.000000000e+01</v></row>
-			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>5.000000000e+01</v></row>
-			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>6.000000000e+01</v></row>
-			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>7.000000000e+01</v></row>
-			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>8.000000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.000000000e+01</v></row>
-			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>1.000000000e+02</v></row>
-			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.100000000e+02</v></row>
-			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.200000000e+02</v></row>
-			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.300000000e+02</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.400000000e+02</v></row>
-			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.500000000e+02</v></row>
-			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.600000000e+02</v></row>
-			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.700000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.800000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.900000000e+02</v></row>
-			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>2.000000000e+02</v></row>
-			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.100000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.200000000e+02</v></row>
-			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.300000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.400000000e+02</v></row>
-			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.500000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.600000000e+02</v></row>
-			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.700000000e+02</v></row>
-			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.800000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.900000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>3.000000000e+02</v></row>
-			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.100000000e+02</v></row>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.300000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.400000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.500000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.600000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.700000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.800000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.900000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>4.000000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.100000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v></row>
+			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>2.0000000e+01</v></row>
+			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>3.0000000e+01</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>4.0000000e+01</v></row>
+			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>5.0000000e+01</v></row>
+			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>6.0000000e+01</v></row>
+			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>7.0000000e+01</v></row>
+			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>8.0000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>9.0000000e+01</v></row>
+			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>1.0000000e+02</v></row>
+			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.1000000e+02</v></row>
+			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.2000000e+02</v></row>
+			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.3000000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.4000000e+02</v></row>
+			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.5000000e+02</v></row>
+			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.6000000e+02</v></row>
+			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.7000000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.8000000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.9000000e+02</v></row>
+			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>2.0000000e+02</v></row>
+			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.1000000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.2000000e+02</v></row>
+			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.3000000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.4000000e+02</v></row>
+			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.5000000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.6000000e+02</v></row>
+			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.7000000e+02</v></row>
+			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.8000000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.9000000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>3.0000000e+02</v></row>
+			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.1000000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.3000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.4000000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.5000000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.6000000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.7000000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.8000000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.9000000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>4.0000000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.1000000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -143,19 +143,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -163,19 +163,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.500000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.000000000e+02</value>
+			<primary_value>4.5000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.0000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.000000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.500000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.0000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.5000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -183,19 +183,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.900000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.100000000e+02</value>
+			<primary_value>4.9000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.1000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -203,19 +203,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.900000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>5.100000000e+02</value>
+			<primary_value>4.9000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>5.1000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -223,27 +223,27 @@
 		<pdp_per_row>2</pdp_per_row> <!-- 120 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.950000000e+02</primary_value>
-			<secondary_value>5.000000000e+02</secondary_value>
-			<value>5.100000000e+02</value>
+			<primary_value>4.9500000e+02</primary_value>
+			<secondary_value>5.0000000e+02</secondary_value>
+			<value>5.1000000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.150000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.350000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.550000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.750000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.550000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.750000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.950000000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.1500000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.3500000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.5500000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.7500000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.5500000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.7500000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.9500000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify4-testa-create.dump
===================================================================
--- rrdtool.orig/tests/modify4-testa-create.dump
+++ rrdtool/tests/modify4-testa-create.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>490</last_ds>
-		<value>1.470000000e+04</value>
+		<value>1.4700000e+04</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,12 +25,12 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.0000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
@@ -88,54 +88,54 @@
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:06:00 CET / 1299999960 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:07:00 CET / 1300000020 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.500000000e+01</v></row>
-			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.500000000e+01</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.500000000e+01</v></row>
-			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.500000000e+01</v></row>
-			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.500000000e+01</v></row>
-			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.500000000e+01</v></row>
-			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.500000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.500000000e+01</v></row>
-			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.500000000e+01</v></row>
-			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.050000000e+02</v></row>
-			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.150000000e+02</v></row>
-			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.250000000e+02</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.350000000e+02</v></row>
-			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.450000000e+02</v></row>
-			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.550000000e+02</v></row>
-			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.650000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.750000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.850000000e+02</v></row>
-			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.950000000e+02</v></row>
-			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.050000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.150000000e+02</v></row>
-			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.250000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.350000000e+02</v></row>
-			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.450000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.550000000e+02</v></row>
-			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.650000000e+02</v></row>
-			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.750000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.850000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.950000000e+02</v></row>
-			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.050000000e+02</v></row>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.150000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.250000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.350000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.450000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.550000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.650000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.750000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.850000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.050000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.250000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.450000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.550000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.650000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.750000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.5000000e+01</v></row>
+			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.5000000e+01</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.5000000e+01</v></row>
+			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.5000000e+01</v></row>
+			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.5000000e+01</v></row>
+			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.5000000e+01</v></row>
+			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.5000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.5000000e+01</v></row>
+			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.5000000e+01</v></row>
+			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.0500000e+02</v></row>
+			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.1500000e+02</v></row>
+			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.2500000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.3500000e+02</v></row>
+			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.4500000e+02</v></row>
+			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.5500000e+02</v></row>
+			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.6500000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.7500000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.8500000e+02</v></row>
+			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.9500000e+02</v></row>
+			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.0500000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.1500000e+02</v></row>
+			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.2500000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.3500000e+02</v></row>
+			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.4500000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.5500000e+02</v></row>
+			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.6500000e+02</v></row>
+			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.7500000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.8500000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.9500000e+02</v></row>
+			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.0500000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.1500000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.2500000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.3500000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.4500000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.5500000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.6500000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.7500000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.8500000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.0500000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.2500000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.4500000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.5500000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.6500000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.7500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -143,19 +143,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.0000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.650000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>0.000000000e+00</value>
+			<primary_value>4.6500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>0.0000000e+00</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.650000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.6500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -163,19 +163,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.0000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.450000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
+			<primary_value>4.4500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
 			<value>inf</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.450000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.4500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -183,19 +183,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.0000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
 			<value>-inf</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -203,19 +203,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.0000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify4-testa1-create.dump
===================================================================
--- rrdtool.orig/tests/modify4-testa1-create.dump
+++ rrdtool/tests/modify4-testa1-create.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>500</last_ds>
-		<value>1.500000000e+04</value>
+		<value>1.5000000e+04</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,12 +25,12 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.950000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>4.9500000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
@@ -87,55 +87,55 @@
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:06:00 CET / 1299999960 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:07:00 CET / 1300000020 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.500000000e+01</v></row>
-			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.500000000e+01</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.500000000e+01</v></row>
-			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.500000000e+01</v></row>
-			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.500000000e+01</v></row>
-			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.500000000e+01</v></row>
-			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.500000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.500000000e+01</v></row>
-			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.500000000e+01</v></row>
-			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.050000000e+02</v></row>
-			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.150000000e+02</v></row>
-			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.250000000e+02</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.350000000e+02</v></row>
-			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.450000000e+02</v></row>
-			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.550000000e+02</v></row>
-			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.650000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.750000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.850000000e+02</v></row>
-			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.950000000e+02</v></row>
-			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.050000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.150000000e+02</v></row>
-			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.250000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.350000000e+02</v></row>
-			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.450000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.550000000e+02</v></row>
-			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.650000000e+02</v></row>
-			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.750000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.850000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.950000000e+02</v></row>
-			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.050000000e+02</v></row>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.150000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.250000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.350000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.450000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.550000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.650000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.750000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.850000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.050000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.250000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.450000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.550000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.650000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.750000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.950000000e+02</v></row>
+			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.5000000e+01</v></row>
+			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.5000000e+01</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.5000000e+01</v></row>
+			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.5000000e+01</v></row>
+			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.5000000e+01</v></row>
+			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.5000000e+01</v></row>
+			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.5000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.5000000e+01</v></row>
+			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.5000000e+01</v></row>
+			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.0500000e+02</v></row>
+			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.1500000e+02</v></row>
+			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.2500000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.3500000e+02</v></row>
+			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.4500000e+02</v></row>
+			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.5500000e+02</v></row>
+			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.6500000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.7500000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.8500000e+02</v></row>
+			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.9500000e+02</v></row>
+			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.0500000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.1500000e+02</v></row>
+			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.2500000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.3500000e+02</v></row>
+			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.4500000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.5500000e+02</v></row>
+			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.6500000e+02</v></row>
+			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.7500000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.8500000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.9500000e+02</v></row>
+			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.0500000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.1500000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.2500000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.3500000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.4500000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.5500000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.6500000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.7500000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.8500000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.0500000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.2500000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.4500000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.5500000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.6500000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.7500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.9500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -143,19 +143,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.650000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.6500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.650000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.6500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -163,19 +163,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.450000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.4500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.450000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.4500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -183,19 +183,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -203,19 +203,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify4-testa2-create.dump
===================================================================
--- rrdtool.orig/tests/modify4-testa2-create.dump
+++ rrdtool/tests/modify4-testa2-create.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>500</last_ds>
-		<value>1.500000000e+04</value>
+		<value>1.5000000e+04</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,12 +25,12 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.950000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>4.9500000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
@@ -87,55 +87,55 @@
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:06:00 CET / 1299999960 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:07:00 CET / 1300000020 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.500000000e+01</v></row>
-			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.500000000e+01</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.500000000e+01</v></row>
-			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.500000000e+01</v></row>
-			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.500000000e+01</v></row>
-			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.500000000e+01</v></row>
-			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.500000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.500000000e+01</v></row>
-			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.500000000e+01</v></row>
-			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.050000000e+02</v></row>
-			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.150000000e+02</v></row>
-			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.250000000e+02</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.350000000e+02</v></row>
-			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.450000000e+02</v></row>
-			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.550000000e+02</v></row>
-			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.650000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.750000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.850000000e+02</v></row>
-			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.950000000e+02</v></row>
-			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.050000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.150000000e+02</v></row>
-			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.250000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.350000000e+02</v></row>
-			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.450000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.550000000e+02</v></row>
-			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.650000000e+02</v></row>
-			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.750000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.850000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.950000000e+02</v></row>
-			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.050000000e+02</v></row>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.150000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.250000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.350000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.450000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.550000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.650000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.750000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.850000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.050000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.250000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.450000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.550000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.650000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.750000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.950000000e+02</v></row>
+			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.5000000e+01</v></row>
+			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.5000000e+01</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.5000000e+01</v></row>
+			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.5000000e+01</v></row>
+			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.5000000e+01</v></row>
+			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.5000000e+01</v></row>
+			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.5000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.5000000e+01</v></row>
+			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.5000000e+01</v></row>
+			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.0500000e+02</v></row>
+			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.1500000e+02</v></row>
+			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.2500000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.3500000e+02</v></row>
+			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.4500000e+02</v></row>
+			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.5500000e+02</v></row>
+			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.6500000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.7500000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.8500000e+02</v></row>
+			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.9500000e+02</v></row>
+			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.0500000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.1500000e+02</v></row>
+			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.2500000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.3500000e+02</v></row>
+			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.4500000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.5500000e+02</v></row>
+			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.6500000e+02</v></row>
+			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.7500000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.8500000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.9500000e+02</v></row>
+			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.0500000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.1500000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.2500000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.3500000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.4500000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.5500000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.6500000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.7500000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.8500000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.0500000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.2500000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.4500000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.5500000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.6500000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.7500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.9500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -143,19 +143,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.650000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.6500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.650000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.6500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -163,19 +163,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.450000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.4500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.450000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.4500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -183,19 +183,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -203,19 +203,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -223,27 +223,27 @@
 		<pdp_per_row>4</pdp_per_row> <!-- 240 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.800000000e+02</primary_value>
-			<secondary_value>4.950000000e+02</secondary_value>
-			<value>0.000000000e+00</value>
+			<primary_value>4.8000000e+02</primary_value>
+			<secondary_value>4.9500000e+02</secondary_value>
+			<value>0.0000000e+00</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.600000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.000000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.400000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.800000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.600000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.000000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.800000000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.6000000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.0000000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.4000000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.8000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.6000000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.0000000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.8000000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify5-testa1-create.dump
===================================================================
--- rrdtool.orig/tests/modify5-testa1-create.dump
+++ rrdtool/tests/modify5-testa1-create.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>500</last_ds>
-		<value>1.500000000e+04</value>
+		<value>1.5000000e+04</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,12 +25,12 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.950000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>4.9500000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
@@ -87,55 +87,55 @@
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:06:00 CET / 1299999960 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:07:00 CET / 1300000020 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.500000000e+01</v></row>
-			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.500000000e+01</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.500000000e+01</v></row>
-			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.500000000e+01</v></row>
-			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.500000000e+01</v></row>
-			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.500000000e+01</v></row>
-			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.500000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.500000000e+01</v></row>
-			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.500000000e+01</v></row>
-			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.050000000e+02</v></row>
-			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.150000000e+02</v></row>
-			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.250000000e+02</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.350000000e+02</v></row>
-			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.450000000e+02</v></row>
-			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.550000000e+02</v></row>
-			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.650000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.750000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.850000000e+02</v></row>
-			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.950000000e+02</v></row>
-			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.050000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.150000000e+02</v></row>
-			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.250000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.350000000e+02</v></row>
-			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.450000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.550000000e+02</v></row>
-			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.650000000e+02</v></row>
-			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.750000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.850000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.950000000e+02</v></row>
-			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.050000000e+02</v></row>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.150000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.250000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.350000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.450000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.550000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.650000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.750000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.850000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.050000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.250000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.450000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.550000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.650000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.750000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.950000000e+02</v></row>
+			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.5000000e+01</v></row>
+			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.5000000e+01</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.5000000e+01</v></row>
+			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.5000000e+01</v></row>
+			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.5000000e+01</v></row>
+			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.5000000e+01</v></row>
+			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.5000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.5000000e+01</v></row>
+			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.5000000e+01</v></row>
+			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.0500000e+02</v></row>
+			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.1500000e+02</v></row>
+			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.2500000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.3500000e+02</v></row>
+			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.4500000e+02</v></row>
+			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.5500000e+02</v></row>
+			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.6500000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.7500000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.8500000e+02</v></row>
+			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.9500000e+02</v></row>
+			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.0500000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.1500000e+02</v></row>
+			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.2500000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.3500000e+02</v></row>
+			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.4500000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.5500000e+02</v></row>
+			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.6500000e+02</v></row>
+			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.7500000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.8500000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.9500000e+02</v></row>
+			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.0500000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.1500000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.2500000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.3500000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.4500000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.5500000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.6500000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.7500000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.8500000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.0500000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.2500000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.4500000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.5500000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.6500000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.7500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.9500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -143,19 +143,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.650000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.6500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.650000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.6500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -163,19 +163,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.450000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.4500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.450000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.4500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -183,19 +183,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -203,19 +203,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/modify5-testa2-create.dump
===================================================================
--- rrdtool.orig/tests/modify5-testa2-create.dump
+++ rrdtool/tests/modify5-testa2-create.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>500</last_ds>
-		<value>1.500000000e+04</value>
+		<value>1.5000000e+04</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -25,12 +25,12 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.950000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>4.9500000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
@@ -87,55 +87,55 @@
 			<!-- 2011-03-13 08:05:00 CET / 1299999900 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:06:00 CET / 1299999960 --> <row><v>NaN</v></row>
 			<!-- 2011-03-13 08:07:00 CET / 1300000020 --> <row><v>NaN</v></row>
-			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.500000000e+01</v></row>
-			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.500000000e+01</v></row>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.500000000e+01</v></row>
-			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.500000000e+01</v></row>
-			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.500000000e+01</v></row>
-			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.500000000e+01</v></row>
-			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.500000000e+01</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.500000000e+01</v></row>
-			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.500000000e+01</v></row>
-			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.050000000e+02</v></row>
-			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.150000000e+02</v></row>
-			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.250000000e+02</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.350000000e+02</v></row>
-			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.450000000e+02</v></row>
-			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.550000000e+02</v></row>
-			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.650000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.750000000e+02</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.850000000e+02</v></row>
-			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.950000000e+02</v></row>
-			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.050000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.150000000e+02</v></row>
-			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.250000000e+02</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.350000000e+02</v></row>
-			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.450000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.550000000e+02</v></row>
-			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.650000000e+02</v></row>
-			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.750000000e+02</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.850000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.950000000e+02</v></row>
-			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.050000000e+02</v></row>
-			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.150000000e+02</v></row>
-			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.250000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.350000000e+02</v></row>
-			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.450000000e+02</v></row>
-			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.550000000e+02</v></row>
-			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.650000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.750000000e+02</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.850000000e+02</v></row>
-			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.050000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.250000000e+02</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.450000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.550000000e+02</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.650000000e+02</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.750000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.950000000e+02</v></row>
+			<!-- 2011-03-13 08:08:00 CET / 1300000080 --> <row><v>1.5000000e+01</v></row>
+			<!-- 2011-03-13 08:09:00 CET / 1300000140 --> <row><v>2.5000000e+01</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.5000000e+01</v></row>
+			<!-- 2011-03-13 08:11:00 CET / 1300000260 --> <row><v>4.5000000e+01</v></row>
+			<!-- 2011-03-13 08:12:00 CET / 1300000320 --> <row><v>5.5000000e+01</v></row>
+			<!-- 2011-03-13 08:13:00 CET / 1300000380 --> <row><v>6.5000000e+01</v></row>
+			<!-- 2011-03-13 08:14:00 CET / 1300000440 --> <row><v>7.5000000e+01</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>8.5000000e+01</v></row>
+			<!-- 2011-03-13 08:16:00 CET / 1300000560 --> <row><v>9.5000000e+01</v></row>
+			<!-- 2011-03-13 08:17:00 CET / 1300000620 --> <row><v>1.0500000e+02</v></row>
+			<!-- 2011-03-13 08:18:00 CET / 1300000680 --> <row><v>1.1500000e+02</v></row>
+			<!-- 2011-03-13 08:19:00 CET / 1300000740 --> <row><v>1.2500000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.3500000e+02</v></row>
+			<!-- 2011-03-13 08:21:00 CET / 1300000860 --> <row><v>1.4500000e+02</v></row>
+			<!-- 2011-03-13 08:22:00 CET / 1300000920 --> <row><v>1.5500000e+02</v></row>
+			<!-- 2011-03-13 08:23:00 CET / 1300000980 --> <row><v>1.6500000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.7500000e+02</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.8500000e+02</v></row>
+			<!-- 2011-03-13 08:26:00 CET / 1300001160 --> <row><v>1.9500000e+02</v></row>
+			<!-- 2011-03-13 08:27:00 CET / 1300001220 --> <row><v>2.0500000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.1500000e+02</v></row>
+			<!-- 2011-03-13 08:29:00 CET / 1300001340 --> <row><v>2.2500000e+02</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.3500000e+02</v></row>
+			<!-- 2011-03-13 08:31:00 CET / 1300001460 --> <row><v>2.4500000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.5500000e+02</v></row>
+			<!-- 2011-03-13 08:33:00 CET / 1300001580 --> <row><v>2.6500000e+02</v></row>
+			<!-- 2011-03-13 08:34:00 CET / 1300001640 --> <row><v>2.7500000e+02</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.8500000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.9500000e+02</v></row>
+			<!-- 2011-03-13 08:37:00 CET / 1300001820 --> <row><v>3.0500000e+02</v></row>
+			<!-- 2011-03-13 08:38:00 CET / 1300001880 --> <row><v>3.1500000e+02</v></row>
+			<!-- 2011-03-13 08:39:00 CET / 1300001940 --> <row><v>3.2500000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.3500000e+02</v></row>
+			<!-- 2011-03-13 08:41:00 CET / 1300002060 --> <row><v>3.4500000e+02</v></row>
+			<!-- 2011-03-13 08:42:00 CET / 1300002120 --> <row><v>3.5500000e+02</v></row>
+			<!-- 2011-03-13 08:43:00 CET / 1300002180 --> <row><v>3.6500000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.7500000e+02</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.8500000e+02</v></row>
+			<!-- 2011-03-13 08:46:00 CET / 1300002360 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:47:00 CET / 1300002420 --> <row><v>4.0500000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.2500000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.4500000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.5500000e+02</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.6500000e+02</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.7500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.9500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -143,19 +143,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.650000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.6500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.150000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.650000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.1500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.6500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -163,19 +163,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.450000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.4500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.950000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.450000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>3.9500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.4500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -183,19 +183,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -203,19 +203,19 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.850000000e+02</primary_value>
-			<secondary_value>4.850000000e+02</secondary_value>
-			<value>4.950000000e+02</value>
+			<primary_value>4.8500000e+02</primary_value>
+			<secondary_value>4.8500000e+02</secondary_value>
+			<value>4.9500000e+02</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.350000000e+02</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.850000000e+02</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.3500000e+02</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.8500000e+02</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -223,27 +223,27 @@
 		<pdp_per_row>4</pdp_per_row> <!-- 240 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.800000000e+02</primary_value>
-			<secondary_value>4.950000000e+02</secondary_value>
-			<value>0.000000000e+00</value>
+			<primary_value>4.8000000e+02</primary_value>
+			<secondary_value>4.9500000e+02</secondary_value>
+			<value>0.0000000e+00</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v></row>
-			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.600000000e+02</v></row>
-			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.000000000e+02</v></row>
-			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.400000000e+02</v></row>
-			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.800000000e+02</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v></row>
-			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.600000000e+02</v></row>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.000000000e+02</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.400000000e+02</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.800000000e+02</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v></row>
+			<!-- 2011-03-13 08:24:00 CET / 1300001040 --> <row><v>1.6000000e+02</v></row>
+			<!-- 2011-03-13 08:28:00 CET / 1300001280 --> <row><v>2.0000000e+02</v></row>
+			<!-- 2011-03-13 08:32:00 CET / 1300001520 --> <row><v>2.4000000e+02</v></row>
+			<!-- 2011-03-13 08:36:00 CET / 1300001760 --> <row><v>2.8000000e+02</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v></row>
+			<!-- 2011-03-13 08:44:00 CET / 1300002240 --> <row><v>3.6000000e+02</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.0000000e+02</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.4000000e+02</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>4.8000000e+02</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/rpn2.output
===================================================================
--- rrdtool.orig/tests/rpn2.output
+++ rrdtool/tests/rpn2.output
@@ -16,23 +16,23 @@
           ]
      },
   "data": [
-    [ 1.000000000e-01, 7.200000000e+02, 0.000000000e+00, 7.200000000e+02, 0.000000000e+00, 7.200000000e+02, 0.000000000e+00, 7.200000000e+02, 0.000000000e+00 ],
-    [ 1.000000000e-01, 1.440000000e+03, 0.000000000e+00, 1.440000000e+03, 0.000000000e+00, 1.440000000e+03, 0.000000000e+00, 1.440000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 2.160000000e+03, 0.000000000e+00, 2.160000000e+03, 0.000000000e+00, 2.160000000e+03, 0.000000000e+00, 2.160000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 2.880000000e+03, 0.000000000e+00, 2.880000000e+03, 0.000000000e+00, 2.880000000e+03, 0.000000000e+00, 2.880000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 7.200000000e+02, 1.000000000e+00, 7.200000000e+02, 1.000000000e+00, 3.600000000e+03, 0.000000000e+00, 3.600000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 1.440000000e+03, 0.000000000e+00, 1.440000000e+03, 0.000000000e+00, 4.320000000e+03, 0.000000000e+00, 4.320000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 2.160000000e+03, 0.000000000e+00, 2.160000000e+03, 0.000000000e+00, 5.040000000e+03, 0.000000000e+00, 5.040000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 2.880000000e+03, 0.000000000e+00, 2.880000000e+03, 0.000000000e+00, 5.760000000e+03, 0.000000000e+00, 5.760000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 3.600000000e+03, 0.000000000e+00, 3.600000000e+03, 0.000000000e+00, 6.480000000e+03, 0.000000000e+00, 6.480000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 4.320000000e+03, 0.000000000e+00, 4.320000000e+03, 0.000000000e+00, 7.200000000e+03, 0.000000000e+00, 7.200000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 5.040000000e+03, 0.000000000e+00, 5.040000000e+03, 0.000000000e+00, 7.920000000e+03, 0.000000000e+00, 7.920000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 5.760000000e+03, 0.000000000e+00, 5.760000000e+03, 0.000000000e+00, 8.640000000e+03, 0.000000000e+00, 8.640000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 6.480000000e+03, 0.000000000e+00, 6.480000000e+03, 0.000000000e+00, 9.360000000e+03, 0.000000000e+00, 9.360000000e+03, 0.000000000e+00 ],
-    [ 1.000000000e-01, 7.200000000e+03, 0.000000000e+00, 7.200000000e+03, 0.000000000e+00, 1.008000000e+04, 0.000000000e+00, 1.008000000e+04, 0.000000000e+00 ],
-    [ 1.000000000e-01, 7.920000000e+03, 0.000000000e+00, 7.920000000e+03, 0.000000000e+00, 1.080000000e+04, 0.000000000e+00, 1.080000000e+04, 0.000000000e+00 ],
-    [ 1.000000000e-01, 8.640000000e+03, 0.000000000e+00, 8.640000000e+03, 0.000000000e+00, 1.152000000e+04, 0.000000000e+00, 1.152000000e+04, 0.000000000e+00 ],
-    [ 1.000000000e-01, 7.200000000e+02, 1.000000000e+00, 9.360000000e+03, 0.000000000e+00, 7.200000000e+02, 1.000000000e+00, 7.200000000e+02, 1.000000000e+00 ],
-    [ 1.000000000e-01, 1.440000000e+03, 0.000000000e+00, 1.008000000e+04, 0.000000000e+00, 1.440000000e+03, 0.000000000e+00, 1.440000000e+03, 0.000000000e+00 ]
+    [ 1.0000000e-01, 7.2000000e+02, 0.0000000e+00, 7.2000000e+02, 0.0000000e+00, 7.2000000e+02, 0.0000000e+00, 7.2000000e+02, 0.0000000e+00 ],
+    [ 1.0000000e-01, 1.4400000e+03, 0.0000000e+00, 1.4400000e+03, 0.0000000e+00, 1.4400000e+03, 0.0000000e+00, 1.4400000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 2.1600000e+03, 0.0000000e+00, 2.1600000e+03, 0.0000000e+00, 2.1600000e+03, 0.0000000e+00, 2.1600000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 2.8800000e+03, 0.0000000e+00, 2.8800000e+03, 0.0000000e+00, 2.8800000e+03, 0.0000000e+00, 2.8800000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 7.2000000e+02, 1.0000000e+00, 7.2000000e+02, 1.0000000e+00, 3.6000000e+03, 0.0000000e+00, 3.6000000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 1.4400000e+03, 0.0000000e+00, 1.4400000e+03, 0.0000000e+00, 4.3200000e+03, 0.0000000e+00, 4.3200000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 2.1600000e+03, 0.0000000e+00, 2.1600000e+03, 0.0000000e+00, 5.0400000e+03, 0.0000000e+00, 5.0400000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 2.8800000e+03, 0.0000000e+00, 2.8800000e+03, 0.0000000e+00, 5.7600000e+03, 0.0000000e+00, 5.7600000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 3.6000000e+03, 0.0000000e+00, 3.6000000e+03, 0.0000000e+00, 6.4800000e+03, 0.0000000e+00, 6.4800000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 4.3200000e+03, 0.0000000e+00, 4.3200000e+03, 0.0000000e+00, 7.2000000e+03, 0.0000000e+00, 7.2000000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 5.0400000e+03, 0.0000000e+00, 5.0400000e+03, 0.0000000e+00, 7.9200000e+03, 0.0000000e+00, 7.9200000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 5.7600000e+03, 0.0000000e+00, 5.7600000e+03, 0.0000000e+00, 8.6400000e+03, 0.0000000e+00, 8.6400000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 6.4800000e+03, 0.0000000e+00, 6.4800000e+03, 0.0000000e+00, 9.3600000e+03, 0.0000000e+00, 9.3600000e+03, 0.0000000e+00 ],
+    [ 1.0000000e-01, 7.2000000e+03, 0.0000000e+00, 7.2000000e+03, 0.0000000e+00, 1.0080000e+04, 0.0000000e+00, 1.0080000e+04, 0.0000000e+00 ],
+    [ 1.0000000e-01, 7.9200000e+03, 0.0000000e+00, 7.9200000e+03, 0.0000000e+00, 1.0800000e+04, 0.0000000e+00, 1.0800000e+04, 0.0000000e+00 ],
+    [ 1.0000000e-01, 8.6400000e+03, 0.0000000e+00, 8.6400000e+03, 0.0000000e+00, 1.1520000e+04, 0.0000000e+00, 1.1520000e+04, 0.0000000e+00 ],
+    [ 1.0000000e-01, 7.2000000e+02, 1.0000000e+00, 9.3600000e+03, 0.0000000e+00, 7.2000000e+02, 1.0000000e+00, 7.2000000e+02, 1.0000000e+00 ],
+    [ 1.0000000e-01, 1.4400000e+03, 0.0000000e+00, 1.0080000e+04, 0.0000000e+00, 1.4400000e+03, 0.0000000e+00, 1.4400000e+03, 0.0000000e+00 ]
   ]
 }
Index: rrdtool/tests/tune1-testa-mod1.dump
===================================================================
--- rrdtool.orig/tests/tune1-testa-mod1.dump
+++ rrdtool/tests/tune1-testa-mod1.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>90</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -23,7 +23,7 @@
 		<name> b </name>
 		<type> COUNTER </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>-1.000000000e+02</min>
+		<min>-1.0000000e+02</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
@@ -38,33 +38,33 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
 			<primary_value>NaN</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v><v>NaN</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -72,33 +72,33 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
 			<primary_value>NaN</primary_value>
 			<secondary_value>NaN</secondary_value>
-			<value>0.000000000e+00</value>
+			<value>0.0000000e+00</value>
 			<unknown_datapoints>2</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.000000000e+01</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.000000000e+01</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.0000000e+01</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.0000000e+01</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v><v>NaN</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/tune1-testa-mod2.dump
===================================================================
--- rrdtool.orig/tests/tune1-testa-mod2.dump
+++ rrdtool/tests/tune1-testa-mod2.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> COUNTER </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>UNKN</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -23,7 +23,7 @@
 		<name> c </name>
 		<type> COUNTER </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
@@ -38,33 +38,33 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
 			<primary_value>NaN</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v><v>NaN</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -72,33 +72,33 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
 			<primary_value>NaN</primary_value>
 			<secondary_value>NaN</secondary_value>
-			<value>0.000000000e+00</value>
+			<value>0.0000000e+00</value>
 			<unknown_datapoints>2</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.000000000e+01</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.000000000e+01</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.0000000e+01</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.0000000e+01</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v><v>NaN</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/tune1-testorg.dump
===================================================================
--- rrdtool.orig/tests/tune1-testorg.dump
+++ rrdtool/tests/tune1-testorg.dump
@@ -10,12 +10,12 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
 		<last_ds>510</last_ds>
-		<value>0.000000000e+00</value>
+		<value>0.0000000e+00</value>
 		<unknown_sec> 0 </unknown_sec>
 	</ds>
 
@@ -23,7 +23,7 @@
 		<name> b </name>
 		<type> COUNTER </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
@@ -38,33 +38,33 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<xff>5.0000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>5.100000000e+02</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>5.1000000e+02</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
 			<primary_value>NaN</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<value>NaN</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.300000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.400000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.500000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.600000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.800000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.900000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.000000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.100000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:48:00 CET / 1300002480 --> <row><v>4.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:49:00 CET / 1300002540 --> <row><v>4.3000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.4000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:51:00 CET / 1300002660 --> <row><v>4.5000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:52:00 CET / 1300002720 --> <row><v>4.6000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:53:00 CET / 1300002780 --> <row><v>4.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:54:00 CET / 1300002840 --> <row><v>4.8000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.9000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:56:00 CET / 1300002960 --> <row><v>5.0000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:57:00 CET / 1300003020 --> <row><v>5.1000000e+02</v><v>NaN</v></row>
 		</database>
 	</rra>
 	<rra>
@@ -72,33 +72,33 @@
 		<pdp_per_row>5</pdp_per_row> <!-- 300 seconds -->
 
 		<params>
-		<xff>5.0000000000e-01</xff>
+		<xff>5.0000000e-01</xff>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>4.700000000e+02</primary_value>
-			<secondary_value>4.900000000e+02</secondary_value>
-			<value>1.010000000e+03</value>
+			<primary_value>4.7000000e+02</primary_value>
+			<secondary_value>4.9000000e+02</secondary_value>
+			<value>1.0100000e+03</value>
 			<unknown_datapoints>0</unknown_datapoints>
 			</ds>
 			<ds>
 			<primary_value>NaN</primary_value>
 			<secondary_value>NaN</secondary_value>
-			<value>0.000000000e+00</value>
+			<value>0.0000000e+00</value>
 			<unknown_datapoints>2</unknown_datapoints>
 			</ds>
 		</cdp_prep>
 		<database>
-			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.000000000e+01</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.000000000e+01</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.700000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.200000000e+02</v><v>NaN</v></row>
-			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.700000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:10:00 CET / 1300000200 --> <row><v>3.0000000e+01</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:15:00 CET / 1300000500 --> <row><v>7.0000000e+01</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:20:00 CET / 1300000800 --> <row><v>1.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:25:00 CET / 1300001100 --> <row><v>1.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:30:00 CET / 1300001400 --> <row><v>2.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:35:00 CET / 1300001700 --> <row><v>2.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:40:00 CET / 1300002000 --> <row><v>3.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:45:00 CET / 1300002300 --> <row><v>3.7000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:50:00 CET / 1300002600 --> <row><v>4.2000000e+02</v><v>NaN</v></row>
+			<!-- 2011-03-13 08:55:00 CET / 1300002900 --> <row><v>4.7000000e+02</v><v>NaN</v></row>
 		</database>
 	</rra>
 </rrd>
Index: rrdtool/tests/tune2-testa-mod1.dump
===================================================================
--- rrdtool.orig/tests/tune2-testa-mod1.dump
+++ rrdtool/tests/tune2-testa-mod1.dump
@@ -10,7 +10,7 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
@@ -23,7 +23,7 @@
 		<name> b </name>
 		<type> COUNTER </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
@@ -38,14 +38,14 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<hw_alpha>9.000000000e-01</hw_alpha>
-		<hw_beta>4.000000000e-01</hw_beta>
+		<hw_alpha>9.0000000e-01</hw_alpha>
+		<hw_beta>4.0000000e-01</hw_beta>
 		<dependent_rra_idx>1</dependent_rra_idx>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<intercept>NaN</intercept>
 			<last_intercept>NaN</last_intercept>
 			<slope>NaN</slope>
@@ -54,8 +54,8 @@
 			<last_nan_count>1</last_nan_count>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<intercept>NaN</intercept>
 			<last_intercept>NaN</last_intercept>
 			<slope>NaN</slope>
@@ -360,21 +360,21 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<seasonal_gamma>9.000000000e-01</seasonal_gamma>
+		<seasonal_gamma>9.0000000e-01</seasonal_gamma>
 		<seasonal_smooth_idx>135</seasonal_smooth_idx>
 		<dependent_rra_idx>0</dependent_rra_idx>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<seasonal>NaN</seasonal>
 			<last_seasonal>NaN</last_seasonal>
 			<init_flag>1</init_flag>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<seasonal>NaN</seasonal>
 			<last_seasonal>NaN</last_seasonal>
 			<init_flag>1</init_flag>
@@ -532,21 +532,21 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<seasonal_gamma>9.000000000e-01</seasonal_gamma>
+		<seasonal_gamma>9.0000000e-01</seasonal_gamma>
 		<seasonal_smooth_idx>135</seasonal_smooth_idx>
 		<dependent_rra_idx>0</dependent_rra_idx>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<seasonal>NaN</seasonal>
 			<last_seasonal>NaN</last_seasonal>
 			<init_flag>1</init_flag>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<seasonal>NaN</seasonal>
 			<last_seasonal>NaN</last_seasonal>
 			<init_flag>1</init_flag>
@@ -708,12 +708,12 @@
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			</ds>
 		</cdp_prep>
 		<database>
@@ -1012,21 +1012,21 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<delta_pos>2.000000000e+00</delta_pos>
-		<delta_neg>2.000000000e+00</delta_neg>
+		<delta_pos>2.0000000e+00</delta_pos>
+		<delta_neg>2.0000000e+00</delta_neg>
 		<window_len>9</window_len>
 		<failure_threshold>7</failure_threshold>
 		<dependent_rra_idx>2</dependent_rra_idx>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<history>000000000</history>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<history>000000000</history>
 			</ds>
 		</cdp_prep>
Index: rrdtool/tests/tune2-testorg.dump
===================================================================
--- rrdtool.orig/tests/tune2-testorg.dump
+++ rrdtool/tests/tune2-testorg.dump
@@ -10,7 +10,7 @@
 		<name> a </name>
 		<type> GAUGE </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
@@ -23,7 +23,7 @@
 		<name> b </name>
 		<type> COUNTER </type>
 		<minimal_heartbeat>120</minimal_heartbeat>
-		<min>0.000000000e+00</min>
+		<min>0.0000000e+00</min>
 		<max>NaN</max>
 
 		<!-- PDP Status -->
@@ -38,14 +38,14 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<hw_alpha>9.000000000e-01</hw_alpha>
-		<hw_beta>8.000000000e-01</hw_beta>
+		<hw_alpha>9.0000000e-01</hw_alpha>
+		<hw_beta>8.0000000e-01</hw_beta>
 		<dependent_rra_idx>1</dependent_rra_idx>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<intercept>NaN</intercept>
 			<last_intercept>NaN</last_intercept>
 			<slope>NaN</slope>
@@ -54,8 +54,8 @@
 			<last_nan_count>1</last_nan_count>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<intercept>NaN</intercept>
 			<last_intercept>NaN</last_intercept>
 			<slope>NaN</slope>
@@ -360,21 +360,21 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<seasonal_gamma>9.000000000e-01</seasonal_gamma>
+		<seasonal_gamma>9.0000000e-01</seasonal_gamma>
 		<seasonal_smooth_idx>113</seasonal_smooth_idx>
 		<dependent_rra_idx>0</dependent_rra_idx>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<seasonal>NaN</seasonal>
 			<last_seasonal>NaN</last_seasonal>
 			<init_flag>1</init_flag>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<seasonal>NaN</seasonal>
 			<last_seasonal>NaN</last_seasonal>
 			<init_flag>1</init_flag>
@@ -532,21 +532,21 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<seasonal_gamma>9.000000000e-01</seasonal_gamma>
+		<seasonal_gamma>9.0000000e-01</seasonal_gamma>
 		<seasonal_smooth_idx>113</seasonal_smooth_idx>
 		<dependent_rra_idx>0</dependent_rra_idx>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<seasonal>NaN</seasonal>
 			<last_seasonal>NaN</last_seasonal>
 			<init_flag>1</init_flag>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<seasonal>NaN</seasonal>
 			<last_seasonal>NaN</last_seasonal>
 			<init_flag>1</init_flag>
@@ -708,12 +708,12 @@
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			</ds>
 		</cdp_prep>
 		<database>
@@ -1012,21 +1012,21 @@
 		<pdp_per_row>1</pdp_per_row> <!-- 60 seconds -->
 
 		<params>
-		<delta_pos>2.000000000e+00</delta_pos>
-		<delta_neg>2.000000000e+00</delta_neg>
+		<delta_pos>2.0000000e+00</delta_pos>
+		<delta_neg>2.0000000e+00</delta_neg>
 		<window_len>9</window_len>
 		<failure_threshold>7</failure_threshold>
 		<dependent_rra_idx>2</dependent_rra_idx>
 		</params>
 		<cdp_prep>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<history>000000000</history>
 			</ds>
 			<ds>
-			<primary_value>0.000000000e+00</primary_value>
-			<secondary_value>0.000000000e+00</secondary_value>
+			<primary_value>0.0000000e+00</primary_value>
+			<secondary_value>0.0000000e+00</secondary_value>
 			<history>000000000</history>
 			</ds>
 		</cdp_prep>
Index: rrdtool/tests/xport1.json.output
===================================================================
--- rrdtool.orig/tests/xport1.json.output
+++ rrdtool/tests/xport1.json.output
@@ -9,30 +9,30 @@
           ]
      },
   "data": [
-    [ -1.170925000e-03, 3.678486942e-02 ],
-    [ -9.698291667e-04, 3.635424604e-02 ],
-    [ -9.119541667e-04, 3.596822650e-02 ],
-    [ -8.563833333e-04, 3.559656183e-02 ],
-    [ -8.841666667e-04, 3.523403971e-02 ],
-    [ -8.271666667e-04, 3.487834121e-02 ],
-    [ -8.556666667e-04, 3.452460017e-02 ],
-    [ -8.556666667e-04, 3.417131125e-02 ],
-    [ -7.986625000e-04, 3.382345987e-02 ],
-    [ -7.700041667e-04, 3.349336804e-02 ],
-    [ -6.560000000e-04, 3.319680079e-02 ],
-    [ -5.705000000e-04, 3.294191550e-02 ],
-    [ -4.570458333e-04, 3.272901004e-02 ],
-    [ -3.993333333e-04, 3.255259075e-02 ],
-    [ -3.423333333e-04, 3.239795992e-02 ],
-    [ -3.136666667e-04, 3.225936887e-02 ],
-    [ -3.138333333e-04, 3.212701475e-02 ],
-    [ -3.421666667e-04, 3.199287379e-02 ],
-    [ -3.423333333e-04, 3.185289975e-02 ],
-    [ -3.993333333e-04, 3.169681013e-02 ],
-    [ -4.563333333e-04, 3.152022212e-02 ],
-    [ -5.412833333e-04, 3.131382025e-02 ],
-    [ -6.560000000e-04, 3.106526071e-02 ],
-    [ -9.404583333e-04, 3.073564350e-02 ],
-    [ -1.679979167e-03, 3.023341000e-02 ]
+    [ -1.1709250e-03, 3.6784869e-02 ],
+    [ -9.6982917e-04, 3.6354246e-02 ],
+    [ -9.1195417e-04, 3.5968226e-02 ],
+    [ -8.5638333e-04, 3.5596562e-02 ],
+    [ -8.8416667e-04, 3.5234040e-02 ],
+    [ -8.2716667e-04, 3.4878341e-02 ],
+    [ -8.5566667e-04, 3.4524600e-02 ],
+    [ -8.5566667e-04, 3.4171311e-02 ],
+    [ -7.9866250e-04, 3.3823460e-02 ],
+    [ -7.7000417e-04, 3.3493368e-02 ],
+    [ -6.5600000e-04, 3.3196801e-02 ],
+    [ -5.7050000e-04, 3.2941916e-02 ],
+    [ -4.5704583e-04, 3.2729010e-02 ],
+    [ -3.9933333e-04, 3.2552591e-02 ],
+    [ -3.4233333e-04, 3.2397960e-02 ],
+    [ -3.1366667e-04, 3.2259369e-02 ],
+    [ -3.1383333e-04, 3.2127015e-02 ],
+    [ -3.4216667e-04, 3.1992874e-02 ],
+    [ -3.4233333e-04, 3.1852900e-02 ],
+    [ -3.9933333e-04, 3.1696810e-02 ],
+    [ -4.5633333e-04, 3.1520222e-02 ],
+    [ -5.4128333e-04, 3.1313820e-02 ],
+    [ -6.5600000e-04, 3.1065261e-02 ],
+    [ -9.4045833e-04, 3.0735643e-02 ],
+    [ -1.6799792e-03, 3.0233410e-02 ]
   ]
 }
Index: rrdtool/tests/xport1.xml.output
===================================================================
--- rrdtool.orig/tests/xport1.xml.output
+++ rrdtool/tests/xport1.xml.output
@@ -13,30 +13,30 @@
     </legend>
   </meta>
   <data>
-    <row><v0>-1.170925000e-03</v0><v1>3.678486942e-02</v1></row>
-    <row><v0>-9.698291667e-04</v0><v1>3.635424604e-02</v1></row>
-    <row><v0>-9.119541667e-04</v0><v1>3.596822650e-02</v1></row>
-    <row><v0>-8.563833333e-04</v0><v1>3.559656183e-02</v1></row>
-    <row><v0>-8.841666667e-04</v0><v1>3.523403971e-02</v1></row>
-    <row><v0>-8.271666667e-04</v0><v1>3.487834121e-02</v1></row>
-    <row><v0>-8.556666667e-04</v0><v1>3.452460017e-02</v1></row>
-    <row><v0>-8.556666667e-04</v0><v1>3.417131125e-02</v1></row>
-    <row><v0>-7.986625000e-04</v0><v1>3.382345987e-02</v1></row>
-    <row><v0>-7.700041667e-04</v0><v1>3.349336804e-02</v1></row>
-    <row><v0>-6.560000000e-04</v0><v1>3.319680079e-02</v1></row>
-    <row><v0>-5.705000000e-04</v0><v1>3.294191550e-02</v1></row>
-    <row><v0>-4.570458333e-04</v0><v1>3.272901004e-02</v1></row>
-    <row><v0>-3.993333333e-04</v0><v1>3.255259075e-02</v1></row>
-    <row><v0>-3.423333333e-04</v0><v1>3.239795992e-02</v1></row>
-    <row><v0>-3.136666667e-04</v0><v1>3.225936887e-02</v1></row>
-    <row><v0>-3.138333333e-04</v0><v1>3.212701475e-02</v1></row>
-    <row><v0>-3.421666667e-04</v0><v1>3.199287379e-02</v1></row>
-    <row><v0>-3.423333333e-04</v0><v1>3.185289975e-02</v1></row>
-    <row><v0>-3.993333333e-04</v0><v1>3.169681013e-02</v1></row>
-    <row><v0>-4.563333333e-04</v0><v1>3.152022212e-02</v1></row>
-    <row><v0>-5.412833333e-04</v0><v1>3.131382025e-02</v1></row>
-    <row><v0>-6.560000000e-04</v0><v1>3.106526071e-02</v1></row>
-    <row><v0>-9.404583333e-04</v0><v1>3.073564350e-02</v1></row>
-    <row><v0>-1.679979167e-03</v0><v1>3.023341000e-02</v1></row>
+    <row><v0>-1.1709250e-03</v0><v1>3.6784869e-02</v1></row>
+    <row><v0>-9.6982917e-04</v0><v1>3.6354246e-02</v1></row>
+    <row><v0>-9.1195417e-04</v0><v1>3.5968226e-02</v1></row>
+    <row><v0>-8.5638333e-04</v0><v1>3.5596562e-02</v1></row>
+    <row><v0>-8.8416667e-04</v0><v1>3.5234040e-02</v1></row>
+    <row><v0>-8.2716667e-04</v0><v1>3.4878341e-02</v1></row>
+    <row><v0>-8.5566667e-04</v0><v1>3.4524600e-02</v1></row>
+    <row><v0>-8.5566667e-04</v0><v1>3.4171311e-02</v1></row>
+    <row><v0>-7.9866250e-04</v0><v1>3.3823460e-02</v1></row>
+    <row><v0>-7.7000417e-04</v0><v1>3.3493368e-02</v1></row>
+    <row><v0>-6.5600000e-04</v0><v1>3.3196801e-02</v1></row>
+    <row><v0>-5.7050000e-04</v0><v1>3.2941916e-02</v1></row>
+    <row><v0>-4.5704583e-04</v0><v1>3.2729010e-02</v1></row>
+    <row><v0>-3.9933333e-04</v0><v1>3.2552591e-02</v1></row>
+    <row><v0>-3.4233333e-04</v0><v1>3.2397960e-02</v1></row>
+    <row><v0>-3.1366667e-04</v0><v1>3.2259369e-02</v1></row>
+    <row><v0>-3.1383333e-04</v0><v1>3.2127015e-02</v1></row>
+    <row><v0>-3.4216667e-04</v0><v1>3.1992874e-02</v1></row>
+    <row><v0>-3.4233333e-04</v0><v1>3.1852900e-02</v1></row>
+    <row><v0>-3.9933333e-04</v0><v1>3.1696810e-02</v1></row>
+    <row><v0>-4.5633333e-04</v0><v1>3.1520222e-02</v1></row>
+    <row><v0>-5.4128333e-04</v0><v1>3.1313820e-02</v1></row>
+    <row><v0>-6.5600000e-04</v0><v1>3.1065261e-02</v1></row>
+    <row><v0>-9.4045833e-04</v0><v1>3.0735643e-02</v1></row>
+    <row><v0>-1.6799792e-03</v0><v1>3.0233410e-02</v1></row>
   </data>
 </xport>
