Date: Wed, 6 Sep 2000 15:08:22 -0500
Reply-To: Lary Jones <ljones@BINGHAMTON.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lary Jones <ljones@BINGHAMTON.EDU>
Subject: Re: ROUND Function in Ver 8.1
In-Reply-To: <0037DF5B.C21292@westat.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 11:20 AM 9/6/2000 -0400, HERMANS1 wrote:
>The test program runs correctly under HPUX V8.0 (TSI10). Any results
>under HPUX SAS V8.1? Only detected under Sun V8.1? Thanks to Glenn and
>Tim for posting these results on SAS-L. Always interested in topics
>related to QA. Sig
I get the error when running SAS 8.01 01M0 under NT4 SP6. Nevertheless,
going back to a test program from a while ago, I find that 8.01 produces
results which are more appropriate.
data rounds;
x = 22.0/7.0; * a non-repeating number;
y1 = round(x,0.01);
y2 = round(x,0.02);
y3 = round(x,0.03);
y4 = round(x,0.04);
y5 = round(x,0.05);
y6 = round(x,0.06);
y7 = round(x,0.07);
format x y1 y2 y3 y4 y5 y6 y7 12.9;
OUTPUT;
STOP;
;RUN;
proc transpose data=rounds out=flipped;
;RUN;
proc print data=flipped;
;RUN;
Win NT: SAS 6.12
-----------------
OBS _NAME_ COL1
1 X 3.142857143
2 Y1 3.140000000
3 Y2 3.140000000
4 Y3 3.151515152 <== should be 3.15000 (.05, .10, .15)
5 Y4 3.160000000
6 Y5 3.150000000
7 Y6 3.125000000 <== should be 3.12000 (.06, .12, .18)
8 Y7 3.142857143
Win NT: SAS 8.01
-----------------
OBS _NAME_ COL1
1 X 3.142857143
2 Y1 3.140000000
3 Y2 3.140000000
4 Y3 3.150000000
5 Y4 3.160000000
6 Y5 3.150000000
7 Y6 3.120000000
8 Y7 3.150000000 <== should be 3.14 (.07, .14, .21)