- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 04-14-2020 04:01 AM
(586 views)
Data num;
A=round (1234.56789,1111);
Run;
Output is:1111
Please give me clarification How it comes 1111
A=round (1234.56789,1111);
Run;
Output is:1111
Please give me clarification How it comes 1111
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
When you use 1111 as the second argument, multiples of 1111 are used as values to be rounded to.
Since 1234 is between 1111 (= 1111 * 1) and 2222 (= 1111 * 2), we need to look to which of those two numbers 1234 is closer, and that is 1111 (abs(1234 - 1111) = 123, while abs(1234 - 2222) = 988).