Hi Folks,
I am trying to run below code
data person;
input name $ val;
datalines;
Mary 1236.52999991234
;
But after submitting the code, number is getting truncated after decimal places
I am getting only 1236.5299999
Last four digits i.e. 1234 are not coming but i want to print the whole number as it is
Is there any way?
Thanks,
Harsh
1. What format do you use for this numeric variable? It looks like the number is fine, but it is displayed rounded.
2. Be aware that PC and Unix machines cannot store more than 15 (sometimes 16) exact digits.
3. This number has 15 digits, and is not altered:
data T;
X= 1236.52999991234;
put X= 32.16;
run;
X=1236.5299999123400000
Unless you specifically assign a format, thecdefault format BEST12. will be used.
So you see
4 digits
1 period
7 digits
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.