<?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 Last two digits changed when converting character value into numeric value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122004#M25002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a character variable with values of numbers (17-18 digits). I wanted to convert them into numeric. But the last two digits have changed for some reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sas code I used is:&lt;/P&gt;&lt;P&gt;data convert;&lt;/P&gt;&lt;P&gt;set original;&lt;/P&gt;&lt;P&gt;numeric=input(character 18.0);&lt;/P&gt;&lt;P&gt;format numeric 18.0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&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;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Oct 2013 13:12:19 GMT</pubDate>
    <dc:creator>cindyforest7</dc:creator>
    <dc:date>2013-10-24T13:12:19Z</dc:date>
    <item>
      <title>Last two digits changed when converting character value into numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122004#M25002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a character variable with values of numbers (17-18 digits). I wanted to convert them into numeric. But the last two digits have changed for some reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sas code I used is:&lt;/P&gt;&lt;P&gt;data convert;&lt;/P&gt;&lt;P&gt;set original;&lt;/P&gt;&lt;P&gt;numeric=input(character 18.0);&lt;/P&gt;&lt;P&gt;format numeric 18.0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&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;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 13:12:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122004#M25002</guid>
      <dc:creator>cindyforest7</dc:creator>
      <dc:date>2013-10-24T13:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Last two digits changed when converting character value into numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122005#M25003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;can't use more then 16 digits. refer this: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/techsup/technote/ts654.pdf" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0e66ba; background-color: #ffffff;"&gt;http://support.sas.com/techsup/technote/ts654.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 13:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122005#M25003</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2013-10-24T13:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Last two digits changed when converting character value into numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122006#M25004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on your operating system, SAS can only handle around 15 digits of precision with a numeric (in Windows, out of 64 bits for an 8 byte number, 1 is the sign and 11 are the exponent, meaning 52 bits are available for the mantissa (the precise digits) - around 4x10^15. Any number over 4x10^15 will begin losing precision.&amp;nbsp; See &lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000695157.htm" title="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000695157.htm"&gt;SAS(R) 9.2 Language Reference: Concepts, Second Edition&lt;/A&gt; for more information. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 13:57:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122006#M25004</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2013-10-24T13:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Last two digits changed when converting character value into numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122007#M25005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even 16 digits is not safe.&amp;nbsp; 2^53 (around 4x10^15) is the maximum storable number with full precision; so some Visa numbers may be storable, but no Mastercard numbers (5x10^15).&amp;nbsp; This of course is often relevant with credit card numbers simply because they are right at that point of precision loss.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 13:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Last-two-digits-changed-when-converting-character-value-into/m-p/122007#M25005</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2013-10-24T13:59:45Z</dc:date>
    </item>
  </channel>
</rss>

