SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
teja5959
Obsidian | Level 7

Hi please any one do this one

 

have                                           want

75.88599179                              75.87

71.75830186                              71.74

98.06665526                              98.04

81.73733246                              81.72

93.80288764                              93.78

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

What is the logic here?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

What does that mean?

75.88599179                              75.87

There is no rounding function which will round to some ad hoc number, you will need to specify the logic for what should happen to the number.  Rounding

75.88599179       

To two decimals will yield 75.88, there is no reason to take 0.01 off as far as I can tell.

ballardw
Super User

@RW9 wrote:

What does that mean?

75.88599179                              75.87

There is no rounding function which will round to some ad hoc number, you will need to specify the logic for what should happen to the number.  Rounding

75.88599179       

To two decimals will yield 75.88, there is no reason to take 0.01 off as far as I can tell.


Or .02 in the last row of the example

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 763 views
  • 0 likes
  • 4 in conversation