ver 1.9.4 use more decimal digits



After upgraded to 1.9.4. Diff the gnumeric file with the previous
1.8.3

-        <gnm:Cell Row="77" Col="5" ValueType="40" ValueFormat="0.00_ ">5925.57</gnm:Cell>
+        <gnm:Cell Row="77" Col="5" ValueType="40" ValueFormat="0.00_ ">5925.5699999999997</gnm:Cell>
@@ -4456,7 +4457,7 @@
-        <gnm:Cell Row="82" Col="5" ValueType="40" ValueFormat="0.00_ ">1408.4</gnm:Cell>
+        <gnm:Cell Row="82" Col="5" ValueType="40" ValueFormat="0.00_ ">1408.4000000000001</gnm:Cell>
@@ -4514,7 +4515,7 @@
-        <gnm:Cell Row="95" Col="5" ValueType="40" ValueFormat="0.00_ ">1208.63</gnm:Cell>
+        <gnm:Cell Row="95" Col="5" ValueType="40" ValueFormat="0.00_ ">1208.6300000000001</gnm:Cell>

I did not compile with long double support.  It looked like a regression
because the actual ieee bit pattern for 5925.57 and 5925.5699999999997 are
exact the same yet the ver 1.8.3 use minimum number of decimal digit to
represent the same ieee double.  There is an algorithm to find the decimal
number with minimum number of digit for the same bit pattern in ieee
representation.  Or the previous version in fact did not strive for minimum
digits representation but just looked like that way?

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩282 白居易  後宮詞
    淚濕羅巾夢不成  夜深前殿按歌聲  紅顏未老恩先斷  斜倚薰籠坐到明



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]