<?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>convert from long to float</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/37856/convert-from-long-to-float</link><description> 
Hi guys, 

 
I need to convert a 32 bit value(long) to a 32 bit float.
Unfortunately there is no itof function in C and wikipedia does not
give a simple solution. 

 
Casting simply does not do the conversion correctly, is there a
simple way of doing</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: convert from long to float</title><link>https://community.arm.com/thread/51824?ContentTypeID=1</link><pubDate>Thu, 05 Jun 2008 01:10:41 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f552c4ab-425f-405a-8032-3482ee77bb67</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
C will automatically convert from an integer to a float.&lt;/p&gt;

&lt;p&gt;
What do you say &amp;quot;does not do the conversion correctly&amp;quot;?&lt;/p&gt;

&lt;p&gt;
Note that a 32-bit float has a larger supported range, but instead
has a smaller resolution, i.e. all values in a 32-bit integer will
not be possible to represent in a 32-bit float - some integer values
will be rounded to another integer value.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>