[bit.listserv.sas-l] PL/I FLOAT

CSQUIRES@UMINN1.BITNET (Curt Squires) (02/06/90)

I'm reading a data file that was created with PL/I.  My info gives one
of the fields as 4 columns and defined by the PL/I format FLOAT(6).
The values seem to input correctly with the SAS RB4. informat, but
how many significant digits do I have? (i.e. is FLOAT(6) 6 digits or
5 digits and a decimal point?)   Thank you..
  ---------------------------------------------------------------
University of Minnesota              Internet: CSquires@vm1.spcs.umn.edu
St. Paul Computing Services          BITNET:   CSquires@UMINN1

phil@WUBIOS.WUSTL.EDU (J. Philip Miller) (02/06/90)

> I'm reading a data file that was created with PL/I.  My info gives one
> of the fields as 4 columns and defined by the PL/I format FLOAT(6).
> The values seem to input correctly with the SAS RB4. informat, but
> how many significant digits do I have? (i.e. is FLOAT(6) 6 digits or
> 5 digits and a decimal point?)   Thank you..

gee, and to think I used to be a PL/I guru, but havn't written a line of PL/I
in at least 10 years :-(

FLOAT(k) refers to a floating point number with k digits of accuracy in the
mantissa (non-exponent) portion of the number.  By default FLOAT is decimal,
so this refers to 6 decimal digits of accuracy in the mantissa.  This
corrsponds most closely on a S/360 type machine to single precision
hexidecimal numbers so that RB4 is in fact the correct SAS format.  note that
for floating point numbers, the exponent (as long as it is in the -75 to +75)
range is not relevant.

-phil

--
     J. Philip Miller, Professor, Division of Biostatistics, Box 8067
	 Washington University Medical School, St. Louis MO 63110
phil@wubios.WUstl.edu - Internet  (314) 362-3617   phil@wubios.wustl - bitnet
uunet!wuarchive!wubios!phil-UUCP (314) 362-2693(FAX)  C90562JM@WUVMD - bitnet