<?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: how to make a correct judgement when I assign a scientific notation to a macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/723911#M224726</link>
    <description>&lt;P&gt;Why is this needed in macro code?&lt;/P&gt;
&lt;P&gt;Macro code is to generate code generally and the kind of things dealing with decimal values smack strongly of data manipulation is not what the macro code does, or at least seldom should be involved with.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 16:51:18 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-03-05T16:51:18Z</dc:date>
    <item>
      <title>how to make a correct judgement when I assign a scientific notation to a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/723894#M224718</link>
      <description>&lt;P&gt;This is the first log, it looks weird:&lt;/P&gt;&lt;P&gt;4671 %put &amp;amp;p_nor &amp;amp;ProbF;&lt;BR /&gt;2.78E-16 0.5349&lt;BR /&gt;4672 %MACRO a;&lt;BR /&gt;4673 %if &amp;amp;p_nor&amp;gt;2.78 and &amp;amp;ProbF&amp;gt;0.1 %then %do;&lt;BR /&gt;4674 %put &amp;amp;p_nor&amp;gt;0.1 and &amp;amp;ProbF&amp;gt;0.1;&lt;BR /&gt;4675 %end;&lt;BR /&gt;4676 %else %do;&lt;BR /&gt;4677 %put else;&lt;BR /&gt;4678 %end;&lt;BR /&gt;4679 %MEND;&lt;BR /&gt;4680 %a&lt;BR /&gt;2.78E-16&amp;gt;0.1 and 0.5349&amp;gt;0.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then i try this one:&lt;/P&gt;&lt;P&gt;4685 %put &amp;amp;p_nor &amp;amp;ProbF;&lt;BR /&gt;2.78E-16 0.5349&lt;BR /&gt;4686 %MACRO a;&lt;BR /&gt;4687 %if &amp;amp;p_nor&amp;gt;2.79 and &amp;amp;ProbF&amp;gt;0.1 %then %do;&lt;BR /&gt;4688 %put &amp;amp;p_nor&amp;gt;2.79 and &amp;amp;ProbF&amp;gt;0.1;&lt;BR /&gt;4689 %end;&lt;BR /&gt;4690 %else %do;&lt;BR /&gt;4691 %put else;&lt;BR /&gt;4692 %end;&lt;BR /&gt;4693 %MEND;&lt;BR /&gt;4694 %a&lt;BR /&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i assign a scientific notation to a macro variable,it seems sas make the judgement by using the numeric part of the macro variable.&lt;/P&gt;&lt;P&gt;it shows that in sas macro 2.78E-16&amp;gt;0.1 and&amp;nbsp;2.78E-16&amp;lt;2.79.&lt;/P&gt;&lt;P&gt;how to make sas to make a right judgement???&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 15:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/723894#M224718</guid>
      <dc:creator>RorschachYoung</dc:creator>
      <dc:date>2021-03-05T15:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to make a correct judgement when I assign a scientific notation to a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/723895#M224719</link>
      <description>&lt;P&gt;In SAS macro code statements that use conditions (%IF %WHILE %UNTIL) use %EVAL() to evaluate the condition.&amp;nbsp; %EVAL() can only do integer arithmetic so if text does not look like an integer it is treated as pure text.&lt;/P&gt;
&lt;P&gt;Use %SYSEVALF() instead to handle floating point, including scientific notation and date/time literals.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if %sysevalf(&amp;amp;p_nor&amp;gt;2.79 and &amp;amp;ProbF&amp;gt;0.1) %then %do;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Mar 2021 16:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/723895#M224719</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-03-05T16:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to make a correct judgement when I assign a scientific notation to a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/723911#M224726</link>
      <description>&lt;P&gt;Why is this needed in macro code?&lt;/P&gt;
&lt;P&gt;Macro code is to generate code generally and the kind of things dealing with decimal values smack strongly of data manipulation is not what the macro code does, or at least seldom should be involved with.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 16:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/723911#M224726</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-05T16:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to make a correct judgement when I assign a scientific notation to a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/724111#M224799</link>
      <description>thanks a lot</description>
      <pubDate>Sat, 06 Mar 2021 02:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/724111#M224799</guid>
      <dc:creator>RorschachYoung</dc:creator>
      <dc:date>2021-03-06T02:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to make a correct judgement when I assign a scientific notation to a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/724112#M224800</link>
      <description>i need to reuse this macro code several times, and i want to add some conditional control</description>
      <pubDate>Sat, 06 Mar 2021 02:53:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-make-a-correct-judgement-when-I-assign-a-scientific/m-p/724112#M224800</guid>
      <dc:creator>RorschachYoung</dc:creator>
      <dc:date>2021-03-06T02:53:10Z</dc:date>
    </item>
  </channel>
</rss>

