BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi-
I'm doing a proc compare on two different dataset and wanted to get a resulting dataset with just the records with different values. But for some reason even though I have the same values the diff is calculated as a E value ( eg: 28.4-28.4=3.552714E-150). I know this is a place for data step questions but this happens even if I do a difference in the datastep. As of now to keep rolling I created an array that looks at each record and variable with "E" and changed to "0". But is there a way/function that I need to incorporate to over come this issue.

Regards,
Addy
2 REPLIES 2
RickM
Fluorite | Level 6
Floating point error is annoying but it happens. Use C=fuzz(A-B) .
SASKiwi
PROC Star
What COMPARE method are you using? If you use EXACT it is likely to report the floating point errors you are finding. Try ABSOLUTE is it should ignore small differences.

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 25. 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
  • 1352 views
  • 0 likes
  • 3 in conversation