<?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: rounding off to lower number in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413155#M101097</link>
    <description>&lt;P&gt;Sorry for putting it wrong first time . My problem (with any of the above code) is once the number shows as 0.005 or above (for round off two decimal), SAS would round off to 0.01. My case is even&amp;nbsp; when it reaches 0.005, it should display as 0.00 (for 2 digit round off) . But if i give 0.0050001 then it should display as 0.01.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have data:&lt;/P&gt;&lt;P&gt;0.0750001&lt;BR /&gt;0.0750000&lt;BR /&gt;0.0755920&lt;BR /&gt;0.0744999&lt;/P&gt;&lt;P&gt;0.0700001&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want to display as:&lt;/P&gt;&lt;P&gt;0.08&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;0.08&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I tried with above mentioned code manipulation and didn't find an answer.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2017 01:58:19 GMT</pubDate>
    <dc:creator>buddha_d</dc:creator>
    <dc:date>2017-11-14T01:58:19Z</dc:date>
    <item>
      <title>rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413053#M101057</link>
      <description>&lt;P&gt;folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;could you please help to round off numbers with sas function?&amp;nbsp;&lt;/P&gt;&lt;P&gt;eg: 0.0015 or 0.0019 or 0.001595 or anything after 0.001.... should be 0.001 until it hit 0.002&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 21:03:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413053#M101057</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-11-13T21:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413061#M101060</link>
      <description>&lt;P&gt;So truncation instead?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Always to the third decimal place or....?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 21:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413061#M101060</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-13T21:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413065#M101062</link>
      <description>&lt;P&gt;If you want 3 decimal places&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;newvalue = floor(value*1000)/1000;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Nov 2017 21:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413065#M101062</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-11-13T21:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413074#M101064</link>
      <description>&lt;P&gt;Basically you need to use some math functions. FLOOR can be used, but rounds to integers so first round it to the nearest integer and then create it back as a decimal value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or here's another of the math tricks using ROUND() function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;z = round(x - 0.0005, 0.001);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Nov 2017 21:18:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413074#M101064</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-13T21:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413081#M101069</link>
      <description>&lt;P&gt;You could also use the MOD() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  y = x - mod(x,0.001);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which will work differently for negative numbers than the FLOOR(x*1000)/1000 option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test ;
  input x;
  y = x - mod(x,0.001);
  z = floor(x*1000)/1000;
cards;
0.0015
0.0019
0.001595
-0.00234
;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs        x         y        z

 1     0.001500    0.001    0.001
 2     0.001900    0.001    0.001
 3     0.001595    0.001    0.001
 4     -.002340    -.002    -.003
&lt;/PRE&gt;
&lt;P&gt;FLOOR() will go down to -.003 since it is smaller than -.002340.&amp;nbsp; The MOD() will instead look more like a truncation of the first few digits. Essentially finding the round number that is closer to zero.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 21:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413081#M101069</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-13T21:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413084#M101072</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;If you want 3 decimal places&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;newvalue = floor(value*1000)/1000;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I should add this doesn't give the desired answer for negative numbers, but it is easily fixed.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 21:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413084#M101072</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-11-13T21:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413086#M101073</link>
      <description>&lt;P&gt;Could your incoming values be negative as well as positive?&amp;nbsp; Should -0.0015 round to -0.001 or to -0.002?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Depending on your answers, you might want to consider:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;var = int(var * 1000) / 1000;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 21:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413086#M101073</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-11-13T21:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413107#M101078</link>
      <description>Thank you all for the comments. No, there are no negative numbers. Let me give more clarification:&lt;BR /&gt;For example :&lt;BR /&gt;0.0450000 (0.040000-0.0450000) round off to 0.04 and anything above it eg: 0.0450001 (0.0450001-0.0459999) round off to 0.05.&lt;BR /&gt;Please let me know if need more clarification. Thanks in advance.</description>
      <pubDate>Mon, 13 Nov 2017 23:10:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413107#M101078</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-11-13T23:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413111#M101080</link>
      <description>&lt;P&gt;So &lt;U&gt;&lt;STRONG&gt;how do we&amp;nbsp;know&lt;/STRONG&gt;&lt;/U&gt; how many decimals you want?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is 0.00453 becoming 0.0045 or 0.004?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 23:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413111#M101080</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-13T23:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413118#M101085</link>
      <description>&lt;P&gt;We are rounding off to two digits. (eg: 0.065 is equals to 0.06 , 0.0650001 equals to 0.07).&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks reeza for prompt reply.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 00:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413118#M101085</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-11-14T00:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413119#M101086</link>
      <description>&lt;P&gt;Any of the above approaches can be easily modified to work with a two decimal place solution. If you have issues implementing&amp;nbsp;a specific solution post your code, log and DETAIL what issue you're receiving.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/139130"&gt;@buddha_d&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;We are rounding off to two digits. (eg: 0.065 is equals to 0.06 , 0.0650001 equals to 0.07).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks reeza for prompt reply.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then why did you start off with one that rounded to three digits?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 00:04:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413119#M101086</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-14T00:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413155#M101097</link>
      <description>&lt;P&gt;Sorry for putting it wrong first time . My problem (with any of the above code) is once the number shows as 0.005 or above (for round off two decimal), SAS would round off to 0.01. My case is even&amp;nbsp; when it reaches 0.005, it should display as 0.00 (for 2 digit round off) . But if i give 0.0050001 then it should display as 0.01.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have data:&lt;/P&gt;&lt;P&gt;0.0750001&lt;BR /&gt;0.0750000&lt;BR /&gt;0.0755920&lt;BR /&gt;0.0744999&lt;/P&gt;&lt;P&gt;0.0700001&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want to display as:&lt;/P&gt;&lt;P&gt;0.08&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;0.08&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I tried with above mentioned code manipulation and didn't find an answer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 01:58:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413155#M101097</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-11-14T01:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413159#M101098</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;If you have issues implementing&amp;nbsp;a specific solution post your code, log and DETAIL what issue you're receiving.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If you have issues implementing&amp;nbsp;a specific solution post your code, log and DETAIL what issue you're receiving.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/139130"&gt;@buddha_d&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Sorry for putting it wrong first time . My problem (with any of the above code) is once the number shows as 0.005 or above (for round off two decimal), SAS would round off to 0.01. My case is even&amp;nbsp; when it reaches 0.005, it should display as 0.00 (for 2 digit round off) . But if i give 0.0050001 then it should display as 0.01.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have data:&lt;/P&gt;
&lt;P&gt;0.0750001&lt;BR /&gt;0.0750000&lt;BR /&gt;0.0755920&lt;BR /&gt;0.0744999&lt;/P&gt;
&lt;P&gt;0.0700001&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want to display as:&lt;/P&gt;
&lt;P&gt;0.08&lt;/P&gt;
&lt;P&gt;0.07&lt;/P&gt;
&lt;P&gt;0.08&lt;/P&gt;
&lt;P&gt;0.07&lt;/P&gt;
&lt;P&gt;0.07&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I tried with above mentioned code manipulation and didn't find an answer.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 02:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413159#M101098</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-14T02:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413170#M101100</link>
      <description>&lt;P&gt;program, log and output are in the attachment&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 02:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413170#M101100</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-11-14T02:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413183#M101102</link>
      <description>&lt;P&gt;Looks fine to me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 03:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413183#M101102</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-14T03:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413185#M101103</link>
      <description>&lt;P&gt;I can test this now, but I think this would come close enough:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var = round(var - 1e-12, 0.01);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 03:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413185#M101103</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-11-14T03:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413186#M101104</link>
      <description>&lt;P&gt;Man, &lt;STRONG&gt;Astounding awesome&lt;/STRONG&gt;. Could you please give me logic for this??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a ton......&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 03:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413186#M101104</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-11-14T03:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413188#M101105</link>
      <description>&lt;P&gt;The basic idea is to round to the nearest 0.01.&amp;nbsp; That would solve most of the problem, except that standard rounding would round 0.015 to 0.02 instead of 0.01.&amp;nbsp; So subtract a tiny amount, and then round to the nearest 0.01.&amp;nbsp; If you actually have a value that is 0.0150000000001, this formula will be incorrect and will round to 0.01 instead of 0.02.&amp;nbsp; The "tiny amount" being subtracted would be enough to alter the result.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 03:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413188#M101105</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-11-14T03:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413189#M101106</link>
      <description>&lt;P&gt;How can I adjust the formula for varying digits (bold letters) for eg:&lt;/P&gt;&lt;P&gt;data new;&lt;BR /&gt;input x;&lt;BR /&gt;var = round(x - 1e-12, 0.01);&lt;BR /&gt;cards;&lt;BR /&gt;0.0750001&lt;BR /&gt;0.0750000&lt;BR /&gt;0.0755920&lt;BR /&gt;0.0744999&lt;BR /&gt;0.0700001&lt;BR /&gt;&lt;STRONG&gt;0.050000001&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;0.049999999&lt;/STRONG&gt;&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the results are:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;0.08&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;0.08&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;0.07&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0.05&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0.05&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 03:53:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413189#M101106</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-11-14T03:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: rounding off to lower number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413190#M101107</link>
      <description>&lt;P&gt;The next-to-last observation should be fine as is.&amp;nbsp; The last observation is asking for a new set of rules, and you haven't presented any such rules.&amp;nbsp; Here is another approach you can experiment with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var = round(var, 0.00000001);&lt;/P&gt;
&lt;P&gt;var = round(var, 0.01);&amp;nbsp; &amp;nbsp; or possibly&amp;nbsp; &amp;nbsp;var = round(var - 1e-10, 0.01);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By rounding twice, the 0.049999999 would become 0.05, then the second rounding wouldn't change the value.&amp;nbsp; You might have to experiment with the number of decimal places to use in the first rounding, and whether you want to subtract that tiny amount for the second rounding.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 03:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/rounding-off-to-lower-number/m-p/413190#M101107</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-11-14T03:59:54Z</dc:date>
    </item>
  </channel>
</rss>

