Date: Mon, 6 Dec 1999 06:58:14 +1100 Tim Churches "SAS(r) Discussion" Tim Churches Re: Calculation Precision Limits To: richgod07950@my-deja.com text/plain; charset=us-ascii

usenet@INDUSTRIALSOFTWORKS.COM wrote: > > I don't know what you are working on, but I think > it's worth noting, that unless *both* the > numerator and the denominator are measured to a > precision of at least 17 significant figures > (pretty unlikely in the real world, where 5 or 6 > sig. figs is pretty good), carrying out the > calculation to 17 sig. fig. would be pretty > pointless (if not misleading!) > > 8-byte SAS numerics will maintain about 15 > significant figures for numbers ranging from > 1e-306 to 1e+306 (or somewhere near that), which > should be more than enough. > > hope this helps. > > -paul

Paul,

It is true that floating point numbers are rarely measured to a precision of 15 digits, but you need to remember that (unfortunately) SAS uses floating point numbers to represent integers as well - there is no separate integer or long integer type as in many other languages. It is not at all difficult to conceive of scenarios in which one might have integers longer than 15 digits on which one wants to perform accurate arithmetic...

Tim Churches

> > In article <826rna\$vqs\$1@nnrp1.deja.com>, > richgod07950@my-deja.com wrote: > > I have to perform a calculation which involves a > > division of a fairly small number by a very large > > number, and I must maintain the result at 17 > > digits of precision for a subsequent calculation. > > > > Not being very knowledgeable in the inner > > workings of floating point limits, I believe that > > SAS (MVS in this case) stores numerics at a > > maximum of 8 bytes which translates into 16 bytes > > of precision. > > > > Do I have any options with SAS in this > > circumstance, or do I need to use some other > > language. Any suggestions would be appreciated. > > > > Rich > > > > Sent via Deja.com http://www.deja.com/ > > Before you buy. > > > > Sent via Deja.com http://www.deja.com/ > Before you buy.

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