<?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: EXP funciton warning in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571726#M161309</link>
    <description>&lt;P&gt;Please post the&amp;nbsp;&lt;EM&gt;whole&lt;/EM&gt; log of the step. Use the {i} button for posting logs.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2019 10:21:48 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-07-08T10:21:48Z</dc:date>
    <item>
      <title>EXP funciton warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571724#M161307</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting below log message when i used EXP function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am removing missing values before passing , but still i am getting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data step :&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if nmiss(gmean)=&lt;STRONG&gt;0&lt;/STRONG&gt; then gmean1=exp(gmean);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PARTN=1 PARTTXT=Part 1 Dose Escalation TRTP=3 mg/kg PARAM=Carboxy-Dabrafenib PARAMCD=2298683 AVISITN=50 AVISIT=WEEK 1 DAY 1&lt;/P&gt;
&lt;P&gt;ATPTNUM=70 ATPT=4 HOURS POST DOSE _TYPE_=0 _FREQ_=1 n1=1 nc=1 mean1=2968.26 gmean=2968.26 max1=2968.26 min1=2968.26 sd= gsd=&lt;/P&gt;
&lt;P&gt;med=2968.26 CV1= gmean1= gcv= _ERROR_=1 _N_=3&lt;/P&gt;
&lt;P&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to&lt;/P&gt;
&lt;P&gt;missing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 10:02:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571724#M161307</guid>
      <dc:creator>RajasekharReddy</dc:creator>
      <dc:date>2019-07-08T10:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: EXP funciton warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571725#M161308</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/20574"&gt;@RajasekharReddy&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.....&lt;/P&gt;
&lt;P&gt;PARTN=1 PARTTXT=Part 1 Dose Escalation TRTP=3 mg/kg PARAM=Carboxy-Dabrafenib PARAMCD=2298683 AVISITN=50 AVISIT=WEEK 1 DAY 1&lt;/P&gt;
&lt;P&gt;ATPTNUM=70 ATPT=4 HOURS POST DOSE _TYPE_=0 _FREQ_=1 n1=1 nc=1 mean1=2968.26 gmean=2968.26 max1=2968.26 min1=2968.26 sd= gsd=&lt;/P&gt;
&lt;P&gt;med=2968.26 CV1= gmean1= gcv= _ERROR_=1 _N_=3&lt;/P&gt;
&lt;P&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to&lt;/P&gt;
&lt;P&gt;missing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like a value for gmean of 2968.26 is above the limit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the documentation:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The result is limited by the maximum value of a floating-point value on the computer.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n0ocutx9jgosdln17xg1z75jmkbv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n0ocutx9jgosdln17xg1z75jmkbv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;28         data test;
29           do gmean=1,2,.,2968.26;
30             if nmiss(gmean)=0 then gmean1=exp(gmean);
31           end;
32           stop;
33         run;

NOTE: Invalid argument to function EXP(2968.26) at line 30 column 35.
gmean=2968.26 gmean1=. _ERROR_=1 _N_=1
NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to 
      missing values.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just by trying in a SAS9.4 environment it appears the limit is somewhere below a value of 710.&lt;/P&gt;
&lt;PRE&gt;28         data test;
29           do gmean=1 to 3000;
30             if nmiss(gmean)=0 then gmean1=exp(gmean);
31           end;
32           stop;
33         run;

NOTE: Invalid argument to function EXP(710) at line 30 column 35.
NOTE: Invalid argument to function EXP(711) at line 30 column 35.&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jul 2019 10:22:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571725#M161308</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-07-08T10:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: EXP funciton warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571726#M161309</link>
      <description>&lt;P&gt;Please post the&amp;nbsp;&lt;EM&gt;whole&lt;/EM&gt; log of the step. Use the {i} button for posting logs.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 10:21:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571726#M161309</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-08T10:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: EXP funciton warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571747#M161317</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a simple calculation of the limit :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let MAXITER=10000;
%let precision=1.0e-12;

data step;
    mini=0;
    maxi=3000;

    do i=1 to &amp;amp;MAXITER. until (maxi-mini&amp;lt;&amp;amp;precision.);
        try=(maxi+mini)/2;
        res=exp(try);

        if _ERROR_=1 then do;
            _ERROR_=0;
            maxi=try;
        end;
        else mini=try;
    end;

    res=exp(mini);
    put mini= res=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Invalid argument to function EXP(1500) at line 701 column 13.
NOTE: Invalid argument to function EXP(750) at line 701 column 13.
NOTE: Invalid argument to function EXP(726.5625) at line 701 column 13.
NOTE: Invalid argument to function EXP(714.84375) at line 701 column 13.
NOTE: Invalid argument to function EXP(711.9140625) at line 701 column 13.
NOTE: Invalid argument to function EXP(710.44921875) at line 701 column 13.
NOTE: Invalid argument to function EXP(710.08300781) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.89990234) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.80834961) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78546143) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78403091) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78331566) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78295803) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78277922) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78273451) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78272334) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271775) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271496) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271356) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271321) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271303) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271295) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.7827129) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.7827129) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.7827129) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271289) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271289) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271289) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271289) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271289) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271289) at line 701 column 13.
NOTE: Invalid argument to function EXP(709.78271289) at line 701 column 13.
mini=709.78271289 res=1.797693E308
NOTE: Mathematical operations could not be performed at the following places. The results of the
      operations have been set to missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      32 at 701:13
NOTE: The data set WORK.STEP has 1 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jul 2019 11:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571747#M161317</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2019-07-08T11:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: EXP funciton warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571763#M161319</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30622"&gt;@gamotte&lt;/a&gt;: Nice algorithm. But why not simply&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
x=log(constant('big'));
put x=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Actually, this turns out to be the smallest number which exceeds the admissible range. Subtracting one unit of the least significant bit yields the largest number within the range (now assuming Windows/Unix):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
x=log(constant('big'));
put x= best20. x hex16.;
t=x-2**(floor(log2(x))-52);
put t= best20. t hex16.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;x=709.782712893384 40862E42FEFA39EF
t=709.782712893383 40862E42FEFA39EE&lt;/PRE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/20574"&gt;@RajasekharReddy&lt;/a&gt;: Realizing that you tried to calculate a 1290-digit number (not counting decimals), you should really double-check the formula for the &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0ywq67uqarnnen135hhs9gcsuv0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;geometric mean&lt;/A&gt; or whatever you wanted to compute with your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 13:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571763#M161319</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-07-08T13:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: EXP funciton warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571768#M161320</link>
      <description>&lt;P&gt;Thanks. I didn't know "constant('big')" of course, hence the algorithm.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 14:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EXP-funciton-warning/m-p/571768#M161320</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2019-07-08T14:01:04Z</dc:date>
    </item>
  </channel>
</rss>

