<?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 round up number ? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-round-up-number/m-p/67727#M19388</link>
    <description>Just for clarification - given the examples you showed, I would say you are rounding down, not up.&lt;BR /&gt;
&lt;BR /&gt;
CEIL function would round "UP".&lt;BR /&gt;
FLOOR function would round "DOWN".&lt;BR /&gt;
&lt;BR /&gt;
The SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  has technical papers (user community - SUGI, SGF) and SAS product documentation for reference -- links for example are provided below.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SUGI/SGF paper - Introduction to SAS Functions&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi24/Begtutor/p57-24.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi24/Begtutor/p57-24.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2 DOC - CEIL Function:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000207949.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000207949.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
FLOOR function:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000207955.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000207955.htm&lt;/A&gt;</description>
    <pubDate>Mon, 05 Jan 2009 13:35:48 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-01-05T13:35:48Z</dc:date>
    <item>
      <title>how to round up number ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-round-up-number/m-p/67725#M19386</link>
      <description>if I have number   -0.36, I want to have -1 or&lt;BR /&gt;
                          -1.2  I want to have -2&lt;BR /&gt;
&lt;BR /&gt;
       how to round up it ?&lt;BR /&gt;
thanks in advance.</description>
      <pubDate>Mon, 05 Jan 2009 11:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-round-up-number/m-p/67725#M19386</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-05T11:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to round up number ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-round-up-number/m-p/67726#M19387</link>
      <description>Hi! &lt;BR /&gt;
&lt;BR /&gt;
Use function Floor.&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
input num_a;&lt;BR /&gt;
num_b=floor(num_a);&lt;BR /&gt;
datalines;&lt;BR /&gt;
-0.36&lt;BR /&gt;
-1.2&lt;BR /&gt;
0.36&lt;BR /&gt;
1.2&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
It gives results exactly the way you wanted: &lt;BR /&gt;
num_a num_b&lt;BR /&gt;
-0.36      -1&lt;BR /&gt;
-1.2        -2&lt;BR /&gt;
0.36        0&lt;BR /&gt;
1.2          1</description>
      <pubDate>Mon, 05 Jan 2009 12:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-round-up-number/m-p/67726#M19387</guid>
      <dc:creator>ieva</dc:creator>
      <dc:date>2009-01-05T12:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to round up number ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-round-up-number/m-p/67727#M19388</link>
      <description>Just for clarification - given the examples you showed, I would say you are rounding down, not up.&lt;BR /&gt;
&lt;BR /&gt;
CEIL function would round "UP".&lt;BR /&gt;
FLOOR function would round "DOWN".&lt;BR /&gt;
&lt;BR /&gt;
The SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  has technical papers (user community - SUGI, SGF) and SAS product documentation for reference -- links for example are provided below.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SUGI/SGF paper - Introduction to SAS Functions&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi24/Begtutor/p57-24.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi24/Begtutor/p57-24.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2 DOC - CEIL Function:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000207949.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000207949.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
FLOOR function:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000207955.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000207955.htm&lt;/A&gt;</description>
      <pubDate>Mon, 05 Jan 2009 13:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-round-up-number/m-p/67727#M19388</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-01-05T13:35:48Z</dc:date>
    </item>
  </channel>
</rss>

