<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/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>floating point datatype</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/36757/floating-point-datatype</link><description> Hello 
 
Can any body tell me how to use floating point datatype for programming in C in kiel. 
 
i have defined in the following way 
 
float i= 19.5; 
or 
float j= 18.2/255; 
 
but these are given as errors. 
please tell me how to use floating point</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: floating point datatype</title><link>https://community.arm.com/thread/111450?ContentTypeID=1</link><pubDate>Fri, 27 May 2005 06:23:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7ed70f7d-3f73-43e6-9089-0e76a16229a3</guid><dc:creator>John Donaldson</dc:creator><description>&lt;p&gt;The right hand side of this line only contains constants:&lt;br /&gt;
&lt;br /&gt;
unsigned char k = 255*(1- (float)18/0xb6)&lt;br /&gt;
&lt;br /&gt;
so the compiler evaluates it for you.&lt;br /&gt;
&lt;br /&gt;
This line has a variable on the right hand side:&lt;br /&gt;
&lt;br /&gt;
unsigned char k= 255*(1-(float)18/j)&lt;br /&gt;
&lt;br /&gt;
so it has to be evaluated at runtime, which you can&amp;#39;t do with the evaluation version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: floating point datatype</title><link>https://community.arm.com/thread/97186?ContentTypeID=1</link><pubDate>Fri, 27 May 2005 06:15:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:32865999-73c5-4b87-a7f1-96bdac1ae291</guid><dc:creator>pradeep gouda</dc:creator><description>&lt;p&gt;yeah i am using evaluation software.&lt;br /&gt;
but i am confused to see this&lt;br /&gt;
&lt;br /&gt;
here&lt;br /&gt;
&lt;b&gt;unsigned char j=0xb6;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
and if i write&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;unsigned char k =  255*(1- (float)18/0xb6)&lt;/b&gt;&lt;br /&gt;
 i am not getting any error and the result is same as what i wanted.&lt;br /&gt;
but if i use it in the following way , i am getting error.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; unsigned char k= 255*(1-(float)18/j)&lt;/b&gt;&lt;br /&gt;
where j=0xb6.&lt;br /&gt;
Is there no other way to perform division operations in evaluation version&lt;br /&gt;
&lt;br /&gt;
-Pradeep&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: floating point datatype</title><link>https://community.arm.com/thread/87228?ContentTypeID=1</link><pubDate>Thu, 26 May 2005 08:14:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:44184001-5e6b-4b70-9311-da238edde7dc</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;Remeber: the free evaluation download does not include floating point&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/demo/limits.asp"&gt;http://www.keil.com/demo/limits.htm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: floating point datatype</title><link>https://community.arm.com/thread/44072?ContentTypeID=1</link><pubDate>Thu, 26 May 2005 06:49:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:61c99e51-7996-40cc-9ba3-c2e03e2f20ab</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;&lt;i&gt;but these are given as errors.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Exactly what error do you get?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>