<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: sum function 9-10 decimal places?</title><link>https://www.infopathdev.com:443/forums/thread/81232.aspx</link><pubDate>Wed, 01 Aug 2012 19:12:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:81232</guid><dc:creator>ebonymb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/81232.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=81232</wfw:commentRss><description>&lt;p&gt;i had this exact same problem.&amp;nbsp; I used your suggestion and it resolved my issue temporarily only to occur again today.&amp;nbsp; My thought is I might be able to use the round(sum()*100) div 100 formula in a hidden field and display the result as text in a visible field.&amp;nbsp; Can that be done?&lt;/p&gt;</description></item><item><title>Re: sum function 9-10 decimal places?</title><link>https://www.infopathdev.com:443/forums/thread/40255.aspx</link><pubDate>Thu, 02 Apr 2009 16:23:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40255</guid><dc:creator>charris1980</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40255.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=40255</wfw:commentRss><description>&lt;p&gt;cool, i&amp;#39;ll give this a try and keep an eye on it for a few days.&amp;nbsp; thanks for the quick reply and explanation on the calculations!&lt;/p&gt;</description></item><item><title>Re: sum function 9-10 decimal places?</title><link>https://www.infopathdev.com:443/forums/thread/40253.aspx</link><pubDate>Thu, 02 Apr 2009 15:31:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40253</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40253.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=40253</wfw:commentRss><description>&lt;p&gt;Floating point arithmetic in XPath is computed according to the &lt;a class="" href="http://en.wikipedia.org/wiki/IEEE_floating-point_standard"&gt;IEEE 754&lt;/a&gt; standard, which allocates a fixed number of bits for the computation.&amp;nbsp; I don&amp;#39;t know a whole lot about floating point arithmetic, but I do know that it is not perfectly precise, and as you have experienced, tiny fractional parts can be lost or gained along the way.&lt;/p&gt;
&lt;p&gt;I think the following formula might do the trick to get the result to have just one or two decimal places all the time:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;round(sum(&lt;em&gt;contents of sum&lt;/em&gt;) * 100) div 100&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Please give it a try.&lt;/p&gt;</description></item><item><title>sum function 9-10 decimal places?</title><link>https://www.infopathdev.com:443/forums/thread/40250.aspx</link><pubDate>Thu, 02 Apr 2009 14:45:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40250</guid><dc:creator>charris1980</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40250.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=40250</wfw:commentRss><description>&lt;p&gt;i have a form that sum(amts) on a text box.&amp;nbsp; i tell it to force 2 decimal places and it does for maybe 90% of the forms submitted, but the other 10% it does 9-10 decimal places.&lt;/p&gt;
&lt;p&gt;for example it might add:&lt;/p&gt;
&lt;p&gt;$152.42 + $32.01.&amp;nbsp; that equals 184.43.&amp;nbsp; and when filling out the form, that text box shows that.&amp;nbsp; but when i submit the form it changes it to &amp;quot;184.42999999999998&amp;quot;&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t understand why though.&lt;/p&gt;</description></item></channel></rss>