<?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: sas iml basic in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/275480#M2829</link>
    <description>&lt;P&gt;To answer your question we would need to see the whole program. You did not provide any context or link to the source of your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like the basis of your question is &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/68150/HTML/default/viewer.htm#imlug_imlstart_sect010.htm\" target="_self"&gt;an example in the SAS/IML documentation.&lt;/A&gt;&amp;nbsp;In the example, w measures the change between the old and new values in an iterative algorithm. &amp;nbsp;The author wants to stop the algorithm when the i_th iterate is within 0.001 of the (i-1)th iterate. If you wanted greater precision, you could say&lt;/P&gt;
&lt;P&gt;do until(w &amp;lt; 1e-6);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Incidentally, to better undertstand the algorithm see the article &lt;A href="http://blogs.sas.com/content/iml/2016/05/16/babylonian-square-roots.html" target="_self"&gt;"The Babylonian method for finding square roots by hand."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2016 17:52:15 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-06-06T17:52:15Z</dc:date>
    <item>
      <title>sas iml basic</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/271754#M2761</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I just started to study SAS iml. it is hard for me to understand&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would anybody explain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do until(w&amp;lt;1e-3);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* begin do loop */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my questions:&amp;nbsp; why is it used? Why "w" and "1e-3"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;y = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;#(z + x/z); &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;* Estimate square root;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;my questions: Why it is written like that? But not: y = 0.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;5#z or 0.5#x&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;I do not understand it &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;would you please give advice that helps me to understand? Thanks.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 16:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/271754#M2761</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-05-19T16:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: sas iml basic</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/271771#M2762</link>
      <description>&lt;P&gt;The DO UNTIL syntax is not special to SAS/IML. In SAS, a &lt;A href="http://blogs.sas.com/content/iml/2011/09/07/loops-in-sas.html" target="_self"&gt;DO UNTIL loop&lt;/A&gt;&amp;nbsp;iterates until a certain condition is met. In this case, iterate until the w variable is&amp;nbsp;smaller than&amp;nbsp;0.001.&amp;nbsp; The formula for y is equivalent to the more familiar DATA step syntax&lt;/P&gt;
&lt;P&gt;y = 0.5*(z + x/z);&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;y = (z + x/z)/2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To learn more about SAS/IML syntax, see the second and third tips in the article &lt;A href="http://blogs.sas.com/content/iml/2014/08/11/ten-tips-for-learning-sasiml.html" target="_self"&gt;"Ten tips for learning the SAS/IML language."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 16:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/271771#M2762</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-05-19T16:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: sas iml basic</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/274954#M2814</link>
      <description>&lt;P&gt;do until(w&amp;lt;1e-3);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I still do not understand why w is used, why 1e-3 is used&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 14:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/274954#M2814</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-03T14:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: sas iml basic</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/275480#M2829</link>
      <description>&lt;P&gt;To answer your question we would need to see the whole program. You did not provide any context or link to the source of your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like the basis of your question is &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/68150/HTML/default/viewer.htm#imlug_imlstart_sect010.htm\" target="_self"&gt;an example in the SAS/IML documentation.&lt;/A&gt;&amp;nbsp;In the example, w measures the change between the old and new values in an iterative algorithm. &amp;nbsp;The author wants to stop the algorithm when the i_th iterate is within 0.001 of the (i-1)th iterate. If you wanted greater precision, you could say&lt;/P&gt;
&lt;P&gt;do until(w &amp;lt; 1e-6);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Incidentally, to better undertstand the algorithm see the article &lt;A href="http://blogs.sas.com/content/iml/2016/05/16/babylonian-square-roots.html" target="_self"&gt;"The Babylonian method for finding square roots by hand."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 17:52:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/sas-iml-basic/m-p/275480#M2829</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-06-06T17:52:15Z</dc:date>
    </item>
  </channel>
</rss>

