BookmarkSubscribeRSS Feed
ThomasH
Calcite | Level 5
Hi all,

why would this piece of code

---
data _null_;

format a b 31.15;

a = 12345678912345.123456789123456;

b = a + 1;

run;
---

result in

b = 12345678912346.100000000000000?

OS is AIX.

Thanks,
Thomas
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
Roundoff.

SAS stores all numbers in floating point. The largest is 8 bytes. Your OS companion can tell you how big a number can be stored with what level of precision.

Doc Muhlbaier
Duke

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
  • 1 reply
  • 782 views
  • 0 likes
  • 2 in conversation