BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
80sMetalForever
Calcite | Level 5

I'm summing a column:

SUM(DIRECT_EP)

and no matter how I format it I get at the most:  -5.6843418860808E-14

I would like to see ALL digits; I tried things like FORMAT 50.50 and got the same thing so obviously I'm going about this wrong.

thx!

not sure if it matters but I'm doing it in PROC SQL

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

SAS adheres to an IEEE standard for floating-point number representation, and that precision might be what you're seeing.  For all of the details, reference this article:

Numerical precision in SAS

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

SAS adheres to an IEEE standard for floating-point number representation, and that precision might be what you're seeing.  For all of the details, reference this article:

Numerical precision in SAS

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
snoopy369
Barite | Level 11

50.50 wouldn't work in any event, since it doesn't allocate any space for the decimal point, and I think you have to have one spot to the left of the decimal (so 50.48 is your maximum).

In general, assume you have 15 digits of safe precision at the most.  BEST16. would give you that.  To get more precise than that you'd have to use another system that used more than 8 bytes to store numbers.

80sMetalForever
Calcite | Level 5

thx guys, I talked the requester into rounding so not really an issue now but still a good lesson on the subject

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 1862 views
  • 3 likes
  • 3 in conversation