<?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: Need help on handling complex numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502541#M134160</link>
    <description>&lt;P&gt;SAS does not have built-in support for complex-valued analysis. There are a few instances where complex number arise in statistics (mostly time series and eigenvalues) but most&amp;nbsp;SAS functions take real arguments. If you want to use complex values, you might want to consider symbolic math software such as Mathematica.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can, of course, do these computations in SAS by defining your own functions, but it will be a pain. You can &lt;A href="http://scipp.ucsc.edu/~haber/archives/physics116A10/arc_10.pdf" target="_self"&gt;define the trig, arc-trig, and hyperbolic trig functions for complex numbers&lt;/A&gt;, but they are complicated and multivalued. You have to choose Principal Values to get an actual function.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Oct 2018 21:57:33 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2018-10-08T21:57:33Z</dc:date>
    <item>
      <title>Need help on handling complex numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502496#M134147</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; call symput('theta',arcos(Variable1));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I was trying to compute the arcos of Variable1, whose value&amp;nbsp;is&amp;nbsp; much greater than 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obviously, any value gt 1 is not a valid input argument for the function arcos() . I wonder if there is any clever way to bypass the restriction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While on the subject, can I assign complex value to a variable in SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 19:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502496#M134147</guid>
      <dc:creator>DatNinjaTurtle</dc:creator>
      <dc:date>2018-10-08T19:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on handling complex numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502523#M134155</link>
      <description>&lt;P&gt;What do you mean bypass? What do you want arcos(2) to be?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for complex numbers, SAS/IML is used. Lots of material if you do a web search like &lt;FONT face="courier new,courier"&gt;sas complex number&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 20:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502523#M134155</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-10-08T20:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on handling complex numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502536#M134157</link>
      <description>I was hoping to get complex output. like arccos(2)=0.0000 + 1.3170i.</description>
      <pubDate>Mon, 08 Oct 2018 21:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502536#M134157</guid>
      <dc:creator>DatNinjaTurtle</dc:creator>
      <dc:date>2018-10-08T21:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on handling complex numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502538#M134159</link>
      <description>&lt;P&gt;I see. My maths are too old...&lt;/P&gt;
&lt;P&gt;Maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;would be able to help?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 21:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502538#M134159</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-10-08T21:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on handling complex numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502541#M134160</link>
      <description>&lt;P&gt;SAS does not have built-in support for complex-valued analysis. There are a few instances where complex number arise in statistics (mostly time series and eigenvalues) but most&amp;nbsp;SAS functions take real arguments. If you want to use complex values, you might want to consider symbolic math software such as Mathematica.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can, of course, do these computations in SAS by defining your own functions, but it will be a pain. You can &lt;A href="http://scipp.ucsc.edu/~haber/archives/physics116A10/arc_10.pdf" target="_self"&gt;define the trig, arc-trig, and hyperbolic trig functions for complex numbers&lt;/A&gt;, but they are complicated and multivalued. You have to choose Principal Values to get an actual function.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 21:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-on-handling-complex-numbers/m-p/502541#M134160</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-10-08T21:57:33Z</dc:date>
    </item>
  </channel>
</rss>

