<?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: float operations problems MC9S08LC60 in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467229#M6986</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie Zhang, thank you very much for the answer! &lt;/P&gt;&lt;P&gt;I've duplicated the Stack size and now everything works fine!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jun 2016 22:31:50 GMT</pubDate>
    <dc:creator>augustolopez</dc:creator>
    <dc:date>2016-06-01T22:31:50Z</dc:date>
    <item>
      <title>float operations problems MC9S08LC60</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467227#M6984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody, i'm quite new with freescale/nxp mcu's and i'm having a problem using flaoting point arithmetic. The problem is that some float operations are writing trash over some other variables that i don't want to modify. The operations are done well and fast with good results but they write trash in some memory adresses that are occuped by other variables. This happens, for example with theese operations:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;f1=floor(bufferTX); f2=fabs(bufferTX - f1); i1=(int)f1; i2=(int)10*f2; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P&gt;or with:&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;t/=10; t=0.000006*pow(t,3)-0.00081*pow(t,2)+0.3*t-20;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P&gt;f1,f2, bufferTX and t are floats, i1 and i2 ints.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could be happening? I've added ansis.lib to the project and i'm using CodeWarrior 6.1with DEMO9S08LC60 kit.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion will be very helpful.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 07:04:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467227#M6984</guid>
      <dc:creator>augustolopez</dc:creator>
      <dc:date>2016-06-01T07:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: float operations problems MC9S08LC60</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467228#M6985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Normally this issue may because of the stack overflow. please increase the stack size in prm file then test it again.&lt;/P&gt;&lt;P&gt;If the problem persists, please upload your demo project here, I can check it directly from my side. thanks!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 08:46:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467228#M6985</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-06-01T08:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: float operations problems MC9S08LC60</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467229#M6986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie Zhang, thank you very much for the answer! &lt;/P&gt;&lt;P&gt;I've duplicated the Stack size and now everything works fine!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 22:31:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467229#M6986</guid>
      <dc:creator>augustolopez</dc:creator>
      <dc:date>2016-06-01T22:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: float operations problems MC9S08LC60</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467230#M6987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Jennie Zhang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 03:26:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/float-operations-problems-MC9S08LC60/m-p/467230#M6987</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-06-02T03:26:16Z</dc:date>
    </item>
  </channel>
</rss>

