Desktop productivity for business analysts and programmers

How to display all digits in a SUM() column?

Accepted Solution Solved
Reply
Contributor
Posts: 39
Accepted Solution

How to display all digits in a SUM() column?

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


Accepted Solutions
Solution
‎11-21-2013 01:33 PM
Community Manager
Posts: 2,692

Re: How to display all digits in a SUM() column?

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

View solution in original post


All Replies
Solution
‎11-21-2013 01:33 PM
Community Manager
Posts: 2,692

Re: How to display all digits in a SUM() column?

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

Regular Contributor
Posts: 244

Re: How to display all digits in a SUM() column?

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.

Contributor
Posts: 39

Re: How to display all digits in a SUM() column?

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 405 views
  • 3 likes
  • 3 in conversation