<?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 Float vs Packed Number in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839404#M1684046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really really appreciate if you could kindly help and share a glimpse on light on the following question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I know why for the same number with decimal, e.g. '35.54', can yield different result if I'm using different type of variable?&lt;/P&gt;&lt;P&gt;Below are the my source code and the result.&lt;/P&gt;&lt;P&gt;DATA:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float type f,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pn type p decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float = '35.54'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pn = '35.54'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write: / float.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write: / pn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/105797" /&gt;&lt;/P&gt;&lt;P&gt;Millions Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 May 2012 09:15:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-05-28T09:15:01Z</dc:date>
    <item>
      <title>Float vs Packed Number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839404#M1684046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really really appreciate if you could kindly help and share a glimpse on light on the following question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I know why for the same number with decimal, e.g. '35.54', can yield different result if I'm using different type of variable?&lt;/P&gt;&lt;P&gt;Below are the my source code and the result.&lt;/P&gt;&lt;P&gt;DATA:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float type f,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pn type p decimals 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float = '35.54'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pn = '35.54'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write: / float.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write: / pn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/105797" /&gt;&lt;/P&gt;&lt;P&gt;Millions Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 09:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839404#M1684046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-28T09:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Float vs Packed Number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839405#M1684047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yes.&lt;/DIV&gt;&lt;DIV&gt;Check F1 help for data types P and F and you can see the difference.&lt;BR /&gt;﻿&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;You use type F fields when you need to cope with very large value ranges and &lt;BR /&gt;rounding errors are not critical&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 09:26:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839405#M1684047</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2012-05-28T09:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Float vs Packed Number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839406#M1684048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since Float will display as&amp;nbsp; 3,55399999999999E+01 as&amp;nbsp;&amp;nbsp; 3.5 * 10 ( power of 1)&amp;nbsp; which is equivalent answer to the value. Since Float doesn't allow decimals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you used Packed Numbers, decimal point is fixed to places it would give you approx value. Here its 2 places so it would give the required .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to use new keywords such as 'DECFLOAT16' and 'DECFLOAT32' which is a mixture of both decimal float number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for further reference please try to read CD205 Advance ABAP topics for futher information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 09:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839406#M1684048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-28T09:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Float vs Packed Number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839407#M1684049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In computer arithmetic, only integer calculations are accurate, every other operation will round the results. Even a move is rounding the result.&lt;/P&gt;&lt;P&gt;- type p decimals 2. is actually an integer, with a virtual decimal position, no rounding.&lt;/P&gt;&lt;P&gt;- float is not an integer so the default value was converted and rounded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 09:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839407#M1684049</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-05-28T09:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Float vs Packed Number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839408#M1684050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;FLOAT has default decimal places of 16 &amp;amp; PACKED data type has 0.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;FLOAT decimal places are fixed whereas can be decided by the ABAPer for PACKED.&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 10:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839408#M1684050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-28T10:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Float vs Packed Number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839409#M1684051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The difference is as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;lt;&amp;lt; Moderator message - Cut and paste response from &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/thread/542914"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="http://scn.sap.com/thread/542914" target="test_blank"&gt;http://scn.sap.com/thread/542914&lt;/A&gt;&lt;SPAN style="color: #ff0000;"&gt; removed and points unassigned. Plagiarism is not allowed in SCN &amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For further information please refer the folowing threads&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://answers.sap.com/thread/1497542"&gt;http://scn.sap.com/thread/1497542&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff00ff;"&gt;Point begging also removed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Resh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2012 11:09:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/float-vs-packed-number/m-p/8839409#M1684051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-28T11:09:26Z</dc:date>
    </item>
  </channel>
</rss>

