<?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: Scientific notation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90011#M19107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... here's a "no math"&amp;nbsp; idea ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;data _null_;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;do x = 123456789, -123456789, 0.003, -0.003, 0;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; m = input(scan(put(x,e15.),1,'E'),15.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; e = input(scan(put(x,e15.),2,'E'),15.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; put x= m= e=;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2012 21:20:06 GMT</pubDate>
    <dc:creator>MikeZdeb</dc:creator>
    <dc:date>2012-04-23T21:20:06Z</dc:date>
    <item>
      <title>Scientific notation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90008#M19104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function or macro available that will return the mantissa and the exponent of a number if written in scientific notation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if the number is 123456789 (= 1.23456789E+08), I would like to be able to return two numbers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.23456789 and&lt;/P&gt;&lt;P&gt;8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 21:25:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90008#M19104</guid>
      <dc:creator>Kastchei</dc:creator>
      <dc:date>2012-04-19T21:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Scientific notation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90009#M19105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming your data is numeric :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;do x = 123456789, -123456789, 0.003, -0.003, 0;&lt;/P&gt;&lt;P&gt;if x=0 then e = 0;&lt;/P&gt;&lt;P&gt;else e = floor(log10(abs(x)));&lt;/P&gt;&lt;P&gt;m = x/(10**e);&lt;/P&gt;&lt;P&gt;put (_all_) (=);&lt;/P&gt;&lt;P&gt;end;&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;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 22:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90009#M19105</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-04-19T22:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Scientific notation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90010#M19106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 14:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90010#M19106</guid>
      <dc:creator>Kastchei</dc:creator>
      <dc:date>2012-04-23T14:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Scientific notation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90011#M19107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... here's a "no math"&amp;nbsp; idea ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;data _null_;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;do x = 123456789, -123456789, 0.003, -0.003, 0;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; m = input(scan(put(x,e15.),1,'E'),15.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; e = input(scan(put(x,e15.),2,'E'),15.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; put x= m= e=;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 21:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scientific-notation/m-p/90011#M19107</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-04-23T21:20:06Z</dc:date>
    </item>
  </channel>
</rss>

