<?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>8-bit MicrocontrollersのトピックRe: Problems with GT60 long int multiplication and division</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Problems-with-GT60-long-int-multiplication-and-division/m-p/134195#M3660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Can you provide a sample of what you tried?&lt;BR /&gt;One special thing to watch out in C is that the operation size is only defined by the arguments, not by the way the result is used.&lt;BR /&gt;So in this sample:&lt;BR /&gt;&lt;FONT face="Courier New"&gt;int a,b;&lt;BR /&gt;long c0= a*b;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;long c1= (long)a*(long)b;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;c0 will be the result of a int multiplication while c1 is the result of a long multiplication. Apart from that I don't see why using longs should not work.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 May 2007 06:06:15 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-05-19T06:06:15Z</dc:date>
    <item>
      <title>Problems with GT60 long int multiplication and division</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Problems-with-GT60-long-int-multiplication-and-division/m-p/134194#M3659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have a problem when í'm doing multiplications and divisions with a long int format. When I do these operacions using int format, they work, but when I use a long int format, they didn´t work. I would like to know if someone can help me; I need to use this format because I need some precision and I don´t want to use a float format.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 May 2007 03:45:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Problems-with-GT60-long-int-multiplication-and-division/m-p/134194#M3659</guid>
      <dc:creator>guilherme</dc:creator>
      <dc:date>2007-05-19T03:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with GT60 long int multiplication and division</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Problems-with-GT60-long-int-multiplication-and-division/m-p/134195#M3660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Can you provide a sample of what you tried?&lt;BR /&gt;One special thing to watch out in C is that the operation size is only defined by the arguments, not by the way the result is used.&lt;BR /&gt;So in this sample:&lt;BR /&gt;&lt;FONT face="Courier New"&gt;int a,b;&lt;BR /&gt;long c0= a*b;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;long c1= (long)a*(long)b;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;c0 will be the result of a int multiplication while c1 is the result of a long multiplication. Apart from that I don't see why using longs should not work.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 May 2007 06:06:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Problems-with-GT60-long-int-multiplication-and-division/m-p/134195#M3660</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-05-19T06:06:15Z</dc:date>
    </item>
  </channel>
</rss>

