<?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: round(3.1415, 1.5) = 3 in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949245#M2416</link>
    <description>&lt;P&gt;Is that a typo? &lt;SPAN&gt;round(3.1415, 1.2) = 3.6, not 2.6&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As far as round(3.1415,1.5), 3 is the closest multiple of 1.5 to the value 3.1415&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2024 15:05:57 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-10-28T15:05:57Z</dc:date>
    <item>
      <title>round(3.1415, 1.5) = 3</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949242#M2414</link>
      <description>round(3.1415, 1.2) = 2.6, it looks like it's right. but round(3.1415, 1.5) = 3, why?</description>
      <pubDate>Mon, 28 Oct 2024 14:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949242#M2414</guid>
      <dc:creator>duckduckgo</dc:creator>
      <dc:date>2024-10-28T14:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: round(3.1415, 1.5) = 3</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949244#M2415</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/470774"&gt;@duckduckgo&lt;/a&gt;, according to the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p0tj6cmga7p8qln1ejh6ebevm0c9.htm" target="_self"&gt;documentation on the ROUND function&lt;/A&gt;, it rounds&amp;nbsp;&lt;SPAN&gt;the first argument to the nearest multiple of the second argument. The nearest multiple of 1.2 is 3.6 (I believe this was a typo in your original message) and the nearest multiple of 1.5 is indeed 3. &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 15:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949244#M2415</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2024-10-28T15:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: round(3.1415, 1.5) = 3</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949245#M2416</link>
      <description>&lt;P&gt;Is that a typo? &lt;SPAN&gt;round(3.1415, 1.2) = 3.6, not 2.6&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As far as round(3.1415,1.5), 3 is the closest multiple of 1.5 to the value 3.1415&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 15:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949245#M2416</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-10-28T15:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: round(3.1415, 1.5) = 3</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949247#M2417</link>
      <description>&lt;P&gt;When you use the ROUND function SAS attempts to display the first argument as the nearest multiple of the second. The only possible multiples for any value rounded to 1.5 are 0, 1.5, 3, 4.5, 6, etc.&lt;/P&gt;
&lt;P&gt;Round is not division, which seems to be what&amp;nbsp; you are interpreting this to be.&lt;/P&gt;
&lt;P&gt;Consider this example:&lt;/P&gt;
&lt;PRE&gt;data example;
x1 = round(3.1415,1.45);
x2 = round(3.1415,1.46);
x3 = round(3.1415,1.47);
x4 = round(3.1415,1.48);
x5 = round(3.1415,1.49);
x6 = round(3.1415,1.5);
x7 = round(3.1415,1.51);
x8 = round(3.1415,1.52);
run;&lt;/PRE&gt;
&lt;P&gt;The nearest value to 3.1415 of a multiple of 1.45 is 2*1.45 or 2.9. of 1.46 is 2*1.46 or 2.92 ... 2*1.5=3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are playing around with Pi you may want to consider looking up the CONSTANT function to return better values of some constant values such as pi.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 15:20:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949247#M2417</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-10-28T15:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: round(3.1415, 1.5) = 3</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949248#M2418</link>
      <description>thank you, I get it.</description>
      <pubDate>Mon, 28 Oct 2024 15:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949248#M2418</guid>
      <dc:creator>duckduckgo</dc:creator>
      <dc:date>2024-10-28T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: round(3.1415, 1.5) = 3</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949250#M2419</link>
      <description>thank you so much, i get it.</description>
      <pubDate>Mon, 28 Oct 2024 15:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949250#M2419</guid>
      <dc:creator>duckduckgo</dc:creator>
      <dc:date>2024-10-28T15:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: round(3.1415, 1.5) = 3</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949251#M2420</link>
      <description>thank you&lt;BR /&gt;ദ്ദി˶˃ ᵕ ˂ )✧</description>
      <pubDate>Mon, 28 Oct 2024 15:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/round-3-1415-1-5-3/m-p/949251#M2420</guid>
      <dc:creator>duckduckgo</dc:creator>
      <dc:date>2024-10-28T15:27:01Z</dc:date>
    </item>
  </channel>
</rss>

