BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
whymath
Lapis Lazuli | Level 10
data _null_;
  x=0.123456789d2;
  y=0.123456789e2;
  z=x=y;
  put x= /y= /z=;
run;

x=12.3456789
y=12.3456789
z=1

I can use D or E in scientific notation in SAS, is there any difference between them?

1 ACCEPTED SOLUTION

Accepted Solutions
s_lassen
Meteorite | Level 14

I think the D notation comes from FORTRAN, where it is used to denote double-precision numbers (64-bit floating-point numbers, as opposed to 32 bit - like a C double vs. float). In SAS, all numbers are double-precision floats, so it does not matter here. But I would recommend using the E notation, as that is more commonly understood.

View solution in original post

2 REPLIES 2
s_lassen
Meteorite | Level 14

I think the D notation comes from FORTRAN, where it is used to denote double-precision numbers (64-bit floating-point numbers, as opposed to 32 bit - like a C double vs. float). In SAS, all numbers are double-precision floats, so it does not matter here. But I would recommend using the E notation, as that is more commonly understood.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 373 views
  • 3 likes
  • 3 in conversation