<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/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>The Unpredictability of float data type : Explained</title><link>/members-area/personalblogs/b/blog/posts/the-unpredictability-of-float-data-type-explained</link><description>Ever wondered why one of the C data types is called float ?Because in some cases it literally floats nearby expected values! For example :-when you do multiple operations between two relatively small and large values of float. Proofint main(){fl...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: The Unpredictability of float data type : Explained</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/the-unpredictability-of-float-data-type-explained</link><pubDate>Tue, 31 May 2016 20:25:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:367b810d-ab90-4cfe-8d2b-d51c3e95a394</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I always say a fool and their data are soon parted.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You need to really analyze your application to make sure that float and conversion issues are not add issues into your algorithm.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This was one of the first things they teach you in computer science classes.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Don&amp;#39;t just guess, test and verify.&amp;nbsp; Some compilers do aweful things when you aren&amp;#39;t looking.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=21700&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: The Unpredictability of float data type : Explained</title><link>https://community.element14.com/members-area/personalblogs/b/blog/posts/the-unpredictability-of-float-data-type-explained</link><pubDate>Tue, 31 May 2016 14:24:37 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:367b810d-ab90-4cfe-8d2b-d51c3e95a394</guid><dc:creator>clem57</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Take 1 float and divide by 3 and get .3333... a repeating number. Next multiply by 100 for 33.33333... Next multiply by 3 and see what happens.&lt;/p&gt;&lt;p&gt;Problem is computers cannot handle numbers with accuracy needed for repeating numbers. Common with ALL computers.&lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-367b810d-ab90-4cfe-8d2b-d51c3e95a394/contentimage_5F00_2.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=21700&amp;AppID=293&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>