<?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 create a variable that has values in increments of .01, and that ranges from -4 to 4? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913079#M359900</link>
    <description>&lt;P&gt;Here one way to go:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  do var=-4 to 4 by 0.1;
    var=round(var,.00001);
    output;
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 26 Jan 2024 05:25:20 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2024-01-26T05:25:20Z</dc:date>
    <item>
      <title>How to create a variable that has values in increments of .01, and that ranges from -4 to 4?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913076#M359897</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please explain to me how to create a variable that has values in increments of .01, and that ranges from -4 to 4. There should be no duplicate values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;-4.00&lt;/P&gt;&lt;P&gt;-3.99&lt;/P&gt;&lt;P&gt;-3.98&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;all the way to 4.00.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 02:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913076#M359897</guid>
      <dc:creator>TacoLover</dc:creator>
      <dc:date>2024-01-26T02:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable that has values in increments of .01, and that ranges from -4 to 4?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913077#M359898</link>
      <description>&lt;P&gt;Here's a recommendation that avoids some of the approximations produced by floating point arithmetic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   do n=-400 to 400;
      newvar = n / 100;
      output;
   end;
keep newvar;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jan 2024 03:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913077#M359898</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2024-01-26T03:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable that has values in increments of .01, and that ranges from -4 to 4?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913079#M359900</link>
      <description>&lt;P&gt;Here one way to go:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  do var=-4 to 4 by 0.1;
    var=round(var,.00001);
    output;
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jan 2024 05:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913079#M359900</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-01-26T05:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable that has values in increments of .01, and that ranges from -4 to 4?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913411#M360036</link>
      <description>&lt;P&gt;This approach will also achieve what I want. I only can accept one approach as the solution, however.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 15:28:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-variable-that-has-values-in-increments-of-01-and/m-p/913411#M360036</guid>
      <dc:creator>TacoLover</dc:creator>
      <dc:date>2024-01-29T15:28:45Z</dc:date>
    </item>
  </channel>
</rss>

