<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Floating point division in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Floating-point-division/m-p/223439#M19252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;float f:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f = 20/8;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;20 and 8 both are integers, division produces integer result, and then you request to convert integer 2 to float. To get 2.5 at least one of dividers has to be FP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 May 2013 20:02:47 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2013-05-02T20:02:47Z</dc:date>
    <item>
      <title>Floating point division</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Floating-point-division/m-p/223438#M19251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a GT16A microcontroller and am having issues when dividing 2 numbers that would form a floating point number. There is no problem with addition, subtraction and multiplication. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, 20/8 gives me a value of 2.0 and not the expected 2.5&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried increasing the stack size and I still haven't managed to figure out what is causing the problem. Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 19:38:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Floating-point-division/m-p/223438#M19251</guid>
      <dc:creator>woohoo</dc:creator>
      <dc:date>2013-05-02T19:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Floating point division</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Floating-point-division/m-p/223439#M19252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;float f:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f = 20/8;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;20 and 8 both are integers, division produces integer result, and then you request to convert integer 2 to float. To get 2.5 at least one of dividers has to be FP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:02:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Floating-point-division/m-p/223439#M19252</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2013-05-02T20:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Floating point division</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Floating-point-division/m-p/223440#M19253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. you need have floating lib support. when creates new project, choose floating library support for your project.&lt;/P&gt;&lt;P&gt;2. do like this:&lt;/P&gt;&lt;P&gt;float f;&lt;/P&gt;&lt;P&gt;f= (float)20/(float)8;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 08:40:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Floating-point-division/m-p/223440#M19253</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2013-05-03T08:40:51Z</dc:date>
    </item>
  </channel>
</rss>

