<?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: Exponential code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/868961#M343279</link>
    <description>&lt;P&gt;The 1E-6 is easy in SAS: That is acceptable as a fixed value though there might sometimes be some issues related to storage precision. The FORMAT you use to display the value might be of interest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   file print;
   x=1E-6;
   put 'Best5. format' x= best5.;
   put '9.7 format '   x= 9.7;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you have the same long exponent in the numerator and denominator I would suggest calculating that as another variable and have much simpler code to type like&lt;/P&gt;
&lt;P&gt;FAST = exp(thatvar)/ (1+Exp(thatvar));&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2023 22:34:01 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-04-10T22:34:01Z</dc:date>
    <item>
      <title>Exponential code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/868935#M343270</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Anyone can help me of how to code the below equation into SAS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ursula_0-1681156658111.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82448i58A26384DADD7C57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ursula_0-1681156658111.png" alt="ursula_0-1681156658111.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;another one is (1e-6), how to code it in SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 20:17:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/868935#M343270</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2023-04-10T20:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/868938#M343271</link>
      <description>&lt;P&gt;EXP function for the e&lt;/P&gt;
&lt;P&gt;** is power operator so for 2^3 you can do 2**3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34666"&gt;@ursula&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Anyone can help me of how to code the below equation into SAS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ursula_0-1681156658111.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82448i58A26384DADD7C57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ursula_0-1681156658111.png" alt="ursula_0-1681156658111.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;another one is (1e-6), how to code it in SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 20:22:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/868938#M343271</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-10T20:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/868961#M343279</link>
      <description>&lt;P&gt;The 1E-6 is easy in SAS: That is acceptable as a fixed value though there might sometimes be some issues related to storage precision. The FORMAT you use to display the value might be of interest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   file print;
   x=1E-6;
   put 'Best5. format' x= best5.;
   put '9.7 format '   x= 9.7;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you have the same long exponent in the numerator and denominator I would suggest calculating that as another variable and have much simpler code to type like&lt;/P&gt;
&lt;P&gt;FAST = exp(thatvar)/ (1+Exp(thatvar));&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 22:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/868961#M343279</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-10T22:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/869009#M343296</link>
      <description>&lt;P&gt;The formula can be calculated in a single step, but as the same complex expression occurs twice, it is faster to calculate it in two steps:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FAST=exp(-1.65+1.07*log(LSM)+2.66E-8*CAP**3-63.3/AST);                                                                                
FAST=FAST/(1+FAST);                                                                                                                   
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;- by "faster" I mean both the amount of typing to be done, and the CPU time for the calculation.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 07:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/869009#M343296</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2023-04-11T07:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/869076#M343303</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34666"&gt;@ursula&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/n13u4gq0z9qwo4n15f6e6bg8mv79.htm" target="_blank" rel="noopener"&gt;LOGISTIC function&lt;/A&gt; to make the code shorter:&lt;/P&gt;
&lt;PRE&gt;FAST=logistic(-1.65+...);&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Apr 2023 10:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-code/m-p/869076#M343303</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-04-11T10:56:02Z</dc:date>
    </item>
  </channel>
</rss>

