LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 1999, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 4 Oct 1999 08:55:29 -0500
Reply-To:   mshines@purdue.edu
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Michael S Hines <mshines@PURDUE.EDU>
Subject:   Re: floating point lesson, please.
In-Reply-To:   <939037008.122885@ns0.klm.nl>
Content-Type:   text/plain; charset="iso-8859-1"

From the SAS Companion for the MVS Environment, Chapter 10

... All numeric values are stored in SAS data sets and are maintained internally in floating-point (real binary) representation. ...

and later on....

... Like other numeric values, SAS maintains integer varialbes in floating-point (real binary) representation. But under MVS, numeric integer values are typically represented as binary (fixed point) values using two's complement representation. SAS can read and write these values using informats and formats, but it does not process them internally in this form. ...

I stand by my previous statement....

On the IBM SAS uses 8 byte real values which consist of one byte sign, seven bits characteristic (bias of 040x), and 56 bits of mantissa (in hex). PP 141-143 explain the real binary representation and why rounding errors occur do to approximations to representing numbers. The LENGTH statement can be used to size these real numbers, but it affects precision - as the table on pate 144 shows.

-------------------------------------------- Michael S Hines, CISA,CIA,CFE,CDP Coordinator of Data Systems / Programming Schools of Engineering 1280 Engineering Administration West Lafayette, IN 47907-1280 Phone 765.494.5338 Fax 765.496.1466 e-mail: mshines@purdue.edu

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of F a b r i z i o Sent: Monday, October 04, 1999 6:33 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: floating point lesson, please.

Michael S Hines wrote in message ... >SAS does not have a data type of integer... all numbers are floating >point.

Though this is true, SAS is able to store any integer number whose absolute value does not exceed 2**53 (for PC and Unix environments) of 2**56 (for mainframe environments).

This exceeds the capacity of virtually any data type 'integer' which usually does not accept numbers over 2**31-1 (apart from some implementations of true 'decimal' hardware numbers which accept up to 31 decimal digits).

Grtz., Fabrizio


Back to: Top of message | Previous page | Main SAS-L page