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-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!

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
  • 1124 views
  • 0 likes
  • 3 in conversation