<?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: Double data types in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717932#M54014</link>
    <description>Hi Alice,&lt;BR /&gt;Thanks. It works.&lt;BR /&gt;How about if the user enters unknown number of decimal places?&lt;BR /&gt;How should write in this code line?&lt;BR /&gt;SCANF("%f ",&amp;amp;number1);&lt;BR /&gt;Why is the double data type not using %lf?</description>
    <pubDate>Wed, 06 Sep 2023 09:17:00 GMT</pubDate>
    <dc:creator>Bay</dc:creator>
    <dc:date>2023-09-06T09:17:00Z</dc:date>
    <item>
      <title>Double data types</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717798#M54009</link>
      <description>&lt;P&gt;How to display the float number with 9 decimal places. example: 0.123456789&lt;/P&gt;&lt;P&gt;I have tried with below code, but the terminal displays The number is lf.&lt;/P&gt;&lt;P&gt;double number1=0.123456789;&lt;/P&gt;&lt;P&gt;PRINTF("The number is %lf", number1);&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 07:23:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717798#M54009</guid>
      <dc:creator>Bay</dc:creator>
      <dc:date>2023-09-06T07:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Double data types</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717914#M54012</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/216535"&gt;@Bay&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about&amp;nbsp;&lt;SPAN&gt;PRINTF("The number is %.9f", number1);.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-Printf-Floating-numbers-doesnt-have-minus-sign/m-p/1241343/highlight/false?lightbox-message-images-1242104=139054iDE12AB63C23CB9A3#M44168" target="_blank"&gt;https://community.nxp.com/t5/LPC-Microcontrollers/LPC54628-Printf-Floating-numbers-doesnt-have-minus-sign/m-p/1241343/highlight/false?lightbox-message-images-1242104=139054iDE12AB63C23CB9A3#M44168&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 08:59:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717914#M54012</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2023-09-06T08:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Double data types</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717931#M54013</link>
      <description>&lt;P&gt;As Alice_Yang suggested, just specifiy the precision in the format string.&lt;BR /&gt;If you don't, the default value (usually 6 digits) is used.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&amp;gt; Double data types&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&amp;gt; How to display the float number with 9 decimal places. example: ...&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I hope you realized that "double" and "float" are different types of different size.&lt;BR /&gt;Only "float" is natively supported by Cortex M FPUs, and several clib implementations (i.e. printf()/scanf()) have no or limited support for "double" either.&lt;BR /&gt;Check the respective library documentation.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 09:16:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717931#M54013</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2023-09-06T09:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Double data types</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717932#M54014</link>
      <description>Hi Alice,&lt;BR /&gt;Thanks. It works.&lt;BR /&gt;How about if the user enters unknown number of decimal places?&lt;BR /&gt;How should write in this code line?&lt;BR /&gt;SCANF("%f ",&amp;amp;number1);&lt;BR /&gt;Why is the double data type not using %lf?</description>
      <pubDate>Wed, 06 Sep 2023 09:17:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Double-data-types/m-p/1717932#M54014</guid>
      <dc:creator>Bay</dc:creator>
      <dc:date>2023-09-06T09:17:00Z</dc:date>
    </item>
  </channel>
</rss>

