Date: Wed, 11 Jul 2001 09:50:36 -0700
Reply-To: Dale McLerran <dmclerra@MY-DEJA.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dale McLerran <dmclerra@MY-DEJA.COM>
Subject: Re: Can D be replaced by E?
Content-Type: text/plain
Gerhard,
A slight correction is in order here. In SAS, all numeric values
are written to the program data vector (PDV) as double precision
(8 bytes). There is no single precision in the PDV. One can store
numeric values in a SAS dataset in fewer than 8 bytes. On some
systems, numeric values can be stored with minimum length 2 bytes and
on other systems with minimum length 3 bytes. Obviously, the
precision with which data values are saved affects the precision of
the representation of those data. So, if you save a real valued
variable in 4 bytes (single precision) and then use those data in a
subsequent datastep or procedure in which the PDV retains a copy of
the data in 8 bytes (double precision), you still effectively have
single precision.
Dale
p.s. I would agree with you that the HTML formatting makes it
difficult to read the original post. Some new e-mailers are actually
(optionally) writing HTML. I would venture to guess that this is why
we saw the e-mail in this format. However, it would be advisable to
switch to another format for writing e-mails.
>Date: Wed, 11 Jul 2001 11:42:38 -0400
>Reply-To: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
> Gerhard Hellriegel <ghellrieg@T-ONLINE.DE> Re: Can D be replaced by E? SAS-L@LISTSERV.UGA.EDU
>On Wed, 11 Jul 2001 11:21:51 -0400, shireen p <shireenp@HOTMAIL.COM> wrote:
>
>><html><DIV>Hello,</DIV>
>><DIV>If this is some of my data,</DIV>
>><DIV> </DIV>
>><DIV>.14434D-01 .57590D+01 .56786D+00<BR>.24434D-
>01 .37590D+01 .87786D+00<BR>.13434D-01 .67590D+01 .76786D+00</DIV>
>><DIV>
>><P>Looking at my data it looks like D+01 can be replaced by E, however how
>can I do that as a general statement for all D, so that wherever there is a
>D it can be replaced by E since I am doing a Monte Carlo study and that
>means a lot of D's. </P>
>><P>Another question is : Will E+01 read the same as E1 because from the
>SAS manual one example is 2.3E1 results in 23 (ie 2.3 * 10^1) also 230E-1
>results in 23. SO would E-01 read the same as E-1? Also what doeseg: x=input
>(".45767E+00",Best.) ; do?</P>
>><P>Thank you for any suggestions.</P><BR><BR></DIV><br clear=all><hr>Get
>your FREE download of MSN Explorer at <a
>href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html>
>
>
>First of all: would be nice if you could switch off HTML for your e-mails.
>That would be much more easier to read for most of us.
>I assume the D instead of E is a old Fortran relict and is only implemented
>to be compatible with such notifications. In FORTRAN I remember, the D was
>used for "double precision" and E for "single precision" which had
>influence to the internal representation of the numbers and the precision
>of the mantissa and the exponent.
>In SAS however there is no double precision and therefor it's all the same.
>Only to be compatible with such numbers.
>Also the notifications which you mentioned (e+01, e1, e+1) are all the same.
>
>I assume, that SAS did not implement the original Fortran bahaviour,
>because SAS comes from PL/1 programmers. I think that in PL/1 that was
>possible also, but I'm not sure about that. As far as I remember also in
>PL/1 there was no difference between D and E, because there the size and
>precision of the float variables where defined in seperate declare -
>statements.
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@fhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
------------------------------------------------------------
--== Sent via Deja.com ==--
http://www.deja.com/
|