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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1896 views
  • 0 likes
  • 3 in conversation