BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Nini1
Obsidian | Level 7

Hello everyone,

 

I have some problem with one variable. Some values are shown with 'e' , with scientific notation. I tried to format with best32. but it does not work. Could you please suggest any solution to this problem?

 

Thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

As soon as the exponent goes beyond 31, you will get the scientific notation; just run this for illustration:

data test;
format number best32.;
do i = 1 to 33;
  number = 10 ** i;
  output;
end;
run;

You can also see how, from a given exponent, the limits of numeric precision kick in and create artifacts.

View solution in original post

3 REPLIES 3
Amir
PROC Star

Hi,

 

Please provide some sample data and equivalent sample output, as well as the code used to create the output from the input. Please use the formatting tools provided to post code and data.

 

If you are reading from Excel then it is possible the scientific notation is what the raw data looks like.

 

 

Kind regards,

Amir.

Kurt_Bremser
Super User

As soon as the exponent goes beyond 31, you will get the scientific notation; just run this for illustration:

data test;
format number best32.;
do i = 1 to 33;
  number = 10 ** i;
  output;
end;
run;

You can also see how, from a given exponent, the limits of numeric precision kick in and create artifacts.

Nini1
Obsidian | Level 7
Thank you very much!

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 6704 views
  • 0 likes
  • 3 in conversation