LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 15 Feb 2006 11:38:15 -0600
Reply-To:     Jiann-Shiun Huang <Jiann-Shiun.Huang@AMERUS.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jiann-Shiun Huang <Jiann-Shiun.Huang@AMERUS.COM>
Subject:      Re: Mantissa function
Comments: To: von-hippel.1@OSU.EDU
Content-Type: text/plain; charset=US-ASCII

Modify the following code for your need. Mantissa of the variable a is shown in log window. In this case, the value 10000 will show mantissa of 1. If you want to have mantissa 0.1 then substitute ceil(log10(a)) with (floor(log10(a))+1);

data _null_; a=123456; mantissa=a/10**ceil(log10(a)); put mantissa=; run;

J S Huang 1-515-557-3987 fax 1-515-557-2422

>>> "von-hippel.1@osu.edu" <von-hippel.1@OSU.EDU> 2/15/2006 11:15:09 AM >>> Does anyone know of a simple function to extract the mantissa from a SAS numeric variable? e.g., .9978 9.978 99.978 would all be converted to .9978.

Thanks!


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